Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: printable ascii diff #625

Merged
merged 4 commits into from
Oct 20, 2023
Merged

feat: printable ascii diff #625

merged 4 commits into from
Oct 20, 2023

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Oct 20, 2023

Fix the ASCII diff to not be buggy anymore.

Example diff:

├[~] service aws-appintegrations
│ └ resources
│    └[~] resource AWS::AppIntegrations::DataIntegration
│      └ properties
│         └ ScheduleConfig: - ScheduleConfig
│                           + ScheduleConfig
├[~] service aws-appsync
│ └ resources
│    ├[~] resource AWS::AppSync::ApiKey
│    │ └ properties
│    │    └[-] ApiKeyId: string
│    └[~] resource AWS::AppSync::FunctionConfiguration
│      └ attributes
│         └[+] Id: string
├[~] service aws-athena
│ └ resources
│    └[~] resource AWS::Athena::WorkGroup
│      └ attributes
│         └ WorkGroupConfigurationUpdates.EngineVersion.EffectiveEngineVersion: - string
│                                                                               + string
├[~] service aws-autoscaling
│ └ resources
│    └[~] resource AWS::AutoScaling::AutoScalingGroup
│      └ types
│         ├[~] type MemoryGiBPerVCpuRequest
│         │ └ properties
│         │    ├ Max: - number
│         │    │      + integer
│         │    └ Min: - number
│         │           + integer
│         └[~] type TotalLocalStorageGBRequest
│           └ properties
│              ├ Max: - number
│              │      + integer
│              └ Min: - number
│                     + integer
├[~] service aws-cloudformation
│ └ resources
│    └[~] resource AWS::CloudFormation::Stack
│      └ properties
│         └ TemplateURL: - string
│                        + string
├[~] service aws-cognito
│ └ resources
│    ├[~] resource AWS::Cognito::UserPool
│    │ ├  - tagInformation: undefined
│    │ │  + tagInformation: {"tagPropertyName":"UserPoolTags","variant":"map"}
│    │ ├ properties
│    │ │  └ UserPoolTags: - json
│    │ │                  + Map<string, string> ⇐ json
│    │ └ attributes
│    │    └[+] UserPoolId: string
│    └[~] resource AWS::Cognito::UserPoolGroup
│      ├ properties
│      │  └ Precedence: - integer
│      │                + number
│      └ attributes
│         └[+] Id: string
├[~] service aws-datapipeline
│ └ resources
│    └[~] resource AWS::DataPipeline::Pipeline
│      ├ properties
│      │  └ ParameterObjects: - Array<ParameterObject>
│      │                      + Array<ParameterObject>
│      └ attributes
│         └[+] Id: string
├[~] service aws-directoryservice
│ └ resources
│    └[~] resource AWS::DirectoryService::SimpleAD
│      ├ properties
│      │  └ Password: - string
│      │              + string
│      └ attributes
│         └[+] Id: string
├[~] service aws-dms
│ └ resources
│    └[~] resource AWS::DMS::ReplicationConfig
│      ├  - documentation: A replication configuration that you later provide to configure and start a AWS DMS Serverless replication
│      │  + documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dms-replicationconfig.html
│      └ properties
│         └[-] ReplicationConfigArn: string
├[~] service aws-docdb
│ └ resources
│    └[~] resource AWS::DocDB::DBCluster
│      └ attributes
│         └ Port: - integer ⇐ string
│                 + string
├[~] service aws-ec2
│ └ resources
│    └[~] resource AWS::EC2::Subnet
│      └ properties
│         ├[+] Ipv4NetmaskLength: integer
│         └[+] Ipv6NetmaskLength: integer
├[~] service aws-ecs
│ └ resources
│    └[~] resource AWS::ECS::Service
│      └ types
│         ├[~] type AwsVpcConfiguration
│         │ └ properties
│         │    └ Subnets: - Array<string>
│         │               + Array<string>
│         └[~] type LoadBalancer
│           └ properties
│              └ ContainerPort: - integer
│                               + integer
├[~] service aws-events
│ └ resources
│    ├[~] resource AWS::Events::Connection
│    │ └ properties
│    │    └ AuthorizationType: - string
│    │                         + string
│    ├[~] resource AWS::Events::EventBus
│    │ └ attributes
│    │    └ Policy: - json | string ⇐ string
│    │              + string
│    └[~] resource AWS::Events::Rule
│      └ attributes
│         └[+] Id: string
├[~] service aws-healthlake
│ └ resources
│    └[~] resource AWS::HealthLake::FHIRDatastore
│      └ attributes
│         ├ CreatedAt.Nanos: - integer
│         │                  + integer
│         └ CreatedAt.Seconds: - string
│                              + string
├[~] service aws-iam
│ └ resources
│    └[~] resource AWS::IAM::Group
│      └ attributes
│         └[+] Id: string
├[~] service aws-iot
│ └ resources
│    └[~] resource AWS::IoT::Policy
│      ├  - tagInformation: undefined
│      │  + tagInformation: {"tagPropertyName":"Tags","variant":"standard"}
│      └ properties
│         └[+] Tags: Array<tag>
├[~] service aws-iotthingsgraph
│ └ resources
│    └[~] resource AWS::IoTThingsGraph::FlowTemplate
│      └  - documentation: Resource Type definition for AWS::IoTThingsGraph::FlowTemplate
│         + documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotthingsgraph-flowtemplate.html
├[~] service aws-iottwinmaker
│ └ resources
│    ├[~] resource AWS::IoTTwinMaker::ComponentType
│    │ └ attributes
│    │    └ Status.Error: - json | Error ⇐ Error
│    │                    + Error
│    └[~] resource AWS::IoTTwinMaker::Entity
│      └ attributes
│         └ Status.Error: - json | Error ⇐ Error
│                         + Error
├[~] service aws-lightsail
│ └ resources
│    └[~] resource AWS::Lightsail::Instance
│      └ types
│         └[~] type Networking
│           └ properties
│              └ MonthlyTransfer: - MonthlyTransfer ⇐ integer
│                                 + MonthlyTransfer
├[~] service aws-managedblockchain
│ └ resources
│    └[~] resource AWS::ManagedBlockchain::Node
│      └ properties
│         └ MemberId: - string
│                     + string
├[~] service aws-medialive
│ └ resources
│    └[~] resource AWS::MediaLive::Input
│      └ attributes
│         ├ Destinations: - Array<InputDestinationRequest> ⇐ Array<string>
│         │               + Array<string>
│         └ Sources: - Array<InputSourceRequest> ⇐ Array<string>
│                    + Array<string>
├[~] service aws-msk
│ └ resources
│    ├[~] resource AWS::MSK::BatchScramSecret
│    │ └  - documentation: Resource Type definition for AWS::MSK::BatchScramSecret
│    │    + documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-batchscramsecret.html
│    └[~] resource AWS::MSK::ServerlessCluster
│      └  - documentation: Resource Type definition for AWS::MSK::ServerlessCluster
│         + documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-msk-serverlesscluster.html
├[~] service aws-networkmanager
│ └ resources
│    └[~] resource AWS::NetworkManager::ConnectPeer
│      └ attributes
│         ├ Configuration.CoreNetworkAddress: - string
│         │                                   + string
│         ├ Configuration.InsideCidrBlocks: - Array<string>
│         │                                 + Array<string>
│         ├ Configuration.PeerAddress: - string
│         │                            + string
│         └ Configuration.Protocol: - string
│                                   + string
├[~] service aws-nimblestudio
│ └ resources
│    └[~] resource AWS::NimbleStudio::StreamingImage
│      └ attributes
│         ├ EncryptionConfiguration.KeyArn: - string
│         │                                 + string
│         └ EncryptionConfiguration.KeyType: - string
│                                            + string
├[~] service aws-redshift
│ └ resources
│    ├[~] resource AWS::Redshift::EndpointAccess
│    │ └ attributes
│    │    └ VpcEndpoint.NetworkInterfaces: - Array<NetworkInterface>
│    │                                     + Array<NetworkInterface>
│    └[~] resource AWS::Redshift::EventSubscription
│      └  - documentation: The `AWS::Redshift::EventSubscription` resource creates an Amazon Redshift Event Subscription.
│         + documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-eventsubscription.html
├[~] service aws-s3objectlambda
│ └ resources
│    └[~] resource AWS::S3ObjectLambda::AccessPoint
│      └ attributes
│         ├ PublicAccessBlockConfiguration.BlockPublicAcls: - boolean
│         │                                                 + boolean
│         ├ PublicAccessBlockConfiguration.BlockPublicPolicy: - boolean
│         │                                                   + boolean
│         ├ PublicAccessBlockConfiguration.IgnorePublicAcls: - boolean
│         │                                                  + boolean
│         └ PublicAccessBlockConfiguration.RestrictPublicBuckets: - boolean
│                                                                 + boolean
├[~] service aws-sagemaker
│ └ resources
│    ├[~] resource AWS::SageMaker::InferenceExperiment
│    │ └ attributes
│    │    ├ EndpointMetadata.EndpointConfigName: - string
│    │    │                                      + string
│    │    ├ EndpointMetadata.EndpointName: - string
│    │    │                                + string
│    │    └ EndpointMetadata.EndpointStatus: - string
│    │                                       + string
│    └[~] resource AWS::SageMaker::Pipeline
│      ├ properties
│      │  └ PipelineDefinition: - PipelineDefinition | PipelineDefinition ⇐ json
│      │                        + PipelineDefinition ⇐ json
│      └ types
│         └[~] type PipelineDefinition
│           └ properties
│              ├ PipelineDefinitionBody: - string
│              │                         + string
│              └ PipelineDefinitionS3Location: - S3Location
│                                              + S3Location
├[~] service aws-sam
│ ├  - cloudFormationNamespace: AWS::Serverless
│ │  + cloudFormationNamespace: AWS::SAM
│ └ resources
│    ├[~] resource AWS::Serverless::Api
│    │ ├  - documentation: Definition of AWS::Serverless::Api
│    │ │  + documentation: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessapi
│    │ ├ properties
│    │ │  ├ EndpointConfiguration: - EndpointConfiguration | string
│    │ │  │                        + string | EndpointConfiguration
│    │ │  └ MinimumCompressionSize: - number
│    │ │                            + integer
│    │ └ types
│    │    └[~] type S3Location
│    │      └ properties
│    │         └ Version: - number
│    │                    + integer
│    ├[~] resource AWS::Serverless::Application
│    │ ├  - documentation: Definition of AWS::Serverless::Application
│    │ │  + documentation: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessapplication
│    │ └ properties
│    │    └ TimeoutInMinutes: - number
│    │                        + integer
│    ├[~] resource AWS::Serverless::Function
│    │ ├  - documentation: Definition of AWS::Serverless::Function
│    │ │  + documentation: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
│    │ ├ properties
│    │ │  ├ MemorySize: - number
│    │ │  │             + integer
│    │ │  ├ Policies: - string | Array<string | IAMPolicyDocument | SAMPolicyTemplate> | IAMPolicyDocument
│    │ │  │           + string | Array<string | IAMPolicyDocument | SAMPolicyTemplate> | IAMPolicyDocument ⇐ string | IAMPolicyDocument
│    │ │  ├ ReservedConcurrentExecutions: - number
│    │ │  │                               + integer
│    │ │  └ Timeout: - number
│    │ │             + integer
│    │ └ types
│    │    ├[~] type DeploymentPreference
│    │    │ └ properties
│    │    │    ├ Enabled: - boolean
│    │    │    │          + boolean
│    │    │    └ Type: - string
│    │    │            + string
│    │    ├[~] type DynamoDBEvent
│    │    │ └ properties
│    │    │    ├ BatchSize: - number
│    │    │    │            + integer
│    │    │    ├ MaximumBatchingWindowInSeconds: - number
│    │    │    │                                 + integer
│    │    │    ├ MaximumRecordAgeInSeconds: - number
│    │    │    │                            + integer
│    │    │    ├ MaximumRetryAttempts: - number
│    │    │    │                       + integer
│    │    │    └ ParallelizationFactor: - number
│    │    │                             + integer
│    │    ├[~] type EphemeralStorage
│    │    │ └ properties
│    │    │    └ Size: - number
│    │    │            + integer
│    │    ├[~] type EventInvokeConfig
│    │    │ └ properties
│    │    │    ├ MaximumEventAgeInSeconds: - number
│    │    │    │                           + integer
│    │    │    └ MaximumRetryAttempts: - number
│    │    │                            + integer
│    │    ├[~] type HttpApiEvent
│    │    │ └ properties
│    │    │    └ TimeoutInMillis: - number
│    │    │                       + integer
│    │    ├[~] type KinesisEvent
│    │    │ └ properties
│    │    │    └ BatchSize: - number
│    │    │                 + integer
│    │    ├[~] type RouteSettings
│    │    │ └ properties
│    │    │    └ ThrottlingBurstLimit: - number
│    │    │                            + integer
│    │    ├[~] type S3Location
│    │    │ └ properties
│    │    │    └ Version: - number
│    │    │               + integer
│    │    └[~] type SQSEvent
│    │      └ properties
│    │         └ BatchSize: - number
│    │                      + integer
│    ├[~] resource AWS::Serverless::HttpApi
│    │ ├  - documentation: Definition of AWS::Serverless::HttpApi
│    │ │  + documentation: https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlesshttpapi
│    │ └ types
│    │    ├[~] type CorsConfigurationObject
│    │    │ └ properties
│    │    │    └ MaxAge: - number
│    │    │              + integer
│    │    ├[~] type RouteSettings
│    │    │ └ properties
│    │    │    └ ThrottlingBurstLimit: - number
│    │    │                            + integer
│    │    └[~] type S3Location
│    │      └ properties
│    │         └ Version: - number
│    │                    + integer
│    ├[~] resource AWS::Serverless::LayerVersion
│    │ ├  - documentation: Definition of AWS::Serverless::LayerVersion
│    │ │  + documentation: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlesslayerversion
│    │ └ types
│    │    └[~] type S3Location
│    │      └ properties
│    │         └ Version: - number
│    │                    + integer
│    ├[~] resource AWS::Serverless::SimpleTable
│    │ ├  - documentation: Definition of AWS::Serverless::SimpleTable
│    │ │  + documentation: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlesssimpletable
│    │ └ types
│    │    └[~] type ProvisionedThroughput
│    │      └ properties
│    │         ├ ReadCapacityUnits: - number
│    │         │                    + integer
│    │         └ WriteCapacityUnits: - number
│    │                               + integer
│    └[~] resource AWS::Serverless::StateMachine
│      ├  - documentation: Definition of AWS::Serverless::StateMachine
│      │  + documentation: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-statemachine.html
│      ├ properties
│      │  └ Policies: - string | Array<string | IAMPolicyDocument | SAMPolicyTemplate> | IAMPolicyDocument
│      │              + string | Array<string | IAMPolicyDocument | SAMPolicyTemplate> | IAMPolicyDocument ⇐ string | IAMPolicyDocument
│      └ types
│         └[~] type S3Location
│           └ properties
│              └ Version: - number
│                         + integer
├[~] service aws-shield
│ └ resources
│    └[~] resource AWS::Shield::Protection
│      └ types
│         └[~] type ApplicationLayerAutomaticResponseConfiguration
│           └ properties
│              └ Action: - Action | Action ⇐ Action
│                        + Action ⇐ Action
└[~] service aws-sns
  └ resources
     └[~] resource AWS::SNS::TopicInlinePolicy
       └  - documentation: Schema for AWS::SNS::TopicInlinePolicy
          + documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topicinlinepolicy.html

Fix the ASCII diff to not be buggy anymore.
@rix0rrr rix0rrr disabled auto-merge October 20, 2023 14:18
@rix0rrr rix0rrr added this pull request to the merge queue Oct 20, 2023
Merged via the queue into main with commit 8d8c1a0 Oct 20, 2023
6 checks passed
@rix0rrr rix0rrr deleted the huijbers/ascii-diff branch October 20, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants