insomnia-plugin-aws-profiles
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -46,7 +46,10 @@ "use strict"; | ||
const loadAwsCred = await shared_ini_file_loader_1.loadSharedConfigFiles(); | ||
if (!loadAwsCred.credentialsFile[profile]) | ||
if (!loadAwsCred.credentialsFile) | ||
return `credentials not found`; | ||
const selectedProfile = loadAwsCred.credentialsFile[profile]; | ||
if (!selectedProfile) | ||
return `${profile} not found`; | ||
if (!loadAwsCred.credentialsFile[profile][attribute]) | ||
if (!selectedProfile[attribute]) | ||
return `${attribute} not found for ${profile}`; | ||
return loadAwsCred.credentialsFile[profile][attribute]; | ||
return selectedProfile[attribute]; | ||
}, | ||
@@ -53,0 +56,0 @@ } |
10
index.ts
@@ -44,11 +44,11 @@ import {loadSharedConfigFiles} from "@aws-sdk/shared-ini-file-loader"; | ||
const loadAwsCred = await loadSharedConfigFiles() | ||
if(!loadAwsCred.credentialsFile[profile]) return `${profile} not found` | ||
// @ts-ignore | ||
if(!loadAwsCred.credentialsFile[profile][attribute]) return `${attribute} not found for ${profile}` | ||
if(!loadAwsCred.credentialsFile) return `credentials not found` | ||
const selectedProfile = loadAwsCred.credentialsFile[profile] | ||
// @ts-ignore | ||
return loadAwsCred.credentialsFile[profile][attribute]; | ||
if(!selectedProfile) return `${profile} not found` | ||
if(!selectedProfile[attribute]) return `${attribute} not found for ${profile}` | ||
return selectedProfile[attribute]; | ||
}, | ||
} | ||
]; |
{ | ||
"name": "insomnia-plugin-aws-profiles", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "An Insomnia plugin to retrieve aws credentials for use with IAM authentication", | ||
"main": "index.js", | ||
"homepage": "https://github.com/blue-urban-sky/insomnia-plugin-aws-profiles", | ||
"insomnia": { | ||
@@ -35,5 +36,4 @@ "name": "insomnia-plugin-aws-profiles", | ||
"dependencies": { | ||
"@aws-sdk/credential-provider-ini": "^3.15.0", | ||
"@aws-sdk/shared-ini-file-loader": "^3.13.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1
0
13653
200
- Removed@aws-crypto/sha256-browser@5.2.0(transitive)
- Removed@aws-crypto/sha256-js@5.2.0(transitive)
- Removed@aws-crypto/supports-web-crypto@5.2.0(transitive)
- Removed@aws-crypto/util@5.2.0(transitive)
- Removed@aws-sdk/client-sso@3.696.0(transitive)
- Removed@aws-sdk/client-sso-oidc@3.699.0(transitive)
- Removed@aws-sdk/client-sts@3.699.0(transitive)
- Removed@aws-sdk/core@3.696.0(transitive)
- Removed@aws-sdk/credential-provider-env@3.696.0(transitive)
- Removed@aws-sdk/credential-provider-http@3.696.0(transitive)
- Removed@aws-sdk/credential-provider-ini@3.699.0(transitive)
- Removed@aws-sdk/credential-provider-node@3.699.0(transitive)
- Removed@aws-sdk/credential-provider-process@3.696.0(transitive)
- Removed@aws-sdk/credential-provider-sso@3.699.0(transitive)
- Removed@aws-sdk/credential-provider-web-identity@3.696.0(transitive)
- Removed@aws-sdk/middleware-host-header@3.696.0(transitive)
- Removed@aws-sdk/middleware-logger@3.696.0(transitive)
- Removed@aws-sdk/middleware-recursion-detection@3.696.0(transitive)
- Removed@aws-sdk/middleware-user-agent@3.696.0(transitive)
- Removed@aws-sdk/region-config-resolver@3.696.0(transitive)
- Removed@aws-sdk/token-providers@3.699.0(transitive)
- Removed@aws-sdk/types@3.696.0(transitive)
- Removed@aws-sdk/util-endpoints@3.696.0(transitive)
- Removed@aws-sdk/util-locate-window@3.693.0(transitive)
- Removed@aws-sdk/util-user-agent-browser@3.696.0(transitive)
- Removed@aws-sdk/util-user-agent-node@3.696.0(transitive)
- Removed@smithy/abort-controller@3.1.8(transitive)
- Removed@smithy/config-resolver@3.0.12(transitive)
- Removed@smithy/core@2.5.4(transitive)
- Removed@smithy/credential-provider-imds@3.2.7(transitive)
- Removed@smithy/fetch-http-handler@4.1.1(transitive)
- Removed@smithy/hash-node@3.0.10(transitive)
- Removed@smithy/invalid-dependency@3.0.10(transitive)
- Removed@smithy/is-array-buffer@2.2.03.0.0(transitive)
- Removed@smithy/middleware-content-length@3.0.12(transitive)
- Removed@smithy/middleware-endpoint@3.2.4(transitive)
- Removed@smithy/middleware-retry@3.0.28(transitive)
- Removed@smithy/middleware-serde@3.0.10(transitive)
- Removed@smithy/middleware-stack@3.0.10(transitive)
- Removed@smithy/node-config-provider@3.1.11(transitive)
- Removed@smithy/node-http-handler@3.3.1(transitive)
- Removed@smithy/property-provider@3.1.10(transitive)
- Removed@smithy/protocol-http@4.1.7(transitive)
- Removed@smithy/querystring-builder@3.0.10(transitive)
- Removed@smithy/querystring-parser@3.0.10(transitive)
- Removed@smithy/service-error-classification@3.0.10(transitive)
- Removed@smithy/shared-ini-file-loader@3.1.11(transitive)
- Removed@smithy/signature-v4@4.2.3(transitive)
- Removed@smithy/smithy-client@3.4.5(transitive)
- Removed@smithy/types@3.7.1(transitive)
- Removed@smithy/url-parser@3.0.10(transitive)
- Removed@smithy/util-base64@3.0.0(transitive)
- Removed@smithy/util-body-length-browser@3.0.0(transitive)
- Removed@smithy/util-body-length-node@3.0.0(transitive)
- Removed@smithy/util-buffer-from@2.2.03.0.0(transitive)
- Removed@smithy/util-config-provider@3.0.0(transitive)
- Removed@smithy/util-defaults-mode-browser@3.0.28(transitive)
- Removed@smithy/util-defaults-mode-node@3.0.28(transitive)
- Removed@smithy/util-endpoints@2.1.6(transitive)
- Removed@smithy/util-hex-encoding@3.0.0(transitive)
- Removed@smithy/util-middleware@3.0.10(transitive)
- Removed@smithy/util-retry@3.0.10(transitive)
- Removed@smithy/util-stream@3.3.1(transitive)
- Removed@smithy/util-uri-escape@3.0.0(transitive)
- Removed@smithy/util-utf8@2.3.03.0.0(transitive)
- Removedbowser@2.11.0(transitive)
- Removedfast-xml-parser@4.4.1(transitive)
- Removedstrnum@1.0.5(transitive)
- Removeduuid@9.0.1(transitive)