@tutorialkit-rb/cli 0.2.0 → 1.0.0-rc.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.
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import "yargs-parser";
14
14
  // package.json
15
15
  var package_default = {
16
16
  name: "@tutorialkit-rb/cli",
17
- version: "0.2.0",
17
+ version: "1.0.0-rc.1",
18
18
  description: "Interactive tutorials powered by WebContainer API",
19
19
  author: "StackBlitz Inc.",
20
20
  type: "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tutorialkit-rb/cli",
3
- "version": "0.2.0",
3
+ "version": "1.0.0-rc.1",
4
4
  "description": "Interactive tutorials powered by WebContainer API",
5
5
  "author": "StackBlitz Inc.",
6
6
  "type": "module",
@@ -32,12 +32,14 @@ TEMPLATE_DIR="$(dirname "$SCRIPT_DIR")"
32
32
  RUBY_WASM_DIR="$TEMPLATE_DIR/ruby-wasm"
33
33
  OUTPUT="$RUBY_WASM_DIR/dist/ruby-base.wasm"
34
34
 
35
+ export BUNDLE_GEMFILE="$RUBY_WASM_DIR/Gemfile.base"
36
+
35
37
  echo "=== Building custom Ruby WASM base binary (with JS interop) ==="
36
38
  echo
37
39
 
38
40
  # --- Preflight checks --------------------------------------------------------
39
41
 
40
- if ! command -v rbwasm &> /dev/null; then
42
+ if ! bundle exec rbwasm --version &> /dev/null && ! command -v rbwasm &> /dev/null; then
41
43
  echo "Error: rbwasm CLI not found"
42
44
  echo "Install it with: gem install ruby_wasm"
43
45
  exit 1
@@ -46,7 +48,6 @@ fi
46
48
  # --- Prepare Gemfile.base lockfile -------------------------------------------
47
49
 
48
50
  echo "Resolving Gemfile.base dependencies..."
49
- export BUNDLE_GEMFILE="$RUBY_WASM_DIR/Gemfile.base"
50
51
  bundle lock --add-platform wasm32-wasi 2>/dev/null || bundle lock
51
52
  echo
52
53
 
@@ -124,6 +125,17 @@ echo "Saved usr/ path to dist/usr-dir.txt: $USR_DIR"
124
125
  cp "$RAW_BINARY" "$OUTPUT"
125
126
  echo "Replaced VFS-packed output with raw pre-VFS binary (single-pack strategy)"
126
127
 
128
+ # Copy rbconfig.rb for release (needed by dynamic gem packing)
129
+ RBCONFIG_SRC="$USR_DIR/local/lib/ruby/3.3.0/wasm32-wasi/rbconfig.rb"
130
+ RBCONFIG_DST="$RUBY_WASM_DIR/rbconfig/wasm32-wasi/rbconfig.rb"
131
+ if [ -f "$RBCONFIG_SRC" ]; then
132
+ mkdir -p "$(dirname "$RBCONFIG_DST")"
133
+ cp "$RBCONFIG_SRC" "$RBCONFIG_DST"
134
+ echo "Copied rbconfig.rb to $RBCONFIG_DST"
135
+ else
136
+ echo "WARNING: rbconfig.rb not found at $RBCONFIG_SRC"
137
+ fi
138
+
127
139
  SIZE=$(du -h "$OUTPUT" | cut -f1)
128
140
 
129
141
  # --- Post-build verification ------------------------------------------------
@@ -22,8 +22,8 @@
22
22
  "@codemirror/lang-yaml": "^6.1.2",
23
23
  "@codemirror/legacy-modes": "^6.5.1",
24
24
  "@nanostores/react": "0.7.2",
25
- "@tutorialkit-rb/react": "0.2.0",
26
- "@tutorialkit-rb/runtime": "0.2.0",
25
+ "@tutorialkit-rb/react": "1.0.0-rc.1",
26
+ "@tutorialkit-rb/runtime": "1.0.0-rc.1",
27
27
  "nanostores": "^0.10.3",
28
28
  "react": "^18.3.1",
29
29
  "react-dom": "^18.3.1"
@@ -31,9 +31,9 @@
31
31
  "devDependencies": {
32
32
  "@astrojs/check": "^0.7.0",
33
33
  "@astrojs/react": "^3.6.0",
34
- "@tutorialkit-rb/astro": "0.2.0",
35
- "@tutorialkit-rb/theme": "0.2.0",
36
- "@tutorialkit-rb/types": "0.2.0",
34
+ "@tutorialkit-rb/astro": "1.0.0-rc.1",
35
+ "@tutorialkit-rb/theme": "1.0.0-rc.1",
36
+ "@tutorialkit-rb/types": "1.0.0-rc.1",
37
37
  "@types/mdast": "^4.0.4",
38
38
  "@types/node": "^20.14.6",
39
39
  "@types/react": "^18.3.3",
@@ -24,5 +24,3 @@ gem "tzinfo-data"
24
24
  # Pin json < 2.8 — newer versions redefine rb_hash_bulk_insert as static,
25
25
  # which conflicts with Ruby 3.3's headers during WASM cross-compilation.
26
26
  gem "json", "< 2.8"
27
-
28
- # gem "ruby_llm" — removed; outbound HTTP demo uses Net::HTTP only