@lutaml/lutaml-model 0.0.0-dev.219d3652b5feae933c6dcd290c9ea89bc1d5b21d

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/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @lutaml/lutaml-model
2
+
3
+ JavaScript release of [lutaml-model](https://github.com/lutaml/lutaml-model),
4
+ Opal-compiled and published as `@lutaml/lutaml-model` on npm.
5
+
6
+ ## Install
7
+
8
+ \`\`\`sh
9
+ npm install @lutaml/lutaml-model
10
+ \`\`\`
11
+
12
+ ## Flavors
13
+
14
+ | Entry | File | Use case |
15
+ |---|---|---|
16
+ | \`lutaml-model\` (default) | \`dist/lutaml-model.js\` | **Self-contained** — Opal runtime embedded. CDN-friendly. |
17
+ | \`lutaml-model-no-opal\` | \`dist/lutaml-model-no-opal.js\` | **External** — references \`@lutaml/opal-runtime\` global. For bundler users who share runtime. |
18
+
19
+ ## XML adapters
20
+
21
+ Both pure-Ruby XML adapters from the Ruby gem ship in the bundle:
22
+
23
+ - **Oga** — default. Compiled from the vendored \`opal-oga\` fork, which
24
+ provides a pure-Ruby lexer under \`ext/pureruby/\` selected via
25
+ \`RUBY_PLATFORM == 'opal'\` in \`lib/oga.rb\`.
26
+ - **REXML** — opt-in via \`Lutaml::Model::Config.xml_adapter_type = :rexml\`.
27
+ Compiled from the bundled stdlib gem, with moxml's
28
+ \`lib/compat/opal/rexml/*\` shadows patching the parts Opal can't
29
+ follow natively.
30
+
31
+ Nokogiri and Ox are stubbed (C extensions, no Opal equivalent).
32
+
33
+ ## Build note: OPAL_PREFORK_DISABLE=1
34
+
35
+ Opal 1.8.x defaults to its \`Prefork\` scheduler, which deadlocks on
36
+ this gem's 516 autoloads. The build sets \`OPAL_PREFORK_DISABLE=1\`
37
+ to select Opal's built-in \`Sequential\` scheduler (same one used
38
+ under Windows or when running inside Opal itself).
39
+
40
+ Opal 2 master adds a \`Threaded\` scheduler as well. Once Opal 2
41
+ ships, the env var becomes unnecessary.
42
+
43
+ ## Sync model
44
+
45
+ This package is rebuilt automatically whenever the Ruby source changes:
46
+
47
+ | Ruby event | Trigger | JS dist-tag |
48
+ |---|---|---|
49
+ | Tag push (stable release) | \`repository_dispatch(do-release)\` from lutaml-model's release chain | \`latest\` |
50
+ | Push to \`main\` | \`repository_dispatch(js-sync-main)\` from lutaml-model's \`.github/workflows/js-sync.yml\` | \`next\` |
51
+ | Pull request touching \`lib/\` | \`repository_dispatch(js-pr-check)\` from lutaml-model's \`.github/workflows/js-pr-check.yml\` | (no publish; smoke test only) |
52
+
53
+ Install the latest dev build with:
54
+
55
+ \`\`\`sh
56
+ npm install @lutaml/lutaml-model@next
57
+ \`\`\`
58
+
59
+ ## Source
60
+
61
+ Built from [lutaml-model](https://github.com/lutaml/lutaml-model) by its
62
+ release workflow. The Ruby gem remains the single source of truth.
@@ -0,0 +1,3 @@
1
+ declare const Lutaml: any;
2
+ export = Lutaml;
3
+ export default Lutaml;