js-routes 2.2.9 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -3
  3. data/Readme.md +16 -15
  4. data/lib/js_routes/configuration.rb +7 -5
  5. data/lib/js_routes/generators/base.rb +6 -1
  6. data/lib/js_routes/generators/middleware.rb +2 -3
  7. data/lib/js_routes/generators/webpacker.rb +2 -1
  8. data/lib/js_routes/instance.rb +21 -6
  9. data/lib/js_routes/middleware.rb +5 -4
  10. data/lib/js_routes/route.rb +7 -3
  11. data/lib/js_routes/types.rb +10 -0
  12. data/lib/js_routes/utils.rb +18 -0
  13. data/lib/js_routes/version.rb +1 -1
  14. data/lib/js_routes.rb +12 -4
  15. data/lib/routes.d.ts +7 -6
  16. data/lib/routes.js +19 -18
  17. data/lib/routes.ts +33 -27
  18. data/lib/tasks/js_routes.rake +4 -2
  19. metadata +12 -145
  20. data/.document +0 -5
  21. data/.eslintrc.js +0 -15
  22. data/.github/workflows/ci.yml +0 -36
  23. data/.gitignore +0 -65
  24. data/.nvmrc +0 -1
  25. data/.rspec +0 -1
  26. data/Appraisals +0 -17
  27. data/Gemfile +0 -9
  28. data/Rakefile +0 -37
  29. data/VERSION_2_UPGRADE.md +0 -66
  30. data/bin/tapioca +0 -27
  31. data/gemfiles/rails50_sprockets_3.gemfile +0 -8
  32. data/gemfiles/rails51_sprockets_3.gemfile +0 -8
  33. data/gemfiles/rails52_sprockets_3.gemfile +0 -8
  34. data/gemfiles/rails70_sprockets_4.gemfile +0 -8
  35. data/js-routes.gemspec +0 -42
  36. data/package.json +0 -38
  37. data/sorbet/config +0 -4
  38. data/sorbet/rbi/annotations/.gitattributes +0 -1
  39. data/sorbet/rbi/annotations/actionpack.rbi +0 -428
  40. data/sorbet/rbi/annotations/actionview.rbi +0 -75
  41. data/sorbet/rbi/annotations/activesupport.rbi +0 -421
  42. data/sorbet/rbi/annotations/railties.rbi +0 -61
  43. data/sorbet/rbi/gems/.gitattributes +0 -1
  44. data/sorbet/rbi/gems/actionpack@7.0.4.1.rbi +0 -303
  45. data/sorbet/rbi/gems/actionview@7.0.4.1.rbi +0 -8
  46. data/sorbet/rbi/gems/activesupport@7.0.4.1.rbi +0 -16424
  47. data/sorbet/rbi/gems/appraisal@2.4.1.rbi +0 -584
  48. data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -8
  49. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -168
  50. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3606
  51. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3426
  52. data/sorbet/rbi/gems/concurrent-ruby@1.2.0.rbi +0 -11570
  53. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -8
  54. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1083
  55. data/sorbet/rbi/gems/erubi@1.12.0.rbi +0 -145
  56. data/sorbet/rbi/gems/i18n@1.12.0.rbi +0 -2296
  57. data/sorbet/rbi/gems/libv8-node@16.10.0.0.rbi +0 -8
  58. data/sorbet/rbi/gems/loofah@2.19.1.rbi +0 -8
  59. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -272
  60. data/sorbet/rbi/gems/mini_racer@0.6.3.rbi +0 -224
  61. data/sorbet/rbi/gems/minitest@5.17.0.rbi +0 -1457
  62. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -158
  63. data/sorbet/rbi/gems/nokogiri@1.14.0.rbi +0 -8
  64. data/sorbet/rbi/gems/parallel@1.24.0.rbi +0 -280
  65. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +0 -951
  66. data/sorbet/rbi/gems/prism@0.24.0.rbi +0 -29744
  67. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1150
  68. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10075
  69. data/sorbet/rbi/gems/racc@1.6.2.rbi +0 -150
  70. data/sorbet/rbi/gems/rack-test@2.0.2.rbi +0 -8
  71. data/sorbet/rbi/gems/rack@2.2.6.2.rbi +0 -5585
  72. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +0 -8
  73. data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +0 -8
  74. data/sorbet/rbi/gems/railties@7.0.4.1.rbi +0 -1959
  75. data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -3072
  76. data/sorbet/rbi/gems/rbi@0.1.9.rbi +0 -3006
  77. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +0 -10868
  78. data/sorbet/rbi/gems/rspec-expectations@3.12.2.rbi +0 -8100
  79. data/sorbet/rbi/gems/rspec-mocks@3.12.3.rbi +0 -5299
  80. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +0 -1611
  81. data/sorbet/rbi/gems/rspec@3.12.0.rbi +0 -82
  82. data/sorbet/rbi/gems/spoom@1.2.4.rbi +0 -3777
  83. data/sorbet/rbi/gems/sprockets-rails@3.4.2.rbi +0 -14
  84. data/sorbet/rbi/gems/sprockets@4.2.0.rbi +0 -8
  85. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +0 -23136
  86. data/sorbet/rbi/gems/tapioca@0.12.0.rbi +0 -3510
  87. data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -3956
  88. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -5914
  89. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +0 -428
  90. data/sorbet/rbi/gems/yard@0.9.34.rbi +0 -18332
  91. data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +0 -8
  92. data/sorbet/rbi/todo.rbi +0 -31
  93. data/sorbet/tapioca/config.yml +0 -13
  94. data/sorbet/tapioca/require.rb +0 -4
  95. data/spec/dummy/app/assets/config/manifest.js +0 -2
  96. data/spec/dummy/app/assets/javascripts/.gitkeep +0 -0
  97. data/spec/dummy/config/routes.rb +0 -55
  98. data/spec/js_routes/default_serializer_spec.rb +0 -31
  99. data/spec/js_routes/module_types/amd_spec.rb +0 -35
  100. data/spec/js_routes/module_types/cjs_spec.rb +0 -15
  101. data/spec/js_routes/module_types/dts/routes.spec.d.ts +0 -115
  102. data/spec/js_routes/module_types/dts/test.spec.ts +0 -56
  103. data/spec/js_routes/module_types/dts_spec.rb +0 -126
  104. data/spec/js_routes/module_types/esm_spec.rb +0 -45
  105. data/spec/js_routes/module_types/nil_spec.rb +0 -87
  106. data/spec/js_routes/module_types/umd_spec.rb +0 -85
  107. data/spec/js_routes/options_spec.rb +0 -508
  108. data/spec/js_routes/rails_routes_compatibility_spec.rb +0 -473
  109. data/spec/js_routes/route_specification_spec.rb +0 -37
  110. data/spec/js_routes/zzz_sprockets_spec.rb +0 -152
  111. data/spec/spec_helper.rb +0 -135
  112. data/spec/support/routes.rb +0 -81
  113. data/spec/tsconfig.json +0 -4
  114. data/tsconfig.json +0 -28
  115. data/yarn.lock +0 -2457
