context.dev 1.1.0 → 1.2.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.
@@ -40,14 +40,12 @@ module ContextDev
40
40
  # Either 'domain' or 'directUrl' must be provided as a query parameter, but not
41
41
  # both.
42
42
  #
43
- # @overload extract_styleguide(direct_url: nil, domain: nil, prioritize: nil, timeout_ms: nil, request_options: {})
43
+ # @overload extract_styleguide(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {})
44
44
  #
45
45
  # @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
46
46
  #
47
47
  # @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
48
48
  #
49
- # @param prioritize [Symbol, ContextDev::Models::StyleExtractStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I
50
- #
51
49
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
52
50
  #
53
51
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ContextDev
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
@@ -148,12 +148,20 @@ module ContextDev
148
148
  end
149
149
  end
150
150
 
151
+ # https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
152
+ RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
153
+
151
154
  class << self
152
155
  # @api private
153
156
  sig { params(uri: URI::Generic).returns(String) }
154
157
  def uri_origin(uri)
155
158
  end
156
159
 
160
+ # @api private
161
+ sig { params(path: T.any(String, Integer)).returns(String) }
162
+ def encode_path(path)
163
+ end
164
+
157
165
  # @api private
158
166
  sig { params(path: T.any(String, T::Array[String])).returns(String) }
159
167
  def interpolate_path(path)
@@ -30,27 +30,6 @@ module ContextDev
30
30
  sig { params(domain: String).void }
31
31
  attr_writer :domain
32
32
 
33
- # Optional parameter to prioritize screenshot capture for styleguide extraction.
34
- # If 'speed', optimizes for faster capture with basic quality. If 'quality',
35
- # optimizes for higher quality with longer wait times. Defaults to 'quality' if
36
- # not provided.
37
- sig do
38
- returns(
39
- T.nilable(
40
- ContextDev::StyleExtractStyleguideParams::Prioritize::OrSymbol
41
- )
42
- )
43
- end
44
- attr_reader :prioritize
45
-
46
- sig do
47
- params(
48
- prioritize:
49
- ContextDev::StyleExtractStyleguideParams::Prioritize::OrSymbol
50
- ).void
51
- end
52
- attr_writer :prioritize
53
-
54
33
  # Optional timeout in milliseconds for the request. If the request takes longer
55
34
  # than this value, it will be aborted with a 408 status code. Maximum allowed
56
35
  # value is 300000ms (5 minutes).
@@ -64,8 +43,6 @@ module ContextDev
64
43
  params(
65
44
  direct_url: String,
66
45
  domain: String,
67
- prioritize:
68
- ContextDev::StyleExtractStyleguideParams::Prioritize::OrSymbol,
69
46
  timeout_ms: Integer,
70
47
  request_options: ContextDev::RequestOptions::OrHash
71
48
  ).returns(T.attached_class)
@@ -77,11 +54,6 @@ module ContextDev
77
54
  # Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
78
55
  # domain will be automatically normalized and validated.
79
56
  domain: nil,
80
- # Optional parameter to prioritize screenshot capture for styleguide extraction.
81
- # If 'speed', optimizes for faster capture with basic quality. If 'quality',
82
- # optimizes for higher quality with longer wait times. Defaults to 'quality' if
83
- # not provided.
84
- prioritize: nil,
85
57
  # Optional timeout in milliseconds for the request. If the request takes longer
86
58
  # than this value, it will be aborted with a 408 status code. Maximum allowed
87
59
  # value is 300000ms (5 minutes).
@@ -95,8 +67,6 @@ module ContextDev
95
67
  {
96
68
  direct_url: String,
97
69
  domain: String,
98
- prioritize:
99
- ContextDev::StyleExtractStyleguideParams::Prioritize::OrSymbol,
100
70
  timeout_ms: Integer,
101
71
  request_options: ContextDev::RequestOptions
102
72
  }
@@ -104,41 +74,6 @@ module ContextDev
104
74
  end
105
75
  def to_hash
106
76
  end
107
-
108
- # Optional parameter to prioritize screenshot capture for styleguide extraction.
109
- # If 'speed', optimizes for faster capture with basic quality. If 'quality',
110
- # optimizes for higher quality with longer wait times. Defaults to 'quality' if
111
- # not provided.
112
- module Prioritize
113
- extend ContextDev::Internal::Type::Enum
114
-
115
- TaggedSymbol =
116
- T.type_alias do
117
- T.all(Symbol, ContextDev::StyleExtractStyleguideParams::Prioritize)
118
- end
119
- OrSymbol = T.type_alias { T.any(Symbol, String) }
120
-
121
- SPEED =
122
- T.let(
123
- :speed,
124
- ContextDev::StyleExtractStyleguideParams::Prioritize::TaggedSymbol
125
- )
126
- QUALITY =
127
- T.let(
128
- :quality,
129
- ContextDev::StyleExtractStyleguideParams::Prioritize::TaggedSymbol
130
- )
131
-
132
- sig do
133
- override.returns(
134
- T::Array[
135
- ContextDev::StyleExtractStyleguideParams::Prioritize::TaggedSymbol
136
- ]
137
- )
138
- end
139
- def self.values
140
- end
141
- end
142
77
  end
143
78
  end
144
79
  end