homura-runtime 0.1.6 → 0.2.1

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: aae4102ce898507966e1a993b16033cf74ede5f2543d17e56d552c6b3ecfabaf
4
- data.tar.gz: 16b3be88c09f2189193da02cde5904a18749a74edf80e38927a2e47329ec06a8
3
+ metadata.gz: 89ab1ae8555f1631cf7e44af5aee8a1e760b21ae5538aa0b0616599669678eab
4
+ data.tar.gz: 13142b82927699812b64df3d0637bab9ef721c7f0fbfd56be2746c80ced628f4
5
5
  SHA512:
6
- metadata.gz: 57f457bf20205a3bd68d81d5ad616b971892c513023d61dd9b56f575bc0cf70063b9753810abb1163084ebd48d7ae8439bcfd5c72a53e3dd25bdc3f98148b796
7
- data.tar.gz: 6c69fb69b6c79a3309a9e5796534023ee47066027a97c809034615635b1df49e284ee0c010fce48059f062d43ec94e12f01ace5b39525b5f6e7d64940a4affa2
6
+ metadata.gz: 700b065254ca17e682499d532a66a54266d6ae8580051661f6ac2cca0afa35e62631457262c3d38541f71b10ce4d2d64b128969d2bb68f38c737f86993311d30
7
+ data.tar.gz: 3ca930aacfaff19ded023d6fd2e2b9ab71b6bc52344c6b34d4e11ccef435727b7ad3c6e99828a7406cc5bdbaec6e5e5f31c06835f294233999884fa73b3f8fae
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1 (2026-04-23)
4
+
5
+ - Correct the published author metadata to "Kazuhiro Homma".
6
+
7
+ ## 0.2.0 (2026-04-23)
8
+
9
+ - Remove the old `cloudflare-workers-build` public executable and expose the
10
+ build pipeline through `homura build`.
11
+ - Keep the internal build implementation in the runtime gem while letting the
12
+ single `homura` CLI dispatch to it.
13
+
3
14
  ## 0.1.6 (2026-04-23)
4
15
 
5
16
  - Teach `cloudflare-workers-build --standalone --with-db` to add the packaged
data/README.md CHANGED
@@ -9,13 +9,13 @@ Core Ruby + Module Worker glue for [Opal](https://opalrb.com/) on [Cloudflare Wo
9
9
  - `runtime/worker_module.mjs` — fetch / scheduled / queue / DO adapters (**no Opal bundle import**).
10
10
  - `runtime/worker.mjs` — thin bootstrap (crypto shim → bundle → `worker_module`) for legacy layouts.
11
11
  - `runtime/setup-node-crypto.mjs` — `node:crypto` on `globalThis` before the Opal bundle loads.
12
- - `bin/cloudflare-workers-build` — single build pipeline (ERB → assets → Opal → patch → `worker.entrypoint.mjs`). Use `--standalone` in generated apps; it now restores `cf-runtime/` automatically and derives standalone template/asset namespaces from the project name by default.
12
+ - `homura build` — single build pipeline (ERB → assets → Opal → patch → `worker.entrypoint.mjs`). Use `--standalone` in generated apps; it now restores `cf-runtime/` automatically and derives standalone template/asset namespaces from the project name by default.
13
13
  - `docs/ARCHITECTURE.md` — wrangler `main`, codegen entrypoint, and fixed-import policy.
14
14
 
15
15
  ## Quick start (homura monorepo)
16
16
 
17
17
  1. `Gemfile`: `gem 'homura-runtime', path: 'gems/homura-runtime'` and `gem 'opal-homura', '= 1.8.3.rc1', require: 'opal'` (path or exact pin).
18
- 2. `bundle exec cloudflare-workers-build` — writes `build/hello.no-exit.mjs` and `build/worker.entrypoint.mjs`.
18
+ 2. `bundle exec homura build` — writes `build/hello.no-exit.mjs` and `build/worker.entrypoint.mjs`.
19
19
  3. `wrangler.toml`: `main = "build/worker.entrypoint.mjs"`, `compatibility_flags = ["nodejs_compat"]`.
20
20
 
21
21
  ## Support matrix (indicative)
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- # Single happy path: ERB precompile → assets embed → Opal bundle → patch-opal-evals → worker.entrypoint.mjs
5
- # No subcommands. Use --standalone for generated consumer apps (no homura inline routes).
4
+ # homura build: ERB precompile → assets embed → Opal bundle → patch-opal-evals → worker.entrypoint.mjs
5
+ # Use --standalone for generated consumer apps (no homura inline routes).
6
6
 
7
7
  require 'fileutils'
8
8
  require 'open3'
@@ -50,7 +50,7 @@ options = {
50
50
  }
51
51
 
52
52
  OptionParser.new do |o|
53
- o.banner = 'usage: cloudflare-workers-build [options]'
53
+ o.banner = 'usage: homura build [options]'
54
54
  o.on('--root PATH', 'Project root (default: cwd)') { |p| options[:root] = p }
55
55
  o.on('--standalone', 'Consumer app (skip inline-routes; use Gemfile-resolved load paths)') do
56
56
  options[:standalone] = true
@@ -90,7 +90,7 @@ patch_target = options[:patch_input] || options[:opal_output]
90
90
 
91
91
  def run!(argv, chdir:)
92
92
  Dir.chdir(chdir) do
93
- system(*argv) || abort("cloudflare-workers-build: failed: #{argv.join(' ')}")
93
+ system(*argv) || abort("homura build: failed: #{argv.join(' ')}")
94
94
  end
95
95
  end
96
96
 
@@ -113,7 +113,7 @@ def run_opal_homura!(root, opal_input, opal_output)
113
113
  env = { 'OPAL_PREFORK_DISABLE' => '1' }
114
114
  out_err, status = Open3.capture2e(env, *argv, chdir: root.to_s)
115
115
  File.write(stderr_log, out_err)
116
- abort('cloudflare-workers-build: opal failed') unless status.success?
116
+ abort('homura build: opal failed') unless status.success?
117
117
  end
118
118
 
119
119
  def homura_vendor_from_gemfile(project_root)
@@ -132,12 +132,12 @@ def run_opal_standalone!(root, opal_input, opal_output, with_db:)
132
132
  env = { 'OPAL_PREFORK_DISABLE' => '1' }
133
133
  out_err, status = Open3.capture2e(env, *argv, chdir: root.to_s)
134
134
  File.write(stderr_log, out_err)
135
- abort('cloudflare-workers-build: opal failed') unless status.success?
135
+ abort('homura build: opal failed') unless status.success?
136
136
  end
137
137
 
138
138
  def write_entrypoint!(root, out_path, setup:, bundle:, worker_mod:)
139
139
  body = <<~JS
140
- // GENERATED by cloudflare-workers-build — do not edit by hand.
140
+ // GENERATED by homura build — do not edit by hand.
141
141
  import "#{setup}";
142
142
  import "#{bundle}";
143
143
  export { default, HomuraCounterDO } from "#{worker_mod}";
@@ -243,4 +243,4 @@ write_entrypoint!(
243
243
  worker_mod: options[:worker_module_import]
244
244
  )
245
245
 
246
- $stderr.puts 'cloudflare-workers-build: ok'
246
+ $stderr.puts 'homura build: ok'
data/docs/ARCHITECTURE.md CHANGED
@@ -30,13 +30,13 @@ flowchart LR
30
30
  ## homura 本体
31
31
 
32
32
  - `wrangler.toml` の `main` は `build/worker.entrypoint.mjs`。
33
- - `bundle exec cloudflare-workers-build` が ERB / assets / Opal / patch / entrypoint 生成まで一括実行。
33
+ - `bundle exec homura build` が ERB / assets / Opal / patch / entrypoint 生成まで一括実行。
34
34
 
35
35
  ## スキャフォールド済みアプリ
36
36
 
37
37
  - プロジェクト直下に `worker.entrypoint.mjs`(`main` と一致)。
38
38
  - `cf-runtime/` に `setup-node-crypto.mjs` と `worker_module.mjs` をコピー(gem から)。
39
- - `bundle exec cloudflare-workers-build --standalone` が consumer 向けパイプラインを実行し、`Gemfile` の `path:` から homura の `vendor/` を追加ロードパスへ取り込み(digest / zlib 等の Workers 向け補助ファイル)。
39
+ - `bundle exec homura build --standalone` が consumer 向けパイプラインを実行し、`Gemfile` の `path:` から homura の `vendor/` を追加ロードパスへ取り込み(digest / zlib 等の Workers 向け補助ファイル)。
40
40
 
41
41
  ## Phase 17 — Email Service(`SEND_EMAIL`)
42
42
 
@@ -18,7 +18,7 @@ module CloudflareWorkers
18
18
  spec = loaded_spec(name, loaded_specs: loaded_specs)
19
19
  return spec.full_gem_path if spec
20
20
 
21
- raise("cloudflare-workers-build: gem #{name} not loaded; use bundle exec from app root")
21
+ raise("homura build: gem #{name} not loaded; use bundle exec from app root")
22
22
  end
23
23
 
24
24
  def runtime_root(current_file:, loaded_specs: Gem.loaded_specs)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudflareWorkers
4
- VERSION = '0.1.6'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homura-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
- - Kazuhiro NISHIYAMA
7
+ - Kazuhiro Homma
8
8
  bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
@@ -42,8 +42,7 @@ description: |
42
42
  Rack handler, D1/KV/R2/AI/Queue/Durable Object adapters, multipart/streaming,
43
43
  and Opal corelib patches. Use with the `opal` gem and a Module Worker
44
44
  (`runtime/worker.mjs` in this gem).
45
- executables:
46
- - cloudflare-workers-build
45
+ executables: []
47
46
  extensions: []
48
47
  extra_rdoc_files: []
49
48
  files: