-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
7,120 additions
and
933 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export declare const CONTEXT = "FC-DEPLOY"; | ||
declare const logger: any; | ||
export default logger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare const CONTEXT = "FC-DEPLOY"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { ILogger } from '@serverless-devs/core'; | ||
import { InputProps } from '../../../common/entity'; | ||
interface IDeployOptions { | ||
logConfigIsAuto?: boolean; | ||
} | ||
export default class Component { | ||
logger: ILogger; | ||
protected __report(reportData: any): any; | ||
deploy(inputs: InputProps): Promise<any>; | ||
deploy(inputs: InputProps, deployOptions: IDeployOptions): Promise<any>; | ||
remove(inputs: InputProps): Promise<any>; | ||
private reportNames; | ||
private initInputs; | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { IInputs } from './interface'; | ||
export default class FcBaseComponent { | ||
private report; | ||
private handlerInputs; | ||
deploy(inputs: IInputs): Promise<any>; | ||
remove(inputs: IInputs): Promise<void>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { CustomDomainConfig } from './lib/fc/custom-domain'; | ||
export interface IInputs { | ||
props: IProperties; | ||
project: { | ||
component: string; | ||
access: string; | ||
projectName: string; | ||
}; | ||
appName: string; | ||
args: string; | ||
path: any; | ||
} | ||
export interface IProperties { | ||
region: string; | ||
customDomain: CustomDomainConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ICredentials } from '../profile'; | ||
export interface CustomDomainConfig { | ||
domainName: string; | ||
protocol: 'HTTP' | 'HTTP,HTTPS'; | ||
routeConfigs: RouteConfig[]; | ||
certConfig?: CertConfig; | ||
} | ||
interface RouteConfig { | ||
path: string; | ||
serviceName: string; | ||
functionName: string; | ||
qualifier?: string; | ||
methods?: string[]; | ||
} | ||
interface CertConfig { | ||
certName: string; | ||
certificate: string; | ||
privateKey: string; | ||
} | ||
export declare class FcCustomDomain { | ||
readonly customDomainConfig: CustomDomainConfig; | ||
readonly name: string; | ||
fcClient: any; | ||
credentials: ICredentials; | ||
constructor(customDomainConfig: CustomDomainConfig, credentials: ICredentials, fcClient: any); | ||
validateConfig(): void; | ||
get(): Promise<any>; | ||
existOnline(): Promise<boolean>; | ||
resolveCustomDomainConfig(): { | ||
[key: string]: any; | ||
}; | ||
deploy(): Promise<void>; | ||
remove(): Promise<void>; | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export declare function promptForConfirmContinue(message: string): Promise<boolean>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export interface ICredentials { | ||
AccountID: string; | ||
AccessKeyID: string; | ||
AccessKeySecret: string; | ||
SecurityToken?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function promiseRetry(fn: any): Promise<any>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export interface Ram { | ||
role: string; | ||
arn: string; | ||
} | ||
export interface ReportData { | ||
name: string; | ||
access: string; | ||
content: Ram; | ||
} | ||
export default class BaseComponent { | ||
protected __report(reportData: ReportData): Ram; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export declare const RETRYOPTIONS: { | ||
retries: number; | ||
factor: number; | ||
minTimeout: number; | ||
randomize: boolean; | ||
}; | ||
export declare const HELP: ({ | ||
header: string; | ||
content: string; | ||
optionList?: undefined; | ||
} | { | ||
header: string; | ||
optionList: { | ||
name: string; | ||
description: string; | ||
alias: string; | ||
type: BooleanConstructor; | ||
}[]; | ||
content?: undefined; | ||
} | { | ||
header: string; | ||
content: { | ||
example: string; | ||
}[]; | ||
optionList?: undefined; | ||
})[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { IInputs } from './interface'; | ||
import Base from './common/base'; | ||
export default class RamCompoent extends Base { | ||
deploy(inputs: IInputs): Promise<string>; | ||
delete(inputs: any): Promise<void>; | ||
remove(inputs: any): Promise<void>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
export interface IInputs { | ||
props: IProperties; | ||
credentials: ICredentials; | ||
project: { | ||
component: string; | ||
access: string; | ||
projectName: string; | ||
}; | ||
appName: string; | ||
args: string; | ||
path: any; | ||
} | ||
export interface ICredentials { | ||
Alias: string; | ||
AccountID: string; | ||
AccessKeyID: string; | ||
AccessKeySecret: string; | ||
SecurityToken?: string; | ||
} | ||
export interface IProperties { | ||
name: string; | ||
service?: string; | ||
description?: string; | ||
statement?: IStatement[]; | ||
policies: Array<string | IPolicy>; | ||
} | ||
export interface IPolicy { | ||
name: string; | ||
description?: string; | ||
statement: IStatement[]; | ||
} | ||
interface IStatement { | ||
Effect: 'Allow' | 'Deny'; | ||
Action: string[]; | ||
Resource?: string | string[]; | ||
Condition?: string | string[] | object; | ||
Principal?: object; | ||
Permission?: 'Allow' | 'Deny'; | ||
} | ||
export interface IRoleDocument { | ||
Version: string; | ||
Statement: any; | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ICredentials, IProperties, IPolicy, IRoleDocument } from '../interface'; | ||
interface IPolicyName { | ||
name: string; | ||
type: string; | ||
} | ||
export default class R { | ||
ramClient: any; | ||
stdoutFormatter: any; | ||
constructor(profile: ICredentials); | ||
checkPolicyNotExistOrEnsureAvailable(policyName: string, policyType: string, statement?: any): Promise<boolean>; | ||
checkRoleNotExistOrEnsureAvailable(roleName: string, roleDocument?: IRoleDocument): Promise<string>; | ||
createPolicy(policyName: string, statement: any, description?: string): Promise<void>; | ||
createRole(name: string, roleDocument: IRoleDocument, description?: string): Promise<string>; | ||
updatePolicy(policyName: string, statement: any): Promise<void>; | ||
updateRole(name: string, roleDocument: IRoleDocument): Promise<any>; | ||
deletePolicyVersion(policyName: string, versions: any, deleteAll: boolean): Promise<void>; | ||
mackPlicies(policies: Array<string | IPolicy>): Promise<IPolicyName[]>; | ||
makeRole({ name, service, statement, description }: IProperties): Promise<string>; | ||
attachPolicysToRole(policyNamesArray: IPolicyName[], roleName: string): Promise<void>; | ||
deploy(propertie: IProperties): Promise<string>; | ||
deletePolicys(policies: Array<string | IPolicy>): Promise<void>; | ||
deleteRole(roleName: string): Promise<void>; | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export interface Vpc { | ||
region: string; | ||
vpcId: string; | ||
vSwitchId: string; | ||
securityGroupId: string; | ||
} | ||
export interface ReportData { | ||
name: string; | ||
access: string; | ||
content: Vpc; | ||
} | ||
export default class BaseComponent { | ||
protected __report(reportData: ReportData): Vpc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export declare const RETRYOPTIONS: { | ||
retries: number; | ||
factor: number; | ||
minTimeout: number; | ||
randomize: boolean; | ||
}; | ||
export declare const HELP: ({ | ||
header: string; | ||
optionList: { | ||
name: string; | ||
description: string; | ||
alias: string; | ||
type: BooleanConstructor; | ||
}[]; | ||
content?: undefined; | ||
} | { | ||
header: string; | ||
content: { | ||
example: string; | ||
}[]; | ||
optionList?: undefined; | ||
})[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { IInputs } from './interface'; | ||
import Base from './common/base'; | ||
export default class VpcCompoent extends Base { | ||
create(inputs: IInputs): Promise<import("./interface").IVpcConfig>; | ||
delete(inputs: any): Promise<void>; | ||
private checkPropertiesAndGenerateResourcesName; | ||
private initStdout; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
export interface IInputs { | ||
props: IProperties; | ||
credentials: ICredentials; | ||
project: { | ||
component: string; | ||
access: string; | ||
projectName: string; | ||
}; | ||
appName: string; | ||
args: string; | ||
path: any; | ||
} | ||
export interface ICredentials { | ||
Alias: string; | ||
AccountID: string; | ||
AccessKeyID: string; | ||
AccessKeySecret: string; | ||
SecurityToken?: string; | ||
} | ||
export interface IProperties { | ||
regionId: string; | ||
zoneId: string; | ||
vpcName: string; | ||
vSwitchName: string; | ||
vpcDescription?: string; | ||
vpcCidrBlock?: string; | ||
vSwitchDescription?: string; | ||
vSwitchCidrBlock?: string; | ||
securityGroupName: string; | ||
securityGroupDescription?: string; | ||
} | ||
export interface IVpcConfig { | ||
vpcId: string; | ||
vSwitchId: string; | ||
securityGroupId: string; | ||
} | ||
export interface IDeleteProperties { | ||
regionId: string; | ||
vpcId: string; | ||
vSwitchId: string; | ||
securityGroupId: string; | ||
} | ||
export declare function isDeleteProperties(args: any): args is IDeleteProperties; |
Oops, something went wrong.