@webda/aws 4.0.0-beta.1 → 4.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +64 -7
  2. package/lib/index.d.ts +1 -0
  3. package/lib/index.d.ts.map +1 -0
  4. package/lib/index.js.map +1 -1
  5. package/lib/services/aws-parameters.d.ts +33 -0
  6. package/lib/services/aws-parameters.d.ts.map +1 -0
  7. package/lib/services/aws-parameters.js +18 -0
  8. package/lib/services/aws-parameters.js.map +1 -0
  9. package/lib/services/awscommands.service.d.ts +39 -0
  10. package/lib/services/awscommands.service.d.ts.map +1 -0
  11. package/lib/services/awscommands.service.js +127 -0
  12. package/lib/services/awscommands.service.js.map +1 -0
  13. package/lib/services/cloudwatchlogger.service.d.ts +131 -0
  14. package/lib/services/cloudwatchlogger.service.d.ts.map +1 -0
  15. package/lib/services/{cloudwatchlogger.js → cloudwatchlogger.service.js} +66 -34
  16. package/lib/services/cloudwatchlogger.service.js.map +1 -0
  17. package/lib/services/contributors.d.ts +37 -0
  18. package/lib/services/contributors.d.ts.map +1 -0
  19. package/lib/services/contributors.js +2 -0
  20. package/lib/services/contributors.js.map +1 -0
  21. package/lib/services/dynamodb.service.d.ts +297 -0
  22. package/lib/services/dynamodb.service.d.ts.map +1 -0
  23. package/lib/services/dynamodb.service.js +985 -0
  24. package/lib/services/dynamodb.service.js.map +1 -0
  25. package/lib/services/index.d.ts +12 -31
  26. package/lib/services/index.d.ts.map +1 -0
  27. package/lib/services/index.js +11 -8
  28. package/lib/services/index.js.map +1 -1
  29. package/lib/services/lambdacaller.service.d.ts +81 -0
  30. package/lib/services/lambdacaller.service.d.ts.map +1 -0
  31. package/lib/services/lambdacaller.service.js +75 -0
  32. package/lib/services/lambdacaller.service.js.map +1 -0
  33. package/lib/services/lambdaserver.service.d.ts +127 -0
  34. package/lib/services/lambdaserver.service.d.ts.map +1 -0
  35. package/lib/services/lambdaserver.service.js +294 -0
  36. package/lib/services/lambdaserver.service.js.map +1 -0
  37. package/lib/services/{route53.d.ts → route53.service.d.ts} +21 -11
  38. package/lib/services/route53.service.d.ts.map +1 -0
  39. package/lib/services/{route53.js → route53.service.js} +35 -38
  40. package/lib/services/route53.service.js.map +1 -0
  41. package/lib/services/s3binary.service.d.ts +215 -0
  42. package/lib/services/s3binary.service.d.ts.map +1 -0
  43. package/lib/services/{s3binary.js → s3binary.service.js} +113 -74
  44. package/lib/services/s3binary.service.js.map +1 -0
  45. package/lib/services/secretsmanager.service.d.ts +102 -0
  46. package/lib/services/secretsmanager.service.d.ts.map +1 -0
  47. package/lib/services/{secretsmanager.js → secretsmanager.service.js} +42 -24
  48. package/lib/services/secretsmanager.service.js.map +1 -0
  49. package/lib/services/{sqsqueue.d.ts → sqsqueue.service.d.ts} +60 -34
  50. package/lib/services/sqsqueue.service.d.ts.map +1 -0
  51. package/lib/services/{sqsqueue.js → sqsqueue.service.js} +60 -35
  52. package/lib/services/sqsqueue.service.js.map +1 -0
  53. package/package.json +59 -65
  54. package/webda.module.json +738 -377
  55. package/lib/deployers/cloudformation.d.ts +0 -316
  56. package/lib/deployers/cloudformation.js +0 -837
  57. package/lib/deployers/cloudformation.js.map +0 -1
  58. package/lib/deployers/cloudformation.spec.d.ts +0 -1
  59. package/lib/deployers/cloudformation.spec.js +0 -530
  60. package/lib/deployers/cloudformation.spec.js.map +0 -1
  61. package/lib/deployers/index.d.ts +0 -254
  62. package/lib/deployers/index.js +0 -543
  63. package/lib/deployers/index.js.map +0 -1
  64. package/lib/deployers/index.spec.d.ts +0 -8
  65. package/lib/deployers/index.spec.js +0 -595
  66. package/lib/deployers/index.spec.js.map +0 -1
  67. package/lib/deployers/lambda-entrypoint.d.ts +0 -1
  68. package/lib/deployers/lambda-entrypoint.js +0 -11
  69. package/lib/deployers/lambda-entrypoint.js.map +0 -1
  70. package/lib/deployers/lambdapackager.d.ts +0 -27
  71. package/lib/deployers/lambdapackager.js +0 -26
  72. package/lib/deployers/lambdapackager.js.map +0 -1
  73. package/lib/deployers/lambdapackager.spec.d.ts +0 -1
  74. package/lib/deployers/lambdapackager.spec.js +0 -44
  75. package/lib/deployers/lambdapackager.spec.js.map +0 -1
  76. package/lib/index.spec.d.ts +0 -10
  77. package/lib/index.spec.js +0 -42
  78. package/lib/index.spec.js.map +0 -1
  79. package/lib/services/aws-mixin.d.ts +0 -24
  80. package/lib/services/aws-mixin.js +0 -18
  81. package/lib/services/aws-mixin.js.map +0 -1
  82. package/lib/services/cloudwatchlogger.d.ts +0 -81
  83. package/lib/services/cloudwatchlogger.js.map +0 -1
  84. package/lib/services/cloudwatchlogger.spec.d.ts +0 -1
  85. package/lib/services/cloudwatchlogger.spec.js +0 -104
  86. package/lib/services/cloudwatchlogger.spec.js.map +0 -1
  87. package/lib/services/dynamodb.d.ts +0 -173
  88. package/lib/services/dynamodb.js +0 -711
  89. package/lib/services/dynamodb.js.map +0 -1
  90. package/lib/services/dynamodb.spec.d.ts +0 -23
  91. package/lib/services/dynamodb.spec.js +0 -339
  92. package/lib/services/dynamodb.spec.js.map +0 -1
  93. package/lib/services/lambdacaller.d.ts +0 -68
  94. package/lib/services/lambdacaller.js +0 -63
  95. package/lib/services/lambdacaller.js.map +0 -1
  96. package/lib/services/lambdacaller.spec.d.ts +0 -1
  97. package/lib/services/lambdacaller.spec.js +0 -70
  98. package/lib/services/lambdacaller.spec.js.map +0 -1
  99. package/lib/services/lambdaserver.d.ts +0 -86
  100. package/lib/services/lambdaserver.js +0 -264
  101. package/lib/services/lambdaserver.js.map +0 -1
  102. package/lib/services/lambdaserver.spec.d.ts +0 -1
  103. package/lib/services/lambdaserver.spec.js +0 -417
  104. package/lib/services/lambdaserver.spec.js.map +0 -1
  105. package/lib/services/route53.js.map +0 -1
  106. package/lib/services/route53.spec.d.ts +0 -1
  107. package/lib/services/route53.spec.js +0 -102
  108. package/lib/services/route53.spec.js.map +0 -1
  109. package/lib/services/s3binary.d.ts +0 -162
  110. package/lib/services/s3binary.js.map +0 -1
  111. package/lib/services/s3binary.spec.d.ts +0 -1
  112. package/lib/services/s3binary.spec.js +0 -269
  113. package/lib/services/s3binary.spec.js.map +0 -1
  114. package/lib/services/secretsmanager.d.ts +0 -80
  115. package/lib/services/secretsmanager.js.map +0 -1
  116. package/lib/services/secretsmanager.spec.d.ts +0 -1
  117. package/lib/services/secretsmanager.spec.js +0 -66
  118. package/lib/services/secretsmanager.spec.js.map +0 -1
  119. package/lib/services/sqsqueue.js.map +0 -1
  120. package/lib/services/sqsqueue.spec.d.ts +0 -1
  121. package/lib/services/sqsqueue.spec.js +0 -152
  122. package/lib/services/sqsqueue.spec.js.map +0 -1
  123. package/lib/shell.d.ts +0 -12
  124. package/lib/shell.js +0 -42
  125. package/lib/shell.js.map +0 -1
  126. package/webda.shell.json +0 -11
