Socket
Socket
Sign inDemoInstall

@smithy/shared-ini-file-loader

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/shared-ini-file-loader

[![NPM version](https://img.shields.io/npm/v/@smithy/shared-ini-file-loader/latest.svg)](https://www.npmjs.com/package/@smithy/shared-ini-file-loader) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/shared-ini-file-loader.svg)](https://www.npmjs.c


Version published
Weekly downloads
16M
decreased by-2.4%
Maintainers
2
Weekly downloads
 
Created

What is @smithy/shared-ini-file-loader?

@smithy/shared-ini-file-loader is a utility package for loading and parsing AWS credentials and configuration from INI files. It is commonly used in AWS SDKs to manage and access AWS credentials and configuration settings stored in shared INI files, such as the AWS credentials file and the AWS config file.

What are @smithy/shared-ini-file-loader's main functionalities?

Load AWS Credentials

This feature allows you to load AWS credentials from the shared credentials file. The code sample demonstrates how to use the `loadSharedConfigFiles` function to load and print the contents of the credentials file.

const { loadSharedConfigFiles } = require('@smithy/shared-ini-file-loader');

async function loadCredentials() {
  const { credentialsFile } = await loadSharedConfigFiles();
  console.log(credentialsFile);
}

loadCredentials();

Load AWS Configurations

This feature allows you to load AWS configurations from the shared config file. The code sample demonstrates how to use the `loadSharedConfigFiles` function to load and print the contents of the config file.

const { loadSharedConfigFiles } = require('@smithy/shared-ini-file-loader');

async function loadConfig() {
  const { configFile } = await loadSharedConfigFiles();
  console.log(configFile);
}

loadConfig();

Parse Specific Profile

This feature allows you to load and parse a specific profile from the shared INI files. The code sample demonstrates how to load the 'default' profile from the config and credentials files.

const { loadSharedConfigFiles } = require('@smithy/shared-ini-file-loader');

async function loadProfile(profile) {
  const { configFile, credentialsFile } = await loadSharedConfigFiles();
  const profileConfig = configFile[profile] || credentialsFile[profile];
  console.log(profileConfig);
}

loadProfile('default');

Other packages similar to @smithy/shared-ini-file-loader

FAQs

Package last updated on 06 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc