Skip to content

Commit fec6bc7

Browse files
committed
Handle recent changes in foobara-typescript-remote-command-generator
1 parent 831ba6d commit fec6bc7

8 files changed

+69
-55
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.5
1+
3.4.7

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [1.2.0] - 2026-02-26
2+
3+
- Handle recent changes in foobara-typescript-remote-command-generator
4+
15
## [1.1.1] - 2025-10-05
26

37
- Allow using non-absolute command names

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ gemspec
88
gem "rake"
99

1010
# gem "foobara", path: "../foobara"
11+
# gem "foobara-files-generator", path: "../files-generator"
1112
# gem "foobara-typescript-remote-command-generator", path: "../typescript-remote-command-generator"
1213

1314
group :development do

Gemfile.lock

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
11
PATH
22
remote: .
33
specs:
4-
foobara-typescript-react-command-form-generator (1.1.1)
4+
foobara-typescript-react-command-form-generator (1.2.0)
55
foobara (>= 0.1.1, < 2.0.0)
66
foobara-typescript-remote-command-generator (< 2.0.0)
77

88
GEM
99
remote: https://rubygems.org/
1010
specs:
11+
addressable (2.8.8)
12+
public_suffix (>= 2.0.2, < 8.0)
1113
ast (2.4.3)
12-
bigdecimal (3.2.3)
13-
byebug (12.0.0)
14+
bigdecimal (4.0.1)
15+
byebug (13.0.0)
16+
reline (>= 0.6.0)
1417
coderay (1.1.3)
1518
diff-lcs (1.6.2)
1619
docile (1.4.1)
17-
ffi (1.17.2-x86_64-linux-gnu)
18-
foobara (0.1.15)
20+
ffi (1.17.3-x86_64-linux-gnu)
21+
foobara (0.5.7)
1922
bigdecimal
2023
foobara-lru-cache (< 2.0.0)
2124
foobara-util (< 2.0.0)
2225
inheritable-thread-vars (< 2.0.0)
23-
foobara-files-generator (0.1.0)
26+
foobara-files-generator (0.1.2)
2427
foobara (>= 0.1.1, < 2.0.0)
2528
foobara-lru-cache (1.0.0)
26-
foobara-rubocop-rules (1.0.3)
29+
foobara-rubocop-rules (1.0.12)
2730
rubocop
2831
rubocop-rspec
29-
foobara-spec-helpers (0.0.4)
32+
foobara-spec-helpers (0.1.0)
3033
foobara-util
31-
foobara-typescript-remote-command-generator (1.1.4)
32-
foobara (>= 0.1.14, < 2.0.0)
34+
foobara-typescript-remote-command-generator (1.3.0)
35+
foobara (>= 0.1.16, < 2.0.0)
3336
foobara-files-generator (< 2.0.0)
34-
foobara-util (1.0.3)
35-
formatador (1.2.1)
37+
foobara-util (1.0.8)
38+
formatador (1.2.3)
3639
reline
37-
guard (2.19.1)
40+
guard (2.20.1)
3841
formatador (>= 0.2.4)
3942
listen (>= 2.7, < 4.0)
4043
logger (~> 1.6)
4144
lumberjack (>= 1.0.12, < 2.0)
4245
nenv (~> 0.1)
4346
notiffany (~> 0.0)
44-
ostruct (~> 0.6)
4547
pry (>= 0.13.0)
4648
shellany (~> 0.0)
4749
thor (>= 0.18.1)
@@ -51,77 +53,85 @@ GEM
5153
guard-compat (~> 1.1)
5254
rspec (>= 2.99.0, < 4.0)
5355
inheritable-thread-vars (0.0.3)
54-
io-console (0.8.1)
55-
json (2.15.0)
56+
io-console (0.8.2)
57+
json (2.18.1)
58+
json-schema (6.1.0)
59+
addressable (~> 2.8)
60+
bigdecimal (>= 3.1, < 5)
5661
language_server-protocol (3.17.0.5)
5762
lint_roller (1.1.0)
58-
listen (3.9.0)
63+
listen (3.10.0)
64+
logger
5965
rb-fsevent (~> 0.10, >= 0.10.3)
6066
rb-inotify (~> 0.9, >= 0.9.10)
6167
logger (1.7.0)
6268
lumberjack (1.4.2)
69+
mcp (0.7.1)
70+
json-schema (>= 4.1)
6371
method_source (1.1.0)
6472
nenv (0.3.0)
6573
notiffany (0.1.3)
6674
nenv (~> 0.1)
6775
shellany (~> 0.0)
68-
ostruct (0.6.3)
6976
parallel (1.27.0)
70-
parser (3.3.9.0)
77+
parser (3.3.10.2)
7178
ast (~> 2.4.1)
7279
racc
73-
prism (1.5.1)
74-
pry (0.15.2)
80+
prism (1.9.0)
81+
pry (0.16.0)
7582
coderay (~> 1.1)
7683
method_source (~> 1.0)
77-
pry-byebug (3.11.0)
78-
byebug (~> 12.0)
79-
pry (>= 0.13, < 0.16)
84+
reline (>= 0.6.0)
85+
pry-byebug (3.12.0)
86+
byebug (~> 13.0)
87+
pry (>= 0.13, < 0.17)
88+
public_suffix (7.0.2)
8089
racc (1.8.1)
8190
rainbow (3.1.1)
82-
rake (13.3.0)
91+
rake (13.3.1)
8392
rb-fsevent (0.11.2)
8493
rb-inotify (0.11.1)
8594
ffi (~> 1.0)
8695
regexp_parser (2.11.3)
87-
reline (0.6.2)
96+
reline (0.6.3)
8897
io-console (~> 0.5)
89-
rspec (3.13.1)
98+
rspec (3.13.2)
9099
rspec-core (~> 3.13.0)
91100
rspec-expectations (~> 3.13.0)
92101
rspec-mocks (~> 3.13.0)
93-
rspec-core (3.13.5)
102+
rspec-core (3.13.6)
94103
rspec-support (~> 3.13.0)
95104
rspec-expectations (3.13.5)
96105
diff-lcs (>= 1.2.0, < 2.0)
97106
rspec-support (~> 3.13.0)
98107
rspec-its (2.0.0)
99108
rspec-core (>= 3.13.0)
100109
rspec-expectations (>= 3.13.0)
101-
rspec-mocks (3.13.5)
110+
rspec-mocks (3.13.7)
102111
diff-lcs (>= 1.2.0, < 2.0)
103112
rspec-support (~> 3.13.0)
104-
rspec-support (3.13.6)
105-
rubocop (1.81.1)
113+
rspec-support (3.13.7)
114+
rubocop (1.85.0)
106115
json (~> 2.3)
107116
language_server-protocol (~> 3.17.0.2)
108117
lint_roller (~> 1.1.0)
118+
mcp (~> 0.6)
109119
parallel (~> 1.10)
110120
parser (>= 3.3.0.2)
111121
rainbow (>= 2.2.2, < 4.0)
112122
regexp_parser (>= 2.9.3, < 3.0)
113-
rubocop-ast (>= 1.47.1, < 2.0)
123+
rubocop-ast (>= 1.49.0, < 2.0)
114124
ruby-progressbar (~> 1.7)
115125
unicode-display_width (>= 2.4.0, < 4.0)
116-
rubocop-ast (1.47.1)
126+
rubocop-ast (1.49.0)
117127
parser (>= 3.3.7.2)
118-
prism (~> 1.4)
128+
prism (~> 1.7)
119129
rubocop-rake (0.7.1)
120130
lint_roller (~> 1.1)
121131
rubocop (>= 1.72.1)
122-
rubocop-rspec (3.7.0)
132+
rubocop-rspec (3.9.0)
123133
lint_roller (~> 1.1)
124-
rubocop (~> 1.72, >= 1.72.1)
134+
rubocop (~> 1.81)
125135
ruby-progressbar (1.13.0)
126136
shellany (0.0.1)
127137
simplecov (0.22.0)
@@ -130,10 +140,10 @@ GEM
130140
simplecov_json_formatter (~> 0.1)
131141
simplecov-html (0.13.2)
132142
simplecov_json_formatter (0.1.4)
133-
thor (1.4.0)
143+
thor (1.5.0)
134144
unicode-display_width (3.2.0)
135145
unicode-emoji (~> 4.1)
136-
unicode-emoji (4.1.0)
146+
unicode-emoji (4.2.0)
137147

