feat!: Initial v2 commit

* Implemented editorconfig
* Switched to ESM
* Switched to a TypeScript workflow
* Switched to projen for project management
* Major code refactor
* TODO: need tests
This commit is contained in:
Tom Keller
2022-10-14 20:38:03 -07:00
parent 50eedb0bfd
commit 239add3ff1
48 changed files with 17553 additions and 49931 deletions
Generated Vendored
+12
View File
@@ -0,0 +1,12 @@
export interface assumeRoleParams {
region: string;
roleToAssume: string;
roleDurationSeconds: number;
roleSessionName: string;
roleSkipSessionTagging?: boolean;
sourceAccountId?: string;
roleExternalId?: string;
webIdentityTokenFile?: string;
webIdentityToken?: string;
}
export declare function assumeRole(params: assumeRoleParams): Promise<import("@aws-sdk/client-sts").AssumeRoleWithWebIdentityCommandOutput>;
Generated Vendored
+99
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+11
View File
@@ -0,0 +1,11 @@
/**
* When the GitHub Actions job is done, clean up any environment variables that
* may have been set by the configure-aws-credentials steps in the job.
*
* Environment variables are not intended to be shared across different jobs in
* the same GitHub Actions workflow: GitHub Actions documentation states that
* each job runs in a fresh instance. However, doing our own cleanup will
* give us additional assurance that these environment variables are not shared
* with any other jobs.
*/
export declare function cleanup(): Promise<void>;
Generated Vendored
+32 -2844
View File
File diff suppressed because it is too large Load Diff
Generated Vendored
+7
View File
@@ -0,0 +1,7 @@
import { STSClient } from '@aws-sdk/client-sts';
export declare function getStsClient(region: string, agent?: string): STSClient;
export declare function sanitizeGithubActor(actor: string): string;
export declare function sanitizeGithubWorkflowName(name: string): string;
export declare function errorMessage(error: unknown): string;
export declare function isDefined<T>(i: T | undefined | null): i is T;
export declare function retryAndBackoff<T>(fn: () => Promise<T>, isRetryable: boolean, retries?: number, maxRetries?: number, base?: number): Promise<T>;
Generated Vendored
+54
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1
View File
@@ -0,0 +1 @@
export declare function run(): Promise<void>;
Generated Vendored
+187 -43852
View File
File diff suppressed because one or more lines are too long