@opengeni/config 1.4.0 → 1.4.2
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/dist/index.d.ts +7 -0
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +22 -9
package/dist/index.d.ts
CHANGED
|
@@ -3503,6 +3503,13 @@ export declare function sandboxWarmRateMicrosPerSecond(settings: Settings, backe
|
|
|
3503
3503
|
*/
|
|
3504
3504
|
export declare function parseModelProvidersJson(raw: string): RegistryProvider[];
|
|
3505
3505
|
export declare function parseIntegrationsOauthClientsJson(raw: string | undefined): Record<string, IntegrationOAuthClientConfig>;
|
|
3506
|
+
/**
|
|
3507
|
+
* The operator-registered client for one authorization server, matched by
|
|
3508
|
+
* exact issuer/URL key first and then trailing-slash-insensitively. The OAuth
|
|
3509
|
+
* start flow and the connector catalog's connectability projection share this
|
|
3510
|
+
* so a catalog row is offered exactly when a start would find a client.
|
|
3511
|
+
*/
|
|
3512
|
+
export declare function findIntegrationsOauthClient(configured: Readonly<Record<string, IntegrationOAuthClientConfig>>, candidates: readonly string[]): IntegrationOAuthClientConfig | null;
|
|
3506
3513
|
export declare const SocialOAuthClientConfigSchema: z.ZodObject<{
|
|
3507
3514
|
clientId: z.ZodString;
|
|
3508
3515
|
clientSecret: z.ZodOptional<z.ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -6428,6 +6428,18 @@ function parseIntegrationsOauthClientsJson(raw) {
|
|
|
6428
6428
|
}
|
|
6429
6429
|
return out;
|
|
6430
6430
|
}
|
|
6431
|
+
function findIntegrationsOauthClient(configured, candidates) {
|
|
6432
|
+
const normalize = (value) => value.replace(/\/+$/, "");
|
|
6433
|
+
for (const key of new Set(candidates.flatMap((candidate) => [candidate, normalize(candidate)]))) {
|
|
6434
|
+
const entry = configured[key];
|
|
6435
|
+
if (entry) return entry;
|
|
6436
|
+
}
|
|
6437
|
+
const normalizedCandidates = new Set(candidates.map(normalize));
|
|
6438
|
+
for (const [key, entry] of Object.entries(configured)) {
|
|
6439
|
+
if (normalizedCandidates.has(normalize(key))) return entry;
|
|
6440
|
+
}
|
|
6441
|
+
return null;
|
|
6442
|
+
}
|
|
6431
6443
|
var SocialOAuthClientConfigSchema = z5.object({
|
|
6432
6444
|
clientId: z5.string().min(1),
|
|
6433
6445
|
clientSecret: z5.string().min(1).optional()
|
|
@@ -7044,11 +7056,6 @@ function validateSettings(settings, source = process.env) {
|
|
|
7044
7056
|
);
|
|
7045
7057
|
}
|
|
7046
7058
|
parseExposedPorts(settings.dockerExposedPorts);
|
|
7047
|
-
parseRealtimeVoicePricingJson(settings.azureLivePricingJson, "OPENGENI_AZURE_LIVE_PRICING_JSON");
|
|
7048
|
-
parseRealtimeVoicePricingTableJson(
|
|
7049
|
-
settings.aiGatewayRealtimePricingJson,
|
|
7050
|
-
"OPENGENI_AI_GATEWAY_REALTIME_PRICING_JSON"
|
|
7051
|
-
);
|
|
7052
7059
|
sandboxEnvironmentVariableNames(settings);
|
|
7053
7060
|
sandboxLifecycleHookIds(settings);
|
|
7054
7061
|
const warmRates = parseSandboxWarmRateJson(settings.sandboxWarmRateMicrosPerSecondJson);
|
|
@@ -7723,6 +7730,7 @@ export {
|
|
|
7723
7730
|
effectiveSandboxLifecycle,
|
|
7724
7731
|
emptyClaudeUsage,
|
|
7725
7732
|
environmentsEncryptionKeyBytes,
|
|
7733
|
+
findIntegrationsOauthClient,
|
|
7726
7734
|
firstPartyMcpBaseUrl,
|
|
7727
7735
|
firstPartyMcpInternalBaseUrl,
|
|
7728
7736
|
firstPartyMcpInternalWorkspaceUrl,
|