visualize_packwerk 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +32 -0
- data/lib/visualize_packwerk/graph_interface.rb +17 -0
- data/lib/visualize_packwerk/node_interface.rb +29 -0
- data/lib/visualize_packwerk/package_graph.rb +48 -0
- data/lib/visualize_packwerk/package_node.rb +28 -0
- data/lib/visualize_packwerk/package_relationships.rb +158 -0
- data/lib/visualize_packwerk/railtie.rb +15 -0
- data/lib/visualize_packwerk/tasks/visualize_packwerk.rake +73 -0
- data/lib/visualize_packwerk/team_graph.rb +52 -0
- data/lib/visualize_packwerk/team_node.rb +27 -0
- data/lib/visualize_packwerk.rb +17 -0
- data/sorbet/config +2 -0
- data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +76 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +522 -0
- data/sorbet/rbi/gems/code_ownership@1.28.0.rbi +411 -0
- data/sorbet/rbi/gems/code_teams@1.0.0.rbi +138 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +866 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +8 -0
- data/sorbet/rbi/gems/json@2.6.2.rbi +1423 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/minitest@5.16.2.rbi +9 -0
- data/sorbet/rbi/gems/package_protections@1.3.0.rbi +654 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +163 -0
- data/sorbet/rbi/gems/parse_packwerk@0.11.0.rbi +148 -0
- data/sorbet/rbi/gems/parser@3.1.2.0.rbi +4261 -0
- data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +1854 -0
- data/sorbet/rbi/gems/rbi@0.0.15.rbi +2340 -0
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +8 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
- data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +7698 -0
- data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +6201 -0
- data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +3625 -0
- data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +1176 -0
- data/sorbet/rbi/gems/rspec@3.11.0.rbi +40 -0
- data/sorbet/rbi/gems/rubocop-ast@1.19.1.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +8 -0
- data/sorbet/rbi/gems/rubocop@1.33.0.rbi +8 -0
- data/sorbet/rbi/gems/ruby-graphviz@1.2.5.rbi +840 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.1.11.rbi +1600 -0
- data/sorbet/rbi/gems/tapioca@0.8.3.rbi +1978 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +2921 -0
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +8 -0
- data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +8 -0
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +8 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +1802 -0
- data/sorbet/rbi/gems/yard-sorbet@0.6.1.rbi +288 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +12863 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +7 -0
- metadata +241 -0
@@ -0,0 +1,163 @@
|
|
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
|
+
module Parallel
|
8
|
+
extend ::Parallel::ProcessorCount
|
9
|
+
|
10
|
+
class << self
|
11
|
+
# @return [Boolean]
|
12
|
+
def all?(*args, &block); end
|
13
|
+
|
14
|
+
# @return [Boolean]
|
15
|
+
def any?(*args, &block); end
|
16
|
+
|
17
|
+
def each(array, options = T.unsafe(nil), &block); end
|
18
|
+
def each_with_index(array, options = T.unsafe(nil), &block); end
|
19
|
+
def flat_map(*args, &block); end
|
20
|
+
def in_processes(options = T.unsafe(nil), &block); end
|
21
|
+
def in_threads(options = T.unsafe(nil)); end
|
22
|
+
def map(source, options = T.unsafe(nil), &block); end
|
23
|
+
def map_with_index(array, options = T.unsafe(nil), &block); end
|
24
|
+
def worker_number; end
|
25
|
+
|
26
|
+
# TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed
|
27
|
+
def worker_number=(worker_num); end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def add_progress_bar!(job_factory, options); end
|
32
|
+
def call_with_index(item, index, options, &block); end
|
33
|
+
def create_workers(job_factory, options, &block); end
|
34
|
+
|
35
|
+
# options is either a Integer or a Hash with :count
|
36
|
+
def extract_count_from_options(options); end
|
37
|
+
|
38
|
+
def instrument_finish(item, index, result, options); end
|
39
|
+
def instrument_start(item, index, options); end
|
40
|
+
def process_incoming_jobs(read, write, job_factory, options, &block); end
|
41
|
+
def replace_worker(job_factory, workers, index, options, blk); end
|
42
|
+
def with_instrumentation(item, index, options); end
|
43
|
+
def work_direct(job_factory, options, &block); end
|
44
|
+
def work_in_processes(job_factory, options, &blk); end
|
45
|
+
def work_in_ractors(job_factory, options); end
|
46
|
+
def work_in_threads(job_factory, options, &block); end
|
47
|
+
def worker(job_factory, options, &block); end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
class Parallel::Break < ::StandardError
|
52
|
+
# @return [Break] a new instance of Break
|
53
|
+
def initialize(value = T.unsafe(nil)); end
|
54
|
+
|
55
|
+
# Returns the value of attribute value.
|
56
|
+
def value; end
|
57
|
+
end
|
58
|
+
|
59
|
+
class Parallel::DeadWorker < ::StandardError; end
|
60
|
+
|
61
|
+
class Parallel::ExceptionWrapper
|
62
|
+
# @return [ExceptionWrapper] a new instance of ExceptionWrapper
|
63
|
+
def initialize(exception); end
|
64
|
+
|
65
|
+
# Returns the value of attribute exception.
|
66
|
+
def exception; end
|
67
|
+
end
|
68
|
+
|
69
|
+
class Parallel::JobFactory
|
70
|
+
# @return [JobFactory] a new instance of JobFactory
|
71
|
+
def initialize(source, mutex); end
|
72
|
+
|
73
|
+
def next; end
|
74
|
+
|
75
|
+
# generate item that is sent to workers
|
76
|
+
# just index is faster + less likely to blow up with unserializable errors
|
77
|
+
def pack(item, index); end
|
78
|
+
|
79
|
+
def size; end
|
80
|
+
|
81
|
+
# unpack item that is sent to workers
|
82
|
+
def unpack(data); end
|
83
|
+
|
84
|
+
private
|
85
|
+
|
86
|
+
# @return [Boolean]
|
87
|
+
def producer?; end
|
88
|
+
|
89
|
+
def queue_wrapper(array); end
|
90
|
+
end
|
91
|
+
|
92
|
+
class Parallel::Kill < ::Parallel::Break; end
|
93
|
+
|
94
|
+
# TODO: inline this method into parallel.rb and kill physical_processor_count in next major release
|
95
|
+
module Parallel::ProcessorCount
|
96
|
+
# Number of physical processor cores on the current system.
|
97
|
+
def physical_processor_count; end
|
98
|
+
|
99
|
+
# Number of processors seen by the OS, used for process scheduling
|
100
|
+
def processor_count; end
|
101
|
+
end
|
102
|
+
|
103
|
+
Parallel::Stop = T.let(T.unsafe(nil), Object)
|
104
|
+
|
105
|
+
class Parallel::UndumpableException < ::StandardError
|
106
|
+
# @return [UndumpableException] a new instance of UndumpableException
|
107
|
+
def initialize(original); end
|
108
|
+
|
109
|
+
# Returns the value of attribute backtrace.
|
110
|
+
def backtrace; end
|
111
|
+
end
|
112
|
+
|
113
|
+
class Parallel::UserInterruptHandler
|
114
|
+
class << self
|
115
|
+
def kill(thing); end
|
116
|
+
|
117
|
+
# kill all these pids or threads if user presses Ctrl+c
|
118
|
+
def kill_on_ctrl_c(pids, options); end
|
119
|
+
|
120
|
+
private
|
121
|
+
|
122
|
+
def restore_interrupt(old, signal); end
|
123
|
+
def trap_interrupt(signal); end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol)
|
128
|
+
Parallel::VERSION = T.let(T.unsafe(nil), String)
|
129
|
+
Parallel::Version = T.let(T.unsafe(nil), String)
|
130
|
+
|
131
|
+
class Parallel::Worker
|
132
|
+
# @return [Worker] a new instance of Worker
|
133
|
+
def initialize(read, write, pid); end
|
134
|
+
|
135
|
+
# might be passed to started_processes and simultaneously closed by another thread
|
136
|
+
# when running in isolation mode, so we have to check if it is closed before closing
|
137
|
+
def close_pipes; end
|
138
|
+
|
139
|
+
# Returns the value of attribute pid.
|
140
|
+
def pid; end
|
141
|
+
|
142
|
+
# Returns the value of attribute read.
|
143
|
+
def read; end
|
144
|
+
|
145
|
+
def stop; end
|
146
|
+
|
147
|
+
# Returns the value of attribute thread.
|
148
|
+
def thread; end
|
149
|
+
|
150
|
+
# Sets the attribute thread
|
151
|
+
#
|
152
|
+
# @param value the value to set the attribute thread to.
|
153
|
+
def thread=(_arg0); end
|
154
|
+
|
155
|
+
def work(data); end
|
156
|
+
|
157
|
+
# Returns the value of attribute write.
|
158
|
+
def write; end
|
159
|
+
|
160
|
+
private
|
161
|
+
|
162
|
+
def wait; end
|
163
|
+
end
|
@@ -0,0 +1,148 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `parse_packwerk` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem parse_packwerk`.
|
6
|
+
|
7
|
+
module ParsePackwerk
|
8
|
+
class << self
|
9
|
+
sig { returns(T::Array[::ParsePackwerk::Package]) }
|
10
|
+
def all; end
|
11
|
+
|
12
|
+
sig { params(name: ::String).returns(T.nilable(::ParsePackwerk::Package)) }
|
13
|
+
def find(name); end
|
14
|
+
|
15
|
+
sig { params(file_path: T.any(::Pathname, ::String)).returns(T.nilable(::ParsePackwerk::Package)) }
|
16
|
+
def package_from_path(file_path); end
|
17
|
+
|
18
|
+
sig { params(package: ::ParsePackwerk::Package).void }
|
19
|
+
def write_package_yml!(package); end
|
20
|
+
|
21
|
+
sig { returns(::ParsePackwerk::Configuration) }
|
22
|
+
def yml; end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
# We memoize packages_by_name for fast lookup.
|
27
|
+
# Since Graph is an immutable value object, we can create indexes and general caching mechanisms safely.
|
28
|
+
sig { returns(T::Hash[::String, ::ParsePackwerk::Package]) }
|
29
|
+
def packages_by_name; end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class ParsePackwerk::Configuration < ::T::Struct
|
34
|
+
const :exclude, T::Array[::String]
|
35
|
+
const :package_paths, T::Array[::String]
|
36
|
+
|
37
|
+
class << self
|
38
|
+
sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
|
39
|
+
def excludes(config_hash); end
|
40
|
+
|
41
|
+
sig { returns(::ParsePackwerk::Configuration) }
|
42
|
+
def fetch; end
|
43
|
+
|
44
|
+
def inherited(s); end
|
45
|
+
|
46
|
+
sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
|
47
|
+
def package_paths(config_hash); end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
ParsePackwerk::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array)
|
52
|
+
ParsePackwerk::DEFAULT_PACKAGE_PATHS = T.let(T.unsafe(nil), Array)
|
53
|
+
ParsePackwerk::DEPENDENCIES = T.let(T.unsafe(nil), String)
|
54
|
+
ParsePackwerk::DEPRECATED_REFERENCES_YML_NAME = T.let(T.unsafe(nil), String)
|
55
|
+
|
56
|
+
class ParsePackwerk::DeprecatedReferences < ::T::Struct
|
57
|
+
const :pathname, ::Pathname
|
58
|
+
const :violations, T::Array[::ParsePackwerk::Violation]
|
59
|
+
|
60
|
+
class << self
|
61
|
+
sig { params(package: ::ParsePackwerk::Package).returns(::ParsePackwerk::DeprecatedReferences) }
|
62
|
+
def for(package); end
|
63
|
+
|
64
|
+
sig { params(pathname: ::Pathname).returns(::ParsePackwerk::DeprecatedReferences) }
|
65
|
+
def from(pathname); end
|
66
|
+
|
67
|
+
def inherited(s); end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
ParsePackwerk::ENFORCE_DEPENDENCIES = T.let(T.unsafe(nil), String)
|
72
|
+
ParsePackwerk::ENFORCE_PRIVACY = T.let(T.unsafe(nil), String)
|
73
|
+
ParsePackwerk::METADATA = T.let(T.unsafe(nil), String)
|
74
|
+
|
75
|
+
# Since this metadata is unstructured YAML, it could be any type. We leave it to clients of `ParsePackwerk::Package`
|
76
|
+
# to add types based on their known usage of metadata.
|
77
|
+
ParsePackwerk::MetadataYmlType = T.type_alias { T::Hash[T.untyped, T.untyped] }
|
78
|
+
|
79
|
+
class ParsePackwerk::MissingConfiguration < ::StandardError
|
80
|
+
sig { params(packwerk_file_name: ::Pathname).void }
|
81
|
+
def initialize(packwerk_file_name); end
|
82
|
+
end
|
83
|
+
|
84
|
+
ParsePackwerk::PACKAGE_YML_NAME = T.let(T.unsafe(nil), String)
|
85
|
+
ParsePackwerk::PACKWERK_YML_NAME = T.let(T.unsafe(nil), String)
|
86
|
+
|
87
|
+
class ParsePackwerk::Package < ::T::Struct
|
88
|
+
const :dependencies, T::Array[::String]
|
89
|
+
const :enforce_dependencies, T::Boolean
|
90
|
+
const :enforce_privacy, T::Boolean
|
91
|
+
const :metadata, T::Hash[T.untyped, T.untyped]
|
92
|
+
const :name, ::String
|
93
|
+
|
94
|
+
sig { returns(::Pathname) }
|
95
|
+
def directory; end
|
96
|
+
|
97
|
+
sig { returns(T::Boolean) }
|
98
|
+
def enforces_dependencies?; end
|
99
|
+
|
100
|
+
sig { returns(T::Boolean) }
|
101
|
+
def enforces_privacy?; end
|
102
|
+
|
103
|
+
sig { returns(::Pathname) }
|
104
|
+
def yml; end
|
105
|
+
|
106
|
+
class << self
|
107
|
+
sig { params(pathname: ::Pathname).returns(::ParsePackwerk::Package) }
|
108
|
+
def from(pathname); end
|
109
|
+
|
110
|
+
def inherited(s); end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
class ParsePackwerk::PackageSet
|
115
|
+
class << self
|
116
|
+
sig do
|
117
|
+
params(
|
118
|
+
package_pathspec: T::Array[::String],
|
119
|
+
exclude_pathspec: T::Array[::String]
|
120
|
+
).returns(T::Array[::ParsePackwerk::Package])
|
121
|
+
end
|
122
|
+
def from(package_pathspec:, exclude_pathspec:); end
|
123
|
+
|
124
|
+
private
|
125
|
+
|
126
|
+
sig { params(globs: T::Array[::String], path: ::Pathname).returns(T::Boolean) }
|
127
|
+
def exclude_path?(globs, path); end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
ParsePackwerk::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
|
132
|
+
|
133
|
+
class ParsePackwerk::Violation < ::T::Struct
|
134
|
+
const :class_name, ::String
|
135
|
+
const :files, T::Array[::String]
|
136
|
+
const :to_package_name, ::String
|
137
|
+
const :type, ::String
|
138
|
+
|
139
|
+
sig { returns(T::Boolean) }
|
140
|
+
def dependency?; end
|
141
|
+
|
142
|
+
sig { returns(T::Boolean) }
|
143
|
+
def privacy?; end
|
144
|
+
|
145
|
+
class << self
|
146
|
+
def inherited(s); end
|
147
|
+
end
|
148
|
+
end
|