@ts-cloud/core 0.2.2 → 0.2.4

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 (226) hide show
  1. package/dist/advanced-features.test.d.ts +1 -0
  2. package/dist/aws/cloudformation.d.ts +136 -0
  3. package/dist/aws/cloudfront.d.ts +45 -0
  4. package/dist/aws/credentials.d.ts +77 -0
  5. package/dist/aws/credentials.test.d.ts +4 -0
  6. package/dist/aws/index.d.ts +10 -0
  7. package/dist/aws/s3.d.ts +256 -0
  8. package/dist/aws/s3.test.d.ts +4 -0
  9. package/dist/aws/signature.d.ts +142 -0
  10. package/dist/aws/signature.test.d.ts +4 -0
  11. package/dist/backup/disaster-recovery.d.ts +140 -0
  12. package/dist/backup/disaster-recovery.test.d.ts +1 -0
  13. package/dist/backup/index.d.ts +8 -0
  14. package/dist/backup/manager.d.ts +172 -0
  15. package/dist/backup/manager.test.d.ts +1 -0
  16. package/dist/cicd/circleci.d.ts +50 -0
  17. package/dist/cicd/github-actions.d.ts +62 -0
  18. package/dist/cicd/gitlab-ci.d.ts +50 -0
  19. package/dist/cicd/index.d.ts +7 -0
  20. package/dist/cli/history.d.ts +137 -0
  21. package/dist/cli/index.d.ts +9 -0
  22. package/dist/cli/progress.d.ts +193 -0
  23. package/dist/cli/repl.d.ts +148 -0
  24. package/dist/cli/suggestions.d.ts +74 -0
  25. package/dist/cli/table.d.ts +73 -0
  26. package/dist/cli/table.test.d.ts +1 -0
  27. package/dist/cloudformation/builder.d.ts +93 -0
  28. package/dist/cloudformation/builder.test.d.ts +4 -0
  29. package/dist/cloudformation/builders/api-gateway.d.ts +30 -0
  30. package/dist/cloudformation/builders/cache.d.ts +35 -0
  31. package/dist/cloudformation/builders/cdn.d.ts +34 -0
  32. package/dist/cloudformation/builders/compute.d.ts +68 -0
  33. package/dist/cloudformation/builders/database.d.ts +61 -0
  34. package/dist/cloudformation/builders/functions.d.ts +32 -0
  35. package/dist/cloudformation/builders/messaging.d.ts +17 -0
  36. package/dist/cloudformation/builders/monitoring.d.ts +39 -0
  37. package/dist/cloudformation/builders/network.d.ts +14 -0
  38. package/dist/cloudformation/builders/queue.d.ts +16 -0
  39. package/dist/cloudformation/builders/security.d.ts +31 -0
  40. package/dist/cloudformation/builders/storage.d.ts +36 -0
  41. package/dist/cloudformation/index.d.ts +10 -0
  42. package/dist/cloudformation/types.d.ts +200 -0
  43. package/dist/compliance/aws-config.d.ts +175 -0
  44. package/dist/compliance/cloudtrail.d.ts +132 -0
  45. package/dist/compliance/compliance.test.d.ts +1 -0
  46. package/dist/compliance/guardduty.d.ts +176 -0
  47. package/dist/compliance/index.d.ts +12 -0
  48. package/dist/compliance/security-hub.d.ts +178 -0
  49. package/dist/containers/build-optimization.d.ts +155 -0
  50. package/dist/containers/containers.test.d.ts +1 -0
  51. package/dist/containers/image-scanning.d.ts +144 -0
  52. package/dist/containers/index.d.ts +8 -0
  53. package/dist/containers/registry.d.ts +129 -0
  54. package/dist/containers/service-mesh.d.ts +254 -0
  55. package/dist/database/database.test.d.ts +1 -0
  56. package/dist/database/index.d.ts +8 -0
  57. package/dist/database/migrations.d.ts +153 -0
  58. package/dist/database/performance.d.ts +219 -0
  59. package/dist/database/replicas.d.ts +218 -0
  60. package/dist/database/users.d.ts +165 -0
  61. package/dist/dependency-graph.d.ts +37 -0
  62. package/dist/deployment/ab-testing.d.ts +165 -0
  63. package/dist/deployment/blue-green.d.ts +140 -0
  64. package/dist/deployment/canary.d.ts +165 -0
  65. package/dist/deployment/deployment.test.d.ts +1 -0
  66. package/dist/deployment/index.d.ts +12 -0
  67. package/dist/deployment/progressive.d.ts +50 -0
  68. package/dist/dns/dns.test.d.ts +1 -0
  69. package/dist/dns/dnssec.d.ts +120 -0
  70. package/dist/dns/index.d.ts +7 -0
  71. package/dist/dns/resolver.d.ts +216 -0
  72. package/dist/dns/routing.d.ts +277 -0
  73. package/dist/email/advanced/analytics.d.ts +107 -0
  74. package/dist/email/advanced/index.d.ts +10 -0
  75. package/dist/email/advanced/rules.d.ts +131 -0
  76. package/dist/email/advanced/scheduling.d.ts +81 -0
  77. package/dist/email/advanced/search.d.ts +91 -0
  78. package/dist/email/advanced/shared-mailboxes.d.ts +109 -0
  79. package/dist/email/advanced/templates.d.ts +95 -0
  80. package/dist/email/advanced/threading.d.ts +65 -0
  81. package/dist/email/analytics.d.ts +189 -0
  82. package/dist/email/bounce-handling.d.ts +171 -0
  83. package/dist/email/email.test.d.ts +1 -0
  84. package/dist/email/handlers/__tests__/inbound.test.d.ts +1 -0
  85. package/dist/email/handlers/__tests__/outbound.test.d.ts +1 -0
  86. package/dist/email/handlers/converter.d.ts +11 -0
  87. package/dist/email/handlers/feedback.d.ts +11 -0
  88. package/dist/email/handlers/inbound.d.ts +13 -0
  89. package/dist/email/handlers/outbound.d.ts +13 -0
  90. package/dist/email/index.d.ts +10 -0
  91. package/dist/email/reputation.d.ts +133 -0
  92. package/dist/email/templates.d.ts +124 -0
  93. package/dist/errors/index.d.ts +177 -0
  94. package/dist/errors/index.test.d.ts +4 -0
  95. package/dist/health-checks/index.d.ts +35 -0
  96. package/dist/index.d.ts +15 -256
  97. package/dist/index.js +228 -80
  98. package/dist/intrinsic-functions.d.ts +77 -0
  99. package/dist/lambda/concurrency.d.ts +146 -0
  100. package/dist/lambda/destinations.d.ts +141 -0
  101. package/dist/lambda/dlq.d.ts +160 -0
  102. package/dist/lambda/index.d.ts +10 -0
  103. package/dist/lambda/lambda.test.d.ts +1 -0
  104. package/dist/lambda/layers.d.ts +117 -0
  105. package/dist/lambda/versions.d.ts +145 -0
  106. package/dist/lambda/vpc.d.ts +164 -0
  107. package/dist/local/config.d.ts +44 -0
  108. package/dist/local/index.d.ts +5 -0
  109. package/dist/local/mock-aws.d.ts +69 -0
  110. package/dist/modules/ai.d.ts +108 -0
  111. package/dist/modules/api.d.ts +157 -0
  112. package/dist/modules/auth.d.ts +262 -0
  113. package/dist/modules/cache.d.ts +108 -0
  114. package/dist/modules/cdn.d.ts +305 -0
  115. package/dist/modules/communication.d.ts +117 -0
  116. package/dist/modules/compute.d.ts +1376 -0
  117. package/dist/modules/database.d.ts +144 -0
  118. package/dist/modules/deployment.d.ts +372 -0
  119. package/dist/modules/dns.d.ts +143 -0
  120. package/dist/modules/email.d.ts +314 -0
  121. package/dist/modules/filesystem.d.ts +132 -0
  122. package/dist/modules/index.d.ts +31 -0
  123. package/dist/modules/messaging.d.ts +210 -0
  124. package/dist/modules/monitoring.d.ts +574 -0
  125. package/dist/modules/network.d.ts +148 -0
  126. package/dist/modules/parameter-store.d.ts +143 -0
  127. package/dist/modules/permissions.d.ts +245 -0
  128. package/dist/modules/phone.d.ts +125 -0
  129. package/dist/modules/queue.d.ts +411 -0
  130. package/dist/modules/redirects.d.ts +140 -0
  131. package/dist/modules/registry.d.ts +189 -0
  132. package/dist/modules/search.d.ts +135 -0
  133. package/dist/modules/secrets.d.ts +149 -0
  134. package/dist/modules/security.d.ts +219 -0
  135. package/dist/modules/sms.d.ts +130 -0
  136. package/dist/modules/storage.d.ts +344 -0
  137. package/dist/modules/workflow.d.ts +288 -0
  138. package/dist/multi-account/config.d.ts +166 -0
  139. package/dist/multi-account/index.d.ts +6 -0
  140. package/dist/multi-account/manager.d.ts +181 -0
  141. package/dist/multi-region/cross-region.d.ts +204 -0
  142. package/dist/multi-region/index.d.ts +7 -0
  143. package/dist/multi-region/manager.d.ts +136 -0
  144. package/dist/multi-region/regions.d.ts +98 -0
  145. package/dist/network-security/index.d.ts +55 -0
  146. package/dist/observability/index.d.ts +8 -0
  147. package/dist/observability/logs.d.ts +213 -0
  148. package/dist/observability/metrics.d.ts +187 -0
  149. package/dist/observability/observability.test.d.ts +1 -0
  150. package/dist/observability/synthetics.d.ts +189 -0
  151. package/dist/observability/xray.d.ts +193 -0
  152. package/dist/phone/advanced/analytics.d.ts +83 -0
  153. package/dist/phone/advanced/callbacks.d.ts +67 -0
  154. package/dist/phone/advanced/index.d.ts +7 -0
  155. package/dist/phone/advanced/ivr-builder.d.ts +130 -0
  156. package/dist/phone/advanced/recording.d.ts +62 -0
  157. package/dist/phone/handlers/__tests__/incoming-call.test.d.ts +1 -0
  158. package/dist/phone/handlers/incoming-call.d.ts +10 -0
  159. package/dist/phone/handlers/missed-call.d.ts +9 -0
  160. package/dist/phone/handlers/voicemail.d.ts +10 -0
  161. package/dist/phone/index.d.ts +5 -0
  162. package/dist/presets/api-backend.d.ts +11 -0
  163. package/dist/presets/data-pipeline.d.ts +11 -0
  164. package/dist/presets/extend.d.ts +194 -0
  165. package/dist/presets/extend.test.d.ts +4 -0
  166. package/dist/presets/fullstack-app.d.ts +12 -0
  167. package/dist/presets/index.d.ts +13 -0
  168. package/dist/presets/jamstack.d.ts +12 -0
  169. package/dist/presets/microservices.d.ts +18 -0
  170. package/dist/presets/ml-api.d.ts +13 -0
  171. package/dist/presets/nodejs-server.d.ts +14 -0
  172. package/dist/presets/nodejs-serverless.d.ts +14 -0
  173. package/dist/presets/realtime-app.d.ts +11 -0
  174. package/dist/presets/static-site.d.ts +12 -0
  175. package/dist/presets/traditional-web-app.d.ts +16 -0
  176. package/dist/presets/wordpress.d.ts +12 -0
  177. package/dist/preview/github.d.ts +32 -0
  178. package/dist/preview/github.test.d.ts +1 -0
  179. package/dist/preview/index.d.ts +10 -0
  180. package/dist/preview/manager.d.ts +101 -0
  181. package/dist/preview/manager.test.d.ts +1 -0
  182. package/dist/preview/notifications.d.ts +89 -0
  183. package/dist/preview/notifications.test.d.ts +1 -0
  184. package/dist/queue/batch-processing.d.ts +138 -0
  185. package/dist/queue/dlq-monitoring.d.ts +143 -0
  186. package/dist/queue/fifo.d.ts +131 -0
  187. package/dist/queue/index.d.ts +8 -0
  188. package/dist/queue/management.d.ts +162 -0
  189. package/dist/queue/queue.test.d.ts +1 -0
  190. package/dist/resource-mgmt/index.d.ts +44 -0
  191. package/dist/resource-naming.d.ts +26 -0
  192. package/dist/s3/index.d.ts +227 -0
  193. package/dist/schema/index.d.ts +12 -0
  194. package/dist/security/certificate-manager.d.ts +184 -0
  195. package/dist/security/index.d.ts +8 -0
  196. package/dist/security/scanning.d.ts +196 -0
  197. package/dist/security/secrets-manager.d.ts +204 -0
  198. package/dist/security/secrets-rotation.d.ts +167 -0
  199. package/dist/security/security.test.d.ts +1 -0
  200. package/dist/sms/advanced/ab-testing.d.ts +74 -0
  201. package/dist/sms/advanced/analytics.d.ts +75 -0
  202. package/dist/sms/advanced/campaigns.d.ts +96 -0
  203. package/dist/sms/advanced/chatbot.d.ts +67 -0
  204. package/dist/sms/advanced/index.d.ts +9 -0
  205. package/dist/sms/advanced/link-tracking.d.ts +60 -0
  206. package/dist/sms/advanced/mms.d.ts +60 -0
  207. package/dist/sms/handlers/__tests__/send.test.d.ts +1 -0
  208. package/dist/sms/handlers/delivery-status.d.ts +10 -0
  209. package/dist/sms/handlers/receive.d.ts +10 -0
  210. package/dist/sms/handlers/send.d.ts +10 -0
  211. package/dist/sms/index.d.ts +5 -0
  212. package/dist/stack-diff.d.ts +38 -0
  213. package/dist/static-site/index.d.ts +49 -0
  214. package/dist/template-builder.d.ts +42 -0
  215. package/dist/template-validator.d.ts +28 -0
  216. package/dist/types.d.ts +2514 -0
  217. package/dist/utils/cache.d.ts +117 -0
  218. package/dist/utils/diff.d.ts +52 -0
  219. package/dist/utils/hash.d.ts +73 -0
  220. package/dist/utils/index.d.ts +7 -0
  221. package/dist/utils/parallel.d.ts +78 -0
  222. package/dist/validators/credentials.d.ts +30 -0
  223. package/dist/validators/credentials.test.d.ts +4 -0
  224. package/dist/validators/quotas.d.ts +64 -0
  225. package/dist/validators/quotas.test.d.ts +4 -0
  226. package/package.json +2 -2
