@temporalio/core-bridge 0.19.2 → 0.20.2

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 (125) hide show
  1. package/Cargo.lock +90 -157
  2. package/Cargo.toml +1 -0
  3. package/index.d.ts +11 -27
  4. package/package.json +3 -3
  5. package/releases/aarch64-apple-darwin/index.node +0 -0
  6. package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
  7. package/releases/x86_64-apple-darwin/index.node +0 -0
  8. package/releases/x86_64-pc-windows-msvc/index.node +0 -0
  9. package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
  10. package/sdk-core/.buildkite/docker/Dockerfile +1 -1
  11. package/sdk-core/.buildkite/docker/docker-compose.yaml +1 -1
  12. package/sdk-core/.cargo/config.toml +1 -0
  13. package/sdk-core/CODEOWNERS +1 -1
  14. package/sdk-core/bridge-ffi/include/sdk-core-bridge.h +119 -86
  15. package/sdk-core/bridge-ffi/src/lib.rs +311 -315
  16. package/sdk-core/bridge-ffi/src/wrappers.rs +108 -113
  17. package/sdk-core/client/Cargo.toml +13 -9
  18. package/sdk-core/client/LICENSE.txt +23 -0
  19. package/sdk-core/client/src/lib.rs +286 -174
  20. package/sdk-core/client/src/metrics.rs +86 -12
  21. package/sdk-core/client/src/raw.rs +566 -0
  22. package/sdk-core/client/src/retry.rs +137 -99
  23. package/sdk-core/core/Cargo.toml +15 -10
  24. package/sdk-core/core/LICENSE.txt +23 -0
  25. package/sdk-core/core/benches/workflow_replay.rs +79 -0
  26. package/sdk-core/core/src/abstractions.rs +38 -0
  27. package/sdk-core/core/src/core_tests/activity_tasks.rs +108 -182
  28. package/sdk-core/core/src/core_tests/child_workflows.rs +16 -11
  29. package/sdk-core/core/src/core_tests/determinism.rs +24 -12
  30. package/sdk-core/core/src/core_tests/local_activities.rs +53 -27
  31. package/sdk-core/core/src/core_tests/mod.rs +30 -43
  32. package/sdk-core/core/src/core_tests/queries.rs +82 -81
  33. package/sdk-core/core/src/core_tests/workers.rs +111 -296
  34. package/sdk-core/core/src/core_tests/workflow_cancels.rs +4 -4
  35. package/sdk-core/core/src/core_tests/workflow_tasks.rs +257 -242
  36. package/sdk-core/core/src/lib.rs +73 -318
  37. package/sdk-core/core/src/pollers/mod.rs +4 -6
  38. package/sdk-core/core/src/pollers/poll_buffer.rs +20 -14
  39. package/sdk-core/core/src/protosext/mod.rs +7 -10
  40. package/sdk-core/core/src/replay/mod.rs +11 -150
  41. package/sdk-core/core/src/telemetry/metrics.rs +35 -2
  42. package/sdk-core/core/src/telemetry/mod.rs +49 -16
  43. package/sdk-core/core/src/telemetry/prometheus_server.rs +14 -35
  44. package/sdk-core/core/src/test_help/mod.rs +104 -170
  45. package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +57 -34
  46. package/sdk-core/core/src/worker/activities/local_activities.rs +95 -23
  47. package/sdk-core/core/src/worker/activities.rs +23 -16
  48. package/sdk-core/core/src/worker/client/mocks.rs +86 -0
  49. package/sdk-core/core/src/worker/client.rs +209 -0
  50. package/sdk-core/core/src/worker/mod.rs +207 -108
  51. package/sdk-core/core/src/workflow/driven_workflow.rs +21 -6
  52. package/sdk-core/core/src/workflow/history_update.rs +107 -24
  53. package/sdk-core/core/src/workflow/machines/activity_state_machine.rs +2 -3
  54. package/sdk-core/core/src/workflow/machines/child_workflow_state_machine.rs +2 -3
  55. package/sdk-core/core/src/workflow/machines/mod.rs +20 -17
  56. package/sdk-core/core/src/workflow/machines/signal_external_state_machine.rs +56 -19
  57. package/sdk-core/core/src/workflow/machines/transition_coverage.rs +5 -0
  58. package/sdk-core/core/src/workflow/machines/upsert_search_attributes_state_machine.rs +230 -22
  59. package/sdk-core/core/src/workflow/machines/workflow_machines.rs +81 -115
  60. package/sdk-core/core/src/workflow/machines/workflow_task_state_machine.rs +4 -4
  61. package/sdk-core/core/src/workflow/mod.rs +13 -1
  62. package/sdk-core/core/src/workflow/workflow_tasks/concurrency_manager.rs +70 -11
  63. package/sdk-core/core/src/workflow/workflow_tasks/mod.rs +65 -41
  64. package/sdk-core/core-api/Cargo.toml +9 -1
  65. package/sdk-core/core-api/LICENSE.txt +23 -0
  66. package/sdk-core/core-api/src/errors.rs +7 -38
  67. package/sdk-core/core-api/src/lib.rs +44 -52
  68. package/sdk-core/core-api/src/worker.rs +10 -2
  69. package/sdk-core/etc/deps.svg +127 -96
  70. package/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +11 -7
  71. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +10 -0
  72. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/namespace.proto +6 -1
  73. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/workflow.proto +6 -0
  74. package/sdk-core/protos/api_upstream/temporal/api/errordetails/v1/message.proto +6 -0
  75. package/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +2 -1
  76. package/sdk-core/protos/api_upstream/temporal/api/replication/v1/message.proto +3 -0
  77. package/sdk-core/protos/api_upstream/temporal/api/workflow/v1/message.proto +12 -0
  78. package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +25 -0
  79. package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +4 -0
  80. package/sdk-core/protos/local/temporal/sdk/core/bridge/bridge.proto +19 -35
  81. package/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +2 -6
  82. package/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +53 -11
  83. package/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +14 -7
  84. package/sdk-core/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +3 -5
  85. package/sdk-core/sdk/Cargo.toml +16 -2
  86. package/sdk-core/sdk/LICENSE.txt +23 -0
  87. package/sdk-core/sdk/src/interceptors.rs +11 -0
  88. package/sdk-core/sdk/src/lib.rs +139 -151
  89. package/sdk-core/sdk/src/workflow_context/options.rs +86 -1
  90. package/sdk-core/sdk/src/workflow_context.rs +36 -17
  91. package/sdk-core/sdk/src/workflow_future.rs +19 -25
  92. package/sdk-core/sdk-core-protos/Cargo.toml +1 -1
  93. package/sdk-core/sdk-core-protos/build.rs +1 -0
  94. package/sdk-core/sdk-core-protos/src/history_info.rs +17 -4
  95. package/sdk-core/sdk-core-protos/src/lib.rs +251 -47
  96. package/sdk-core/test-utils/Cargo.toml +3 -1
  97. package/sdk-core/test-utils/src/canned_histories.rs +27 -0
  98. package/sdk-core/test-utils/src/histfetch.rs +3 -3
  99. package/sdk-core/test-utils/src/lib.rs +223 -68
  100. package/sdk-core/tests/integ_tests/client_tests.rs +27 -4
  101. package/sdk-core/tests/integ_tests/heartbeat_tests.rs +93 -14
  102. package/sdk-core/tests/integ_tests/polling_tests.rs +18 -12
  103. package/sdk-core/tests/integ_tests/queries_tests.rs +50 -53
  104. package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +117 -103
  105. package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +8 -1
  106. package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +10 -5
  107. package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +7 -1
  108. package/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +32 -9
  109. package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +7 -1
  110. package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +76 -15
  111. package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +19 -3
  112. package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +39 -42
  113. package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +84 -0
  114. package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +30 -8
  115. package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +21 -6
  116. package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +26 -16
  117. package/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +66 -0
  118. package/sdk-core/tests/integ_tests/workflow_tests.rs +78 -74
  119. package/sdk-core/tests/load_tests.rs +9 -6
  120. package/sdk-core/tests/main.rs +43 -10
  121. package/src/conversions.rs +7 -12
  122. package/src/lib.rs +322 -357
  123. package/sdk-core/client/src/mocks.rs +0 -167
  124. package/sdk-core/core/src/worker/dispatcher.rs +0 -171
  125. package/sdk-core/protos/local/temporal/sdk/core/bridge/service.proto +0 -61
