Skip to content

Commit

Permalink
feat: remove protocol-timestamp package (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chase Coalwell authored and trivikr committed Feb 6, 2020
1 parent 0c95a91 commit 9913924
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 766 deletions.
1 change: 0 additions & 1 deletion packages/credential-provider-cognito-identity/package.json
Expand Up @@ -16,7 +16,6 @@
"dependencies": {
"@aws-sdk/client-cognito-identity": "^1.0.0-alpha.15",
"@aws-sdk/property-provider": "^1.0.0-alpha.4",
"@aws-sdk/protocol-timestamp": "^1.0.0-alpha.4",
"@aws-sdk/types": "^1.0.0-alpha.4",
"tslib": "^1.8.0"
},
Expand Down
@@ -1,7 +1,6 @@
import { CognitoProviderParameters } from "./CognitoProviderParameters";
import { resolveLogins } from "./resolveLogins";
import { ProviderError } from "@aws-sdk/property-provider";
import { epoch } from "@aws-sdk/protocol-timestamp";
import { GetCredentialsForIdentityCommand } from "@aws-sdk/client-cognito-identity";
import { Credentials, CredentialProvider } from "@aws-sdk/types";

Expand Down Expand Up @@ -36,7 +35,9 @@ export function fromCognitoIdentity(
accessKeyId: AccessKeyId,
secretAccessKey: SecretKey,
sessionToken: SessionToken,
expiration: Expiration ? epoch(Expiration) : undefined
expiration: Expiration
? Math.floor(Expiration.valueOf() / 1000)
: undefined
};
};
}
Expand Down
1 change: 0 additions & 1 deletion packages/credential-provider-env/package.json
Expand Up @@ -19,7 +19,6 @@
"license": "Apache-2.0",
"dependencies": {
"@aws-sdk/property-provider": "^1.0.0-alpha.4",
"@aws-sdk/protocol-timestamp": "^1.0.0-alpha.4",
"@aws-sdk/types": "^1.0.0-alpha.4",
"tslib": "^1.8.0"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/credential-provider-env/src/index.ts
@@ -1,6 +1,5 @@
import { CredentialProvider } from "@aws-sdk/types";
import { ProviderError } from "@aws-sdk/property-provider";
import { epoch } from "@aws-sdk/protocol-timestamp";

export const ENV_KEY = "AWS_ACCESS_KEY_ID";
export const ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
Expand All @@ -22,7 +21,7 @@ export function fromEnv(): CredentialProvider {
accessKeyId,
secretAccessKey,
sessionToken: process.env[ENV_SESSION],
expiration: expiry ? epoch(expiry) : undefined
expiration: expiry ? Math.floor(Date.parse(expiry) / 1000) : undefined
});
}

Expand Down
8 changes: 0 additions & 8 deletions packages/protocol-timestamp/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions packages/protocol-timestamp/.npmignore

This file was deleted.

297 changes: 0 additions & 297 deletions packages/protocol-timestamp/CHANGELOG.md

This file was deleted.

0 comments on commit 9913924

Please sign in to comment.