@@ -0,0 +1,124 @@
1
+ /**
2
+ * SES Email Template Management
3
+ * Template versioning, personalization, and testing
4
+ */
5
+ export interface EmailTemplate {
6
+ id: string;
7
+ name: string;
8
+ subject: string;
9
+ htmlPart: string;
10
+ textPart: string;
11
+ variables: string[];
12
+ createdAt: Date;
13
+ updatedAt: Date;
14
+ version: number;
15
+ }
16
+ export interface TemplateVersion {
17
+ id: string;
18
+ templateId: string;
19
+ version: number;
20
+ subject: string;
21
+ htmlPart: string;
22
+ textPart: string;
23
+ createdAt: Date;
24
+ createdBy: string;
25
+ changelog?: string;
26
+ }
27
+ export interface TemplateTest {
28
+ id: string;
29
+ templateId: string;
30
+ testData: Record<string, any>;
31
+ renderedSubject: string;
32
+ renderedHtml: string;
33
+ renderedText: string;
34
+ timestamp: Date;
35
+ }
36
+ /**
37
+ * Email template manager
38
+ */
39
+ export declare class EmailTemplateManager {
40
+ private templates;
41
+ private versions;
42
+ private tests;
43
+ private templateCounter;
44
+ private testCounter;
45
+ /**
46
+ * Create template
47
+ */
48
+ createTemplate(template: {
49
+ name: string;
50
+ subject: string;
51
+ htmlPart: string;
52
+ textPart: string;
53
+ }): EmailTemplate;
54
+ /**
55
+ * Create welcome email template
56
+ */
57
+ createWelcomeTemplate(options: {
58
+ name: string;
59
+ companyName: string;
60
+ }): EmailTemplate;
61
+ /**
62
+ * Create password reset template
63
+ */
64
+ createPasswordResetTemplate(options: {
65
+ name: string;
66
+ companyName: string;
67
+ }): EmailTemplate;
68
+ /**
69
+ * Update template
70
+ */
71
+ updateTemplate(templateId: string, updates: {
72
+ subject?: string;
73
+ htmlPart?: string;
74
+ textPart?: string;
75
+ }, changelog?: string): EmailTemplate;
76
+ /**
77
+ * Add template version
78
+ */
79
+ private addVersion;
80
+ /**
81
+ * Extract variables from template
82
+ */
83
+ private extractVariables;
84
+ /**
85
+ * Render template
86
+ */
87
+ renderTemplate(templateId: string, data: Record<string, any>): {
88
+ subject: string;
89
+ html: string;
90
+ text: string;
91
+ };
92
+ /**
93
+ * Test template
94
+ */
95
+ testTemplate(templateId: string, testData: Record<string, any>): TemplateTest;
96
+ /**
97
+ * Get template
98
+ */
99
+ getTemplate(id: string): EmailTemplate | undefined;
100
+ /**
101
+ * List templates
102
+ */
103
+ listTemplates(): EmailTemplate[];
104
+ /**
105
+ * Get template versions
106
+ */
107
+ getTemplateVersions(templateId: string): TemplateVersion[];
108
+ /**
109
+ * Revert to version
110
+ */
111
+ revertToVersion(templateId: string, versionNumber: number): EmailTemplate;
112
+ /**
113
+ * Generate CloudFormation for SES template
114
+ */
115
+ generateTemplateCF(template: EmailTemplate): any;
116
+ /**
117
+ * Clear all data
118
+ */
119
+ clear(): void;
120
+ }
121
+ /**
122
+ * Global email template manager instance
123
+ */
124
+ export declare const emailTemplateManager: EmailTemplateManager;
@@ -0,0 +1,177 @@
1
+ /**
2
+ * Error Handling & Debugging
3
+ * Clear error messages with solutions and debugging support
4
+ */
5
+ export declare class CloudError extends Error {
6
+ code: string;
7
+ solution?: string | undefined;
8
+ details?: Record<string, any> | undefined;
9
+ constructor(message: string, code: string, solution?: string | undefined, details?: Record<string, any> | undefined);
10
+ toString(): string;
11
+ }
12
+ /**
13
+ * Configuration errors
14
+ */
15
+ export declare class ConfigurationError extends CloudError {
16
+ constructor(message: string, solution?: string, details?: Record<string, any>);
17
+ }
18
+ /**
19
+ * AWS credential errors
20
+ */
21
+ export declare class CredentialError extends CloudError {
22
+ constructor(message: string, solution?: string, details?: Record<string, any>);
23
+ }
24
+ /**
25
+ * Deployment errors
26
+ */
27
+ export declare class DeploymentError extends CloudError {
28
+ constructor(message: string, solution?: string, details?: Record<string, any>);
29
+ }
30
+ /**
31
+ * Validation errors
32
+ */
33
+ export declare class ValidationError extends CloudError {
34
+ constructor(message: string, solution?: string, details?: Record<string, any>);
35
+ }
36
+ /**
37
+ * AWS API errors
38
+ */
39
+ export declare class AWSAPIError extends CloudError {
40
+ statusCode?: number | undefined;
41
+ constructor(message: string, statusCode?: number | undefined, solution?: string, details?: Record<string, any>);
42
+ }
43
+ /**
44
+ * Common error scenarios with solutions
45
+ */
46
+ export declare const ErrorCodes: {
47
+ readonly NO_CREDENTIALS: {
48
+ readonly message: "AWS credentials not found";
49
+ readonly solution: "Configure AWS credentials using one of these methods:\n 1. Set environment variables: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY\n 2. Create ~/.aws/credentials file with your credentials\n 3. Use an IAM role (for EC2 instances)\n 4. Run 'aws configure' if you have AWS CLI installed";
50
+ };
51
+ readonly INVALID_CREDENTIALS: {
52
+ readonly message: "AWS credentials are invalid";
53
+ readonly solution: "Verify your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are correct. Run: aws sts get-caller-identity";
54
+ };
55
+ readonly EXPIRED_CREDENTIALS: {
56
+ readonly message: "AWS credentials have expired";
57
+ readonly solution: "Refresh your AWS credentials. If using temporary credentials, generate new ones.";
58
+ };
59
+ readonly MISSING_CONFIG: {
60
+ readonly message: "Configuration file not found";
61
+ readonly solution: "Create a cloud.config.ts file in your project root. Use: cloud init";
62
+ };
63
+ readonly INVALID_CONFIG: {
64
+ readonly message: "Configuration is invalid";
65
+ readonly solution: "Check your cloud.config.ts file for syntax errors. Use: cloud config:validate";
66
+ };
67
+ readonly MISSING_REQUIRED_FIELD: {
68
+ readonly message: "Required configuration field is missing";
69
+ readonly solution: "Add the missing field to your cloud.config.ts file";
70
+ };
71
+ readonly INVALID_REGION: {
72
+ readonly message: "AWS region is invalid";
73
+ readonly solution: "Use a valid AWS region like us-east-1, us-west-2, eu-west-1, etc.";
74
+ };
75
+ readonly STACK_ALREADY_EXISTS: {
76
+ readonly message: "CloudFormation stack already exists";
77
+ readonly solution: "Use: cloud deploy --update to update the existing stack, or cloud destroy to delete it first";
78
+ };
79
+ readonly STACK_IN_PROGRESS: {
80
+ readonly message: "Stack operation already in progress";
81
+ readonly solution: "Wait for the current operation to complete, or cancel it in the AWS Console";
82
+ };
83
+ readonly INSUFFICIENT_PERMISSIONS: {
84
+ readonly message: "Insufficient IAM permissions";
85
+ readonly solution: "Ensure your IAM user/role has the necessary permissions for CloudFormation and the resources you're deploying";
86
+ };
87
+ readonly RESOURCE_LIMIT_EXCEEDED: {
88
+ readonly message: "AWS service limit exceeded";
89
+ readonly solution: "Request a service limit increase in the AWS Console, or clean up unused resources";
90
+ };
91
+ readonly ROLLBACK_COMPLETE: {
92
+ readonly message: "Stack creation failed and rolled back";
93
+ readonly solution: "Check the CloudFormation events to see which resource failed. Fix the issue and try again.";
94
+ };
95
+ readonly CIRCULAR_DEPENDENCY: {
96
+ readonly message: "Circular dependency detected in resources";
97
+ readonly solution: "Review your resource dependencies and remove the circular reference";
98
+ };
99
+ readonly INVALID_RESOURCE_NAME: {
100
+ readonly message: "Resource name contains invalid characters";
101
+ readonly solution: "Use only alphanumeric characters and hyphens in resource names";
102
+ };
103
+ readonly DUPLICATE_RESOURCE: {
104
+ readonly message: "Duplicate resource name detected";
105
+ readonly solution: "Ensure all resource names are unique in your configuration";
106
+ };
107
+ readonly VPC_CIDR_CONFLICT: {
108
+ readonly message: "VPC CIDR block conflicts with existing VPC";
109
+ readonly solution: "Use a different CIDR block that doesn't overlap with existing VPCs";
110
+ };
111
+ readonly SUBNET_CIDR_INVALID: {
112
+ readonly message: "Subnet CIDR block is invalid or outside VPC range";
113
+ readonly solution: "Ensure subnet CIDR is within the VPC CIDR range and properly sized";
114
+ };
115
+ readonly DB_INSTANCE_LIMIT: {
116
+ readonly message: "RDS instance limit reached";
117
+ readonly solution: "Delete unused RDS instances or request a limit increase";
118
+ };
119
+ readonly INVALID_DB_NAME: {
120
+ readonly message: "Database name contains invalid characters";
121
+ readonly solution: "Use only alphanumeric characters and underscores, starting with a letter";
122
+ };
123
+ readonly BUCKET_ALREADY_EXISTS: {
124
+ readonly message: "S3 bucket name already exists globally";
125
+ readonly solution: "S3 bucket names must be globally unique. Try a different name with your organization prefix";
126
+ };
127
+ readonly INVALID_BUCKET_NAME: {
128
+ readonly message: "S3 bucket name is invalid";
129
+ readonly solution: "Use lowercase letters, numbers, and hyphens. Must start/end with letter/number. 3-63 characters.";
130
+ };
131
+ readonly TEMPLATE_TOO_LARGE: {
132
+ readonly message: "CloudFormation template exceeds size limit";
133
+ readonly solution: "Split your infrastructure into multiple stacks or use nested stacks";
134
+ };
135
+ readonly INVALID_TEMPLATE: {
136
+ readonly message: "CloudFormation template is invalid";
137
+ readonly solution: "Validate your template with: cloud config:validate";
138
+ };
139
+ readonly PARAMETER_NOT_FOUND: {
140
+ readonly message: "CloudFormation parameter not found";
141
+ readonly solution: "Check that all referenced parameters are defined in your template";
142
+ };
143
+ };
144
+ /**
145
+ * Get error details by code
146
+ */
147
+ export declare function getErrorDetails(code: keyof typeof ErrorCodes): {
148
+ message: string;
149
+ solution: string;
150
+ };
151
+ /**
152
+ * Create error from code
153
+ */
154
+ export declare function createError(code: keyof typeof ErrorCodes, additionalDetails?: Record<string, any>): CloudError;
155
+ /**
156
+ * Debug logger
157
+ */
158
+ export declare class DebugLogger {
159
+ private static verboseMode;
160
+ private static debugMode;
161
+ static setVerbose(enabled: boolean): void;
162
+ static setDebug(enabled: boolean): void;
163
+ static verbose(message: string, ...args: any[]): void;
164
+ static debug(message: string, ...args: any[]): void;
165
+ static info(message: string, ...args: any[]): void;
166
+ static warn(message: string, ...args: any[]): void;
167
+ static error(message: string, error?: Error): void;
168
+ static success(message: string): void;
169
+ }
170
+ /**
171
+ * Validate configuration
172
+ */
173
+ export declare function validateConfiguration(config: any): void;
174
+ /**
175
+ * Detect common misconfigurations
176
+ */
177
+ export declare function detectMisconfigurations(config: any): string[];
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Error Handling Tests
3
+ */
4
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Health Checks & Monitoring - Endpoint monitoring, synthetic monitoring, uptime tracking
3
+ */
4
+ export interface HealthCheck {
5
+ id: string;
6
+ url: string;
7
+ interval: number;
8
+ timeout: number;
9
+ status: 'healthy' | 'unhealthy';
10
+ }
11
+ export interface SyntheticMonitor {
12
+ id: string;
13
+ name: string;
14
+ script: string;
15
+ frequency: number;
16
+ locations: string[];
17
+ }
18
+ export interface UptimeTracker {
19
+ id: string;
20
+ resource: string;
21
+ uptime: number;
22
+ downtime: number;
23
+ availability: number;
24
+ }
25
+ export declare class HealthCheckManager {
26
+ private checks;
27
+ private synthetics;
28
+ private uptimeTrackers;
29
+ private counter;
30
+ createHealthCheck(url: string, interval?: number, timeout?: number): HealthCheck;
31
+ createSyntheticMonitor(name: string, script: string, frequency: number, locations: string[]): SyntheticMonitor;
32
+ trackUptime(resource: string, uptime: number, downtime: number): UptimeTracker;
33
+ clear(): void;
34
+ }
35
+ export declare const healthCheckManager: HealthCheckManager;
package/dist/index.d.ts CHANGED
@@ -1,34 +1,16 @@
1
1
  /**
2
2
  * ts-cloud Core - CloudFormation Generator Engine
3
3
  */
