@ts-cloud/core 0.2.3 → 0.2.5
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.
- package/dist/advanced-features.test.d.ts +1 -0
- package/dist/aws/cloudformation.d.ts +136 -0
- package/dist/aws/cloudfront.d.ts +45 -0
- package/dist/aws/credentials.d.ts +77 -0
- package/dist/aws/credentials.test.d.ts +4 -0
- package/dist/aws/index.d.ts +10 -0
- package/dist/aws/s3.d.ts +256 -0
- package/dist/aws/s3.test.d.ts +4 -0
- package/dist/aws/signature.d.ts +142 -0
- package/dist/aws/signature.test.d.ts +4 -0
- package/dist/backup/disaster-recovery.d.ts +140 -0
- package/dist/backup/disaster-recovery.test.d.ts +1 -0
- package/dist/backup/index.d.ts +8 -0
- package/dist/backup/manager.d.ts +172 -0
- package/dist/backup/manager.test.d.ts +1 -0
- package/dist/cicd/circleci.d.ts +50 -0
- package/dist/cicd/github-actions.d.ts +62 -0
- package/dist/cicd/gitlab-ci.d.ts +50 -0
- package/dist/cicd/index.d.ts +7 -0
- package/dist/cli/history.d.ts +137 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/progress.d.ts +193 -0
- package/dist/cli/repl.d.ts +148 -0
- package/dist/cli/suggestions.d.ts +74 -0
- package/dist/cli/table.d.ts +73 -0
- package/dist/cli/table.test.d.ts +1 -0
- package/dist/cloudformation/builder.d.ts +93 -0
- package/dist/cloudformation/builder.test.d.ts +4 -0
- package/dist/cloudformation/builders/api-gateway.d.ts +30 -0
- package/dist/cloudformation/builders/cache.d.ts +35 -0
- package/dist/cloudformation/builders/cdn.d.ts +34 -0
- package/dist/cloudformation/builders/compute.d.ts +68 -0
- package/dist/cloudformation/builders/database.d.ts +61 -0
- package/dist/cloudformation/builders/functions.d.ts +32 -0
- package/dist/cloudformation/builders/messaging.d.ts +17 -0
- package/dist/cloudformation/builders/monitoring.d.ts +39 -0
- package/dist/cloudformation/builders/network.d.ts +14 -0
- package/dist/cloudformation/builders/queue.d.ts +16 -0
- package/dist/cloudformation/builders/security.d.ts +31 -0
- package/dist/cloudformation/builders/storage.d.ts +36 -0
- package/dist/cloudformation/index.d.ts +10 -0
- package/dist/cloudformation/types.d.ts +200 -0
- package/dist/compliance/aws-config.d.ts +175 -0
- package/dist/compliance/cloudtrail.d.ts +132 -0
- package/dist/compliance/compliance.test.d.ts +1 -0
- package/dist/compliance/guardduty.d.ts +176 -0
- package/dist/compliance/index.d.ts +12 -0
- package/dist/compliance/security-hub.d.ts +178 -0
- package/dist/containers/build-optimization.d.ts +155 -0
- package/dist/containers/containers.test.d.ts +1 -0
- package/dist/containers/image-scanning.d.ts +144 -0
- package/dist/containers/index.d.ts +8 -0
- package/dist/containers/registry.d.ts +129 -0
- package/dist/containers/service-mesh.d.ts +254 -0
- package/dist/database/database.test.d.ts +1 -0
- package/dist/database/index.d.ts +8 -0
- package/dist/database/migrations.d.ts +153 -0
- package/dist/database/performance.d.ts +219 -0
- package/dist/database/replicas.d.ts +218 -0
- package/dist/database/users.d.ts +165 -0
- package/dist/dependency-graph.d.ts +37 -0
- package/dist/deployment/ab-testing.d.ts +165 -0
- package/dist/deployment/blue-green.d.ts +140 -0
- package/dist/deployment/canary.d.ts +165 -0
- package/dist/deployment/deployment.test.d.ts +1 -0
- package/dist/deployment/index.d.ts +12 -0
- package/dist/deployment/progressive.d.ts +50 -0
- package/dist/dns/dns.test.d.ts +1 -0
- package/dist/dns/dnssec.d.ts +120 -0
- package/dist/dns/index.d.ts +7 -0
- package/dist/dns/resolver.d.ts +216 -0
- package/dist/dns/routing.d.ts +277 -0
- package/dist/email/advanced/analytics.d.ts +107 -0
- package/dist/email/advanced/index.d.ts +10 -0
- package/dist/email/advanced/rules.d.ts +131 -0
- package/dist/email/advanced/scheduling.d.ts +81 -0
- package/dist/email/advanced/search.d.ts +91 -0
- package/dist/email/advanced/shared-mailboxes.d.ts +109 -0
- package/dist/email/advanced/templates.d.ts +95 -0
- package/dist/email/advanced/threading.d.ts +65 -0
- package/dist/email/analytics.d.ts +189 -0
- package/dist/email/bounce-handling.d.ts +171 -0
- package/dist/email/email.test.d.ts +1 -0
- package/dist/email/handlers/__tests__/inbound.test.d.ts +1 -0
- package/dist/email/handlers/__tests__/outbound.test.d.ts +1 -0
- package/dist/email/handlers/converter.d.ts +11 -0
- package/dist/email/handlers/feedback.d.ts +11 -0
- package/dist/email/handlers/inbound.d.ts +13 -0
- package/dist/email/handlers/outbound.d.ts +13 -0
- package/dist/email/index.d.ts +10 -0
- package/dist/email/reputation.d.ts +133 -0
- package/dist/email/templates.d.ts +124 -0
- package/dist/errors/index.d.ts +177 -0
- package/dist/errors/index.test.d.ts +4 -0
- package/dist/health-checks/index.d.ts +35 -0
- package/dist/index.d.ts +15 -256
- package/dist/index.js +228 -80
- package/dist/intrinsic-functions.d.ts +77 -0
- package/dist/lambda/concurrency.d.ts +146 -0
- package/dist/lambda/destinations.d.ts +141 -0
- package/dist/lambda/dlq.d.ts +160 -0
- package/dist/lambda/index.d.ts +10 -0
- package/dist/lambda/lambda.test.d.ts +1 -0
- package/dist/lambda/layers.d.ts +117 -0
- package/dist/lambda/versions.d.ts +145 -0
- package/dist/lambda/vpc.d.ts +164 -0
- package/dist/local/config.d.ts +44 -0
- package/dist/local/index.d.ts +5 -0
- package/dist/local/mock-aws.d.ts +69 -0
- package/dist/modules/ai.d.ts +108 -0
- package/dist/modules/api.d.ts +157 -0
- package/dist/modules/auth.d.ts +262 -0
- package/dist/modules/cache.d.ts +108 -0
- package/dist/modules/cdn.d.ts +305 -0
- package/dist/modules/communication.d.ts +117 -0
- package/dist/modules/compute.d.ts +1376 -0
- package/dist/modules/database.d.ts +144 -0
- package/dist/modules/deployment.d.ts +372 -0
- package/dist/modules/dns.d.ts +143 -0
- package/dist/modules/email.d.ts +314 -0
- package/dist/modules/filesystem.d.ts +132 -0
- package/dist/modules/index.d.ts +31 -0
- package/dist/modules/messaging.d.ts +210 -0
- package/dist/modules/monitoring.d.ts +574 -0
- package/dist/modules/network.d.ts +148 -0
- package/dist/modules/parameter-store.d.ts +143 -0
- package/dist/modules/permissions.d.ts +245 -0
- package/dist/modules/phone.d.ts +125 -0
- package/dist/modules/queue.d.ts +411 -0
- package/dist/modules/redirects.d.ts +140 -0
- package/dist/modules/registry.d.ts +189 -0
- package/dist/modules/search.d.ts +135 -0
- package/dist/modules/secrets.d.ts +149 -0
- package/dist/modules/security.d.ts +219 -0
- package/dist/modules/sms.d.ts +130 -0
- package/dist/modules/storage.d.ts +344 -0
- package/dist/modules/workflow.d.ts +288 -0
- package/dist/multi-account/config.d.ts +166 -0
- package/dist/multi-account/index.d.ts +6 -0
- package/dist/multi-account/manager.d.ts +181 -0
- package/dist/multi-region/cross-region.d.ts +204 -0
- package/dist/multi-region/index.d.ts +7 -0
- package/dist/multi-region/manager.d.ts +136 -0
- package/dist/multi-region/regions.d.ts +98 -0
- package/dist/network-security/index.d.ts +55 -0
- package/dist/observability/index.d.ts +8 -0
- package/dist/observability/logs.d.ts +213 -0
- package/dist/observability/metrics.d.ts +187 -0
- package/dist/observability/observability.test.d.ts +1 -0
- package/dist/observability/synthetics.d.ts +189 -0
- package/dist/observability/xray.d.ts +193 -0
- package/dist/phone/advanced/analytics.d.ts +83 -0
- package/dist/phone/advanced/callbacks.d.ts +67 -0
- package/dist/phone/advanced/index.d.ts +7 -0
- package/dist/phone/advanced/ivr-builder.d.ts +130 -0
- package/dist/phone/advanced/recording.d.ts +62 -0
- package/dist/phone/handlers/__tests__/incoming-call.test.d.ts +1 -0
- package/dist/phone/handlers/incoming-call.d.ts +10 -0
- package/dist/phone/handlers/missed-call.d.ts +9 -0
- package/dist/phone/handlers/voicemail.d.ts +10 -0
- package/dist/phone/index.d.ts +5 -0
- package/dist/presets/api-backend.d.ts +11 -0
- package/dist/presets/data-pipeline.d.ts +11 -0
- package/dist/presets/extend.d.ts +194 -0
- package/dist/presets/extend.test.d.ts +4 -0
- package/dist/presets/fullstack-app.d.ts +12 -0
- package/dist/presets/index.d.ts +13 -0
- package/dist/presets/jamstack.d.ts +12 -0
- package/dist/presets/microservices.d.ts +18 -0
- package/dist/presets/ml-api.d.ts +13 -0
- package/dist/presets/nodejs-server.d.ts +14 -0
- package/dist/presets/nodejs-serverless.d.ts +14 -0
- package/dist/presets/realtime-app.d.ts +11 -0
- package/dist/presets/static-site.d.ts +12 -0
- package/dist/presets/traditional-web-app.d.ts +16 -0
- package/dist/presets/wordpress.d.ts +12 -0
- package/dist/preview/github.d.ts +32 -0
- package/dist/preview/github.test.d.ts +1 -0
- package/dist/preview/index.d.ts +10 -0
- package/dist/preview/manager.d.ts +101 -0
- package/dist/preview/manager.test.d.ts +1 -0
- package/dist/preview/notifications.d.ts +89 -0
- package/dist/preview/notifications.test.d.ts +1 -0
- package/dist/queue/batch-processing.d.ts +138 -0
- package/dist/queue/dlq-monitoring.d.ts +143 -0
- package/dist/queue/fifo.d.ts +131 -0
- package/dist/queue/index.d.ts +8 -0
- package/dist/queue/management.d.ts +162 -0
- package/dist/queue/queue.test.d.ts +1 -0
- package/dist/resource-mgmt/index.d.ts +44 -0
- package/dist/resource-naming.d.ts +26 -0
- package/dist/s3/index.d.ts +227 -0
- package/dist/schema/index.d.ts +12 -0
- package/dist/security/certificate-manager.d.ts +184 -0
- package/dist/security/index.d.ts +8 -0
- package/dist/security/scanning.d.ts +196 -0
- package/dist/security/secrets-manager.d.ts +204 -0
- package/dist/security/secrets-rotation.d.ts +167 -0
- package/dist/security/security.test.d.ts +1 -0
- package/dist/sms/advanced/ab-testing.d.ts +74 -0
- package/dist/sms/advanced/analytics.d.ts +75 -0
- package/dist/sms/advanced/campaigns.d.ts +96 -0
- package/dist/sms/advanced/chatbot.d.ts +67 -0
- package/dist/sms/advanced/index.d.ts +9 -0
- package/dist/sms/advanced/link-tracking.d.ts +60 -0
- package/dist/sms/advanced/mms.d.ts +60 -0
- package/dist/sms/handlers/__tests__/send.test.d.ts +1 -0
- package/dist/sms/handlers/delivery-status.d.ts +10 -0
- package/dist/sms/handlers/receive.d.ts +10 -0
- package/dist/sms/handlers/send.d.ts +10 -0
- package/dist/sms/index.d.ts +5 -0
- package/dist/stack-diff.d.ts +38 -0
- package/dist/static-site/index.d.ts +49 -0
- package/dist/template-builder.d.ts +42 -0
- package/dist/template-validator.d.ts +28 -0
- package/dist/types.d.ts +2514 -0
- package/dist/utils/cache.d.ts +117 -0
- package/dist/utils/diff.d.ts +52 -0
- package/dist/utils/hash.d.ts +73 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/parallel.d.ts +78 -0
- package/dist/validators/credentials.d.ts +30 -0
- package/dist/validators/credentials.test.d.ts +4 -0
- package/dist/validators/quotas.d.ts +64 -0
- package/dist/validators/quotas.test.d.ts +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress tracking with ETA and status updates
|
|
3
|
+
* Provides interactive progress bars and status indicators
|
|
4
|
+
*/
|
|
5
|
+
export interface ProgressOptions {
|
|
6
|
+
total: number;
|
|
7
|
+
current?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
format?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
showETA?: boolean;
|
|
12
|
+
showPercentage?: boolean;
|
|
13
|
+
showCounter?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Progress bar with ETA calculation
|
|
17
|
+
*/
|
|
18
|
+
export declare class ProgressBar {
|
|
19
|
+
private total;
|
|
20
|
+
private current;
|
|
21
|
+
private width;
|
|
22
|
+
private format;
|
|
23
|
+
private message;
|
|
24
|
+
private showETA;
|
|
25
|
+
private showPercentage;
|
|
26
|
+
private showCounter;
|
|
27
|
+
private startTime;
|
|
28
|
+
private lastUpdate;
|
|
29
|
+
constructor(options: ProgressOptions);
|
|
30
|
+
/**
|
|
31
|
+
* Update progress
|
|
32
|
+
*/
|
|
33
|
+
tick(amount?: number): void;
|
|
34
|
+
/**
|
|
35
|
+
* Set progress to specific value
|
|
36
|
+
*/
|
|
37
|
+
update(current: number): void;
|
|
38
|
+
/**
|
|
39
|
+
* Set message
|
|
40
|
+
*/
|
|
41
|
+
setMessage(message: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Get current progress percentage
|
|
44
|
+
*/
|
|
45
|
+
getPercentage(): number;
|
|
46
|
+
/**
|
|
47
|
+
* Calculate ETA in milliseconds
|
|
48
|
+
*/
|
|
49
|
+
getETA(): number;
|
|
50
|
+
/**
|
|
51
|
+
* Format ETA as human-readable string
|
|
52
|
+
*/
|
|
53
|
+
getETAFormatted(): string;
|
|
54
|
+
/**
|
|
55
|
+
* Render progress bar
|
|
56
|
+
*/
|
|
57
|
+
render(): string;
|
|
58
|
+
/**
|
|
59
|
+
* Check if complete
|
|
60
|
+
*/
|
|
61
|
+
isComplete(): boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Multi-step progress tracker
|
|
65
|
+
*/
|
|
66
|
+
export interface Step {
|
|
67
|
+
name: string;
|
|
68
|
+
status: 'pending' | 'active' | 'completed' | 'failed' | 'skipped';
|
|
69
|
+
message?: string;
|
|
70
|
+
error?: string;
|
|
71
|
+
}
|
|
72
|
+
export declare class MultiStepProgress {
|
|
73
|
+
private steps;
|
|
74
|
+
private currentStepIndex;
|
|
75
|
+
constructor(stepNames: string[]);
|
|
76
|
+
/**
|
|
77
|
+
* Start a step
|
|
78
|
+
*/
|
|
79
|
+
startStep(index: number, message?: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Complete current step
|
|
82
|
+
*/
|
|
83
|
+
completeStep(message?: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* Fail current step
|
|
86
|
+
*/
|
|
87
|
+
failStep(error: string): void;
|
|
88
|
+
/**
|
|
89
|
+
* Skip current step
|
|
90
|
+
*/
|
|
91
|
+
skipStep(message?: string): void;
|
|
92
|
+
/**
|
|
93
|
+
* Get step by index
|
|
94
|
+
*/
|
|
95
|
+
getStep(index: number): Step | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Get all steps
|
|
98
|
+
*/
|
|
99
|
+
getSteps(): Step[];
|
|
100
|
+
/**
|
|
101
|
+
* Render progress
|
|
102
|
+
*/
|
|
103
|
+
render(): string;
|
|
104
|
+
/**
|
|
105
|
+
* Get status icon
|
|
106
|
+
*/
|
|
107
|
+
private getStatusIcon;
|
|
108
|
+
/**
|
|
109
|
+
* Check if all steps complete
|
|
110
|
+
*/
|
|
111
|
+
isComplete(): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Check if any step failed
|
|
114
|
+
*/
|
|
115
|
+
hasFailed(): boolean;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Spinner for indeterminate progress
|
|
119
|
+
*/
|
|
120
|
+
export declare class Spinner {
|
|
121
|
+
private frames;
|
|
122
|
+
private currentFrame;
|
|
123
|
+
private message;
|
|
124
|
+
private interval;
|
|
125
|
+
constructor(message?: string);
|
|
126
|
+
/**
|
|
127
|
+
* Start spinner
|
|
128
|
+
*/
|
|
129
|
+
start(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Stop spinner
|
|
132
|
+
*/
|
|
133
|
+
stop(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Set message
|
|
136
|
+
*/
|
|
137
|
+
setMessage(message: string): void;
|
|
138
|
+
/**
|
|
139
|
+
* Render current frame
|
|
140
|
+
*/
|
|
141
|
+
render(): string;
|
|
142
|
+
/**
|
|
143
|
+
* Succeed with checkmark
|
|
144
|
+
*/
|
|
145
|
+
succeed(message?: string): string;
|
|
146
|
+
/**
|
|
147
|
+
* Fail with X
|
|
148
|
+
*/
|
|
149
|
+
fail(message?: string): string;
|
|
150
|
+
/**
|
|
151
|
+
* Warn with exclamation
|
|
152
|
+
*/
|
|
153
|
+
warn(message?: string): string;
|
|
154
|
+
/**
|
|
155
|
+
* Info with i
|
|
156
|
+
*/
|
|
157
|
+
info(message?: string): string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Task list with status tracking
|
|
161
|
+
*/
|
|
162
|
+
export interface Task {
|
|
163
|
+
title: string;
|
|
164
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
165
|
+
output?: string;
|
|
166
|
+
}
|
|
167
|
+
export declare class TaskList {
|
|
168
|
+
private tasks;
|
|
169
|
+
/**
|
|
170
|
+
* Add task
|
|
171
|
+
*/
|
|
172
|
+
add(title: string): number;
|
|
173
|
+
/**
|
|
174
|
+
* Start task
|
|
175
|
+
*/
|
|
176
|
+
start(index: number): void;
|
|
177
|
+
/**
|
|
178
|
+
* Complete task
|
|
179
|
+
*/
|
|
180
|
+
complete(index: number, output?: string): void;
|
|
181
|
+
/**
|
|
182
|
+
* Fail task
|
|
183
|
+
*/
|
|
184
|
+
fail(index: number, output?: string): void;
|
|
185
|
+
/**
|
|
186
|
+
* Render task list
|
|
187
|
+
*/
|
|
188
|
+
render(): string;
|
|
189
|
+
/**
|
|
190
|
+
* Get status icon
|
|
191
|
+
*/
|
|
192
|
+
private getStatusIcon;
|
|
193
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive REPL mode for ts-cloud CLI
|
|
3
|
+
* Provides a shell-like experience for running commands
|
|
4
|
+
*/
|
|
5
|
+
export interface REPLOptions {
|
|
6
|
+
prompt?: string;
|
|
7
|
+
welcome?: string;
|
|
8
|
+
commands: Map<string, REPLCommand>;
|
|
9
|
+
historyFile?: string;
|
|
10
|
+
autocomplete?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface REPLCommand {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
aliases?: string[];
|
|
16
|
+
handler: (args: string[]) => Promise<void> | void;
|
|
17
|
+
autocomplete?: (partial: string) => string[];
|
|
18
|
+
}
|
|
19
|
+
export interface REPLHistory {
|
|
20
|
+
commands: string[];
|
|
21
|
+
maxSize: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* REPL session manager
|
|
25
|
+
*/
|
|
26
|
+
export declare class REPL {
|
|
27
|
+
private options;
|
|
28
|
+
private running;
|
|
29
|
+
private history;
|
|
30
|
+
private historyIndex;
|
|
31
|
+
constructor(options: REPLOptions);
|
|
32
|
+
/**
|
|
33
|
+
* Start REPL session
|
|
34
|
+
*/
|
|
35
|
+
start(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Stop REPL session
|
|
38
|
+
*/
|
|
39
|
+
stop(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Read input from user
|
|
42
|
+
*/
|
|
43
|
+
private readInput;
|
|
44
|
+
/**
|
|
45
|
+
* Execute command
|
|
46
|
+
*/
|
|
47
|
+
private executeCommand;
|
|
48
|
+
/**
|
|
49
|
+
* Parse command input
|
|
50
|
+
*/
|
|
51
|
+
private parseCommand;
|
|
52
|
+
/**
|
|
53
|
+
* Find command by name or alias
|
|
54
|
+
*/
|
|
55
|
+
private findCommand;
|
|
56
|
+
/**
|
|
57
|
+
* Show help message
|
|
58
|
+
*/
|
|
59
|
+
private showHelp;
|
|
60
|
+
/**
|
|
61
|
+
* Show command history
|
|
62
|
+
*/
|
|
63
|
+
private showHistory;
|
|
64
|
+
/**
|
|
65
|
+
* Add command to history
|
|
66
|
+
*/
|
|
67
|
+
private addToHistory;
|
|
68
|
+
/**
|
|
69
|
+
* Navigate history (up arrow)
|
|
70
|
+
*/
|
|
71
|
+
private historyBack;
|
|
72
|
+
/**
|
|
73
|
+
* Navigate history (down arrow)
|
|
74
|
+
*/
|
|
75
|
+
private historyForward;
|
|
76
|
+
/**
|
|
77
|
+
* Autocomplete command
|
|
78
|
+
*/
|
|
79
|
+
private autocomplete;
|
|
80
|
+
/**
|
|
81
|
+
* Load history from file
|
|
82
|
+
*/
|
|
83
|
+
private loadHistory;
|
|
84
|
+
/**
|
|
85
|
+
* Save history to file
|
|
86
|
+
*/
|
|
87
|
+
private saveHistory;
|
|
88
|
+
/**
|
|
89
|
+
* Search history
|
|
90
|
+
*/
|
|
91
|
+
searchHistory(query: string): string[];
|
|
92
|
+
/**
|
|
93
|
+
* Clear history
|
|
94
|
+
*/
|
|
95
|
+
clearHistory(): void;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Context manager for REPL sessions
|
|
99
|
+
* Maintains state across commands
|
|
100
|
+
*/
|
|
101
|
+
export declare class REPLContext {
|
|
102
|
+
private variables;
|
|
103
|
+
private workingDirectory;
|
|
104
|
+
/**
|
|
105
|
+
* Set variable
|
|
106
|
+
*/
|
|
107
|
+
set(key: string, value: any): void;
|
|
108
|
+
/**
|
|
109
|
+
* Get variable
|
|
110
|
+
*/
|
|
111
|
+
get(key: string): any;
|
|
112
|
+
/**
|
|
113
|
+
* Check if variable exists
|
|
114
|
+
*/
|
|
115
|
+
has(key: string): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Delete variable
|
|
118
|
+
*/
|
|
119
|
+
delete(key: string): void;
|
|
120
|
+
/**
|
|
121
|
+
* Get all variables
|
|
122
|
+
*/
|
|
123
|
+
getAll(): Record<string, any>;
|
|
124
|
+
/**
|
|
125
|
+
* Clear all variables
|
|
126
|
+
*/
|
|
127
|
+
clear(): void;
|
|
128
|
+
/**
|
|
129
|
+
* Set working directory
|
|
130
|
+
*/
|
|
131
|
+
setWorkingDirectory(path: string): void;
|
|
132
|
+
/**
|
|
133
|
+
* Get working directory
|
|
134
|
+
*/
|
|
135
|
+
getWorkingDirectory(): string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Command builder for creating REPL commands
|
|
139
|
+
*/
|
|
140
|
+
export declare class REPLCommandBuilder {
|
|
141
|
+
private command;
|
|
142
|
+
name(name: string): this;
|
|
143
|
+
description(description: string): this;
|
|
144
|
+
aliases(...aliases: string[]): this;
|
|
145
|
+
handler(handler: (args: string[]) => Promise<void> | void): this;
|
|
146
|
+
autocomplete(fn: (partial: string) => string[]): this;
|
|
147
|
+
build(): REPLCommand;
|
|
148
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command suggestions and typo corrections
|
|
3
|
+
* Helps users discover commands and fix typos
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Suggest similar commands based on typo
|
|
7
|
+
*/
|
|
8
|
+
export declare function suggestCommand(input: string, availableCommands: string[], threshold?: number): string[];
|
|
9
|
+
/**
|
|
10
|
+
* Format suggestion message
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatSuggestion(input: string, suggestions: string[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Check if input is likely a typo of any available command
|
|
15
|
+
*/
|
|
16
|
+
export declare function isLikelyTypo(input: string, availableCommands: string[]): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Command categories for contextual help
|
|
19
|
+
*/
|
|
20
|
+
export interface CommandCategory {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
commands: CommandInfo[];
|
|
24
|
+
}
|
|
25
|
+
export interface CommandInfo {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
aliases?: string[];
|
|
29
|
+
examples?: string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get contextual help based on current command
|
|
33
|
+
*/
|
|
34
|
+
export declare function getContextualHelp(currentCommand: string, categories: CommandCategory[]): string;
|
|
35
|
+
/**
|
|
36
|
+
* Search commands by keyword
|
|
37
|
+
*/
|
|
38
|
+
export declare function searchCommands(query: string, categories: CommandCategory[]): Array<{
|
|
39
|
+
command: CommandInfo;
|
|
40
|
+
category: string;
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Autocomplete suggestions for partial input
|
|
44
|
+
*/
|
|
45
|
+
export declare function autocomplete(partial: string, availableCommands: string[], maxResults?: number): string[];
|
|
46
|
+
/**
|
|
47
|
+
* Suggest flags based on partial input
|
|
48
|
+
*/
|
|
49
|
+
export interface FlagInfo {
|
|
50
|
+
name: string;
|
|
51
|
+
alias?: string;
|
|
52
|
+
description: string;
|
|
53
|
+
type: 'boolean' | 'string' | 'number';
|
|
54
|
+
required?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare function suggestFlags(partial: string, availableFlags: FlagInfo[]): FlagInfo[];
|
|
57
|
+
/**
|
|
58
|
+
* Format flag suggestions
|
|
59
|
+
*/
|
|
60
|
+
export declare function formatFlagSuggestions(flags: FlagInfo[]): string;
|
|
61
|
+
/**
|
|
62
|
+
* Get command usage example
|
|
63
|
+
*/
|
|
64
|
+
export declare function getCommandUsage(command: CommandInfo): string;
|
|
65
|
+
/**
|
|
66
|
+
* Validate command and suggest fixes
|
|
67
|
+
*/
|
|
68
|
+
export interface ValidationResult {
|
|
69
|
+
valid: boolean;
|
|
70
|
+
errors: string[];
|
|
71
|
+
warnings: string[];
|
|
72
|
+
suggestions: string[];
|
|
73
|
+
}
|
|
74
|
+
export declare function validateCommand(input: string, availableCommands: string[], requiredFlags?: string[]): ValidationResult;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table formatting utilities for CLI output
|
|
3
|
+
* Better table rendering with borders, alignment, colors
|
|
4
|
+
*/
|
|
5
|
+
export interface TableColumn {
|
|
6
|
+
key: string;
|
|
7
|
+
label: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
align?: 'left' | 'right' | 'center';
|
|
10
|
+
formatter?: (value: any) => string;
|
|
11
|
+
}
|
|
12
|
+
export interface TableOptions {
|
|
13
|
+
columns: TableColumn[];
|
|
14
|
+
data: Record<string, any>[];
|
|
15
|
+
border?: boolean;
|
|
16
|
+
header?: boolean;
|
|
17
|
+
compact?: boolean;
|
|
18
|
+
maxWidth?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Format data as a table
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatTable(options: TableOptions): string;
|
|
24
|
+
/**
|
|
25
|
+
* Format data as a tree structure
|
|
26
|
+
*/
|
|
27
|
+
export interface TreeNode {
|
|
28
|
+
label: string;
|
|
29
|
+
children?: TreeNode[];
|
|
30
|
+
metadata?: Record<string, any>;
|
|
31
|
+
}
|
|
32
|
+
export interface TreeOptions {
|
|
33
|
+
indent?: string;
|
|
34
|
+
showMetadata?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Format data as a tree
|
|
38
|
+
*/
|
|
39
|
+
export declare function formatTree(nodes: TreeNode[], options?: TreeOptions): string;
|
|
40
|
+
/**
|
|
41
|
+
* Create a simple progress bar
|
|
42
|
+
*/
|
|
43
|
+
export interface ProgressBarOptions {
|
|
44
|
+
total: number;
|
|
45
|
+
current: number;
|
|
46
|
+
width?: number;
|
|
47
|
+
format?: string;
|
|
48
|
+
complete?: string;
|
|
49
|
+
incomplete?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Format a progress bar
|
|
53
|
+
*/
|
|
54
|
+
export declare function formatProgressBar(options: ProgressBarOptions): string;
|
|
55
|
+
/**
|
|
56
|
+
* Format bytes as human-readable size
|
|
57
|
+
*/
|
|
58
|
+
export declare function formatBytes(bytes: number, decimals?: number): string;
|
|
59
|
+
/**
|
|
60
|
+
* Format duration as human-readable time
|
|
61
|
+
*/
|
|
62
|
+
export declare function formatDuration(ms: number): string;
|
|
63
|
+
/**
|
|
64
|
+
* Format list with bullets
|
|
65
|
+
*/
|
|
66
|
+
export declare function formatList(items: string[], bullet?: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Format key-value pairs
|
|
69
|
+
*/
|
|
70
|
+
export declare function formatKeyValue(data: Record<string, any>, options?: {
|
|
71
|
+
indent?: string;
|
|
72
|
+
separator?: string;
|
|
73
|
+
}): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { CloudConfig } from '../types';
|
|
2
|
+
import type { CloudFormationTemplate, CloudFormationResource } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* CloudFormation Template Builder
|
|
5
|
+
* Converts-cloudConfig to CloudFormation templates
|
|
6
|
+
*/
|
|
7
|
+
export declare class CloudFormationBuilder {
|
|
8
|
+
protected template: CloudFormationTemplate;
|
|
9
|
+
private config;
|
|
10
|
+
private resourceDependencies;
|
|
11
|
+
constructor(config: CloudConfig);
|
|
12
|
+
/**
|
|
13
|
+
* Build the complete CloudFormation template
|
|
14
|
+
*/
|
|
15
|
+
build(): CloudFormationTemplate;
|
|
16
|
+
/**
|
|
17
|
+
* Add parameters to the template
|
|
18
|
+
*/
|
|
19
|
+
private addParameters;
|
|
20
|
+
/**
|
|
21
|
+
* Add mappings to the template
|
|
22
|
+
*/
|
|
23
|
+
private addMappings;
|
|
24
|
+
/**
|
|
25
|
+
* Add conditions to the template
|
|
26
|
+
*/
|
|
27
|
+
private addConditions;
|
|
28
|
+
/**
|
|
29
|
+
* Add all resources to the template
|
|
30
|
+
*/
|
|
31
|
+
private addResources;
|
|
32
|
+
/**
|
|
33
|
+
* Initialize default outputs in the template
|
|
34
|
+
*/
|
|
35
|
+
private initializeOutputs;
|
|
36
|
+
/**
|
|
37
|
+
* Add a resource to the template
|
|
38
|
+
*/
|
|
39
|
+
addResource(logicalId: string, type: string, properties: Record<string, any>, options?: {
|
|
40
|
+
dependsOn?: string | string[];
|
|
41
|
+
condition?: string;
|
|
42
|
+
deletionPolicy?: 'Delete' | 'Retain' | 'Snapshot';
|
|
43
|
+
updateReplacePolicy?: 'Delete' | 'Retain' | 'Snapshot';
|
|
44
|
+
}): void;
|
|
45
|
+
/**
|
|
46
|
+
* Add or merge outputs to the template
|
|
47
|
+
*/
|
|
48
|
+
addOutputs(outputs: Record<string, any>): void;
|
|
49
|
+
/**
|
|
50
|
+
* Get the current outputs
|
|
51
|
+
*/
|
|
52
|
+
getOutputs(): Record<string, any>;
|
|
53
|
+
/**
|
|
54
|
+
* Check if a resource exists in the template
|
|
55
|
+
*/
|
|
56
|
+
hasResource(logicalId: string): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Get a resource from the template
|
|
59
|
+
*/
|
|
60
|
+
getResource(logicalId: string): CloudFormationResource | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Track resource dependencies for cycle detection
|
|
63
|
+
*/
|
|
64
|
+
private trackDependency;
|
|
65
|
+
/**
|
|
66
|
+
* Resolve and validate resource dependencies
|
|
67
|
+
* Detects circular dependencies and reorders if needed
|
|
68
|
+
*/
|
|
69
|
+
private resolveDependencies;
|
|
70
|
+
/**
|
|
71
|
+
* Generate a logical ID from a name
|
|
72
|
+
*/
|
|
73
|
+
toLogicalId(name: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* Call resource builder functions
|
|
76
|
+
*/
|
|
77
|
+
private addNetworkResources;
|
|
78
|
+
private addStorageResources;
|
|
79
|
+
private addComputeResources;
|
|
80
|
+
private addDatabaseResources;
|
|
81
|
+
private addFunctionResources;
|
|
82
|
+
private addCacheResources;
|
|
83
|
+
private addQueueResources;
|
|
84
|
+
private addMessagingResources;
|
|
85
|
+
private addCDNResources;
|
|
86
|
+
private addApiGatewayResources;
|
|
87
|
+
private addMonitoringResources;
|
|
88
|
+
private addSecurityResources;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Main function to convert CloudConfig to CloudFormation template
|
|
92
|
+
*/
|
|
93
|
+
export declare function buildCloudFormationTemplate(config: CloudConfig): CloudFormationTemplate;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CloudFormationBuilder } from '../builder';
|
|
2
|
+
export interface ApiGatewayConfig {
|
|
3
|
+
type: 'http' | 'rest' | 'websocket';
|
|
4
|
+
customDomain?: {
|
|
5
|
+
domain: string;
|
|
6
|
+
certificateArn: string;
|
|
7
|
+
};
|
|
8
|
+
cors?: {
|
|
9
|
+
allowOrigins: string[];
|
|
10
|
+
allowMethods: string[];
|
|
11
|
+
allowHeaders?: string[];
|
|
12
|
+
maxAge?: number;
|
|
13
|
+
};
|
|
14
|
+
throttling?: {
|
|
15
|
+
rateLimit: number;
|
|
16
|
+
burstLimit: number;
|
|
17
|
+
};
|
|
18
|
+
routes?: any;
|
|
19
|
+
authorizer?: {
|
|
20
|
+
type: 'jwt' | 'lambda' | 'cognito';
|
|
21
|
+
identitySource?: string;
|
|
22
|
+
authorizerUri?: string;
|
|
23
|
+
issuer?: string;
|
|
24
|
+
audience?: string[];
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Add API Gateway resources to CloudFormation template
|
|
29
|
+
*/
|
|
30
|
+
export declare function addApiGatewayResources(builder: CloudFormationBuilder, config: ApiGatewayConfig): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CloudFormationBuilder } from '../builder';
|
|
2
|
+
export interface CacheConfig {
|
|
3
|
+
redis?: {
|
|
4
|
+
nodeType: string;
|
|
5
|
+
numCacheNodes: number;
|
|
6
|
+
engine: 'redis';
|
|
7
|
+
engineVersion: string;
|
|
8
|
+
port?: number;
|
|
9
|
+
parameterGroup?: {
|
|
10
|
+
maxmemoryPolicy?: string;
|
|
11
|
+
timeout?: string;
|
|
12
|
+
[key: string]: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
snapshotRetentionLimit?: number;
|
|
15
|
+
snapshotWindow?: string;
|
|
16
|
+
automaticFailoverEnabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
memcached?: {
|
|
19
|
+
nodeType: string;
|
|
20
|
+
numCacheNodes: number;
|
|
21
|
+
engine: 'memcached';
|
|
22
|
+
engineVersion: string;
|
|
23
|
+
port?: number;
|
|
24
|
+
};
|
|
25
|
+
elasticache?: {
|
|
26
|
+
nodeType: string;
|
|
27
|
+
numCacheNodes: number;
|
|
28
|
+
engine: string;
|
|
29
|
+
engineVersion: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Add ElastiCache resources to CloudFormation template
|
|
34
|
+
*/
|
|
35
|
+
export declare function addCacheResources(builder: CloudFormationBuilder, config: CacheConfig): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CloudFormationBuilder } from '../builder';
|
|
2
|
+
export interface CDNConfig {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
origins?: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
domainName: string;
|
|
7
|
+
pathPattern?: string;
|
|
8
|
+
originPath?: string;
|
|
9
|
+
}>;
|
|
10
|
+
customDomain?: {
|
|
11
|
+
domain: string;
|
|
12
|
+
certificateArn: string;
|
|
13
|
+
};
|
|
14
|
+
cachePolicy?: {
|
|
15
|
+
minTTL?: number;
|
|
16
|
+
defaultTTL?: number;
|
|
17
|
+
maxTTL?: number;
|
|
18
|
+
};
|
|
19
|
+
compress?: boolean;
|
|
20
|
+
http3?: boolean;
|
|
21
|
+
errorPages?: {
|
|
22
|
+
[code: string]: string;
|
|
23
|
+
};
|
|
24
|
+
edgeFunctions?: Array<{
|
|
25
|
+
eventType: 'viewer-request' | 'viewer-response' | 'origin-request' | 'origin-response';
|
|
26
|
+
functionArn: string;
|
|
27
|
+
name: string;
|
|
28
|
+
}>;
|
|
29
|
+
priceClass?: 'PriceClass_All' | 'PriceClass_200' | 'PriceClass_100';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Add CloudFront distribution to CloudFormation template
|
|
33
|
+
*/
|
|
34
|
+
export declare function addCDNResources(builder: CloudFormationBuilder, config: CDNConfig): void;
|