proscenium 0.19.0.beta6 → 0.19.0.beta7
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 +4 -4
- data/README.md +3 -26
- data/lib/proscenium/builder.rb +11 -35
- data/lib/proscenium/bundled_gems.rb +37 -0
- data/lib/proscenium/css_module/transformer.rb +1 -1
- data/lib/proscenium/ext/proscenium +0 -0
- data/lib/proscenium/ext/proscenium.h +1 -7
- data/lib/proscenium/helper.rb +3 -9
- data/lib/proscenium/importer.rb +13 -11
- data/lib/proscenium/log_subscriber.rb +0 -12
- data/lib/proscenium/middleware/base.rb +10 -8
- data/lib/proscenium/middleware/esbuild.rb +1 -6
- data/lib/proscenium/middleware/ruby_gems.rb +23 -0
- data/lib/proscenium/middleware.rb +26 -22
- data/lib/proscenium/monkey.rb +3 -5
- data/lib/proscenium/phlex/asset_inclusions.rb +0 -1
- data/lib/proscenium/railtie.rb +0 -27
- data/lib/proscenium/registry/bundled_package.rb +29 -0
- data/lib/proscenium/registry/package.rb +95 -0
- data/lib/proscenium/registry/ruby_gem_package.rb +28 -0
- data/lib/proscenium/registry.rb +29 -0
- data/lib/proscenium/resolver.rb +23 -18
- data/lib/proscenium/ruby_gems.rb +67 -0
- data/lib/proscenium/side_load.rb +20 -63
- data/lib/proscenium/ui/flash/bun.lock +19 -0
- data/lib/proscenium/ui/flash/index.js +6 -2
- data/lib/proscenium/ui/flash/node_modules/dom-mutations/index.d.ts +33 -0
- data/lib/proscenium/ui/flash/node_modules/dom-mutations/index.js +44 -0
- data/lib/proscenium/ui/flash/node_modules/dom-mutations/license +9 -0
- data/lib/proscenium/ui/flash/node_modules/dom-mutations/package.json +59 -0
- data/lib/proscenium/ui/flash/node_modules/dom-mutations/readme.md +125 -0
- data/lib/proscenium/ui/flash/node_modules/sourdough-toast/LICENSE +20 -0
- data/lib/proscenium/ui/flash/node_modules/sourdough-toast/README.md +11 -0
- data/lib/proscenium/ui/flash/node_modules/sourdough-toast/package.json +44 -0
- data/lib/proscenium/ui/flash/node_modules/sourdough-toast/src/sourdough-toast.css +697 -0
- data/lib/proscenium/ui/flash/node_modules/sourdough-toast/src/sourdough-toast.js +537 -0
- data/lib/proscenium/ui/flash/package.json +11 -0
- data/lib/proscenium/ui/react-manager/index.jsx +3 -22
- data/lib/proscenium/ui/ujs/index.js +1 -1
- data/lib/proscenium/version.rb +1 -1
- data/lib/proscenium.rb +3 -4
- metadata +21 -3
- data/lib/proscenium/middleware/engines.rb +0 -41
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Proscenium
|
4
|
-
class Middleware
|
5
|
-
# This middleware handles requests for assets in Rails engines. An engine that wants to expose
|
6
|
-
# its assets via Proscenium to the application must add itself to the list of engines in the
|
7
|
-
# Proscenium config options `Proscenium.config.engines`.
|
8
|
-
#
|
9
|
-
# For example, we have a gem that exposes a Rails engine.
|
10
|
-
#
|
11
|
-
# module Gem1
|
12
|
-
# class Engine < ::Rails::Engine
|
13
|
-
# config.proscenium.engines['gem1'] = root
|
14
|
-
# end
|
15
|
-
# end
|
16
|
-
#
|
17
|
-
# When this gem is installed in any Rails application, its assets will be available at the URL
|
18
|
-
# `/gem1/...`. For example, if the gem has a file `lib/styles.css`, it can be requested at
|
19
|
-
# `/gem1/lib/styles.css`.
|
20
|
-
#
|
21
|
-
class Engines < Esbuild
|
22
|
-
def real_path
|
23
|
-
@real_path ||= Pathname.new(@request.path.delete_prefix("/#{engine_name}")).to_s
|
24
|
-
end
|
25
|
-
|
26
|
-
def root_for_readable
|
27
|
-
engine.last
|
28
|
-
end
|
29
|
-
|
30
|
-
def engine
|
31
|
-
@engine ||= Proscenium.config.engines.find do |k, _|
|
32
|
-
@request.path.start_with?("/#{k}")
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def engine_name
|
37
|
-
engine.first
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|