4
- // Core types
5
4
  export * from './types';
6
- // Legacy exports (Phase 1)
7
5
  export * from './template-builder';
8
- // template-validator exports ValidationResult and ValidationError (interface)
9
- // We prefer ValidationError (class) from errors, so exclude it here
10
- export {
11
- validateTemplate,
12
- validateTemplateSize,
13
- validateResourceLimits,
14
- // ValidationResult is also exported here - we'll keep it from template-validator
15
- type ValidationResult,
16
- } from './template-validator';
17
- // intrinsic-functions exports Fn and Pseudo
18
- // We prefer Fn from cloudformation/types, so only export Pseudo here
6
+ export { validateTemplate, validateTemplateSize, validateResourceLimits, type ValidationResult, } from './template-validator';
19
7
  export { Pseudo } from './intrinsic-functions';
20
8
  export * from './resource-naming';
21
9
  export * from './dependency-graph';
22
10
  export * from './stack-diff';
23
- // modules re-exports many things including Cache (ElastiCache module)
24
- // We prefer this Cache over utils/cache, so export all from modules
25
- // But modules also exports: PolicyStatement, LifecycleRule, MetricTransformation
26
11
  export * from './modules';
27
- // CloudFormation builder (Phase 5)
28
12
  export * from './cloudformation/builder';
