@backstage/connections 0.0.0 → 0.1.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -0,0 +1,20 @@
1
+ # @backstage/connections
2
+
3
+ ## 0.1.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-plugin-api@1.9.3-next.0
9
+
10
+ ## 0.1.0
11
+
12
+ ### Minor Changes
13
+
14
+ - b1e3037: Added the connections package as experimental. A connection is a piece of configuration storing an external host and the credentials required to authenticate with that host. A single connections can be consumed by many plugins, reducing the amount of repeated configuration needed. Connections can have many auth methods which can be restricted to plugins/modules.
15
+
16
+ ### Patch Changes
17
+
18
+ - 95688f6: Added a `title` field to connections, providing a human-readable display name for each connection. When not explicitly configured, the title defaults to the provider name (e.g. "GitHub") or includes the host when multiple connections share a type (e.g. "GitHub (ghe.acme.com)").
19
+ - Updated dependencies
20
+ - @backstage/backend-plugin-api@1.9.2
@@ -125,6 +125,7 @@ class DefaultConnectionsService {
125
125
  }
126
126
  seen.add(key);
127
127
  }
128
+ this.#assignDefaultTitles();
128
129
  this.logger.info(
129
130
  `Loaded ${this.connections.length} connection${this.connections.length === 1 ? "" : "s"} from configuration`
130
131
  );
@@ -172,6 +173,21 @@ ${describeError(
172
173
  connection
173
174
  );
174
175
  }
176
+ #assignDefaultTitles() {
177
+ const typeCounts = /* @__PURE__ */ new Map();
178
+ for (const c of this.connections) {
179
+ const type = c.type;
180
+ typeCounts.set(type, (typeCounts.get(type) ?? 0) + 1);
181
+ }
182
+ for (const c of this.connections) {
183
+ if (!c.title) {
184
+ const type = c.type;
185
+ const displayName = lookup.getConnectionType(type).title;
186
+ const host = c.host;
187
+ c.title = typeCounts.get(type) > 1 ? `${displayName} (${host})` : displayName;
188
+ }
189
+ }
190
+ }
175
191
  #getConnectionsForPlugin(pluginId) {