138148
PLATFORMS
139149
x86_64-linux

src/generate_typescript_react_command_form.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def find_command_manifest
7474
def add_command_manifest_to_set_of_elements_to_generate
7575
elements_to_generate << command_manifest
7676
end
77+
78+
# We don't need this behavior from WriteTypescriptToDisk so we removed its input,
79+
# but it will explode if we don't provide it to inherited code
80+
def auto_dirty_queries = nil
7781
end
7882
end
7983
end

src/typescript_react_command_form_generator.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Foobara
22
module Generators
33
module TypescriptReactCommandFormGenerator
44
module Generators
5-
class TypescriptReactCommandFormGenerator < RemoteGenerator::Services::TypescriptFromManifestBaseGenerator
5+
class TypescriptReactCommandFormGenerator < RemoteGenerator::Generators::TypescriptFromManifestBaseGenerator
66
class << self
77
def manifest_to_generator_classes(manifest)
88
case manifest
@@ -29,7 +29,7 @@ def target_path
2929
end
3030

3131
def command_generator
32-
@command_generator ||= RemoteGenerator::Services::CommandGenerator.new(command_manifest)
32+
@command_generator ||= RemoteGenerator::Generators::CommandGenerator.new(command_manifest)
3333
end
3434

3535
def type_generators(type_declaration = inputs_type, initial = true)
@@ -43,11 +43,11 @@ def type_generators(type_declaration = inputs_type, initial = true)
4343
# :nocov:
4444
type_generators(type_declaration.to_type.primary_key_type, false)
4545
# :nocov:
46-
# generator_class = RemoteGenerator::Services::UnloadedEntityGenerator
46+
# generator_class = RemoteGenerator::Generators::UnloadedEntityGenerator
4747
# [generator_class.new(type_declaration.to_entity)]
4848
elsif type_declaration.model?
4949
type_generators(type_declaration.to_type.attributes_type, false)
50-
# generator_class = RemoteGenerator::Services::AtomModelGenerator
50+
# generator_class = RemoteGenerator::Generators::AtomModelGenerator
5151
# [generator_class.new(type_declaration.to_model)]
5252
elsif type_declaration.type.to_sym == :attributes
5353
type_declaration.attribute_declarations.values.map do |attribute_declaration|