29
- // cloudformation/types exports Fn (which we prefer over intrinsic-functions)
30
13
  export * from './cloudformation/types';
31
- // Configuration presets (Phase 4)
32
14
  export * from './presets/static-site';
33
15
  export * from './presets/nodejs-server';
34
16
  export * from './presets/nodejs-serverless';
@@ -42,286 +24,63 @@ export * from './presets/data-pipeline';
42
24
  export * from './presets/ml-api';
43
25
  export * from './presets/traditional-web-app';
44
26
  export * from './presets/extend';
45
- // AWS clients (Phase 5)
46
27
  export * from './aws/signature';
47
28
  export * from './aws/credentials';
48
29
  export * from './aws/cloudformation';
49
- export {
50
- S3Client,
51
- S3Error,
52
- createS3Client,
53
- type S3ClientOptions,
54
- type GetObjectOptions,
55
- type PutObjectOptions,
56
- type ListObjectsOptions,
57
- type ListObjectsResult,
58
- type S3Object,
59
- type HeadObjectResult,
60
- type CopyObjectOptions,
61
- type MultipartUploadOptions,
62
- type MultipartProgress,
63
- type PresignedUrlOptions as S3PresignedUrlOptions,
64
- } from './aws/s3';
30
+ export { S3Client, S3Error, createS3Client, type S3ClientOptions, type GetObjectOptions, type PutObjectOptions, type ListObjectsOptions, type ListObjectsResult, type S3Object, type HeadObjectResult, type CopyObjectOptions, type MultipartUploadOptions, type MultipartProgress, type PresignedUrlOptions as S3PresignedUrlOptions, } from './aws/s3';
65
31
  export * from './aws/cloudfront';
