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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cff255ad823986df011ec56a290aafb83c08a148aee51a0e5f614f9ca80f2d41
4
- data.tar.gz: 9e3cb0a22c2a6c497fea120d38111d9cc299cd43213bfeb7d9f52ff2cd6cda3c
3
+ metadata.gz: b404ba5cef20ed67d0b7f882c21a4f22b49bb0594e3175cec2137498764bafe9
4
+ data.tar.gz: 99dd3e6a2849a57d146c8d8f46b7cd01f805dc1712b858445c06bf5761dcb18a
5
5
  SHA512:
6
- metadata.gz: 1ff4f7099815079d7e3c284b32935c99afb1cabc64a31e0115f69dcda7a72bdb56f9ffb11dee82a2ae37b809112319651fba79d03c7ec7dc7d00210634672641
7
- data.tar.gz: 5f2cc557b7c0484d35fbe4bb08dedcc26044b0c537f57b93f68ddd648b5e665ae32613704052f590bc73005d7730954062e091c429c6afb9ded204d6ae268fc8
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
- options[:setup_import] ||= 'cf-runtime/setup-node-crypto.mjs'
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
- target_dir = Pathname(project_root).join('cf-runtime')
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|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudflareWorkers
4
- VERSION = '0.2.22'
4
+ VERSION = '0.2.23'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homura-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.22
4
+ version: 0.2.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuhiro Homma