foobara-typescript-remote-command-generator 0.0.8 → 0.0.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc6158bda17aa24741a79802c5e0016120801eed6a7f73a4c26eb68040fbd0ed
|
4
|
+
data.tar.gz: 8803880e3bd4463b21be3a08b09d33387a43f5d6a497af42cc59b9aa5dd764bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c62a4e4597c9774b894747137a834d9a5aaff70269f322e20e93192ee6d34dff8bb88c0cd8a1fd488320eb373b9002d3523d6ee51b48f1887a5f4cedf4cb9ee
|
7
|
+
data.tar.gz: ec1a895e62d555c58b1ffe0a2161b4c422dc2222ae0d762da4adfb34631a7d8369a824021fd7fd36242101e281bbc5a7ac97d13fa5f48fdedf751836c905f4a6
|
data/CHANGELOG.md
CHANGED
@@ -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
|
226
|
-
|
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.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-02-
|
10
|
+
date: 2025-02-21 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: foobara
|