pack_stats 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,337 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `code_ownership` gem.
5
+ # Please instead update this file by running `bin/tapioca gem code_ownership`.
6
+
7
+ module CodeOwnership
8
+ extend ::CodeOwnership
9
+
10
+ requires_ancestor { Kernel }
11
+
12
+ sig do
13
+ params(
14
+ backtrace: T.nilable(T::Array[::String]),
15
+ excluded_teams: T::Array[::CodeTeams::Team]
16
+ ).returns(T.nilable(::CodeTeams::Team))
17
+ end
18
+ def for_backtrace(backtrace, excluded_teams: T.unsafe(nil)); end
19
+
20
+ sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::CodeTeams::Team)) }
21
+ def for_class(klass); end
22
+
23
+ sig { params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
24
+ def for_file(file); end
25
+
26
+ sig { params(package: ::ParsePackwerk::Package).returns(T.nilable(::CodeTeams::Team)) }
27
+ def for_package(package); end
28
+
29
+ sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
30
+ def validate!(files: T.unsafe(nil), autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
31
+
32
+ class << self
33
+ sig { void }
34
+ def bust_caches!; end
35
+
36
+ sig { params(filename: ::String).void }
37
+ def remove_file_annotation!(filename); end
38
+ end
39
+ end
40
+
41
+ class CodeOwnership::Cli
42
+ class << self
43
+ def for_file(argv); end
44
+ def run!(argv); end
45
+
46
+ private
47
+
48
+ def validate!(argv); end
49
+ end
50
+ end
51
+
52
+ class CodeOwnership::InvalidCodeOwnershipConfigurationError < ::StandardError; end
53
+
54
+ module CodeOwnership::Private
55
+ class << self
56
+ sig { void }
57
+ def bust_caches!; end
58
+
59
+ sig { returns(::CodeOwnership::Private::Configuration) }
60
+ def configuration; end
61
+
62
+ sig { returns(::CodeOwnership::Private::OwnershipMappers::FileAnnotations) }
63
+ def file_annotations_mapper; end
64
+
65
+ sig { params(files: T::Array[::String]).returns(T::Hash[::String, T::Array[::String]]) }
66
+ def files_by_mapper(files); end
67
+
68
+ sig { params(team_name: ::String, location_of_reference: ::String).returns(::CodeTeams::Team) }
69
+ def find_team!(team_name, location_of_reference); end
70
+
71
+ sig { returns(T::Array[::CodeOwnership::Private::OwnershipMappers::Interface]) }
72
+ def mappers; end
73
+
74
+ sig { params(klass: T.nilable(T.any(::Class, ::Module))).returns(T.nilable(::String)) }
75
+ def path_from_klass(klass); end
76
+
77
+ sig { returns(T::Array[::String]) }
78
+ def tracked_files; end
79
+
80
+ sig { params(files: T::Array[::String], autocorrect: T::Boolean, stage_changes: T::Boolean).void }
81
+ def validate!(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
82
+ end
83
+ end
84
+
85
+ class CodeOwnership::Private::Configuration < ::T::Struct
86
+ const :js_package_paths, T::Array[::String]
87
+ const :owned_globs, T::Array[::String]
88
+ const :skip_codeowners_validation, T::Boolean
89
+ const :unowned_globs, T::Array[::String]
90
+
91
+ class << self
92
+ sig { returns(::CodeOwnership::Private::Configuration) }
93
+ def fetch; end
94
+
95
+ def inherited(s); end
96
+
97
+ sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
98
+ def js_package_paths(config_hash); end
99
+ end
100
+ end
101
+
102
+ CodeOwnership::Private::Configuration::DEFAULT_JS_PACKAGE_PATHS = T.let(T.unsafe(nil), Array)
103
+ module CodeOwnership::Private::OwnershipMappers; end
104
+
105
+ class CodeOwnership::Private::OwnershipMappers::FileAnnotations
106
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
107
+
108
+ sig { override.void }
109
+ def bust_caches!; end
110
+
111
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
112
+ def codeowners_lines_to_owners; end
113
+
114
+ sig { override.returns(::String) }
115
+ def description; end
116
+
117
+ sig { params(filename: ::String).returns(T.nilable(::CodeTeams::Team)) }
118
+ def file_annotation_based_owner(filename); end
119
+
120
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
121
+ def map_file_to_owner(file); end
122
+
123
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
124
+ def map_files_to_owners(files); end
125
+
126
+ sig { params(filename: ::String).void }
127
+ def remove_file_annotation!(filename); end
128
+ end
129
+
130
+ CodeOwnership::Private::OwnershipMappers::FileAnnotations::TEAM_PATTERN = T.let(T.unsafe(nil), Regexp)
131
+
132
+ module CodeOwnership::Private::OwnershipMappers::Interface
133
+ interface!
134
+
135
+ sig { abstract.void }
136
+ def bust_caches!; end
137
+
138
+ sig { abstract.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
139
+ def codeowners_lines_to_owners; end
140
+
141
+ sig { abstract.returns(::String) }
142
+ def description; end
143
+
144
+ sig { abstract.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
145
+ def map_file_to_owner(file); end
146
+
147
+ sig { abstract.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
148
+ def map_files_to_owners(files); end
149
+ end
150
+
151
+ class CodeOwnership::Private::OwnershipMappers::JsPackageOwnership
152
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
153
+
154
+ sig { override.void }
155
+ def bust_caches!; end
156
+
157
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
158
+ def codeowners_lines_to_owners; end
159
+
160
+ sig { override.returns(::String) }
161
+ def description; end
162
+
163
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
164
+ def map_file_to_owner(file); end
165
+
166
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
167
+ def map_files_to_owners(files); end
168
+
169
+ sig { params(package: ::CodeOwnership::Private::ParseJsPackages::Package).returns(T.nilable(::CodeTeams::Team)) }
170
+ def owner_for_package(package); end
171
+
172
+ private
173
+
174
+ sig { params(file: ::String).returns(T.nilable(::CodeOwnership::Private::ParseJsPackages::Package)) }
175
+ def map_file_to_relevant_package(file); end
176
+ end
177
+
178
+ class CodeOwnership::Private::OwnershipMappers::PackageOwnership
179
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
180
+
181
+ sig { override.void }
182
+ def bust_caches!; end
183
+
184
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
185
+ def codeowners_lines_to_owners; end
186
+
187
+ sig { override.returns(::String) }
188
+ def description; end
189
+
190
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
191
+ def map_file_to_owner(file); end
192
+
193
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
194
+ def map_files_to_owners(files); end
195
+
196
+ sig { params(package: ::ParsePackwerk::Package).returns(T.nilable(::CodeTeams::Team)) }
197
+ def owner_for_package(package); end
198
+
199
+ private
200
+
201
+ sig { params(file: ::String).returns(T.nilable(::ParsePackwerk::Package)) }
202
+ def map_file_to_relevant_package(file); end
203
+ end
204
+
205
+ class CodeOwnership::Private::OwnershipMappers::TeamGlobs
206
+ include ::CodeOwnership::Private::OwnershipMappers::Interface
207
+
208
+ sig { override.void }
209
+ def bust_caches!; end
210
+
211
+ sig { override.returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
212
+ def codeowners_lines_to_owners; end
213
+
214
+ sig { override.returns(::String) }
215
+ def description; end
216
+
217
+ sig { override.params(file: ::String).returns(T.nilable(::CodeTeams::Team)) }
218
+ def map_file_to_owner(file); end
219
+
220
+ sig { override.params(files: T::Array[::String]).returns(T::Hash[::String, T.nilable(::CodeTeams::Team)]) }
221
+ def map_files_to_owners(files); end
222
+ end
223
+
224
+ module CodeOwnership::Private::ParseJsPackages
225
+ class << self
226
+ sig { returns(T::Array[::CodeOwnership::Private::ParseJsPackages::Package]) }
227
+ def all; end
228
+ end
229
+ end
230
+
231
+ CodeOwnership::Private::ParseJsPackages::METADATA = T.let(T.unsafe(nil), String)
232
+ CodeOwnership::Private::ParseJsPackages::PACKAGE_JSON_NAME = T.let(T.unsafe(nil), String)
233
+
234
+ class CodeOwnership::Private::ParseJsPackages::Package < ::T::Struct
235
+ const :metadata, T::Hash[::String, T.untyped]
236
+ const :name, ::String
237
+
238
+ sig { returns(::Pathname) }
239
+ def directory; end
240
+
241
+ class << self
242
+ sig { params(pathname: ::Pathname).returns(::CodeOwnership::Private::ParseJsPackages::Package) }
243
+ def from(pathname); end
244
+
245
+ def inherited(s); end
246
+ end
247
+ end
248
+
249
+ CodeOwnership::Private::ParseJsPackages::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
250
+ module CodeOwnership::Private::TeamPlugins; end
251
+
252
+ class CodeOwnership::Private::TeamPlugins::Github < ::CodeTeams::Plugin
253
+ sig { returns(::CodeOwnership::Private::TeamPlugins::Github::GithubStruct) }
254
+ def github; end
255
+ end
256
+
257
+ class CodeOwnership::Private::TeamPlugins::Github::GithubStruct < ::Struct
258
+ def do_not_add_to_codeowners_file; end
259
+ def do_not_add_to_codeowners_file=(_); end
260
+ def team; end
261
+ def team=(_); end
262
+
263
+ class << self
264
+ def [](*_arg0); end
265
+ def inspect; end
266
+ def members; end
267
+ def new(*_arg0); end
268
+ end
269
+ end
270
+
271
+ class CodeOwnership::Private::TeamPlugins::Ownership < ::CodeTeams::Plugin
272
+ sig { returns(T::Array[::String]) }
273
+ def owned_globs; end
274
+ end
275
+
276
+ module CodeOwnership::Private::Validations; end
277
+
278
+ class CodeOwnership::Private::Validations::FilesHaveOwners
279
+ include ::CodeOwnership::Private::Validations::Interface
280
+
281
+ sig do
282
+ override
283
+ .params(
284
+ files: T::Array[::String],
285
+ autocorrect: T::Boolean,
286
+ stage_changes: T::Boolean
287
+ ).returns(T::Array[::String])
288
+ end
289
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
290
+ end
291
+
292
+ class CodeOwnership::Private::Validations::FilesHaveUniqueOwners
293
+ include ::CodeOwnership::Private::Validations::Interface
294
+
295
+ sig do
296
+ override
297
+ .params(
298
+ files: T::Array[::String],
299
+ autocorrect: T::Boolean,
300
+ stage_changes: T::Boolean
301
+ ).returns(T::Array[::String])
302
+ end
303
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
304
+ end
305
+
306
+ class CodeOwnership::Private::Validations::GithubCodeownersUpToDate
307
+ include ::CodeOwnership::Private::Validations::Interface
308
+
309
+ sig do
310
+ override
311
+ .params(
312
+ files: T::Array[::String],
313
+ autocorrect: T::Boolean,
314
+ stage_changes: T::Boolean
315
+ ).returns(T::Array[::String])
316
+ end
317
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
318
+
319
+ private
320
+
321
+ sig { returns(T::Array[::String]) }
322
+ def codeowners_file_lines; end
323
+ end
324
+
325
+ module CodeOwnership::Private::Validations::Interface
326
+ interface!
327
+
328
+ sig do
329
+ abstract
330
+ .params(
331
+ files: T::Array[::String],
332
+ autocorrect: T::Boolean,
333
+ stage_changes: T::Boolean
334
+ ).returns(T::Array[::String])
335
+ end
336
+ def validation_errors(files:, autocorrect: T.unsafe(nil), stage_changes: T.unsafe(nil)); end
337
+ end
@@ -0,0 +1,120 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `code_teams` gem.
5
+ # Please instead update this file by running `bin/tapioca gem code_teams`.
6
+
7
+ module CodeTeams
8
+ class << self
9
+ sig { returns(T::Array[::CodeTeams::Team]) }
10
+ def all; end
11
+
12
+ sig { void }
13
+ def bust_caches!; end
14
+
15
+ sig { params(name: ::String).returns(T.nilable(::CodeTeams::Team)) }
16
+ def find(name); end
17
+
18
+ sig { params(dir: ::String).returns(T::Array[::CodeTeams::Team]) }
19
+ def for_directory(dir); end
20
+
21
+ sig { params(string: ::String).returns(::String) }
22
+ def tag_value_for(string); end
23
+
24
+ sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) }
25
+ def validation_errors(teams); end
26
+ end
27
+ end
28
+
29
+ class CodeTeams::IncorrectPublicApiUsageError < ::StandardError; end
30
+
31
+ class CodeTeams::Plugin
32
+ abstract!
33
+
34
+ sig { params(team: ::CodeTeams::Team).void }
35
+ def initialize(team); end
36
+
37
+ class << self
38
+ sig { returns(T::Array[T.class_of(CodeTeams::Plugin)]) }
39
+ def all_plugins; end
40
+
41
+ sig { params(team: ::CodeTeams::Team).returns(T.attached_class) }
42
+ def for(team); end
43
+
44
+ sig { params(base: T.untyped).void }
45
+ def inherited(base); end
46
+
47
+ sig { params(team: ::CodeTeams::Team, key: ::String).returns(::String) }
48
+ def missing_key_error_message(team, key); end
49
+
50
+ sig { params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) }
51
+ def validation_errors(teams); end
52
+
53
+ private
54
+
55
+ sig { params(team: ::CodeTeams::Team).returns(T.attached_class) }
56
+ def register_team(team); end
57
+
58
+ sig { returns(T::Hash[T.nilable(::String), T::Hash[::Class, ::CodeTeams::Plugin]]) }
59
+ def registry; end
60
+ end
61
+ end
62
+
63
+ module CodeTeams::Plugins; end
64
+
65
+ class CodeTeams::Plugins::Identity < ::CodeTeams::Plugin
66
+ sig { returns(::CodeTeams::Plugins::Identity::IdentityStruct) }
67
+ def identity; end
68
+
69
+ class << self
70
+ sig { override.params(teams: T::Array[::CodeTeams::Team]).returns(T::Array[::String]) }
71
+ def validation_errors(teams); end
72
+ end
73
+ end
74
+
75
+ class CodeTeams::Plugins::Identity::IdentityStruct < ::Struct
76
+ def name; end
77
+ def name=(_); end
78
+
79
+ class << self
80
+ def [](*_arg0); end
81
+ def inspect; end
82
+ def members; end
83
+ def new(*_arg0); end
84
+ end
85
+ end
86
+
87
+ class CodeTeams::Team
88
+ sig { params(config_yml: T.nilable(::String), raw_hash: T::Hash[T.untyped, T.untyped]).void }
89
+ def initialize(config_yml:, raw_hash:); end
90
+
91
+ sig { params(other: ::Object).returns(T::Boolean) }
92
+ def ==(other); end
93
+
94
+ sig { returns(T.nilable(::String)) }
95
+ def config_yml; end
96
+
97
+ def eql?(*args, &blk); end
98
+
99
+ sig { returns(::Integer) }
100
+ def hash; end
101
+
102
+ sig { returns(::String) }
103
+ def name; end
104
+
105
+ sig { returns(T::Hash[T.untyped, T.untyped]) }
106
+ def raw_hash; end
107
+
108
+ sig { returns(::String) }
109
+ def to_tag; end
110
+
111
+ class << self
112
+ sig { params(raw_hash: T::Hash[T.untyped, T.untyped]).returns(::CodeTeams::Team) }
113
+ def from_hash(raw_hash); end
114
+
115
+ sig { params(config_yml: ::String).returns(::CodeTeams::Team) }
116
+ def from_yml(config_yml); end
117
+ end
118
+ end
119
+
120
+ CodeTeams::UNKNOWN_TEAM_STRING = T.let(T.unsafe(nil), String)