Skip to content

Commit

Permalink
Support XWasser 0.8.0 (#52)
Browse files Browse the repository at this point in the history
* support XWasser 0.8.0

* fixed codelists, updated tests

* removed dbg structure
  • Loading branch information
kilork authored Jan 2, 2025
1 parent 41cd913 commit 9740344
Show file tree
Hide file tree
Showing 158 changed files with 6,935 additions and 33,815 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
- name: Build WASM
run: |
wasm-pack build --release --target nodejs --reference-types --features wasm,builder --no-default-features
cp target/schemas/out/*.xsdb pkg/xwasser-v072.xsdb.bin
cp crates/codelists/public/V0_7_2/codelist.json pkg/codelist.json
cp target/schemas/out/*.xsdb pkg/xwasser-v080.xsdb.bin
cp crates/codelists/public/V0_8_0/codelist.json pkg/codelist.json
cp package.tmp.json pkg/package.json
pnpm tsup --format esm,cjs
- name: Test WASM
Expand All @@ -52,8 +52,8 @@ jobs:
- name: Build WASM Web
run: |
wasm-pack build --release --target web --reference-types --features wasm,builder --no-default-features
cp target/schemas/out/*.xsdb pkg/xwasser-v072.xsdb.bin
cp crates/codelists/public/V0_7_2/codelist.json pkg/codelist.json
cp target/schemas/out/*.xsdb pkg/xwasser-v080.xsdb.bin
cp crates/codelists/public/V0_8_0/codelist.json pkg/codelist.json
cp package.tmp.web.json pkg/package.json
- name: Build utils web package
run: pnpm tsup --format esm,cjs
Expand Down
4 changes: 2 additions & 2 deletions build-web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e
# cargo clean
wasm-pack build --release --target web --reference-types --features wasm,builder --no-default-features
cp crates/codelists/public/V0_7_2/codelist.json pkg/codelist.json
cp target/schemas/out/*.xsdb pkg/xwasser-v072.xsdb.bin
cp crates/codelists/public/V0_8_0/codelist.json pkg/codelist.json
cp target/schemas/out/*.xsdb pkg/xwasser-v080.xsdb.bin
cp package.tmp.web.json pkg/package.json
pnpm tsup --format esm,cjs
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use raxb_xmlschema_build::XmlSchemaRegistry;
fn main() -> anyhow::Result<()> {
let mut registry =
XmlSchemaRegistry::new("./target/schemas").with_cache_dir("./schemas/remote");
registry.register("./schemas/V0_7_2/xwasser.xsd")?;
registry.register("./schemas/V0_8_0/xwasser.xsd")?;
registry.save()?;

Ok(())
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ cargo clean
cargo test --no-default-features --features schema,trace,builder
wasm-pack build --release --target nodejs --reference-types --features wasm,builder --no-default-features
# wasm-pack build --release --target web --reference-types --features wasm --no-default-features
cp crates/codelists/public/V0_7_2/codelist.json pkg/codelist.json
cp target/schemas/out/*.xsdb pkg/xwasser-v072.xsdb.bin
cp crates/codelists/public/V0_8_0/codelist.json pkg/codelist.json
cp target/schemas/out/*.xsdb pkg/xwasser-v080.xsdb.bin
#cp package.tmp.web.json pkg/package.json
cp package.tmp.json pkg/package.json
pnpm tsup --format esm,cjs
4 changes: 2 additions & 2 deletions crates/codelists/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
This crate is responsible to offer in memory codelists from XWasser.
The original xml files are stored under the directory `./data/${VERSION}` and the parsed JSON variants under `./public/${VERSION}`.

XML files source: https://www.xrepository.de/api/version_standard/urn:xoev-de:lgl:standard:xwasser_0.7.0/genutzteAktuelleCodelisten
XML files source: https://www.xrepository.de/api/version_standard/urn:xoev-de:lgl:standard:xwasser_0.8.0/genutzteAktuelleCodelisten

Once the content in `./data` has changed, only run `cargo build` to update the JSON variants.

## Versions

- XWasser Codelist [v0.7.2](./public/V0_7_2/README.md)
- XWasser Codelist [v0.8.0](./public/V0_8_0/README.md)
Loading

0 comments on commit 9740344

Please sign in to comment.