66
- // Error handling (Phase 6)
67
- // errors exports ValidationError (class) which we prefer
68
32
  export * from './errors';
69
- // Validators (Phase 6)
70
33
  export * from './validators/credentials';
71
34
  export * from './validators/quotas';
72
- // Utilities (Phase 6)
73
- // utils exports Cache (in-memory utility), but we prefer Cache from modules (ElastiCache)
74
- // So we need to exclude Cache from utils
75
- export {
76
- FileCache,
77
- TemplateCache,
78
- templateCache,
79
- type CacheOptions,
80
- type CacheEntry,
81
- } from './utils/cache';
35
+ export { FileCache, TemplateCache, templateCache, type CacheOptions, type CacheEntry, } from './utils/cache';
82
36
  export * from './utils/hash';
83
37
  export * from './utils/parallel';
84
38
  export * from './utils/diff';
85
- // Schema (Phase 6.5)
86
39
  export * from './schema';
87
- // Local development (Phase 6.6)
88
40
  export * from './local/config';
89
41
  export * from './local/mock-aws';
90
- // Preview environments (Phase 6.7)
91
42
  export * from './preview';
92
- // Advanced CLI utilities (Phase 6.8)
93
43
  export * from './cli';
94
- // Multi-region support (Phase 7.1)
95
44
  export * from './multi-region';
