js-routes 2.2.7 → 2.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -9
- data/Gemfile +5 -0
- data/Readme.md +63 -47
- data/bin/tapioca +27 -0
- data/js-routes.gemspec +4 -1
- data/lib/js_routes/configuration.rb +80 -34
- data/lib/js_routes/engine.rb +2 -0
- data/lib/js_routes/generators/base.rb +15 -1
- data/lib/js_routes/generators/middleware.rb +3 -6
- data/lib/js_routes/generators/webpacker.rb +2 -4
- data/lib/js_routes/instance.rb +42 -15
- data/lib/js_routes/middleware.rb +14 -3
- data/lib/js_routes/route.rb +57 -16
- data/lib/js_routes/types.rb +28 -0
- data/lib/js_routes/version.rb +2 -1
- data/lib/js_routes.rb +20 -7
- data/lib/routes.js +25 -3
- data/lib/routes.ts +30 -6
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/actionpack.rbi +428 -0
- data/sorbet/rbi/annotations/actionview.rbi +75 -0
- data/sorbet/rbi/annotations/activesupport.rbi +421 -0
- data/sorbet/rbi/annotations/railties.rbi +61 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/actionpack@7.0.4.1.rbi +303 -0
- data/sorbet/rbi/gems/actionview@7.0.4.1.rbi +8 -0
- data/sorbet/rbi/gems/activesupport@7.0.4.1.rbi +16424 -0
- data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/bump@0.10.0.rbi +168 -0
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.0.rbi +11570 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
- data/sorbet/rbi/gems/libv8-node@16.10.0.0.rbi +8 -0
- data/sorbet/rbi/gems/loofah@2.19.1.rbi +8 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/mini_racer@0.6.3.rbi +224 -0
- data/sorbet/rbi/gems/minitest@5.17.0.rbi +1457 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/nokogiri@1.14.0.rbi +8 -0
- data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/prism@0.24.0.rbi +29744 -0
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10075 -0
- data/sorbet/rbi/gems/racc@1.6.2.rbi +150 -0
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +8 -0
- data/sorbet/rbi/gems/rack@2.2.6.2.rbi +5585 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +8 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +8 -0
- data/sorbet/rbi/gems/railties@7.0.4.1.rbi +1959 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +3072 -0
- data/sorbet/rbi/gems/rbi@0.1.9.rbi +3006 -0
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10868 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.2.rbi +8100 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.3.rbi +5299 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1611 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +82 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
- data/sorbet/rbi/gems/sprockets-rails@3.4.2.rbi +14 -0
- data/sorbet/rbi/gems/sprockets@4.2.0.rbi +8 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
- data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3510 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5914 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18332 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +8 -0
- data/sorbet/rbi/todo.rbi +31 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- data/spec/js_routes/default_serializer_spec.rb +1 -1
- data/spec/js_routes/module_types/dts_spec.rb +17 -2
- data/spec/js_routes/module_types/umd_spec.rb +2 -2
- data/spec/js_routes/options_spec.rb +6 -6
- data/spec/js_routes/rails_routes_compatibility_spec.rb +17 -12
- data/spec/js_routes/route_specification_spec.rb +1 -4
- data/spec/js_routes/{zzz_last_post_rails_init_spec.rb → zzz_sprockets_spec.rb} +1 -1
- data/spec/spec_helper.rb +4 -0
- metadata +82 -7
@@ -0,0 +1,303 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `actionpack` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem actionpack`.
|
6
|
+
|
7
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#3
|
8
|
+
module ActionDispatch; end
|
9
|
+
|
10
|
+
# :stopdoc:
|
11
|
+
#
|
12
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#5
|
13
|
+
module ActionDispatch::Journey; end
|
14
|
+
|
15
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#6
|
16
|
+
class ActionDispatch::Journey::Route
|
17
|
+
# +path+ is a path constraint.
|
18
|
+
# +constraints+ is a hash of constraints to be applied to this route.
|
19
|
+
#
|
20
|
+
# @return [Route] a new instance of Route
|
21
|
+
#
|
22
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#56
|
23
|
+
def initialize(name:, path:, app: T.unsafe(nil), constraints: T.unsafe(nil), required_defaults: T.unsafe(nil), defaults: T.unsafe(nil), request_method_match: T.unsafe(nil), precedence: T.unsafe(nil), scope_options: T.unsafe(nil), internal: T.unsafe(nil)); end
|
24
|
+
|
25
|
+
# Returns the value of attribute app.
|
26
|
+
#
|
27
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
28
|
+
def app; end
|
29
|
+
|
30
|
+
# Returns the value of attribute ast.
|
31
|
+
#
|
32
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
33
|
+
def ast; end
|
34
|
+
|
35
|
+
# Returns the value of attribute constraints.
|
36
|
+
#
|
37
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
38
|
+
def conditions; end
|
39
|
+
|
40
|
+
# Returns the value of attribute constraints.
|
41
|
+
#
|
42
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
43
|
+
def constraints; end
|
44
|
+
|
45
|
+
# Returns the value of attribute defaults.
|
46
|
+
#
|
47
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
48
|
+
def defaults; end
|
49
|
+
|
50
|
+
# @return [Boolean]
|
51
|
+
#
|
52
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#141
|
53
|
+
def dispatcher?; end
|
54
|
+
|
55
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#77
|
56
|
+
def eager_load!; end
|
57
|
+
|
58
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#119
|
59
|
+
def format(path_options); end
|
60
|
+
|
61
|
+
# @return [Boolean]
|
62
|
+
#
|
63
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#137
|
64
|
+
def glob?; end
|
65
|
+
|
66
|
+
# Returns the value of attribute internal.
|
67
|
+
#
|
68
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
69
|
+
def internal; end
|
70
|
+
|
71
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#163
|
72
|
+
def ip; end
|
73
|
+
|
74
|
+
# @return [Boolean]
|
75
|
+
#
|
76
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#145
|
77
|
+
def matches?(request); end
|
78
|
+
|
79
|
+
# Returns the value of attribute name.
|
80
|
+
#
|
81
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
82
|
+
def name; end
|
83
|
+
|
84
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#114
|
85
|
+
def parts; end
|
86
|
+
|
87
|
+
# Returns the value of attribute path.
|
88
|
+
#
|
89
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
90
|
+
def path; end
|
91
|
+
|
92
|
+
# Returns the value of attribute precedence.
|
93
|
+
#
|
94
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
95
|
+
def precedence; end
|
96
|
+
|
97
|
+
# @return [Boolean]
|
98
|
+
#
|
99
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#127
|
100
|
+
def required_default?(key); end
|
101
|
+
|
102
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#131
|
103
|
+
def required_defaults; end
|
104
|
+
|
105
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#102
|
106
|
+
def required_keys; end
|
107
|
+
|
108
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#123
|
109
|
+
def required_parts; end
|
110
|
+
|
111
|
+
# Needed for `bin/rails routes`. Picks up succinctly defined requirements
|
112
|
+
# for a route, for example route
|
113
|
+
#
|
114
|
+
# get 'photo/:id', :controller => 'photos', :action => 'show',
|
115
|
+
# :id => /[A-Z]\d{5}/
|
116
|
+
#
|
117
|
+
# will have {:controller=>"photos", :action=>"show", :id=>/[A-Z]\d{5}/}
|
118
|
+
# as requirements.
|
119
|
+
#
|
120
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#92
|
121
|
+
def requirements; end
|
122
|
+
|
123
|
+
# @return [Boolean]
|
124
|
+
#
|
125
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#167
|
126
|
+
def requires_matching_verb?; end
|
127
|
+
|
128
|
+
# Returns the value of attribute scope_options.
|
129
|
+
#
|
130
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#7
|
131
|
+
def scope_options; end
|
132
|
+
|
133
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#106
|
134
|
+
def score(supplied_keys); end
|
135
|
+
|
136
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#114
|
137
|
+
def segment_keys; end
|
138
|
+
|
139
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#98
|
140
|
+
def segments; end
|
141
|
+
|
142
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#171
|
143
|
+
def verb; end
|
144
|
+
|
145
|
+
private
|
146
|
+
|
147
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#180
|
148
|
+
def match_verb(request); end
|
149
|
+
|
150
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#176
|
151
|
+
def verbs; end
|
152
|
+
|
153
|
+
class << self
|
154
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#47
|
155
|
+
def verb_matcher(verb); end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#12
|
160
|
+
module ActionDispatch::Journey::Route::VerbMatchers; end
|
161
|
+
|
162
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#34
|
163
|
+
class ActionDispatch::Journey::Route::VerbMatchers::All
|
164
|
+
class << self
|
165
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#35
|
166
|
+
def call(_); end
|
167
|
+
|
168
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#36
|
169
|
+
def verb; end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
174
|
+
class ActionDispatch::Journey::Route::VerbMatchers::DELETE
|
175
|
+
class << self
|
176
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
177
|
+
def call(req); end
|
178
|
+
|
179
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
180
|
+
def verb; end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
185
|
+
class ActionDispatch::Journey::Route::VerbMatchers::GET
|
186
|
+
class << self
|
187
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
188
|
+
def call(req); end
|
189
|
+
|
190
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
191
|
+
def verb; end
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
196
|
+
class ActionDispatch::Journey::Route::VerbMatchers::HEAD
|
197
|
+
class << self
|
198
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
199
|
+
def call(req); end
|
200
|
+
|
201
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
202
|
+
def verb; end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
207
|
+
class ActionDispatch::Journey::Route::VerbMatchers::LINK
|
208
|
+
class << self
|
209
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
210
|
+
def call(req); end
|
211
|
+
|
212
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
213
|
+
def verb; end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
218
|
+
class ActionDispatch::Journey::Route::VerbMatchers::OPTIONS
|
219
|
+
class << self
|
220
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
221
|
+
def call(req); end
|
222
|
+
|
223
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
224
|
+
def verb; end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
229
|
+
class ActionDispatch::Journey::Route::VerbMatchers::PATCH
|
230
|
+
class << self
|
231
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
232
|
+
def call(req); end
|
233
|
+
|
234
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
235
|
+
def verb; end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
240
|
+
class ActionDispatch::Journey::Route::VerbMatchers::POST
|
241
|
+
class << self
|
242
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
243
|
+
def call(req); end
|
244
|
+
|
245
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
246
|
+
def verb; end
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
251
|
+
class ActionDispatch::Journey::Route::VerbMatchers::PUT
|
252
|
+
class << self
|
253
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
254
|
+
def call(req); end
|
255
|
+
|
256
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
257
|
+
def verb; end
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
262
|
+
class ActionDispatch::Journey::Route::VerbMatchers::TRACE
|
263
|
+
class << self
|
264
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
265
|
+
def call(req); end
|
266
|
+
|
267
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
268
|
+
def verb; end
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#17
|
273
|
+
class ActionDispatch::Journey::Route::VerbMatchers::UNLINK
|
274
|
+
class << self
|
275
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#19
|
276
|
+
def call(req); end
|
277
|
+
|
278
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#18
|
279
|
+
def verb; end
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#24
|
284
|
+
class ActionDispatch::Journey::Route::VerbMatchers::Unknown
|
285
|
+
# @return [Unknown] a new instance of Unknown
|
286
|
+
#
|
287
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#27
|
288
|
+
def initialize(verb); end
|
289
|
+
|
290
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#31
|
291
|
+
def call(request); end
|
292
|
+
|
293
|
+
# Returns the value of attribute verb.
|
294
|
+
#
|
295
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#25
|
296
|
+
def verb; end
|
297
|
+
end
|
298
|
+
|
299
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#13
|
300
|
+
ActionDispatch::Journey::Route::VerbMatchers::VERBS = T.let(T.unsafe(nil), Array)
|
301
|
+
|
302
|
+
# source://actionpack//lib/action_dispatch/journey/route.rb#39
|
303
|
+
ActionDispatch::Journey::Route::VerbMatchers::VERB_TO_CLASS = T.let(T.unsafe(nil), Hash)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `actionview` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem actionview`.
|
6
|
+
|
7
|
+
# THIS IS AN EMPTY RBI FILE.
|
8
|
+
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|