foobara-typescript-react-command-form-generator 0.0.11 → 0.0.12
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/src/typescript_react_command_form_generator.rb +10 -5
- data/templates/CommandForm.tsx.erb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89eda43a93ac1f7704e90f6505078d6dca634f8e327836ad27559cfdfd3abc05
|
4
|
+
data.tar.gz: 04befdc1aabc41b17ede232116cb34382a187e414b1da4194a1a16f91eed1dd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3f84bb2d7d26485ab18b697f1bc90354632a7f94f89a4800252f50dc90601970e48753b4712be5af5727ee17fe921d57b9f79f42e6abf173acf1f3e3dd54b3d
|
7
|
+
data.tar.gz: 916539dcd2b832027969f7c191a67e9bc5878a32a60d7210b30d919ea569da2930cb9d556301c59fbd70a7a365f2b963a5aa1deb028ce83835cadc24d094a63b
|
data/CHANGELOG.md
CHANGED
@@ -36,11 +36,16 @@ module Foobara
|
|
36
36
|
return @type_generators if defined?(@type_generators)
|
37
37
|
|
38
38
|
generators = if type_declaration.entity?
|
39
|
-
|
40
|
-
|
39
|
+
# For now, we'll not bother with entity/model classes in the inputs.
|
40
|
+
# This simplifies things a bit re: form generation and setting UI
|
41
|
+
# inputs into the inputs value.
|
42
|
+
type_generators(type_declaration.to_type.primary_key_type, false)
|
43
|
+
# generator_class = RemoteGenerator::Services::UnloadedEntityGenerator
|
44
|
+
# [generator_class.new(type_declaration.to_entity)]
|
41
45
|
elsif type_declaration.model?
|
42
|
-
|
43
|
-
|
46
|
+
type_generators(type_declaration.to_type.attributes_type, false)
|
47
|
+
# generator_class = RemoteGenerator::Services::AtomModelGenerator
|
48
|
+
# [generator_class.new(type_declaration.to_model)]
|
44
49
|
elsif type_declaration.type.to_sym == :attributes
|
45
50
|
type_declaration.attribute_declarations.values.map do |attribute_declaration|
|
46
51
|
type_generators(attribute_declaration, false)
|
@@ -198,7 +203,7 @@ module Foobara
|
|
198
203
|
first, *rest = path
|
199
204
|
|
200
205
|
first = Util.camelize(first)
|
201
|
-
rest = rest.map { |part| Util.
|
206
|
+
rest = rest.map { |part| Util.classify(part) }
|
202
207
|
|
203
208
|
[first, *rest].join
|
204
209
|
end
|
@@ -6,6 +6,7 @@ import { <%= command_name %> } from "<%= path_to_root %><%= command_generator.im
|
|
6
6
|
<% unless empty_inputs? %>
|
7
7
|
import <%= inputs_class_name %> from "<%= path_to_root %><%= command_generator.import_path %>/Inputs"
|
8
8
|
<% end %>
|
9
|
+
<%# TODO: why isn't the result type handled via dependency_roots to avoid collisions with other types? %>
|
9
10
|
import <%= result_class_name %> from "<%= path_to_root %><%= command_generator.import_path %>/Result"
|
10
11
|
import { Error as <%= error_class_name %> } from "<%= path_to_root %><%= command_generator.import_path %>/Errors"
|
11
12
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-typescript-react-command-form-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: foobara-typescript-remote-command-generator
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
|
-
rubygems_version: 3.6.
|
63
|
+
rubygems_version: 3.6.7
|
64
64
|
specification_version: 4
|
65
65
|
summary: Generates Typescript React forms for Foobara remote commands
|
66
66
|
test_files: []
|