@stacksjs/ts-cloud-core 0.1.6 → 0.1.8
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 +0 -0
- package/dist/aws/cloudformation.d.ts +69 -0
- package/dist/aws/cloudfront.d.ts +21 -0
- package/dist/aws/credentials.d.ts +66 -0
- package/dist/aws/credentials.test.d.ts +0 -0
- package/dist/aws/index.d.ts +73 -0
- package/dist/aws/s3.d.ts +130 -0
- package/dist/aws/s3.test.d.ts +0 -0
- package/dist/aws/signature.d.ts +101 -0
- package/dist/aws/signature.test.d.ts +0 -0
- package/dist/backup/disaster-recovery.d.ts +98 -0
- package/dist/backup/disaster-recovery.test.d.ts +0 -0
- package/dist/backup/index.d.ts +24 -0
- package/dist/backup/manager.d.ts +112 -0
- package/dist/backup/manager.test.d.ts +0 -0
- package/dist/cicd/circleci.d.ts +47 -0
- package/dist/cicd/github-actions.d.ts +55 -0
- package/dist/cicd/gitlab-ci.d.ts +46 -0
- package/dist/cicd/index.d.ts +3 -0
- package/dist/cli/history.d.ts +66 -0
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/progress.d.ts +97 -0
- package/dist/cli/repl.d.ts +76 -0
- package/dist/cli/suggestions.d.ts +67 -0
- package/dist/cli/table.d.ts +70 -0
- package/dist/cli/table.test.d.ts +0 -0
- package/dist/cloudformation/builder.d.ts +59 -0
- package/dist/cloudformation/builder.test.d.ts +0 -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 +66 -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 +36 -0
- package/dist/cloudformation/builders/network.d.ts +14 -0
- package/dist/cloudformation/builders/queue.d.ts +8 -0
- package/dist/cloudformation/builders/security.d.ts +31 -0
- package/dist/cloudformation/builders/storage.d.ts +8 -0
- package/dist/cloudformation/index.d.ts +24 -0
- package/dist/cloudformation/types.d.ts +132 -0
- package/dist/compliance/aws-config.d.ts +88 -0
- package/dist/compliance/cloudtrail.d.ts +96 -0
- package/dist/compliance/compliance.test.d.ts +0 -0
- package/dist/compliance/guardduty.d.ts +110 -0
- package/dist/compliance/index.d.ts +50 -0
- package/dist/compliance/security-hub.d.ts +110 -0
- package/dist/containers/build-optimization.d.ts +110 -0
- package/dist/containers/containers.test.d.ts +0 -0
- package/dist/containers/image-scanning.d.ts +96 -0
- package/dist/containers/index.d.ts +4 -0
- package/dist/containers/registry.d.ts +99 -0
- package/dist/containers/service-mesh.d.ts +206 -0
- package/dist/database/database.test.d.ts +0 -0
- package/dist/database/index.d.ts +4 -0
- package/dist/database/migrations.d.ts +102 -0
- package/dist/database/performance.d.ts +168 -0
- package/dist/database/replicas.d.ts +146 -0
- package/dist/database/users.d.ts +102 -0
- package/dist/dependency-graph.d.ts +19 -0
- package/dist/deployment/ab-testing.d.ts +114 -0
- package/dist/deployment/blue-green.d.ts +98 -0
- package/dist/deployment/canary.d.ts +103 -0
- package/dist/deployment/deployment.test.d.ts +0 -0
- package/dist/deployment/index.d.ts +45 -0
- package/dist/deployment/progressive.d.ts +34 -0
- package/dist/dns/dns.test.d.ts +0 -0
- package/dist/dns/dnssec.d.ts +75 -0
- package/dist/dns/index.d.ts +3 -0
- package/dist/dns/resolver.d.ts +150 -0
- package/dist/dns/routing.d.ts +217 -0
- package/dist/email/advanced/analytics.d.ts +78 -0
- package/dist/email/advanced/index.d.ts +7 -0
- package/dist/email/advanced/rules.d.ts +60 -0
- package/dist/email/advanced/scheduling.d.ts +63 -0
- package/dist/email/advanced/search.d.ts +76 -0
- package/dist/email/advanced/shared-mailboxes.d.ts +66 -0
- package/dist/email/advanced/templates.d.ts +39 -0
- package/dist/email/advanced/threading.d.ts +53 -0
- package/dist/email/analytics.d.ts +144 -0
- package/dist/email/bounce-handling.d.ts +120 -0
- package/dist/email/email.test.d.ts +0 -0
- package/dist/email/handlers/__tests__/inbound.test.d.ts +0 -0
- package/dist/email/handlers/__tests__/outbound.test.d.ts +0 -0
- package/dist/email/handlers/converter.d.ts +225 -0
- package/dist/email/handlers/feedback.d.ts +226 -0
- package/dist/email/handlers/inbound.d.ts +167 -0
- package/dist/email/handlers/outbound.d.ts +176 -0
- package/dist/email/index.d.ts +6 -0
- package/dist/email/reputation.d.ts +97 -0
- package/dist/email/templates.d.ts +82 -0
- package/dist/errors/index.d.ts +186 -0
- package/dist/errors/index.test.d.ts +0 -0
- package/dist/health-checks/index.d.ts +35 -0
- package/dist/index.d.ts +256 -0
- package/dist/index.js +63499 -0
- package/dist/intrinsic-functions.d.ts +37 -0
- package/dist/lambda/concurrency.d.ts +98 -0
- package/dist/lambda/destinations.d.ts +99 -0
- package/dist/lambda/dlq.d.ts +109 -0
- package/dist/lambda/index.d.ts +6 -0
- package/dist/lambda/lambda.test.d.ts +0 -0
- package/dist/lambda/layers.d.ts +81 -0
- package/dist/lambda/versions.d.ts +91 -0
- package/dist/lambda/vpc.d.ts +116 -0
- package/dist/local/config.d.ts +44 -0
- package/dist/local/index.d.ts +2 -0
- package/dist/local/mock-aws.d.ts +60 -0
- package/dist/modules/ai.d.ts +47 -0
- package/dist/modules/api.d.ts +98 -0
- package/dist/modules/auth.d.ts +165 -0
- package/dist/modules/cache.d.ts +73 -0
- package/dist/modules/cdn.d.ts +125 -0
- package/dist/modules/communication.d.ts +98 -0
- package/dist/modules/compute.d.ts +309 -0
- package/dist/modules/database.d.ts +105 -0
- package/dist/modules/deployment.d.ts +181 -0
- package/dist/modules/dns.d.ts +45 -0
- package/dist/modules/email.d.ts +217 -0
- package/dist/modules/filesystem.d.ts +94 -0
- package/dist/modules/index.d.ts +27 -0
- package/dist/modules/messaging.d.ts +108 -0
- package/dist/modules/monitoring.d.ts +127 -0
- package/dist/modules/network.d.ts +102 -0
- package/dist/modules/parameter-store.d.ts +33 -0
- package/dist/modules/permissions.d.ts +132 -0
- package/dist/modules/phone.d.ts +80 -0
- package/dist/modules/queue.d.ts +210 -0
- package/dist/modules/redirects.d.ts +59 -0
- package/dist/modules/registry.d.ts +73 -0
- package/dist/modules/search.d.ts +56 -0
- package/dist/modules/secrets.d.ts +80 -0
- package/dist/modules/security.d.ts +100 -0
- package/dist/modules/sms.d.ts +52 -0
- package/dist/modules/storage.d.ts +160 -0
- package/dist/modules/workflow.d.ts +205 -0
- package/dist/multi-account/config.d.ts +315 -0
- package/dist/multi-account/index.d.ts +2 -0
- package/dist/multi-account/manager.d.ts +100 -0
- package/dist/multi-region/cross-region.d.ts +114 -0
- package/dist/multi-region/index.d.ts +3 -0
- package/dist/multi-region/manager.d.ts +72 -0
- package/dist/multi-region/regions.d.ts +98 -0
- package/dist/network-security/index.d.ts +39 -0
- package/dist/observability/index.d.ts +4 -0
- package/dist/observability/logs.d.ts +129 -0
- package/dist/observability/metrics.d.ts +153 -0
- package/dist/observability/observability.test.d.ts +0 -0
- package/dist/observability/synthetics.d.ts +146 -0
- package/dist/observability/xray.d.ts +129 -0
- package/dist/phone/advanced/analytics.d.ts +66 -0
- package/dist/phone/advanced/callbacks.d.ts +50 -0
- package/dist/phone/advanced/index.d.ts +4 -0
- package/dist/phone/advanced/ivr-builder.d.ts +83 -0
- package/dist/phone/advanced/recording.d.ts +48 -0
- package/dist/phone/handlers/__tests__/incoming-call.test.d.ts +0 -0
- package/dist/phone/handlers/incoming-call.d.ts +115 -0
- package/dist/phone/handlers/missed-call.d.ts +114 -0
- package/dist/phone/handlers/voicemail.d.ts +177 -0
- package/dist/phone/index.d.ts +2 -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 +0 -0
- package/dist/presets/fullstack-app.d.ts +12 -0
- package/dist/presets/index.d.ts +24 -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 +0 -0
- package/dist/preview/index.d.ts +27 -0
- package/dist/preview/manager.d.ts +58 -0
- package/dist/preview/manager.test.d.ts +0 -0
- package/dist/preview/notifications.d.ts +55 -0
- package/dist/preview/notifications.test.d.ts +0 -0
- package/dist/queue/batch-processing.d.ts +87 -0
- package/dist/queue/dlq-monitoring.d.ts +95 -0
- package/dist/queue/fifo.d.ts +90 -0
- package/dist/queue/index.d.ts +4 -0
- package/dist/queue/management.d.ts +105 -0
- package/dist/queue/queue.test.d.ts +0 -0
- package/dist/resource-mgmt/index.d.ts +29 -0
- package/dist/resource-naming.d.ts +26 -0
- package/dist/s3/index.d.ts +173 -0
- package/dist/schema/index.d.ts +9 -0
- package/dist/security/certificate-manager.d.ts +121 -0
- package/dist/security/index.d.ts +4 -0
- package/dist/security/scanning.d.ts +147 -0
- package/dist/security/secrets-manager.d.ts +144 -0
- package/dist/security/secrets-rotation.d.ts +115 -0
- package/dist/security/security.test.d.ts +0 -0
- package/dist/sms/advanced/ab-testing.d.ts +54 -0
- package/dist/sms/advanced/analytics.d.ts +56 -0
- package/dist/sms/advanced/campaigns.d.ts +82 -0
- package/dist/sms/advanced/chatbot.d.ts +48 -0
- package/dist/sms/advanced/index.d.ts +6 -0
- package/dist/sms/advanced/link-tracking.d.ts +42 -0
- package/dist/sms/advanced/mms.d.ts +35 -0
- package/dist/sms/handlers/__tests__/send.test.d.ts +0 -0
- package/dist/sms/handlers/delivery-status.d.ts +131 -0
- package/dist/sms/handlers/receive.d.ts +160 -0
- package/dist/sms/handlers/send.d.ts +172 -0
- package/dist/sms/index.d.ts +2 -0
- package/dist/stack-diff.d.ts +34 -0
- package/dist/static-site/index.d.ts +49 -0
- package/dist/template-builder.d.ts +14 -0
- package/dist/template-validator.d.ts +24 -0
- package/dist/utils/cache.d.ts +55 -0
- package/dist/utils/diff.d.ts +48 -0
- package/dist/utils/hash.d.ts +58 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/parallel.d.ts +60 -0
- package/dist/validators/credentials.d.ts +23 -0
- package/dist/validators/credentials.test.d.ts +0 -0
- package/dist/validators/quotas.d.ts +60 -0
- package/dist/validators/quotas.test.d.ts +0 -0
- package/package.json +4 -4
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global backup manager instance
|
|
3
|
+
*/
|
|
4
|
+
export declare const backupManager: BackupManager;
|
|
5
|
+
/**
|
|
6
|
+
* Backup & Disaster Recovery Manager
|
|
7
|
+
* Automated backup schedules and disaster recovery
|
|
8
|
+
*/
|
|
9
|
+
export declare interface BackupPlan {
|
|
10
|
+
id: string
|
|
11
|
+
name: string
|
|
12
|
+
schedule: string
|
|
13
|
+
retentionDays: number
|
|
14
|
+
vaultName: string
|
|
15
|
+
resources: BackupResource[]
|
|
16
|
+
lifecycle?: BackupLifecycle
|
|
17
|
+
tags?: Record<string, string>
|
|
18
|
+
}
|
|
19
|
+
export declare interface BackupResource {
|
|
20
|
+
resourceArn: string
|
|
21
|
+
resourceType: 'rds' | 's3' | 'ebs' | 'efs' | 'dynamodb' | 'ec2'
|
|
22
|
+
region: string
|
|
23
|
+
}
|
|
24
|
+
export declare interface BackupLifecycle {
|
|
25
|
+
moveTocoldStorageAfterDays?: number
|
|
26
|
+
deleteAfterDays?: number
|
|
27
|
+
}
|
|
28
|
+
export declare interface BackupVault {
|
|
29
|
+
name: string
|
|
30
|
+
region: string
|
|
31
|
+
encryptionKeyArn?: string
|
|
32
|
+
accessPolicy?: any
|
|
33
|
+
}
|
|
34
|
+
export declare interface RestoreJob {
|
|
35
|
+
id: string
|
|
36
|
+
backupId: string
|
|
37
|
+
resourceType: string
|
|
38
|
+
status: 'pending' | 'running' | 'completed' | 'failed'
|
|
39
|
+
startTime: Date
|
|
40
|
+
endTime?: Date
|
|
41
|
+
targetRegion?: string
|
|
42
|
+
error?: string
|
|
43
|
+
}
|
|
44
|
+
export declare interface ContinuousBackup {
|
|
45
|
+
id: string
|
|
46
|
+
resourceId: string
|
|
47
|
+
enabled: boolean
|
|
48
|
+
retentionDays: number
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Backup manager for automated backup and recovery
|
|
52
|
+
*/
|
|
53
|
+
export declare class BackupManager {
|
|
54
|
+
private backupPlans: Map<string, BackupPlan>;
|
|
55
|
+
private backupVaults: Map<string, BackupVault>;
|
|
56
|
+
private restoreJobs: Map<string, RestoreJob>;
|
|
57
|
+
private continuousBackups: Map<string, ContinuousBackup>;
|
|
58
|
+
private planCounter: any;
|
|
59
|
+
private restoreCounter: any;
|
|
60
|
+
private continuousBackupCounter: any;
|
|
61
|
+
createVault(vault: BackupVault): void;
|
|
62
|
+
getVault(name: string): BackupVault | undefined;
|
|
63
|
+
createBackupPlan(plan: Omit<BackupPlan, 'id'>): BackupPlan;
|
|
64
|
+
getBackupPlan(id: string): BackupPlan | undefined;
|
|
65
|
+
listBackupPlans(): BackupPlan[];
|
|
66
|
+
createRDSBackupPlan(options: {
|
|
67
|
+
dbInstanceArn: string
|
|
68
|
+
schedule?: string
|
|
69
|
+
retentionDays?: number
|
|
70
|
+
vaultName?: string
|
|
71
|
+
}): BackupPlan;
|
|
72
|
+
createDynamoDBBackupPlan(options: {
|
|
73
|
+
tableArn: string
|
|
74
|
+
schedule?: string
|
|
75
|
+
retentionDays?: number
|
|
76
|
+
crossRegionCopy?: string[]
|
|
77
|
+
}): BackupPlan;
|
|
78
|
+
createEFSBackupPlan(options: {
|
|
79
|
+
fileSystemArn: string
|
|
80
|
+
schedule?: string
|
|
81
|
+
retentionDays?: number
|
|
82
|
+
}): BackupPlan;
|
|
83
|
+
enableContinuousBackup(resourceId: string, retentionDays?: any): ContinuousBackup;
|
|
84
|
+
getContinuousBackup(id: string): ContinuousBackup | undefined;
|
|
85
|
+
enablePointInTimeRecovery(resourceArn: string, resourceType: 'rds' | 'dynamodb'): {
|
|
86
|
+
enabled: boolean
|
|
87
|
+
earliestRestorableTime: Date
|
|
88
|
+
latestRestorableTime: Date
|
|
89
|
+
};
|
|
90
|
+
restoreFromBackup(options: {
|
|
91
|
+
backupId: string
|
|
92
|
+
resourceType: string
|
|
93
|
+
targetRegion?: string
|
|
94
|
+
}): Promise<RestoreJob>;
|
|
95
|
+
restoreToPointInTime(options: {
|
|
96
|
+
sourceResourceArn: string
|
|
97
|
+
targetResourceName: string
|
|
98
|
+
restoreTime: Date
|
|
99
|
+
resourceType: 'rds' | 'dynamodb'
|
|
100
|
+
}): Promise<RestoreJob>;
|
|
101
|
+
getRestoreJob(id: string): RestoreJob | undefined;
|
|
102
|
+
listRestoreJobs(): RestoreJob[];
|
|
103
|
+
setupCrossRegionReplication(options: {
|
|
104
|
+
sourceVault: string
|
|
105
|
+
sourceRegion: string
|
|
106
|
+
targetRegions: string[]
|
|
107
|
+
}): void;
|
|
108
|
+
generateBackupVaultCF(vault: BackupVault): any;
|
|
109
|
+
generateBackupPlanCF(plan: BackupPlan): any;
|
|
110
|
+
generateBackupSelectionCF(plan: BackupPlan): any;
|
|
111
|
+
clear(): void;
|
|
112
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate deployment config
|
|
3
|
+
*/
|
|
4
|
+
export declare function generateDeploymentConfig(options?: CircleCIOptions): string;
|
|
5
|
+
/**
|
|
6
|
+
* Generate multi-environment config
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateMultiEnvConfig(options: {
|
|
9
|
+
environments: Array<{ name: string; branch: string }>
|
|
10
|
+
awsRegion?: string
|
|
11
|
+
}): string;
|
|
12
|
+
/**
|
|
13
|
+
* Generate scheduled workflow config
|
|
14
|
+
*/
|
|
15
|
+
export declare function generateScheduledConfig(options: {
|
|
16
|
+
schedule: string
|
|
17
|
+
environment: string
|
|
18
|
+
awsRegion?: string
|
|
19
|
+
}): string;
|
|
20
|
+
/**
|
|
21
|
+
* Generate approval workflow config
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateApprovalConfig(options: {
|
|
24
|
+
environments: string[]
|
|
25
|
+
awsRegion?: string
|
|
26
|
+
}): string;
|
|
27
|
+
/**
|
|
28
|
+
* Generate parallel deployment config
|
|
29
|
+
*/
|
|
30
|
+
export declare function generateParallelConfig(options: {
|
|
31
|
+
regions: string[]
|
|
32
|
+
environment: string
|
|
33
|
+
awsRegion?: string
|
|
34
|
+
}): string;
|
|
35
|
+
/**
|
|
36
|
+
* CircleCI Configuration Generator
|
|
37
|
+
* Generate CI/CD pipelines for CircleCI
|
|
38
|
+
*/
|
|
39
|
+
export declare interface CircleCIOptions {
|
|
40
|
+
awsRegion?: string
|
|
41
|
+
dockerImage?: string
|
|
42
|
+
bunVersion?: string
|
|
43
|
+
deployCommand?: string
|
|
44
|
+
testCommand?: string
|
|
45
|
+
buildCommand?: string
|
|
46
|
+
workflows?: boolean
|
|
47
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate deployment workflow
|
|
3
|
+
*/
|
|
4
|
+
export declare function generateDeploymentWorkflow(options?: GitHubActionsOptions): string;
|
|
5
|
+
/**
|
|
6
|
+
* Generate multi-environment deployment workflow
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateMultiEnvWorkflow(options: {
|
|
9
|
+
environments: Array<{ name: string; branch: string }>
|
|
10
|
+
awsRegion?: string
|
|
11
|
+
awsRole?: string
|
|
12
|
+
}): string;
|
|
13
|
+
/**
|
|
14
|
+
* Generate PR preview workflow
|
|
15
|
+
*/
|
|
16
|
+
export declare function generatePRPreviewWorkflow(options?: {
|
|
17
|
+
awsRegion?: string
|
|
18
|
+
awsRole?: string
|
|
19
|
+
ttl?: number
|
|
20
|
+
}): string;
|
|
21
|
+
/**
|
|
22
|
+
* Generate scheduled deployment workflow
|
|
23
|
+
*/
|
|
24
|
+
export declare function generateScheduledWorkflow(options: {
|
|
25
|
+
schedule: string
|
|
26
|
+
environment: string
|
|
27
|
+
awsRegion?: string
|
|
28
|
+
awsRole?: string
|
|
29
|
+
}): string;
|
|
30
|
+
/**
|
|
31
|
+
* Generate matrix deployment workflow (multiple regions/accounts)
|
|
32
|
+
*/
|
|
33
|
+
export declare function generateMatrixWorkflow(options: {
|
|
34
|
+
matrix: Array<{ environment: string; region: string; account?: string }>
|
|
35
|
+
awsRole?: string
|
|
36
|
+
}): string;
|
|
37
|
+
/**
|
|
38
|
+
* GitHub Actions Workflow Generator
|
|
39
|
+
* Generate CI/CD workflows for GitHub Actions
|
|
40
|
+
*/
|
|
41
|
+
export declare interface GitHubActionsOptions {
|
|
42
|
+
workflowName?: string
|
|
43
|
+
trigger?: 'push' | 'pull_request' | 'workflow_dispatch' | 'schedule'
|
|
44
|
+
branches?: string[]
|
|
45
|
+
schedule?: string
|
|
46
|
+
environments?: string[]
|
|
47
|
+
awsRegion?: string
|
|
48
|
+
awsRole?: string
|
|
49
|
+
nodeVersion?: string
|
|
50
|
+
bunVersion?: string
|
|
51
|
+
deployCommand?: string
|
|
52
|
+
testCommand?: string
|
|
53
|
+
buildCommand?: string
|
|
54
|
+
lintCommand?: string
|
|
55
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate deployment pipeline
|
|
3
|
+
*/
|
|
4
|
+
export declare function generateDeploymentPipeline(options?: GitLabCIOptions): string;
|
|
5
|
+
/**
|
|
6
|
+
* Generate multi-environment pipeline
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateMultiEnvPipeline(options: {
|
|
9
|
+
environments: Array<{ name: string; branch: string; manual?: boolean }>
|
|
10
|
+
awsRegion?: string
|
|
11
|
+
}): string;
|
|
12
|
+
/**
|
|
13
|
+
* Generate PR/MR preview pipeline
|
|
14
|
+
*/
|
|
15
|
+
export declare function generatePreviewPipeline(options?: {
|
|
16
|
+
awsRegion?: string
|
|
17
|
+
ttl?: number
|
|
18
|
+
}): string;
|
|
19
|
+
/**
|
|
20
|
+
* Generate scheduled pipeline
|
|
21
|
+
*/
|
|
22
|
+
export declare function generateScheduledPipeline(options: {
|
|
23
|
+
environment: string
|
|
24
|
+
awsRegion?: string
|
|
25
|
+
}): string;
|
|
26
|
+
/**
|
|
27
|
+
* Generate manual deployment pipeline
|
|
28
|
+
*/
|
|
29
|
+
export declare function generateManualPipeline(options: {
|
|
30
|
+
environments: string[]
|
|
31
|
+
awsRegion?: string
|
|
32
|
+
}): string;
|
|
33
|
+
/**
|
|
34
|
+
* GitLab CI/CD Pipeline Generator
|
|
35
|
+
* Generate CI/CD pipelines for GitLab
|
|
36
|
+
*/
|
|
37
|
+
export declare interface GitLabCIOptions {
|
|
38
|
+
stages?: string[]
|
|
39
|
+
environments?: string[]
|
|
40
|
+
awsRegion?: string
|
|
41
|
+
dockerImage?: string
|
|
42
|
+
bunVersion?: string
|
|
43
|
+
deployCommand?: string
|
|
44
|
+
testCommand?: string
|
|
45
|
+
buildCommand?: string
|
|
46
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format history for display
|
|
3
|
+
*/
|
|
4
|
+
export declare function formatHistory(entries: HistoryEntry[], options?: { maxWidth?: number }): string;
|
|
5
|
+
/**
|
|
6
|
+
* Format history statistics
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatHistoryStats(stats: ReturnType<CommandHistory['getStats']>): string;
|
|
9
|
+
/**
|
|
10
|
+
* Command history with search and persistence
|
|
11
|
+
* Tracks executed commands and provides search/replay functionality
|
|
12
|
+
*/
|
|
13
|
+
export declare interface HistoryEntry {
|
|
14
|
+
command: string
|
|
15
|
+
timestamp: Date
|
|
16
|
+
success: boolean
|
|
17
|
+
duration?: number
|
|
18
|
+
output?: string
|
|
19
|
+
}
|
|
20
|
+
export declare interface HistoryOptions {
|
|
21
|
+
maxSize?: number
|
|
22
|
+
persistFile?: string
|
|
23
|
+
trackOutput?: boolean
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Command history manager
|
|
27
|
+
*/
|
|
28
|
+
export declare class CommandHistory {
|
|
29
|
+
private entries: HistoryEntry[];
|
|
30
|
+
private maxSize: number;
|
|
31
|
+
private persistFile?: string;
|
|
32
|
+
private trackOutput: boolean;
|
|
33
|
+
constructor(options?: HistoryOptions);
|
|
34
|
+
add(entry: Omit<HistoryEntry, 'timestamp'>): void;
|
|
35
|
+
getAll(): HistoryEntry[];
|
|
36
|
+
getRecent(count?: number): HistoryEntry[];
|
|
37
|
+
search(query: string): HistoryEntry[];
|
|
38
|
+
searchByDate(startDate: Date, endDate: Date): HistoryEntry[];
|
|
39
|
+
getSuccessful(): HistoryEntry[];
|
|
40
|
+
getFailed(): HistoryEntry[];
|
|
41
|
+
getMostUsed(count?: number): Array<{ command: string; count: number }>;
|
|
42
|
+
getStats(): {
|
|
43
|
+
total: number
|
|
44
|
+
successful: number
|
|
45
|
+
failed: number
|
|
46
|
+
averageDuration: number
|
|
47
|
+
mostUsed: string
|
|
48
|
+
};
|
|
49
|
+
clear(): void;
|
|
50
|
+
getByIndex(index: number): HistoryEntry | undefined;
|
|
51
|
+
removeByIndex(index: number): void;
|
|
52
|
+
save(): Promise<void>;
|
|
53
|
+
load(): Promise<void>;
|
|
54
|
+
exportJSON(): string;
|
|
55
|
+
exportCSV(): string;
|
|
56
|
+
importJSON(json: string): void;
|
|
57
|
+
groupByDate(): Map<string, HistoryEntry[]>;
|
|
58
|
+
groupByCommand(): Map<string, HistoryEntry[]>;
|
|
59
|
+
replay(index: number): string | undefined;
|
|
60
|
+
getSuggestions(partial: string, limit?: number): string[];
|
|
61
|
+
analyzePatterns(): {
|
|
62
|
+
timeOfDay: Map<number, number> // hour -> count
|
|
63
|
+
dayOfWeek: Map<number, number> // day -> count
|
|
64
|
+
successRate: number
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress tracking with ETA and status updates
|
|
3
|
+
* Provides interactive progress bars and status indicators
|
|
4
|
+
*/
|
|
5
|
+
export declare 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
|
+
* Multi-step progress tracker
|
|
17
|
+
*/
|
|
18
|
+
export declare interface Step {
|
|
19
|
+
name: string
|
|
20
|
+
status: 'pending' | 'active' | 'completed' | 'failed' | 'skipped'
|
|
21
|
+
message?: string
|
|
22
|
+
error?: string
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Task list with status tracking
|
|
26
|
+
*/
|
|
27
|
+
export declare interface Task {
|
|
28
|
+
title: string
|
|
29
|
+
status: 'pending' | 'running' | 'completed' | 'failed'
|
|
30
|
+
output?: string
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Progress bar with ETA calculation
|
|
34
|
+
*/
|
|
35
|
+
export declare class ProgressBar {
|
|
36
|
+
private total: number;
|
|
37
|
+
private current: number;
|
|
38
|
+
private width: number;
|
|
39
|
+
private format: string;
|
|
40
|
+
private message: string;
|
|
41
|
+
private showETA: boolean;
|
|
42
|
+
private showPercentage: boolean;
|
|
43
|
+
private showCounter: boolean;
|
|
44
|
+
private startTime: number;
|
|
45
|
+
private lastUpdate: number;
|
|
46
|
+
constructor(options: ProgressOptions);
|
|
47
|
+
tick(amount?: number): void;
|
|
48
|
+
update(current: number): void;
|
|
49
|
+
setMessage(message: string): void;
|
|
50
|
+
getPercentage(): number;
|
|
51
|
+
getETA(): number;
|
|
52
|
+
getETAFormatted(): string;
|
|
53
|
+
render(): string;
|
|
54
|
+
isComplete(): boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare class MultiStepProgress {
|
|
57
|
+
private steps: Step[];
|
|
58
|
+
private currentStepIndex: number;
|
|
59
|
+
constructor(stepNames: string[]);
|
|
60
|
+
startStep(index: number, message?: string): void;
|
|
61
|
+
completeStep(message?: string): void;
|
|
62
|
+
failStep(error: string): void;
|
|
63
|
+
skipStep(message?: string): void;
|
|
64
|
+
getStep(index: number): Step | undefined;
|
|
65
|
+
getSteps(): Step[];
|
|
66
|
+
render(): string;
|
|
67
|
+
private getStatusIcon(status: Step['status']): string;
|
|
68
|
+
isComplete(): boolean;
|
|
69
|
+
hasFailed(): boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Spinner for indeterminate progress
|
|
73
|
+
*/
|
|
74
|
+
export declare class Spinner {
|
|
75
|
+
private frames: string[];
|
|
76
|
+
private currentFrame: number;
|
|
77
|
+
private message: string;
|
|
78
|
+
private interval: Timer | null;
|
|
79
|
+
constructor(message?: string);
|
|
80
|
+
start(): void;
|
|
81
|
+
stop(): void;
|
|
82
|
+
setMessage(message: string): void;
|
|
83
|
+
render(): string;
|
|
84
|
+
succeed(message?: string): string;
|
|
85
|
+
fail(message?: string): string;
|
|
86
|
+
warn(message?: string): string;
|
|
87
|
+
info(message?: string): string;
|
|
88
|
+
}
|
|
89
|
+
export declare class TaskList {
|
|
90
|
+
private tasks: Task[];
|
|
91
|
+
add(title: string): number;
|
|
92
|
+
start(index: number): void;
|
|
93
|
+
complete(index: number, output?: string): void;
|
|
94
|
+
fail(index: number, output?: string): void;
|
|
95
|
+
render(): string;
|
|
96
|
+
private getStatusIcon(status: Task['status']): string;
|
|
97
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive REPL mode for ts-cloud CLI
|
|
3
|
+
* Provides a shell-like experience for running commands
|
|
4
|
+
*/
|
|
5
|
+
export declare interface REPLOptions {
|
|
6
|
+
prompt?: string
|
|
7
|
+
welcome?: string
|
|
8
|
+
commands: Map<string, REPLCommand>
|
|
9
|
+
historyFile?: string
|
|
10
|
+
autocomplete?: boolean
|
|
11
|
+
}
|
|
12
|
+
export declare 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 declare interface REPLHistory {
|
|
20
|
+
commands: string[]
|
|
21
|
+
maxSize: number
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* REPL session manager
|
|
25
|
+
*/
|
|
26
|
+
export declare class REPL {
|
|
27
|
+
private options: REPLOptions;
|
|
28
|
+
private running: boolean;
|
|
29
|
+
private history: REPLHistory;
|
|
30
|
+
private historyIndex: number;
|
|
31
|
+
constructor(options: REPLOptions);
|
|
32
|
+
start(): Promise<void>;
|
|
33
|
+
stop(): void;
|
|
34
|
+
private readInput(): Promise<string>;
|
|
35
|
+
private executeCommand(input: string): Promise<void>;
|
|
36
|
+
private parseCommand(input: string): string[];
|
|
37
|
+
private findCommand(name: string): REPLCommand | undefined;
|
|
38
|
+
private showHelp(): void;
|
|
39
|
+
private showHistory(): void;
|
|
40
|
+
private addToHistory(command: string): void;
|
|
41
|
+
private historyBack(): string | undefined;
|
|
42
|
+
private historyForward(): string | undefined;
|
|
43
|
+
private autocomplete(partial: string): string[];
|
|
44
|
+
private loadHistory(): Promise<void>;
|
|
45
|
+
private saveHistory(): Promise<void>;
|
|
46
|
+
searchHistory(query: string): string[];
|
|
47
|
+
clearHistory(): void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Context manager for REPL sessions
|
|
51
|
+
* Maintains state across commands
|
|
52
|
+
*/
|
|
53
|
+
export declare class REPLContext {
|
|
54
|
+
private variables: Map<string, any>;
|
|
55
|
+
private workingDirectory: string;
|
|
56
|
+
set(key: string, value: any): void;
|
|
57
|
+
get(key: string): any;
|
|
58
|
+
has(key: string): boolean;
|
|
59
|
+
delete(key: string): void;
|
|
60
|
+
getAll(): Record<string, any>;
|
|
61
|
+
clear(): void;
|
|
62
|
+
setWorkingDirectory(path: string): void;
|
|
63
|
+
getWorkingDirectory(): string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Command builder for creating REPL commands
|
|
67
|
+
*/
|
|
68
|
+
export declare class REPLCommandBuilder {
|
|
69
|
+
private command: Partial<REPLCommand>;
|
|
70
|
+
name(name: string): this;
|
|
71
|
+
description(description: string): this;
|
|
72
|
+
aliases(aliases: string[]): this;
|
|
73
|
+
handler(handler: (args: string[]) => Promise<void> | void): this;
|
|
74
|
+
autocomplete(fn: (partial: string) => string[]): this;
|
|
75
|
+
build(): REPLCommand;
|
|
76
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Suggest similar commands based on typo
|
|
3
|
+
*/
|
|
4
|
+
export declare function suggestCommand(input: string, availableCommands: string[], threshold?: any): string[];
|
|
5
|
+
/**
|
|
6
|
+
* Format suggestion message
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatSuggestion(input: string, suggestions: string[]): string;
|
|
9
|
+
/**
|
|
10
|
+
* Check if input is likely a typo of any available command
|
|
11
|
+
*/
|
|
12
|
+
export declare function isLikelyTypo(input: string, availableCommands: string[]): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Get contextual help based on current command
|
|
15
|
+
*/
|
|
16
|
+
export declare function getContextualHelp(currentCommand: string, categories: CommandCategory[]): string;
|
|
17
|
+
/**
|
|
18
|
+
* Search commands by keyword
|
|
19
|
+
*/
|
|
20
|
+
export declare function searchCommands(query: string, categories: CommandCategory[]): Array<{ command: CommandInfo; category: string }>;
|
|
21
|
+
/**
|
|
22
|
+
* Autocomplete suggestions for partial input
|
|
23
|
+
*/
|
|
24
|
+
export declare function autocomplete(partial: string, availableCommands: string[], maxResults?: any): string[];
|
|
25
|
+
export declare function suggestFlags(partial: string, availableFlags: FlagInfo[]): FlagInfo[];
|
|
26
|
+
/**
|
|
27
|
+
* Format flag suggestions
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatFlagSuggestions(flags: FlagInfo[]): string;
|
|
30
|
+
/**
|
|
31
|
+
* Get command usage example
|
|
32
|
+
*/
|
|
33
|
+
export declare function getCommandUsage(command: CommandInfo): string;
|
|
34
|
+
export declare function validateCommand(input: string, availableCommands: string[], requiredFlags?: string[]): ValidationResult;
|
|
35
|
+
/**
|
|
36
|
+
* Command categories for contextual help
|
|
37
|
+
*/
|
|
38
|
+
export declare interface CommandCategory {
|
|
39
|
+
name: string
|
|
40
|
+
description: string
|
|
41
|
+
commands: CommandInfo[]
|
|
42
|
+
}
|
|
43
|
+
export declare interface CommandInfo {
|
|
44
|
+
name: string
|
|
45
|
+
description: string
|
|
46
|
+
aliases?: string[]
|
|
47
|
+
examples?: string[]
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Suggest flags based on partial input
|
|
51
|
+
*/
|
|
52
|
+
export declare interface FlagInfo {
|
|
53
|
+
name: string
|
|
54
|
+
alias?: string
|
|
55
|
+
description: string
|
|
56
|
+
type: 'boolean' | 'string' | 'number'
|
|
57
|
+
required?: boolean
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Validate command and suggest fixes
|
|
61
|
+
*/
|
|
62
|
+
export declare interface ValidationResult {
|
|
63
|
+
valid: boolean
|
|
64
|
+
errors: string[]
|
|
65
|
+
warnings: string[]
|
|
66
|
+
suggestions: string[]
|
|
67
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format data as a table
|
|
3
|
+
*/
|
|
4
|
+
export declare function formatTable(options: TableOptions): string;
|
|
5
|
+
/**
|
|
6
|
+
* Format data as a tree
|
|
7
|
+
*/
|
|
8
|
+
export declare function formatTree(nodes: TreeNode[], options?: TreeOptions): string;
|
|
9
|
+
/**
|
|
10
|
+
* Format a progress bar
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatProgressBar(options: ProgressBarOptions): string;
|
|
13
|
+
/**
|
|
14
|
+
* Format bytes as human-readable size
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatBytes(bytes: number, decimals?: any): string;
|
|
17
|
+
/**
|
|
18
|
+
* Format duration as human-readable time
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatDuration(ms: number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Format list with bullets
|
|
23
|
+
*/
|
|
24
|
+
export declare function formatList(items: string[], bullet?: any): string;
|
|
25
|
+
/**
|
|
26
|
+
* Format key-value pairs
|
|
27
|
+
*/
|
|
28
|
+
export declare function formatKeyValue(data: Record<string, any>, options?: { indent?: string; separator?: string }): string;
|
|
29
|
+
/**
|
|
30
|
+
* Table formatting utilities for CLI output
|
|
31
|
+
* Better table rendering with borders, alignment, colors
|
|
32
|
+
*/
|
|
33
|
+
export declare interface TableColumn {
|
|
34
|
+
key: string
|
|
35
|
+
label: string
|
|
36
|
+
width?: number
|
|
37
|
+
align?: 'left' | 'right' | 'center'
|
|
38
|
+
formatter?: (value: any) => string
|
|
39
|
+
}
|
|
40
|
+
export declare interface TableOptions {
|
|
41
|
+
columns: TableColumn[]
|
|
42
|
+
data: Record<string, any>[]
|
|
43
|
+
border?: boolean
|
|
44
|
+
header?: boolean
|
|
45
|
+
compact?: boolean
|
|
46
|
+
maxWidth?: number
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Format data as a tree structure
|
|
50
|
+
*/
|
|
51
|
+
export declare interface TreeNode {
|
|
52
|
+
label: string
|
|
53
|
+
children?: TreeNode[]
|
|
54
|
+
metadata?: Record<string, any>
|
|
55
|
+
}
|
|
56
|
+
export declare interface TreeOptions {
|
|
57
|
+
indent?: string
|
|
58
|
+
showMetadata?: boolean
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Create a simple progress bar
|
|
62
|
+
*/
|
|
63
|
+
export declare interface ProgressBarOptions {
|
|
64
|
+
total: number
|
|
65
|
+
current: number
|
|
66
|
+
width?: number
|
|
67
|
+
format?: string
|
|
68
|
+
complete?: string
|
|
69
|
+
incomplete?: string
|
|
70
|
+
}
|
|
File without changes
|