96
- // Multi-account support (Phase 7.2)
97
45
  export * from './multi-account';
98
- // CI/CD integration (Phase 7.3)
99
46
  export * from './cicd';
100
- // Backup & Disaster Recovery (Phase 7.4)
101
47
  export * from './backup';
102
- // Compliance & Governance (Phase 7.5)
103
48
  export * from './compliance';
104
- // Advanced Deployment Strategies (Phase 7.6)
105
- // deployment exports: RoutingConfig, CustomMetric, ABTest from its submodules
106
- // These conflict with lambda and observability, so we use explicit exports
107
- export {
108
- BlueGreenManager,
109
- blueGreenManager,
110
- type BlueGreenDeployment,
111
- type Environment,
112
- type RoutingConfig as DeploymentRoutingConfig,
113
- type HealthCheckConfig,
114
- type DeploymentResult,
115
- } from './deployment/blue-green';
116
- export {
117
- CanaryManager,
118
- canaryManager,
119
- type CanaryDeployment,
120
- type DeploymentVersion,
121
- type CanaryStage,
122
- type AlarmThresholds,
123
- type CustomMetric as DeploymentCustomMetric,
124
- type CanaryMetrics,
125
- type CanaryResult,
126
- } from './deployment/canary';
127
- export {
128
- ABTestManager,
129
- abTestManager,
130
- type ABTest as DeploymentABTest,
131
- type ABVariant,
132
- type RoutingStrategy,
133
- type ABMetrics,
134
- type VariantMetrics,
135
- type ABTestResult,
136
- } from './deployment/ab-testing';
137
- export {
138
- ProgressiveDeploymentManager,
139
- progressiveDeploymentManager,
140
- type ProgressiveRollout,
141
- type FeatureFlag,
142
- type DeploymentGate,
143
- } from './deployment/progressive';
144
- // Observability (Phase 7.7)
145
- // observability exports CustomMetric from metrics.ts - we prefer this one
146
- // observability/logs exports MetricTransformation which conflicts with modules/monitoring
147
- // We'll use explicit exports to avoid the conflict
49
+ export { BlueGreenManager, blueGreenManager, type BlueGreenDeployment, type Environment, type RoutingConfig as DeploymentRoutingConfig, type HealthCheckConfig, type DeploymentResult, } from './deployment/blue-green';
50
+ export { CanaryManager, canaryManager, type CanaryDeployment, type DeploymentVersion, type CanaryStage, type AlarmThresholds, type CustomMetric as DeploymentCustomMetric, type CanaryMetrics, type CanaryResult, } from './deployment/canary';
51
+ export { ABTestManager, abTestManager, type ABTest as DeploymentABTest, type ABVariant, type RoutingStrategy, type ABMetrics, type VariantMetrics, type ABTestResult, } from './deployment/ab-testing';
52
+ export { ProgressiveDeploymentManager, progressiveDeploymentManager, type ProgressiveRollout, type FeatureFlag, type DeploymentGate, } from './deployment/progressive';
148
53
  export * from './observability/xray';