src/write_typescript_react_command_form_to_disk.rb

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def generator_key
2222
raw_manifest :associative_array, :allow_nil
2323
manifest_url :string, :allow_nil
2424
command_name :string, :required
25-
output_directory :string
25+
output_directory :string, default: "src/domains"
26+
fail_if_does_not_pass_linter :boolean, default: false
2627
end
2728

2829
depends_on GenerateTypescriptReactCommandForm
@@ -59,16 +60,6 @@ def load_manifest_if_needed
5960
end
6061
end
6162

62-
def output_directory
63-
inputs[:output_directory] || default_output_directory
64-
end
65-
66-
def default_output_directory
67-
# :nocov:
68-
"src/domains"
69-
# :nocov:
70-
end
71-
7263
def generate_typescript
7364
# TODO: we need a way to allow values to be nil in type declarations
7465
inputs = raw_manifest ? { raw_manifest: } : { manifest_url: }
@@ -80,6 +71,10 @@ def generate_typescript
8071
def run_post_generation_tasks
8172
eslint_fix
8273
end
74+
75+
# We don't need this behavior from WriteTypescriptToDisk so we removed its input,
76+
# but it will explode if we don't provide it to inherited code
77+
def auto_dirty_queries = nil
8378
end
8479
end
8580
end

version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Foobara
22
module Generators
33
module TypescriptReactCommandFormGenerator
4-
VERSION = "1.1.1".freeze
4+
VERSION = "1.2.0".freeze
55
MINIMUM_RUBY_VERSION = ">= 3.4.0".freeze
66
end
77
end

0 commit comments

Comments
 (0)