176
192
  return this.connections.flatMap(({ match, auth, ...rest }) => {
177
193
  if (match && !match.plugins.includes(pluginId)) {
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultConnectionService.cjs.js","sources":["../../src/api/DefaultConnectionService.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ConnectionsService } from './ConnectionsService';\nimport {\n LoggerService,\n RootConfigService,\n} from '@backstage/backend-plugin-api';\nimport {\n ConnectionTypeKey,\n getConnectionType,\n isConnectionTypeKey,\n} from '../definitions';\nimport { ConnectionAuthMethodKey } from './ConnectionType';\nimport { Connection, RootConnection } from './Connection';\nimport { JsonObject } from '@backstage/types';\nimport {\n InputError,\n NotAllowedError,\n NotFoundError,\n toError,\n} from '@backstage/errors';\nimport { z } from 'zod/v4';\nimport { getLegacyIntegrations } from '../system/getLegacyIntegrations';\nimport { combineConnectionSources } from '../system/combineConnectionSources';\n\nfunction describeError(error: unknown): string {\n const e = toError(error);\n if (e.name === 'ZodError') {\n return z.prettifyError(e as unknown as z.ZodError);\n }\n return e.message;\n}\n\nclass PluginConnectionsService implements ConnectionsService {\n private readonly logger: LoggerService;\n private readonly connections: Connection[];\n\n constructor(logger: LoggerService, connections: Connection[]) {\n this.logger = logger;\n this.connections = connections;\n }\n\n async find<\n TType extends ConnectionTypeKey,\n TAuthMethod extends ConnectionAuthMethodKey<TType>,\n >(options: {\n type: TType;\n url: string;\n authMethods: readonly [TAuthMethod, ...TAuthMethod[]];\n }): Promise<Connection<TType, TAuthMethod>> {\n const result = await this.findOptional(options);\n if (!result) {\n throw new NotFoundError(\n `Connection not found for type \"${options.type}\" matching url \"${options.url}\"`,\n );\n }\n return result;\n }\n\n async findOptional<\n TType extends ConnectionTypeKey,\n TAuthMethod extends ConnectionAuthMethodKey<TType>,\n >({\n type,\n url,\n authMethods,\n }: {\n type: TType;\n url: string;\n authMethods: readonly [TAuthMethod, ...TAuthMethod[]];\n }): Promise<Connection<TType, TAuthMethod> | undefined> {\n this.logger.debug(\n `Finding connection of type \"${type}\" matching url \"${url}\"`,\n );\n let host: string;\n try {\n host = new URL(url).host;\n } catch {\n throw new InputError(\n `Invalid url \"${url}\" passed to ConnectionsService.find`,\n );\n }\n\n const connection = this.connections.find(\n c => c.type === type && (c as { host?: unknown }).host === host,\n ) as Connection<TType> | undefined;\n\n if (!connection) {\n return undefined;\n }\n\n if (connection.auth.length === 0) {\n throw new NotAllowedError(\n `Connection of type \"${type}\" for host \"${host}\" has no auth method available to this plugin`,\n );\n }\n\n const matchAuth = getConnectionType(type).matchAuth as\n | ((authMethods: any[], query: string) => any | undefined)\n | undefined;\n\n // We take the host-matched connection and check to see if there's an auth method better suited to the current url\n // e.g. org selection\n const selected = matchAuth\n ? matchAuth(connection.auth, url)\n : connection.auth[0];\n\n if (!selected) {\n return undefined;\n }\n\n // Now we compare user requested auth methods with what the connection can provide\n if (!(authMethods as readonly string[]).includes(selected.method)) {\n throw new NotAllowedError(\n `Connection not found for type \"${type}\" with auth method \"${selected.method}\"`,\n );\n }\n\n return {\n ...connection,\n auth: selected,\n } as Connection<TType, TAuthMethod>;\n }\n}\n\n/** @public */\nexport class DefaultConnectionsService {\n private readonly logger: LoggerService;\n private readonly connections: RootConnection[];\n private readonly config: RootConfigService;\n\n private constructor(logger: LoggerService, config: RootConfigService) {\n this.logger = logger;\n this.config = config;\n this.connections = [];\n this.#registerConnectionsFromConfig();\n }\n\n static create(options: {\n logger: LoggerService;\n config: RootConfigService;\n }): DefaultConnectionsService {\n return new DefaultConnectionsService(options.logger, options.config);\n }\n\n #registerConnectionsFromConfig(): void {\n const legacy = this.#validateLegacy(getLegacyIntegrations(this.config));\n\n const rawConnections = this.config.getOptional('connections');\n if (rawConnections !== undefined && !Array.isArray(rawConnections)) {\n throw new InputError(\n 'Expected \"connections\" config to be an array of connection objects',\n );\n }\n\n const fromConfig = this.#validateConfig(\n (rawConnections as JsonObject[] | undefined) ?? [],\n );\n\n if (legacy.length === 0 && fromConfig.length === 0) {\n return;\n }\n\n this.connections.push(\n ...combineConnectionSources(legacy, fromConfig, this.logger),\n );\n\n const seen = new Set<string>();\n for (const c of this.connections) {\n const host = (c as unknown as { host: string }).host;\n const key = `${c.type} ${host}`;\n if (seen.has(key)) {\n throw new InputError(\n `Duplicate connection of type \"${c.type}\" for host \"${host}\"`,\n );\n }\n seen.add(key);\n }\n\n this.logger.info(\n `Loaded ${this.connections.length} connection${\n this.connections.length === 1 ? '' : 's'\n } from configuration`,\n );\n }\n\n #validateConfig(raw: JsonObject[]): RootConnection[] {\n return raw.map(v => {\n try {\n return this.#validateConnection(v);\n } catch (e) {\n const type = typeof v.type === 'string' ? v.type : 'unknown';\n throw new InputError(\n `Invalid connection of type \"${type}\" in connections config:\\n${describeError(\n e,\n )}`,\n );\n }\n });\n }\n\n #validateLegacy(raw: JsonObject[]): RootConnection[] {\n const result: RootConnection[] = [];\n for (const v of raw) {\n try {\n result.push(this.#validateConnection(v));\n } catch (e) {\n const type = typeof v.type === 'string' ? v.type : 'unknown';\n this.logger.error(\n `Failed to validate connection of type \"${type}\":\\n${describeError(\n e,\n )}`,\n );\n }\n }\n return result;\n }\n\n #validateConnection(connection: JsonObject): RootConnection {\n if (typeof connection.type !== 'string') {\n throw new InputError(`Unrecognised connection type ${connection.type}`);\n }\n\n if (!isConnectionTypeKey(connection.type)) {\n throw new InputError(`Unrecognised connection type ${connection.type}`);\n }\n\n return getConnectionType(connection.type).schema.parse(\n connection,\n ) as RootConnection;\n }\n\n #getConnectionsForPlugin(pluginId: string): Connection[] {\n // Filter connections and hide auth methods based on these conditions:\n // 1. Include Connections with no plugin matcher condition\n // 2. Include Connections with a plugin matcher condition for this plugin\n // 3. Include auth methods with no plugin matcher condition\n // 4. Remove auth methods with a plugin matcher condition for other plugins\n return this.connections.flatMap(({ match, auth, ...rest }) => {\n if (match && !match.plugins.includes(pluginId)) {\n return [];\n }\n\n const pluginMatched: Connection['auth'] = [];\n const unmatched: Connection['auth'] = [];\n for (const { match: authMatch, ...authRest } of auth) {\n if (authMatch) {\n if (!authMatch.plugins.includes(pluginId)) continue;\n pluginMatched.push(authRest as Connection['auth'][number]);\n } else {\n unmatched.push(authRest as Connection['auth'][number]);\n }\n }\n\n return [\n { ...rest, auth: [...pluginMatched, ...unmatched] } as Connection,\n ];\n });\n }\n\n forPlugin(\n pluginId: string,\n options?: {\n logger: LoggerService;\n },\n ): ConnectionsService {\n const logger = options?.logger ?? this.logger;\n return new PluginConnectionsService(\n logger,\n this.#getConnectionsForPlugin(pluginId),\n );\n }\n}\n"],"names":["toError","z","NotFoundError","InputError","NotAllowedError","getConnectionType","getLegacyIntegrations","combineConnectionSources","isConnectionTypeKey"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsCA,SAAS,cAAc,KAAA,EAAwB;AAC7C,EAAA,MAAM,CAAA,GAAIA,eAAQ,KAAK,CAAA;AACvB,EAAA,IAAI,CAAA,CAAE,SAAS,UAAA,EAAY;AACzB,IAAA,OAAOC,IAAA,CAAE,cAAc,CAA0B,CAAA;AAAA,EACnD;AACA,EAAA,OAAO,CAAA,CAAE,OAAA;AACX;AAEA,MAAM,wBAAA,CAAuD;AAAA,EAC1C,MAAA;AAAA,EACA,WAAA;AAAA,EAEjB,WAAA,CAAY,QAAuB,WAAA,EAA2B;AAC5D,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAAA,CAAK,WAAA,GAAc,WAAA;AAAA,EACrB;AAAA,EAEA,MAAM,KAGJ,OAAA,EAI0C;AAC1C,IAAA,MAAM,MAAA,GAAS,MAAM,IAAA,CAAK,YAAA,CAAa,OAAO,CAAA;AAC9C,IAAA,IAAI,CAAC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OAAO,IAAA,CAAK,YAAY,OAAA,CAAQ,CAAC,EAAE,KAAA,EAAO,IAAA,EAAM,GAAG,IAAA,EAAK,KAAM;AAC5D,MAAA,IAAI,SAAS,CAAC,KAAA,CAAM,OAAA,CAAQ,QAAA,CAAS,QAAQ,CAAA,EAAG;AAC9C,QAAA,OAAO,EAAC;AAAA,MACV;AAEA,MAAA,MAAM,gBAAoC,EAAC;AAC3C,MAAA,MAAM,YAAgC,EAAC;AACvC,MAAA,KAAA,MAAW,EAAE,KAAA,EAAO,SAAA,EAAW,GAAG,QAAA,MAAc,IAAA,EAAM;AACpD,QAAA,IAAI,SAAA,EAAW;AACb,UAAA,IAAI,CAAC,SAAA,CAAU,OAAA,CAAQ,QAAA,CAAS,QAAQ,CAAA,EAAG;AAC3C,UAAA,aAAA,CAAc,KAAK,QAAsC,CAAA;AAAA,QAC3D,CAAA,MAAO;AACL,UAAA,SAAA,CAAU,KAAK,QAAsC,CAAA;AAAA,QACvD;AAAA,MACF;AAEA,MAAA,OAAO;AAAA,QACL,EAAE,GAAG,IAAA,EAAM,IAAA,EAAM,CAAC,GAAG,aAAA,EAAe,GAAG,SAAS,CAAA;AAAE,OACpD;AAAA,IACF,CAAC,CAAA;AAAA,EACH;AAAA,EAEA,SAAA,CACE,UACA,OAAA,EAGoB;AACpB,IAAA,MAAM,MAAA,GAAS,OAAA,EAAS,MAAA,IAAU,IAAA,CAAK,MAAA;AACvC,IAAA,OAAO,IAAI,wBAAA;AAAA,MACT,MAAA;AAAA,MACA,IAAA,CAAK,yBAAyB,QAAQ;AAAA,KACxC;AAAA,EACF;AACF;;;;"}
1
+ {"version":3,"file":"DefaultConnectionService.cjs.js","sources":["../../src/api/DefaultConnectionService.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ConnectionsService } from './ConnectionsService';\nimport {\n LoggerService,\n RootConfigService,\n} from '@backstage/backend-plugin-api';\nimport {\n ConnectionTypeKey,\n getConnectionType,\n isConnectionTypeKey,\n} from '../definitions';\nimport { ConnectionAuthMethodKey } from './ConnectionType';\nimport { Connection, RootConnection } from './Connection';\nimport { JsonObject } from '@backstage/types';\nimport {\n InputError,\n NotAllowedError,\n NotFoundError,\n toError,\n} from '@backstage/errors';\nimport { z } from 'zod/v4';\nimport { getLegacyIntegrations } from '../system/getLegacyIntegrations';\nimport { combineConnectionSources } from '../system/combineConnectionSources';\n\nfunction describeError(error: unknown): string {\n const e = toError(error);\n if (e.name === 'ZodError') {\n return z.prettifyError(e as unknown as z.ZodError);\n }\n return e.message;\n}\n\nclass PluginConnectionsService implements ConnectionsService {\n private readonly logger: LoggerService;\n private readonly connections: Connection[];\n\n constructor(logger: LoggerService, connections: Connection[]) {\n this.logger = logger;\n this.connections = connections;\n }\n\n async find<\n TType extends ConnectionTypeKey,\n TAuthMethod extends ConnectionAuthMethodKey<TType>,\n >(options: {\n type: TType;\n url: string;\n authMethods: readonly [TAuthMethod, ...TAuthMethod[]];\n }): Promise<Connection<TType, TAuthMethod>> {\n const result = await this.findOptional(options);\n if (!result) {\n throw new NotFoundError(\n `Connection not found for type \"${options.type}\" matching url \"${options.url}\"`,\n );\n }\n return result;\n }\n\n async findOptional<\n TType extends ConnectionTypeKey,\n TAuthMethod extends ConnectionAuthMethodKey<TType>,\n >({\n type,\n url,\n authMethods,\n }: {\n type: TType;\n url: string;\n authMethods: readonly [TAuthMethod, ...TAuthMethod[]];\n }): Promise<Connection<TType, TAuthMethod> | undefined> {\n this.logger.debug(\n `Finding connection of type \"${type}\" matching url \"${url}\"`,\n );\n let host: string;\n try {\n host = new URL(url).host;\n } catch {\n throw new InputError(\n `Invalid url \"${url}\" passed to ConnectionsService.find`,\n );\n }\n\n const connection = this.connections.find(\n c => c.type === type && (c as { host?: unknown }).host === host,\n ) as Connection<TType> | undefined;\n\n if (!connection) {\n return undefined;\n }\n\n if (connection.auth.length === 0) {\n throw new NotAllowedError(\n `Connection of type \"${type}\" for host \"${host}\" has no auth method available to this plugin`,\n );\n }\n\n const matchAuth = getConnectionType(type).matchAuth as\n | ((authMethods: any[], query: string) => any | undefined)\n | undefined;\n\n // We take the host-matched connection and check to see if there's an auth method better suited to the current url\n // e.g. org selection\n const selected = matchAuth\n ? matchAuth(connection.auth, url)\n : connection.auth[0];\n\n if (!selected) {\n return undefined;\n }\n\n // Now we compare user requested auth methods with what the connection can provide\n if (!(authMethods as readonly string[]).includes(selected.method)) {\n throw new NotAllowedError(\n `Connection not found for type \"${type}\" with auth method \"${selected.method}\"`,\n );\n }\n\n return {\n ...connection,\n auth: selected,\n } as Connection<TType, TAuthMethod>;\n }\n}\n\n/** @public */\nexport class DefaultConnectionsService {\n private readonly logger: LoggerService;\n private readonly connections: RootConnection[];\n private readonly config: RootConfigService;\n\n private constructor(logger: LoggerService, config: RootConfigService) {\n this.logger = logger;\n this.config = config;\n this.connections = [];\n this.#registerConnectionsFromConfig();\n }\n\n static create(options: {\n logger: LoggerService;\n config: RootConfigService;\n }): DefaultConnectionsService {\n return new DefaultConnectionsService(options.logger, options.config);\n }\n\n #registerConnectionsFromConfig(): void {\n const legacy = this.#validateLegacy(getLegacyIntegrations(this.config));\n\n const rawConnections = this.config.getOptional('connections');\n if (rawConnections !== undefined && !Array.isArray(rawConnections)) {\n throw new InputError(\n 'Expected \"connections\" config to be an array of connection objects',\n );\n }\n\n const fromConfig = this.#validateConfig(\n (rawConnections as JsonObject[] | undefined) ?? [],\n );\n\n if (legacy.length === 0 && fromConfig.length === 0) {\n return;\n }\n\n this.connections.push(\n ...combineConnectionSources(legacy, fromConfig, this.logger),\n );\n\n const seen = new Set<string>();\n for (const c of this.connections) {\n const host = (c as unknown as { host: string }).host;\n const key = `${c.type} ${host}`;\n if (seen.has(key)) {\n throw new InputError(\n `Duplicate connection of type \"${c.type}\" for host \"${host}\"`,\n );\n }\n seen.add(key);\n }\n\n this.#assignDefaultTitles();\n\n this.logger.info(\n `Loaded ${this.connections.length} connection${\n this.connections.length === 1 ? '' : 's'\n } from configuration`,\n );\n }\n\n #validateConfig(raw: JsonObject[]): RootConnection[] {\n return raw.map(v => {\n try {\n return this.#validateConnection(v);\n } catch (e) {\n const type = typeof v.type === 'string' ? v.type : 'unknown';\n throw new InputError(\n `Invalid connection of type \"${type}\" in connections config:\\n${describeError(\n e,\n )}`,\n );\n }\n });\n }\n\n #validateLegacy(raw: JsonObject[]): RootConnection[] {\n const result: RootConnection[] = [];\n for (const v of raw) {\n try {\n result.push(this.#validateConnection(v));\n } catch (e) {\n const type = typeof v.type === 'string' ? v.type : 'unknown';\n this.logger.error(\n `Failed to validate connection of type \"${type}\":\\n${describeError(\n e,\n )}`,\n );\n }\n }\n return result;\n }\n\n #validateConnection(connection: JsonObject): RootConnection {\n if (typeof connection.type !== 'string') {\n throw new InputError(`Unrecognised connection type ${connection.type}`);\n }\n\n if (!isConnectionTypeKey(connection.type)) {\n throw new InputError(`Unrecognised connection type ${connection.type}`);\n }\n\n return getConnectionType(connection.type).schema.parse(\n connection,\n ) as RootConnection;\n }\n\n #assignDefaultTitles(): void {\n const typeCounts = new Map<string, number>();\n for (const c of this.connections) {\n const type = c.type as ConnectionTypeKey;\n typeCounts.set(type, (typeCounts.get(type) ?? 0) + 1);\n }\n for (const c of this.connections) {\n if (!c.title) {\n const type = c.type as ConnectionTypeKey;\n const displayName = getConnectionType(type).title;\n const host = (c as unknown as { host: string }).host;\n (c as { title?: string }).title =\n typeCounts.get(type)! > 1 ? `${displayName} (${host})` : displayName;\n }\n }\n }\n\n #getConnectionsForPlugin(pluginId: string): Connection[] {\n // Filter connections and hide auth methods based on these conditions:\n // 1. Include Connections with no plugin matcher condition\n // 2. Include Connections with a plugin matcher condition for this plugin\n // 3. Include auth methods with no plugin matcher condition\n // 4. Remove auth methods with a plugin matcher condition for other plugins\n return this.connections.flatMap(({ match, auth, ...rest }) => {\n if (match && !match.plugins.includes(pluginId)) {\n return [];\n }\n\n const pluginMatched: Connection['auth'] = [];\n const unmatched: Connection['auth'] = [];\n for (const { match: authMatch, ...authRest } of auth) {\n if (authMatch) {\n if (!authMatch.plugins.includes(pluginId)) continue;\n pluginMatched.push(authRest as Connection['auth'][number]);\n } else {\n unmatched.push(authRest as Connection['auth'][number]);\n }\n }\n\n return [\n { ...rest, auth: [...pluginMatched, ...unmatched] } as Connection,\n ];\n });\n }\n\n forPlugin(\n pluginId: string,\n options?: {\n logger: LoggerService;\n },\n ): ConnectionsService {\n const logger = options?.logger ?? this.logger;\n return new PluginConnectionsService(\n logger,\n this.#getConnectionsForPlugin(pluginId),\n );\n }\n}\n"],"names":["toError","z","NotFoundError","InputError","NotAllowedError","getConnectionType","getLegacyIntegrations","combineConnectionSources","isConnectionTypeKey"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsCA,SAAS,cAAc,KAAA,EAAwB;AAC7C,EAAA,MAAM,CAAA,GAAIA,eAAQ,KAAK,CAAA;AACvB,EAAA,IAAI,CAAA,CAAE,SAAS,UAAA,EAAY;AACzB,IAAA,OAAOC,IAAA,CAAE,cAAc,CAA0B,CAAA;AAAA,EACnD;AACA,EAAA,OAAO,CAAA,CAAE,OAAA;AACX;AAEA,MAAM,wBAAA,CAAuD;AAAA,EAC1C,MAAA;AAAA,EACA,WAAA;AAAA,EAEjB,WAAA,CAAY,QAAuB,WAAA,EAA2B;AAC5D,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAAA,CAAK,WAAA,GAAc,WAAA;AAAA,EACrB;AAAA,EAEA,MAAM,KAGJ,OAAA,EAI0C;AAC1C,IAAA,MAAM,MAAA,GAAS,MAAM,IAAA,CAAK,YAAA,CAAa,O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SAAA,CAAU,OAAA,CAAQ,QAAA,CAAS,QAAQ,CAAA,EAAG;AAC3C,UAAA,aAAA,CAAc,KAAK,QAAsC,CAAA;AAAA,QAC3D,CAAA,MAAO;AACL,UAAA,SAAA,CAAU,KAAK,QAAsC,CAAA;AAAA,QACvD;AAAA,MACF;AAEA,MAAA,OAAO;AAAA,QACL,EAAE,GAAG,IAAA,EAAM,IAAA,EAAM,CAAC,GAAG,aAAA,EAAe,GAAG,SAAS,CAAA;AAAE,OACpD;AAAA,IACF,CAAC,CAAA;AAAA,EACH;AAAA,EAEA,SAAA,CACE,UACA,OAAA,EAGoB;AACpB,IAAA,MAAM,MAAA,GAAS,OAAA,EAAS,MAAA,IAAU,IAAA,CAAK,MAAA;AACvC,IAAA,OAAO,IAAI,wBAAA;AAAA,MACT,MAAA;AAAA,MACA,IAAA,CAAK,yBAAyB,QAAQ;AAAA,KACxC;AAAA,EACF;AACF;;;;"}
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ type ConnectionAuthValue<TAuthMethod extends ConnectionAuthMethod> = TAuthMethod
12
12
  /** @public */
13
13
  type ConnectionType<TType extends string = string, TConfigSchema extends z.ZodObject = z.ZodObject, TAuthMethods extends readonly ConnectionAuthMethod[] = readonly ConnectionAuthMethod[]> = {
14
14
  type: TType;
15
+ title: string;
15
16
  configSchema: TConfigSchema;
16
17
  authMethods: TAuthMethods;
17
18
  schema: z.ZodType;
@@ -264,6 +265,7 @@ type AuthValue<T extends ConnectionType | ConnectionTypeKey> = ConnectionAuthVal
264
265
  /** @public */
265
266
  type Connection<T extends ConnectionType | ConnectionTypeKey = ConnectionType, TAuthMethod extends string = string> = {
266
267
  type: LookupConnectionType<T>['type'];
268
+ title: string;
267
269
  auth: string extends TAuthMethod ? AuthValue<T>[] : Extract<AuthValue<T>, {
268
270
  method: TAuthMethod;
269
271
  }>;
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const AwsCodeCommitConnectionType = createConnectionType.createConnectionType({
7
7
  type: "aws-codecommit",
8
+ title: "AWS CodeCommit",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string(),
10
11
  region: v4.z.string()
@@ -1 +1 @@
1
- {"version":3,"file":"awsCodeCommit.cjs.js","sources":["../../src/schema/awsCodeCommit.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const AwsCodeCommitConnectionType = createConnectionType({\n type: 'aws-codecommit',\n configSchema: z.object({\n host: z.string(),\n region: z.string(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'accessKey',\n configSchema: z.object({\n accessKeyId: z.string(),\n secretAccessKey: z.string(),\n }),\n },\n {\n method: 'assumeRole',\n configSchema: z.object({\n roleArn: z.string(),\n externalId: z.string().optional(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,8BAA8BA,yCAAA,CAAqB;AAAA,EAC9D,IAAA,EAAM,gBAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,MAAA,EAAQA,KAAE,MAAA;AAAO,GAClB,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,WAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,WAAA,EAAaA,KAAE,MAAA,EAAO;AAAA,QACtB,eAAA,EAAiBA,KAAE,MAAA;AAAO,OAC3B;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,YAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,OAAA,EAASA,KAAE,MAAA,EAAO;AAAA,QAClB,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,OACjC;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"awsCodeCommit.cjs.js","sources":["../../src/schema/awsCodeCommit.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const AwsCodeCommitConnectionType = createConnectionType({\n type: 'aws-codecommit',\n title: 'AWS CodeCommit',\n configSchema: z.object({\n host: z.string(),\n region: z.string(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'accessKey',\n configSchema: z.object({\n accessKeyId: z.string(),\n secretAccessKey: z.string(),\n }),\n },\n {\n method: 'assumeRole',\n configSchema: z.object({\n roleArn: z.string(),\n externalId: z.string().optional(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,8BAA8BA,yCAAA,CAAqB;AAAA,EAC9D,IAAA,EAAM,gBAAA;AAAA,EACN,KAAA,EAAO,gBAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,MAAA,EAAQA,KAAE,MAAA;AAAO,GAClB,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,WAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,WAAA,EAAaA,KAAE,MAAA,EAAO;AAAA,QACtB,eAAA,EAAiBA,KAAE,MAAA;AAAO,OAC3B;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,YAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,OAAA,EAASA,KAAE,MAAA,EAAO;AAAA,QAClB,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,OACjC;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const AwsS3ConnectionType = createConnectionType.createConnectionType({
7
7
  type: "aws-s3",
8
+ title: "AWS S3",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string(),
10
11
  endpoint: v4.z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"awsS3.cjs.js","sources":["../../src/schema/awsS3.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const AwsS3ConnectionType = createConnectionType({\n type: 'aws-s3',\n configSchema: z.object({\n host: z.string(),\n endpoint: z.string().optional(),\n s3ForcePathStyle: z.boolean().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'accessKey',\n configSchema: z.object({\n accessKeyId: z.string(),\n secretAccessKey: z.string(),\n }),\n },\n {\n method: 'assumeRole',\n configSchema: z.object({\n roleArn: z.string(),\n externalId: z.string().optional(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,sBAAsBA,yCAAA,CAAqB;AAAA,EACtD,IAAA,EAAM,QAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,QAAA,EAAUA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC9B,gBAAA,EAAkBA,IAAA,CAAE,OAAA,EAAQ,CAAE,QAAA;AAAS,GACxC,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,WAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,WAAA,EAAaA,KAAE,MAAA,EAAO;AAAA,QACtB,eAAA,EAAiBA,KAAE,MAAA;AAAO,OAC3B;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,YAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,OAAA,EAASA,KAAE,MAAA,EAAO;AAAA,QAClB,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,OACjC;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"awsS3.cjs.js","sources":["../../src/schema/awsS3.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const AwsS3ConnectionType = createConnectionType({\n type: 'aws-s3',\n title: 'AWS S3',\n configSchema: z.object({\n host: z.string(),\n endpoint: z.string().optional(),\n s3ForcePathStyle: z.boolean().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'accessKey',\n configSchema: z.object({\n accessKeyId: z.string(),\n secretAccessKey: z.string(),\n }),\n },\n {\n method: 'assumeRole',\n configSchema: z.object({\n roleArn: z.string(),\n externalId: z.string().optional(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,sBAAsBA,yCAAA,CAAqB;AAAA,EACtD,IAAA,EAAM,QAAA;AAAA,EACN,KAAA,EAAO,QAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,QAAA,EAAUA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC9B,gBAAA,EAAkBA,IAAA,CAAE,OAAA,EAAQ,CAAE,QAAA;AAAS,GACxC,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,WAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,WAAA,EAAaA,KAAE,MAAA,EAAO;AAAA,QACtB,eAAA,EAAiBA,KAAE,MAAA;AAAO,OAC3B;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,YAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,OAAA,EAASA,KAAE,MAAA,EAAO;AAAA,QAClB,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,OACjC;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const AzureConnectionType = createConnectionType.createConnectionType({
7
7
  type: "azure",
8
+ title: "Azure DevOps",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string()
10
11
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"azure.cjs.js","sources":["../../src/schema/azure.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const AzureConnectionType = createConnectionType({\n type: 'azure',\n configSchema: z.object({\n host: z.string(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'pat',\n configSchema: z.object({\n personalAccessToken: z.string(),\n orgs: z.array(z.string()).optional(),\n }),\n },\n {\n method: 'clientCredentials',\n configSchema: z.object({\n clientId: z.string(),\n clientSecret: z.string(),\n tenantId: z.string(),\n orgs: z.array(z.string()).optional(),\n }),\n },\n {\n method: 'managedIdentity',\n configSchema: z.object({\n clientId: z.string(),\n tenantId: z.string().optional(),\n managedIdentityClientId: z.string().optional(),\n orgs: z.array(z.string()).optional(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,sBAAsBA,yCAAA,CAAqB;AAAA,EACtD,IAAA,EAAM,OAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA;AAAO,GAChB,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,KAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,mBAAA,EAAqBA,KAAE,MAAA,EAAO;AAAA,QAC9B,MAAMA,IAAA,CAAE,KAAA,CAAMA,KAAE,MAAA,EAAQ,EAAE,QAAA;AAAS,OACpC;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,mBAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,YAAA,EAAcA,KAAE,MAAA,EAAO;AAAA,QACvB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,MAAMA,IAAA,CAAE,KAAA,CAAMA,KAAE,MAAA,EAAQ,EAAE,QAAA;AAAS,OACpC;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,iBAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,QAAA,EAAUA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,QAC9B,uBAAA,EAAyBA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,QAC7C,MAAMA,IAAA,CAAE,KAAA,CAAMA,KAAE,MAAA,EAAQ,EAAE,QAAA;AAAS,OACpC;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"azure.cjs.js","sources":["../../src/schema/azure.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const AzureConnectionType = createConnectionType({\n type: 'azure',\n title: 'Azure DevOps',\n configSchema: z.object({\n host: z.string(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'pat',\n configSchema: z.object({\n personalAccessToken: z.string(),\n orgs: z.array(z.string()).optional(),\n }),\n },\n {\n method: 'clientCredentials',\n configSchema: z.object({\n clientId: z.string(),\n clientSecret: z.string(),\n tenantId: z.string(),\n orgs: z.array(z.string()).optional(),\n }),\n },\n {\n method: 'managedIdentity',\n configSchema: z.object({\n clientId: z.string(),\n tenantId: z.string().optional(),\n managedIdentityClientId: z.string().optional(),\n orgs: z.array(z.string()).optional(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,sBAAsBA,yCAAA,CAAqB;AAAA,EACtD,IAAA,EAAM,OAAA;AAAA,EACN,KAAA,EAAO,cAAA;AAAA,EACP,YAAA,E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: "azure-blob-storage",
8
+ title: "Azure Blob Storage",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string(),
10
11
  accountName: v4.z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"azureBlobStorage.cjs.js","sources":["../../src/schema/azureBlobStorage.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const AzureBlobStorageConnectionType = createConnectionType({\n type: 'azure-blob-storage',\n configSchema: z.object({\n host: z.string(),\n accountName: z.string().optional(),\n endpoint: z.string().optional(),\n endpointSuffix: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'accountKey',\n configSchema: z.object({\n accountKey: z.string(),\n }),\n },\n {\n method: 'sasToken',\n configSchema: z.object({\n sasToken: z.string(),\n }),\n },\n {\n method: 'connectionString',\n configSchema: z.object({\n connectionString: z.string(),\n }),\n },\n {\n method: 'aadCredential',\n configSchema: z.object({\n clientId: z.string(),\n tenantId: z.string(),\n clientSecret: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,iCAAiCA,yCAAA,CAAqB;AAAA,EACjE,IAAA,EAAM,oBAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,WAAA,EAAaA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IACjC,QAAA,EAAUA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC9B,cAAA,EAAgBA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GACrC,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,YAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,UAAA,EAAYA,KAAE,MAAA;AAAO,OACtB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,UAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA;AAAO,OACpB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,kBAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,gBAAA,EAAkBA,KAAE,MAAA;AAAO,OAC5B;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,eAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,YAAA,EAAcA,KAAE,MAAA;AAAO,OACxB;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"azureBlobStorage.cjs.js","sources":["../../src/schema/azureBlobStorage.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const AzureBlobStorageConnectionType = createConnectionType({\n type: 'azure-blob-storage',\n title: 'Azure Blob Storage',\n configSchema: z.object({\n host: z.string(),\n accountName: z.string().optional(),\n endpoint: z.string().optional(),\n endpointSuffix: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'accountKey',\n configSchema: z.object({\n accountKey: z.string(),\n }),\n },\n {\n method: 'sasToken',\n configSchema: z.object({\n sasToken: z.string(),\n }),\n },\n {\n method: 'connectionString',\n configSchema: z.object({\n connectionString: z.string(),\n }),\n },\n {\n method: 'aadCredential',\n configSchema: z.object({\n clientId: z.string(),\n tenantId: z.string(),\n clientSecret: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,iCAAiCA,yCAAA,CAAqB;AAAA,EACjE,IAAA,EAAM,oBAAA;AAAA,EACN,KAAA,EAAO,oBAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,WAAA,EAAaA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IACjC,QAAA,EAAUA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC9B,cAAA,EAAgBA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GACrC,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,YAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,UAAA,EAAYA,KAAE,MAAA;AAAO,OACtB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,UAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA;AAAO,OACpB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,kBAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,gBAAA,EAAkBA,KAAE,MAAA;AAAO,OAC5B;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,eAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,YAAA,EAAcA,KAAE,MAAA;AAAO,OACxB;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const BitbucketCloudConnectionType = createConnectionType.createConnectionType({
7
7
  type: "bitbucket-cloud",
8
+ title: "Bitbucket Cloud",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string()
10
11
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"bitbucketCloud.cjs.js","sources":["../../src/schema/bitbucketCloud.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const BitbucketCloudConnectionType = createConnectionType({\n type: 'bitbucket-cloud',\n configSchema: z.object({\n host: z.string(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'token',\n configSchema: z.object({\n username: z.string(),\n token: z.string(),\n }),\n },\n {\n method: 'appPassword',\n configSchema: z.object({\n username: z.string(),\n appPassword: z.string(),\n }),\n },\n {\n method: 'oauth',\n configSchema: z.object({\n clientId: z.string(),\n clientSecret: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,+BAA+BA,yCAAA,CAAqB;AAAA,EAC/D,IAAA,EAAM,iBAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA;AAAO,GAChB,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,KAAA,EAAOA,KAAE,MAAA;AAAO,OACjB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,aAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,WAAA,EAAaA,KAAE,MAAA;AAAO,OACvB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,YAAA,EAAcA,KAAE,MAAA;AAAO,OACxB;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"bitbucketCloud.cjs.js","sources":["../../src/schema/bitbucketCloud.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const BitbucketCloudConnectionType = createConnectionType({\n type: 'bitbucket-cloud',\n title: 'Bitbucket Cloud',\n configSchema: z.object({\n host: z.string(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'token',\n configSchema: z.object({\n username: z.string(),\n token: z.string(),\n }),\n },\n {\n method: 'appPassword',\n configSchema: z.object({\n username: z.string(),\n appPassword: z.string(),\n }),\n },\n {\n method: 'oauth',\n configSchema: z.object({\n clientId: z.string(),\n clientSecret: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,+BAA+BA,yCAAA,CAAqB;AAAA,EAC/D,IAAA,EAAM,iBAAA;AAAA,EACN,KAAA,EAAO,iBAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA;AAAO,GAChB,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,KAAA,EAAOA,KAAE,MAAA;AAAO,OACjB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,aAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,WAAA,EAAaA,KAAE,MAAA;AAAO,OACvB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,YAAA,EAAcA,KAAE,MAAA;AAAO,OACxB;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const BitbucketServerConnectionType = createConnectionType.createConnectionType({
7
7
  type: "bitbucket-server",
8
+ title: "Bitbucket Server",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string(),
10
11
  apiBaseUrl: v4.z.string().optional()
@@ -1 +1 @@
1
- {"version":3,"file":"bitbucketServer.cjs.js","sources":["../../src/schema/bitbucketServer.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const BitbucketServerConnectionType = createConnectionType({\n type: 'bitbucket-server',\n configSchema: z.object({\n host: z.string(),\n apiBaseUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'token',\n configSchema: z.object({\n token: z.string(),\n }),\n },\n {\n method: 'basic',\n configSchema: z.object({\n username: z.string(),\n password: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,gCAAgCA,yCAAA,CAAqB;AAAA,EAChE,IAAA,EAAM,kBAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GACjC,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,KAAA,EAAOA,KAAE,MAAA;AAAO,OACjB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,QAAA,EAAUA,KAAE,MAAA;AAAO,OACpB;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"bitbucketServer.cjs.js","sources":["../../src/schema/bitbucketServer.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const BitbucketServerConnectionType = createConnectionType({\n type: 'bitbucket-server',\n title: 'Bitbucket Server',\n configSchema: z.object({\n host: z.string(),\n apiBaseUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'token',\n configSchema: z.object({\n token: z.string(),\n }),\n },\n {\n method: 'basic',\n configSchema: z.object({\n username: z.string(),\n password: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,gCAAgCA,yCAAA,CAAqB;AAAA,EAChE,IAAA,EAAM,kBAAA;AAAA,EACN,KAAA,EAAO,kBAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GACjC,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,KAAA,EAAOA,KAAE,MAAA;AAAO,OACjB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,QAAA,EAAUA,KAAE,MAAA;AAAO,OACpB;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const GerritConnectionType = createConnectionType.createConnectionType({
7
7
  type: "gerrit",
8
+ title: "Gerrit",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string(),
10
11
  baseUrl: v4.z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"gerrit.cjs.js","sources":["../../src/schema/gerrit.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GerritConnectionType = createConnectionType({\n type: 'gerrit',\n configSchema: z.object({\n host: z.string(),\n baseUrl: z.string().optional(),\n gitilesBaseUrl: z.string(),\n cloneUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'basic',\n configSchema: z.object({\n username: z.string(),\n password: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,uBAAuBA,yCAAA,CAAqB;AAAA,EACvD,IAAA,EAAM,QAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,OAAA,EAASA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC7B,cAAA,EAAgBA,KAAE,MAAA,EAAO;AAAA,IACzB,QAAA,EAAUA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GAC/B,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,QAAA,EAAUA,KAAE,MAAA;AAAO,OACpB;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"gerrit.cjs.js","sources":["../../src/schema/gerrit.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GerritConnectionType = createConnectionType({\n type: 'gerrit',\n title: 'Gerrit',\n configSchema: z.object({\n host: z.string(),\n baseUrl: z.string().optional(),\n gitilesBaseUrl: z.string(),\n cloneUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'basic',\n configSchema: z.object({\n username: z.string(),\n password: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,uBAAuBA,yCAAA,CAAqB;AAAA,EACvD,IAAA,EAAM,QAAA;AAAA,EACN,KAAA,EAAO,QAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,OAAA,EAASA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAC7B,cAAA,EAAgBA,KAAE,MAAA,EAAO;AAAA,IACzB,QAAA,EAAUA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GAC/B,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,QAAA,EAAUA,KAAE,MAAA;AAAO,OACpB;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const GiteaConnectionType = createConnectionType.createConnectionType({
7
7
  type: "gitea",
8
+ title: "Gitea",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string(),
10
11
  baseUrl: v4.z.string().optional()
@@ -1 +1 @@
1
- {"version":3,"file":"gitea.cjs.js","sources":["../../src/schema/gitea.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GiteaConnectionType = createConnectionType({\n type: 'gitea',\n configSchema: z.object({\n host: z.string(),\n baseUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'basic',\n configSchema: z.object({\n username: z.string(),\n password: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,sBAAsBA,yCAAA,CAAqB;AAAA,EACtD,IAAA,EAAM,OAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,OAAA,EAASA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GAC9B,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,QAAA,EAAUA,KAAE,MAAA;AAAO,OACpB;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"gitea.cjs.js","sources":["../../src/schema/gitea.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GiteaConnectionType = createConnectionType({\n type: 'gitea',\n title: 'Gitea',\n configSchema: z.object({\n host: z.string(),\n baseUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'basic',\n configSchema: z.object({\n username: z.string(),\n password: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,sBAAsBA,yCAAA,CAAqB;AAAA,EACtD,IAAA,EAAM,OAAA;AAAA,EACN,KAAA,EAAO,OAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,OAAA,EAASA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GAC9B,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,QAAA,EAAUA,KAAE,MAAA,EAAO;AAAA,QACnB,QAAA,EAAUA,KAAE,MAAA;AAAO,OACpB;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const GithubConnectionType = createConnectionType.createConnectionType({
7
7
  type: "github",
8
+ title: "GitHub",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string(),
10
11
  apiBaseUrl: v4.z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"github.cjs.js","sources":["../../src/schema/github.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GithubConnectionType = createConnectionType({\n type: 'github',\n configSchema: z.object({\n host: z.string(),\n apiBaseUrl: z.string().optional(),\n rawBaseUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'token',\n configSchema: z.object({\n token: z.string(),\n }),\n },\n {\n method: 'app',\n configSchema: z.object({\n appId: z.union([z.number(), z.string()]),\n privateKey: z.string(),\n clientId: z.string(),\n clientSecret: z.string(),\n webhookSecret: z.string().optional(),\n publicAccess: z.boolean().optional(),\n orgs: z.array(z.string()).optional(),\n }),\n },\n ],\n matchAuth: (authMethods, query) => {\n const org = new URL(query).pathname.split('/').filter(Boolean)[0];\n const apps = authMethods.filter(a => a.method === 'app');\n const appWithOrg = org ? apps.find(a => a.orgs?.includes(org)) : undefined;\n if (appWithOrg) return appWithOrg;\n const unrestrictedApp = apps.find(a => !a.orgs?.length);\n if (unrestrictedApp) return unrestrictedApp;\n\n return (\n authMethods.find(a => a.method === 'token') ??\n authMethods.find(a => a.method === 'none')\n );\n },\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,uBAAuBA,yCAAA,CAAqB;AAAA,EACvD,IAAA,EAAM,QAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAChC,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GACjC,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,KAAA,EAAOA,KAAE,MAAA;AAAO,OACjB;AAAA,KACH;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,KAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,KAAA,EAAOA,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AAA,KAAW,MAAM,CAAA;AAAA,EAE7C;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"github.cjs.js","sources":["../../src/schema/github.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GithubConnectionType = createConnectionType({\n type: 'github',\n title: 'GitHub',\n configSchema: z.object({\n host: z.string(),\n apiBaseUrl: z.string().optional(),\n rawBaseUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'token',\n configSchema: z.object({\n token: z.string(),\n }),\n },\n {\n method: 'app',\n configSchema: z.object({\n appId: z.union([z.number(), z.string()]),\n privateKey: z.string(),\n clientId: z.string(),\n clientSecret: z.string(),\n webhookSecret: z.string().optional(),\n publicAccess: z.boolean().optional(),\n orgs: z.array(z.string()).optional(),\n }),\n },\n ],\n matchAuth: (authMethods, query) => {\n const org = new URL(query).pathname.split('/').filter(Boolean)[0];\n const apps = authMethods.filter(a => a.method === 'app');\n const appWithOrg = org ? apps.find(a => a.orgs?.includes(org)) : undefined;\n if (appWithOrg) return appWithOrg;\n const unrestrictedApp = apps.find(a => !a.orgs?.length);\n if (unrestrictedApp) return unrestrictedApp;\n\n return (\n authMethods.find(a => a.method === 'token') ??\n authMethods.find(a => a.method === 'none')\n );\n },\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,uBAAuBA,yCAAA,CAAqB;AAAA,EACvD,IAAA,EAAM,QAAA;AAAA,EACN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CAAM,GAAG,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA,CAAE,CAAC,CAAA;AAChE,IAAA,MAAM,OAAO,WAAA,CAAY,MAAA,CAAO,CAAA,CAAA,KAAK,CAAA,CAAE,WAAW,KAAK,CAAA;AACvD,IAAA,MAAM,UAAA,GAAa,GAAA,GAAM,IAAA,CAAK,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,IAAA,EAAM,QAAA,CAAS,GAAG,CAAC,CAAA,GAAI,MAAA;AACjE,IAAA,IAAI,YAAY,OAAO,UAAA;AACvB,IAAA,MAAM,kBAAkB,IAAA,CAAK,IAAA,CAAK,OAAK,CAAC,CAAA,CAAE,MAAM,MAAM,CAAA;AACtD,IAAA,IAAI,iBAAiB,OAAO,eAAA;AAE5B,IAAA,OACE,WAAA,CAAY,IAAA,CAAK,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,KAAW,OAAO,CAAA,IAC1C,WAAA,CAAY,IAAA,CAAK,CAAA,CAAA,KAAK,CAAA,CAAE,MAAA,KAAW,MAAM,CAAA;AAAA,EAE7C;AACF,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const GitlabConnectionType = createConnectionType.createConnectionType({
7
7
  type: "gitlab",
8
+ title: "GitLab",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string(),
10
11
  apiBaseUrl: v4.z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"gitlab.cjs.js","sources":["../../src/schema/gitlab.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GitlabConnectionType = createConnectionType({\n type: 'gitlab',\n configSchema: z.object({\n host: z.string(),\n apiBaseUrl: z.string().optional(),\n baseUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'token',\n configSchema: z.object({\n token: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,uBAAuBA,yCAAA,CAAqB;AAAA,EACvD,IAAA,EAAM,QAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAChC,OAAA,EAASA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GAC9B,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,KAAA,EAAOA,KAAE,MAAA;AAAO,OACjB;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"gitlab.cjs.js","sources":["../../src/schema/gitlab.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GitlabConnectionType = createConnectionType({\n type: 'gitlab',\n title: 'GitLab',\n configSchema: z.object({\n host: z.string(),\n apiBaseUrl: z.string().optional(),\n baseUrl: z.string().optional(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'token',\n configSchema: z.object({\n token: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,uBAAuBA,yCAAA,CAAqB;AAAA,EACvD,IAAA,EAAM,QAAA;AAAA,EACN,KAAA,EAAO,QAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA,EAAO;AAAA,IACf,UAAA,EAAYA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,IAChC,OAAA,EAASA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,GAC9B,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,KAAA,EAAOA,KAAE,MAAA;AAAO,OACjB;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const GoogleGcsConnectionType = createConnectionType.createConnectionType({
7
7
  type: "google-gcs",
8
+ title: "Google Cloud Storage",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string()
10
11
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"googleGcs.cjs.js","sources":["../../src/schema/googleGcs.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GoogleGcsConnectionType = createConnectionType({\n type: 'google-gcs',\n configSchema: z.object({\n host: z.string(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'serviceAccount',\n configSchema: z.object({\n clientEmail: z.string(),\n privateKey: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,0BAA0BA,yCAAA,CAAqB;AAAA,EAC1D,IAAA,EAAM,YAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA;AAAO,GAChB,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,gBAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,WAAA,EAAaA,KAAE,MAAA,EAAO;AAAA,QACtB,UAAA,EAAYA,KAAE,MAAA;AAAO,OACtB;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"googleGcs.cjs.js","sources":["../../src/schema/googleGcs.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const GoogleGcsConnectionType = createConnectionType({\n type: 'google-gcs',\n title: 'Google Cloud Storage',\n configSchema: z.object({\n host: z.string(),\n }),\n authMethods: [\n {\n method: 'none',\n configSchema: z.object({}),\n },\n {\n method: 'serviceAccount',\n configSchema: z.object({\n clientEmail: z.string(),\n privateKey: z.string(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,0BAA0BA,yCAAA,CAAqB;AAAA,EAC1D,IAAA,EAAM,YAAA;AAAA,EACN,KAAA,EAAO,sBAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA;AAAO,GAChB,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,MAAA;AAAA,MACR,YAAA,EAAcA,IAAA,CAAE,MAAA,CAAO,EAAE;AAAA,KAC3B;AAAA,IACA;AAAA,MACE,MAAA,EAAQ,gBAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,WAAA,EAAaA,KAAE,MAAA,EAAO;AAAA,QACtB,UAAA,EAAYA,KAAE,MAAA;AAAO,OACtB;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -5,6 +5,7 @@ var v4 = require('zod/v4');
5
5
 
6
6
  const HarnessConnectionType = createConnectionType.createConnectionType({
7
7
  type: "harness",
8
+ title: "Harness",
8
9
  configSchema: v4.z.object({
9
10
  host: v4.z.string()
10
11
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"harness.cjs.js","sources":["../../src/schema/harness.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const HarnessConnectionType = createConnectionType({\n type: 'harness',\n configSchema: z.object({\n host: z.string(),\n }),\n authMethods: [\n {\n method: 'token',\n configSchema: z.object({\n token: z.string(),\n apiKey: z.string().optional(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,wBAAwBA,yCAAA,CAAqB;AAAA,EACxD,IAAA,EAAM,SAAA;AAAA,EACN,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA;AAAO,GAChB,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,KAAA,EAAOA,KAAE,MAAA,EAAO;AAAA,QAChB,MAAA,EAAQA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,OAC7B;AAAA;AACH;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"harness.cjs.js","sources":["../../src/schema/harness.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConnectionType } from '../system/createConnectionType';\nimport { z } from 'zod/v4';\n\n/** @public */\nexport const HarnessConnectionType = createConnectionType({\n type: 'harness',\n title: 'Harness',\n configSchema: z.object({\n host: z.string(),\n }),\n authMethods: [\n {\n method: 'token',\n configSchema: z.object({\n token: z.string(),\n apiKey: z.string().optional(),\n }),\n },\n ],\n});\n"],"names":["createConnectionType","z"],"mappings":";;;;;AAmBO,MAAM,wBAAwBA,yCAAA,CAAqB;AAAA,EACxD,IAAA,EAAM,SAAA;AAAA,EACN,KAAA,EAAO,SAAA;AAAA,EACP,YAAA,EAAcC,KAAE,MAAA,CAAO;AAAA,IACrB,IAAA,EAAMA,KAAE,MAAA;AAAO,GAChB,CAAA;AAAA,EACD,WAAA,EAAa;AAAA,IACX;AAAA,MACE,MAAA,EAAQ,OAAA;AAAA,MACR,YAAA,EAAcA,KAAE,MAAA,CAAO;AAAA,QACrB,KAAA,EAAOA,KAAE,MAAA,EAAO;AAAA,QAChB,MAAA,EAAQA,IAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,OAC7B;AAAA;AACH;AAEJ,CAAC;;;;"}
@@ -6,6 +6,7 @@ const matchSchema = v4.z.object({ plugins: v4.z.array(v4.z.string()) }).strict()
6
6
  function createConnectionType({
7
7
  configSchema,
8
8
  type,
9
+ title,
9
10
  authMethods,
10
11
  matchAuth
11
12
  }) {
@@ -18,6 +19,7 @@ function createConnectionType({
18
19
  const validated = configSchema;
19
20
  const schema = validated.extend({
20
21
  type: v4.z.literal(type),
22
+ title: v4.z.string().min(1).optional(),
21
23
  match: matchSchema,
22
24
  auth: v4.z.array(
23
25
  authOptions.length === 1 ? authOptions[0] : v4.z.discriminatedUnion(
@@ -28,6 +30,7 @@ function createConnectionType({
28
30
  }).strict();
29
31
  return {
30
32
  type,
33
+ title,
31
34
  configSchema: validated,
32
35
  authMethods,
33
36
  schema,
@@ -1 +1 @@
1
- {"version":3,"file":"createConnectionType.cjs.js","sources":["../../src/system/createConnectionType.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { z } from 'zod/v4';\nimport type {\n ConnectionAuthMethod,\n ConnectionType,\n MatchAuth,\n WithoutReservedFields,\n} from '../api/ConnectionType';\n\nconst matchSchema = z\n .object({ plugins: z.array(z.string()) })\n .strict()\n .optional();\n\nexport function createConnectionType<\n TType extends string,\n TConfigSchema extends z.ZodObject,\n const TAuthMethods extends readonly ConnectionAuthMethod[],\n>({\n configSchema,\n type,\n authMethods,\n matchAuth,\n}: {\n type: TType;\n configSchema: WithoutReservedFields<TConfigSchema>;\n authMethods: TAuthMethods;\n matchAuth?: MatchAuth<TAuthMethods>;\n}): ConnectionType<TType, TConfigSchema, TAuthMethods> {\n const authOptions = authMethods.map(am =>\n am.configSchema\n .extend({\n method: z.literal(am.method),\n match: matchSchema,\n })\n .strict(),\n );\n const validated = configSchema as unknown as TConfigSchema;\n const schema = validated\n .extend({\n type: z.literal(type),\n match: matchSchema,\n auth: z.array(\n authOptions.length === 1\n ? authOptions[0]\n : z.discriminatedUnion(\n 'method',\n authOptions as [(typeof authOptions)[0], ...typeof authOptions],\n ),\n ),\n })\n .strict();\n return {\n type,\n configSchema: validated,\n authMethods,\n schema,\n matchAuth,\n };\n}\n"],"names":["z"],"mappings":";;;;AAuBA,MAAM,WAAA,GAAcA,IAAA,CACjB,MAAA,CAAO,EAAE,SAASA,IAAA,CAAE,KAAA,CAAMA,IAAA,CAAE,MAAA,EAAQ,CAAA,EAAG,CAAA,CACvC,MAAA,GACA,QAAA,EAAS;AAEL,SAAS,oBAAA,CAId;AAAA,EACA,YAAA;AAAA,EACA,IAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF,CAAA,EAKuD;AACrD,EAAA,MAAM,cAAc,WAAA,CAAY,GAAA;AAAA,IAAI,CAAA,EAAA,KAClC,EAAA,CAAG,YAAA,CACA,MAAA,CAAO;AAAA,MACN,MAAA,EAAQA,IAAA,CAAE,OAAA,CAAQ,EAAA,CAAG,MAAM,CAAA;AAAA,MAC3B,KAAA,EAAO;AAAA,KACR,EACA,MAAA;AAAO,GACZ;AACA,EAAA,MAAM,SAAA,GAAY,YAAA;AAClB,EAAA,MAAM,MAAA,GAAS,UACZ,MAAA,CAAO;AAAA,IACN,IAAA,EAAMA,IAAA,CAAE,OAAA,CAAQ,IAAI,CAAA;AAAA,IACpB,KAAA,EAAO,WAAA;AAAA,IACP,MAAMA,IAAA,CAAE,KAAA;AAAA,MACN,YAAY,MAAA,KAAW,CAAA,GACnB,WAAA,CAAY,CAAC,IACbA,IAAA,CAAE,kBAAA;AAAA,QACA,QAAA;AAAA,QACA;AAAA;AACF;AACN,GACD,EACA,MAAA,EAAO;AACV,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA,YAAA,EAAc,SAAA;AAAA,IACd,WAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"createConnectionType.cjs.js","sources":["../../src/system/createConnectionType.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { z } from 'zod/v4';\nimport type {\n ConnectionAuthMethod,\n ConnectionType,\n MatchAuth,\n WithoutReservedFields,\n} from '../api/ConnectionType';\n\nconst matchSchema = z\n .object({ plugins: z.array(z.string()) })\n .strict()\n .optional();\n\nexport function createConnectionType<\n TType extends string,\n TConfigSchema extends z.ZodObject,\n const TAuthMethods extends readonly ConnectionAuthMethod[],\n>({\n configSchema,\n type,\n title,\n authMethods,\n matchAuth,\n}: {\n type: TType;\n title: string;\n configSchema: WithoutReservedFields<TConfigSchema>;\n authMethods: TAuthMethods;\n matchAuth?: MatchAuth<TAuthMethods>;\n}): ConnectionType<TType, TConfigSchema, TAuthMethods> {\n const authOptions = authMethods.map(am =>\n am.configSchema\n .extend({\n method: z.literal(am.method),\n match: matchSchema,\n })\n .strict(),\n );\n const validated = configSchema as unknown as TConfigSchema;\n const schema = validated\n .extend({\n type: z.literal(type),\n title: z.string().min(1).optional(),\n match: matchSchema,\n auth: z.array(\n authOptions.length === 1\n ? authOptions[0]\n : z.discriminatedUnion(\n 'method',\n authOptions as [(typeof authOptions)[0], ...typeof authOptions],\n ),\n ),\n })\n .strict();\n return {\n type,\n title,\n configSchema: validated,\n authMethods,\n schema,\n matchAuth,\n };\n}\n"],"names":["z"],"mappings":";;;;AAuBA,MAAM,WAAA,GAAcA,IAAA,CACjB,MAAA,CAAO,EAAE,SAASA,IAAA,CAAE,KAAA,CAAMA,IAAA,CAAE,MAAA,EAAQ,CAAA,EAAG,CAAA,CACvC,MAAA,GACA,QAAA,EAAS;AAEL,SAAS,oBAAA,CAId;AAAA,EACA,YAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF,CAAA,EAMuD;AACrD,EAAA,MAAM,cAAc,WAAA,CAAY,GAAA;AAAA,IAAI,CAAA,EAAA,KAClC,EAAA,CAAG,YAAA,CACA,MAAA,CAAO;AAAA,MACN,MAAA,EAAQA,IAAA,CAAE,OAAA,CAAQ,EAAA,CAAG,MAAM,CAAA;AAAA,MAC3B,KAAA,EAAO;AAAA,KACR,EACA,MAAA;AAAO,GACZ;AACA,EAAA,MAAM,SAAA,GAAY,YAAA;AAClB,EAAA,MAAM,MAAA,GAAS,UACZ,MAAA,CAAO;AAAA,IACN,IAAA,EAAMA,IAAA,CAAE,OAAA,CAAQ,IAAI,CAAA;AAAA,IACpB,OAAOA,IAAA,CAAE,MAAA,GAAS,GAAA,CAAI,CAAC,EAAE,QAAA,EAAS;AAAA,IAClC,KAAA,EAAO,WAAA;AAAA,IACP,MAAMA,IAAA,CAAE,KAAA;AAAA,MACN,YAAY,MAAA,KAAW,CAAA,GACnB,WAAA,CAAY,CAAC,IACbA,IAAA,CAAE,kBAAA;AAAA,QACA,QAAA;AAAA,QACA;AAAA;AACF;AACN,GACD,EACA,MAAA,EAAO;AACV,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA,KAAA;AAAA,IACA,YAAA,EAAc,SAAA;AAAA,IACd,WAAA;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/connections",
3
- "version": "0.0.0",
3
+ "version": "0.1.1-next.0",
4
4
  "description": "Connections framework used by Backstage to better manage external connections used by integrations and plugins",
5
5
  "backstage": {
6
6
  "role": "node-library",
@@ -40,15 +40,15 @@
40
40
  "test": "backstage-cli package test"
41
41
  },
42
42
  "dependencies": {
43
- "@backstage/backend-plugin-api": "1.9.2-next.1",
43
+ "@backstage/backend-plugin-api": "1.9.3-next.0",
44
44
  "@backstage/config": "1.3.8",
45
45
  "@backstage/errors": "1.3.1",
46
46
  "@backstage/types": "1.2.2",
47
47
  "zod": "^3.25.76 || ^4.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@backstage/backend-test-utils": "1.11.4-next.1",
51
- "@backstage/cli": "0.36.3-next.1"
50
+ "@backstage/backend-test-utils": "1.11.5-next.0",
51
+ "@backstage/cli": "0.36.4-next.0"
52
52
  },
53
53
  "typesVersions": {
54
54
  "*": {