mirror of
https://codeberg.org/demostf/inspector.git
synced 2026-06-03 10:04:09 +02:00
flake reorg, enable panic hook
This commit is contained in:
parent
f64ffd6cfb
commit
667569052c
18 changed files with 200 additions and 165 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
install:
|
install:
|
||||||
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName
|
||||||
- if not defined RUSTFLAGS rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain nightly
|
rustup-init.exe
|
||||||
|
- if not defined RUSTFLAGS rustup-init.exe -y --default-host
|
||||||
|
x86_64-pc-windows-msvc --default-toolchain nightly
|
||||||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
||||||
- rustc -V
|
- rustc -V
|
||||||
- cargo -V
|
- cargo -V
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
name: "Build"
|
name: "CI"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
checks:
|
||||||
runs-on: nix
|
runs-on: nix
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: https://codeberg.org/icewind/attic-action@v1
|
- uses: https://codeberg.org/icewind/attic-action@v1
|
||||||
with:
|
with:
|
||||||
name: ci
|
name: link
|
||||||
instance: https://cache.icewind.me
|
instance: https://cache.icewind.link
|
||||||
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
authToken: "${{ secrets.ATTIC_TOKEN }}"
|
||||||
- run: nix build
|
- run: nix flake check --keep-going
|
||||||
|
|
|
||||||
132
.travis.yml
132
.travis.yml
|
|
@ -5,65 +5,77 @@ cache: cargo
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
# Builds with wasm-pack.
|
||||||
|
- rust: beta
|
||||||
|
env: RUST_BACKTRACE=1
|
||||||
|
addons:
|
||||||
|
firefox: latest
|
||||||
|
chrome: stable
|
||||||
|
before_script:
|
||||||
|
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install
|
||||||
|
cargo-update)
|
||||||
|
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers
|
||||||
|
"^0.2" cargo-generate)
|
||||||
|
- cargo install-update -a
|
||||||
|
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
-s -- -f
|
||||||
|
script:
|
||||||
|
- cargo generate --git . --name testing
|
||||||
|
# Having a broken Cargo.toml (in that it has curlies in fields) anywhere
|
||||||
|
# in any of our parent dirs is problematic.
|
||||||
|
- mv Cargo.toml Cargo.toml.tmpl
|
||||||
|
- cd testing
|
||||||
|
- wasm-pack build
|
||||||
|
- wasm-pack test --chrome --firefox --headless
|
||||||
|
|
||||||
# Builds with wasm-pack.
|
# Builds on nightly.
|
||||||
- rust: beta
|
- rust: nightly
|
||||||
env: RUST_BACKTRACE=1
|
env: RUST_BACKTRACE=1
|
||||||
addons:
|
before_script:
|
||||||
firefox: latest
|
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install
|
||||||
chrome: stable
|
cargo-update)
|
||||||
before_script:
|
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers
|
||||||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
"^0.2" cargo-generate)
|
||||||
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
|
- cargo install-update -a
|
||||||
- cargo install-update -a
|
- rustup target add wasm32-unknown-unknown
|
||||||
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
|
script:
|
||||||
script:
|
- cargo generate --git . --name testing
|
||||||
- cargo generate --git . --name testing
|
- mv Cargo.toml Cargo.toml.tmpl
|
||||||
# Having a broken Cargo.toml (in that it has curlies in fields) anywhere
|
- cd testing
|
||||||
# in any of our parent dirs is problematic.
|
- cargo check
|
||||||
- mv Cargo.toml Cargo.toml.tmpl
|
- cargo check --target wasm32-unknown-unknown
|
||||||
- cd testing
|
- cargo check --no-default-features
|
||||||
- wasm-pack build
|
- cargo check --target wasm32-unknown-unknown --no-default-features
|
||||||
- wasm-pack test --chrome --firefox --headless
|
- cargo check --no-default-features
|
||||||
|
--features console_error_panic_hook
|
||||||
|
- cargo check --target wasm32-unknown-unknown --no-default-features
|
||||||
|
--features console_error_panic_hook
|
||||||
|
- cargo check --no-default-features
|
||||||
|
--features "console_error_panic_hook wee_alloc"
|
||||||
|
- cargo check --target wasm32-unknown-unknown --no-default-features
|
||||||
|
--features "console_error_panic_hook wee_alloc"
|
||||||
|
|
||||||
# Builds on nightly.
|
# Builds on beta.
|
||||||
- rust: nightly
|
- rust: beta
|
||||||
env: RUST_BACKTRACE=1
|
env: RUST_BACKTRACE=1
|
||||||
before_script:
|
before_script:
|
||||||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install
|
||||||
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
|
cargo-update)
|
||||||
- cargo install-update -a
|
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers
|
||||||
- rustup target add wasm32-unknown-unknown
|
"^0.2" cargo-generate)
|
||||||
script:
|
- cargo install-update -a
|
||||||
- cargo generate --git . --name testing
|
- rustup target add wasm32-unknown-unknown
|
||||||
- mv Cargo.toml Cargo.toml.tmpl
|
script:
|
||||||
- cd testing
|
- cargo generate --git . --name testing
|
||||||
- cargo check
|
- mv Cargo.toml Cargo.toml.tmpl
|
||||||
- cargo check --target wasm32-unknown-unknown
|
- cd testing
|
||||||
- cargo check --no-default-features
|
- cargo check
|
||||||
- cargo check --target wasm32-unknown-unknown --no-default-features
|
- cargo check --target wasm32-unknown-unknown
|
||||||
- cargo check --no-default-features --features console_error_panic_hook
|
- cargo check --no-default-features
|
||||||
- cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
|
- cargo check --target wasm32-unknown-unknown --no-default-features
|
||||||
- cargo check --no-default-features --features "console_error_panic_hook wee_alloc"
|
- cargo check --no-default-features
|
||||||
- cargo check --target wasm32-unknown-unknown --no-default-features --features "console_error_panic_hook wee_alloc"
|
--features console_error_panic_hook
|
||||||
|
- cargo check --target wasm32-unknown-unknown --no-default-features
|
||||||
# Builds on beta.
|
--features console_error_panic_hook
|
||||||
- rust: beta
|
# Note: no enabling the `wee_alloc` feature here because it requires
|
||||||
env: RUST_BACKTRACE=1
|
# nightly for now.
|
||||||
before_script:
|
|
||||||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
|
||||||
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
|
|
||||||
- cargo install-update -a
|
|
||||||
- rustup target add wasm32-unknown-unknown
|
|
||||||
script:
|
|
||||||
- cargo generate --git . --name testing
|
|
||||||
- mv Cargo.toml Cargo.toml.tmpl
|
|
||||||
- cd testing
|
|
||||||
- cargo check
|
|
||||||
- cargo check --target wasm32-unknown-unknown
|
|
||||||
- cargo check --no-default-features
|
|
||||||
- cargo check --target wasm32-unknown-unknown --no-default-features
|
|
||||||
- cargo check --no-default-features --features console_error_panic_hook
|
|
||||||
- cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
|
|
||||||
# Note: no enabling the `wee_alloc` feature here because it requires
|
|
||||||
# nightly for now.
|
|
||||||
|
|
|
||||||
1
wasm/Cargo.lock → Cargo.lock
generated
1
wasm/Cargo.lock → Cargo.lock
generated
|
|
@ -80,7 +80,6 @@ dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"serde",
|
"serde",
|
||||||
"serde-wasm-bindgen",
|
"serde-wasm-bindgen",
|
||||||
"serde_json",
|
|
||||||
"tf-demo-parser",
|
"tf-demo-parser",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"wee_alloc",
|
"wee_alloc",
|
||||||
|
|
@ -14,7 +14,6 @@ default = ["console_error_panic_hook"]
|
||||||
bitbuffer = "0.11.1"
|
bitbuffer = "0.11.1"
|
||||||
tf-demo-parser = "0.6"
|
tf-demo-parser = "0.6"
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.219", features = ["derive"] }
|
||||||
serde_json = "1.0.140"
|
|
||||||
js-sys = "0.3.77"
|
js-sys = "0.3.77"
|
||||||
wasm-bindgen = { version = "0.2.100" }
|
wasm-bindgen = { version = "0.2.100" }
|
||||||
serde-wasm-bindgen = "0.6.5"
|
serde-wasm-bindgen = "0.6.5"
|
||||||
|
|
@ -28,8 +27,6 @@ console_error_panic_hook = { version = "0.1.7", optional = true }
|
||||||
# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
|
# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
|
||||||
# compared to the default allocator's ~10K. It is slower than the default
|
# compared to the default allocator's ~10K. It is slower than the default
|
||||||
# allocator, however.
|
# allocator, however.
|
||||||
#
|
|
||||||
# Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now.
|
|
||||||
wee_alloc = { version = "0.4.5", optional = true }
|
wee_alloc = { version = "0.4.5", optional = true }
|
||||||
|
|
||||||
|
|
||||||
122
flake.lock
generated
122
flake.lock
generated
|
|
@ -1,77 +1,103 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"crane": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748460882,
|
"lastModified": 1748970125,
|
||||||
"narHash": "sha256-nm8eV2p7m4t3eSgqlDJM8pvZaAPifd4LsoSPndufAIY=",
|
"narHash": "sha256-UDyigbDGv8fvs9aS95yzFfOKkEjx1LO3PL3DsKopohA=",
|
||||||
"owner": "NixOS",
|
"owner": "ipetkov",
|
||||||
"repo": "nixpkgs",
|
"repo": "crane",
|
||||||
"rev": "0ec1b79c9f7111d5df758d106bfa9aedad362ca0",
|
"rev": "323b5746d89e04b22554b061522dfce9e4c49b18",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "ipetkov",
|
||||||
"ref": "release-25.05",
|
"repo": "crane",
|
||||||
"type": "indirect"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"flakelight": {
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"rust-overlay": "rust-overlay",
|
|
||||||
"utils": "utils"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748140821,
|
"lastModified": 1750683087,
|
||||||
"narHash": "sha256-GZcjWLQtDifSYMd1ueLDmuVTcQQdD5mONIBTqABooOk=",
|
"narHash": "sha256-CkmobghX9K9soC4DoorFo/vlWXxpf8xuZyoCsOnWzqM=",
|
||||||
"owner": "oxalica",
|
"owner": "nix-community",
|
||||||
"repo": "rust-overlay",
|
"repo": "flakelight",
|
||||||
"rev": "476b2ba7dc99ddbf70b1f45357dbbdbdbdfb4422",
|
"rev": "aa93e0e1ecdccc70c7a185f60c562effbfe3c8d9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oxalica",
|
"owner": "nix-community",
|
||||||
"repo": "rust-overlay",
|
"repo": "flakelight",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"mill-scale": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"utils": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"crane": "crane",
|
||||||
|
"flakelight": [
|
||||||
|
"flakelight"
|
||||||
|
],
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731533236,
|
"lastModified": 1751058017,
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
"narHash": "sha256-Pa6Nnkp9sW7ufONQE9jvIDb1rUQUjVsAVZRGU9R3xp0=",
|
||||||
"owner": "numtide",
|
"ref": "refs/heads/main",
|
||||||
"repo": "flake-utils",
|
"rev": "8907224f8770afd89894b4c927d86c9c249d5593",
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
"revCount": 54,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://codeberg.org/icewind/mill-scale.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://codeberg.org/icewind/mill-scale.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1750838302,
|
||||||
|
"narHash": "sha256-aVkL3/yu50oQzi2YuKo0ceiCypVZpZXYd2P2p1FMJM4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "7284e2decc982b81a296ab35aa46e804baaa1cfe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"id": "nixpkgs",
|
||||||
"repo": "flake-utils",
|
"ref": "nixos-25.05",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flakelight": "flakelight",
|
||||||
|
"mill-scale": "mill-scale",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"mill-scale",
|
||||||
|
"flakelight",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1750214276,
|
||||||
|
"narHash": "sha256-1kniuhH70q4TAC/xIvjFYH46aHiLrbIlcr6fdrRwO1A=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "f9b2b2b1327ff6beab4662b8ea41689e0a57b8d4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
54
flake.nix
54
flake.nix
|
|
@ -1,46 +1,32 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/release-25.05";
|
nixpkgs.url = "nixpkgs/nixos-25.05";
|
||||||
utils.url = "github:numtide/flake-utils";
|
flakelight = {
|
||||||
rust-overlay = {
|
url = "github:nix-community/flakelight";
|
||||||
url = "github:oxalica/rust-overlay";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
mill-scale = {
|
||||||
|
url = "git+https://codeberg.org/icewind/mill-scale.git";
|
||||||
|
inputs.flakelight.follows = "flakelight";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
outputs = {mill-scale, ...}:
|
||||||
outputs = {
|
mill-scale ./. {
|
||||||
self,
|
withOverlays = [
|
||||||
nixpkgs,
|
|
||||||
utils,
|
|
||||||
rust-overlay,
|
|
||||||
}:
|
|
||||||
utils.lib.eachDefaultSystem (system: let
|
|
||||||
overlays = [
|
|
||||||
(import rust-overlay)
|
|
||||||
(import ./nix/overlay.nix)
|
(import ./nix/overlay.nix)
|
||||||
];
|
];
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system overlays;
|
toolchain = pkgs:
|
||||||
};
|
pkgs.rust-bin.stable.latest.default.override {
|
||||||
in rec {
|
targets = ["wasm32-unknown-unknown"];
|
||||||
devShells.default = pkgs.mkShell {
|
};
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
cargo-edit
|
packages = {
|
||||||
bacon
|
json-schema-to-typescript = pkgs: pkgs.json-schema-to-typescript;
|
||||||
wasm-pack
|
demo-inspector = pkgs: pkgs.demo-inspector;
|
||||||
nodejs_20
|
demo-inspector-wasm = pkgs: pkgs.demo-inspector-wasm;
|
||||||
node2nix
|
|
||||||
wasm-bindgen-cli
|
|
||||||
json-schema-to-typescript
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = rec {
|
|
||||||
inherit (pkgs) json-schema-to-typescript demo-inspector demo-inspector-wasm demo-inspector-node-modules;
|
|
||||||
default = demo-inspector;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
// {
|
|
||||||
overlays.default = import ./nix/overlay.nix;
|
overlays.default = import ./nix/overlay.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
importNpmLock,
|
importNpmLock,
|
||||||
demo-inspector-wasm,
|
demo-inspector-wasm,
|
||||||
nodejs,
|
nodejs,
|
||||||
}: importNpmLock.buildNodeModules {
|
}:
|
||||||
|
importNpmLock.buildNodeModules {
|
||||||
npmRoot = ../www;
|
npmRoot = ../www;
|
||||||
derivationArgs = {
|
derivationArgs = {
|
||||||
npmDeps = importNpmLock {
|
npmDeps = importNpmLock {
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@
|
||||||
rust-bin,
|
rust-bin,
|
||||||
wasm-pack,
|
wasm-pack,
|
||||||
binaryen,
|
binaryen,
|
||||||
lib
|
lib,
|
||||||
}: let
|
}: let
|
||||||
deps = (builtins.fromTOML (builtins.readFile ../wasm/Cargo.toml)).dependencies;
|
deps = (builtins.fromTOML (builtins.readFile ../Cargo.toml)).dependencies;
|
||||||
wasm-bindgen-version = lib.strings.removePrefix "=" deps.wasm-bindgen.version;
|
wasm-bindgen-version = lib.strings.removePrefix "=" deps.wasm-bindgen.version;
|
||||||
wasm-bindgen-cli = rustPlatform.buildRustPackage rec {
|
wasm-bindgen-cli = rustPlatform.buildRustPackage rec {
|
||||||
pname = "wasm-bindgen-cli";
|
pname = "wasm-bindgen-cli";
|
||||||
|
|
@ -37,10 +37,10 @@ in
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
|
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = ../wasm/Cargo.lock;
|
lockFile = ../Cargo.lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
src = ../wasm;
|
src = ../.;
|
||||||
|
|
||||||
WASM_PACK_CACHE = "/build/cache";
|
WASM_PACK_CACHE = "/build/cache";
|
||||||
nativeBuildInputs = [rust-wasm wasm-pack wasm-bindgen-cli binaryen];
|
nativeBuildInputs = [rust-wasm wasm-pack wasm-bindgen-cli binaryen];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
{ lib, buildNpmPackage, fetchFromGitHub }:
|
{
|
||||||
|
lib,
|
||||||
|
buildNpmPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
}:
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
pname = "json-schema-to-typescript";
|
pname = "json-schema-to-typescript";
|
||||||
version = "13.1.2";
|
version = "13.1.2";
|
||||||
|
|
@ -23,6 +26,6 @@ buildNpmPackage rec {
|
||||||
description = "Compile JSONSchema to TypeScript type declarations";
|
description = "Compile JSONSchema to TypeScript type declarations";
|
||||||
homepage = "https://github.com/bcherny/json-schema-to-typescript";
|
homepage = "https://github.com/bcherny/json-schema-to-typescript";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ icewind1991 ];
|
maintainers = with maintainers; [icewind1991];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -36,6 +36,9 @@ pub struct Parser {
|
||||||
impl Parser {
|
impl Parser {
|
||||||
#[wasm_bindgen(constructor)]
|
#[wasm_bindgen(constructor)]
|
||||||
pub fn new(input: Vec<u8>, progress: Function) -> Self {
|
pub fn new(input: Vec<u8>, progress: Function) -> Self {
|
||||||
|
#[cfg(feature = "console_error_panic_hook")]
|
||||||
|
console_error_panic_hook::set_once();
|
||||||
|
|
||||||
let buffer = BitReadBuffer::new_owned(input, LittleEndian);
|
let buffer = BitReadBuffer::new_owned(input, LittleEndian);
|
||||||
let mut stream = BitReadStream::new(buffer);
|
let mut stream = BitReadStream::new(buffer);
|
||||||
let header = Header::read(&mut stream).unwrap();
|
let header = Header::read(&mut stream).unwrap();
|
||||||
14
www/package-lock.json
generated
14
www/package-lock.json
generated
|
|
@ -8,7 +8,7 @@
|
||||||
"name": "create-wasm-app",
|
"name": "create-wasm-app",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"demo-inspector": "file:../wasm/pkg",
|
"demo-inspector": "file:../pkg",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-dropzone": "^14.2.2",
|
"react-dropzone": "^14.2.2",
|
||||||
|
|
@ -44,7 +44,13 @@
|
||||||
"webpack-dev-server": "^4.10.1"
|
"webpack-dev-server": "^4.10.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../wasm/pkg": {},
|
"../pkg": {
|
||||||
|
"name": "demo-inspector",
|
||||||
|
"version": "0.1.0"
|
||||||
|
},
|
||||||
|
"../wasm/pkg": {
|
||||||
|
"extraneous": true
|
||||||
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
|
||||||
|
|
@ -2548,7 +2554,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/demo-inspector": {
|
"node_modules/demo-inspector": {
|
||||||
"resolved": "../wasm/pkg",
|
"resolved": "../pkg",
|
||||||
"link": true
|
"link": true
|
||||||
},
|
},
|
||||||
"node_modules/depd": {
|
"node_modules/depd": {
|
||||||
|
|
@ -9987,7 +9993,7 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"demo-inspector": {
|
"demo-inspector": {
|
||||||
"version": "file:../wasm/pkg"
|
"version": "file:../pkg"
|
||||||
},
|
},
|
||||||
"depd": {
|
"depd": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
"start": "webpack serve --hot"
|
"start": "webpack serve --hot"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"demo-inspector": "file:../wasm/pkg",
|
"demo-inspector": "file:../pkg",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-dropzone": "^14.2.2",
|
"react-dropzone": "^14.2.2",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue