@stacksjs/ts-cloud 0.1.3 → 0.1.6

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 (187) hide show
  1. package/README.md +98 -13
  2. package/dist/aws/acm.d.ts +129 -0
  3. package/dist/aws/application-autoscaling.d.ts +282 -0
  4. package/dist/aws/bedrock.d.ts +2292 -0
  5. package/dist/aws/client.d.ts +79 -0
  6. package/dist/aws/cloudformation.d.ts +105 -0
  7. package/dist/aws/cloudfront.d.ts +265 -0
  8. package/dist/aws/cloudwatch-logs.d.ts +48 -0
  9. package/dist/aws/comprehend.d.ts +505 -0
  10. package/dist/aws/connect.d.ts +377 -0
  11. package/dist/aws/deploy-imap.d.ts +14 -0
  12. package/dist/aws/dynamodb.d.ts +176 -0
  13. package/dist/aws/ec2.d.ts +272 -0
  14. package/dist/aws/ecr.d.ts +149 -0
  15. package/dist/aws/ecs.d.ts +162 -0
  16. package/dist/aws/elasticache.d.ts +71 -0
  17. package/dist/aws/elbv2.d.ts +248 -0
  18. package/dist/aws/email.d.ts +175 -0
  19. package/dist/aws/eventbridge.d.ts +142 -0
  20. package/dist/aws/iam.d.ts +638 -0
  21. package/dist/aws/imap-server.d.ts +119 -0
  22. package/{src/aws/index.ts → dist/aws/index.d.ts} +62 -83
  23. package/{src/aws/kendra.ts → dist/aws/kendra.d.ts} +71 -386
  24. package/dist/aws/lambda.d.ts +232 -0
  25. package/dist/aws/opensearch.d.ts +87 -0
  26. package/dist/aws/personalize.d.ts +516 -0
  27. package/dist/aws/polly.d.ts +214 -0
  28. package/dist/aws/rds.d.ts +240 -0
  29. package/dist/aws/rekognition.d.ts +543 -0
  30. package/dist/aws/route53-domains.d.ts +113 -0
  31. package/dist/aws/route53.d.ts +215 -0
  32. package/dist/aws/s3.d.ts +212 -0
  33. package/dist/aws/scheduler.d.ts +140 -0
  34. package/dist/aws/secrets-manager.d.ts +170 -0
  35. package/dist/aws/ses.d.ts +288 -0
  36. package/dist/aws/setup-phone.d.ts +0 -0
  37. package/dist/aws/setup-sms.d.ts +115 -0
  38. package/dist/aws/sms.d.ts +304 -0
  39. package/dist/aws/smtp-server.d.ts +61 -0
  40. package/dist/aws/sns.d.ts +117 -0
  41. package/dist/aws/sqs.d.ts +65 -0
  42. package/dist/aws/ssm.d.ts +179 -0
  43. package/dist/aws/sts.d.ts +15 -0
  44. package/dist/aws/support.d.ts +104 -0
  45. package/dist/aws/test-imap.d.ts +0 -0
  46. package/dist/aws/textract.d.ts +403 -0
  47. package/dist/aws/transcribe.d.ts +60 -0
  48. package/dist/aws/translate.d.ts +358 -0
  49. package/dist/aws/voice.d.ts +219 -0
  50. package/dist/bin/cli.js +1724 -0
  51. package/dist/config.d.ts +7 -0
  52. package/dist/deploy/index.d.ts +2 -0
  53. package/dist/deploy/static-site-external-dns.d.ts +51 -0
  54. package/dist/deploy/static-site.d.ts +71 -0
  55. package/dist/dns/cloudflare.d.ts +52 -0
  56. package/dist/dns/godaddy.d.ts +38 -0
  57. package/dist/dns/index.d.ts +45 -0
  58. package/dist/dns/porkbun.d.ts +18 -0
  59. package/dist/dns/route53-adapter.d.ts +38 -0
  60. package/{src/dns/types.ts → dist/dns/types.d.ts} +26 -63
  61. package/dist/dns/validator.d.ts +78 -0
  62. package/dist/generators/index.d.ts +1 -0
  63. package/dist/generators/infrastructure.d.ts +30 -0
  64. package/{src/index.ts → dist/index.d.ts} +70 -93
  65. package/dist/index.js +7881 -0
  66. package/dist/push/apns.d.ts +60 -0
  67. package/dist/push/fcm.d.ts +117 -0
  68. package/dist/push/index.d.ts +14 -0
  69. package/dist/security/pre-deploy-scanner.d.ts +69 -0
  70. package/dist/ssl/acme-client.d.ts +67 -0
  71. package/dist/ssl/index.d.ts +2 -0
  72. package/dist/ssl/letsencrypt.d.ts +48 -0
  73. package/dist/types.d.ts +1 -0
  74. package/dist/utils/cli.d.ts +123 -0
  75. package/dist/validation/index.d.ts +1 -0
  76. package/dist/validation/template.d.ts +23 -0
  77. package/package.json +8 -8
  78. package/bin/cli.ts +0 -133
  79. package/bin/commands/analytics.ts +0 -328
  80. package/bin/commands/api.ts +0 -379
  81. package/bin/commands/assets.ts +0 -221
  82. package/bin/commands/audit.ts +0 -501
  83. package/bin/commands/backup.ts +0 -682
  84. package/bin/commands/cache.ts +0 -294
  85. package/bin/commands/cdn.ts +0 -281
  86. package/bin/commands/config.ts +0 -202
  87. package/bin/commands/container.ts +0 -105
  88. package/bin/commands/cost.ts +0 -208
  89. package/bin/commands/database.ts +0 -401
  90. package/bin/commands/deploy.ts +0 -674
  91. package/bin/commands/domain.ts +0 -397
  92. package/bin/commands/email.ts +0 -423
  93. package/bin/commands/environment.ts +0 -285
  94. package/bin/commands/events.ts +0 -424
  95. package/bin/commands/firewall.ts +0 -145
  96. package/bin/commands/function.ts +0 -116
  97. package/bin/commands/generate.ts +0 -280
  98. package/bin/commands/git.ts +0 -139
  99. package/bin/commands/iam.ts +0 -464
  100. package/bin/commands/index.ts +0 -48
  101. package/bin/commands/init.ts +0 -120
  102. package/bin/commands/logs.ts +0 -148
  103. package/bin/commands/network.ts +0 -579
  104. package/bin/commands/notify.ts +0 -489
  105. package/bin/commands/queue.ts +0 -407
  106. package/bin/commands/scheduler.ts +0 -370
  107. package/bin/commands/secrets.ts +0 -54
  108. package/bin/commands/server.ts +0 -629
  109. package/bin/commands/shared.ts +0 -97
  110. package/bin/commands/ssl.ts +0 -138
  111. package/bin/commands/stack.ts +0 -325
  112. package/bin/commands/status.ts +0 -385
  113. package/bin/commands/storage.ts +0 -450
  114. package/bin/commands/team.ts +0 -96
  115. package/bin/commands/tunnel.ts +0 -489
  116. package/bin/commands/utils.ts +0 -202
  117. package/build.ts +0 -15
  118. package/cloud +0 -2
  119. package/src/aws/acm.ts +0 -768
  120. package/src/aws/application-autoscaling.ts +0 -845
  121. package/src/aws/bedrock.ts +0 -4074
  122. package/src/aws/client.ts +0 -878
  123. package/src/aws/cloudformation.ts +0 -896
  124. package/src/aws/cloudfront.ts +0 -1531
  125. package/src/aws/cloudwatch-logs.ts +0 -154
  126. package/src/aws/comprehend.ts +0 -839
  127. package/src/aws/connect.ts +0 -1056
  128. package/src/aws/deploy-imap.ts +0 -384
  129. package/src/aws/dynamodb.ts +0 -340
  130. package/src/aws/ec2.ts +0 -1385
  131. package/src/aws/ecr.ts +0 -621
  132. package/src/aws/ecs.ts +0 -615
  133. package/src/aws/elasticache.ts +0 -301
  134. package/src/aws/elbv2.ts +0 -942
  135. package/src/aws/email.ts +0 -928
  136. package/src/aws/eventbridge.ts +0 -248
  137. package/src/aws/iam.ts +0 -1689
  138. package/src/aws/imap-server.ts +0 -2100
  139. package/src/aws/lambda.ts +0 -786
  140. package/src/aws/opensearch.ts +0 -158
  141. package/src/aws/personalize.ts +0 -977
  142. package/src/aws/polly.ts +0 -559
  143. package/src/aws/rds.ts +0 -888
  144. package/src/aws/rekognition.ts +0 -846
  145. package/src/aws/route53-domains.ts +0 -359
  146. package/src/aws/route53.ts +0 -1046
  147. package/src/aws/s3.ts +0 -2318
  148. package/src/aws/scheduler.ts +0 -571
  149. package/src/aws/secrets-manager.ts +0 -769
  150. package/src/aws/ses.ts +0 -1081
  151. package/src/aws/setup-phone.ts +0 -104
  152. package/src/aws/setup-sms.ts +0 -580
  153. package/src/aws/sms.ts +0 -1735
  154. package/src/aws/smtp-server.ts +0 -531
  155. package/src/aws/sns.ts +0 -758
  156. package/src/aws/sqs.ts +0 -382
  157. package/src/aws/ssm.ts +0 -807
  158. package/src/aws/sts.ts +0 -92
  159. package/src/aws/support.ts +0 -391
  160. package/src/aws/test-imap.ts +0 -86
  161. package/src/aws/textract.ts +0 -780
  162. package/src/aws/transcribe.ts +0 -108
  163. package/src/aws/translate.ts +0 -641
  164. package/src/aws/voice.ts +0 -1379
  165. package/src/config.ts +0 -35
  166. package/src/deploy/index.ts +0 -7
  167. package/src/deploy/static-site-external-dns.ts +0 -906
  168. package/src/deploy/static-site.ts +0 -1125
  169. package/src/dns/godaddy.ts +0 -412
  170. package/src/dns/index.ts +0 -183
  171. package/src/dns/porkbun.ts +0 -362
  172. package/src/dns/route53-adapter.ts +0 -414
  173. package/src/dns/validator.ts +0 -369
  174. package/src/generators/index.ts +0 -5
  175. package/src/generators/infrastructure.ts +0 -1660
  176. package/src/push/apns.ts +0 -452
  177. package/src/push/fcm.ts +0 -506
  178. package/src/push/index.ts +0 -58
  179. package/src/ssl/acme-client.ts +0 -478
  180. package/src/ssl/index.ts +0 -7
  181. package/src/ssl/letsencrypt.ts +0 -747
  182. package/src/types.ts +0 -2
  183. package/src/utils/cli.ts +0 -398
  184. package/src/validation/index.ts +0 -5
  185. package/src/validation/template.ts +0 -405
  186. package/test/index.test.ts +0 -128
  187. package/tsconfig.json +0 -18
@@ -0,0 +1,60 @@
1
+ export declare interface APNsConfig {
2
+ keyId: string
3
+ teamId: string
4
+ privateKey: string
5
+ bundleId: string
6
+ production?: boolean
7
+ }
8
+ export declare interface APNsNotification {
9
+ deviceToken: string
10
+ title?: string
11
+ subtitle?: string
12
+ body?: string
13
+ badge?: number
14
+ sound?: string | { name: string; critical?: number; volume?: number }
15
+ category?: string
16
+ threadId?: string
17
+ data?: Record<string, any>
18
+ contentAvailable?: boolean
19
+ mutableContent?: boolean
20
+ pushType?: 'alert' | 'background' | 'voip' | 'complication' | 'fileprovider' | 'mdm' | 'liveactivity'
21
+ priority?: 5 | 10
22
+ expiration?: number
23
+ collapseId?: string
24
+ targetContentId?: string
25
+ }
26
+ export declare interface APNsSendResult {
27
+ success: boolean
28
+ deviceToken: string
29
+ apnsId?: string
30
+ statusCode?: number
31
+ error?: string
32
+ reason?: string
33
+ timestamp?: number
34
+ }
35
+ export declare interface APNsBatchResult {
36
+ sent: number
37
+ failed: number
38
+ results: APNsSendResult[]
39
+ }
40
+ /**
41
+ * Apple Push Notification Service client
42
+ */
43
+ export declare class APNsClient {
44
+ private config: APNsConfig;
45
+ private token: string | null;
46
+ private tokenGeneratedAt: number;
47
+ private client: http2.ClientHttp2Session | null;
48
+ private host: string;
49
+ constructor(config: APNsConfig);
50
+ private generateToken(): string;
51
+ private derToRaw(derSignature: Buffer): Buffer;
52
+ private getClient(): Promise<http2.ClientHttp2Session>;
53
+ private buildPayload(notification: APNsNotification): object;
54
+ send(notification: APNsNotification): Promise<APNsSendResult>;
55
+ sendBatch(notifications: APNsNotification[], options?: { concurrency?: number }): Promise<APNsBatchResult>;
56
+ sendSimple(deviceToken: string, title: string, body: string, data?: Record<string, any>): Promise<APNsSendResult>;
57
+ sendSilent(deviceToken: string, data?: Record<string, any>): Promise<APNsSendResult>;
58
+ close(): void;
59
+ }
60
+ export default APNsClient;
@@ -0,0 +1,117 @@
1
+ export declare interface FCMConfig {
2
+ projectId: string
3
+ clientEmail: string
4
+ privateKey: string
5
+ }
6
+ export declare interface FCMNotification {
7
+ token?: string
8
+ topic?: string
9
+ condition?: string
10
+ title?: string
11
+ body?: string
12
+ imageUrl?: string
13
+ data?: Record<string, string>
14
+ android?: {
15
+ /** Channel ID for Android O+ */
16
+ channelId?: string
17
+ /** Notification priority */
18
+ priority?: 'normal' | 'high'
19
+ /** Time to live in seconds */
20
+ ttl?: number
21
+ /** Collapse key for message deduplication */
22
+ collapseKey?: string
23
+ /** Notification icon */
24
+ icon?: string
25
+ /** Notification icon color (hex) */
26
+ color?: string
27
+ /** Sound to play */
28
+ sound?: string
29
+ /** Click action */
30
+ clickAction?: string
31
+ /** Tag for notification replacement */
32
+ tag?: string
33
+ /** Direct boot aware */
34
+ directBootOk?: boolean
35
+ /** Visibility: private, public, secret */
36
+ visibility?: 'private' | 'public' | 'secret'
37
+ /** Notification count */
38
+ notificationCount?: number
39
+ }
40
+ webpush?: {
41
+ /** Web notification options */
42
+ notification?: {
43
+ title?: string
44
+ body?: string
45
+ icon?: string
46
+ badge?: string
47
+ image?: string
48
+ requireInteraction?: boolean
49
+ silent?: boolean
50
+ tag?: string
51
+ actions?: Array<{ action: string; title: string; icon?: string }>
52
+ }
53
+ /** FCM options for web */
54
+ fcmOptions?: {
55
+ link?: string
56
+ analyticsLabel?: string
57
+ }
58
+ /** Custom headers */
59
+ headers?: Record<string, string>
60
+ /** Custom data */
61
+ data?: Record<string, string>
62
+ }
63
+ apns?: {
64
+ /** APNs headers */
65
+ headers?: Record<string, string>
66
+ /** APNs payload */
67
+ payload?: {
68
+ aps?: Record<string, any>
69
+ [key: string]: any
70
+ }
71
+ /** FCM options */
72
+ fcmOptions?: {
73
+ analyticsLabel?: string
74
+ image?: string
75
+ }
76
+ }
77
+ fcmOptions?: {
78
+ analyticsLabel?: string
79
+ }
80
+ }
81
+ export declare interface FCMSendResult {
82
+ success: boolean
83
+ messageId?: string
84
+ error?: string
85
+ errorCode?: string
86
+ }
87
+ export declare interface FCMBatchResult {
88
+ sent: number
89
+ failed: number
90
+ results: Array<FCMSendResult & { token?: string }>
91
+ }
92
+ /**
93
+ * Firebase Cloud Messaging client
94
+ */
95
+ export declare class FCMClient {
96
+ private config: FCMConfig;
97
+ private accessToken: string | null;
98
+ private tokenExpiresAt: number;
99
+ constructor(config: FCMConfig);
100
+ static fromServiceAccount(serviceAccount: {
101
+ project_id: string
102
+ client_email: string
103
+ private_key: string
104
+ }): FCMClient;
105
+ private generateJWT(): string;
106
+ private getAccessToken(): Promise<string>;
107
+ private buildMessage(notification: FCMNotification): object;
108
+ send(notification: FCMNotification): Promise<FCMSendResult>;
109
+ sendBatch(tokens: string[], notification: Omit<FCMNotification, 'token' | 'topic' | 'condition'>, options?: { concurrency?: number }): Promise<FCMBatchResult>;
110
+ sendToTopic(topic: string, notification: Omit<FCMNotification, 'token' | 'topic' | 'condition'>): Promise<FCMSendResult>;
111
+ sendToCondition(condition: string, notification: Omit<FCMNotification, 'token' | 'topic' | 'condition'>): Promise<FCMSendResult>;
112
+ sendSimple(token: string, title: string, body: string, data?: Record<string, string>): Promise<FCMSendResult>;
113
+ sendSilent(token: string, data: Record<string, string>): Promise<FCMSendResult>;
114
+ subscribeToTopic(tokens: string[], topic: string): Promise<{ success: boolean; error?: string }>;
115
+ unsubscribeFromTopic(tokens: string[], topic: string): Promise<{ success: boolean; error?: string }>;
116
+ }
117
+ export default FCMClient;
@@ -0,0 +1,14 @@
1
+ export type {
2
+ APNsConfig,
3
+ APNsNotification,
4
+ APNsSendResult,
5
+ APNsBatchResult,
6
+ } from './apns';
7
+ export type {
8
+ FCMConfig,
9
+ FCMNotification,
10
+ FCMSendResult,
11
+ FCMBatchResult,
12
+ } from './fcm';
13
+ export * from './apns';
14
+ export * from './fcm';
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Convenience function to scan a directory
3
+ */
4
+ export declare function scanForSecrets(options: ScanOptions): Promise<ScanResult>;
5
+ /**
6
+ * Format scan results for CLI output
7
+ */
8
+ export declare function formatScanResults(result: ScanResult): string;
9
+ /**
10
+ * Common secret patterns to detect
11
+ */
12
+ export declare const SECRET_PATTERNS: SecretPattern[];
13
+ export declare interface SecretPattern {
14
+ name: string
15
+ pattern: RegExp
16
+ severity: 'critical' | 'high' | 'medium' | 'low'
17
+ description: string
18
+ }
19
+ export declare interface SecurityFinding {
20
+ file: string
21
+ line: number
22
+ column: number
23
+ match: string
24
+ pattern: SecretPattern
25
+ context: string
26
+ }
27
+ export declare interface ScanResult {
28
+ passed: boolean
29
+ findings: SecurityFinding[]
30
+ scannedFiles: number
31
+ duration: number
32
+ summary: {
33
+ critical: number
34
+ high: number
35
+ medium: number
36
+ low: number
37
+ }
38
+ }
39
+ export declare interface ScanOptions {
40
+ directory: string
41
+ exclude?: string[]
42
+ include?: string[]
43
+ skipPatterns?: string[]
44
+ maxFileSize?: number
45
+ failOnSeverity?: 'critical' | 'high' | 'medium' | 'low'
46
+ }
47
+ /**
48
+ * Pre-deployment security scanner
49
+ */
50
+ export declare class PreDeployScanner {
51
+ private patterns: SecretPattern[];
52
+ private excludeDirs: string[];
53
+ private excludeFiles: string[];
54
+ private maxFileSize: number;
55
+ constructor(options?: {
56
+ customPatterns?: SecretPattern[]
57
+ excludeDirs?: string[]
58
+ excludeFiles?: string[]
59
+ maxFileSize?: number
60
+ });
61
+ scan(options: ScanOptions): Promise<ScanResult>;
62
+ private scanContent(content: string, filePath: string, skipPatterns: string[]): SecurityFinding[];
63
+ private isLikelyPlaceholder(match: string, context: string): boolean;
64
+ private maskSecret(value: string): string;
65
+ private getFilesToScan(dir: string, excludeDirs: string[], includeExtensions?: string[]): string[];
66
+ private shouldExcludeFile(filePath: string): boolean;
67
+ addPattern(pattern: SecretPattern): void;
68
+ getPatterns(): SecretPattern[];
69
+ }
@@ -0,0 +1,67 @@
1
+ // ACME Directory URLs
2
+ export declare const ACME_DIRECTORIES: {
3
+ production: 'https://acme-v02.api.letsencrypt.org/directory';
4
+ staging: 'https://acme-staging-v02.api.letsencrypt.org/directory'
5
+ };
6
+ export declare interface AcmeClientOptions {
7
+ staging?: boolean
8
+ email: string
9
+ accountKey?: string
10
+ }
11
+ export declare interface AcmeChallenge {
12
+ type: 'http-01' | 'dns-01'
13
+ token: string
14
+ keyAuthorization: string
15
+ identifier: string
16
+ dnsValue?: string
17
+ }
18
+ export declare interface AcmeCertificate {
19
+ certificate: string
20
+ privateKey: string
21
+ chain: string
22
+ fullchain: string
23
+ expiresAt: Date
24
+ }
25
+ declare interface AcmeDirectory {
26
+ newNonce: string
27
+ newAccount: string
28
+ newOrder: string
29
+ revokeCert: string
30
+ keyChange: string
31
+ }
32
+ /**
33
+ * ACME Client for Let's Encrypt certificate management
34
+ */
35
+ export declare class AcmeClient {
36
+ private directoryUrl: string;
37
+ private email: string;
38
+ private accountKey: string;
39
+ private accountUrl: string | null;
40
+ private directory: AcmeDirectory | null;
41
+ private nonce: string | null;
42
+ constructor(options: AcmeClientOptions);
43
+ private generateAccountKey(): string;
44
+ private getDirectory(): Promise<AcmeDirectory>;
45
+ private getNonce(): Promise<string>;
46
+ private getJwk(): Record<string, string>;
47
+ private getJwkThumbprint(): string;
48
+ private base64UrlEncode(data: Buffer | string): string;
49
+ private signPayload(url: string, payload: any): Promise<string>;
50
+ private acmeRequest(url: string, payload: any): Promise<{ body: any; headers: Headers }>;
51
+ registerAccount(): Promise<string>;
52
+ createOrder(domains: string[]): Promise<{
53
+ orderUrl: string
54
+ authorizations: string[]
55
+ finalize: string
56
+ }>;
57
+ getAuthorization(authUrl: string): Promise<{
58
+ domain: string
59
+ challenges: AcmeChallenge[]
60
+ }>;
61
+ respondToChallenge(challengeUrl: string): Promise<void>;
62
+ waitForAuthorization(authUrl: string, maxAttempts?: any): Promise<void>;
63
+ private generateCsr(domains: string[]): { csr: string; privateKey: string };
64
+ private createSimpleCsr(domains: string[], privateKey: any): string;
65
+ finalizeOrder(finalizeUrl: string, domains: string[]): Promise<AcmeCertificate>;
66
+ getAccountKey(): string;
67
+ }
@@ -0,0 +1,2 @@
1
+ export * from './letsencrypt';
2
+ export * from './acme-client';
@@ -0,0 +1,48 @@
1
+ import type { DnsProviderConfig } from '../dns/types';
2
+ /**
3
+ * Generate UserData script for Let's Encrypt certificate setup on EC2
4
+ * This creates a complete setup that handles certificate acquisition and renewal
5
+ */
6
+ export declare function generateLetsEncryptUserData(config: LetsEncryptConfig): string;
7
+ /**
8
+ * Generate server configuration for HTTPS with Let's Encrypt
9
+ */
10
+ export declare function generateHttpsServerCode(options: {
11
+ httpPort?: number
12
+ httpsPort?: number
13
+ certPath?: string
14
+ redirectHttp?: boolean
15
+ }): string;
16
+ /**
17
+ * Setup DNS-01 challenge programmatically using any DNS provider
18
+ * This is the unified API that works with Route53, Porkbun, GoDaddy, etc.
19
+ */
20
+ export declare function setupDns01Challenge(options: Dns01ChallengeConfig): Promise<void>;
21
+ /**
22
+ * Clean up DNS-01 challenge record using any DNS provider
23
+ */
24
+ export declare function cleanupDns01Challenge(options: Dns01ChallengeConfig): Promise<void>;
25
+ /**
26
+ * Check if certificates need renewal (< 30 days until expiry)
27
+ */
28
+ export declare function needsRenewal(certPath: string): boolean;
29
+ export declare interface LetsEncryptConfig {
30
+ domains: string[]
31
+ email: string
32
+ staging?: boolean
33
+ challengeType?: 'http-01' | 'dns-01'
34
+ hostedZoneId?: string
35
+ dnsProvider?: DnsProviderConfig
36
+ certPath?: string
37
+ autoRenew?: boolean
38
+ }
39
+ /**
40
+ * DNS-01 challenge configuration for programmatic use
41
+ */
42
+ export declare interface Dns01ChallengeConfig {
43
+ domain: string
44
+ challengeValue: string
45
+ hostedZoneId?: string
46
+ dnsProvider?: DnsProviderConfig
47
+ region?: string
48
+ }
@@ -0,0 +1 @@
1
+ export * from '@stacksjs/ts-cloud-types';
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Colorize text
3
+ */
4
+ export declare function colorize(text: string, color: keyof typeof colors): string;
5
+ /**
6
+ * Success message
7
+ */
8
+ export declare function success(message: string): void;
9
+ /**
10
+ * Error message
11
+ */
12
+ export declare function error(message: string): void;
13
+ /**
14
+ * Warning message
15
+ */
16
+ export declare function warn(message: string): void;
17
+ /**
18
+ * Info message
19
+ */
20
+ export declare function info(message: string): void;
21
+ /**
22
+ * Step message
23
+ */
24
+ export declare function step(message: string): void;
25
+ /**
26
+ * Header message
27
+ */
28
+ export declare function header(message: string): void;
29
+ /**
30
+ * Prompt for user input
31
+ */
32
+ export declare function prompt(message: string, defaultValue?: string): Promise<string>;
33
+ /**
34
+ * Prompt for confirmation (yes/no)
35
+ */
36
+ export declare function confirm(message: string, defaultValue?: any): Promise<boolean>;
37
+ /**
38
+ * Select from a list of options
39
+ */
40
+ export declare function select(message: string, options: string[]): Promise<string>;
41
+ /**
42
+ * Format a table
43
+ */
44
+ export declare function table(headers: string[], rows: string[][]): void;
45
+ /**
46
+ * Format bytes to human readable
47
+ */
48
+ export declare function formatBytes(bytes: number): string;
49
+ /**
50
+ * Format duration to human readable
51
+ */
52
+ export declare function formatDuration(ms: number): string;
53
+ /**
54
+ * Box a message
55
+ */
56
+ export declare function box(message: string, color?: keyof typeof colors): void;
57
+ /**
58
+ * Check if AWS CLI is installed (deprecated - no longer required)
59
+ * @deprecated AWS CLI is no longer required. Use checkAwsCredentials() instead.
60
+ */
61
+ export declare function checkAwsCli(): Promise<boolean>;
62
+ /**
63
+ * Check if AWS credentials are configured
64
+ * Uses direct API call to STS GetCallerIdentity
65
+ */
66
+ export declare function checkAwsCredentials(): Promise<boolean>;
67
+ /**
68
+ * Get AWS account ID using direct STS API call
69
+ */
70
+ export declare function getAwsAccountId(): Promise<string | null>;
71
+ /**
72
+ * Get AWS regions using direct EC2 API call
73
+ */
74
+ export declare function getAwsRegions(): Promise<string[]>;
75
+ /**
76
+ * CLI Utility Functions
77
+ * Helpers for colored output, spinners, prompts, and formatting
78
+ */
79
+ // ANSI color codes
80
+ export declare const colors: {
81
+ reset: '\x1B[0m';
82
+ bright: '\x1B[1m';
83
+ dim: '\x1B[2m';
84
+ red: '\x1B[31m';
85
+ green: '\x1B[32m';
86
+ yellow: '\x1B[33m';
87
+ blue: '\x1B[34m';
88
+ magenta: '\x1B[35m';
89
+ cyan: '\x1B[36m';
90
+ white: '\x1B[37m';
91
+ gray: '\x1B[90m'
92
+ };
93
+ /**
94
+ * Warning message (alias)
95
+ */
96
+ export declare const warning: typeof warn;
97
+ /**
98
+ * Simple spinner
99
+ */
100
+ export declare class Spinner {
101
+ private frames: any;
102
+ private interval: Timer | null;
103
+ private currentFrame: any;
104
+ private message: string;
105
+ constructor(message: string);
106
+ start(): void;
107
+ succeed(message?: string): void;
108
+ fail(message?: string): void;
109
+ warn(message?: string): void;
110
+ stop(): void;
111
+ }
112
+ /**
113
+ * Progress bar
114
+ */
115
+ export declare class ProgressBar {
116
+ private total: number;
117
+ private current: any;
118
+ private width: any;
119
+ constructor(total: number);
120
+ update(current: number): void;
121
+ increment(): void;
122
+ private render(): void;
123
+ }
@@ -0,0 +1 @@
1
+ export * from './template';
@@ -0,0 +1,23 @@
1
+ import type { CloudFormationTemplate } from '@stacksjs/ts-cloud-aws-types';
2
+ /**
3
+ * Validate a CloudFormation template
4
+ */
5
+ export declare function validateTemplate(template: CloudFormationTemplate): ValidationResult;
6
+ /**
7
+ * Validate template size
8
+ */
9
+ export declare function validateTemplateSize(templateBody: string): ValidationResult;
10
+ /**
11
+ * Validate template resource limits
12
+ */
13
+ export declare function validateResourceLimits(template: CloudFormationTemplate): ValidationResult;
14
+ export declare interface ValidationError {
15
+ path: string
16
+ message: string
17
+ severity: 'error' | 'warning'
18
+ }
19
+ export declare interface ValidationResult {
20
+ valid: boolean
21
+ errors: ValidationError[]
22
+ warnings: ValidationError[]
23
+ }
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@stacksjs/ts-cloud",
3
3
  "type": "module",
4
- "version": "0.1.3",
4
+ "version": "0.1.6",
5
5
  "description": "A lightweight, performant infrastructure-as-code library and CLI for deploying both server-based (EC2) and serverless applications.",
6
6
  "author": "Chris Breuer <chris@stacksjs.com>",
7
7
  "license": "MIT",
8
- "homepage": "https://github.com/stacksjs/cloud#readme",
8
+ "homepage": "https://github.com/stacksjs/ts-cloud#readme",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/stacksjs/cloud.git"
11
+ "url": "git+https://github.com/stacksjs/ts-cloud.git"
12
12
  },
13
13
  "bugs": {
14
- "url": "https://github.com/stacksjs/cloud/issues"
14
+ "url": "https://github.com/stacksjs/ts-cloud/issues"
15
15
  },
16
16
  "keywords": [
17
17
  "typescript",
@@ -84,10 +84,10 @@
84
84
  "test": "bun test"
85
85
  },
86
86
  "dependencies": {
87
- "@stacksjs/ts-cloud-aws-types": "workspace:*",
88
- "@stacksjs/ts-cloud-core": "workspace:*",
89
- "@stacksjs/ts-cloud-types": "workspace:*",
90
- "fast-xml-parser": "^5.3.4"
87
+ "@stacksjs/ts-cloud-aws-types": "0.1.6",
88
+ "@stacksjs/ts-cloud-core": "0.1.6",
89
+ "@stacksjs/ts-cloud-types": "0.1.6",
90
+ "fast-xml-parser": "^5.3.5"
91
91
  },
92
92
  "devDependencies": {
93
93
  "bunfig": "^0.15.6",