149
54
  export * from './observability/metrics';
150
- // observability/logs exports MetricTransformation - we rename it
151
- export {
152
- LogsManager,
153
- logsManager,
154
- type LogGroup,
155
- type LogStream,
156
- type MetricFilter,
157
- type MetricTransformation as LogMetricTransformation,
158
- type SubscriptionFilter,
159
- type LogQuery,
160
- type LogInsightsQuery,
161
- } from './observability/logs';
162
- export {
163
- SyntheticsManager,
164
- syntheticsManager,
165
- type SyntheticCanary,
166
- type CanaryCode,
167
- type CanarySchedule,
168
- type CanaryRunConfig,
169
- type VpcConfig as SyntheticsVpcConfig,
170
- type CanaryAlarm,
171
- type HeartbeatMonitor,
172
- type ApiMonitor,
173
- type ApiEndpoint,
174
- type ApiAssertion,
175
- type WorkflowStep,
176
- type WorkflowAction,
177
- } from './observability/synthetics';
178
- // Database Advanced Features (Phase 7.8)
179
- // database exports AutoScalingConfig from replicas.ts
180
- // We'll rename it to avoid conflict with lambda/concurrency
55
+ export { LogsManager, logsManager, type LogGroup, type LogStream, type MetricFilter, type MetricTransformation as LogMetricTransformation, type SubscriptionFilter, type LogQuery, type LogInsightsQuery, } from './observability/logs';
56
+ export { SyntheticsManager, syntheticsManager, type SyntheticCanary, type CanaryCode, type CanarySchedule, type CanaryRunConfig, type VpcConfig as SyntheticsVpcConfig, type CanaryAlarm, type HeartbeatMonitor, type ApiMonitor, type ApiEndpoint, type ApiAssertion, type WorkflowStep, type WorkflowAction, } from './observability/synthetics';
181
57
  export * from './database/migrations';
182
- export {
183
- ReplicaManager,
184
- replicaManager,
185
- type ReadReplica,
186
- type ReplicationGroup,
187
- type LoadBalancingStrategy,
188
- type AutoScalingConfig as DatabaseAutoScalingConfig,
189
- type RDSProxy,
190
- type SessionPinningFilter,
191
- type ProxyTarget,
192
- type ConnectionPoolConfig,
193
- } from './database/replicas';
58
+ export { ReplicaManager, replicaManager, type ReadReplica, type ReplicationGroup, type LoadBalancingStrategy, type AutoScalingConfig as DatabaseAutoScalingConfig, type RDSProxy, type SessionPinningFilter, type ProxyTarget, type ConnectionPoolConfig, } from './database/replicas';
194
59
  export * from './database/performance';
195
60
  export * from './database/users';
196
- // Secrets & Security Advanced (Phase 7.9)
197
- // security/secrets-manager exports PolicyStatement which conflicts with modules/permissions
198
- // We prefer PolicyStatement from modules, so rename security's version
199
61
  export * from './security/secrets-rotation';
200
- export {
201
- SecretsManager,
202
- secretsManager,
203
- type SecretVersion,
204
- type SecretAudit,
205
- type SecretAction,
206
- type ExternalSecretManager,
207
- type ExternalAuthConfig,
208
- type SecretReplication,
209
- type SecretPolicy,
210
- type PolicyDocument,
211
- type PolicyStatement as SecurityPolicyStatement,
212
- } from './security/secrets-manager';
62
+ export { SecretsManager, secretsManager, type SecretVersion, type SecretAudit, type SecretAction, type ExternalSecretManager, type ExternalAuthConfig, type SecretReplication, type SecretPolicy, type PolicyDocument, type PolicyStatement as SecurityPolicyStatement, } from './security/secrets-manager';
213
63
  export * from './security/certificate-manager';
214
64
  export * from './security/scanning';
215
- // Container Advanced Features (Phase 7.10)
216
- // containers/registry exports LifecyclePolicy, LifecycleRule, ReplicationRule
217
- // These conflict with s3, so we rename them
218
65
  export * from './containers/image-scanning';
219
66
  export * from './containers/build-optimization';
