foobara-typescript-remote-command-generator 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27cb6ef7f6663334fbcc7c69452e640433ac4ad1f3625936c5f3831bd3188df5
4
- data.tar.gz: 4d82620538e0785816f0162866245a733bc07d2408532b5924e7b5973375e947
3
+ metadata.gz: 7c5ff8b54e5b247ccdc88cbf0a743192b0e2ac1ff077856eb10744d88843881d
4
+ data.tar.gz: 581c8871b10007741cbf13064ff4c544542fefdf797844c159ebef1ae78eaa85
5
5
  SHA512:
6
- metadata.gz: b3beba79567383ff5e840473670a8f42e7844f44d6f5f8b83c6bebafac325fb3a12129f4c9e801fe33d6c41c49cf35bd12108be72b5200a9430e0468050fbeb8
7
- data.tar.gz: dec1d11f0255485c8670eaaa08181b1115b062c55e1e9f4d430c0294b255e4390d772af12a5771517308777463c038314179b687c7b4f5a8406baf10fcc7c330
6
+ metadata.gz: 9a367b46888d713b45e7538f8fcf3a562e5556124d6f31d5115ddf87f152ee1e4ac0621312a477acaad5375032418b6d7835007bd22d2c25c660143acdbc5d77
7
+ data.tar.gz: 7e8d6756ae1aeddd49a5daa61e2c4f20974e94fb2f31756b3b81495a40591b5e2d0bc11b94792ce1364beb5e9749110015449c0f80b236786a4ffa052f99ee0c
data/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
- ## [0.0.8] - 2025-02-02
1
+ ## [0.0.10] - 2025-02-21
2
+
3
+ - Include org/domain prefixes in command URLs
4
+
5
+ ## [0.0.9] - 2025-02-21
6
+
7
+ - Fix a bug where we don't use the name of a custom type when we could
8
+
9
+ ## [0.0.8] - 2025-02-21
2
10
 
3
11
  - Make sure entity/detached_entity/model are used properly in several places
4
12
 
@@ -17,6 +17,7 @@ module Foobara
17
17
  include_non_templated_files
18
18
 
19
19
  add_root_manifest_to_set_of_elements_to_generate
20
+ # TODO: allow specifying subset of commands
20
21
  add_all_commands_to_set_of_elements_to_generate
21
22
 
22
23
  each_element_to_generate do
@@ -62,7 +62,7 @@ module Foobara
62
62
  end
63
63
 
64
64
  def domain_name
65
- scoped_short_name || "GlobalDomain"
65
+ scoped_name || "GlobalDomain"
66
66
  end
67
67
 
68
68
  def organization_generator
@@ -33,7 +33,7 @@ module Foobara
33
33
  end
34
34
 
35
35
  def organization_name
36
- scoped_short_name || "GlobalOrganization"
36
+ scoped_name || "GlobalOrganization"
37
37
  end
38
38
  end
39
39
  end
@@ -222,10 +222,8 @@ module Foobara
222
222
  else
223
223
  if type_declaration.model?
224
224
  model_to_ts_model_name(type_declaration, association_depth:, initial:)
225
- elsif can_convert_type_declaration_to_ts_type?(type_declaration)
226
- type = type_declaration.to_type
227
-
228
- custom_type_to_ts_type_name(type)
225
+ elsif type_declaration.custom?
226
+ custom_type_to_ts_type_name(type_declaration)
229
227
  end
230
228
  end
231
229
  end
@@ -247,22 +245,6 @@ module Foobara
247
245
  end
248
246
  end
249
247
 
250
- def can_convert_type_declaration_to_ts_type?(type_declaration)
251
- type = type_declaration.to_type
252
-
253
- return false if BuiltinTypes.builtin_reference?(type.reference)
254
-
255
- allowed_keys = %w[type one_of allows_nil]
256
-
257
- declaration_data = type.declaration_data
258
-
259
- bad_keys = declaration_data.keys - allowed_keys
260
-
261
- return false unless bad_keys.empty?
262
-
263
- BuiltinTypes.builtin_reference?(declaration_data["type"])
264
- end
265
-
266
248
  def attributes_to_ts_type(attributes, dependency_group:, association_depth: AssociationDepth::AMBIGUOUS)
267
249
  guts = attributes.attribute_declarations.map do |attribute_name, attribute_declaration|
268
250
  " #{attribute_name}#{"?" unless attributes.required?(attribute_name)}: #{
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-typescript-remote-command-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-02 00:00:00.000000000 Z
10
+ date: 2025-02-22 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: foobara