@@ -1,254 +0,0 @@
1
- import { CertificateDetail } from "@aws-sdk/client-acm";
2
- import { HostedZone, RRType } from "@aws-sdk/client-route-53";
3
- import { GetCallerIdentityResponse } from "@aws-sdk/client-sts";
4
- import { DeployerResources } from "@webda/core";
5
- import { Deployer, DeploymentManager } from "@webda/shell";
6
- export type TagsDefinition = {
7
- Key: string;
8
- Value: string;
9
- }[] | {
10
- [key: string]: string;
11
- };
12
- /**
13
- * Common resources for all AWS Deployers
14
- */
15
- export interface AWSDeployerResources extends DeployerResources {
16
- /**
17
- * AWS_ACCESS_KEY_ID to use
18
- *
19
- * Using static key is not recommended
20
- */
21
- accessKeyId?: string;
22
- /**
23
- * AWS_SECRET_ACCESS_KEY to use
24
- *
25
- * Using static key is not recommended
26
- */
27
- secretAccessKey?: string;
28
- /**
29
- * AWS_REGION to use
30
- *
31
- * @default "us-east-1"
32
- */
33
- region?: string;
34
- /**
35
- * AWS_SESSION_TOKEN Token
36
- *
37
- * Even if it is possible to add it here
38
- * It is not sustainable as this token at its best will
39
- * have a lifetime of 12 hours
40
- */
41
- sessionToken?: string;
42
- /**
43
- * AWS Account Id
44
- */
45
- AWSAccountId?: string;
46
- /**
47
- * Endpoints to use by differents services
48
- * Usefull to test with localstack or other AWS emulations
49
- */
50
- endpoints?: {
51
- ACM?: string;
52
- S3?: string;
53
- STS?: string;
54
- EC2?: string;
55
- Route53?: string;
56
- };
57
- /**
58
- * Default Tags to use with resources created by deployers
59
- */
60
- Tags?: TagsDefinition;
61
- /**
62
- * SSL certificates to create
63
- *
64
- * Sample
65
- * ```
66
- * Certificates: {
67
- * "test.webda.io": {
68
- * SubjectAlternativeNames: ["test2.webda.io"]
69
- * }
70
- * }
71
- * ```
72
- */
73
- Certificates?: {
74
- [key: string]: {
75
- /**
76
- * Any alternative names to add to the certificate
77
- */
78
- SubjectAlternativeNames?: string[];
79
- Tags?: TagsDefinition;
80
- };
81
- };
82
- }
83
- /**
84
- * Abstract AWS Deployer
85
- *
86
- * It includes some basic utilities methods to be used by
87
- * final deployers
88
- */
89
- export declare abstract class AWSDeployer<T extends AWSDeployerResources> extends Deployer<T> {
90
- constructor(manager: DeploymentManager, resources: any);
91
- /**
92
- * Return AWS region
93
- */
94
- getRegion(): string;
95
- /**
96
- * Return the current AWS Identity used
97
- */
98
- getAWSIdentity(): Promise<GetCallerIdentityResponse>;
99
- /**
100
- * Return the default VPC for the current region
101
- */
102
- getDefaultVpc(): Promise<{
103
- Id: string;
104
- Subnets: any[];
105
- }>;
106
- /**
107
- * Generate a MD5 in hex
108
- * @param str to hash
109
- */
110
- protected md5(str: string): string;
111
- /**
112
- * Hash the string
113
- *
114
- * @param str to hash
115
- * @param type of hash
116
- * @param format hex or b64
117
- */
118
- protected hash(str: string, type?: string, format?: "hex" | "base64"): string;
119
- /**
120
- * Replace / by _ as theses ID are not allowed in AWS
121
- *
122
- * @param id
123
- */
124
- _replaceForAWS(id: string): string;
125
- /**
126
- * Get a certificate or create it
127
- *
128
- * @param domain to get certificate for
129
- * @param region
130
- */
131
- getCertificate(domain: string, region?: string): Promise<any>;
132
- /**
133
- * Get the closest zone to the domain
134
- *
135
- * @param domain to get zone for
136
- */
137
- getZoneForDomainName(domain: any): Promise<HostedZone>;
138
- /**
139
- * Transform a tag map into a tag array
140
- *
141
- * @param tags
142
- */
143
- transformMapTagsToArray(tags: TagsDefinition): {
144
- Key: string;
145
- Value: string;
146
- }[];
147
- /**
148
- * Transform a tag array into a tag map
149
- *
150
- * @param tags
151
- */
152
- transformArrayTagsToMap(tags: TagsDefinition): {
153
- [key: string]: string;
154
- };
155
- /**
156
- * Take this.resources[key].Tags and add all remaining Tags from this.resources.Tags
157
- *
158
- * @param key of the resources to add
159
- */
160
- getDefaultTags(key?: string | TagsDefinition): {
161
- Key: string;
162
- Value: string;
163
- }[];
164
- /**
165
- * Take this.resources[key].Tags and add all remaining Tags from this.resources.Tags
166
- *
167
- * @param key of the resources to add
168
- */
169
- getDefaultTagsAsMap(key?: string | TagsDefinition): {
170
- [key: string]: string;
171
- };
172
- /**
173
- * Return the S3 Tagging string
174
- * @param key of the resources to add
175
- */
176
- getDefaultTagsAsS3Tagging(key?: string | TagsDefinition): string;
177
- waitFor(callback: (resolve?: (value?: any) => void, reject?: (reason?: any) => void) => Promise<boolean>, retries: number, title: string, delay: number): Promise<any>;
178
- /**
179
- * Create a certificate for a domain
180
- * Will use Route 53 to do the validation
181
- *
182
- * @param domain to create the certificate for
183
- * @param zone
184
- */
185
- doCreateCertificate(domain: string, zone: HostedZone): Promise<CertificateDetail>;
186
- /**
187
- * Create DNS entry
188
- *
189
- * @param domain to create
190
- * @param type of DNS
191
- * @param value the value of the record
192
- * @param targetZone
193
- */
194
- createDNSEntry(domain: string, type: RRType, value: string, targetZone?: HostedZone): Promise<void>;
195
- getARNPolicy(accountId: any, region: any): {
196
- Sid: string;
197
- Effect: string;
198
- Action: string[];
199
- Resource: string[];
200
- }[];
201
- /**
202
- * Generate the `PolicyDocument`
203
- *
204
- * It will browse all services for a method `getARNPolicy`
205
- * Allowing you to write some specific Service or Bean that
206
- * requires specific AWS permissions
207
- */
208
- getPolicyDocument(additionalStatements?: any[]): Promise<any>;
209
- /**
210
- * Create a bucket if it does not exist
211
- *
212
- * @param bucket to create
213
- */
214
- createBucket(Bucket: string): Promise<void>;
215
- /**
216
- * Send a full folder (recursive) on bucket
217
- *
218
- * @param bucket to send data to
219
- * @param folder path to local folder to send
220
- * @param prefix prefix on the bucket
221
- */
222
- putFolderOnBucket(bucket: string, folder: string, prefix?: string): Promise<void>;
223
- /**
224
- * Find the common prefix between two strings
225
- *
226
- * Example
227
- * ```
228
- * commonPrefix("/test/plop1", "/templates/") => "/te"
229
- * ```
230
- *
231
- *
232
- * @param str1 to compare
233
- * @param str2 to compare
234
- */
235
- commonPrefix(str1: string, str2: string): string;
236
- /**
237
- * Add files to a bucket
238
- *
239
- * It uses hash and ETag to avoid uploading files already present
240
- *
241
- *
242
- * The files src can be either:
243
- * - a string representing the local path
244
- * - a Buffer with the dynamic content
245
- *
246
- * @param bucket to send bucket
247
- * @param files to send
248
- */
249
- putFilesOnBucket(bucket: string, files: {
250
- key?: string;
251
- src: any;
252
- mimetype?: string;
253
- }[]): Promise<void>;
254
- }