trmnl_preview 0.31.1 → 0.31.3

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: b21d300476e67904c34d0187c12b11c59904e67429ead767147d24d50ca1db9d
4
- data.tar.gz: 5e77e6666b47b187f558d04c158907cc0441e90899f7e444cea1cc136a49a6cd
3
+ metadata.gz: c07e1813b7c71b84fc849092cdd5062c567999d0e0a86751e6307dd0e776eeb1
4
+ data.tar.gz: 575ed56ce3f0138f1018028be28dc0d415ea53c8cfc9fe858194d2f61e36ca1a
5
5
  SHA512:
6
- metadata.gz: eedd5d2c1275ac5f7a8dbc4767472e0dc5e1ff456ea352e3bbb6373190c0f98b04d8fe56f14cddcc8a2982ec57dd1ec21037d5a0c3d37b856c98830db5f81826
7
- data.tar.gz: 7e9e0209e2102edf63ccc05efe67ed69912b206cae2f4c8e33d8bc67b8f83349cc8b1f35e2694b3246e6179c487e15368746ebfa259495db9306361dca834559
6
+ metadata.gz: 88e02be63365d656f4bd9556df374874a510fcaeb90765738a209ca6dff2fc6194015d2a3c78a0796694c5daa8b63eefbbd2186f96d27029d6e16bf50986b7fc
7
+ data.tar.gz: 3af42a4e80fdae57cc2e68a9d426e21d5f765101a6cbf52ff416551faee09a3aa657b9e25848682ddd5bad1a0f8ccd17f581ef1b738ad852a523a634c068f958
data/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
 
2
2
  # Changelog
3
3
 
4
+ ## 0.31.3
5
+
6
+ - The Docker image draws TRMNLMaps maps. Firefox on Linux gets a WebGL context only from an X display, so maps drew blank under `trmnlp test` and `trmnlp serve` in the image; it now starts Xvfb and allows software WebGL, as TRMNL's render boxes do.
7
+
8
+ ## 0.31.2
9
+
10
+ - A transform whose `serverless_language` is not `node`, `python`, `ruby` or `php`, such as `javascript`, runs as node, as on TRMNL. Before, trmnlp looked for an interpreter by that name and failed with "No such file or directory @ rb_check_realpath_internal".
11
+
4
12
  ## 0.31.1
5
13
 
6
14
  - A view with no `.liquid` file draws the shared markup alone, as TRMNL does when a recipe keeps all of its markup in shared. Before, trmnlp drew "Missing template" there, so `trmnlp test` showed a blank screen for a recipe that draws on TRMNL. A view with no file and no shared markup still says "Missing template".
@@ -11,6 +11,8 @@ require_relative '../select_field_choices'
11
11
  module TRMNLP
12
12
  class Config
13
13
  class Plugin
14
+ TRANSFORM_LANGUAGES = %w[node python ruby php].freeze
15
+
14
16
  def initialize(paths, project_config)
15
17
  @paths = paths
16
18
  @project_config = project_config
@@ -83,9 +85,12 @@ module TRMNLP
83
85
  # stores it on the plugin_setting record. The scaffold emits
84
86
  # `serverless_language: ''`, so empty strings collapse to nil here
85
87
  # to let the `||` in the pipeline fall through to the inferred value.
88
+ # TRMNL runs any other value (like `javascript`) as node.
86
89
  def serverless_language
87
90
  value = @config['serverless_language']
88
- value unless value.to_s.empty?
91
+ return if value.to_s.empty?
92
+
93
+ TRANSFORM_LANGUAGES.include?(value) ? value : 'node'
89
94
  end
90
95
 
91
96
  # The TRMNL design-system version this plugin renders against.
@@ -29,6 +29,9 @@ module TRMNLP
29
29
  # A page trmnlp test serves from 127.0.0.1 gets no storage, cookies or Referer, as on TRMNL's about:blank.
30
30
  opts.add_preference('network.cookie.cookieBehavior', 2)
31
31
  opts.add_preference('network.http.sendRefererHeader', 0)
32
+ # Software WebGL for framework maps, as on TRMNL's render boxes. Linux also needs an X display (see Dockerfile).
33
+ opts.add_preference('webgl.force-enabled', true)
34
+ opts.add_preference('webgl.forbid-software', false)
32
35
  end
33
36
  end
34
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TRMNLP
4
- VERSION = '0.31.1'
4
+ VERSION = '0.31.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trmnl_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.1
4
+ version: 0.31.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rockwell Schrock