@l-v-yonsama/multi-platform-database-drivers 1.1.2 → 1.3.0

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 (123) hide show
  1. package/built/src/drivers/AwsDriver.d.ts +6 -0
  2. package/built/src/drivers/AwsDriver.js +84 -4
  3. package/built/src/drivers/AwsDriver.js.map +1 -1
  4. package/built/src/drivers/RedisDriver.d.ts +5 -2
  5. package/built/src/drivers/RedisDriver.js +67 -0
  6. package/built/src/drivers/RedisDriver.js.map +1 -1
  7. package/built/src/drivers/aws/AwsCloudFormationServiceClient.d.ts +35 -0
  8. package/built/src/drivers/aws/AwsCloudFormationServiceClient.js +197 -0
  9. package/built/src/drivers/aws/AwsCloudFormationServiceClient.js.map +1 -0
  10. package/built/src/drivers/aws/AwsCloudwatchServiceClient.js +1 -4
  11. package/built/src/drivers/aws/AwsCloudwatchServiceClient.js.map +1 -1
  12. package/built/src/drivers/aws/AwsDynamoServiceClient.js +1 -4
  13. package/built/src/drivers/aws/AwsDynamoServiceClient.js.map +1 -1
  14. package/built/src/drivers/aws/AwsS3ServiceClient.js +4 -6
  15. package/built/src/drivers/aws/AwsS3ServiceClient.js.map +1 -1
  16. package/built/src/drivers/aws/AwsSESServiceClient.js +23 -0
  17. package/built/src/drivers/aws/AwsSESServiceClient.js.map +1 -1
  18. package/built/src/drivers/aws/AwsSQSServiceClient.d.ts +1 -0
  19. package/built/src/drivers/aws/AwsSQSServiceClient.js +32 -0
  20. package/built/src/drivers/aws/AwsSQSServiceClient.js.map +1 -1
  21. package/built/src/drivers/aws/AwsSecretsManagerServiceClient.d.ts +19 -0
  22. package/built/src/drivers/aws/AwsSecretsManagerServiceClient.js +118 -0
  23. package/built/src/drivers/aws/AwsSecretsManagerServiceClient.js.map +1 -0
  24. package/built/src/drivers/aws/AwsServiceClient.d.ts +1 -0
  25. package/built/src/drivers/aws/AwsServiceClient.js +11 -0
  26. package/built/src/drivers/aws/AwsServiceClient.js.map +1 -1
  27. package/built/src/drivers/aws/AwsSsmServiceClient.d.ts +19 -0
  28. package/built/src/drivers/aws/AwsSsmServiceClient.js +116 -0
  29. package/built/src/drivers/aws/AwsSsmServiceClient.js.map +1 -0
  30. package/built/src/drivers/aws/index.d.ts +3 -0
  31. package/built/src/drivers/aws/index.js +3 -0
  32. package/built/src/drivers/aws/index.js.map +1 -1
  33. package/built/src/helpers/prompts/AwsPromptHelper.js +93 -2
  34. package/built/src/helpers/prompts/AwsPromptHelper.js.map +1 -1
  35. package/built/src/resource/DbResource.d.ts +21 -3
  36. package/built/src/resource/DbResource.js +82 -1
  37. package/built/src/resource/DbResource.js.map +1 -1
  38. package/built/src/types/drivers/ScanParams.d.ts +15 -1
  39. package/built/src/types/resource/AwsCfnStackAttributes.d.ts +164 -0
  40. package/built/src/types/resource/AwsCfnStackAttributes.js +56 -0
  41. package/built/src/types/resource/AwsCfnStackAttributes.js.map +1 -0
  42. package/built/src/types/resource/AwsSESIdentityAttributes.d.ts +17 -0
  43. package/built/src/types/resource/AwsSESIdentityAttributes.js +3 -0
  44. package/built/src/types/resource/AwsSESIdentityAttributes.js.map +1 -0
  45. package/built/src/types/resource/AwsSQSAttributes.d.ts +1 -0
  46. package/built/src/types/resource/AwsSecretAttributes.d.ts +6 -0
  47. package/built/src/types/resource/AwsSecretAttributes.js +3 -0
  48. package/built/src/types/resource/AwsSecretAttributes.js.map +1 -0
  49. package/built/src/types/resource/AwsServiceType.d.ts +4 -1
  50. package/built/src/types/resource/AwsServiceType.js +3 -0
  51. package/built/src/types/resource/AwsServiceType.js.map +1 -1
  52. package/built/src/types/resource/AwsSsmParameterAttributes.d.ts +12 -0
  53. package/built/src/types/resource/AwsSsmParameterAttributes.js +3 -0
  54. package/built/src/types/resource/AwsSsmParameterAttributes.js.map +1 -0
  55. package/built/src/types/resource/ConnectionSetting.d.ts +2 -2
  56. package/built/src/types/resource/ConnectionSetting.js.map +1 -1
  57. package/built/src/types/resource/ResourceType.d.ts +5 -0
  58. package/built/src/types/resource/ResourceType.js +5 -0
  59. package/built/src/types/resource/ResourceType.js.map +1 -1
  60. package/built/src/types/resource/index.d.ts +4 -0
  61. package/built/src/types/resource/index.js +4 -0
  62. package/built/src/types/resource/index.js.map +1 -1
  63. package/built/src/utils/cfn/applicationDiagram.d.ts +2 -0
  64. package/built/src/utils/cfn/applicationDiagram.js +134 -0
  65. package/built/src/utils/cfn/applicationDiagram.js.map +1 -0
  66. package/built/src/utils/cfn/applicationRelations.d.ts +28 -0
  67. package/built/src/utils/cfn/applicationRelations.js +338 -0
  68. package/built/src/utils/cfn/applicationRelations.js.map +1 -0
  69. package/built/src/utils/cfn/architectureDiagram.d.ts +3 -0
  70. package/built/src/utils/cfn/architectureDiagram.js +238 -0
  71. package/built/src/utils/cfn/architectureDiagram.js.map +1 -0
  72. package/built/src/utils/cfn/architectureTopology.d.ts +128 -0
  73. package/built/src/utils/cfn/architectureTopology.js +523 -0
  74. package/built/src/utils/cfn/architectureTopology.js.map +1 -0
  75. package/built/src/utils/cfn/cfnDependencyGraphDiagram.d.ts +2 -0
  76. package/built/src/utils/cfn/cfnDependencyGraphDiagram.js +198 -0
  77. package/built/src/utils/cfn/cfnDependencyGraphDiagram.js.map +1 -0
  78. package/built/src/utils/cfn/diagramFileModel.d.ts +2 -0
  79. package/built/src/utils/cfn/diagramFileModel.js +178 -0
  80. package/built/src/utils/cfn/diagramFileModel.js.map +1 -0
  81. package/built/src/utils/cfn/drawioApplicationDiagram.d.ts +2 -0
  82. package/built/src/utils/cfn/drawioApplicationDiagram.js +197 -0
  83. package/built/src/utils/cfn/drawioApplicationDiagram.js.map +1 -0
  84. package/built/src/utils/cfn/drawioInfrastructureDiagrams.d.ts +4 -0
  85. package/built/src/utils/cfn/drawioInfrastructureDiagrams.js +444 -0
  86. package/built/src/utils/cfn/drawioInfrastructureDiagrams.js.map +1 -0
  87. package/built/src/utils/cfn/drawioXml.d.ts +25 -0
  88. package/built/src/utils/cfn/drawioXml.js +53 -0
  89. package/built/src/utils/cfn/drawioXml.js.map +1 -0
  90. package/built/src/utils/cfn/generateDiagram.d.ts +2 -0
  91. package/built/src/utils/cfn/generateDiagram.js +23 -0
  92. package/built/src/utils/cfn/generateDiagram.js.map +1 -0
  93. package/built/src/utils/cfn/icons.d.ts +1 -0
  94. package/built/src/utils/cfn/icons.js +60 -0
  95. package/built/src/utils/cfn/icons.js.map +1 -0
  96. package/built/src/utils/cfn/index.d.ts +11 -0
  97. package/built/src/utils/cfn/index.js +33 -0
  98. package/built/src/utils/cfn/index.js.map +1 -0
  99. package/built/src/utils/cfn/intrinsics.d.ts +12 -0
  100. package/built/src/utils/cfn/intrinsics.js +158 -0
  101. package/built/src/utils/cfn/intrinsics.js.map +1 -0
  102. package/built/src/utils/cfn/mermaidFlowchart.d.ts +3 -0
  103. package/built/src/utils/cfn/mermaidFlowchart.js +14 -0
  104. package/built/src/utils/cfn/mermaidFlowchart.js.map +1 -0
  105. package/built/src/utils/cfn/multiAzDeploymentDataPaths.d.ts +27 -0
  106. package/built/src/utils/cfn/multiAzDeploymentDataPaths.js +257 -0
  107. package/built/src/utils/cfn/multiAzDeploymentDataPaths.js.map +1 -0
  108. package/built/src/utils/cfn/naming.d.ts +6 -0
  109. package/built/src/utils/cfn/naming.js +33 -0
  110. package/built/src/utils/cfn/naming.js.map +1 -0
  111. package/built/src/utils/cfn/resourceDependencies.d.ts +2 -0
  112. package/built/src/utils/cfn/resourceDependencies.js +33 -0
  113. package/built/src/utils/cfn/resourceDependencies.js.map +1 -0
  114. package/built/src/utils/cfn/templateParsing.d.ts +3 -0
  115. package/built/src/utils/cfn/templateParsing.js +73 -0
  116. package/built/src/utils/cfn/templateParsing.js.map +1 -0
  117. package/built/src/utils/cfn/viewpoints.d.ts +3 -0
  118. package/built/src/utils/cfn/viewpoints.js +122 -0
  119. package/built/src/utils/cfn/viewpoints.js.map +1 -0
  120. package/built/src/utils/index.d.ts +1 -0
  121. package/built/src/utils/index.js +1 -0
  122. package/built/src/utils/index.js.map +1 -1
  123. package/package.json +9 -1
@@ -0,0 +1,164 @@
1
+ import { StackStatus } from '@aws-sdk/client-cloudformation';
2
+ export type AwsCfnStackResourceDependency = {
3
+ logicalId: string;
4
+ via: 'Ref' | 'GetAtt' | 'DependsOn' | 'ImportValue';
5
+ };
6
+ export type AwsCfnStackResource = {
7
+ logicalId: string;
8
+ physicalId?: string;
9
+ resourceType: string;
10
+ dependsOn?: AwsCfnStackResourceDependency[];
11
+ };
12
+ export type AwsCfnStackAttributes = {
13
+ stackStatus: string;
14
+ creationTime?: Date;
15
+ resources: AwsCfnStackResource[];
16
+ };
17
+ export declare const ACTIVE_STATUSES: StackStatus[];
18
+ export declare const IN_PROGRESS_STATUSES: StackStatus[];
19
+ export declare const COMPLETED_STATUSES: StackStatus[];
20
+ export declare const DELETED_STATUSES: StackStatus[];
21
+ export declare const FAILED_STATUSES: StackStatus[];
22
+ export type Refable<T = any> = T | {
23
+ Ref: string;
24
+ } | {
25
+ '!Ref': string;
26
+ } | {
27
+ 'Fn::GetAtt': [string, string];
28
+ } | {
29
+ '!GetAtt': [string, string];
30
+ } | {
31
+ 'Fn::Sub': string | [string, Record<string, any>];
32
+ } | {
33
+ '!Sub': string | [string, Record<string, any>];
34
+ } | {
35
+ 'Fn::Join': [string, Refable[]];
36
+ } | {
37
+ '!Join': [string, Refable[]];
38
+ } | {
39
+ 'Fn::If': [string, Refable, Refable];
40
+ } | {
41
+ '!If': [string, Refable, Refable];
42
+ } | {
43
+ 'Fn::ImportValue': Refable;
44
+ } | {
45
+ '!ImportValue': Refable;
46
+ } | {
47
+ 'Fn::Select': [number | string, Refable];
48
+ } | {
49
+ '!Select': [number | string, Refable];
50
+ } | {
51
+ 'Fn::Split': [string, Refable];
52
+ } | {
53
+ '!Split': [string, Refable];
54
+ } | {
55
+ 'Fn::Base64': Refable;
56
+ } | {
57
+ '!Base64': Refable;
58
+ } | {
59
+ 'Fn::FindInMap': [string, string, string];
60
+ } | {
61
+ 'Fn::Equals': [Refable, Refable];
62
+ } | {
63
+ 'Fn::And': Refable[];
64
+ } | {
65
+ 'Fn::Or': Refable[];
66
+ } | {
67
+ 'Fn::Not': [Refable];
68
+ };
69
+ export interface TemplateParameter {
70
+ Type: string;
71
+ Default?: any;
72
+ Description?: string;
73
+ AllowedValues?: any[];
74
+ AllowedPattern?: string;
75
+ MinLength?: number;
76
+ MaxLength?: number;
77
+ MinValue?: number;
78
+ MaxValue?: number;
79
+ ConstraintDescription?: string;
80
+ NoEcho?: boolean;
81
+ }
82
+ export interface TemplateResource {
83
+ Type: string;
84
+ Properties?: Record<string, Refable>;
85
+ DependsOn?: string | string[];
86
+ Condition?: string;
87
+ Metadata?: Record<string, any>;
88
+ }
89
+ export interface TemplateOutput {
90
+ Description?: string;
91
+ Value: Refable;
92
+ Export?: {
93
+ Name: Refable;
94
+ };
95
+ Condition?: string;
96
+ }
97
+ export interface CloudFormationTemplate {
98
+ AWSTemplateFormatVersion?: string;
99
+ Description?: string;
100
+ Parameters?: Record<string, TemplateParameter>;
101
+ Mappings?: Record<string, Record<string, Record<string, string>>>;
102
+ Conditions?: Record<string, any>;
103
+ Resources: Record<string, TemplateResource>;
104
+ Outputs?: Record<string, TemplateOutput>;
105
+ Transform?: string | string[];
106
+ Metadata?: Record<string, any>;
107
+ }
108
+ export type RefValue = {
109
+ type: 'plain' | 'Ref' | 'GetAtt' | 'ImportValue';
110
+ value: string;
111
+ rawValue: Refable;
112
+ };
113
+ export type DiagramDependencyTo = {
114
+ kind: 'Resources' | 'Parameters' | 'Outputs';
115
+ logicalId: string;
116
+ fileIndex?: number;
117
+ via?: 'Ref' | 'GetAtt' | 'DependsOn' | 'ImportValue';
118
+ };
119
+ export type DiagramOutput = {
120
+ id: string;
121
+ value: {
122
+ logicalId: string;
123
+ };
124
+ export: {
125
+ name: string;
126
+ rawName: string;
127
+ };
128
+ };
129
+ export type DiagramFile = {
130
+ fileIndex: number;
131
+ fileName: string;
132
+ templateSource?: string;
133
+ parameterValues?: Record<string, string>;
134
+ pseudoParameterValues?: Record<string, string>;
135
+ groupName: string;
136
+ groupId: string;
137
+ resouces: string[];
138
+ parameters: string[];
139
+ cfnTemplate: CloudFormationTemplate;
140
+ dependencies: {
141
+ from: string;
142
+ to: DiagramDependencyTo;
143
+ }[];
144
+ outputs: DiagramOutput[];
145
+ };
146
+ export type DiagramViewpoint = 'ApplicationView' | 'InfrastructureView' | 'SecurityView' | 'DBView' | 'OperationsView' | 'CloudFormationView';
147
+ export type AuxiliaryResourceTreatment = 'MergeIntoLabel' | 'SeparateGroup' | 'Omit';
148
+ export type GenerateDiagramParams = {
149
+ list: {
150
+ fileName: string;
151
+ templateJSONString: string;
152
+ templateSource?: string;
153
+ parameterValues?: Record<string, string>;
154
+ pseudoParameterValues?: Record<string, string>;
155
+ }[];
156
+ mode: 'ApplicationDiagram' | 'CfnDependencyGraph' | 'MultiAzDeploymentDataPaths' | 'ArchitectureDiagram';
157
+ viewpoint?: DiagramViewpoint;
158
+ auxiliaryTreatment?: AuxiliaryResourceTreatment;
159
+ options?: {
160
+ includeParameters?: boolean;
161
+ includeOutputs?: boolean;
162
+ includeLegend?: boolean;
163
+ };
164
+ };
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FAILED_STATUSES = exports.DELETED_STATUSES = exports.COMPLETED_STATUSES = exports.IN_PROGRESS_STATUSES = exports.ACTIVE_STATUSES = void 0;
4
+ exports.ACTIVE_STATUSES = [
5
+ 'CREATE_IN_PROGRESS',
6
+ 'UPDATE_COMPLETE',
7
+ 'DELETE_FAILED',
8
+ 'REVIEW_IN_PROGRESS',
9
+ 'ROLLBACK_IN_PROGRESS',
10
+ 'UPDATE_ROLLBACK_IN_PROGRESS',
11
+ 'CREATE_COMPLETE',
12
+ 'UPDATE_ROLLBACK_COMPLETE',
13
+ 'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS',
14
+ 'ROLLBACK_COMPLETE',
15
+ 'ROLLBACK_FAILED',
16
+ 'CREATE_FAILED',
17
+ 'UPDATE_ROLLBACK_FAILED',
18
+ 'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS',
19
+ 'UPDATE_IN_PROGRESS',
20
+ 'UPDATE_FAILED',
21
+ 'DELETE_IN_PROGRESS',
22
+ 'IMPORT_COMPLETE',
23
+ 'IMPORT_IN_PROGRESS',
24
+ 'IMPORT_ROLLBACK_IN_PROGRESS',
25
+ 'IMPORT_ROLLBACK_FAILED',
26
+ 'IMPORT_ROLLBACK_COMPLETE',
27
+ ];
28
+ exports.IN_PROGRESS_STATUSES = [
29
+ 'CREATE_IN_PROGRESS',
30
+ 'ROLLBACK_IN_PROGRESS',
31
+ 'DELETE_IN_PROGRESS',
32
+ 'UPDATE_IN_PROGRESS',
33
+ 'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS',
34
+ 'UPDATE_ROLLBACK_IN_PROGRESS',
35
+ 'UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS',
36
+ 'REVIEW_IN_PROGRESS',
37
+ 'IMPORT_IN_PROGRESS',
38
+ 'IMPORT_ROLLBACK_IN_PROGRESS',
39
+ ];
40
+ exports.COMPLETED_STATUSES = [
41
+ 'CREATE_COMPLETE',
42
+ 'UPDATE_COMPLETE',
43
+ 'UPDATE_ROLLBACK_COMPLETE',
44
+ 'IMPORT_COMPLETE',
45
+ 'IMPORT_ROLLBACK_COMPLETE',
46
+ 'ROLLBACK_COMPLETE',
47
+ ];
48
+ exports.DELETED_STATUSES = ['DELETE_COMPLETE'];
49
+ exports.FAILED_STATUSES = [
50
+ 'CREATE_FAILED',
51
+ 'ROLLBACK_FAILED',
52
+ 'DELETE_FAILED',
53
+ 'UPDATE_ROLLBACK_FAILED',
54
+ 'IMPORT_ROLLBACK_FAILED',
55
+ ];
56
+ //# sourceMappingURL=AwsCfnStackAttributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AwsCfnStackAttributes.js","sourceRoot":"","sources":["../../../../src/types/resource/AwsCfnStackAttributes.ts"],"names":[],"mappings":";;;AAoCa,QAAA,eAAe,GAAkB;IAC5C,oBAAoB;IACpB,iBAAiB;IACjB,eAAe;IACf,oBAAoB;IACpB,sBAAsB;IACtB,6BAA6B;IAC7B,iBAAiB;IACjB,0BAA0B;IAC1B,8CAA8C;IAC9C,mBAAmB;IACnB,iBAAiB;IACjB,eAAe;IACf,wBAAwB;IACxB,qCAAqC;IACrC,oBAAoB;IACpB,eAAe;IACf,oBAAoB;IACpB,iBAAiB;IACjB,oBAAoB;IACpB,6BAA6B;IAC7B,wBAAwB;IACxB,0BAA0B;CACV,CAAC;AAEN,QAAA,oBAAoB,GAAkB;IACjD,oBAAoB;IACpB,sBAAsB;IACtB,oBAAoB;IACpB,oBAAoB;IACpB,qCAAqC;IACrC,6BAA6B;IAC7B,8CAA8C;IAC9C,oBAAoB;IACpB,oBAAoB;IACpB,6BAA6B;CACb,CAAC;AAEN,QAAA,kBAAkB,GAAkB;IAC/C,iBAAiB;IACjB,iBAAiB;IACjB,0BAA0B;IAC1B,iBAAiB;IACjB,0BAA0B;IAC1B,mBAAmB;CACH,CAAC;AAEN,QAAA,gBAAgB,GAAkB,CAAC,iBAAiB,CAAkB,CAAC;AAEvE,QAAA,eAAe,GAAkB;IAC5C,eAAe;IACf,iBAAiB;IACjB,eAAe;IACf,wBAAwB;IACxB,wBAAwB;CACR,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare const SESIdentityType: {
2
+ readonly EmailAddress: 'EmailAddress';
3
+ readonly Domain: 'Domain';
4
+ };
5
+ export type SESIdentityType = (typeof SESIdentityType)[keyof typeof SESIdentityType];
6
+ export declare const SESVerificationStatus: {
7
+ readonly Failed: 'Failed';
8
+ readonly NotStarted: 'NotStarted';
9
+ readonly Pending: 'Pending';
10
+ readonly Success: 'Success';
11
+ readonly TemporaryFailure: 'TemporaryFailure';
12
+ };
13
+ export type SESVerificationStatus = (typeof SESVerificationStatus)[keyof typeof SESVerificationStatus];
14
+ export type AwsSESIdentityAttributes = {
15
+ identityType: SESIdentityType;
16
+ verificationStatus?: SESVerificationStatus;
17
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AwsSESIdentityAttributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AwsSESIdentityAttributes.js","sourceRoot":"","sources":["../../../../src/types/resource/AwsSESIdentityAttributes.ts"],"names":[],"mappings":""}
@@ -16,5 +16,6 @@ export type AwsSQSAttributes = {
16
16
  ApproximateNumberOfMessagesDelayed?: number;
17
17
  CreatedTimestamp?: number;
18
18
  LastModifiedTimestamp?: number;
19
+ isDlq?: boolean;
19
20
  [key: string]: any;
20
21
  };
@@ -0,0 +1,6 @@
1
+ export type AwsSecretAttributes = {
2
+ description?: string;
3
+ lastChangedDate?: Date;
4
+ lastAccessedDate?: Date;
5
+ rotationEnabled?: boolean;
6
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AwsSecretAttributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AwsSecretAttributes.js","sourceRoot":"","sources":["../../../../src/types/resource/AwsSecretAttributes.ts"],"names":[],"mappings":""}
@@ -4,6 +4,9 @@ export declare const AwsServiceType: {
4
4
  readonly SES: "SES";
5
5
  readonly Cloudwatch: "Cloudwatch";
6
6
  readonly DynamoDB: "DynamoDB";
7
+ readonly SSM: "SSM";
8
+ readonly SecretsManager: "SecretsManager";
9
+ readonly CloudFormation: "CloudFormation";
7
10
  };
8
11
  export type AwsServiceType = (typeof AwsServiceType)[keyof typeof AwsServiceType];
9
- export declare const AwsServiceTypeValues: ("S3" | "SQS" | "SES" | "Cloudwatch" | "DynamoDB")[];
12
+ export declare const AwsServiceTypeValues: ("S3" | "SQS" | "SES" | "Cloudwatch" | "DynamoDB" | "SSM" | "SecretsManager" | "CloudFormation")[];
@@ -7,6 +7,9 @@ exports.AwsServiceType = {
7
7
  SES: 'SES',
8
8
  Cloudwatch: 'Cloudwatch',
9
9
  DynamoDB: 'DynamoDB',
10
+ SSM: 'SSM',
11
+ SecretsManager: 'SecretsManager',
12
+ CloudFormation: 'CloudFormation',
10
13
  };
11
14
  exports.AwsServiceTypeValues = Object.values(exports.AwsServiceType);
12
15
  //# sourceMappingURL=AwsServiceType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AwsServiceType.js","sourceRoot":"","sources":["../../../../src/types/resource/AwsServiceType.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAIE,QAAA,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"AwsServiceType.js","sourceRoot":"","sources":["../../../../src/types/resource/AwsServiceType.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,KAAK;IACV,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;CACxB,CAAC;AAIE,QAAA,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ export declare const SsmParameterType: {
2
+ readonly String: 'String';
3
+ readonly StringList: 'StringList';
4
+ readonly SecureString: 'SecureString';
5
+ };
6
+ export type SsmParameterType = (typeof SsmParameterType)[keyof typeof SsmParameterType];
7
+ export type AwsSsmParameterAttributes = {
8
+ type: SsmParameterType;
9
+ lastModifiedDate?: Date;
10
+ version?: number;
11
+ tier?: string;
12
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AwsSsmParameterAttributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AwsSsmParameterAttributes.js","sourceRoot":"","sources":["../../../../src/types/resource/AwsSsmParameterAttributes.ts"],"names":[],"mappings":""}
@@ -16,10 +16,9 @@ export type ResourceFilterDetail = {
16
16
  value: string;
17
17
  };
18
18
  export type ResourceFilter = {
19
+ resourceName?: ResourceFilterDetail;
19
20
  schema?: ResourceFilterDetail;
20
21
  table?: ResourceFilterDetail;
21
- bucket?: ResourceFilterDetail;
22
- group?: ResourceFilterDetail;
23
22
  };
24
23
  export type SshSetting = {
25
24
  use: boolean;
@@ -43,6 +42,7 @@ export type AwsSetting = {
43
42
  region?: string;
44
43
  services: AwsServiceType[];
45
44
  s3ForcePathStyle?: boolean;
45
+ sessionToken?: string;
46
46
  };
47
47
  export type IamSolutionSetting = {
48
48
  grantType: 'client_credentials' | 'password' | 'refresh_token';
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionSetting.js","sourceRoot":"","sources":["../../../../src/types/resource/ConnectionSetting.ts"],"names":[],"mappings":";;;AAKa,QAAA,qBAAqB,GAAG;IACnC,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;CAChB,CAAC;AAKE,QAAA,2BAA2B,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAqB,CAAC,CAAC;AAiInE,QAAA,oBAAoB,GAAG;IAClC,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,oBAAoB;CAC9B,CAAC"}
1
+ {"version":3,"file":"ConnectionSetting.js","sourceRoot":"","sources":["../../../../src/types/resource/ConnectionSetting.ts"],"names":[],"mappings":";;;AAKa,QAAA,qBAAqB,GAAG;IACnC,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;IAC1B,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;CAChB,CAAC;AAKE,QAAA,2BAA2B,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAqB,CAAC,CAAC;AAqInE,QAAA,oBAAoB,GAAG;IAClC,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,oBAAoB;CAC9B,CAAC"}
@@ -17,6 +17,11 @@ export declare const ResourceType: {
17
17
  readonly LogGroup: "LogGroup";
18
18
  readonly LogStream: "LogStream";
19
19
  readonly Subscription: "Subscription";
20
+ readonly Identity: "Identity";
21
+ readonly SsmParameter: "SsmParameter";
22
+ readonly SecretsManagerSecret: "SecretsManagerSecret";
23
+ readonly CfnStack: "CfnStack";
24
+ readonly Group: "Group";
20
25
  readonly KeycloakDatabase: "KeycloakDatabase";
21
26
  readonly IamRealm: "IamRealm";
22
27
  readonly IamGroup: "IamGroup";
@@ -20,6 +20,11 @@ exports.ResourceType = {
20
20
  LogGroup: 'LogGroup',
21
21
  LogStream: 'LogStream',
22
22
  Subscription: 'Subscription',
23
+ Identity: 'Identity',
24
+ SsmParameter: 'SsmParameter',
25
+ SecretsManagerSecret: 'SecretsManagerSecret',
26
+ CfnStack: 'CfnStack',
27
+ Group: 'Group',
23
28
  KeycloakDatabase: 'KeycloakDatabase',
24
29
  IamRealm: 'IamRealm',
25
30
  IamGroup: 'IamGroup',
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceType.js","sourceRoot":"","sources":["../../../../src/types/resource/ResourceType.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,UAAU,EAAE,YAAY;IACxB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,YAAY,EAAE,cAAc;IAE5B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,MA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EAAE,UAAU;IAEpB,aAAa,EAAE,eAAe;IAC9B,eAAe,EAAE,iBAAiB;IAElC,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;CAChB,CAAC"}
@@ -3,6 +3,10 @@ export * from './AwsServiceType';
3
3
  export * from './AwsSQSAttributes';
4
4
  export * from './AwsSupplyCredentialType';
5
5
  export * from './AwsDynamoTableAttributes';
6
+ export * from './AwsSESIdentityAttributes';
7
+ export * from './AwsSsmParameterAttributes';
8
+ export * from './AwsSecretAttributes';
9
+ export * from './AwsCfnStackAttributes';
6
10
  export * from './ConnectionSetting';
7
11
  export * from './DBType';
8
12
  export * from './ForeignKeyConstraint';
@@ -6,6 +6,10 @@ tslib_1.__exportStar(require("./AwsServiceType"), exports);
6
6
  tslib_1.__exportStar(require("./AwsSQSAttributes"), exports);
7
7
  tslib_1.__exportStar(require("./AwsSupplyCredentialType"), exports);
8
8
  tslib_1.__exportStar(require("./AwsDynamoTableAttributes"), exports);
9
+ tslib_1.__exportStar(require("./AwsSESIdentityAttributes"), exports);
10
+ tslib_1.__exportStar(require("./AwsSsmParameterAttributes"), exports);
11
+ tslib_1.__exportStar(require("./AwsSecretAttributes"), exports);
12
+ tslib_1.__exportStar(require("./AwsCfnStackAttributes"), exports);
9
13
  tslib_1.__exportStar(require("./ConnectionSetting"), exports);
10
14
  tslib_1.__exportStar(require("./DBType"), exports);
11
15
  tslib_1.__exportStar(require("./ForeignKeyConstraint"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/resource/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,2DAAiC;AACjC,6DAAmC;AACnC,oEAA0C;AAC1C,qEAA2C;AAC3C,8DAAoC;AACpC,mDAAyB;AACzB,iEAAuC;AACvC,yDAA+B;AAC/B,yDAA+B;AAC/B,wEAA8C;AAC9C,gEAAsC;AACtC,gEAAsC;AACtC,4DAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/resource/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,2DAAiC;AACjC,6DAAmC;AACnC,oEAA0C;AAC1C,qEAA2C;AAC3C,qEAA2C;AAC3C,sEAA4C;AAC5C,gEAAsC;AACtC,kEAAwC;AACxC,8DAAoC;AACpC,mDAAyB;AACzB,iEAAuC;AACvC,yDAA+B;AAC/B,yDAA+B;AAC/B,wEAA8C;AAC9C,gEAAsC;AACtC,gEAAsC;AACtC,4DAAkC"}
@@ -0,0 +1,2 @@
1
+ import { GenerateDiagramParams } from '../../types';
2
+ export declare const generateDiagramApplicationDiagram: (params: GenerateDiagramParams) => string;
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateDiagramApplicationDiagram = void 0;
4
+ const diagramFileModel_1 = require("./diagramFileModel");
5
+ const applicationRelations_1 = require("./applicationRelations");
6
+ const mermaidFlowchart_1 = require("./mermaidFlowchart");
7
+ const escape = (value) => value.replace(/["[\]<>]/g, '');
8
+ const layerTitle = {
9
+ ingress: 'Ingress',
10
+ compute: 'Compute',
11
+ messaging: 'Messaging',
12
+ data: 'Data',
13
+ };
14
+ const relationStyle = {
15
+ 'runtime-call': { color: '#2563eb', width: 2, edge: '-->' },
16
+ 'event-delivery': { color: '#d97706', width: 2, edge: '-.->' },
17
+ 'data-access': { color: '#059669', width: 2, edge: '-->' },
18
+ 'data-read': { color: '#059669', width: 2, edge: '-->' },
19
+ 'data-write': { color: '#7c3aed', width: 3, edge: '==>' },
20
+ 'network-route': { color: '#0891b2', width: 2, edge: '-.->' },
21
+ };
22
+ const generateDiagramApplicationDiagram = (params) => {
23
+ var _a, _b;
24
+ const files = (0, diagramFileModel_1.parseDiagramFiles)(Object.assign(Object.assign({}, params), { options: Object.assign(Object.assign({}, params.options), { includeOutputs: true, includeParameters: true }) }));
25
+ const nodes = (0, applicationRelations_1.getApplicationNodes)(files);
26
+ const relations = (0, applicationRelations_1.extractApplicationRelations)(files);
27
+ const unresolvedReferences = (0, applicationRelations_1.extractUnresolvedApplicationReferences)(files);
28
+ const ingressRoutes = (0, applicationRelations_1.getApplicationIngressRoutes)(files);
29
+ const contents = ['```mermaid', 'flowchart LR'];
30
+ const hiddenGatewayTypes = new Set([
31
+ 'AWS::ApiGateway::Resource',
32
+ 'AWS::ApiGateway::Method',
33
+ 'AWS::ApiGatewayV2::Route',
34
+ 'AWS::ApiGatewayV2::Integration',
35
+ ]);
36
+ const visibleNodes = nodes.filter((node) => !hiddenGatewayTypes.has(node.type));
37
+ const gatewayByFile = new Map();
38
+ visibleNodes.forEach((node) => {
39
+ if (node.type === 'AWS::ApiGateway::RestApi' ||
40
+ node.type === 'AWS::ApiGatewayV2::Api') {
41
+ gatewayByFile.set(node.fileIndex, node.id);
42
+ }
43
+ });
44
+ const visibleNodeId = new Map(nodes.map((node) => {
45
+ var _a;
46
+ return [
47
+ node.id,
48
+ hiddenGatewayTypes.has(node.type)
49
+ ? (_a = gatewayByFile.get(node.fileIndex)) !== null && _a !== void 0 ? _a : node.id
50
+ : node.id,
51
+ ];
52
+ }));
53
+ const visibleRelations = relations
54
+ .map((relation) => {
55
+ var _a, _b;
56
+ return (Object.assign(Object.assign({}, relation), { from: (_a = visibleNodeId.get(relation.from)) !== null && _a !== void 0 ? _a : relation.from, to: (_b = visibleNodeId.get(relation.to)) !== null && _b !== void 0 ? _b : relation.to }));
57
+ })
58
+ .filter((relation) => relation.from !== relation.to);
59
+ const labelCounts = new Map();
60
+ visibleNodes.forEach((node) => { var _a; return labelCounts.set(node.label, ((_a = labelCounts.get(node.label)) !== null && _a !== void 0 ? _a : 0) + 1); });
61
+ const visibleLayers = new Set(visibleNodes.map((node) => node.layer));
62
+ ['ingress', 'compute', 'messaging', 'data'].forEach((layer) => {
63
+ const layerNodes = visibleNodes.filter((node) => node.layer === layer);
64
+ if (layerNodes.length === 0)
65
+ return;
66
+ contents.push(` subgraph ${layer}["${layerTitle[layer]}"]`);
67
+ layerNodes.forEach((node) => {
68
+ var _a, _b;
69
+ const stackSuffix = ((_a = labelCounts.get(node.label)) !== null && _a !== void 0 ? _a : 0) > 1 ? ` (${node.fileName})` : '';
70
+ const routeList = (_b = ingressRoutes.get(node.id)) !== null && _b !== void 0 ? _b : [];
71
+ const routeSuffix = routeList.length > 0 ? ` [${routeList.join(', ')}]` : '';
72
+ contents.push(` ${node.id}["${escape(node.label + stackSuffix + routeSuffix)}"]`);
73
+ });
74
+ contents.push(' end');
75
+ });
76
+ visibleRelations.forEach((relation, index) => {
77
+ const style = relationStyle[relation.kind];
78
+ contents.push(` ${relation.from} ${style.edge}|${relation.label}| ${relation.to}`);
79
+ contents.push(` linkStyle ${index} stroke:${style.color},stroke-width:${style.width}px${style.edge === '-.->' ? ',stroke-dasharray: 5 5' : ''}`);
80
+ });
81
+ const firstNodeByLayer = ['ingress', 'compute', 'messaging', 'data']
82
+ .map((layer) => { var _a; return (_a = visibleNodes.find((node) => node.layer === layer)) === null || _a === void 0 ? void 0 : _a.id; })
83
+ .filter((id) => Boolean(id));
84
+ firstNodeByLayer.slice(0, -1).forEach((nodeId, index) => {
85
+ contents.push(` ${nodeId} ~~~ ${firstNodeByLayer[index + 1]}`);
86
+ });
87
+ if (visibleNodes.length === 0) {
88
+ contents.push(' empty["No application resources found"]');
89
+ }
90
+ if (unresolvedReferences.length > 0) {
91
+ contents.push(' subgraph notes["Notes"]');
92
+ unresolvedReferences.forEach((reference, index) => {
93
+ const note = escape(`Unresolved cross-stack reference: ${reference.source} references ${reference.reference} (${reference.reason})`);
94
+ contents.push(` unresolved_${index}["${note}"]`);
95
+ });
96
+ contents.push(' end');
97
+ }
98
+ if (((_a = params.options) === null || _a === void 0 ? void 0 : _a.includeLegend) !== false && visibleRelations.length > 0) {
99
+ contents.push(' subgraph legend["Relationship types"]');
100
+ contents.push(` relationship_legend["${(0, mermaidFlowchart_1.mermaidCompactLegendLabel)('Edge styles', [
101
+ 'Blue solid: runtime',
102
+ 'Orange dashed: event',
103
+ 'Green/purple solid: data',
104
+ 'Cyan dashed: network',
105
+ ])}"]`);
106
+ contents.push(' end');
107
+ }
108
+ contents.push(' classDef applicationNode fill:#ffffff,stroke:#64748b,color:#0f172a,stroke-width:1px');
109
+ if (visibleNodes.length > 0) {
110
+ contents.push(` class ${visibleNodes
111
+ .map((node) => node.id)
112
+ .join(',')} applicationNode`);
113
+ }
114
+ const layerStyle = {
115
+ ingress: 'fill:#e0f2fe,stroke:#0284c7,stroke-width:2px',
116
+ compute: 'fill:#ede9fe,stroke:#7c3aed,stroke-width:2px',
117
+ messaging: 'fill:#fef3c7,stroke:#d97706,stroke-width:2px',
118
+ data: 'fill:#dcfce7,stroke:#059669,stroke-width:2px',
119
+ };
120
+ ['ingress', 'compute', 'messaging', 'data'].forEach((layer) => {
121
+ if (visibleLayers.has(layer)) {
122
+ contents.push(` style ${layer} ${layerStyle[layer]}`);
123
+ }
124
+ });
125
+ contents.push(' classDef legendNode fill:#ffffff,stroke:#94a3b8,color:#334155,font-size:11px');
126
+ if (((_b = params.options) === null || _b === void 0 ? void 0 : _b.includeLegend) !== false && visibleRelations.length > 0) {
127
+ contents.push(' style legend fill:#f8fafc,stroke:#94a3b8,stroke-dasharray:4 3');
128
+ contents.push(' class relationship_legend legendNode');
129
+ }
130
+ contents.push('```');
131
+ return contents.join('\n');
132
+ };
133
+ exports.generateDiagramApplicationDiagram = generateDiagramApplicationDiagram;
134
+ //# sourceMappingURL=applicationDiagram.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applicationDiagram.js","sourceRoot":"","sources":["../../../../src/utils/cfn/applicationDiagram.ts"],"names":[],"mappings":";;;AACA,yDAAuD;AACvD,iEAMgC;AAChC,yDAA+D;AAE/D,MAAM,MAAM,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAEz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access' | 'data-read' | 'data-write' | 'network-route';
3
+ export type ApplicationRelation = {
4
+ from: string;
5
+ to: string;
6
+ label: string;
7
+ kind: ApplicationRelationKind;
8
+ propertyPath: string;
9
+ };
10
+ export type ApplicationNode = {
11
+ id: string;
12
+ fileIndex: number;
13
+ fileName: string;
14
+ logicalId: string;
15
+ type: string;
16
+ label: string;
17
+ layer: 'ingress' | 'compute' | 'messaging' | 'data';
18
+ };
19
+ export type UnresolvedApplicationReference = {
20
+ source: string;
21
+ reference: string;
22
+ propertyPath: string;
23
+ reason: string;
24
+ };
25
+ export declare const getApplicationIngressRoutes: (files: DiagramFile[]) => Map<string, string[]>;
26
+ export declare const getApplicationNodes: (files: DiagramFile[]) => ApplicationNode[];
27
+ export declare const extractApplicationRelations: (files: DiagramFile[]) => ApplicationRelation[];
28
+ export declare const extractUnresolvedApplicationReferences: (files: DiagramFile[]) => UnresolvedApplicationReference[];