{"name":"@smithy/shared-ini-file-loader","version":"4.0.0","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@smithy/shared-ini-file-loader@4.0.0","homepage":"https://github.com/awslabs/smithy-typescript/tree/main/packages/shared-ini-file-loader","bugs":{"url":"https://github.com/awslabs/smithy-typescript/issues"},"dist":{"shasum":"ee8334f935138c92e11699bc81be5d1f76e6dce3","tarball":"http://registry-npm.ywwl.com/@smithy/shared-ini-file-loader/download/@smithy/shared-ini-file-loader-4.0.0.tgz","fileCount":67,"integrity":"sha512-Ktupe8msp2GPaKKVfiz3NNUNnslJiGGRoVh3BDpm/RChkQ5INQpqmTc2taE0XChNYumNynLfb3keekIPaiaZeg==","signatures":[{"sig":"MEYCIQCZNT5Lt4rEp1BHrgYxWZy9dNLzYMKLURGSdFFTKVY6EwIhAPbzvHymg90+fiuCgGirkQmGqgfaxf2iWk12Ujl9zeTf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49144,"size":13099,"noattachment":false,"key":"/@smithy/shared-ini-file-loader/-/@smithy/shared-ini-file-loader-4.0.0.tgz"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","browser":{"./dist-es/slurpFile":false,"./dist-es/getSSOTokenFromFile":false},"engines":{"node":">=18.0.0"},"gitHead":"de3a850552111a7018df855f808258074a90ab62","scripts":{"lint":"eslint -c ../../.eslintrc.js \"src/**/*.ts\"","test":"yarn g:vitest run","build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0","format":"prettier --config ../../prettier.config.js --ignore-path ../.prettierignore --write \"**/*.{ts,md,json}\"","build:es":"yarn g:tsc -p tsconfig.es.json","build:cjs":"node ../../scripts/inline shared-ini-file-loader","test:watch":"yarn g:vitest watch","build:types":"yarn g:tsc -p tsconfig.types.json","extract:docs":"api-extractor run --local","stage-release":"rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz","build:types:downlevel":"rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4"},"typedoc":{"entryPoint":"src/index.ts"},"_npmUser":{"name":"smithy-team","email":"aws-smithy-team+npm@amazon.com"},"repository":{"url":"git+https://github.com/awslabs/smithy-typescript.git","type":"git","directory":"packages/shared-ini-file-loader"},"_npmVersion":"10.8.2","description":"[![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","directories":{},"_nodeVersion":"18.20.5","dependencies":{"tslib":"^2.6.2","@smithy/types":"^4.0.0"},"react-native":{"./dist-es/slurpFile":false,"./dist-cjs/slurpFile":false,"./dist-es/getSSOTokenFromFile":false,"./dist-cjs/getSSOTokenFromFile":false},"publishConfig":{"directory":".release/package"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","typedoc":"0.23.23","@types/node":"^18.11.9","concurrently":"7.0.0","downlevel-dts":"0.10.1"},"_npmOperationalInternal":{"tmp":"tmp/shared-ini-file-loader_4.0.0_1736185160642_0.6287299472367598","host":"s3://npm-registry-packages-npm-production"},"readme":"# @smithy/shared-ini-file-loader\n\n[![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)\n[![NPM downloads](https://img.shields.io/npm/dm/@smithy/shared-ini-file-loader.svg)](https://www.npmjs.com/package/@smithy/shared-ini-file-loader)\n\n## AWS Shared Configuration File Loader\n\nThis module provides a function that reads from AWS SDK configuration files and\nreturns a promise that will resolve with a hash of the parsed contents of the\nAWS credentials file and of the AWS config file. Given the [sample\nfiles](#sample-files) below, the promise returned by `loadSharedConfigFiles`\nwould resolve with:\n\n```javascript\n{\n  configFile: {\n    'default': {\n      aws_access_key_id: 'foo',\n      aws_secret_access_key: 'bar',\n    },\n    dev: {\n      aws_access_key_id: 'foo1',\n      aws_secret_access_key: 'bar1',\n    },\n    prod: {\n      aws_access_key_id: 'foo2',\n      aws_secret_access_key: 'bar2',\n    },\n    'testing host': {\n      aws_access_key_id: 'foo4',\n      aws_secret_access_key: 'bar4',\n    }\n  },\n  credentialsFile: {\n    'default': {\n      aws_access_key_id: 'foo',\n      aws_secret_access_key: 'bar',\n    },\n    dev: {\n      aws_access_key_id: 'foo1',\n      aws_secret_access_key: 'bar1',\n    },\n    prod: {\n      aws_access_key_id: 'foo2',\n      aws_secret_access_key: 'bar2',\n    }\n  },\n}\n```\n\nIf a file is not found, its key (`configFile` or `credentialsFile`) will instead\nhave a value of an empty object.\n\n## Supported configuration\n\nYou may customize how the files are loaded by providing an options hash to the\n`loadSharedConfigFiles` function. The following options are supported:\n\n- `filepath` - The path to the shared credentials file. If not specified, the\n  provider will use the value in the `AWS_SHARED_CREDENTIALS_FILE` environment\n  variable or a default of `~/.aws/credentials`.\n- `configFilepath` - The path to the shared config file. If not specified, the\n  provider will use the value in the `AWS_CONFIG_FILE` environment variable or a\n  default of `~/.aws/config`.\n- `ignoreCache` - The provider will normally cache the contents of the files it\n  loads. This option will force the provider to reload the files from disk.\n  Defaults to `false`.\n\n## Sample files\n\n### `~/.aws/credentials`\n\n```ini\n[default]\naws_access_key_id=foo\naws_secret_access_key=bar\n\n[dev]\naws_access_key_id=foo2\naws_secret_access_key=bar2\n\n[prod]\naws_access_key_id=foo3\naws_secret_access_key=bar3\n```\n\n### `~/.aws/config`\n\n```ini\n[default]\naws_access_key_id=foo\naws_secret_access_key=bar\n\n[profile dev]\naws_access_key_id=foo2\naws_secret_access_key=bar2\n\n[profile prod]\naws_access_key_id=foo3\naws_secret_access_key=bar3\n\n[profile \"testing host\"]\naws_access_key_id=foo4\naws_secret_access_key=bar4\n```\n","publish_time":1736185160927,"maintainers":[{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"smithy-team","email":"aws-smithy-team+npm@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"}],"_cnpm_publish_time":1736185160927,"dist-tags":{"latest":"4.7.2"}}