proscenium 0.21.3-x86_64-linux → 0.21.4-x86_64-linux
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: 530c0105d45e4fa992abd13368a9961564fb373b617b22f106d980d17d1808f8
|
|
4
|
+
data.tar.gz: 9409e22f125de173851290a9e2e9492e95f268970d2c2a0f0579d26a495f8450
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8a45d05304dff72990b6432541436cd519bf68668067346b9cfc21825b4547195725f7685d52f1d25b305337fbe10547615a6c6399b06ba6c6042f9848e5b22
|
|
7
|
+
data.tar.gz: 981c0784cee6c9c981270145ef8a1da1b545ed61741dbf5a8fde222b58e8b5c3dfb288535c52f7d96923e33a2449de01dbc5f74add0e1fd1ba6c34111ea96bbd
|
data/lib/proscenium/builder.rb
CHANGED
|
@@ -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
|
|
@@ -90,7 +90,7 @@ extern void reset_config();
|
|
|
90
90
|
// - path - The path to build relative to `root`.
|
|
91
91
|
// - config
|
|
92
92
|
//
|
|
93
|
-
extern struct Result build_to_string(char* filePath, char* configJson);
|
|
93
|
+
extern struct Result build_to_string(char* filePath, char* cacheQueryString, char* configJson);
|
|
94
94
|
|
|
95
95
|
// Resolve the given `path` relative to the `root`.
|
|
96
96
|
//
|
|
@@ -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
|
|
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
|
data/lib/proscenium/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.21.4
|
|
5
5
|
platform: x86_64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Joel Moss
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-10-
|
|
11
|
+
date: 2025-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|