UNPKG

mira

Version:

NearForm Accelerator for Cloud Native Serverless AWS

65 lines (64 loc) 1.89 kB
/** * Deploys Custom::CDKBucketDeployment resources without using the CDK * toolchain. */ import AWS from 'aws-sdk'; import { Account } from '../config/mira-config'; import { PromiseResult } from 'aws-sdk/lib/request'; import { Bucket } from 'aws-sdk/clients/s3'; interface LooseObject { [key: string]: any; } /** * Gets the files within an asset folder. */ export declare const getAssetFiles: (id: string) => Promise<Array<string>>; /** * Gets the asset prefix given some ID. */ export declare const getAssetPrefix: (id: string) => string; /** * Gets the objects from a bucket. */ export declare const getBucketObjects: (Bucket: string) => Promise<PromiseResult<AWS.S3.ListObjectsOutput, AWS.AWSError>>; /** * Gets references for bucket. */ export declare const getBucketRefs: () => Promise<LooseObject>; /** * Given some template JSON, grabs all resource objects that are of type * AWS::S3::Bucket. */ export declare const getBucketResources: () => LooseObject; /** * Gets the environment for Mira. */ export declare const getEnvironment: () => Account; /** * Gets the S3 object. */ export declare const getS3: () => Promise<AWS.S3>; /** * Gets S3 buckets beginning with a prefix. * @param {String} prefix * @param {String} siteName */ export declare const getS3Buckets: (prefix: string, siteName: string) => Promise<Bucket[]>; /** * For a given template file, gets all site buckets. */ export declare const getSiteBuckets: () => Promise<LooseObject>; /** * Gets the template files for the given CWD. */ export declare const getTemplateFiles: () => LooseObject; /** * Removes assets directories. */ export declare const removeAssetDirectories: () => void; /** * Quickly deploys an asset bundle generated by CDK to an intended S3 bucket * as defined by a CDK generated Cfn template. */ export declare const quickDeploy: () => Promise<void>; export {};