homura-runtime 0.2.22 → 0.2.23
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/exe/homura-build +6 -3
- data/lib/cloudflare_workers/build_support.rb +7 -1
- data/lib/cloudflare_workers/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b404ba5cef20ed67d0b7f882c21a4f22b49bb0594e3175cec2137498764bafe9
|
|
4
|
+
data.tar.gz: 99dd3e6a2849a57d146c8d8f46b7cd01f805dc1712b858445c06bf5761dcb18a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97e9d3a324ffe6545b080ce483c1b4446ed14937d3cc70dcf6852e793002d9a246fc9a9ef557b687a42f9cf5903bb85ee2faf6a80fef42f0ca22d7661d9a7074
|
|
7
|
+
data.tar.gz: 7b930885e9bad1526363d9b9f5c2940ba71a8f9f65f073352d17c4e679b8039a9f25e3d44653df723ef9204fd90ad17c9db7e15789ec0050d747f8892ca05b17
|
data/exe/homura-build
CHANGED
|
@@ -77,10 +77,13 @@ options[:assets_namespace] ||= CloudflareWorkers::BuildSupport.standalone_namesp
|
|
|
77
77
|
|
|
78
78
|
if options[:standalone]
|
|
79
79
|
Dir.chdir(root) { require 'bundler/setup' }
|
|
80
|
-
|
|
80
|
+
# Both .mjs glue files and the entrypoint live under `build/` from
|
|
81
|
+
# 0.2.23 on. write_entrypoint! resolves these as project-root
|
|
82
|
+
# relative paths and computes the entrypoint-relative import spec.
|
|
83
|
+
options[:setup_import] ||= 'build/cf-runtime/setup-node-crypto.mjs'
|
|
81
84
|
options[:bundle_import] ||= options[:opal_output]
|
|
82
|
-
options[:worker_module_import] ||= 'cf-runtime/worker_module.mjs'
|
|
83
|
-
options[:entrypoint_out] ||= 'worker.entrypoint.mjs'
|
|
85
|
+
options[:worker_module_import] ||= 'build/cf-runtime/worker_module.mjs'
|
|
86
|
+
options[:entrypoint_out] ||= 'build/worker.entrypoint.mjs'
|
|
84
87
|
else
|
|
85
88
|
options[:setup_import] ||= 'gems/homura-runtime/runtime/setup-node-crypto.mjs'
|
|
86
89
|
options[:bundle_import] ||= options[:opal_output]
|
|
@@ -44,7 +44,13 @@ module CloudflareWorkers
|
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
def ensure_standalone_runtime(project_root, current_file: __FILE__, loaded_specs: Gem.loaded_specs)
|
|
47
|
-
|
|
47
|
+
# The homura runtime needs two .mjs glue files alongside the
|
|
48
|
+
# generated `worker.entrypoint.mjs`. Until 0.2.22 we wrote them
|
|
49
|
+
# to `cf-runtime/` at the project root, which made every Ruby
|
|
50
|
+
# repo carry two opaque JS files in source control. Hide them
|
|
51
|
+
# under `build/cf-runtime/` so the build artifact tree owns
|
|
52
|
+
# them — `build/` is already in the example .gitignore template.
|
|
53
|
+
target_dir = Pathname(project_root).join('build', 'cf-runtime')
|
|
48
54
|
FileUtils.mkdir_p(target_dir)
|
|
49
55
|
|
|
50
56
|
%w[setup-node-crypto.mjs worker_module.mjs].each do |name|
|