@@ -1,158 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `netrc` gem.
5
- # Please instead update this file by running `bin/tapioca gem netrc`.
6
-
7
- # source://netrc//lib/netrc.rb#3
8
- class Netrc
9
- # @return [Netrc] a new instance of Netrc
10
- #
11
- # source://netrc//lib/netrc.rb#166
12
- def initialize(path, data); end
13
-
14
- # source://netrc//lib/netrc.rb#180
15
- def [](k); end
16
-
17
- # source://netrc//lib/netrc.rb#188
18
- def []=(k, info); end
19
-
20
- # source://netrc//lib/netrc.rb#200
21
- def delete(key); end
22
-
23
- # source://netrc//lib/netrc.rb#211
24
- def each(&block); end
25
-
26
- # source://netrc//lib/netrc.rb#196
27
- def length; end
28
-
29
- # source://netrc//lib/netrc.rb#215
30
- def new_item(m, l, p); end
31
-
32
- # Returns the value of attribute new_item_prefix.
33
- #
34
- # source://netrc//lib/netrc.rb#178
35
- def new_item_prefix; end
36
-
37
- # Sets the attribute new_item_prefix
38
- #
39
- # @param value the value to set the attribute new_item_prefix to.
40
- #
41
- # source://netrc//lib/netrc.rb#178
42
- def new_item_prefix=(_arg0); end
43
-
44
- # source://netrc//lib/netrc.rb#219
45
- def save; end
46
-
47
- # source://netrc//lib/netrc.rb#233
48
- def unparse; end
49
-
50
- class << self
51
- # source://netrc//lib/netrc.rb#42
52
- def check_permissions(path); end
53
-
54
- # source://netrc//lib/netrc.rb#33
55
- def config; end
56
-
57
- # @yield [self.config]
58
- #
59
- # source://netrc//lib/netrc.rb#37
60
- def configure; end
61
-
62
- # source://netrc//lib/netrc.rb#10
63
- def default_path; end
64
-
65
- # source://netrc//lib/netrc.rb#14
66
- def home_path; end
67
-
68
- # source://netrc//lib/netrc.rb#85
69
- def lex(lines); end
70
-
71
- # source://netrc//lib/netrc.rb#29
72
- def netrc_filename; end
73
-
74
- # Returns two values, a header and a list of items.
75
- # Each item is a tuple, containing some or all of:
76
- # - machine keyword (including trailing whitespace+comments)
77
- # - machine name
78
- # - login keyword (including surrounding whitespace+comments)
79
- # - login
80
- # - password keyword (including surrounding whitespace+comments)
81
- # - password
82
- # - trailing chars
83
- # This lets us change individual fields, then write out the file
84
- # with all its original formatting.
85
- #
86
- # source://netrc//lib/netrc.rb#129
87
- def parse(ts); end
88
-
89
- # Reads path and parses it as a .netrc file. If path doesn't
90
- # exist, returns an empty object. Decrypt paths ending in .gpg.
91
- #
92
- # source://netrc//lib/netrc.rb#51
93
- def read(path = T.unsafe(nil)); end
94
-
95
- # @return [Boolean]
96
- #
97
- # source://netrc//lib/netrc.rb#112
98
- def skip?(s); end
99
- end
100
- end
101
-
102
- # source://netrc//lib/netrc.rb#8
103
- Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped)
104
-
105
- # source://netrc//lib/netrc.rb#244
106
- class Netrc::Entry < ::Struct
107
- # Returns the value of attribute login
108
- #
109
- # @return [Object] the current value of login
110
- def login; end
111
-
112
- # Sets the attribute login
113
- #
114
- # @param value [Object] the value to set the attribute login to.
115
- # @return [Object] the newly set value
116
- def login=(_); end
117
-
118
- # Returns the value of attribute password
119
- #
120
- # @return [Object] the current value of password
121
- def password; end
122
-
123
- # Sets the attribute password
124
- #
125
- # @param value [Object] the value to set the attribute password to.
126
- # @return [Object] the newly set value
127
- def password=(_); end
128
-
129
- def to_ary; end
130
-
131
- class << self
132
- def [](*_arg0); end
133
- def inspect; end
134
- def keyword_init?; end
135
- def members; end
136
- def new(*_arg0); end
137
- end
138
- end
139
-
140
- # source://netrc//lib/netrc.rb#250
141
- class Netrc::Error < ::StandardError; end
142
-
143
- # source://netrc//lib/netrc.rb#68
144
- class Netrc::TokenArray < ::Array
145
- # source://netrc//lib/netrc.rb#76
146
- def readto; end
147
-
148
- # source://netrc//lib/netrc.rb#69
149
- def take; end
150
- end
151
-
152
- # source://netrc//lib/netrc.rb#4
153
- Netrc::VERSION = T.let(T.unsafe(nil), String)
154
-
155
- # see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows
156
- #
157
- # source://netrc//lib/netrc.rb#7
158
- Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped)
@@ -1,8 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `nokogiri` gem.
5
- # Please instead update this file by running `bin/tapioca gem nokogiri`.
6
-
7
- # THIS IS AN EMPTY RBI FILE.
8
- # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
@@ -1,280 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `parallel` gem.
5
- # Please instead update this file by running `bin/tapioca gem parallel`.
6
-
7
- # source://parallel//lib/parallel/version.rb#2
8
- module Parallel
9
- class << self
10
- # @return [Boolean]
11
- #
12
- # source://parallel//lib/parallel.rb#243
13
- def all?(*args, &block); end
14
-
15
- # @return [Boolean]
16
- #
17
- # source://parallel//lib/parallel.rb#238
18
- def any?(*args, &block); end
19
-
20
- # source://parallel//lib/parallel.rb#234
21
- def each(array, options = T.unsafe(nil), &block); end
22
-
23
- # source://parallel//lib/parallel.rb#248
24
- def each_with_index(array, options = T.unsafe(nil), &block); end
25
-
26
- # source://parallel//lib/parallel.rb#307
27
- def filter_map(*args, &block); end
28
-
29
- # source://parallel//lib/parallel.rb#303
30
- def flat_map(*args, &block); end
31
-
32
- # source://parallel//lib/parallel.rb#228
33
- def in_processes(options = T.unsafe(nil), &block); end
34
-
35
- # source://parallel//lib/parallel.rb#212
36
- def in_threads(options = T.unsafe(nil)); end
37
-
38
- # source://parallel//lib/parallel.rb#252
39
- def map(source, options = T.unsafe(nil), &block); end
40
-
41
- # source://parallel//lib/parallel.rb#299
42
- def map_with_index(array, options = T.unsafe(nil), &block); end
43
-
44
- # Number of physical processor cores on the current system.
45
- #
46
- # source://parallel//lib/parallel.rb#312
47
- def physical_processor_count; end
48
-
49
- # Number of processors seen by the OS, used for process scheduling
50
- #
51
- # source://parallel//lib/parallel.rb#345
52
- def processor_count; end
53
-
54
- # source://parallel//lib/parallel.rb#350
55
- def worker_number; end
56
-
57
- # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed
58
- #
59
- # source://parallel//lib/parallel.rb#355
60
- def worker_number=(worker_num); end
61
-
62
- private
63
-
64
- # source://parallel//lib/parallel.rb#361
65
- def add_progress_bar!(job_factory, options); end
66
-
67
- # source://parallel//lib/parallel.rb#624
68
- def call_with_index(item, index, options, &block); end
69
-
70
- # source://parallel//lib/parallel.rb#556
71
- def create_workers(job_factory, options, &block); end
72
-
73
- # options is either a Integer or a Hash with :count
74
- #
75
- # source://parallel//lib/parallel.rb#614
76
- def extract_count_from_options(options); end
77
-
78
- # source://parallel//lib/parallel.rb#642
79
- def instrument_finish(item, index, result, options); end
80
-
81
- # yield results in the order of the input items
82
- # needs to use `options` to store state between executions
83
- # needs to use `done` index since a nil result would also be valid
84
- #
85
- # source://parallel//lib/parallel.rb#651
86
- def instrument_finish_in_order(item, index, result, options); end
87
-
88
- # source://parallel//lib/parallel.rb#671
89
- def instrument_start(item, index, options); end
90
-
91
- # source://parallel//lib/parallel.rb#590
92
- def process_incoming_jobs(read, write, job_factory, options, &block); end
93
-
94
- # source://parallel//lib/parallel.rb#544
95
- def replace_worker(job_factory, workers, index, options, blk); end
96
-
97
- # source://parallel//lib/parallel.rb#635
98
- def with_instrumentation(item, index, options); end
99
-
100
- # source://parallel//lib/parallel.rb#386
101
- def work_direct(job_factory, options, &block); end
102
-
103
- # source://parallel//lib/parallel.rb#496
104
- def work_in_processes(job_factory, options, &blk); end
105
-
106
- # source://parallel//lib/parallel.rb#430
107
- def work_in_ractors(job_factory, options); end
108
-
109
- # source://parallel//lib/parallel.rb#405
110
- def work_in_threads(job_factory, options, &block); end
111
-
112
- # source://parallel//lib/parallel.rb#564
113
- def worker(job_factory, options, &block); end
114
- end
115
- end
116
-
117
- # source://parallel//lib/parallel.rb#11
118
- class Parallel::Break < ::StandardError
119
- # @return [Break] a new instance of Break
120
- #
121
- # source://parallel//lib/parallel.rb#14
122
- def initialize(value = T.unsafe(nil)); end
123
-
124
- # Returns the value of attribute value.
125
- #
126
- # source://parallel//lib/parallel.rb#12
127
- def value; end
128
- end
129
-
130
- # source://parallel//lib/parallel.rb#8
131
- class Parallel::DeadWorker < ::StandardError; end
132
-
133
- # source://parallel//lib/parallel.rb#32
134
- class Parallel::ExceptionWrapper
135
- # @return [ExceptionWrapper] a new instance of ExceptionWrapper
136
- #
137
- # source://parallel//lib/parallel.rb#35
138
- def initialize(exception); end
139
-
140
- # Returns the value of attribute exception.
141
- #
142
- # source://parallel//lib/parallel.rb#33
143
- def exception; end
144
- end
145
-
146
- # source://parallel//lib/parallel.rb#98
147
- class Parallel::JobFactory
148
- # @return [JobFactory] a new instance of JobFactory
149
- #
150
- # source://parallel//lib/parallel.rb#99
151
- def initialize(source, mutex); end
152
-
153
- # source://parallel//lib/parallel.rb#107
154
- def next; end
155
-
156
- # generate item that is sent to workers
157
- # just index is faster + less likely to blow up with unserializable errors
158
- #
159
- # source://parallel//lib/parallel.rb#136
160
- def pack(item, index); end
161
-
162
- # source://parallel//lib/parallel.rb#126
163
- def size; end
164
-
165
- # unpack item that is sent to workers
166
- #
167
- # source://parallel//lib/parallel.rb#141
168
- def unpack(data); end
169
-
170
- private
171
-
172
- # @return [Boolean]
173
- #
174
- # source://parallel//lib/parallel.rb#147
175
- def producer?; end
176
-
177
- # source://parallel//lib/parallel.rb#151
178
- def queue_wrapper(array); end
179
- end
180
-
181
- # source://parallel//lib/parallel.rb#20
182
- class Parallel::Kill < ::Parallel::Break; end
183
-
184
- # source://parallel//lib/parallel.rb#6
185
- Parallel::Stop = T.let(T.unsafe(nil), Object)
186
-
187
- # source://parallel//lib/parallel.rb#23
188
- class Parallel::UndumpableException < ::StandardError
189
- # @return [UndumpableException] a new instance of UndumpableException
190
- #
191
- # source://parallel//lib/parallel.rb#26
192
- def initialize(original); end
193
-
194
- # Returns the value of attribute backtrace.
195
- #
196
- # source://parallel//lib/parallel.rb#24
197
- def backtrace; end
198
- end
199
-
200
- # source://parallel//lib/parallel.rb#156
201
- class Parallel::UserInterruptHandler
202
- class << self
203
- # source://parallel//lib/parallel.rb#181
204
- def kill(thing); end
205
-
206
- # kill all these pids or threads if user presses Ctrl+c
207
- #
208
- # source://parallel//lib/parallel.rb#161
209
- def kill_on_ctrl_c(pids, options); end
210
-
211
- private
212
-
213
- # source://parallel//lib/parallel.rb#205
214
- def restore_interrupt(old, signal); end
215
-
216
- # source://parallel//lib/parallel.rb#190
217
- def trap_interrupt(signal); end
218
- end
219
- end
220
-
221
- # source://parallel//lib/parallel.rb#157
222
- Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol)
223
-
224
- # source://parallel//lib/parallel/version.rb#3
225
- Parallel::VERSION = T.let(T.unsafe(nil), String)
226
-
227
- # source://parallel//lib/parallel/version.rb#3
228
- Parallel::Version = T.let(T.unsafe(nil), String)
229
-
230
- # source://parallel//lib/parallel.rb#51
231
- class Parallel::Worker
232
- # @return [Worker] a new instance of Worker
233
- #
234
- # source://parallel//lib/parallel.rb#55
235
- def initialize(read, write, pid); end
236
-
237
- # might be passed to started_processes and simultaneously closed by another thread
238
- # when running in isolation mode, so we have to check if it is closed before closing
239
- #
240
- # source://parallel//lib/parallel.rb#68
241
- def close_pipes; end
242
-
243
- # Returns the value of attribute pid.
244
- #
245
- # source://parallel//lib/parallel.rb#52
246
- def pid; end
247
-
248
- # Returns the value of attribute read.
249
- #
250
- # source://parallel//lib/parallel.rb#52
251
- def read; end
252
-
253
- # source://parallel//lib/parallel.rb#61
254
- def stop; end
255
-
256
- # Returns the value of attribute thread.
257
- #
258
- # source://parallel//lib/parallel.rb#53
259
- def thread; end
260
-
261
- # Sets the attribute thread
262
- #
263
- # @param value the value to set the attribute thread to.
264
- #
265
- # source://parallel//lib/parallel.rb#53
266
- def thread=(_arg0); end
267
-
268
- # source://parallel//lib/parallel.rb#73
269
- def work(data); end
270
-
271
- # Returns the value of attribute write.
272
- #
273
- # source://parallel//lib/parallel.rb#52
274
- def write; end
275
-
276
- private
277
-
278
- # source://parallel//lib/parallel.rb#91
279
- def wait; end
280
- end