proscenium 0.21.3-arm64-darwin → 0.21.4-arm64-darwin

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: e019627eaff2795f6552dc3392ae13f288604a07bda837eaf12f7c0d261cd36f
4
- data.tar.gz: f678cb2fb8dc05f40a8692f39fe1ebe2f1c72d51fe84f1cc0d5c676661de2d8c
3
+ metadata.gz: fe1b3659f20b00ffb64e90816ae3a4418edd2ff5753b70e7ce2e857d33529a42
4
+ data.tar.gz: b67d1e14145690769059ac53e248938ee86c840af0e9c53076afad9fcb879bee
5
5
  SHA512:
6
- metadata.gz: 6104e84af25cb74c03dc5074a66acc1c25d1884b9e86c9f7954d55cb45f2ba1cf40fb689e959a29127b5f987d48f34bdb9170fd1cdf17e5aba75deeefb7b12af
7
- data.tar.gz: 2d80e82b06daaf7b8ff16232378438a2496fcb396f54d761c6231dd97f5be7eb33ce6194609dcc7f7d30e16e81dc04e3be622885c10193a17c7f60050e6e04c6
6
+ metadata.gz: ad74fa162d73ffc1632ce4683dce3dd4c535730af152e8fa8e9a0b56b11dc0fcece1ef7652501e46c49797a8def3b027750b3d9d80e401efbfd7eaa6211d2af4
7
+ data.tar.gz: f3839dfe9912474c6dd13ba861ff93391d94836356d788e5aeb8b662399eaa470356454b152d918be7aa4a95a279bfeedc3288bf8b00593d98463ce273839afc
@@ -23,6 +23,7 @@ module Proscenium
23
23
 
24
24
  attach_function :build_to_string, [
25
25
  :string, # Path or entry point.
26
+ :string, # cache_query_string.
26
27
  :pointer # Config as JSON.
27
28
  ], Result.by_value
28
29
 
@@ -58,8 +59,8 @@ module Proscenium
58
59
  end
59
60
  end
60
61
 
61
- def self.build_to_string(path, root: nil)
62
- new(root:).build_to_string(path)
62
+ def self.build_to_string(path, cache_query_string: '', root: nil)
63
+ new(root:).build_to_string(path, cache_query_string:)
63
64
  end
64
65
 
65
66
  def self.resolve(path, root: nil)
@@ -81,14 +82,14 @@ module Proscenium
81
82
  RubyGems: Proscenium::BundledGems.paths,
82
83
  Bundle: Proscenium.config.bundle,
83
84
  Aliases: Proscenium.config.aliases,
84
- QueryString: cache_query_string,
85
+ QueryString: Proscenium.config.cache_query_string.presence || '',
85
86
  Debug: Proscenium.config.debug
86
87
  }.to_json)
87
88
  end
88
89
 
89
- def build_to_string(path)
90
+ def build_to_string(path, cache_query_string: '')
90
91
  ActiveSupport::Notifications.instrument('build.proscenium', identifier: path) do
91
- result = Request.build_to_string(path, @request_config)
92
+ result = Request.build_to_string(path, cache_query_string, @request_config)
92
93
 
93
94
  raise BuildError, result[:response] unless result[:success]
94
95
 
@@ -115,10 +116,6 @@ module Proscenium
115
116
  ENV.slice(*Proscenium.config.env_vars + Proscenium::DEFAULT_ENV_VARS)
116
117
  end
117
118
 
118
- def cache_query_string
119
- Proscenium.config.cache_query_string.presence || ''
120
- end
121
-
122
119
  def gem_root
123
120
  Pathname.new(__dir__).join('..', '..').to_s
124
121
  end
Binary file
@@ -12,6 +12,8 @@
12
12
 
13
13
  #ifndef GO_CGO_GOSTRING_TYPEDEF
14
14
  typedef struct { const char *p; ptrdiff_t n; } _GoString_;
15
+ extern size_t _GoStringLen(_GoString_ s);
16
+ extern const char *_GoStringPtr(_GoString_ s);
15
17
  #endif
16
18
 
17
19
  #endif
@@ -53,10 +55,16 @@ typedef size_t GoUintptr;
53
55
  typedef float GoFloat32;
54
56
  typedef double GoFloat64;
55
57
  #ifdef _MSC_VER
58
+ #if !defined(__cplusplus) || _MSVC_LANG <= 201402L
56
59
  #include <complex.h>
57
60
  typedef _Fcomplex GoComplex64;
58
61
  typedef _Dcomplex GoComplex128;
59
62
  #else
63
+ #include <complex>
64
+ typedef std::complex<float> GoComplex64;
65
+ typedef std::complex<double> GoComplex128;
66
+ #endif
67
+ #else
60
68
  typedef float _Complex GoComplex64;
61
69
  typedef double _Complex GoComplex128;
62
70
  #endif
@@ -83,14 +91,14 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
83
91
  extern "C" {
84
92
  #endif
85
93
 
86
- extern void reset_config();
94
+ extern void reset_config(void);
87
95
 
88
96
  // Build the given `path` using the `config`.
89
97
  //
90
98
  // - path - The path to build relative to `root`.
91
99
  // - config
92
100
  //
93
- extern struct Result build_to_string(char* filePath, char* configJson);
101
+ extern struct Result build_to_string(char* filePath, char* cacheQueryString, char* configJson);
94
102
 
95
103
  // Resolve the given `path` relative to the `root`.
96
104
  //
@@ -40,6 +40,17 @@ module Proscenium
40
40
  @path_to_build ||= @request.path[1..]
41
41
  end
42
42
 
43
+ def cache_query_string
44
+ @cache_query_string ||= begin
45
+ params = @request.query_parameters
46
+ if params.one? && params.first[0] != '' && params.first[1].nil?
47
+ params.keys.first
48
+ else
49
+ Proscenium.config.cache_query_string
50
+ end
51
+ end.presence || ''
52
+ end
53
+
43
54
  def sourcemap?
44
55
  @request.path.ends_with?('.map')
45
56
  end
@@ -86,7 +97,7 @@ module Proscenium
86
97
  response.content_type = content_type
87
98
  response.etag = result[:content_hash]
88
99
 
89
- if Proscenium.config.cache_query_string && Proscenium.config.cache_max_age
100
+ if !cache_query_string.blank? && Proscenium.config.cache_max_age
90
101
  response.cache! Proscenium.config.cache_max_age
91
102
  end
92
103
 
@@ -20,7 +20,7 @@ module Proscenium
20
20
  end
21
21
 
22
22
  def attempt
23
- render_response Builder.build_to_string(path_to_build)
23
+ render_response Builder.build_to_string(path_to_build, cache_query_string:)
24
24
  rescue Builder::CompileError => e
25
25
  raise self.class::CompileError, { file: @request.fullpath, detail: e.message }, caller
26
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.21.3'
4
+ VERSION = '0.21.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proscenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.3
4
+ version: 0.21.4
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-17 00:00:00.000000000 Z
11
+ date: 2025-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi