foobara-typescript-remote-command-generator 1.0.0 → 1.0.1

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: 2b714e6eec1090af9247514d151a2e72e4a9577d17c3adbde2e15964ae1bd18c
4
- data.tar.gz: a200de6d84262582fe8a2e79df98c04142e6a01fe1932e11341082d6d49d3c06
3
+ metadata.gz: c6fe3e20af66e25ae5806effd1509dda84e6c6e6d8093cf17bad62212651d3a4
4
+ data.tar.gz: 1f855a8bba2c303b3f25e7c4688ac4a927d3b903d3e48ec7aeccec4f2c94fe92
5
5
  SHA512:
6
- metadata.gz: 9c2eb881fe792592c5ed08cff88cf9b20d797fdb4ca08fbae5e416a9243a7d4d3d5505d1b744148d48d3fd64a629d3d7922c07262b393d14e2bfa8e6d74ac787
7
- data.tar.gz: edc6d812189f61711f968f8d317dd79ef44e1ad51db573e059f0cdc5777c1da35b2693fc19b586c2b8bfe5309ab3fb030847a3ad130d3abeff8f814c9cbbbf60
6
+ metadata.gz: d7180f1521f6eed07eab914b7aef68b8b449be028a28644ae73795fa74de12628c9cefcbccbc7382db61a165fb22f238417052d40fbd91283f3a827e4d30b785
7
+ data.tar.gz: a933345919931c462c0a7f3dd55b6a239f1829d81b41b2be8d4db4a665fd213d5c9d7505572a321d66b3602bc8e115e191422b29c67624f00cacff742b0bec22
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [1.0.1] - 2025-08-04
2
+
3
+ - Properly handle no result type with a Result type of null
4
+ - Add "date" to list of supported types and use Date for it
5
+
1
6
  ## [1.0.0] - 2025-07-31
2
7
 
3
8
  - Create never types for Error/PossibleErrors when command cannot error
@@ -19,6 +19,8 @@ module Foobara
19
19
  end
20
20
 
21
21
  def model_generators(type = result_type, initial = true)
22
+ return [] if type.nil?
23
+
22
24
  if type.detached_entity?
23
25
  generator_class = if atom?
24
26
  if initial
@@ -66,7 +68,7 @@ module Foobara
66
68
  type = result_type
67
69
  type = type.to_type if result_type.is_a?(Manifest::TypeDeclaration)
68
70
 
69
- if !type.builtin? && !type.model?
71
+ if type && !type.builtin? && !type.model?
70
72
  # TODO: Test this!!
71
73
  # :nocov:
72
74
  [TypeGenerator.new(type)]
@@ -257,7 +257,7 @@ module Foobara
257
257
  "string"
258
258
  when "duck"
259
259
  "any"
260
- when "datetime"
260
+ when "datetime", "date"
261
261
  "Date"
262
262
  else
263
263
  if type_declaration.model?
@@ -2,6 +2,8 @@
2
2
  import <%= dependency_root.import_destructure %> from "<%= path_to_root %><%= dependency_root.import_path %>"
3
3
  <% end %>
4
4
 
5
- type Result = <%= foobara_type_to_ts_type(result_type, dependency_group:, association_depth:) %>
5
+ type Result = <%=
6
+ result_type.nil? ? "null" : foobara_type_to_ts_type(result_type, dependency_group:, association_depth:)
7
+ %>
6
8
 
7
9
  export default Result
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-01 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: foobara-files-generator
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.6.2
141
+ rubygems_version: 3.6.9
142
142
  specification_version: 4
143
143
  summary: Generates remote commands for Typescript from a foobara manifest
144
144
  test_files: []