Rocky_Mountain_Vending/.pnpm-store/v10/files/d0/1f28615046deddb5741aa2b160a1f733cfc0fef083a4db4cc5ba844df695366734c311c05602cca7b3fdc1c1b0d3a9828c95f063c688ebf8ff224d84926e45
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

21 lines
1.1 KiB
Text

import { setCredentialFeature } from "@aws-sdk/core/client";
import { CredentialsProviderError } from "@smithy/property-provider";
import { getProfileName, parseKnownFiles } from "@smithy/shared-ini-file-loader";
import { LoginCredentialsFetcher } from "./LoginCredentialsFetcher";
export const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
const profiles = await parseKnownFiles(init || {});
const profileName = getProfileName({
profile: init?.profile ?? callerClientConfig?.profile,
});
const profile = profiles[profileName];
if (!profile?.login_session) {
throw new CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
tryNextLink: true,
logger: init?.logger,
});
}
const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);
const credentials = await fetcher.loadCredentials();
return setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD");
};