@bitblit/ratchet-aws
Version:
Common tools for use with AWS browser and node
19 lines • 757 B
JavaScript
import { ErrorRatchet } from '@bitblit/ratchet-common/lang/error-ratchet';
import { StringRatchet } from '@bitblit/ratchet-common/lang/string-ratchet';
export class AwsCredentialsRatchet {
constructor() { }
static applySetProfileEnvironmentalVariable(newProfile) {
if (process.env) {
if (StringRatchet.trimToNull(newProfile)) {
process.env['AWS_PROFILE'] = newProfile;
}
else {
ErrorRatchet.throwFormattedErr('Cannot set profile to null/empty string');
}
}
else {
ErrorRatchet.throwFormattedErr('Cannot set profile - not in a node environment - process missing');
}
}
}
//# sourceMappingURL=aws-credentials-ratchet.js.map