@lutaml/lutaml-model 0.1.0
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 +42 -0
- package/package.json +58 -0
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
## Build note: OPAL_PREFORK_DISABLE=1
|
|
20
|
+
|
|
21
|
+
Opal 1.8.x defaults to its \`Prefork\` scheduler, which deadlocks on
|
|
22
|
+
this gem's 516 autoloads. The build sets \`OPAL_PREFORK_DISABLE=1\`
|
|
23
|
+
to select Opal's built-in \`Sequential\` scheduler (same one used
|
|
24
|
+
under Windows or when running inside Opal itself).
|
|
25
|
+
|
|
26
|
+
Opal 2 master adds a \`Threaded\` scheduler as well. Once Opal 2
|
|
27
|
+
ships, the env var becomes unnecessary.
|
|
28
|
+
|
|
29
|
+
## Runtime status
|
|
30
|
+
|
|
31
|
+
Compile succeeds (~1.5 MB bundle). Runtime has a known issue:
|
|
32
|
+
\`lib/lutaml/model.rb:275\` and \`lib/lutaml/xml.rb:205\` both call
|
|
33
|
+
\`Lutaml::Model::Serializable.prepend(...)\` for Opal's MRO workaround.
|
|
34
|
+
Ruby forbids double-prepend → \`RuntimeError\`.
|
|
35
|
+
|
|
36
|
+
Fix is documented in lutaml-model's \`TODO.opal/\` plan — needs
|
|
37
|
+
upstream PR to deduplicate the prepend calls.
|
|
38
|
+
|
|
39
|
+
## Source
|
|
40
|
+
|
|
41
|
+
Built from [lutaml-model](https://github.com/lutaml/lutaml-model) by its
|
|
42
|
+
release workflow. The Ruby gem remains the single source of truth.
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lutaml/lutaml-model",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "JavaScript release of lutaml-model, published as @lutaml/lutaml-model on npm. Opal-compiled with optional shared runtime from @lutaml/opal-runtime.",
|
|
6
|
+
"main": "./dist/lutaml-model-no-opal.js",
|
|
7
|
+
"module": "./dist/lutaml-model-no-opal.js",
|
|
8
|
+
"browser": "./dist/lutaml-model.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"browser": "./dist/lutaml-model.js",
|
|
13
|
+
"import": "./dist/lutaml-model-no-opal.js",
|
|
14
|
+
"require": "./dist/lutaml-model-no-opal.js",
|
|
15
|
+
"default": "./dist/lutaml-model-no-opal.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "node scripts/build.js",
|
|
25
|
+
"test": "node scripts/test.js"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"lutaml",
|
|
29
|
+
"model",
|
|
30
|
+
"opal",
|
|
31
|
+
"ruby",
|
|
32
|
+
"serialization"
|
|
33
|
+
],
|
|
34
|
+
"license": "BSD-2-Clause",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/lutaml/lutaml-model-js"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/lutaml/lutaml-model-js#readme",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/lutaml/lutaml-model-js/issues"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"esbuild": "^0.23.0",
|
|
45
|
+
"typescript": "^5.5.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@lutaml/opal-runtime": "^1.0.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"@lutaml/opal-runtime": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
}
|
|
58
|
+
}
|