lutaml-asyncapi 0.1.2 → 0.1.4
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 +4 -4
- data/CLAUDE.md +39 -0
- data/README.md +5 -7
- data/frontend/package-lock.json +1 -162
- data/frontend/package.json +1 -2
- data/lib/lutaml/asyncapi/version.rb +1 -1
- data/script/axe_audit +14 -7
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c140cd421326c22436b4be3d3ed6d63f81f998ea5ba49421ecfc0e5d21aa3459
|
|
4
|
+
data.tar.gz: 5c6dde81fa299cc2a5ae75aaaeb91f2828cb2a37fe9329585fe67779cbd002b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9fa684f2f4db055b9f23c2fc062bc32d3f4085233cab44b64e56a70f2f8abbd3451628741f019634a4e0d735d9a4c5644c2f509438774e4f4d1546b2f307c525
|
|
7
|
+
data.tar.gz: 789754368ec29156bd722d1ef2e77ce0dd3ea288241d48e55fb42966401786e25a9abebb0dcf35bde73347d2ecfa4e4779c6e054641516b25d17d08a39ac5473
|
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## What this is
|
|
6
|
+
|
|
7
|
+
`lutaml-asyncapi` parses AsyncAPI 2.6/3.0/3.1 documents into lutaml-model objects and generates a single-file SPA documentation site from them — the event-driven counterpart of `lutaml-openapi`, and the model layer for model-based AsyncAPI standards (metanorma-ogc#153); `metanorma-plugin-asyncapi` renders these models into Metanorma documents.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
bundle exec rspec # full suite (17-doc corpus golden included)
|
|
13
|
+
bundle exec rspec spec/asyncapi_spec.rb # one file
|
|
14
|
+
bundle exec rubocop # lint (-a to autofix; .rubocop_todo.yml holds baselined offenses)
|
|
15
|
+
bundle exec rake # spec + rubocop + frontend:audit (axe; needs Chrome, skips cleanly without)
|
|
16
|
+
|
|
17
|
+
cd frontend && npm test # vitest (frontend i18n suite)
|
|
18
|
+
cd frontend && npm run build # vite build → frontend/dist
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`frontend/dist/` and `Gemfile.lock` are gitignored. `frontend/dist/` must exist for the SPA generator. The rake CI does NOT build the frontend — run `npm ci && npm run build` locally to verify frontend changes.
|
|
22
|
+
|
|
23
|
+
## Architecture
|
|
24
|
+
|
|
25
|
+
- **`Lutaml::Asyncapi.parse`** — the document is stored verbatim; wire round trips (`to_json`) are asserted losslessly for the whole corpus (spec/asyncapi_spec.rb iterates every fixture). Round-trip checks go through `to_json` — `Serializable#to_hash` emits Ruby attribute names, not wire names.
|
|
26
|
+
- **2.x vs 3.x dialects** — 3.x carries top-level `operations`; 2.x embeds publish/subscribe in channels. `Typed` (lib/lutaml/asyncapi/typed.rb) normalizes both into the same operation shape for the typed view; the document hash itself stays in dialect shape.
|
|
27
|
+
- `lutaml-model` is floored at `~> 0.8.132` (the nested-hash text-key corruption fix, model#1013) — the gitter + slack corpus goldens require it.
|
|
28
|
+
- **`Spa`** inlines `frontend/dist` with `window.ASYNCAPI_DATA` into a standalone `index.html`; dist enters the gem only at release time.
|
|
29
|
+
- Corpus fixtures live in `spec/fixtures/` (17 documents, official 3.1 examples + connected-systems 2.6 + EDR pubsub 3.0); new fixtures are picked up automatically.
|
|
30
|
+
|
|
31
|
+
## CI/release
|
|
32
|
+
|
|
33
|
+
- `.github/workflows/rake.yml` builds the frontend (`after-setup-ruby`) so green lanes validate the SPA.
|
|
34
|
+
- `release.yml` is self-contained (RubyGems Trusted Publishing is registered against THIS repo's workflow): dispatch with `next_version=patch|minor|major|x.y.z`. It bumps the version, builds the dist, publishes, and tags.
|
|
35
|
+
|
|
36
|
+
## Frontend
|
|
37
|
+
|
|
38
|
+
- All UI strings flow through the typed catalog `frontend/src/i18n/messages.ts` (`en` + `ar`); a missing key in a locale is a type error. The header locale switch mirrors `lang`/`dir` onto `<html>` (RTL without a second stylesheet); `?locale=ar` boots into a locale.
|
|
39
|
+
- Layout uses CSS logical properties; the axe audit gates both the LTR and Arabic RTL renders.
|
data/README.md
CHANGED
|
@@ -16,12 +16,10 @@ doc.to_json # lossless re-serialization
|
|
|
16
16
|
## Losslessness
|
|
17
17
|
|
|
18
18
|
The raw mapping is preserved verbatim: every section is kept as parsed,
|
|
19
|
-
unmodeled keywords re-emit on serialization (`map_unmapped`), and
|
|
20
|
-
round
|
|
21
|
-
`spec/fixtures
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
fixed on lutaml-model main; they rejoin the goldens at the next
|
|
25
|
-
lutaml-model release.
|
|
19
|
+
unmodeled keywords re-emit on serialization (`map_unmapped`), and the wire
|
|
20
|
+
round trip (`parse → to_json`) is asserted losslessly for the **entire
|
|
21
|
+
17-document corpus** vendored in `spec/fixtures` — the official 3.1 examples,
|
|
22
|
+
connected-systems 2.6, and the EDR pubsub 3.0 document. Wire round trips go
|
|
23
|
+
through `to_json`; `to_hash` emits Ruby attribute names, not wire names.
|
|
26
24
|
|
|
27
25
|
See [PLAN.md](PLAN.md) for the program plan.
|
data/frontend/package-lock.json
CHANGED
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
"terser": "^5.46.2",
|
|
19
19
|
"typescript": "^5.3.0",
|
|
20
20
|
"vite": "^8.3.5",
|
|
21
|
-
"vitest": "^5.0.5"
|
|
22
|
-
"vue-tsc": "^2.0.0"
|
|
21
|
+
"vitest": "^5.0.5"
|
|
23
22
|
}
|
|
24
23
|
},
|
|
25
24
|
"node_modules/@asamuzakjp/css-color": {
|
|
@@ -711,35 +710,6 @@
|
|
|
711
710
|
"url": "https://opencollective.com/vitest"
|
|
712
711
|
}
|
|
713
712
|
},
|
|
714
|
-
"node_modules/@volar/language-core": {
|
|
715
|
-
"version": "2.4.15",
|
|
716
|
-
"resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.15.tgz",
|
|
717
|
-
"integrity": "sha512-3VHw+QZU0ZG9IuQmzT68IyN4hZNd9GchGPhbD9+pa8CVv7rnoOZwo7T8weIbrRmihqy3ATpdfXFnqRrfPVK6CA==",
|
|
718
|
-
"dev": true,
|
|
719
|
-
"license": "MIT",
|
|
720
|
-
"dependencies": {
|
|
721
|
-
"@volar/source-map": "2.4.15"
|
|
722
|
-
}
|
|
723
|
-
},
|
|
724
|
-
"node_modules/@volar/source-map": {
|
|
725
|
-
"version": "2.4.15",
|
|
726
|
-
"resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.15.tgz",
|
|
727
|
-
"integrity": "sha512-CPbMWlUN6hVZJYGcU/GSoHu4EnCHiLaXI9n8c9la6RaI9W5JHX+NqG+GSQcB0JdC2FIBLdZJwGsfKyBB71VlTg==",
|
|
728
|
-
"dev": true,
|
|
729
|
-
"license": "MIT"
|
|
730
|
-
},
|
|
731
|
-
"node_modules/@volar/typescript": {
|
|
732
|
-
"version": "2.4.15",
|
|
733
|
-
"resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.15.tgz",
|
|
734
|
-
"integrity": "sha512-2aZ8i0cqPGjXb4BhkMsPYDkkuc2ZQ6yOpqwAuNwUoncELqoy5fRgOQtLR9gB0g902iS0NAkvpIzs27geVyVdPg==",
|
|
735
|
-
"dev": true,
|
|
736
|
-
"license": "MIT",
|
|
737
|
-
"dependencies": {
|
|
738
|
-
"@volar/language-core": "2.4.15",
|
|
739
|
-
"path-browserify": "^1.0.1",
|
|
740
|
-
"vscode-uri": "^3.0.8"
|
|
741
|
-
}
|
|
742
|
-
},
|
|
743
713
|
"node_modules/@vue/compiler-core": {
|
|
744
714
|
"version": "3.5.44",
|
|
745
715
|
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.44.tgz",
|
|
@@ -802,48 +772,12 @@
|
|
|
802
772
|
"@vue/shared": "3.5.44"
|
|
803
773
|
}
|
|
804
774
|
},
|
|
805
|
-
"node_modules/@vue/compiler-vue2": {
|
|
806
|
-
"version": "2.7.16",
|
|
807
|
-
"resolved": "https://registry.npmjs.org/@vue/compiler-vue2/-/compiler-vue2-2.7.16.tgz",
|
|
808
|
-
"integrity": "sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==",
|
|
809
|
-
"dev": true,
|
|
810
|
-
"license": "MIT",
|
|
811
|
-
"dependencies": {
|
|
812
|
-
"de-indent": "^1.0.2",
|
|
813
|
-
"he": "^1.2.0"
|
|
814
|
-
}
|
|
815
|
-
},
|
|
816
775
|
"node_modules/@vue/devtools-api": {
|
|
817
776
|
"version": "6.6.4",
|
|
818
777
|
"resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz",
|
|
819
778
|
"integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==",
|
|
820
779
|
"license": "MIT"
|
|
821
780
|
},
|
|
822
|
-
"node_modules/@vue/language-core": {
|
|
823
|
-
"version": "2.2.12",
|
|
824
|
-
"resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.2.12.tgz",
|
|
825
|
-
"integrity": "sha512-IsGljWbKGU1MZpBPN+BvPAdr55YPkj2nB/TBNGNC32Vy2qLG25DYu/NBN2vNtZqdRbTRjaoYrahLrToim2NanA==",
|
|
826
|
-
"dev": true,
|
|
827
|
-
"license": "MIT",
|
|
828
|
-
"dependencies": {
|
|
829
|
-
"@volar/language-core": "2.4.15",
|
|
830
|
-
"@vue/compiler-dom": "^3.5.0",
|
|
831
|
-
"@vue/compiler-vue2": "^2.7.16",
|
|
832
|
-
"@vue/shared": "^3.5.0",
|
|
833
|
-
"alien-signals": "^1.0.3",
|
|
834
|
-
"minimatch": "^9.0.3",
|
|
835
|
-
"muggle-string": "^0.4.1",
|
|
836
|
-
"path-browserify": "^1.0.1"
|
|
837
|
-
},
|
|
838
|
-
"peerDependencies": {
|
|
839
|
-
"typescript": "*"
|
|
840
|
-
},
|
|
841
|
-
"peerDependenciesMeta": {
|
|
842
|
-
"typescript": {
|
|
843
|
-
"optional": true
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
},
|
|
847
781
|
"node_modules/@vue/reactivity": {
|
|
848
782
|
"version": "3.5.44",
|
|
849
783
|
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.44.tgz",
|
|
@@ -905,13 +839,6 @@
|
|
|
905
839
|
"node": ">=0.4.0"
|
|
906
840
|
}
|
|
907
841
|
},
|
|
908
|
-
"node_modules/alien-signals": {
|
|
909
|
-
"version": "1.0.13",
|
|
910
|
-
"resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-1.0.13.tgz",
|
|
911
|
-
"integrity": "sha512-OGj9yyTnJEttvzhTUWuscOvtqxq5vrhF7vL9oS0xJ2mK0ItPYP1/y+vCFebfxoEyAz0++1AIwJ5CMr+Fk3nDmg==",
|
|
912
|
-
"dev": true,
|
|
913
|
-
"license": "MIT"
|
|
914
|
-
},
|
|
915
842
|
"node_modules/assertion-error": {
|
|
916
843
|
"version": "2.0.1",
|
|
917
844
|
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz",
|
|
@@ -932,13 +859,6 @@
|
|
|
932
859
|
"node": ">=4"
|
|
933
860
|
}
|
|
934
861
|
},
|
|
935
|
-
"node_modules/balanced-match": {
|
|
936
|
-
"version": "1.0.2",
|
|
937
|
-
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
|
938
|
-
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
|
939
|
-
"dev": true,
|
|
940
|
-
"license": "MIT"
|
|
941
|
-
},
|
|
942
862
|
"node_modules/bidi-js": {
|
|
943
863
|
"version": "1.1.0",
|
|
944
864
|
"resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.1.0.tgz",
|
|
@@ -949,16 +869,6 @@
|
|
|
949
869
|
"require-from-string": "^2.0.2"
|
|
950
870
|
}
|
|
951
871
|
},
|
|
952
|
-
"node_modules/brace-expansion": {
|
|
953
|
-
"version": "2.1.7",
|
|
954
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz",
|
|
955
|
-
"integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==",
|
|
956
|
-
"dev": true,
|
|
957
|
-
"license": "MIT",
|
|
958
|
-
"dependencies": {
|
|
959
|
-
"balanced-match": "^1.0.0"
|
|
960
|
-
}
|
|
961
|
-
},
|
|
962
872
|
"node_modules/buffer-from": {
|
|
963
873
|
"version": "1.1.2",
|
|
964
874
|
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
|
@@ -1017,13 +927,6 @@
|
|
|
1017
927
|
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
|
1018
928
|
}
|
|
1019
929
|
},
|
|
1020
|
-
"node_modules/de-indent": {
|
|
1021
|
-
"version": "1.0.2",
|
|
1022
|
-
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
|
|
1023
|
-
"integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==",
|
|
1024
|
-
"dev": true,
|
|
1025
|
-
"license": "MIT"
|
|
1026
|
-
},
|
|
1027
930
|
"node_modules/decimal.js": {
|
|
1028
931
|
"version": "10.6.0",
|
|
1029
932
|
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz",
|
|
@@ -1110,16 +1013,6 @@
|
|
|
1110
1013
|
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
|
1111
1014
|
}
|
|
1112
1015
|
},
|
|
1113
|
-
"node_modules/he": {
|
|
1114
|
-
"version": "1.2.0",
|
|
1115
|
-
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
|
1116
|
-
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
|
1117
|
-
"dev": true,
|
|
1118
|
-
"license": "MIT",
|
|
1119
|
-
"bin": {
|
|
1120
|
-
"he": "bin/he"
|
|
1121
|
-
}
|
|
1122
|
-
},
|
|
1123
1016
|
"node_modules/html-encoding-sniffer": {
|
|
1124
1017
|
"version": "6.0.0",
|
|
1125
1018
|
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-6.0.0.tgz",
|
|
@@ -1468,29 +1361,6 @@
|
|
|
1468
1361
|
"dev": true,
|
|
1469
1362
|
"license": "CC0-1.0"
|
|
1470
1363
|
},
|
|
1471
|
-
"node_modules/minimatch": {
|
|
1472
|
-
"version": "9.0.9",
|
|
1473
|
-
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",
|
|
1474
|
-
"integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",
|
|
1475
|
-
"dev": true,
|
|
1476
|
-
"license": "ISC",
|
|
1477
|
-
"dependencies": {
|
|
1478
|
-
"brace-expansion": "^2.0.2"
|
|
1479
|
-
},
|
|
1480
|
-
"engines": {
|
|
1481
|
-
"node": ">=16 || 14 >=14.17"
|
|
1482
|
-
},
|
|
1483
|
-
"funding": {
|
|
1484
|
-
"url": "https://github.com/sponsors/isaacs"
|
|
1485
|
-
}
|
|
1486
|
-
},
|
|
1487
|
-
"node_modules/muggle-string": {
|
|
1488
|
-
"version": "0.4.1",
|
|
1489
|
-
"resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz",
|
|
1490
|
-
"integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==",
|
|
1491
|
-
"dev": true,
|
|
1492
|
-
"license": "MIT"
|
|
1493
|
-
},
|
|
1494
1364
|
"node_modules/nanoid": {
|
|
1495
1365
|
"version": "3.3.20",
|
|
1496
1366
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
|
|
@@ -1536,13 +1406,6 @@
|
|
|
1536
1406
|
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
|
1537
1407
|
}
|
|
1538
1408
|
},
|
|
1539
|
-
"node_modules/path-browserify": {
|
|
1540
|
-
"version": "1.0.1",
|
|
1541
|
-
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
|
|
1542
|
-
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
|
|
1543
|
-
"dev": true,
|
|
1544
|
-
"license": "MIT"
|
|
1545
|
-
},
|
|
1546
1409
|
"node_modules/picocolors": {
|
|
1547
1410
|
"version": "1.1.1",
|
|
1548
1411
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
|
@@ -2020,13 +1883,6 @@
|
|
|
2020
1883
|
"@jridgewell/sourcemap-codec": "^1.6.0"
|
|
2021
1884
|
}
|
|
2022
1885
|
},
|
|
2023
|
-
"node_modules/vscode-uri": {
|
|
2024
|
-
"version": "3.2.0",
|
|
2025
|
-
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.2.0.tgz",
|
|
2026
|
-
"integrity": "sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==",
|
|
2027
|
-
"dev": true,
|
|
2028
|
-
"license": "MIT"
|
|
2029
|
-
},
|
|
2030
1886
|
"node_modules/vue": {
|
|
2031
1887
|
"version": "3.5.44",
|
|
2032
1888
|
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.44.tgz",
|
|
@@ -2074,23 +1930,6 @@
|
|
|
2074
1930
|
}
|
|
2075
1931
|
}
|
|
2076
1932
|
},
|
|
2077
|
-
"node_modules/vue-tsc": {
|
|
2078
|
-
"version": "2.2.12",
|
|
2079
|
-
"resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.2.12.tgz",
|
|
2080
|
-
"integrity": "sha512-P7OP77b2h/Pmk+lZdJ0YWs+5tJ6J2+uOQPo7tlBnY44QqQSPYvS0qVT4wqDJgwrZaLe47etJLLQRFia71GYITw==",
|
|
2081
|
-
"dev": true,
|
|
2082
|
-
"license": "MIT",
|
|
2083
|
-
"dependencies": {
|
|
2084
|
-
"@volar/typescript": "2.4.15",
|
|
2085
|
-
"@vue/language-core": "2.2.12"
|
|
2086
|
-
},
|
|
2087
|
-
"bin": {
|
|
2088
|
-
"vue-tsc": "bin/vue-tsc.js"
|
|
2089
|
-
},
|
|
2090
|
-
"peerDependencies": {
|
|
2091
|
-
"typescript": ">=5.0.0"
|
|
2092
|
-
}
|
|
2093
|
-
},
|
|
2094
1933
|
"node_modules/w3c-xmlserializer": {
|
|
2095
1934
|
"version": "5.0.0",
|
|
2096
1935
|
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz",
|
data/frontend/package.json
CHANGED
data/script/axe_audit
CHANGED
|
@@ -67,15 +67,22 @@ dir = Dir.mktmpdir("axe-audit")
|
|
|
67
67
|
document = Lutaml::Asyncapi.parse(File.read(DOCUMENT))
|
|
68
68
|
File.write(File.join(dir, "index.html"), Lutaml::Asyncapi::Spa.generate(document))
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
# an empty document must boot and stay accessible too: a JS crash on
|
|
71
|
+
# missing sections would otherwise ship and only surface in production
|
|
72
|
+
empty = Lutaml::Asyncapi.parse("{}")
|
|
73
|
+
File.write(File.join(dir, "empty.html"), Lutaml::Asyncapi::Spa.generate(empty))
|
|
74
|
+
|
|
71
75
|
File.write(File.join(dir, "audit.html"),
|
|
72
|
-
File.read(
|
|
76
|
+
File.read(File.join(dir, "index.html")).sub("</body>", "#{INJECT}\n</body>"))
|
|
77
|
+
File.write(File.join(dir, "audit-empty.html"),
|
|
78
|
+
File.read(File.join(dir, "empty.html")).sub("</body>", "#{INJECT}\n</body>"))
|
|
73
79
|
|
|
74
|
-
# both locales
|
|
75
|
-
#
|
|
80
|
+
# gate matrix: both locales on the real document (the mirrored layout
|
|
81
|
+
# must stay accessible), plus the empty document in the default locale
|
|
76
82
|
VARIANTS = [
|
|
77
|
-
{ label: "en", query: "" },
|
|
78
|
-
{ label: "ar (rtl)", query: "?locale=ar" },
|
|
83
|
+
{ label: "en", page: "audit.html", query: "" },
|
|
84
|
+
{ label: "ar (rtl)", page: "audit.html", query: "?locale=ar" },
|
|
85
|
+
{ label: "empty doc", page: "audit-empty.html", query: "" },
|
|
79
86
|
].freeze
|
|
80
87
|
|
|
81
88
|
failed = false
|
|
@@ -83,7 +90,7 @@ failed = false
|
|
|
83
90
|
VARIANTS.each do |variant|
|
|
84
91
|
dom, err, status = Open3.capture3(
|
|
85
92
|
chrome, "--headless=new", "--disable-gpu", "--virtual-time-budget=20000",
|
|
86
|
-
"--dump-dom", "file://#{File.join(dir,
|
|
93
|
+
"--dump-dom", "file://#{File.join(dir, variant[:page])}#{variant[:query]}"
|
|
87
94
|
)
|
|
88
95
|
abort "axe audit: Chrome failed: #{err[0, 400]}" unless status.success?
|
|
89
96
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lutaml-asyncapi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.8.
|
|
33
|
+
version: 0.8.159
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.8.
|
|
40
|
+
version: 0.8.159
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: nokogiri
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -76,6 +76,7 @@ extra_rdoc_files: []
|
|
|
76
76
|
files:
|
|
77
77
|
- ".rubocop_todo.yml"
|
|
78
78
|
- CHANGELOG.md
|
|
79
|
+
- CLAUDE.md
|
|
79
80
|
- CODE_OF_CONDUCT.md
|
|
80
81
|
- LICENSE.md
|
|
81
82
|
- PLAN.md
|