vite_ruby 2.0.0.beta.2 → 2.0.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vite_ruby.rb +1 -1
- data/lib/vite_ruby/config.rb +6 -1
- data/lib/vite_ruby/dev_server_proxy.rb +4 -5
- data/lib/vite_ruby/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db7a467c6b97a89c6704a7f94ff6c20b4b1bb39bd49fbb5d5f0fd67ea754fbdb
|
4
|
+
data.tar.gz: edffb992d9fda5dc7993d620037ba2866b3f1ec8bf1561b4ed4e0a420646c6fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2d8967f4ec47d49e4e829dfdf8aa8a087e576852fbdbe1343e1117f5397348ac40220bed5071715619a4395ea8bfc5521df58000d187e68eee69e021ddb23c5
|
7
|
+
data.tar.gz: f08b6882162c082006f4de9a3e105de5ffe9a2c55a53ffb9ec8c1659963c135c4657d7acf964df6a1e2bf521af6a2bfabbfbbde1e53d579f0620b418813eae9f
|
data/lib/vite_ruby.rb
CHANGED
@@ -19,7 +19,7 @@ class ViteRuby
|
|
19
19
|
|
20
20
|
# Internal: Versions used by default when running `vite install`.
|
21
21
|
DEFAULT_VITE_VERSION = '^2.5.0-beta.2'
|
22
|
-
DEFAULT_PLUGIN_VERSION = '^3.0.0-beta.
|
22
|
+
DEFAULT_PLUGIN_VERSION = '^3.0.0-beta.3'
|
23
23
|
|
24
24
|
# Internal: Companion libraries for Vite Ruby, and their target framework.
|
25
25
|
COMPANION_LIBRARIES = {
|
data/lib/vite_ruby/config.rb
CHANGED
@@ -30,7 +30,7 @@ class ViteRuby::Config
|
|
30
30
|
|
31
31
|
# Public: The directory where the entries are located.
|
32
32
|
def resolved_entrypoints_dir
|
33
|
-
|
33
|
+
vite_root_dir.join(entrypoints_dir)
|
34
34
|
end
|
35
35
|
|
36
36
|
# Internal: The directory where Vite stores its processing cache.
|
@@ -38,6 +38,11 @@ class ViteRuby::Config
|
|
38
38
|
root.join('node_modules/.vite')
|
39
39
|
end
|
40
40
|
|
41
|
+
# Public: The directory that Vite uses as root.
|
42
|
+
def vite_root_dir
|
43
|
+
root.join(source_code_dir)
|
44
|
+
end
|
45
|
+
|
41
46
|
# Public: Sets additional environment variables for vite-plugin-ruby.
|
42
47
|
def to_env
|
43
48
|
CONFIGURABLE_WITH_ENV.each_with_object({}) do |option, env|
|
@@ -52,13 +52,12 @@ private
|
|
52
52
|
path = env['PATH_INFO']
|
53
53
|
return true if path.start_with?(vite_asset_url_prefix) # Vite asset
|
54
54
|
return true if path.start_with?(VITE_DEPENDENCY_PREFIX) # Packages and imports
|
55
|
-
return true if
|
55
|
+
return true if file_in_vite_root?(path) # Fallback if Vite can serve the file
|
56
56
|
end
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
config.resolved_entrypoints_dir.join(path.start_with?('/') ? path[1..-1] : path).file?
|
58
|
+
def file_in_vite_root?(path)
|
59
|
+
path.include?('.') && # Check for extension, avoid filesystem if possible.
|
60
|
+
config.vite_root_dir.join(path.start_with?('/') ? path[1..-1] : path).file?
|
62
61
|
end
|
63
62
|
|
64
63
|
def vite_asset_url_prefix
|
data/lib/vite_ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vite_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.beta.
|
4
|
+
version: 2.0.0.beta.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Máximo Mussini
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|
@@ -198,8 +198,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
|
|
198
198
|
licenses:
|
199
199
|
- MIT
|
200
200
|
metadata:
|
201
|
-
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@2.0.0.beta.
|
202
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@2.0.0.beta.
|
201
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@2.0.0.beta.3/vite_ruby
|
202
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@2.0.0.beta.3/vite_ruby/CHANGELOG.md
|
203
203
|
post_install_message:
|
204
204
|
rdoc_options: []
|
205
205
|
require_paths:
|