@@ -1,142 +1,137 @@
1
- use std::str::FromStr;
1
+ use log::LevelFilter;
2
+ use std::{net::SocketAddr, str::FromStr};
3
+ use temporal_sdk_core::{TelemetryOptionsBuilder, Url};
2
4
  use temporal_sdk_core_protos::coresdk::bridge;
3
5
 
4
6
  // Present for try-from only
5
- pub struct CoreInitOptions(pub bridge::InitRequest);
7
+ pub struct InitTelemetryRequest(pub bridge::InitTelemetryRequest);
6
8
 
7
- impl TryFrom<CoreInitOptions> for temporal_sdk_core::CoreInitOptions {
9
+ impl TryFrom<InitTelemetryRequest> for temporal_sdk_core::TelemetryOptions {
8
10
  type Error = String;
9
11
 
10
- fn try_from(CoreInitOptions(req): CoreInitOptions) -> Result<Self, Self::Error> {
11
- let mut core_opts = temporal_sdk_core::CoreInitOptionsBuilder::default();
12
- if let Some(req_gateway_opts) = req.gateway_options {
13
- let mut gateway_opts = temporal_sdk_core::ServerGatewayOptionsBuilder::default();
14
- if !req_gateway_opts.target_url.is_empty() {
15
- gateway_opts.target_url(
16
- temporal_sdk_core::Url::parse(&req_gateway_opts.target_url)
17
- .map_err(|err| format!("invalid target URL: {}", err))?,
18
- );
12
+ fn try_from(InitTelemetryRequest(req): InitTelemetryRequest) -> Result<Self, Self::Error> {
13
+ let mut telemetry_opts = TelemetryOptionsBuilder::default();
14
+ if !req.otel_collector_url.is_empty() {
15
+ telemetry_opts.otel_collector_url(
16
+ Url::parse(&req.otel_collector_url)
17
+ .map_err(|err| format!("invalid OpenTelemetry collector URL: {}", err))?,
18
+ );
19
+ }
20
+ if !req.tracing_filter.is_empty() {
21
+ telemetry_opts.tracing_filter(req.tracing_filter.clone());
22
+ }
23
+ match req.log_forwarding_level() {
24
+ bridge::LogLevel::Unspecified => {}
25
+ bridge::LogLevel::Off => {
26
+ telemetry_opts.log_forwarding_level(LevelFilter::Off);
19
27
  }
20
- if !req_gateway_opts.namespace.is_empty() {
21
- gateway_opts.namespace(req_gateway_opts.namespace);
28
+ bridge::LogLevel::Error => {
29
+ telemetry_opts.log_forwarding_level(LevelFilter::Error);
22
30
  }
23
- if !req_gateway_opts.client_name.is_empty() {
24
- gateway_opts.client_name(req_gateway_opts.client_name);
31
+ bridge::LogLevel::Warn => {
32
+ telemetry_opts.log_forwarding_level(LevelFilter::Warn);
25
33
  }
26
- if !req_gateway_opts.client_version.is_empty() {
27
- gateway_opts.client_version(req_gateway_opts.client_version);
34
+ bridge::LogLevel::Info => {
35
+ telemetry_opts.log_forwarding_level(LevelFilter::Info);
28
36
  }
29
- if !req_gateway_opts.static_headers.is_empty() {
30
- gateway_opts.static_headers(req_gateway_opts.static_headers);
37
+ bridge::LogLevel::Debug => {
38
+ telemetry_opts.log_forwarding_level(LevelFilter::Debug);
31
39
  }
32
- if !req_gateway_opts.identity.is_empty() {
33
- gateway_opts.identity(req_gateway_opts.identity);
40
+ bridge::LogLevel::Trace => {
41
+ telemetry_opts.log_forwarding_level(LevelFilter::Trace);
34
42
  }
35
- if !req_gateway_opts.worker_binary_id.is_empty() {
36
- gateway_opts.worker_binary_id(req_gateway_opts.worker_binary_id);
43
+ }
44
+ if !req.prometheus_export_bind_address.is_empty() {
45
+ telemetry_opts.prometheus_export_bind_address(
46
+ SocketAddr::from_str(&req.prometheus_export_bind_address)
47
+ .map_err(|err| format!("invalid Prometheus address: {}", err))?,
48
+ );
49
+ }
50
+
51
+ telemetry_opts
52
+ .build()
53
+ .map_err(|err| format!("invalid telemetry options: {}", err))
54
+ }
55
+ }
56
+
57
+ pub struct ClientOptions(pub bridge::CreateClientRequest);
58
+
59
+ impl TryFrom<ClientOptions> for temporal_sdk_core::ClientOptions {
60
+ type Error = String;
61
+
62
+ fn try_from(ClientOptions(req): ClientOptions) -> Result<Self, Self::Error> {
63
+ let mut client_opts = temporal_sdk_core::ClientOptionsBuilder::default();
64
+ if !req.target_url.is_empty() {
65
+ client_opts.target_url(
66
+ temporal_sdk_core::Url::parse(&req.target_url)
67
+ .map_err(|err| format!("invalid target URL: {}", err))?,
68
+ );
69
+ }
70
+ if !req.client_name.is_empty() {
71
+ client_opts.client_name(req.client_name);
72
+ }
73
+ if !req.client_version.is_empty() {
74
+ client_opts.client_version(req.client_version);
75
+ }
76
+ if !req.static_headers.is_empty() {
77
+ client_opts.static_headers(req.static_headers);
78
+ }
79
+ if !req.identity.is_empty() {
80
+ client_opts.identity(req.identity);
81
+ }
82
+ if !req.worker_binary_id.is_empty() {
83
+ client_opts.worker_binary_id(req.worker_binary_id);
84
+ }
85
+ if let Some(req_tls_config) = req.tls_config {
86
+ let mut tls_config = temporal_sdk_core::TlsConfig::default();
87
+ if !req_tls_config.server_root_ca_cert.is_empty() {
88
+ tls_config.server_root_ca_cert = Some(req_tls_config.server_root_ca_cert);
37
89
  }
38
- if let Some(req_tls_config) = req_gateway_opts.tls_config {
39
- let mut tls_config = temporal_sdk_core::TlsConfig::default();
40
- if !req_tls_config.server_root_ca_cert.is_empty() {
41
- tls_config.server_root_ca_cert = Some(req_tls_config.server_root_ca_cert);
42
- }
43
- if !req_tls_config.domain.is_empty() {
44
- tls_config.domain = Some(req_tls_config.domain);
45
- }
46
- if !req_tls_config.client_cert.is_empty()
47
- || !req_tls_config.client_private_key.is_empty()
48
- {
49
- tls_config.client_tls_config = Some(temporal_sdk_core::ClientTlsConfig {
50
- client_cert: req_tls_config.client_cert,
51
- client_private_key: req_tls_config.client_private_key,
52
- })
53
- }
54
- gateway_opts.tls_cfg(tls_config);
90
+ if !req_tls_config.domain.is_empty() {
91
+ tls_config.domain = Some(req_tls_config.domain);
55
92
  }
56
- if let Some(req_retry_config) = req_gateway_opts.retry_config {
57
- let mut retry_config = temporal_sdk_core::RetryConfig::default();
58
- if let Some(v) = req_retry_config.initial_interval {
59
- retry_config.initial_interval =
60
- v.try_into().map_err(|_| "invalid initial interval")?;
61
- }
62
- if let Some(v) = req_retry_config.randomization_factor {
63
- retry_config.randomization_factor = v;
64
- }
65
- if let Some(v) = req_retry_config.multiplier {
66
- retry_config.multiplier = v;
67
- }
68
- if let Some(v) = req_retry_config.max_interval {
69
- retry_config.max_interval = v.try_into().map_err(|_| "invalid max interval")?;
70
- }
71
- if let Some(v) = req_retry_config.max_elapsed_time {
72
- retry_config.max_elapsed_time =
73
- Some(v.try_into().map_err(|_| "invalid max elapsed time")?);
74
- }
75
- if let Some(v) = req_retry_config.max_retries {
76
- retry_config.max_retries = v as usize;
77
- }
78
- gateway_opts.retry_config(retry_config);
93
+ if !req_tls_config.client_cert.is_empty()
94
+ || !req_tls_config.client_private_key.is_empty()
95
+ {
96
+ tls_config.client_tls_config = Some(temporal_sdk_core::ClientTlsConfig {
97
+ client_cert: req_tls_config.client_cert,
98
+ client_private_key: req_tls_config.client_private_key,
99
+ })
79
100
  }
80
- core_opts.gateway_opts(
81
- gateway_opts
82
- .build()
83
- .map_err(|err| format!("invalid gateway options: {}", err))?,
84
- );
101
+ client_opts.tls_cfg(tls_config);
85
102
  }
86
- if let Some(req_telemetry_opts) = req.telemetry_options {
87
- let mut telemetry_opts = temporal_sdk_core::TelemetryOptionsBuilder::default();
88
- if !req_telemetry_opts.otel_collector_url.is_empty() {
89
- telemetry_opts.otel_collector_url(
90
- temporal_sdk_core::Url::parse(&req_telemetry_opts.otel_collector_url)
91
- .map_err(|err| format!("invalid OpenTelemetry collector URL: {}", err))?,
92
- );
103
+ if let Some(req_retry_config) = req.retry_config {
104
+ let mut retry_config = temporal_sdk_core::RetryConfig::default();
105
+ if let Some(v) = req_retry_config.initial_interval {
106
+ retry_config.initial_interval =
107
+ v.try_into().map_err(|_| "invalid initial interval")?;
93
108
  }
94
- if !req_telemetry_opts.tracing_filter.is_empty() {
95
- telemetry_opts.tracing_filter(req_telemetry_opts.tracing_filter.clone());
109
+ if let Some(v) = req_retry_config.randomization_factor {
110
+ retry_config.randomization_factor = v;
96
111
  }
97
- match req_telemetry_opts.log_forwarding_level() {
98
- bridge::LogLevel::Unspecified => {}
99
- bridge::LogLevel::Off => {
100
- telemetry_opts.log_forwarding_level(log::LevelFilter::Off);
101
- }
102
- bridge::LogLevel::Error => {
103
- telemetry_opts.log_forwarding_level(log::LevelFilter::Error);
104
- }
105
- bridge::LogLevel::Warn => {
106
- telemetry_opts.log_forwarding_level(log::LevelFilter::Warn);
107
- }
108
- bridge::LogLevel::Info => {
109
- telemetry_opts.log_forwarding_level(log::LevelFilter::Info);
110
- }
111
- bridge::LogLevel::Debug => {
112
- telemetry_opts.log_forwarding_level(log::LevelFilter::Debug);
113
- }
114
- bridge::LogLevel::Trace => {
115
- telemetry_opts.log_forwarding_level(log::LevelFilter::Trace);
116
- }
112
+ if let Some(v) = req_retry_config.multiplier {
113
+ retry_config.multiplier = v;
117
114
  }
118
- if !req_telemetry_opts.prometheus_export_bind_address.is_empty() {
119
- telemetry_opts.prometheus_export_bind_address(
120
- std::net::SocketAddr::from_str(
121
- &req_telemetry_opts.prometheus_export_bind_address,
122
- )
123
- .map_err(|err| format!("invalid Prometheus address: {}", err))?,
124
- );
115
+ if let Some(v) = req_retry_config.max_interval {
116
+ retry_config.max_interval = v.try_into().map_err(|_| "invalid max interval")?;
125
117
  }
126
- core_opts.telemetry_opts(
127
- telemetry_opts
128
- .build()
129
- .map_err(|err| format!("invalid telemetry options: {}", err))?,
130
- );
118
+ if let Some(v) = req_retry_config.max_elapsed_time {
119
+ retry_config.max_elapsed_time =
120
+ Some(v.try_into().map_err(|_| "invalid max elapsed time")?);
121
+ }
122
+ if let Some(v) = req_retry_config.max_retries {
123
+ retry_config.max_retries = v as usize;
124
+ }
125
+ client_opts.retry_config(retry_config);
131
126
  }
132
- core_opts
127
+ client_opts
133
128
  .build()
134
- .map_err(|err| format!("invalid options: {}", err))
129
+ .map_err(|err| format!("invalid client options: {}", err))
135
130
  }
136
131
  }
137
132
 
138
133
  // Present for try-from only
139
- pub struct WorkerConfig(pub bridge::RegisterWorkerRequest);
134
+ pub struct WorkerConfig(pub bridge::CreateWorkerRequest);
140
135
 
141
136
  impl TryFrom<WorkerConfig> for temporal_sdk_core_api::worker::WorkerConfig {
142
137
  type Error = String;
@@ -2,25 +2,27 @@
2
2
  name = "temporal-client"
3
3
  version = "0.1.0"
4
4
  edition = "2021"
5
-
6
- # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
- [features]
8
- mocks = ["mockall"]
5
+ authors = ["Spencer Judge <spencer@temporal.io>"]
6
+ license-file = "LICENSE.txt"
7
+ description = "Clients for interacting with Temporal Clusters"
8
+ homepage = "https://temporal.io/"
9
+ repository = "https://github.com/temporalio/sdk-core"
10
+ keywords = ["temporal", "workflow"]
11
+ categories = ["development-tools"]
9
12
 
10
13
  [dependencies]
11
14
  async-trait = "0.1"
12
- backoff = "0.3.0"
13
- derive_builder = "0.10"
15
+ backoff = "0.4"
16
+ derive_builder = "0.11"
14
17
  derive_more = "0.99"
15
18
  futures = "0.3"
16
19
  futures-retry = "0.6.0"
17
20
  http = "0.2"
18
- mockall = { version = "0.11.0", optional = true }
19
- opentelemetry = "0.16"
21
+ opentelemetry = { version = "0.17", features = ["metrics"] }
20
22
  prost-types = "0.9"
21
23
  thiserror = "1.0"
22
24
  tokio = "1.1"
23
- tonic = "0.6"
25
+ tonic = { version = "0.6", features = ["tls", "tls-roots"] }
24
26
  tower = "0.4"
25
27
  tracing = "0.1"
26
28
  url = "2.2"
@@ -30,3 +32,5 @@ uuid = { version = "0.8.2", features = ["v4"] }
30
32
  path = "../sdk-core-protos"
31
33
  version = "0.1"
32
34
 
35
+ [dev-dependencies]
36
+ mockall = "0.11"
@@ -0,0 +1,23 @@
1
+ Temporal Core SDK
2
+
3
+ The MIT License
4
+
5
+ Copyright (c) 2021 Temporal Technologies, Inc. All Rights Reserved
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.