220
- export {
221
- ContainerRegistryManager,
222
- containerRegistryManager,
223
- type ContainerRegistry,
224
- type RegistryEncryption,
225
- type ScanningConfig,
226
- type ScanFilter,
227
- type LifecyclePolicy as ContainerLifecyclePolicy,
228
- type LifecycleRule as ContainerLifecycleRule,
229
- type ReplicationConfig,
230
- type ReplicationDestination,
231
- type ReplicationRule as ContainerReplicationRule,
232
- type RegistryCredentials,
233
- } from './containers/registry';
234
- // containers/service-mesh exports HealthCheck which conflicts with health-checks
235
- // We rename it to MeshHealthCheck
236
- export {
237
- ServiceMeshManager,
238
- serviceMeshManager,
239
- type ServiceMesh,
240
- type MeshService,
241
- type VirtualNode,
242
- type Listener,
243
- type HealthCheck as MeshHealthCheck,
244
- type Timeout,
245
- type TLSConfig,
246
- type Backend,
247
- type ClientPolicy,
248
- type ServiceDiscovery,
249
- type VirtualRouter,
250
- type RouterListener,
251
- type Route,
252
- type RouteMatch,
253
- type HeaderMatch,
254
- type RouteAction,
255
- type WeightedTarget,
256
- type RetryPolicy,
257
- type VirtualGateway,
258
- type GatewayListener,
259
- } from './containers/service-mesh';
260
- // Lambda Advanced Features (Phase 7.11)
261
- // lambda exports AutoScalingConfig from concurrency.ts and RoutingConfig from versions.ts
262
- // We'll keep the lambda versions as the primary ones
67
+ export { ContainerRegistryManager, containerRegistryManager, type ContainerRegistry, type RegistryEncryption, type ScanningConfig, type ScanFilter, type LifecyclePolicy as ContainerLifecyclePolicy, type LifecycleRule as ContainerLifecycleRule, type ReplicationConfig, type ReplicationDestination, type ReplicationRule as ContainerReplicationRule, type RegistryCredentials, } from './containers/registry';
68
+ export { ServiceMeshManager, serviceMeshManager, type ServiceMesh, type MeshService, type VirtualNode, type Listener, type HealthCheck as MeshHealthCheck, type Timeout, type TLSConfig, type Backend, type ClientPolicy, type ServiceDiscovery, type VirtualRouter, type RouterListener, type Route, type RouteMatch, type HeaderMatch, type RouteAction, type WeightedTarget, type RetryPolicy, type VirtualGateway, type GatewayListener, } from './containers/service-mesh';
263
69
  export * from './lambda/layers';
264
- // lambda/versions exports RoutingConfig which conflicts with deployment
265
- // We keep the lambda version as primary
266
70
  export * from './lambda/versions';
267
71
  export * from './lambda/concurrency';
268
72
  export * from './lambda/destinations';
269
73
  export * from './lambda/vpc';
270
74
  export * from './lambda/dlq';
271
- // DNS Advanced Features (Phase 7.12)
272
- // dns/routing exports HealthCheck which conflicts with health-checks
273
- // We rename it to DNSHealthCheck
274
- export {
275
- Route53RoutingManager,
276
- route53RoutingManager,
277
- type RoutingPolicy,
278
- type WeightedRoutingPolicy,
279
- type LatencyRoutingPolicy,
280
- type FailoverRoutingPolicy,
281
- type GeolocationRoutingPolicy,
282
- type GeoproximityRoutingPolicy,
283
- type HealthCheck as DNSHealthCheck,
284
- type CalculatedHealthCheck,
285
- type TrafficPolicy,
286
- type TrafficPolicyDocument,
287
- type TrafficPolicyEndpoint,
288
- type TrafficPolicyRule,
289
- } from './dns/routing';
75
+ export { Route53RoutingManager, route53RoutingManager, type RoutingPolicy, type WeightedRoutingPolicy, type LatencyRoutingPolicy, type FailoverRoutingPolicy, type GeolocationRoutingPolicy, type GeoproximityRoutingPolicy, type HealthCheck as DNSHealthCheck, type CalculatedHealthCheck, type TrafficPolicy, type TrafficPolicyDocument, type TrafficPolicyEndpoint, type TrafficPolicyRule, } from './dns/routing';
290
76
  export * from './dns/dnssec';
291
77
  export * from './dns/resolver';
292
- // Email Advanced Features (Phase 7.13)
293
78
  export * from './email';
294
- // Phone Advanced Features
295
79
  export * from './phone';
296
- // SMS Advanced Features
297
80
  export * from './sms';
298
- // Queue Advanced Features (Phase 7.14)
299
81
  export * from './queue';
300
- // Static Site Features (Phase 7.15)
301
82
  export * from './static-site';
302
- // S3 Advanced Features (Phase 7.16)
303
- // s3 exports LifecyclePolicy, ReplicationRule which conflict with modules and containers
304
- // We'll rename them with S3 prefix
305
- export {
306
- StorageAdvancedManager,
307
- storageAdvancedManager,
308
- type LifecyclePolicy as S3LifecyclePolicy,
309
- type VersioningConfig,
310
- type ReplicationRule as S3ReplicationRule,
311
- type IntelligentTieringConfig,
312
- type ObjectLockConfig,
313
- type TransferAccelerationConfig,
314
- type AccessPoint,
315
- type GlacierArchiveConfig,
316
- type InventoryConfig,
317
- type BatchOperation,
318
- type EventNotification,
319
- } from './s3';
320
- // Health Checks & Monitoring (Phase 7.17)
321
- // health-checks exports HealthCheck which conflicts with containers
322
- // We keep health-checks version as primary (it's more specific to health checks)
83
+ export { StorageAdvancedManager, storageAdvancedManager, type LifecyclePolicy as S3LifecyclePolicy, type VersioningConfig, type ReplicationRule as S3ReplicationRule, type IntelligentTieringConfig, type ObjectLockConfig, type TransferAccelerationConfig, type AccessPoint, type GlacierArchiveConfig, type InventoryConfig, type BatchOperation, type EventNotification, } from './s3';
323
84
  export * from './health-checks';
324
- // Network Security (Phase 7.18)
325
85
  export * from './network-security';
326
- // Resource Management (Phase 7.20)
327
86
  export * from './resource-mgmt';