From 2bf02785d9aef8b7b265d41cd45e2519a7e04bb4 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 21 Sep 2026 20:57:36 +0100 Subject: Support Option in typescript-types --- examples/10-option/hobgoblin.json5 | 23 + examples/10-option/output/java/.gitignore | 2 + examples/10-option/output/java/pom.xml | 1 + .../test/java/org/zwobble/example/PointTests.java | 32 + examples/10-option/output/rust/.gitignore | 1 + examples/10-option/output/rust/Cargo.lock | 7 + examples/10-option/output/rust/Cargo.toml | 6 + examples/10-option/output/rust/rust-toolchain.toml | 2 + examples/10-option/output/rust/src/lib.rs | 14 + examples/10-option/output/rust/src/point.rs | 13 + examples/10-option/output/typescript/.gitignore | 1 + examples/10-option/output/typescript/package.json | 1 + .../10-option/output/typescript/pnpm-lock.yaml | 834 +++++++++++++++++++++ .../10-option/output/typescript/src/point.test.ts | 12 + examples/10-option/output/typescript/src/point.ts | 39 + examples/10-option/output/typescript/tsconfig.json | 1 + examples/10-option/src/point.hob | 9 + examples/10-shared/hobgoblin.json5 | 23 - examples/10-shared/output/java/.gitignore | 2 - examples/10-shared/output/java/pom.xml | 1 - .../test/java/org/zwobble/example/PointTests.java | 15 - examples/10-shared/output/rust/.gitignore | 1 - examples/10-shared/output/rust/Cargo.lock | 7 - examples/10-shared/output/rust/Cargo.toml | 6 - examples/10-shared/output/rust/rust-toolchain.toml | 2 - examples/10-shared/output/rust/src/lib.rs | 14 - examples/10-shared/output/rust/src/point.rs | 15 - examples/10-shared/output/typescript/.gitignore | 1 - examples/10-shared/output/typescript/package.json | 1 - .../10-shared/output/typescript/pnpm-lock.yaml | 834 --------------------- .../10-shared/output/typescript/src/point.test.ts | 11 - examples/10-shared/output/typescript/src/point.ts | 33 - examples/10-shared/output/typescript/tsconfig.json | 1 - examples/10-shared/src/point.hob | 11 - examples/11-imports/hobgoblin.json5 | 23 - examples/11-imports/output/java/.gitignore | 2 - examples/11-imports/output/java/pom.xml | 1 - .../test/java/org/zwobble/example/LineTests.java | 15 - examples/11-imports/output/rust/.gitignore | 1 - examples/11-imports/output/rust/Cargo.lock | 7 - examples/11-imports/output/rust/Cargo.toml | 6 - .../11-imports/output/rust/rust-toolchain.toml | 2 - examples/11-imports/output/rust/src/lib.rs | 15 - examples/11-imports/output/rust/src/line.rs | 8 - examples/11-imports/output/rust/src/point.rs | 8 - examples/11-imports/output/typescript/.gitignore | 1 - examples/11-imports/output/typescript/package.json | 1 - .../11-imports/output/typescript/pnpm-lock.yaml | 834 --------------------- .../11-imports/output/typescript/src/line.test.ts | 12 - examples/11-imports/output/typescript/src/line.ts | 28 - examples/11-imports/output/typescript/src/point.ts | 26 - .../11-imports/output/typescript/tsconfig.json | 1 - examples/11-imports/src/line.hob | 7 - examples/11-imports/src/point.hob | 5 - examples/11-shared/hobgoblin.json5 | 23 + examples/11-shared/output/java/.gitignore | 2 + examples/11-shared/output/java/pom.xml | 1 + .../test/java/org/zwobble/example/PointTests.java | 15 + examples/11-shared/output/rust/.gitignore | 1 + examples/11-shared/output/rust/Cargo.lock | 7 + examples/11-shared/output/rust/Cargo.toml | 6 + examples/11-shared/output/rust/rust-toolchain.toml | 2 + examples/11-shared/output/rust/src/lib.rs | 14 + examples/11-shared/output/rust/src/point.rs | 15 + examples/11-shared/output/typescript/.gitignore | 1 + examples/11-shared/output/typescript/package.json | 1 + .../11-shared/output/typescript/pnpm-lock.yaml | 834 +++++++++++++++++++++ .../11-shared/output/typescript/src/point.test.ts | 11 + examples/11-shared/output/typescript/src/point.ts | 33 + examples/11-shared/output/typescript/tsconfig.json | 1 + examples/11-shared/src/point.hob | 11 + examples/12-imports/hobgoblin.json5 | 23 + examples/12-imports/output/java/.gitignore | 2 + examples/12-imports/output/java/pom.xml | 1 + .../test/java/org/zwobble/example/LineTests.java | 15 + examples/12-imports/output/rust/.gitignore | 1 + examples/12-imports/output/rust/Cargo.lock | 7 + examples/12-imports/output/rust/Cargo.toml | 6 + .../12-imports/output/rust/rust-toolchain.toml | 2 + examples/12-imports/output/rust/src/lib.rs | 15 + examples/12-imports/output/rust/src/line.rs | 8 + examples/12-imports/output/rust/src/point.rs | 8 + examples/12-imports/output/typescript/.gitignore | 1 + examples/12-imports/output/typescript/package.json | 1 + .../12-imports/output/typescript/pnpm-lock.yaml | 834 +++++++++++++++++++++ .../12-imports/output/typescript/src/line.test.ts | 12 + examples/12-imports/output/typescript/src/line.ts | 28 + examples/12-imports/output/typescript/src/point.ts | 26 + .../12-imports/output/typescript/tsconfig.json | 1 + examples/12-imports/src/line.hob | 7 + examples/12-imports/src/point.hob | 5 + examples/12-inductive-data-types/hobgoblin.json5 | 23 - .../12-inductive-data-types/output/java/.gitignore | 2 - .../12-inductive-data-types/output/java/pom.xml | 1 - .../main/java/org/zwobble/example/Arithmetic.java | 17 - .../java/org/zwobble/example/ArithmeticTests.java | 24 - .../12-inductive-data-types/output/rust/.gitignore | 1 - .../12-inductive-data-types/output/rust/Cargo.lock | 7 - .../12-inductive-data-types/output/rust/Cargo.toml | 6 - .../output/rust/rust-toolchain.toml | 2 - .../output/rust/src/arithmetic.rs | 30 - .../12-inductive-data-types/output/rust/src/lib.rs | 33 - .../output/typescript/.gitignore | 1 - .../output/typescript/package.json | 1 - .../output/typescript/pnpm-lock.yaml | 834 --------------------- .../output/typescript/src/arithmetic.test.ts | 20 - .../output/typescript/src/arithmetic.ts | 48 -- .../output/typescript/src/index.ts | 11 - .../output/typescript/tsconfig.json | 1 - .../12-inductive-data-types/src/arithmetic.hob | 13 - .../hobgoblin.json5 | 19 - .../output/java/.gitignore | 2 - .../output/java/pom.xml | 1 - .../test/java/org/zwobble/example/DataTests.java | 14 - .../output/rust/.gitignore | 1 - .../output/rust/Cargo.lock | 7 - .../output/rust/Cargo.toml | 6 - .../output/rust/rust-toolchain.toml | 2 - .../output/rust/src/data/a.rs | 17 - .../output/rust/src/data/b.rs | 6 - .../output/rust/src/data/mod.rs | 2 - .../output/rust/src/lib.rs | 15 - .../src/data/a.hob | 9 - .../src/data/b.hob | 5 - examples/13-inductive-data-types/hobgoblin.json5 | 23 + .../13-inductive-data-types/output/java/.gitignore | 2 + .../13-inductive-data-types/output/java/pom.xml | 1 + .../main/java/org/zwobble/example/Arithmetic.java | 17 + .../java/org/zwobble/example/ArithmeticTests.java | 24 + .../13-inductive-data-types/output/rust/.gitignore | 1 + .../13-inductive-data-types/output/rust/Cargo.lock | 7 + .../13-inductive-data-types/output/rust/Cargo.toml | 6 + .../output/rust/rust-toolchain.toml | 2 + .../output/rust/src/arithmetic.rs | 30 + .../13-inductive-data-types/output/rust/src/lib.rs | 33 + .../output/typescript/.gitignore | 1 + .../output/typescript/package.json | 1 + .../output/typescript/pnpm-lock.yaml | 834 +++++++++++++++++++++ .../output/typescript/src/arithmetic.test.ts | 20 + .../output/typescript/src/arithmetic.ts | 48 ++ .../output/typescript/src/index.ts | 11 + .../output/typescript/tsconfig.json | 1 + .../13-inductive-data-types/src/arithmetic.hob | 13 + .../hobgoblin.json5 | 19 + .../output/java/.gitignore | 2 + .../output/java/pom.xml | 1 + .../test/java/org/zwobble/example/DataTests.java | 14 + .../output/rust/.gitignore | 1 + .../output/rust/Cargo.lock | 7 + .../output/rust/Cargo.toml | 6 + .../output/rust/rust-toolchain.toml | 2 + .../output/rust/src/data/a.rs | 17 + .../output/rust/src/data/b.rs | 6 + .../output/rust/src/data/mod.rs | 2 + .../output/rust/src/lib.rs | 15 + .../src/data/a.hob | 9 + .../src/data/b.hob | 5 + examples/14-struct-generic/hobgoblin.json5 | 27 - examples/14-struct-generic/output/java/.gitignore | 2 - examples/14-struct-generic/output/java/pom.xml | 1 - .../test/java/org/zwobble/example/PointTests.java | 43 -- examples/14-struct-generic/output/rust/.gitignore | 1 - examples/14-struct-generic/output/rust/Cargo.lock | 7 - examples/14-struct-generic/output/rust/Cargo.toml | 6 - .../output/rust/rust-toolchain.toml | 2 - examples/14-struct-generic/output/rust/src/lib.rs | 16 - .../14-struct-generic/output/rust/src/point.rs | 41 - .../14-struct-generic/output/typescript/.gitignore | 1 - .../output/typescript/package.json | 1 - .../output/typescript/pnpm-lock.yaml | 834 --------------------- .../output/typescript/src/point.test.ts | 14 - .../output/typescript/src/point.ts | 115 --- .../output/typescript/tsconfig.json | 1 - examples/14-struct-generic/src/point.hob | 33 - examples/15-native-type-generic/hobgoblin.json5 | 37 - .../15-native-type-generic/output/java/.gitignore | 2 - .../15-native-type-generic/output/java/pom.xml | 1 - .../example/types/map/HobgoblinNativeMap.java | 14 - .../test/java/org/zwobble/example/MapTests.java | 13 - .../15-native-type-generic/output/rust/.gitignore | 1 - .../15-native-type-generic/output/rust/Cargo.lock | 7 - .../15-native-type-generic/output/rust/Cargo.toml | 6 - .../output/rust/rust-toolchain.toml | 2 - .../output/rust/src/gen/map.rs | 6 - .../15-native-type-generic/output/rust/src/lib.rs | 12 - .../15-native-type-generic/output/rust/src/map.rs | 1 - .../output/typescript/.gitignore | 1 - .../output/typescript/package.json | 1 - .../output/typescript/pnpm-lock.yaml | 834 --------------------- .../output/typescript/src/map.test.ts | 9 - .../output/typescript/src/map.ts | 21 - .../output/typescript/tsconfig.json | 1 - examples/15-native-type-generic/src/map.hob | 6 - examples/15-struct-generic/hobgoblin.json5 | 27 + examples/15-struct-generic/output/java/.gitignore | 2 + examples/15-struct-generic/output/java/pom.xml | 1 + .../test/java/org/zwobble/example/PointTests.java | 43 ++ examples/15-struct-generic/output/rust/.gitignore | 1 + examples/15-struct-generic/output/rust/Cargo.lock | 7 + examples/15-struct-generic/output/rust/Cargo.toml | 6 + .../output/rust/rust-toolchain.toml | 2 + examples/15-struct-generic/output/rust/src/lib.rs | 16 + .../15-struct-generic/output/rust/src/point.rs | 41 + .../15-struct-generic/output/typescript/.gitignore | 1 + .../output/typescript/package.json | 1 + .../output/typescript/pnpm-lock.yaml | 834 +++++++++++++++++++++ .../output/typescript/src/point.test.ts | 14 + .../output/typescript/src/point.ts | 115 +++ .../output/typescript/tsconfig.json | 1 + examples/15-struct-generic/src/point.hob | 33 + examples/16-native-type-generic/hobgoblin.json5 | 37 + .../16-native-type-generic/output/java/.gitignore | 2 + .../16-native-type-generic/output/java/pom.xml | 1 + .../example/types/map/HobgoblinNativeMap.java | 14 + .../test/java/org/zwobble/example/MapTests.java | 13 + .../16-native-type-generic/output/rust/.gitignore | 1 + .../16-native-type-generic/output/rust/Cargo.lock | 7 + .../16-native-type-generic/output/rust/Cargo.toml | 6 + .../output/rust/rust-toolchain.toml | 2 + .../output/rust/src/gen/map.rs | 6 + .../16-native-type-generic/output/rust/src/lib.rs | 12 + .../16-native-type-generic/output/rust/src/map.rs | 1 + .../output/typescript/.gitignore | 1 + .../output/typescript/package.json | 1 + .../output/typescript/pnpm-lock.yaml | 834 +++++++++++++++++++++ .../output/typescript/src/map.test.ts | 9 + .../output/typescript/src/map.ts | 21 + .../output/typescript/tsconfig.json | 1 + examples/16-native-type-generic/src/map.hob | 6 + examples/16-transient-0/hobgoblin.json5 | 27 - examples/16-transient-0/output/java/.gitignore | 3 - examples/16-transient-0/output/java/pom.xml | 1 - .../zwobble/example/types/data/GenericNative.java | 3 - .../example/types/data/HobgoblinNativeData.java | 18 - .../org/zwobble/example/types/data/Native.java | 3 - .../data/transient0/HobgoblinTransient0Data.java | 636 ---------------- .../zwobble/example/types/transient0/Decoder.java | 13 - .../zwobble/example/types/transient0/Encoder.java | 13 - .../transient0/HobgoblinTransient0Builtins.java | 91 --- .../HobgoblinTransient0TaggedSharedValue.java | 22 - .../java/org/zwobble/example/Transient0Tests.java | 452 ----------- examples/16-transient-0/output/rust/.gitignore | 2 - examples/16-transient-0/output/rust/Cargo.lock | 7 - examples/16-transient-0/output/rust/Cargo.toml | 6 - .../16-transient-0/output/rust/rust-toolchain.toml | 2 - examples/16-transient-0/output/rust/src/data.rs | 66 -- .../16-transient-0/output/rust/src/gen/data.rs | 169 ----- .../output/rust/src/gen/data/transient_0.rs | 621 --------------- .../output/rust/src/gen/transient_0.rs | 102 --- examples/16-transient-0/output/rust/src/lib.rs | 410 ---------- .../16-transient-0/output/rust/src/transient_0.rs | 1 - examples/16-transient-0/src/data.hob | 126 ---- examples/17-transient-0/hobgoblin.json5 | 27 + examples/17-transient-0/output/java/.gitignore | 3 + examples/17-transient-0/output/java/pom.xml | 1 + .../zwobble/example/types/data/GenericNative.java | 3 + .../example/types/data/HobgoblinNativeData.java | 18 + .../org/zwobble/example/types/data/Native.java | 3 + .../data/transient0/HobgoblinTransient0Data.java | 636 ++++++++++++++++ .../zwobble/example/types/transient0/Decoder.java | 13 + .../zwobble/example/types/transient0/Encoder.java | 13 + .../transient0/HobgoblinTransient0Builtins.java | 91 +++ .../HobgoblinTransient0TaggedSharedValue.java | 22 + .../java/org/zwobble/example/Transient0Tests.java | 452 +++++++++++ examples/17-transient-0/output/rust/.gitignore | 2 + examples/17-transient-0/output/rust/Cargo.lock | 7 + examples/17-transient-0/output/rust/Cargo.toml | 6 + .../17-transient-0/output/rust/rust-toolchain.toml | 2 + examples/17-transient-0/output/rust/src/data.rs | 66 ++ .../17-transient-0/output/rust/src/gen/data.rs | 169 +++++ .../output/rust/src/gen/data/transient_0.rs | 621 +++++++++++++++ .../output/rust/src/gen/transient_0.rs | 102 +++ examples/17-transient-0/output/rust/src/lib.rs | 410 ++++++++++ .../17-transient-0/output/rust/src/transient_0.rs | 1 + examples/17-transient-0/src/data.hob | 126 ++++ .../generators/typescript/TypescriptGenerator.java | 11 + .../output/lang/typescript/TypescriptTypes.java | 2 + 277 files changed, 9087 insertions(+), 8076 deletions(-) create mode 100644 examples/10-option/hobgoblin.json5 create mode 100644 examples/10-option/output/java/.gitignore create mode 120000 examples/10-option/output/java/pom.xml create mode 100644 examples/10-option/output/java/src/test/java/org/zwobble/example/PointTests.java create mode 100644 examples/10-option/output/rust/.gitignore create mode 100644 examples/10-option/output/rust/Cargo.lock create mode 100644 examples/10-option/output/rust/Cargo.toml create mode 100644 examples/10-option/output/rust/rust-toolchain.toml create mode 100644 examples/10-option/output/rust/src/lib.rs create mode 100644 examples/10-option/output/rust/src/point.rs create mode 100644 examples/10-option/output/typescript/.gitignore create mode 120000 examples/10-option/output/typescript/package.json create mode 100644 examples/10-option/output/typescript/pnpm-lock.yaml create mode 100644 examples/10-option/output/typescript/src/point.test.ts create mode 100644 examples/10-option/output/typescript/src/point.ts create mode 120000 examples/10-option/output/typescript/tsconfig.json create mode 100644 examples/10-option/src/point.hob delete mode 100644 examples/10-shared/hobgoblin.json5 delete mode 100644 examples/10-shared/output/java/.gitignore delete mode 120000 examples/10-shared/output/java/pom.xml delete mode 100644 examples/10-shared/output/java/src/test/java/org/zwobble/example/PointTests.java delete mode 100644 examples/10-shared/output/rust/.gitignore delete mode 100644 examples/10-shared/output/rust/Cargo.lock delete mode 100644 examples/10-shared/output/rust/Cargo.toml delete mode 100644 examples/10-shared/output/rust/rust-toolchain.toml delete mode 100644 examples/10-shared/output/rust/src/lib.rs delete mode 100644 examples/10-shared/output/rust/src/point.rs delete mode 100644 examples/10-shared/output/typescript/.gitignore delete mode 120000 examples/10-shared/output/typescript/package.json delete mode 100644 examples/10-shared/output/typescript/pnpm-lock.yaml delete mode 100644 examples/10-shared/output/typescript/src/point.test.ts delete mode 100644 examples/10-shared/output/typescript/src/point.ts delete mode 120000 examples/10-shared/output/typescript/tsconfig.json delete mode 100644 examples/10-shared/src/point.hob delete mode 100644 examples/11-imports/hobgoblin.json5 delete mode 100644 examples/11-imports/output/java/.gitignore delete mode 120000 examples/11-imports/output/java/pom.xml delete mode 100644 examples/11-imports/output/java/src/test/java/org/zwobble/example/LineTests.java delete mode 100644 examples/11-imports/output/rust/.gitignore delete mode 100644 examples/11-imports/output/rust/Cargo.lock delete mode 100644 examples/11-imports/output/rust/Cargo.toml delete mode 100644 examples/11-imports/output/rust/rust-toolchain.toml delete mode 100644 examples/11-imports/output/rust/src/lib.rs delete mode 100644 examples/11-imports/output/rust/src/line.rs delete mode 100644 examples/11-imports/output/rust/src/point.rs delete mode 100644 examples/11-imports/output/typescript/.gitignore delete mode 120000 examples/11-imports/output/typescript/package.json delete mode 100644 examples/11-imports/output/typescript/pnpm-lock.yaml delete mode 100644 examples/11-imports/output/typescript/src/line.test.ts delete mode 100644 examples/11-imports/output/typescript/src/line.ts delete mode 100644 examples/11-imports/output/typescript/src/point.ts delete mode 120000 examples/11-imports/output/typescript/tsconfig.json delete mode 100644 examples/11-imports/src/line.hob delete mode 100644 examples/11-imports/src/point.hob create mode 100644 examples/11-shared/hobgoblin.json5 create mode 100644 examples/11-shared/output/java/.gitignore create mode 120000 examples/11-shared/output/java/pom.xml create mode 100644 examples/11-shared/output/java/src/test/java/org/zwobble/example/PointTests.java create mode 100644 examples/11-shared/output/rust/.gitignore create mode 100644 examples/11-shared/output/rust/Cargo.lock create mode 100644 examples/11-shared/output/rust/Cargo.toml create mode 100644 examples/11-shared/output/rust/rust-toolchain.toml create mode 100644 examples/11-shared/output/rust/src/lib.rs create mode 100644 examples/11-shared/output/rust/src/point.rs create mode 100644 examples/11-shared/output/typescript/.gitignore create mode 120000 examples/11-shared/output/typescript/package.json create mode 100644 examples/11-shared/output/typescript/pnpm-lock.yaml create mode 100644 examples/11-shared/output/typescript/src/point.test.ts create mode 100644 examples/11-shared/output/typescript/src/point.ts create mode 120000 examples/11-shared/output/typescript/tsconfig.json create mode 100644 examples/11-shared/src/point.hob create mode 100644 examples/12-imports/hobgoblin.json5 create mode 100644 examples/12-imports/output/java/.gitignore create mode 120000 examples/12-imports/output/java/pom.xml create mode 100644 examples/12-imports/output/java/src/test/java/org/zwobble/example/LineTests.java create mode 100644 examples/12-imports/output/rust/.gitignore create mode 100644 examples/12-imports/output/rust/Cargo.lock create mode 100644 examples/12-imports/output/rust/Cargo.toml create mode 100644 examples/12-imports/output/rust/rust-toolchain.toml create mode 100644 examples/12-imports/output/rust/src/lib.rs create mode 100644 examples/12-imports/output/rust/src/line.rs create mode 100644 examples/12-imports/output/rust/src/point.rs create mode 100644 examples/12-imports/output/typescript/.gitignore create mode 120000 examples/12-imports/output/typescript/package.json create mode 100644 examples/12-imports/output/typescript/pnpm-lock.yaml create mode 100644 examples/12-imports/output/typescript/src/line.test.ts create mode 100644 examples/12-imports/output/typescript/src/line.ts create mode 100644 examples/12-imports/output/typescript/src/point.ts create mode 120000 examples/12-imports/output/typescript/tsconfig.json create mode 100644 examples/12-imports/src/line.hob create mode 100644 examples/12-imports/src/point.hob delete mode 100644 examples/12-inductive-data-types/hobgoblin.json5 delete mode 100644 examples/12-inductive-data-types/output/java/.gitignore delete mode 120000 examples/12-inductive-data-types/output/java/pom.xml delete mode 100644 examples/12-inductive-data-types/output/java/src/main/java/org/zwobble/example/Arithmetic.java delete mode 100644 examples/12-inductive-data-types/output/java/src/test/java/org/zwobble/example/ArithmeticTests.java delete mode 100644 examples/12-inductive-data-types/output/rust/.gitignore delete mode 100644 examples/12-inductive-data-types/output/rust/Cargo.lock delete mode 100644 examples/12-inductive-data-types/output/rust/Cargo.toml delete mode 100644 examples/12-inductive-data-types/output/rust/rust-toolchain.toml delete mode 100644 examples/12-inductive-data-types/output/rust/src/arithmetic.rs delete mode 100644 examples/12-inductive-data-types/output/rust/src/lib.rs delete mode 100644 examples/12-inductive-data-types/output/typescript/.gitignore delete mode 120000 examples/12-inductive-data-types/output/typescript/package.json delete mode 100644 examples/12-inductive-data-types/output/typescript/pnpm-lock.yaml delete mode 100644 examples/12-inductive-data-types/output/typescript/src/arithmetic.test.ts delete mode 100644 examples/12-inductive-data-types/output/typescript/src/arithmetic.ts delete mode 100644 examples/12-inductive-data-types/output/typescript/src/index.ts delete mode 120000 examples/12-inductive-data-types/output/typescript/tsconfig.json delete mode 100644 examples/12-inductive-data-types/src/arithmetic.hob delete mode 100644 examples/13-inductive-data-types-separate-namespaces/hobgoblin.json5 delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/java/.gitignore delete mode 120000 examples/13-inductive-data-types-separate-namespaces/output/java/pom.xml delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/java/src/test/java/org/zwobble/example/DataTests.java delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/rust/.gitignore delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/rust/Cargo.lock delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/rust/Cargo.toml delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/rust/rust-toolchain.toml delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/a.rs delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/b.rs delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/mod.rs delete mode 100644 examples/13-inductive-data-types-separate-namespaces/output/rust/src/lib.rs delete mode 100644 examples/13-inductive-data-types-separate-namespaces/src/data/a.hob delete mode 100644 examples/13-inductive-data-types-separate-namespaces/src/data/b.hob create mode 100644 examples/13-inductive-data-types/hobgoblin.json5 create mode 100644 examples/13-inductive-data-types/output/java/.gitignore create mode 120000 examples/13-inductive-data-types/output/java/pom.xml create mode 100644 examples/13-inductive-data-types/output/java/src/main/java/org/zwobble/example/Arithmetic.java create mode 100644 examples/13-inductive-data-types/output/java/src/test/java/org/zwobble/example/ArithmeticTests.java create mode 100644 examples/13-inductive-data-types/output/rust/.gitignore create mode 100644 examples/13-inductive-data-types/output/rust/Cargo.lock create mode 100644 examples/13-inductive-data-types/output/rust/Cargo.toml create mode 100644 examples/13-inductive-data-types/output/rust/rust-toolchain.toml create mode 100644 examples/13-inductive-data-types/output/rust/src/arithmetic.rs create mode 100644 examples/13-inductive-data-types/output/rust/src/lib.rs create mode 100644 examples/13-inductive-data-types/output/typescript/.gitignore create mode 120000 examples/13-inductive-data-types/output/typescript/package.json create mode 100644 examples/13-inductive-data-types/output/typescript/pnpm-lock.yaml create mode 100644 examples/13-inductive-data-types/output/typescript/src/arithmetic.test.ts create mode 100644 examples/13-inductive-data-types/output/typescript/src/arithmetic.ts create mode 100644 examples/13-inductive-data-types/output/typescript/src/index.ts create mode 120000 examples/13-inductive-data-types/output/typescript/tsconfig.json create mode 100644 examples/13-inductive-data-types/src/arithmetic.hob create mode 100644 examples/14-inductive-data-types-separate-namespaces/hobgoblin.json5 create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/java/.gitignore create mode 120000 examples/14-inductive-data-types-separate-namespaces/output/java/pom.xml create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/java/src/test/java/org/zwobble/example/DataTests.java create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/rust/.gitignore create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/rust/Cargo.lock create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/rust/Cargo.toml create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/rust/rust-toolchain.toml create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/a.rs create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/b.rs create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/mod.rs create mode 100644 examples/14-inductive-data-types-separate-namespaces/output/rust/src/lib.rs create mode 100644 examples/14-inductive-data-types-separate-namespaces/src/data/a.hob create mode 100644 examples/14-inductive-data-types-separate-namespaces/src/data/b.hob delete mode 100644 examples/14-struct-generic/hobgoblin.json5 delete mode 100644 examples/14-struct-generic/output/java/.gitignore delete mode 120000 examples/14-struct-generic/output/java/pom.xml delete mode 100644 examples/14-struct-generic/output/java/src/test/java/org/zwobble/example/PointTests.java delete mode 100644 examples/14-struct-generic/output/rust/.gitignore delete mode 100644 examples/14-struct-generic/output/rust/Cargo.lock delete mode 100644 examples/14-struct-generic/output/rust/Cargo.toml delete mode 100644 examples/14-struct-generic/output/rust/rust-toolchain.toml delete mode 100644 examples/14-struct-generic/output/rust/src/lib.rs delete mode 100644 examples/14-struct-generic/output/rust/src/point.rs delete mode 100644 examples/14-struct-generic/output/typescript/.gitignore delete mode 120000 examples/14-struct-generic/output/typescript/package.json delete mode 100644 examples/14-struct-generic/output/typescript/pnpm-lock.yaml delete mode 100644 examples/14-struct-generic/output/typescript/src/point.test.ts delete mode 100644 examples/14-struct-generic/output/typescript/src/point.ts delete mode 120000 examples/14-struct-generic/output/typescript/tsconfig.json delete mode 100644 examples/14-struct-generic/src/point.hob delete mode 100644 examples/15-native-type-generic/hobgoblin.json5 delete mode 100644 examples/15-native-type-generic/output/java/.gitignore delete mode 120000 examples/15-native-type-generic/output/java/pom.xml delete mode 100644 examples/15-native-type-generic/output/java/src/main/java/org/zwobble/example/types/map/HobgoblinNativeMap.java delete mode 100644 examples/15-native-type-generic/output/java/src/test/java/org/zwobble/example/MapTests.java delete mode 100644 examples/15-native-type-generic/output/rust/.gitignore delete mode 100644 examples/15-native-type-generic/output/rust/Cargo.lock delete mode 100644 examples/15-native-type-generic/output/rust/Cargo.toml delete mode 100644 examples/15-native-type-generic/output/rust/rust-toolchain.toml delete mode 100644 examples/15-native-type-generic/output/rust/src/gen/map.rs delete mode 100644 examples/15-native-type-generic/output/rust/src/lib.rs delete mode 100644 examples/15-native-type-generic/output/rust/src/map.rs delete mode 100644 examples/15-native-type-generic/output/typescript/.gitignore delete mode 120000 examples/15-native-type-generic/output/typescript/package.json delete mode 100644 examples/15-native-type-generic/output/typescript/pnpm-lock.yaml delete mode 100644 examples/15-native-type-generic/output/typescript/src/map.test.ts delete mode 100644 examples/15-native-type-generic/output/typescript/src/map.ts delete mode 120000 examples/15-native-type-generic/output/typescript/tsconfig.json delete mode 100644 examples/15-native-type-generic/src/map.hob create mode 100644 examples/15-struct-generic/hobgoblin.json5 create mode 100644 examples/15-struct-generic/output/java/.gitignore create mode 120000 examples/15-struct-generic/output/java/pom.xml create mode 100644 examples/15-struct-generic/output/java/src/test/java/org/zwobble/example/PointTests.java create mode 100644 examples/15-struct-generic/output/rust/.gitignore create mode 100644 examples/15-struct-generic/output/rust/Cargo.lock create mode 100644 examples/15-struct-generic/output/rust/Cargo.toml create mode 100644 examples/15-struct-generic/output/rust/rust-toolchain.toml create mode 100644 examples/15-struct-generic/output/rust/src/lib.rs create mode 100644 examples/15-struct-generic/output/rust/src/point.rs create mode 100644 examples/15-struct-generic/output/typescript/.gitignore create mode 120000 examples/15-struct-generic/output/typescript/package.json create mode 100644 examples/15-struct-generic/output/typescript/pnpm-lock.yaml create mode 100644 examples/15-struct-generic/output/typescript/src/point.test.ts create mode 100644 examples/15-struct-generic/output/typescript/src/point.ts create mode 120000 examples/15-struct-generic/output/typescript/tsconfig.json create mode 100644 examples/15-struct-generic/src/point.hob create mode 100644 examples/16-native-type-generic/hobgoblin.json5 create mode 100644 examples/16-native-type-generic/output/java/.gitignore create mode 120000 examples/16-native-type-generic/output/java/pom.xml create mode 100644 examples/16-native-type-generic/output/java/src/main/java/org/zwobble/example/types/map/HobgoblinNativeMap.java create mode 100644 examples/16-native-type-generic/output/java/src/test/java/org/zwobble/example/MapTests.java create mode 100644 examples/16-native-type-generic/output/rust/.gitignore create mode 100644 examples/16-native-type-generic/output/rust/Cargo.lock create mode 100644 examples/16-native-type-generic/output/rust/Cargo.toml create mode 100644 examples/16-native-type-generic/output/rust/rust-toolchain.toml create mode 100644 examples/16-native-type-generic/output/rust/src/gen/map.rs create mode 100644 examples/16-native-type-generic/output/rust/src/lib.rs create mode 100644 examples/16-native-type-generic/output/rust/src/map.rs create mode 100644 examples/16-native-type-generic/output/typescript/.gitignore create mode 120000 examples/16-native-type-generic/output/typescript/package.json create mode 100644 examples/16-native-type-generic/output/typescript/pnpm-lock.yaml create mode 100644 examples/16-native-type-generic/output/typescript/src/map.test.ts create mode 100644 examples/16-native-type-generic/output/typescript/src/map.ts create mode 120000 examples/16-native-type-generic/output/typescript/tsconfig.json create mode 100644 examples/16-native-type-generic/src/map.hob delete mode 100644 examples/16-transient-0/hobgoblin.json5 delete mode 100644 examples/16-transient-0/output/java/.gitignore delete mode 120000 examples/16-transient-0/output/java/pom.xml delete mode 100644 examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/GenericNative.java delete mode 100644 examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/HobgoblinNativeData.java delete mode 100644 examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/Native.java delete mode 100644 examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java delete mode 100644 examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Decoder.java delete mode 100644 examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Encoder.java delete mode 100644 examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0Builtins.java delete mode 100644 examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0TaggedSharedValue.java delete mode 100644 examples/16-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java delete mode 100644 examples/16-transient-0/output/rust/.gitignore delete mode 100644 examples/16-transient-0/output/rust/Cargo.lock delete mode 100644 examples/16-transient-0/output/rust/Cargo.toml delete mode 100644 examples/16-transient-0/output/rust/rust-toolchain.toml delete mode 100644 examples/16-transient-0/output/rust/src/data.rs delete mode 100644 examples/16-transient-0/output/rust/src/gen/data.rs delete mode 100644 examples/16-transient-0/output/rust/src/gen/data/transient_0.rs delete mode 100644 examples/16-transient-0/output/rust/src/gen/transient_0.rs delete mode 100644 examples/16-transient-0/output/rust/src/lib.rs delete mode 100644 examples/16-transient-0/output/rust/src/transient_0.rs delete mode 100644 examples/16-transient-0/src/data.hob create mode 100644 examples/17-transient-0/hobgoblin.json5 create mode 100644 examples/17-transient-0/output/java/.gitignore create mode 120000 examples/17-transient-0/output/java/pom.xml create mode 100644 examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/GenericNative.java create mode 100644 examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/HobgoblinNativeData.java create mode 100644 examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/Native.java create mode 100644 examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java create mode 100644 examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Decoder.java create mode 100644 examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Encoder.java create mode 100644 examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0Builtins.java create mode 100644 examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0TaggedSharedValue.java create mode 100644 examples/17-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java create mode 100644 examples/17-transient-0/output/rust/.gitignore create mode 100644 examples/17-transient-0/output/rust/Cargo.lock create mode 100644 examples/17-transient-0/output/rust/Cargo.toml create mode 100644 examples/17-transient-0/output/rust/rust-toolchain.toml create mode 100644 examples/17-transient-0/output/rust/src/data.rs create mode 100644 examples/17-transient-0/output/rust/src/gen/data.rs create mode 100644 examples/17-transient-0/output/rust/src/gen/data/transient_0.rs create mode 100644 examples/17-transient-0/output/rust/src/gen/transient_0.rs create mode 100644 examples/17-transient-0/output/rust/src/lib.rs create mode 100644 examples/17-transient-0/output/rust/src/transient_0.rs create mode 100644 examples/17-transient-0/src/data.hob diff --git a/examples/10-option/hobgoblin.json5 b/examples/10-option/hobgoblin.json5 new file mode 100644 index 0000000..eac8d4a --- /dev/null +++ b/examples/10-option/hobgoblin.json5 @@ -0,0 +1,23 @@ +{ + outputs: { + langs: { + java: { + packageName: "org.zwobble.example.types", + }, + }, + generators: [ + { + generator: "java-types", + path: "output/java/src/gen/java", + }, + { + generator: "rust-types", + path: "output/rust/src", + }, + { + generator: "typescript-types", + path: "output/typescript/src", + }, + ], + }, +} diff --git a/examples/10-option/output/java/.gitignore b/examples/10-option/output/java/.gitignore new file mode 100644 index 0000000..ff511d4 --- /dev/null +++ b/examples/10-option/output/java/.gitignore @@ -0,0 +1,2 @@ +/src/gen/ +/target/ diff --git a/examples/10-option/output/java/pom.xml b/examples/10-option/output/java/pom.xml new file mode 120000 index 0000000..445fa65 --- /dev/null +++ b/examples/10-option/output/java/pom.xml @@ -0,0 +1 @@ +../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/10-option/output/java/src/test/java/org/zwobble/example/PointTests.java b/examples/10-option/output/java/src/test/java/org/zwobble/example/PointTests.java new file mode 100644 index 0000000..b1f0ccb --- /dev/null +++ b/examples/10-option/output/java/src/test/java/org/zwobble/example/PointTests.java @@ -0,0 +1,32 @@ +package org.zwobble.example; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import java.util.List; +import java.util.Optional; +import org.zwobble.example.types.point.Line; +import org.zwobble.example.types.point.Point; + +public class PointTests { + @Test + public void canCreateLineWithConstructor() { + var line = new Line( + Optional.of(new Point(10, 25)), + Optional.of(42) + ); + + assertEquals(line.start().get().x(), 10); + assertEquals(line.length().get(), 42); + } + + @Test + public void canCreateLineWithBuilder() { + var line = Line.arbitrary() + .withStart(new Point(10, 25)) + .withLength(42) + .build(); + + assertEquals(line.start().get().x(), 10); + assertEquals(line.length().get(), 42); + } +} diff --git a/examples/10-option/output/rust/.gitignore b/examples/10-option/output/rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/examples/10-option/output/rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/examples/10-option/output/rust/Cargo.lock b/examples/10-option/output/rust/Cargo.lock new file mode 100644 index 0000000..9dc6e3e --- /dev/null +++ b/examples/10-option/output/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "example" +version = "0.1.0" diff --git a/examples/10-option/output/rust/Cargo.toml b/examples/10-option/output/rust/Cargo.toml new file mode 100644 index 0000000..5d4c622 --- /dev/null +++ b/examples/10-option/output/rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "example" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/examples/10-option/output/rust/rust-toolchain.toml b/examples/10-option/output/rust/rust-toolchain.toml new file mode 100644 index 0000000..4fedb95 --- /dev/null +++ b/examples/10-option/output/rust/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.96" diff --git a/examples/10-option/output/rust/src/lib.rs b/examples/10-option/output/rust/src/lib.rs new file mode 100644 index 0000000..7a41573 --- /dev/null +++ b/examples/10-option/output/rust/src/lib.rs @@ -0,0 +1,14 @@ +mod point; + +#[cfg(test)] +mod test { + use super::point::{Line, Point}; + + #[test] + fn can_create_line_directly() { + let line = Line { + start: Some(Point { x: 10, y: 25 }), + length: Some(42), + }; + } +} diff --git a/examples/10-option/output/rust/src/point.rs b/examples/10-option/output/rust/src/point.rs new file mode 100644 index 0000000..7f481f8 --- /dev/null +++ b/examples/10-option/output/rust/src/point.rs @@ -0,0 +1,13 @@ +// Generated by hobgoblin. + +#[derive(Clone, Debug, PartialEq)] +pub struct Line { + pub start: ::std::option::Option::, + pub length: ::std::option::Option::<::core::primitive::i32>, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct Point { + pub x: ::core::primitive::i32, + pub y: ::core::primitive::i32, +} diff --git a/examples/10-option/output/typescript/.gitignore b/examples/10-option/output/typescript/.gitignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/examples/10-option/output/typescript/.gitignore @@ -0,0 +1 @@ +/node_modules diff --git a/examples/10-option/output/typescript/package.json b/examples/10-option/output/typescript/package.json new file mode 120000 index 0000000..0bc7349 --- /dev/null +++ b/examples/10-option/output/typescript/package.json @@ -0,0 +1 @@ +../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/10-option/output/typescript/pnpm-lock.yaml b/examples/10-option/output/typescript/pnpm-lock.yaml new file mode 100644 index 0000000..f5404e5 --- /dev/null +++ b/examples/10-option/output/typescript/pnpm-lock.yaml @@ -0,0 +1,834 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@types/mocha': + specifier: ^10.0.10 + version: 10.0.10 + '@types/node': + specifier: ^26.4.0 + version: 26.6.2 + mocha: + specifier: ^11.8.0 + version: 11.8.0 + typescript: + specifier: ^7.0.2 + version: 7.0.2 + +packages: + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@types/mocha@10.0.10': + resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} + + '@types/node@26.6.2': + resolution: {integrity: sha512-X1P21scMv4zGKLYqjdGjaKa7COa0RKVYYZZN/NfvLQ1JegxFhdhpZG/Lyn8AXx6CDUavKAd11v6BvfpkDByK8g==} + + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.3.0: + resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@2.1.7: + resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} + + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + + diff@7.0.0: + resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} + engines: {node: '>=0.3.1'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + mocha@11.8.0: + resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + + undici-types@8.9.0: + resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + workerpool@9.3.4: + resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@types/mocha@10.0.10': {} + + '@types/node@26.6.2': + dependencies: + undici-types: 8.9.0 + + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + ansi-regex@5.0.1: {} + + ansi-regex@6.3.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.3: {} + + argparse@2.0.1: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.1.7: + dependencies: + balanced-match: 1.0.2 + + browser-stdout@1.3.1: {} + + camelcase@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} + + diff@7.0.0: {} + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat@5.0.2: {} + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + get-caller-file@2.0.5: {} + + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + has-flag@4.0.0: {} + + he@1.2.0: {} + + is-fullwidth-code-point@3.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-obj@2.1.0: {} + + is-unicode-supported@0.1.0: {} + + isexe@2.0.0: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + lru-cache@10.4.3: {} + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.7 + + minipass@7.1.3: {} + + mocha@11.8.0: + dependencies: + browser-stdout: 1.3.1 + chokidar: 4.0.3 + debug: 4.4.3(supports-color@8.1.1) + diff: 7.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 10.5.0 + he: 1.2.0 + is-path-inside: 3.0.3 + js-yaml: 4.3.2 + log-symbols: 4.1.0 + minimatch: 9.0.9 + ms: 2.1.3 + picocolors: 1.1.1 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 9.3.4 + yargs: 17.7.3 + yargs-parser: 21.1.1 + yargs-unparser: 2.0.0 + + ms@2.1.3: {} + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + package-json-from-dist@1.0.1: {} + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + + picocolors@1.1.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@4.1.2: {} + + require-directory@2.1.1: {} + + safe-buffer@5.2.1: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@4.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.3.0 + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + + undici-types@8.9.0: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + workerpool@9.3.4: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@17.7.3: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} diff --git a/examples/10-option/output/typescript/src/point.test.ts b/examples/10-option/output/typescript/src/point.test.ts new file mode 100644 index 0000000..3a39407 --- /dev/null +++ b/examples/10-option/output/typescript/src/point.test.ts @@ -0,0 +1,12 @@ +import * as assert from "node:assert"; + +import {test} from "mocha"; + +import {Line, Point} from "./point.ts"; + +test("can create line with constructor", () => { + const line = new Line(new Point(10, 25), 42); + + assert.strictEqual(line.start!.x, 10); + assert.strictEqual(line.length, 42); +}); diff --git a/examples/10-option/output/typescript/src/point.ts b/examples/10-option/output/typescript/src/point.ts new file mode 100644 index 0000000..a6c6135 --- /dev/null +++ b/examples/10-option/output/typescript/src/point.ts @@ -0,0 +1,39 @@ +// Generated by hobgoblin. + +// Custom area start: imports +// Custom area end: imports + +class Line { + public readonly start: Point | null; + + public readonly length: number | null; + + public constructor(start: Point | null, length: number | null) { + this.start = start; + this.length = length; + } + + // Custom area start: Line, body + // Custom area end: Line, body +} + +export {Line}; + +class Point { + public readonly x: number; + + public readonly y: number; + + public constructor(x: number, y: number) { + this.x = x; + this.y = y; + } + + // Custom area start: Point, body + // Custom area end: Point, body +} + +export {Point}; + +// Custom area start: body +// Custom area end: body diff --git a/examples/10-option/output/typescript/tsconfig.json b/examples/10-option/output/typescript/tsconfig.json new file mode 120000 index 0000000..3c7cb2a --- /dev/null +++ b/examples/10-option/output/typescript/tsconfig.json @@ -0,0 +1 @@ +../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/10-option/src/point.hob b/examples/10-option/src/point.hob new file mode 100644 index 0000000..c144d2e --- /dev/null +++ b/examples/10-option/src/point.hob @@ -0,0 +1,9 @@ +struct Line { + field start: Option[Point]; + field length: Option[Int32]; +} + +struct Point { + field x: Int32; + field y: Int32; +} diff --git a/examples/10-shared/hobgoblin.json5 b/examples/10-shared/hobgoblin.json5 deleted file mode 100644 index 19e0f93..0000000 --- a/examples/10-shared/hobgoblin.json5 +++ /dev/null @@ -1,23 +0,0 @@ -{ - outputs: { - langs: { - java: { - packageName: "org.zwobble.example.types", - }, - }, - generators: [ - { - generator: "java-types", - path: "output/java/src/gen/java", - }, - { - generator: "java-precisely-matchers", - path: "output/java/src/gen/java", - }, - { - generator: "rust-types", - path: "output/rust/src", - }, - ], - } -} diff --git a/examples/10-shared/output/java/.gitignore b/examples/10-shared/output/java/.gitignore deleted file mode 100644 index ff511d4..0000000 --- a/examples/10-shared/output/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/src/gen/ -/target/ diff --git a/examples/10-shared/output/java/pom.xml b/examples/10-shared/output/java/pom.xml deleted file mode 120000 index 445fa65..0000000 --- a/examples/10-shared/output/java/pom.xml +++ /dev/null @@ -1 +0,0 @@ -../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/10-shared/output/java/src/test/java/org/zwobble/example/PointTests.java b/examples/10-shared/output/java/src/test/java/org/zwobble/example/PointTests.java deleted file mode 100644 index b4c140d..0000000 --- a/examples/10-shared/output/java/src/test/java/org/zwobble/example/PointTests.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.zwobble.example; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.jupiter.api.Test; -import org.zwobble.example.types.point.Line; -import org.zwobble.example.types.point.Point; - -public class PointTests { - @Test - public void line() { - var point = new Point(10, 25); - var line = new Line(point, point); - assertEquals(line.start().x(), 10); - } -} diff --git a/examples/10-shared/output/rust/.gitignore b/examples/10-shared/output/rust/.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/examples/10-shared/output/rust/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/examples/10-shared/output/rust/Cargo.lock b/examples/10-shared/output/rust/Cargo.lock deleted file mode 100644 index 9dc6e3e..0000000 --- a/examples/10-shared/output/rust/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "example" -version = "0.1.0" diff --git a/examples/10-shared/output/rust/Cargo.toml b/examples/10-shared/output/rust/Cargo.toml deleted file mode 100644 index 5d4c622..0000000 --- a/examples/10-shared/output/rust/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "example" -version = "0.1.0" -edition = "2024" - -[dependencies] diff --git a/examples/10-shared/output/rust/rust-toolchain.toml b/examples/10-shared/output/rust/rust-toolchain.toml deleted file mode 100644 index 4fedb95..0000000 --- a/examples/10-shared/output/rust/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "1.96" diff --git a/examples/10-shared/output/rust/src/lib.rs b/examples/10-shared/output/rust/src/lib.rs deleted file mode 100644 index af2c87f..0000000 --- a/examples/10-shared/output/rust/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -mod point; - -#[cfg(test)] -mod test { - use std::sync::Arc; - use super::point::{Line, Point}; - - #[test] - fn line() { - let point = Arc::new(Point { x: 10, y: 25 }); - let line = Line { start: Arc::clone(&point), end: point }; - assert_eq!(line.start.x, 10); - } -} diff --git a/examples/10-shared/output/rust/src/point.rs b/examples/10-shared/output/rust/src/point.rs deleted file mode 100644 index 82df631..0000000 --- a/examples/10-shared/output/rust/src/point.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Generated by hobgoblin. - -/// A straight line from one point to another. -#[derive(Clone, Debug, PartialEq)] -pub struct Line { - pub start: ::std::sync::Arc::, - pub end: ::std::sync::Arc::, -} - -/// A 2D point. -#[derive(Clone, Debug, PartialEq)] -pub struct Point { - pub x: ::core::primitive::i32, - pub y: ::core::primitive::i32, -} diff --git a/examples/10-shared/output/typescript/.gitignore b/examples/10-shared/output/typescript/.gitignore deleted file mode 100644 index 07e6e47..0000000 --- a/examples/10-shared/output/typescript/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/examples/10-shared/output/typescript/package.json b/examples/10-shared/output/typescript/package.json deleted file mode 120000 index 0bc7349..0000000 --- a/examples/10-shared/output/typescript/package.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/10-shared/output/typescript/pnpm-lock.yaml b/examples/10-shared/output/typescript/pnpm-lock.yaml deleted file mode 100644 index 016d629..0000000 --- a/examples/10-shared/output/typescript/pnpm-lock.yaml +++ /dev/null @@ -1,834 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@types/mocha': - specifier: ^10.0.10 - version: 10.0.10 - '@types/node': - specifier: ^26.4.0 - version: 26.4.1 - mocha: - specifier: ^11.8.0 - version: 11.8.0 - typescript: - specifier: ^7.0.2 - version: 7.0.2 - -packages: - - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - - '@types/mocha@10.0.10': - resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} - - '@types/node@26.4.1': - resolution: {integrity: sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==} - - '@typescript/typescript-aix-ppc64@7.0.2': - resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [aix] - - '@typescript/typescript-darwin-arm64@7.0.2': - resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [darwin] - - '@typescript/typescript-darwin-x64@7.0.2': - resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [darwin] - - '@typescript/typescript-freebsd-arm64@7.0.2': - resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [freebsd] - - '@typescript/typescript-freebsd-x64@7.0.2': - resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [freebsd] - - '@typescript/typescript-linux-arm64@7.0.2': - resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [linux] - - '@typescript/typescript-linux-arm@7.0.2': - resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} - engines: {node: '>=16.20.0'} - cpu: [arm] - os: [linux] - - '@typescript/typescript-linux-loong64@7.0.2': - resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} - engines: {node: '>=16.20.0'} - cpu: [loong64] - os: [linux] - - '@typescript/typescript-linux-mips64el@7.0.2': - resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} - engines: {node: '>=16.20.0'} - cpu: [mips64el] - os: [linux] - - '@typescript/typescript-linux-ppc64@7.0.2': - resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [linux] - - '@typescript/typescript-linux-riscv64@7.0.2': - resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} - engines: {node: '>=16.20.0'} - cpu: [riscv64] - os: [linux] - - '@typescript/typescript-linux-s390x@7.0.2': - resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} - engines: {node: '>=16.20.0'} - cpu: [s390x] - os: [linux] - - '@typescript/typescript-linux-x64@7.0.2': - resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [linux] - - '@typescript/typescript-netbsd-arm64@7.0.2': - resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [netbsd] - - '@typescript/typescript-netbsd-x64@7.0.2': - resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [netbsd] - - '@typescript/typescript-openbsd-arm64@7.0.2': - resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [openbsd] - - '@typescript/typescript-openbsd-x64@7.0.2': - resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [openbsd] - - '@typescript/typescript-sunos-x64@7.0.2': - resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [sunos] - - '@typescript/typescript-win32-arm64@7.0.2': - resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [win32] - - '@typescript/typescript-win32-x64@7.0.2': - resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [win32] - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.3.0: - resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} - engines: {node: '>=12'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - ansi-styles@6.2.3: - resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} - engines: {node: '>=12'} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - brace-expansion@2.1.4: - resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} - - browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} - - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} - - debug@4.4.3: - resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - - diff@7.0.0: - resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} - engines: {node: '>=0.3.1'} - - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - - foreground-child@3.3.1: - resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} - engines: {node: '>=14'} - - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - glob@10.5.0: - resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - hasBin: true - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - - js-yaml@4.3.2: - resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} - hasBin: true - - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - - minimatch@9.0.9: - resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} - engines: {node: '>=16 || 14 >=14.17'} - - minipass@7.1.3: - resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} - engines: {node: '>=16 || 14 >=14.17'} - - mocha@11.8.0: - resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - - readdirp@4.1.2: - resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} - engines: {node: '>= 14.18.0'} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-ansi@7.2.0: - resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} - engines: {node: '>=12'} - - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - - typescript@7.0.2: - resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} - engines: {node: '>=16.20.0'} - hasBin: true - - undici-types@8.3.0: - resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - workerpool@9.3.4: - resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - - yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - - yargs@17.7.3: - resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} - engines: {node: '>=12'} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - -snapshots: - - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.2.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 - - '@pkgjs/parseargs@0.11.0': - optional: true - - '@types/mocha@10.0.10': {} - - '@types/node@26.4.1': - dependencies: - undici-types: 8.3.0 - - '@typescript/typescript-aix-ppc64@7.0.2': - optional: true - - '@typescript/typescript-darwin-arm64@7.0.2': - optional: true - - '@typescript/typescript-darwin-x64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-x64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm@7.0.2': - optional: true - - '@typescript/typescript-linux-loong64@7.0.2': - optional: true - - '@typescript/typescript-linux-mips64el@7.0.2': - optional: true - - '@typescript/typescript-linux-ppc64@7.0.2': - optional: true - - '@typescript/typescript-linux-riscv64@7.0.2': - optional: true - - '@typescript/typescript-linux-s390x@7.0.2': - optional: true - - '@typescript/typescript-linux-x64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-sunos-x64@7.0.2': - optional: true - - '@typescript/typescript-win32-arm64@7.0.2': - optional: true - - '@typescript/typescript-win32-x64@7.0.2': - optional: true - - ansi-regex@5.0.1: {} - - ansi-regex@6.3.0: {} - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - ansi-styles@6.2.3: {} - - argparse@2.0.1: {} - - balanced-match@1.0.2: {} - - brace-expansion@2.1.4: - dependencies: - balanced-match: 1.0.2 - - browser-stdout@1.3.1: {} - - camelcase@6.3.0: {} - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - chokidar@4.0.3: - dependencies: - readdirp: 4.1.2 - - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - - cross-spawn@7.0.6: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - debug@4.4.3(supports-color@8.1.1): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - decamelize@4.0.0: {} - - diff@7.0.0: {} - - eastasianwidth@0.2.0: {} - - emoji-regex@8.0.0: {} - - emoji-regex@9.2.2: {} - - escalade@3.2.0: {} - - escape-string-regexp@4.0.0: {} - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat@5.0.2: {} - - foreground-child@3.3.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - - get-caller-file@2.0.5: {} - - glob@10.5.0: - dependencies: - foreground-child: 3.3.1 - jackspeak: 3.4.3 - minimatch: 9.0.9 - minipass: 7.1.3 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - - has-flag@4.0.0: {} - - he@1.2.0: {} - - is-fullwidth-code-point@3.0.0: {} - - is-path-inside@3.0.3: {} - - is-plain-obj@2.1.0: {} - - is-unicode-supported@0.1.0: {} - - isexe@2.0.0: {} - - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - - js-yaml@4.3.2: - dependencies: - argparse: 2.0.1 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - log-symbols@4.1.0: - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - - lru-cache@10.4.3: {} - - minimatch@9.0.9: - dependencies: - brace-expansion: 2.1.4 - - minipass@7.1.3: {} - - mocha@11.8.0: - dependencies: - browser-stdout: 1.3.1 - chokidar: 4.0.3 - debug: 4.4.3(supports-color@8.1.1) - diff: 7.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 10.5.0 - he: 1.2.0 - is-path-inside: 3.0.3 - js-yaml: 4.3.2 - log-symbols: 4.1.0 - minimatch: 9.0.9 - ms: 2.1.3 - picocolors: 1.1.1 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 9.3.4 - yargs: 17.7.3 - yargs-parser: 21.1.1 - yargs-unparser: 2.0.0 - - ms@2.1.3: {} - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - package-json-from-dist@1.0.1: {} - - path-exists@4.0.0: {} - - path-key@3.1.1: {} - - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.3 - - picocolors@1.1.1: {} - - randombytes@2.1.0: - dependencies: - safe-buffer: 5.2.1 - - readdirp@4.1.2: {} - - require-directory@2.1.1: {} - - safe-buffer@5.2.1: {} - - serialize-javascript@6.0.2: - dependencies: - randombytes: 2.1.0 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@3.0.0: {} - - signal-exit@4.1.0: {} - - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.2.0 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-ansi@7.2.0: - dependencies: - ansi-regex: 6.3.0 - - strip-json-comments@3.1.1: {} - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - - typescript@7.0.2: - optionalDependencies: - '@typescript/typescript-aix-ppc64': 7.0.2 - '@typescript/typescript-darwin-arm64': 7.0.2 - '@typescript/typescript-darwin-x64': 7.0.2 - '@typescript/typescript-freebsd-arm64': 7.0.2 - '@typescript/typescript-freebsd-x64': 7.0.2 - '@typescript/typescript-linux-arm': 7.0.2 - '@typescript/typescript-linux-arm64': 7.0.2 - '@typescript/typescript-linux-loong64': 7.0.2 - '@typescript/typescript-linux-mips64el': 7.0.2 - '@typescript/typescript-linux-ppc64': 7.0.2 - '@typescript/typescript-linux-riscv64': 7.0.2 - '@typescript/typescript-linux-s390x': 7.0.2 - '@typescript/typescript-linux-x64': 7.0.2 - '@typescript/typescript-netbsd-arm64': 7.0.2 - '@typescript/typescript-netbsd-x64': 7.0.2 - '@typescript/typescript-openbsd-arm64': 7.0.2 - '@typescript/typescript-openbsd-x64': 7.0.2 - '@typescript/typescript-sunos-x64': 7.0.2 - '@typescript/typescript-win32-arm64': 7.0.2 - '@typescript/typescript-win32-x64': 7.0.2 - - undici-types@8.3.0: {} - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - workerpool@9.3.4: {} - - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.3 - string-width: 5.1.2 - strip-ansi: 7.2.0 - - y18n@5.0.8: {} - - yargs-parser@21.1.1: {} - - yargs-unparser@2.0.0: - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - - yargs@17.7.3: - dependencies: - cliui: 8.0.1 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - - yocto-queue@0.1.0: {} diff --git a/examples/10-shared/output/typescript/src/point.test.ts b/examples/10-shared/output/typescript/src/point.test.ts deleted file mode 100644 index 46fc446..0000000 --- a/examples/10-shared/output/typescript/src/point.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import * as assert from "node:assert"; - -import {test} from "mocha"; - -import {Line, Point} from "./point.ts"; - -test("line fields", () => { - const point = new Point(10, 25); - const line = new Line(point, point); - assert.strictEqual(line.start.x, 10); -}); diff --git a/examples/10-shared/output/typescript/src/point.ts b/examples/10-shared/output/typescript/src/point.ts deleted file mode 100644 index fccae01..0000000 --- a/examples/10-shared/output/typescript/src/point.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by hobgoblin. - -/** - * A straight line from one point to another. - */ -class Line { - public readonly start: Point; - - public readonly end: Point; - - public constructor(start: Point, end: Point) { - this.start = start; - this.end = end; - } -} - -export {Line}; - -/** - * A 2D point. - */ -class Point { - public readonly x: number; - - public readonly y: number; - - public constructor(x: number, y: number) { - this.x = x; - this.y = y; - } -} - -export {Point}; diff --git a/examples/10-shared/output/typescript/tsconfig.json b/examples/10-shared/output/typescript/tsconfig.json deleted file mode 120000 index 3c7cb2a..0000000 --- a/examples/10-shared/output/typescript/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/10-shared/src/point.hob b/examples/10-shared/src/point.hob deleted file mode 100644 index 7b9a8e6..0000000 --- a/examples/10-shared/src/point.hob +++ /dev/null @@ -1,11 +0,0 @@ -/// A straight line from one point to another. -struct Line { - field start: Shared[Point]; - field end: Shared[Point]; -} - -/// A 2D point. -struct Point { - field x: Int32; - field y: Int32; -} diff --git a/examples/11-imports/hobgoblin.json5 b/examples/11-imports/hobgoblin.json5 deleted file mode 100644 index d3f8c79..0000000 --- a/examples/11-imports/hobgoblin.json5 +++ /dev/null @@ -1,23 +0,0 @@ -{ - outputs: { - langs: { - java: { - packageName: "org.zwobble.example.types", - }, - }, - generators: [ - { - generator: "java-types", - path: "output/java/src/gen/java", - }, - { - generator: "rust-types", - path: "output/rust/src", - }, - { - generator: "typescript-types", - path: "output/typescript/src", - } - ], - }, -} diff --git a/examples/11-imports/output/java/.gitignore b/examples/11-imports/output/java/.gitignore deleted file mode 100644 index ff511d4..0000000 --- a/examples/11-imports/output/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/src/gen/ -/target/ diff --git a/examples/11-imports/output/java/pom.xml b/examples/11-imports/output/java/pom.xml deleted file mode 120000 index 445fa65..0000000 --- a/examples/11-imports/output/java/pom.xml +++ /dev/null @@ -1 +0,0 @@ -../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/11-imports/output/java/src/test/java/org/zwobble/example/LineTests.java b/examples/11-imports/output/java/src/test/java/org/zwobble/example/LineTests.java deleted file mode 100644 index c376b19..0000000 --- a/examples/11-imports/output/java/src/test/java/org/zwobble/example/LineTests.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.zwobble.example; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.jupiter.api.Test; -import org.zwobble.example.types.line.Line; -import org.zwobble.example.types.point.Point; - -public class LineTests { - @Test - public void canConstructLine() { - Point start = new Point(10, 25); - Point end = new Point(25, 10); - Line line = new Line(start, end); - } -} diff --git a/examples/11-imports/output/rust/.gitignore b/examples/11-imports/output/rust/.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/examples/11-imports/output/rust/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/examples/11-imports/output/rust/Cargo.lock b/examples/11-imports/output/rust/Cargo.lock deleted file mode 100644 index 9dc6e3e..0000000 --- a/examples/11-imports/output/rust/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "example" -version = "0.1.0" diff --git a/examples/11-imports/output/rust/Cargo.toml b/examples/11-imports/output/rust/Cargo.toml deleted file mode 100644 index 5d4c622..0000000 --- a/examples/11-imports/output/rust/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "example" -version = "0.1.0" -edition = "2024" - -[dependencies] diff --git a/examples/11-imports/output/rust/rust-toolchain.toml b/examples/11-imports/output/rust/rust-toolchain.toml deleted file mode 100644 index 4fedb95..0000000 --- a/examples/11-imports/output/rust/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "1.96" diff --git a/examples/11-imports/output/rust/src/lib.rs b/examples/11-imports/output/rust/src/lib.rs deleted file mode 100644 index ffbcbf4..0000000 --- a/examples/11-imports/output/rust/src/lib.rs +++ /dev/null @@ -1,15 +0,0 @@ -mod line; -mod point; - -#[cfg(test)] -mod test { - use super::line::Line; - use super::point::Point; - - #[test] - fn can_construct_line() { - let start = Point { x: 10, y: 25 }; - let end = Point { x: 10, y: 25 }; - let line = Line { start, end }; - } -} diff --git a/examples/11-imports/output/rust/src/line.rs b/examples/11-imports/output/rust/src/line.rs deleted file mode 100644 index ec51f56..0000000 --- a/examples/11-imports/output/rust/src/line.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Generated by hobgoblin. - -/// A straight line from one point to another. -#[derive(Clone, Debug, PartialEq)] -pub struct Line { - pub start: crate::point::Point, - pub end: crate::point::Point, -} diff --git a/examples/11-imports/output/rust/src/point.rs b/examples/11-imports/output/rust/src/point.rs deleted file mode 100644 index 22f5389..0000000 --- a/examples/11-imports/output/rust/src/point.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Generated by hobgoblin. - -/// A 2D point. -#[derive(Clone, Debug, PartialEq)] -pub struct Point { - pub x: ::core::primitive::i32, - pub y: ::core::primitive::i32, -} diff --git a/examples/11-imports/output/typescript/.gitignore b/examples/11-imports/output/typescript/.gitignore deleted file mode 100644 index 07e6e47..0000000 --- a/examples/11-imports/output/typescript/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/examples/11-imports/output/typescript/package.json b/examples/11-imports/output/typescript/package.json deleted file mode 120000 index 0bc7349..0000000 --- a/examples/11-imports/output/typescript/package.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/11-imports/output/typescript/pnpm-lock.yaml b/examples/11-imports/output/typescript/pnpm-lock.yaml deleted file mode 100644 index b29cfae..0000000 --- a/examples/11-imports/output/typescript/pnpm-lock.yaml +++ /dev/null @@ -1,834 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@types/mocha': - specifier: ^10.0.10 - version: 10.0.10 - '@types/node': - specifier: ^26.4.0 - version: 26.6.1 - mocha: - specifier: ^11.8.0 - version: 11.8.0 - typescript: - specifier: ^7.0.2 - version: 7.0.2 - -packages: - - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - - '@types/mocha@10.0.10': - resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} - - '@types/node@26.6.1': - resolution: {integrity: sha512-VqGJBMCtdhqkBUCcBLvywI0NJ+KLuVzgNnlBUNFOQjqVxzo2lxLUNg1DSey8+u2u6ktswSAxg+s68QLzWHNOuA==} - - '@typescript/typescript-aix-ppc64@7.0.2': - resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [aix] - - '@typescript/typescript-darwin-arm64@7.0.2': - resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [darwin] - - '@typescript/typescript-darwin-x64@7.0.2': - resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [darwin] - - '@typescript/typescript-freebsd-arm64@7.0.2': - resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [freebsd] - - '@typescript/typescript-freebsd-x64@7.0.2': - resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [freebsd] - - '@typescript/typescript-linux-arm64@7.0.2': - resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [linux] - - '@typescript/typescript-linux-arm@7.0.2': - resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} - engines: {node: '>=16.20.0'} - cpu: [arm] - os: [linux] - - '@typescript/typescript-linux-loong64@7.0.2': - resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} - engines: {node: '>=16.20.0'} - cpu: [loong64] - os: [linux] - - '@typescript/typescript-linux-mips64el@7.0.2': - resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} - engines: {node: '>=16.20.0'} - cpu: [mips64el] - os: [linux] - - '@typescript/typescript-linux-ppc64@7.0.2': - resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [linux] - - '@typescript/typescript-linux-riscv64@7.0.2': - resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} - engines: {node: '>=16.20.0'} - cpu: [riscv64] - os: [linux] - - '@typescript/typescript-linux-s390x@7.0.2': - resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} - engines: {node: '>=16.20.0'} - cpu: [s390x] - os: [linux] - - '@typescript/typescript-linux-x64@7.0.2': - resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [linux] - - '@typescript/typescript-netbsd-arm64@7.0.2': - resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [netbsd] - - '@typescript/typescript-netbsd-x64@7.0.2': - resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [netbsd] - - '@typescript/typescript-openbsd-arm64@7.0.2': - resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [openbsd] - - '@typescript/typescript-openbsd-x64@7.0.2': - resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [openbsd] - - '@typescript/typescript-sunos-x64@7.0.2': - resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [sunos] - - '@typescript/typescript-win32-arm64@7.0.2': - resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [win32] - - '@typescript/typescript-win32-x64@7.0.2': - resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [win32] - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.3.0: - resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} - engines: {node: '>=12'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - ansi-styles@6.2.3: - resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} - engines: {node: '>=12'} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - brace-expansion@2.1.7: - resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} - - browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} - - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} - - debug@4.4.3: - resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - - diff@7.0.0: - resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} - engines: {node: '>=0.3.1'} - - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - - foreground-child@3.3.1: - resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} - engines: {node: '>=14'} - - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - glob@10.5.0: - resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - hasBin: true - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - - js-yaml@4.3.2: - resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} - hasBin: true - - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - - minimatch@9.0.9: - resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} - engines: {node: '>=16 || 14 >=14.17'} - - minipass@7.1.3: - resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} - engines: {node: '>=16 || 14 >=14.17'} - - mocha@11.8.0: - resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - - readdirp@4.1.2: - resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} - engines: {node: '>= 14.18.0'} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-ansi@7.2.0: - resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} - engines: {node: '>=12'} - - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - - typescript@7.0.2: - resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} - engines: {node: '>=16.20.0'} - hasBin: true - - undici-types@8.9.0: - resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==} - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - workerpool@9.3.4: - resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - - yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - - yargs@17.7.3: - resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} - engines: {node: '>=12'} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - -snapshots: - - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.2.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 - - '@pkgjs/parseargs@0.11.0': - optional: true - - '@types/mocha@10.0.10': {} - - '@types/node@26.6.1': - dependencies: - undici-types: 8.9.0 - - '@typescript/typescript-aix-ppc64@7.0.2': - optional: true - - '@typescript/typescript-darwin-arm64@7.0.2': - optional: true - - '@typescript/typescript-darwin-x64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-x64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm@7.0.2': - optional: true - - '@typescript/typescript-linux-loong64@7.0.2': - optional: true - - '@typescript/typescript-linux-mips64el@7.0.2': - optional: true - - '@typescript/typescript-linux-ppc64@7.0.2': - optional: true - - '@typescript/typescript-linux-riscv64@7.0.2': - optional: true - - '@typescript/typescript-linux-s390x@7.0.2': - optional: true - - '@typescript/typescript-linux-x64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-sunos-x64@7.0.2': - optional: true - - '@typescript/typescript-win32-arm64@7.0.2': - optional: true - - '@typescript/typescript-win32-x64@7.0.2': - optional: true - - ansi-regex@5.0.1: {} - - ansi-regex@6.3.0: {} - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - ansi-styles@6.2.3: {} - - argparse@2.0.1: {} - - balanced-match@1.0.2: {} - - brace-expansion@2.1.7: - dependencies: - balanced-match: 1.0.2 - - browser-stdout@1.3.1: {} - - camelcase@6.3.0: {} - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - chokidar@4.0.3: - dependencies: - readdirp: 4.1.2 - - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - - cross-spawn@7.0.6: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - debug@4.4.3(supports-color@8.1.1): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - decamelize@4.0.0: {} - - diff@7.0.0: {} - - eastasianwidth@0.2.0: {} - - emoji-regex@8.0.0: {} - - emoji-regex@9.2.2: {} - - escalade@3.2.0: {} - - escape-string-regexp@4.0.0: {} - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat@5.0.2: {} - - foreground-child@3.3.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - - get-caller-file@2.0.5: {} - - glob@10.5.0: - dependencies: - foreground-child: 3.3.1 - jackspeak: 3.4.3 - minimatch: 9.0.9 - minipass: 7.1.3 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - - has-flag@4.0.0: {} - - he@1.2.0: {} - - is-fullwidth-code-point@3.0.0: {} - - is-path-inside@3.0.3: {} - - is-plain-obj@2.1.0: {} - - is-unicode-supported@0.1.0: {} - - isexe@2.0.0: {} - - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - - js-yaml@4.3.2: - dependencies: - argparse: 2.0.1 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - log-symbols@4.1.0: - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - - lru-cache@10.4.3: {} - - minimatch@9.0.9: - dependencies: - brace-expansion: 2.1.7 - - minipass@7.1.3: {} - - mocha@11.8.0: - dependencies: - browser-stdout: 1.3.1 - chokidar: 4.0.3 - debug: 4.4.3(supports-color@8.1.1) - diff: 7.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 10.5.0 - he: 1.2.0 - is-path-inside: 3.0.3 - js-yaml: 4.3.2 - log-symbols: 4.1.0 - minimatch: 9.0.9 - ms: 2.1.3 - picocolors: 1.1.1 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 9.3.4 - yargs: 17.7.3 - yargs-parser: 21.1.1 - yargs-unparser: 2.0.0 - - ms@2.1.3: {} - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - package-json-from-dist@1.0.1: {} - - path-exists@4.0.0: {} - - path-key@3.1.1: {} - - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.3 - - picocolors@1.1.1: {} - - randombytes@2.1.0: - dependencies: - safe-buffer: 5.2.1 - - readdirp@4.1.2: {} - - require-directory@2.1.1: {} - - safe-buffer@5.2.1: {} - - serialize-javascript@6.0.2: - dependencies: - randombytes: 2.1.0 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@3.0.0: {} - - signal-exit@4.1.0: {} - - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.2.0 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-ansi@7.2.0: - dependencies: - ansi-regex: 6.3.0 - - strip-json-comments@3.1.1: {} - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - - typescript@7.0.2: - optionalDependencies: - '@typescript/typescript-aix-ppc64': 7.0.2 - '@typescript/typescript-darwin-arm64': 7.0.2 - '@typescript/typescript-darwin-x64': 7.0.2 - '@typescript/typescript-freebsd-arm64': 7.0.2 - '@typescript/typescript-freebsd-x64': 7.0.2 - '@typescript/typescript-linux-arm': 7.0.2 - '@typescript/typescript-linux-arm64': 7.0.2 - '@typescript/typescript-linux-loong64': 7.0.2 - '@typescript/typescript-linux-mips64el': 7.0.2 - '@typescript/typescript-linux-ppc64': 7.0.2 - '@typescript/typescript-linux-riscv64': 7.0.2 - '@typescript/typescript-linux-s390x': 7.0.2 - '@typescript/typescript-linux-x64': 7.0.2 - '@typescript/typescript-netbsd-arm64': 7.0.2 - '@typescript/typescript-netbsd-x64': 7.0.2 - '@typescript/typescript-openbsd-arm64': 7.0.2 - '@typescript/typescript-openbsd-x64': 7.0.2 - '@typescript/typescript-sunos-x64': 7.0.2 - '@typescript/typescript-win32-arm64': 7.0.2 - '@typescript/typescript-win32-x64': 7.0.2 - - undici-types@8.9.0: {} - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - workerpool@9.3.4: {} - - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.3 - string-width: 5.1.2 - strip-ansi: 7.2.0 - - y18n@5.0.8: {} - - yargs-parser@21.1.1: {} - - yargs-unparser@2.0.0: - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - - yargs@17.7.3: - dependencies: - cliui: 8.0.1 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - - yocto-queue@0.1.0: {} diff --git a/examples/11-imports/output/typescript/src/line.test.ts b/examples/11-imports/output/typescript/src/line.test.ts deleted file mode 100644 index 9c2fbe6..0000000 --- a/examples/11-imports/output/typescript/src/line.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as assert from "node:assert"; - -import {test} from "mocha"; - -import {Line} from "./line.ts"; -import {Point} from "./point.ts"; - -test("can construct line", () => { - const start = new Point(10, 25); - const end = new Point(25, 10); - const line = new Line(start, end); -}); diff --git a/examples/11-imports/output/typescript/src/line.ts b/examples/11-imports/output/typescript/src/line.ts deleted file mode 100644 index 178e01a..0000000 --- a/examples/11-imports/output/typescript/src/line.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Generated by hobgoblin. - -// Custom area start: imports -// Custom area end: imports - -import {Point as $ns$point$Point} from "./point.ts"; - -/** - * A straight line from one point to another. - */ -class Line { - public readonly start: $ns$point$Point; - - public readonly end: $ns$point$Point; - - public constructor(start: $ns$point$Point, end: $ns$point$Point) { - this.start = start; - this.end = end; - } - - // Custom area start: Line, body - // Custom area end: Line, body -} - -export {Line}; - -// Custom area start: body -// Custom area end: body diff --git a/examples/11-imports/output/typescript/src/point.ts b/examples/11-imports/output/typescript/src/point.ts deleted file mode 100644 index b051211..0000000 --- a/examples/11-imports/output/typescript/src/point.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Generated by hobgoblin. - -// Custom area start: imports -// Custom area end: imports - -/** - * A 2D point. - */ -class Point { - public readonly x: number; - - public readonly y: number; - - public constructor(x: number, y: number) { - this.x = x; - this.y = y; - } - - // Custom area start: Point, body - // Custom area end: Point, body -} - -export {Point}; - -// Custom area start: body -// Custom area end: body diff --git a/examples/11-imports/output/typescript/tsconfig.json b/examples/11-imports/output/typescript/tsconfig.json deleted file mode 120000 index 3c7cb2a..0000000 --- a/examples/11-imports/output/typescript/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/11-imports/src/line.hob b/examples/11-imports/src/line.hob deleted file mode 100644 index 562d77f..0000000 --- a/examples/11-imports/src/line.hob +++ /dev/null @@ -1,7 +0,0 @@ -import {Point} from ./point; - -/// A straight line from one point to another. -struct Line { - field start: Point; - field end: Point; -} diff --git a/examples/11-imports/src/point.hob b/examples/11-imports/src/point.hob deleted file mode 100644 index 87f9953..0000000 --- a/examples/11-imports/src/point.hob +++ /dev/null @@ -1,5 +0,0 @@ -/// A 2D point. -struct Point { - field x: Int32; - field y: Int32; -} diff --git a/examples/11-shared/hobgoblin.json5 b/examples/11-shared/hobgoblin.json5 new file mode 100644 index 0000000..19e0f93 --- /dev/null +++ b/examples/11-shared/hobgoblin.json5 @@ -0,0 +1,23 @@ +{ + outputs: { + langs: { + java: { + packageName: "org.zwobble.example.types", + }, + }, + generators: [ + { + generator: "java-types", + path: "output/java/src/gen/java", + }, + { + generator: "java-precisely-matchers", + path: "output/java/src/gen/java", + }, + { + generator: "rust-types", + path: "output/rust/src", + }, + ], + } +} diff --git a/examples/11-shared/output/java/.gitignore b/examples/11-shared/output/java/.gitignore new file mode 100644 index 0000000..ff511d4 --- /dev/null +++ b/examples/11-shared/output/java/.gitignore @@ -0,0 +1,2 @@ +/src/gen/ +/target/ diff --git a/examples/11-shared/output/java/pom.xml b/examples/11-shared/output/java/pom.xml new file mode 120000 index 0000000..445fa65 --- /dev/null +++ b/examples/11-shared/output/java/pom.xml @@ -0,0 +1 @@ +../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/11-shared/output/java/src/test/java/org/zwobble/example/PointTests.java b/examples/11-shared/output/java/src/test/java/org/zwobble/example/PointTests.java new file mode 100644 index 0000000..b4c140d --- /dev/null +++ b/examples/11-shared/output/java/src/test/java/org/zwobble/example/PointTests.java @@ -0,0 +1,15 @@ +package org.zwobble.example; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import org.zwobble.example.types.point.Line; +import org.zwobble.example.types.point.Point; + +public class PointTests { + @Test + public void line() { + var point = new Point(10, 25); + var line = new Line(point, point); + assertEquals(line.start().x(), 10); + } +} diff --git a/examples/11-shared/output/rust/.gitignore b/examples/11-shared/output/rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/examples/11-shared/output/rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/examples/11-shared/output/rust/Cargo.lock b/examples/11-shared/output/rust/Cargo.lock new file mode 100644 index 0000000..9dc6e3e --- /dev/null +++ b/examples/11-shared/output/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "example" +version = "0.1.0" diff --git a/examples/11-shared/output/rust/Cargo.toml b/examples/11-shared/output/rust/Cargo.toml new file mode 100644 index 0000000..5d4c622 --- /dev/null +++ b/examples/11-shared/output/rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "example" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/examples/11-shared/output/rust/rust-toolchain.toml b/examples/11-shared/output/rust/rust-toolchain.toml new file mode 100644 index 0000000..4fedb95 --- /dev/null +++ b/examples/11-shared/output/rust/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.96" diff --git a/examples/11-shared/output/rust/src/lib.rs b/examples/11-shared/output/rust/src/lib.rs new file mode 100644 index 0000000..af2c87f --- /dev/null +++ b/examples/11-shared/output/rust/src/lib.rs @@ -0,0 +1,14 @@ +mod point; + +#[cfg(test)] +mod test { + use std::sync::Arc; + use super::point::{Line, Point}; + + #[test] + fn line() { + let point = Arc::new(Point { x: 10, y: 25 }); + let line = Line { start: Arc::clone(&point), end: point }; + assert_eq!(line.start.x, 10); + } +} diff --git a/examples/11-shared/output/rust/src/point.rs b/examples/11-shared/output/rust/src/point.rs new file mode 100644 index 0000000..82df631 --- /dev/null +++ b/examples/11-shared/output/rust/src/point.rs @@ -0,0 +1,15 @@ +// Generated by hobgoblin. + +/// A straight line from one point to another. +#[derive(Clone, Debug, PartialEq)] +pub struct Line { + pub start: ::std::sync::Arc::, + pub end: ::std::sync::Arc::, +} + +/// A 2D point. +#[derive(Clone, Debug, PartialEq)] +pub struct Point { + pub x: ::core::primitive::i32, + pub y: ::core::primitive::i32, +} diff --git a/examples/11-shared/output/typescript/.gitignore b/examples/11-shared/output/typescript/.gitignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/examples/11-shared/output/typescript/.gitignore @@ -0,0 +1 @@ +/node_modules diff --git a/examples/11-shared/output/typescript/package.json b/examples/11-shared/output/typescript/package.json new file mode 120000 index 0000000..0bc7349 --- /dev/null +++ b/examples/11-shared/output/typescript/package.json @@ -0,0 +1 @@ +../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/11-shared/output/typescript/pnpm-lock.yaml b/examples/11-shared/output/typescript/pnpm-lock.yaml new file mode 100644 index 0000000..016d629 --- /dev/null +++ b/examples/11-shared/output/typescript/pnpm-lock.yaml @@ -0,0 +1,834 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@types/mocha': + specifier: ^10.0.10 + version: 10.0.10 + '@types/node': + specifier: ^26.4.0 + version: 26.4.1 + mocha: + specifier: ^11.8.0 + version: 11.8.0 + typescript: + specifier: ^7.0.2 + version: 7.0.2 + +packages: + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@types/mocha@10.0.10': + resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} + + '@types/node@26.4.1': + resolution: {integrity: sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==} + + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.3.0: + resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@2.1.4: + resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} + + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + + diff@7.0.0: + resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} + engines: {node: '>=0.3.1'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + mocha@11.8.0: + resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + + undici-types@8.3.0: + resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + workerpool@9.3.4: + resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@types/mocha@10.0.10': {} + + '@types/node@26.4.1': + dependencies: + undici-types: 8.3.0 + + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + ansi-regex@5.0.1: {} + + ansi-regex@6.3.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.3: {} + + argparse@2.0.1: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.1.4: + dependencies: + balanced-match: 1.0.2 + + browser-stdout@1.3.1: {} + + camelcase@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} + + diff@7.0.0: {} + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat@5.0.2: {} + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + get-caller-file@2.0.5: {} + + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + has-flag@4.0.0: {} + + he@1.2.0: {} + + is-fullwidth-code-point@3.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-obj@2.1.0: {} + + is-unicode-supported@0.1.0: {} + + isexe@2.0.0: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + lru-cache@10.4.3: {} + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.4 + + minipass@7.1.3: {} + + mocha@11.8.0: + dependencies: + browser-stdout: 1.3.1 + chokidar: 4.0.3 + debug: 4.4.3(supports-color@8.1.1) + diff: 7.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 10.5.0 + he: 1.2.0 + is-path-inside: 3.0.3 + js-yaml: 4.3.2 + log-symbols: 4.1.0 + minimatch: 9.0.9 + ms: 2.1.3 + picocolors: 1.1.1 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 9.3.4 + yargs: 17.7.3 + yargs-parser: 21.1.1 + yargs-unparser: 2.0.0 + + ms@2.1.3: {} + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + package-json-from-dist@1.0.1: {} + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + + picocolors@1.1.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@4.1.2: {} + + require-directory@2.1.1: {} + + safe-buffer@5.2.1: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@4.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.3.0 + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + + undici-types@8.3.0: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + workerpool@9.3.4: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@17.7.3: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} diff --git a/examples/11-shared/output/typescript/src/point.test.ts b/examples/11-shared/output/typescript/src/point.test.ts new file mode 100644 index 0000000..46fc446 --- /dev/null +++ b/examples/11-shared/output/typescript/src/point.test.ts @@ -0,0 +1,11 @@ +import * as assert from "node:assert"; + +import {test} from "mocha"; + +import {Line, Point} from "./point.ts"; + +test("line fields", () => { + const point = new Point(10, 25); + const line = new Line(point, point); + assert.strictEqual(line.start.x, 10); +}); diff --git a/examples/11-shared/output/typescript/src/point.ts b/examples/11-shared/output/typescript/src/point.ts new file mode 100644 index 0000000..fccae01 --- /dev/null +++ b/examples/11-shared/output/typescript/src/point.ts @@ -0,0 +1,33 @@ +// Generated by hobgoblin. + +/** + * A straight line from one point to another. + */ +class Line { + public readonly start: Point; + + public readonly end: Point; + + public constructor(start: Point, end: Point) { + this.start = start; + this.end = end; + } +} + +export {Line}; + +/** + * A 2D point. + */ +class Point { + public readonly x: number; + + public readonly y: number; + + public constructor(x: number, y: number) { + this.x = x; + this.y = y; + } +} + +export {Point}; diff --git a/examples/11-shared/output/typescript/tsconfig.json b/examples/11-shared/output/typescript/tsconfig.json new file mode 120000 index 0000000..3c7cb2a --- /dev/null +++ b/examples/11-shared/output/typescript/tsconfig.json @@ -0,0 +1 @@ +../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/11-shared/src/point.hob b/examples/11-shared/src/point.hob new file mode 100644 index 0000000..7b9a8e6 --- /dev/null +++ b/examples/11-shared/src/point.hob @@ -0,0 +1,11 @@ +/// A straight line from one point to another. +struct Line { + field start: Shared[Point]; + field end: Shared[Point]; +} + +/// A 2D point. +struct Point { + field x: Int32; + field y: Int32; +} diff --git a/examples/12-imports/hobgoblin.json5 b/examples/12-imports/hobgoblin.json5 new file mode 100644 index 0000000..d3f8c79 --- /dev/null +++ b/examples/12-imports/hobgoblin.json5 @@ -0,0 +1,23 @@ +{ + outputs: { + langs: { + java: { + packageName: "org.zwobble.example.types", + }, + }, + generators: [ + { + generator: "java-types", + path: "output/java/src/gen/java", + }, + { + generator: "rust-types", + path: "output/rust/src", + }, + { + generator: "typescript-types", + path: "output/typescript/src", + } + ], + }, +} diff --git a/examples/12-imports/output/java/.gitignore b/examples/12-imports/output/java/.gitignore new file mode 100644 index 0000000..ff511d4 --- /dev/null +++ b/examples/12-imports/output/java/.gitignore @@ -0,0 +1,2 @@ +/src/gen/ +/target/ diff --git a/examples/12-imports/output/java/pom.xml b/examples/12-imports/output/java/pom.xml new file mode 120000 index 0000000..445fa65 --- /dev/null +++ b/examples/12-imports/output/java/pom.xml @@ -0,0 +1 @@ +../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/12-imports/output/java/src/test/java/org/zwobble/example/LineTests.java b/examples/12-imports/output/java/src/test/java/org/zwobble/example/LineTests.java new file mode 100644 index 0000000..c376b19 --- /dev/null +++ b/examples/12-imports/output/java/src/test/java/org/zwobble/example/LineTests.java @@ -0,0 +1,15 @@ +package org.zwobble.example; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import org.zwobble.example.types.line.Line; +import org.zwobble.example.types.point.Point; + +public class LineTests { + @Test + public void canConstructLine() { + Point start = new Point(10, 25); + Point end = new Point(25, 10); + Line line = new Line(start, end); + } +} diff --git a/examples/12-imports/output/rust/.gitignore b/examples/12-imports/output/rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/examples/12-imports/output/rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/examples/12-imports/output/rust/Cargo.lock b/examples/12-imports/output/rust/Cargo.lock new file mode 100644 index 0000000..9dc6e3e --- /dev/null +++ b/examples/12-imports/output/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "example" +version = "0.1.0" diff --git a/examples/12-imports/output/rust/Cargo.toml b/examples/12-imports/output/rust/Cargo.toml new file mode 100644 index 0000000..5d4c622 --- /dev/null +++ b/examples/12-imports/output/rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "example" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/examples/12-imports/output/rust/rust-toolchain.toml b/examples/12-imports/output/rust/rust-toolchain.toml new file mode 100644 index 0000000..4fedb95 --- /dev/null +++ b/examples/12-imports/output/rust/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.96" diff --git a/examples/12-imports/output/rust/src/lib.rs b/examples/12-imports/output/rust/src/lib.rs new file mode 100644 index 0000000..ffbcbf4 --- /dev/null +++ b/examples/12-imports/output/rust/src/lib.rs @@ -0,0 +1,15 @@ +mod line; +mod point; + +#[cfg(test)] +mod test { + use super::line::Line; + use super::point::Point; + + #[test] + fn can_construct_line() { + let start = Point { x: 10, y: 25 }; + let end = Point { x: 10, y: 25 }; + let line = Line { start, end }; + } +} diff --git a/examples/12-imports/output/rust/src/line.rs b/examples/12-imports/output/rust/src/line.rs new file mode 100644 index 0000000..ec51f56 --- /dev/null +++ b/examples/12-imports/output/rust/src/line.rs @@ -0,0 +1,8 @@ +// Generated by hobgoblin. + +/// A straight line from one point to another. +#[derive(Clone, Debug, PartialEq)] +pub struct Line { + pub start: crate::point::Point, + pub end: crate::point::Point, +} diff --git a/examples/12-imports/output/rust/src/point.rs b/examples/12-imports/output/rust/src/point.rs new file mode 100644 index 0000000..22f5389 --- /dev/null +++ b/examples/12-imports/output/rust/src/point.rs @@ -0,0 +1,8 @@ +// Generated by hobgoblin. + +/// A 2D point. +#[derive(Clone, Debug, PartialEq)] +pub struct Point { + pub x: ::core::primitive::i32, + pub y: ::core::primitive::i32, +} diff --git a/examples/12-imports/output/typescript/.gitignore b/examples/12-imports/output/typescript/.gitignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/examples/12-imports/output/typescript/.gitignore @@ -0,0 +1 @@ +/node_modules diff --git a/examples/12-imports/output/typescript/package.json b/examples/12-imports/output/typescript/package.json new file mode 120000 index 0000000..0bc7349 --- /dev/null +++ b/examples/12-imports/output/typescript/package.json @@ -0,0 +1 @@ +../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/12-imports/output/typescript/pnpm-lock.yaml b/examples/12-imports/output/typescript/pnpm-lock.yaml new file mode 100644 index 0000000..b29cfae --- /dev/null +++ b/examples/12-imports/output/typescript/pnpm-lock.yaml @@ -0,0 +1,834 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@types/mocha': + specifier: ^10.0.10 + version: 10.0.10 + '@types/node': + specifier: ^26.4.0 + version: 26.6.1 + mocha: + specifier: ^11.8.0 + version: 11.8.0 + typescript: + specifier: ^7.0.2 + version: 7.0.2 + +packages: + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@types/mocha@10.0.10': + resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} + + '@types/node@26.6.1': + resolution: {integrity: sha512-VqGJBMCtdhqkBUCcBLvywI0NJ+KLuVzgNnlBUNFOQjqVxzo2lxLUNg1DSey8+u2u6ktswSAxg+s68QLzWHNOuA==} + + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.3.0: + resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@2.1.7: + resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==} + + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + + diff@7.0.0: + resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} + engines: {node: '>=0.3.1'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + mocha@11.8.0: + resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + + undici-types@8.9.0: + resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + workerpool@9.3.4: + resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@types/mocha@10.0.10': {} + + '@types/node@26.6.1': + dependencies: + undici-types: 8.9.0 + + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + ansi-regex@5.0.1: {} + + ansi-regex@6.3.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.3: {} + + argparse@2.0.1: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.1.7: + dependencies: + balanced-match: 1.0.2 + + browser-stdout@1.3.1: {} + + camelcase@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} + + diff@7.0.0: {} + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat@5.0.2: {} + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + get-caller-file@2.0.5: {} + + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + has-flag@4.0.0: {} + + he@1.2.0: {} + + is-fullwidth-code-point@3.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-obj@2.1.0: {} + + is-unicode-supported@0.1.0: {} + + isexe@2.0.0: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + lru-cache@10.4.3: {} + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.7 + + minipass@7.1.3: {} + + mocha@11.8.0: + dependencies: + browser-stdout: 1.3.1 + chokidar: 4.0.3 + debug: 4.4.3(supports-color@8.1.1) + diff: 7.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 10.5.0 + he: 1.2.0 + is-path-inside: 3.0.3 + js-yaml: 4.3.2 + log-symbols: 4.1.0 + minimatch: 9.0.9 + ms: 2.1.3 + picocolors: 1.1.1 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 9.3.4 + yargs: 17.7.3 + yargs-parser: 21.1.1 + yargs-unparser: 2.0.0 + + ms@2.1.3: {} + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + package-json-from-dist@1.0.1: {} + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + + picocolors@1.1.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@4.1.2: {} + + require-directory@2.1.1: {} + + safe-buffer@5.2.1: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@4.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.3.0 + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + + undici-types@8.9.0: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + workerpool@9.3.4: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@17.7.3: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} diff --git a/examples/12-imports/output/typescript/src/line.test.ts b/examples/12-imports/output/typescript/src/line.test.ts new file mode 100644 index 0000000..9c2fbe6 --- /dev/null +++ b/examples/12-imports/output/typescript/src/line.test.ts @@ -0,0 +1,12 @@ +import * as assert from "node:assert"; + +import {test} from "mocha"; + +import {Line} from "./line.ts"; +import {Point} from "./point.ts"; + +test("can construct line", () => { + const start = new Point(10, 25); + const end = new Point(25, 10); + const line = new Line(start, end); +}); diff --git a/examples/12-imports/output/typescript/src/line.ts b/examples/12-imports/output/typescript/src/line.ts new file mode 100644 index 0000000..178e01a --- /dev/null +++ b/examples/12-imports/output/typescript/src/line.ts @@ -0,0 +1,28 @@ +// Generated by hobgoblin. + +// Custom area start: imports +// Custom area end: imports + +import {Point as $ns$point$Point} from "./point.ts"; + +/** + * A straight line from one point to another. + */ +class Line { + public readonly start: $ns$point$Point; + + public readonly end: $ns$point$Point; + + public constructor(start: $ns$point$Point, end: $ns$point$Point) { + this.start = start; + this.end = end; + } + + // Custom area start: Line, body + // Custom area end: Line, body +} + +export {Line}; + +// Custom area start: body +// Custom area end: body diff --git a/examples/12-imports/output/typescript/src/point.ts b/examples/12-imports/output/typescript/src/point.ts new file mode 100644 index 0000000..b051211 --- /dev/null +++ b/examples/12-imports/output/typescript/src/point.ts @@ -0,0 +1,26 @@ +// Generated by hobgoblin. + +// Custom area start: imports +// Custom area end: imports + +/** + * A 2D point. + */ +class Point { + public readonly x: number; + + public readonly y: number; + + public constructor(x: number, y: number) { + this.x = x; + this.y = y; + } + + // Custom area start: Point, body + // Custom area end: Point, body +} + +export {Point}; + +// Custom area start: body +// Custom area end: body diff --git a/examples/12-imports/output/typescript/tsconfig.json b/examples/12-imports/output/typescript/tsconfig.json new file mode 120000 index 0000000..3c7cb2a --- /dev/null +++ b/examples/12-imports/output/typescript/tsconfig.json @@ -0,0 +1 @@ +../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/12-imports/src/line.hob b/examples/12-imports/src/line.hob new file mode 100644 index 0000000..562d77f --- /dev/null +++ b/examples/12-imports/src/line.hob @@ -0,0 +1,7 @@ +import {Point} from ./point; + +/// A straight line from one point to another. +struct Line { + field start: Point; + field end: Point; +} diff --git a/examples/12-imports/src/point.hob b/examples/12-imports/src/point.hob new file mode 100644 index 0000000..87f9953 --- /dev/null +++ b/examples/12-imports/src/point.hob @@ -0,0 +1,5 @@ +/// A 2D point. +struct Point { + field x: Int32; + field y: Int32; +} diff --git a/examples/12-inductive-data-types/hobgoblin.json5 b/examples/12-inductive-data-types/hobgoblin.json5 deleted file mode 100644 index eac8d4a..0000000 --- a/examples/12-inductive-data-types/hobgoblin.json5 +++ /dev/null @@ -1,23 +0,0 @@ -{ - outputs: { - langs: { - java: { - packageName: "org.zwobble.example.types", - }, - }, - generators: [ - { - generator: "java-types", - path: "output/java/src/gen/java", - }, - { - generator: "rust-types", - path: "output/rust/src", - }, - { - generator: "typescript-types", - path: "output/typescript/src", - }, - ], - }, -} diff --git a/examples/12-inductive-data-types/output/java/.gitignore b/examples/12-inductive-data-types/output/java/.gitignore deleted file mode 100644 index ff511d4..0000000 --- a/examples/12-inductive-data-types/output/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/src/gen/ -/target/ diff --git a/examples/12-inductive-data-types/output/java/pom.xml b/examples/12-inductive-data-types/output/java/pom.xml deleted file mode 120000 index 445fa65..0000000 --- a/examples/12-inductive-data-types/output/java/pom.xml +++ /dev/null @@ -1 +0,0 @@ -../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/12-inductive-data-types/output/java/src/main/java/org/zwobble/example/Arithmetic.java b/examples/12-inductive-data-types/output/java/src/main/java/org/zwobble/example/Arithmetic.java deleted file mode 100644 index 08cb75c..0000000 --- a/examples/12-inductive-data-types/output/java/src/main/java/org/zwobble/example/Arithmetic.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.zwobble.example; - -import org.zwobble.example.types.arithmetic.Add; -import org.zwobble.example.types.arithmetic.Const; -import org.zwobble.example.types.arithmetic.Expression; - -public class Arithmetic { - public static int eval(Expression expression) { - return switch (expression) { - case Add(var left, var right) -> - eval(left) + eval(right); - - case Const(var value) -> - value; - }; - } -} diff --git a/examples/12-inductive-data-types/output/java/src/test/java/org/zwobble/example/ArithmeticTests.java b/examples/12-inductive-data-types/output/java/src/test/java/org/zwobble/example/ArithmeticTests.java deleted file mode 100644 index cd4fdd0..0000000 --- a/examples/12-inductive-data-types/output/java/src/test/java/org/zwobble/example/ArithmeticTests.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.zwobble.example; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.jupiter.api.Test; -import org.zwobble.example.types.arithmetic.Add; -import org.zwobble.example.types.arithmetic.Const; -import org.zwobble.example.types.arithmetic.Expression; - -public class ArithmeticTests { - @Test - public void eval() { - Expression expression = new Add( - new Add( - new Const(42), - new Const(47) - ), - new Const(52) - ); - - int result = Arithmetic.eval(expression); - - assertEquals(result, 141); - } -} diff --git a/examples/12-inductive-data-types/output/rust/.gitignore b/examples/12-inductive-data-types/output/rust/.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/examples/12-inductive-data-types/output/rust/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/examples/12-inductive-data-types/output/rust/Cargo.lock b/examples/12-inductive-data-types/output/rust/Cargo.lock deleted file mode 100644 index 9dc6e3e..0000000 --- a/examples/12-inductive-data-types/output/rust/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "example" -version = "0.1.0" diff --git a/examples/12-inductive-data-types/output/rust/Cargo.toml b/examples/12-inductive-data-types/output/rust/Cargo.toml deleted file mode 100644 index 5d4c622..0000000 --- a/examples/12-inductive-data-types/output/rust/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "example" -version = "0.1.0" -edition = "2024" - -[dependencies] diff --git a/examples/12-inductive-data-types/output/rust/rust-toolchain.toml b/examples/12-inductive-data-types/output/rust/rust-toolchain.toml deleted file mode 100644 index 4fedb95..0000000 --- a/examples/12-inductive-data-types/output/rust/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "1.96" diff --git a/examples/12-inductive-data-types/output/rust/src/arithmetic.rs b/examples/12-inductive-data-types/output/rust/src/arithmetic.rs deleted file mode 100644 index e73fb87..0000000 --- a/examples/12-inductive-data-types/output/rust/src/arithmetic.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Generated by hobgoblin. - -#[derive(Clone, Debug, PartialEq)] -pub enum Expression { - Add(::std::boxed::Box::), - Const(crate::arithmetic::Const), -} - -impl ::std::convert::From:: for crate::arithmetic::Expression { - fn from(value: crate::arithmetic::Add) -> Self { - Self::Add(::std::boxed::Box::new(value)) - } -} - -impl ::std::convert::From:: for crate::arithmetic::Expression { - fn from(value: crate::arithmetic::Const) -> Self { - Self::Const(value) - } -} - -#[derive(Clone, Debug, PartialEq)] -pub struct Add { - pub left: crate::arithmetic::Expression, - pub right: crate::arithmetic::Expression, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct Const { - pub value: ::core::primitive::i32, -} diff --git a/examples/12-inductive-data-types/output/rust/src/lib.rs b/examples/12-inductive-data-types/output/rust/src/lib.rs deleted file mode 100644 index 3265e69..0000000 --- a/examples/12-inductive-data-types/output/rust/src/lib.rs +++ /dev/null @@ -1,33 +0,0 @@ -mod arithmetic; - -use arithmetic::{Const, Expression}; - -fn eval(expression: &Expression) -> i32 { - match expression { - Expression::Add(add) => - eval(&add.left) + eval(&add.right), - - Expression::Const(Const { value }) => - *value, - } -} - -#[cfg(test)] -mod test { - use super::arithmetic::{Add, Const, Expression}; - - #[test] - fn eval() { - let expression: Expression = Add { - left: Add { - left: Const { value: 42 }.into(), - right: Const { value: 47 }.into(), - }.into(), - right: Const { value: 52 }.into(), - }.into(); - - let result = super::eval(&expression); - - assert_eq!(result, 141); - } -} diff --git a/examples/12-inductive-data-types/output/typescript/.gitignore b/examples/12-inductive-data-types/output/typescript/.gitignore deleted file mode 100644 index 07e6e47..0000000 --- a/examples/12-inductive-data-types/output/typescript/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/examples/12-inductive-data-types/output/typescript/package.json b/examples/12-inductive-data-types/output/typescript/package.json deleted file mode 120000 index 0bc7349..0000000 --- a/examples/12-inductive-data-types/output/typescript/package.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/12-inductive-data-types/output/typescript/pnpm-lock.yaml b/examples/12-inductive-data-types/output/typescript/pnpm-lock.yaml deleted file mode 100644 index 016d629..0000000 --- a/examples/12-inductive-data-types/output/typescript/pnpm-lock.yaml +++ /dev/null @@ -1,834 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@types/mocha': - specifier: ^10.0.10 - version: 10.0.10 - '@types/node': - specifier: ^26.4.0 - version: 26.4.1 - mocha: - specifier: ^11.8.0 - version: 11.8.0 - typescript: - specifier: ^7.0.2 - version: 7.0.2 - -packages: - - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - - '@types/mocha@10.0.10': - resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} - - '@types/node@26.4.1': - resolution: {integrity: sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==} - - '@typescript/typescript-aix-ppc64@7.0.2': - resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [aix] - - '@typescript/typescript-darwin-arm64@7.0.2': - resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [darwin] - - '@typescript/typescript-darwin-x64@7.0.2': - resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [darwin] - - '@typescript/typescript-freebsd-arm64@7.0.2': - resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [freebsd] - - '@typescript/typescript-freebsd-x64@7.0.2': - resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [freebsd] - - '@typescript/typescript-linux-arm64@7.0.2': - resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [linux] - - '@typescript/typescript-linux-arm@7.0.2': - resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} - engines: {node: '>=16.20.0'} - cpu: [arm] - os: [linux] - - '@typescript/typescript-linux-loong64@7.0.2': - resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} - engines: {node: '>=16.20.0'} - cpu: [loong64] - os: [linux] - - '@typescript/typescript-linux-mips64el@7.0.2': - resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} - engines: {node: '>=16.20.0'} - cpu: [mips64el] - os: [linux] - - '@typescript/typescript-linux-ppc64@7.0.2': - resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [linux] - - '@typescript/typescript-linux-riscv64@7.0.2': - resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} - engines: {node: '>=16.20.0'} - cpu: [riscv64] - os: [linux] - - '@typescript/typescript-linux-s390x@7.0.2': - resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} - engines: {node: '>=16.20.0'} - cpu: [s390x] - os: [linux] - - '@typescript/typescript-linux-x64@7.0.2': - resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [linux] - - '@typescript/typescript-netbsd-arm64@7.0.2': - resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [netbsd] - - '@typescript/typescript-netbsd-x64@7.0.2': - resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [netbsd] - - '@typescript/typescript-openbsd-arm64@7.0.2': - resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [openbsd] - - '@typescript/typescript-openbsd-x64@7.0.2': - resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [openbsd] - - '@typescript/typescript-sunos-x64@7.0.2': - resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [sunos] - - '@typescript/typescript-win32-arm64@7.0.2': - resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [win32] - - '@typescript/typescript-win32-x64@7.0.2': - resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [win32] - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.3.0: - resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} - engines: {node: '>=12'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - ansi-styles@6.2.3: - resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} - engines: {node: '>=12'} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - brace-expansion@2.1.4: - resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} - - browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} - - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} - - debug@4.4.3: - resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - - diff@7.0.0: - resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} - engines: {node: '>=0.3.1'} - - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - - foreground-child@3.3.1: - resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} - engines: {node: '>=14'} - - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - glob@10.5.0: - resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - hasBin: true - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - - js-yaml@4.3.2: - resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} - hasBin: true - - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - - minimatch@9.0.9: - resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} - engines: {node: '>=16 || 14 >=14.17'} - - minipass@7.1.3: - resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} - engines: {node: '>=16 || 14 >=14.17'} - - mocha@11.8.0: - resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - - readdirp@4.1.2: - resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} - engines: {node: '>= 14.18.0'} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-ansi@7.2.0: - resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} - engines: {node: '>=12'} - - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - - typescript@7.0.2: - resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} - engines: {node: '>=16.20.0'} - hasBin: true - - undici-types@8.3.0: - resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - workerpool@9.3.4: - resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - - yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - - yargs@17.7.3: - resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} - engines: {node: '>=12'} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - -snapshots: - - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.2.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 - - '@pkgjs/parseargs@0.11.0': - optional: true - - '@types/mocha@10.0.10': {} - - '@types/node@26.4.1': - dependencies: - undici-types: 8.3.0 - - '@typescript/typescript-aix-ppc64@7.0.2': - optional: true - - '@typescript/typescript-darwin-arm64@7.0.2': - optional: true - - '@typescript/typescript-darwin-x64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-x64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm@7.0.2': - optional: true - - '@typescript/typescript-linux-loong64@7.0.2': - optional: true - - '@typescript/typescript-linux-mips64el@7.0.2': - optional: true - - '@typescript/typescript-linux-ppc64@7.0.2': - optional: true - - '@typescript/typescript-linux-riscv64@7.0.2': - optional: true - - '@typescript/typescript-linux-s390x@7.0.2': - optional: true - - '@typescript/typescript-linux-x64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-sunos-x64@7.0.2': - optional: true - - '@typescript/typescript-win32-arm64@7.0.2': - optional: true - - '@typescript/typescript-win32-x64@7.0.2': - optional: true - - ansi-regex@5.0.1: {} - - ansi-regex@6.3.0: {} - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - ansi-styles@6.2.3: {} - - argparse@2.0.1: {} - - balanced-match@1.0.2: {} - - brace-expansion@2.1.4: - dependencies: - balanced-match: 1.0.2 - - browser-stdout@1.3.1: {} - - camelcase@6.3.0: {} - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - chokidar@4.0.3: - dependencies: - readdirp: 4.1.2 - - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - - cross-spawn@7.0.6: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - debug@4.4.3(supports-color@8.1.1): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - decamelize@4.0.0: {} - - diff@7.0.0: {} - - eastasianwidth@0.2.0: {} - - emoji-regex@8.0.0: {} - - emoji-regex@9.2.2: {} - - escalade@3.2.0: {} - - escape-string-regexp@4.0.0: {} - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat@5.0.2: {} - - foreground-child@3.3.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - - get-caller-file@2.0.5: {} - - glob@10.5.0: - dependencies: - foreground-child: 3.3.1 - jackspeak: 3.4.3 - minimatch: 9.0.9 - minipass: 7.1.3 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - - has-flag@4.0.0: {} - - he@1.2.0: {} - - is-fullwidth-code-point@3.0.0: {} - - is-path-inside@3.0.3: {} - - is-plain-obj@2.1.0: {} - - is-unicode-supported@0.1.0: {} - - isexe@2.0.0: {} - - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - - js-yaml@4.3.2: - dependencies: - argparse: 2.0.1 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - log-symbols@4.1.0: - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - - lru-cache@10.4.3: {} - - minimatch@9.0.9: - dependencies: - brace-expansion: 2.1.4 - - minipass@7.1.3: {} - - mocha@11.8.0: - dependencies: - browser-stdout: 1.3.1 - chokidar: 4.0.3 - debug: 4.4.3(supports-color@8.1.1) - diff: 7.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 10.5.0 - he: 1.2.0 - is-path-inside: 3.0.3 - js-yaml: 4.3.2 - log-symbols: 4.1.0 - minimatch: 9.0.9 - ms: 2.1.3 - picocolors: 1.1.1 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 9.3.4 - yargs: 17.7.3 - yargs-parser: 21.1.1 - yargs-unparser: 2.0.0 - - ms@2.1.3: {} - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - package-json-from-dist@1.0.1: {} - - path-exists@4.0.0: {} - - path-key@3.1.1: {} - - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.3 - - picocolors@1.1.1: {} - - randombytes@2.1.0: - dependencies: - safe-buffer: 5.2.1 - - readdirp@4.1.2: {} - - require-directory@2.1.1: {} - - safe-buffer@5.2.1: {} - - serialize-javascript@6.0.2: - dependencies: - randombytes: 2.1.0 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@3.0.0: {} - - signal-exit@4.1.0: {} - - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.2.0 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-ansi@7.2.0: - dependencies: - ansi-regex: 6.3.0 - - strip-json-comments@3.1.1: {} - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - - typescript@7.0.2: - optionalDependencies: - '@typescript/typescript-aix-ppc64': 7.0.2 - '@typescript/typescript-darwin-arm64': 7.0.2 - '@typescript/typescript-darwin-x64': 7.0.2 - '@typescript/typescript-freebsd-arm64': 7.0.2 - '@typescript/typescript-freebsd-x64': 7.0.2 - '@typescript/typescript-linux-arm': 7.0.2 - '@typescript/typescript-linux-arm64': 7.0.2 - '@typescript/typescript-linux-loong64': 7.0.2 - '@typescript/typescript-linux-mips64el': 7.0.2 - '@typescript/typescript-linux-ppc64': 7.0.2 - '@typescript/typescript-linux-riscv64': 7.0.2 - '@typescript/typescript-linux-s390x': 7.0.2 - '@typescript/typescript-linux-x64': 7.0.2 - '@typescript/typescript-netbsd-arm64': 7.0.2 - '@typescript/typescript-netbsd-x64': 7.0.2 - '@typescript/typescript-openbsd-arm64': 7.0.2 - '@typescript/typescript-openbsd-x64': 7.0.2 - '@typescript/typescript-sunos-x64': 7.0.2 - '@typescript/typescript-win32-arm64': 7.0.2 - '@typescript/typescript-win32-x64': 7.0.2 - - undici-types@8.3.0: {} - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - workerpool@9.3.4: {} - - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.3 - string-width: 5.1.2 - strip-ansi: 7.2.0 - - y18n@5.0.8: {} - - yargs-parser@21.1.1: {} - - yargs-unparser@2.0.0: - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - - yargs@17.7.3: - dependencies: - cliui: 8.0.1 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - - yocto-queue@0.1.0: {} diff --git a/examples/12-inductive-data-types/output/typescript/src/arithmetic.test.ts b/examples/12-inductive-data-types/output/typescript/src/arithmetic.test.ts deleted file mode 100644 index 7d25224..0000000 --- a/examples/12-inductive-data-types/output/typescript/src/arithmetic.test.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as assert from "node:assert"; - -import {test} from "mocha"; - -import {Add, Const, type Expression} from "./arithmetic.ts"; -import {evalExpression} from "./index.ts"; - -test("eval", () => { - const expression: Expression = new Add( - new Add( - new Const(42), - new Const(47), - ), - new Const(52) - ); - - const result = evalExpression(expression); - - assert.strictEqual(result, 141); -}); diff --git a/examples/12-inductive-data-types/output/typescript/src/arithmetic.ts b/examples/12-inductive-data-types/output/typescript/src/arithmetic.ts deleted file mode 100644 index 486ac66..0000000 --- a/examples/12-inductive-data-types/output/typescript/src/arithmetic.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by hobgoblin. - -// Custom area start: imports -// Custom area end: imports - -type Expression = Add | Const; - -export {type Expression}; - -class Add { - public static readonly $tag = Symbol(); - - public readonly $tag: typeof Add.$tag = Add.$tag; - - public readonly left: Expression; - - public readonly right: Expression; - - public constructor(left: Expression, right: Expression) { - this.left = left; - this.right = right; - } - - // Custom area start: Add, body - // Custom area end: Add, body -} - -export {Add}; - -class Const { - public static readonly $tag = Symbol(); - - public readonly $tag: typeof Const.$tag = Const.$tag; - - public readonly value: number; - - public constructor(value: number) { - this.value = value; - } - - // Custom area start: Const, body - // Custom area end: Const, body -} - -export {Const}; - -// Custom area start: body -// Custom area end: body diff --git a/examples/12-inductive-data-types/output/typescript/src/index.ts b/examples/12-inductive-data-types/output/typescript/src/index.ts deleted file mode 100644 index 8395fea..0000000 --- a/examples/12-inductive-data-types/output/typescript/src/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {Add, Const, type Expression} from "./arithmetic.ts"; - -export function evalExpression(expression: Expression): number { - switch (expression.$tag) { - case Add.$tag: - return evalExpression(expression.left) + evalExpression(expression.right); - - case Const.$tag: - return expression.value; - } -} diff --git a/examples/12-inductive-data-types/output/typescript/tsconfig.json b/examples/12-inductive-data-types/output/typescript/tsconfig.json deleted file mode 120000 index 3c7cb2a..0000000 --- a/examples/12-inductive-data-types/output/typescript/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/12-inductive-data-types/src/arithmetic.hob b/examples/12-inductive-data-types/src/arithmetic.hob deleted file mode 100644 index d3b2051..0000000 --- a/examples/12-inductive-data-types/src/arithmetic.hob +++ /dev/null @@ -1,13 +0,0 @@ -sum Expression { - variant Box[Add]; - variant Const; -} - -struct Add { - field left: Expression; - field right: Expression; -} - -struct Const { - field value: Int32; -} diff --git a/examples/13-inductive-data-types-separate-namespaces/hobgoblin.json5 b/examples/13-inductive-data-types-separate-namespaces/hobgoblin.json5 deleted file mode 100644 index 12713d4..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/hobgoblin.json5 +++ /dev/null @@ -1,19 +0,0 @@ -{ - outputs: { - langs: { - java: { - packageName: "org.zwobble.example.types", - }, - }, - generators: [ - { - generator: "java-types", - path: "output/java/src/gen/java", - }, - { - generator: "rust-types", - path: "output/rust/src", - }, - ], - }, -} diff --git a/examples/13-inductive-data-types-separate-namespaces/output/java/.gitignore b/examples/13-inductive-data-types-separate-namespaces/output/java/.gitignore deleted file mode 100644 index ff511d4..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/src/gen/ -/target/ diff --git a/examples/13-inductive-data-types-separate-namespaces/output/java/pom.xml b/examples/13-inductive-data-types-separate-namespaces/output/java/pom.xml deleted file mode 120000 index 445fa65..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/java/pom.xml +++ /dev/null @@ -1 +0,0 @@ -../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/13-inductive-data-types-separate-namespaces/output/java/src/test/java/org/zwobble/example/DataTests.java b/examples/13-inductive-data-types-separate-namespaces/output/java/src/test/java/org/zwobble/example/DataTests.java deleted file mode 100644 index f01bf0a..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/java/src/test/java/org/zwobble/example/DataTests.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.zwobble.example; - -import java.util.Optional; -import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.jupiter.api.Test; -import org.zwobble.example.types.data.a.A1; -import org.zwobble.example.types.data.b.B; - -public class DataTests { - @Test - public void data() { - var data = new A1(Optional.of(new B(Optional.of(new A1(Optional.empty()))))); - } -} diff --git a/examples/13-inductive-data-types-separate-namespaces/output/rust/.gitignore b/examples/13-inductive-data-types-separate-namespaces/output/rust/.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/rust/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/examples/13-inductive-data-types-separate-namespaces/output/rust/Cargo.lock b/examples/13-inductive-data-types-separate-namespaces/output/rust/Cargo.lock deleted file mode 100644 index 9dc6e3e..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/rust/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "example" -version = "0.1.0" diff --git a/examples/13-inductive-data-types-separate-namespaces/output/rust/Cargo.toml b/examples/13-inductive-data-types-separate-namespaces/output/rust/Cargo.toml deleted file mode 100644 index 5d4c622..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/rust/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "example" -version = "0.1.0" -edition = "2024" - -[dependencies] diff --git a/examples/13-inductive-data-types-separate-namespaces/output/rust/rust-toolchain.toml b/examples/13-inductive-data-types-separate-namespaces/output/rust/rust-toolchain.toml deleted file mode 100644 index 4fedb95..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/rust/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "1.96" diff --git a/examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/a.rs b/examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/a.rs deleted file mode 100644 index 3796251..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/a.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Generated by hobgoblin. - -#[derive(Clone, Debug, PartialEq)] -pub enum A { - A1(::std::boxed::Box::), -} - -impl ::std::convert::From:: for crate::data::a::A { - fn from(value: crate::data::a::A1) -> Self { - Self::A1(::std::boxed::Box::new(value)) - } -} - -#[derive(Clone, Debug, PartialEq)] -pub struct A1 { - pub b: ::std::option::Option::, -} diff --git a/examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/b.rs b/examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/b.rs deleted file mode 100644 index 1968eb3..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/b.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Generated by hobgoblin. - -#[derive(Clone, Debug, PartialEq)] -pub struct B { - pub a: ::std::option::Option::, -} diff --git a/examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/mod.rs b/examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/mod.rs deleted file mode 100644 index 677af14..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/rust/src/data/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod a; -pub mod b; diff --git a/examples/13-inductive-data-types-separate-namespaces/output/rust/src/lib.rs b/examples/13-inductive-data-types-separate-namespaces/output/rust/src/lib.rs deleted file mode 100644 index 01aaddf..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/output/rust/src/lib.rs +++ /dev/null @@ -1,15 +0,0 @@ -mod data; - -#[cfg(test)] -mod test { - use super::data::{a::{A, A1}, b::B}; - - #[test] - fn data() { - let data = A::A1(Box::new(A1 { - b: Some(B { - a: Some(A::A1(Box::new(A1 { b: None }))), - }), - })); - } -} diff --git a/examples/13-inductive-data-types-separate-namespaces/src/data/a.hob b/examples/13-inductive-data-types-separate-namespaces/src/data/a.hob deleted file mode 100644 index e8c02ea..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/src/data/a.hob +++ /dev/null @@ -1,9 +0,0 @@ -import {B} from ./b; - -sum A { - variant Box[A1]; -} - -struct A1 { - field b: Option[B]; -} diff --git a/examples/13-inductive-data-types-separate-namespaces/src/data/b.hob b/examples/13-inductive-data-types-separate-namespaces/src/data/b.hob deleted file mode 100644 index 4d538fc..0000000 --- a/examples/13-inductive-data-types-separate-namespaces/src/data/b.hob +++ /dev/null @@ -1,5 +0,0 @@ -import {A} from ./a; - -struct B { - field a: Option[A]; -} diff --git a/examples/13-inductive-data-types/hobgoblin.json5 b/examples/13-inductive-data-types/hobgoblin.json5 new file mode 100644 index 0000000..eac8d4a --- /dev/null +++ b/examples/13-inductive-data-types/hobgoblin.json5 @@ -0,0 +1,23 @@ +{ + outputs: { + langs: { + java: { + packageName: "org.zwobble.example.types", + }, + }, + generators: [ + { + generator: "java-types", + path: "output/java/src/gen/java", + }, + { + generator: "rust-types", + path: "output/rust/src", + }, + { + generator: "typescript-types", + path: "output/typescript/src", + }, + ], + }, +} diff --git a/examples/13-inductive-data-types/output/java/.gitignore b/examples/13-inductive-data-types/output/java/.gitignore new file mode 100644 index 0000000..ff511d4 --- /dev/null +++ b/examples/13-inductive-data-types/output/java/.gitignore @@ -0,0 +1,2 @@ +/src/gen/ +/target/ diff --git a/examples/13-inductive-data-types/output/java/pom.xml b/examples/13-inductive-data-types/output/java/pom.xml new file mode 120000 index 0000000..445fa65 --- /dev/null +++ b/examples/13-inductive-data-types/output/java/pom.xml @@ -0,0 +1 @@ +../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/13-inductive-data-types/output/java/src/main/java/org/zwobble/example/Arithmetic.java b/examples/13-inductive-data-types/output/java/src/main/java/org/zwobble/example/Arithmetic.java new file mode 100644 index 0000000..08cb75c --- /dev/null +++ b/examples/13-inductive-data-types/output/java/src/main/java/org/zwobble/example/Arithmetic.java @@ -0,0 +1,17 @@ +package org.zwobble.example; + +import org.zwobble.example.types.arithmetic.Add; +import org.zwobble.example.types.arithmetic.Const; +import org.zwobble.example.types.arithmetic.Expression; + +public class Arithmetic { + public static int eval(Expression expression) { + return switch (expression) { + case Add(var left, var right) -> + eval(left) + eval(right); + + case Const(var value) -> + value; + }; + } +} diff --git a/examples/13-inductive-data-types/output/java/src/test/java/org/zwobble/example/ArithmeticTests.java b/examples/13-inductive-data-types/output/java/src/test/java/org/zwobble/example/ArithmeticTests.java new file mode 100644 index 0000000..cd4fdd0 --- /dev/null +++ b/examples/13-inductive-data-types/output/java/src/test/java/org/zwobble/example/ArithmeticTests.java @@ -0,0 +1,24 @@ +package org.zwobble.example; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import org.zwobble.example.types.arithmetic.Add; +import org.zwobble.example.types.arithmetic.Const; +import org.zwobble.example.types.arithmetic.Expression; + +public class ArithmeticTests { + @Test + public void eval() { + Expression expression = new Add( + new Add( + new Const(42), + new Const(47) + ), + new Const(52) + ); + + int result = Arithmetic.eval(expression); + + assertEquals(result, 141); + } +} diff --git a/examples/13-inductive-data-types/output/rust/.gitignore b/examples/13-inductive-data-types/output/rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/examples/13-inductive-data-types/output/rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/examples/13-inductive-data-types/output/rust/Cargo.lock b/examples/13-inductive-data-types/output/rust/Cargo.lock new file mode 100644 index 0000000..9dc6e3e --- /dev/null +++ b/examples/13-inductive-data-types/output/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "example" +version = "0.1.0" diff --git a/examples/13-inductive-data-types/output/rust/Cargo.toml b/examples/13-inductive-data-types/output/rust/Cargo.toml new file mode 100644 index 0000000..5d4c622 --- /dev/null +++ b/examples/13-inductive-data-types/output/rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "example" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/examples/13-inductive-data-types/output/rust/rust-toolchain.toml b/examples/13-inductive-data-types/output/rust/rust-toolchain.toml new file mode 100644 index 0000000..4fedb95 --- /dev/null +++ b/examples/13-inductive-data-types/output/rust/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.96" diff --git a/examples/13-inductive-data-types/output/rust/src/arithmetic.rs b/examples/13-inductive-data-types/output/rust/src/arithmetic.rs new file mode 100644 index 0000000..e73fb87 --- /dev/null +++ b/examples/13-inductive-data-types/output/rust/src/arithmetic.rs @@ -0,0 +1,30 @@ +// Generated by hobgoblin. + +#[derive(Clone, Debug, PartialEq)] +pub enum Expression { + Add(::std::boxed::Box::), + Const(crate::arithmetic::Const), +} + +impl ::std::convert::From:: for crate::arithmetic::Expression { + fn from(value: crate::arithmetic::Add) -> Self { + Self::Add(::std::boxed::Box::new(value)) + } +} + +impl ::std::convert::From:: for crate::arithmetic::Expression { + fn from(value: crate::arithmetic::Const) -> Self { + Self::Const(value) + } +} + +#[derive(Clone, Debug, PartialEq)] +pub struct Add { + pub left: crate::arithmetic::Expression, + pub right: crate::arithmetic::Expression, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct Const { + pub value: ::core::primitive::i32, +} diff --git a/examples/13-inductive-data-types/output/rust/src/lib.rs b/examples/13-inductive-data-types/output/rust/src/lib.rs new file mode 100644 index 0000000..3265e69 --- /dev/null +++ b/examples/13-inductive-data-types/output/rust/src/lib.rs @@ -0,0 +1,33 @@ +mod arithmetic; + +use arithmetic::{Const, Expression}; + +fn eval(expression: &Expression) -> i32 { + match expression { + Expression::Add(add) => + eval(&add.left) + eval(&add.right), + + Expression::Const(Const { value }) => + *value, + } +} + +#[cfg(test)] +mod test { + use super::arithmetic::{Add, Const, Expression}; + + #[test] + fn eval() { + let expression: Expression = Add { + left: Add { + left: Const { value: 42 }.into(), + right: Const { value: 47 }.into(), + }.into(), + right: Const { value: 52 }.into(), + }.into(); + + let result = super::eval(&expression); + + assert_eq!(result, 141); + } +} diff --git a/examples/13-inductive-data-types/output/typescript/.gitignore b/examples/13-inductive-data-types/output/typescript/.gitignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/examples/13-inductive-data-types/output/typescript/.gitignore @@ -0,0 +1 @@ +/node_modules diff --git a/examples/13-inductive-data-types/output/typescript/package.json b/examples/13-inductive-data-types/output/typescript/package.json new file mode 120000 index 0000000..0bc7349 --- /dev/null +++ b/examples/13-inductive-data-types/output/typescript/package.json @@ -0,0 +1 @@ +../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/13-inductive-data-types/output/typescript/pnpm-lock.yaml b/examples/13-inductive-data-types/output/typescript/pnpm-lock.yaml new file mode 100644 index 0000000..016d629 --- /dev/null +++ b/examples/13-inductive-data-types/output/typescript/pnpm-lock.yaml @@ -0,0 +1,834 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@types/mocha': + specifier: ^10.0.10 + version: 10.0.10 + '@types/node': + specifier: ^26.4.0 + version: 26.4.1 + mocha: + specifier: ^11.8.0 + version: 11.8.0 + typescript: + specifier: ^7.0.2 + version: 7.0.2 + +packages: + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@types/mocha@10.0.10': + resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} + + '@types/node@26.4.1': + resolution: {integrity: sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==} + + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.3.0: + resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@2.1.4: + resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} + + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + + diff@7.0.0: + resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} + engines: {node: '>=0.3.1'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + mocha@11.8.0: + resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + + undici-types@8.3.0: + resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + workerpool@9.3.4: + resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@types/mocha@10.0.10': {} + + '@types/node@26.4.1': + dependencies: + undici-types: 8.3.0 + + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + ansi-regex@5.0.1: {} + + ansi-regex@6.3.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.3: {} + + argparse@2.0.1: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.1.4: + dependencies: + balanced-match: 1.0.2 + + browser-stdout@1.3.1: {} + + camelcase@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} + + diff@7.0.0: {} + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat@5.0.2: {} + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + get-caller-file@2.0.5: {} + + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + has-flag@4.0.0: {} + + he@1.2.0: {} + + is-fullwidth-code-point@3.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-obj@2.1.0: {} + + is-unicode-supported@0.1.0: {} + + isexe@2.0.0: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + lru-cache@10.4.3: {} + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.4 + + minipass@7.1.3: {} + + mocha@11.8.0: + dependencies: + browser-stdout: 1.3.1 + chokidar: 4.0.3 + debug: 4.4.3(supports-color@8.1.1) + diff: 7.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 10.5.0 + he: 1.2.0 + is-path-inside: 3.0.3 + js-yaml: 4.3.2 + log-symbols: 4.1.0 + minimatch: 9.0.9 + ms: 2.1.3 + picocolors: 1.1.1 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 9.3.4 + yargs: 17.7.3 + yargs-parser: 21.1.1 + yargs-unparser: 2.0.0 + + ms@2.1.3: {} + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + package-json-from-dist@1.0.1: {} + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + + picocolors@1.1.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@4.1.2: {} + + require-directory@2.1.1: {} + + safe-buffer@5.2.1: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@4.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.3.0 + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + + undici-types@8.3.0: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + workerpool@9.3.4: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@17.7.3: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} diff --git a/examples/13-inductive-data-types/output/typescript/src/arithmetic.test.ts b/examples/13-inductive-data-types/output/typescript/src/arithmetic.test.ts new file mode 100644 index 0000000..7d25224 --- /dev/null +++ b/examples/13-inductive-data-types/output/typescript/src/arithmetic.test.ts @@ -0,0 +1,20 @@ +import * as assert from "node:assert"; + +import {test} from "mocha"; + +import {Add, Const, type Expression} from "./arithmetic.ts"; +import {evalExpression} from "./index.ts"; + +test("eval", () => { + const expression: Expression = new Add( + new Add( + new Const(42), + new Const(47), + ), + new Const(52) + ); + + const result = evalExpression(expression); + + assert.strictEqual(result, 141); +}); diff --git a/examples/13-inductive-data-types/output/typescript/src/arithmetic.ts b/examples/13-inductive-data-types/output/typescript/src/arithmetic.ts new file mode 100644 index 0000000..486ac66 --- /dev/null +++ b/examples/13-inductive-data-types/output/typescript/src/arithmetic.ts @@ -0,0 +1,48 @@ +// Generated by hobgoblin. + +// Custom area start: imports +// Custom area end: imports + +type Expression = Add | Const; + +export {type Expression}; + +class Add { + public static readonly $tag = Symbol(); + + public readonly $tag: typeof Add.$tag = Add.$tag; + + public readonly left: Expression; + + public readonly right: Expression; + + public constructor(left: Expression, right: Expression) { + this.left = left; + this.right = right; + } + + // Custom area start: Add, body + // Custom area end: Add, body +} + +export {Add}; + +class Const { + public static readonly $tag = Symbol(); + + public readonly $tag: typeof Const.$tag = Const.$tag; + + public readonly value: number; + + public constructor(value: number) { + this.value = value; + } + + // Custom area start: Const, body + // Custom area end: Const, body +} + +export {Const}; + +// Custom area start: body +// Custom area end: body diff --git a/examples/13-inductive-data-types/output/typescript/src/index.ts b/examples/13-inductive-data-types/output/typescript/src/index.ts new file mode 100644 index 0000000..8395fea --- /dev/null +++ b/examples/13-inductive-data-types/output/typescript/src/index.ts @@ -0,0 +1,11 @@ +import {Add, Const, type Expression} from "./arithmetic.ts"; + +export function evalExpression(expression: Expression): number { + switch (expression.$tag) { + case Add.$tag: + return evalExpression(expression.left) + evalExpression(expression.right); + + case Const.$tag: + return expression.value; + } +} diff --git a/examples/13-inductive-data-types/output/typescript/tsconfig.json b/examples/13-inductive-data-types/output/typescript/tsconfig.json new file mode 120000 index 0000000..3c7cb2a --- /dev/null +++ b/examples/13-inductive-data-types/output/typescript/tsconfig.json @@ -0,0 +1 @@ +../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/13-inductive-data-types/src/arithmetic.hob b/examples/13-inductive-data-types/src/arithmetic.hob new file mode 100644 index 0000000..d3b2051 --- /dev/null +++ b/examples/13-inductive-data-types/src/arithmetic.hob @@ -0,0 +1,13 @@ +sum Expression { + variant Box[Add]; + variant Const; +} + +struct Add { + field left: Expression; + field right: Expression; +} + +struct Const { + field value: Int32; +} diff --git a/examples/14-inductive-data-types-separate-namespaces/hobgoblin.json5 b/examples/14-inductive-data-types-separate-namespaces/hobgoblin.json5 new file mode 100644 index 0000000..12713d4 --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/hobgoblin.json5 @@ -0,0 +1,19 @@ +{ + outputs: { + langs: { + java: { + packageName: "org.zwobble.example.types", + }, + }, + generators: [ + { + generator: "java-types", + path: "output/java/src/gen/java", + }, + { + generator: "rust-types", + path: "output/rust/src", + }, + ], + }, +} diff --git a/examples/14-inductive-data-types-separate-namespaces/output/java/.gitignore b/examples/14-inductive-data-types-separate-namespaces/output/java/.gitignore new file mode 100644 index 0000000..ff511d4 --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/java/.gitignore @@ -0,0 +1,2 @@ +/src/gen/ +/target/ diff --git a/examples/14-inductive-data-types-separate-namespaces/output/java/pom.xml b/examples/14-inductive-data-types-separate-namespaces/output/java/pom.xml new file mode 120000 index 0000000..445fa65 --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/java/pom.xml @@ -0,0 +1 @@ +../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/14-inductive-data-types-separate-namespaces/output/java/src/test/java/org/zwobble/example/DataTests.java b/examples/14-inductive-data-types-separate-namespaces/output/java/src/test/java/org/zwobble/example/DataTests.java new file mode 100644 index 0000000..f01bf0a --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/java/src/test/java/org/zwobble/example/DataTests.java @@ -0,0 +1,14 @@ +package org.zwobble.example; + +import java.util.Optional; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import org.zwobble.example.types.data.a.A1; +import org.zwobble.example.types.data.b.B; + +public class DataTests { + @Test + public void data() { + var data = new A1(Optional.of(new B(Optional.of(new A1(Optional.empty()))))); + } +} diff --git a/examples/14-inductive-data-types-separate-namespaces/output/rust/.gitignore b/examples/14-inductive-data-types-separate-namespaces/output/rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/examples/14-inductive-data-types-separate-namespaces/output/rust/Cargo.lock b/examples/14-inductive-data-types-separate-namespaces/output/rust/Cargo.lock new file mode 100644 index 0000000..9dc6e3e --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "example" +version = "0.1.0" diff --git a/examples/14-inductive-data-types-separate-namespaces/output/rust/Cargo.toml b/examples/14-inductive-data-types-separate-namespaces/output/rust/Cargo.toml new file mode 100644 index 0000000..5d4c622 --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "example" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/examples/14-inductive-data-types-separate-namespaces/output/rust/rust-toolchain.toml b/examples/14-inductive-data-types-separate-namespaces/output/rust/rust-toolchain.toml new file mode 100644 index 0000000..4fedb95 --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/rust/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.96" diff --git a/examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/a.rs b/examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/a.rs new file mode 100644 index 0000000..3796251 --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/a.rs @@ -0,0 +1,17 @@ +// Generated by hobgoblin. + +#[derive(Clone, Debug, PartialEq)] +pub enum A { + A1(::std::boxed::Box::), +} + +impl ::std::convert::From:: for crate::data::a::A { + fn from(value: crate::data::a::A1) -> Self { + Self::A1(::std::boxed::Box::new(value)) + } +} + +#[derive(Clone, Debug, PartialEq)] +pub struct A1 { + pub b: ::std::option::Option::, +} diff --git a/examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/b.rs b/examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/b.rs new file mode 100644 index 0000000..1968eb3 --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/b.rs @@ -0,0 +1,6 @@ +// Generated by hobgoblin. + +#[derive(Clone, Debug, PartialEq)] +pub struct B { + pub a: ::std::option::Option::, +} diff --git a/examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/mod.rs b/examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/mod.rs new file mode 100644 index 0000000..677af14 --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/rust/src/data/mod.rs @@ -0,0 +1,2 @@ +pub mod a; +pub mod b; diff --git a/examples/14-inductive-data-types-separate-namespaces/output/rust/src/lib.rs b/examples/14-inductive-data-types-separate-namespaces/output/rust/src/lib.rs new file mode 100644 index 0000000..01aaddf --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/output/rust/src/lib.rs @@ -0,0 +1,15 @@ +mod data; + +#[cfg(test)] +mod test { + use super::data::{a::{A, A1}, b::B}; + + #[test] + fn data() { + let data = A::A1(Box::new(A1 { + b: Some(B { + a: Some(A::A1(Box::new(A1 { b: None }))), + }), + })); + } +} diff --git a/examples/14-inductive-data-types-separate-namespaces/src/data/a.hob b/examples/14-inductive-data-types-separate-namespaces/src/data/a.hob new file mode 100644 index 0000000..e8c02ea --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/src/data/a.hob @@ -0,0 +1,9 @@ +import {B} from ./b; + +sum A { + variant Box[A1]; +} + +struct A1 { + field b: Option[B]; +} diff --git a/examples/14-inductive-data-types-separate-namespaces/src/data/b.hob b/examples/14-inductive-data-types-separate-namespaces/src/data/b.hob new file mode 100644 index 0000000..4d538fc --- /dev/null +++ b/examples/14-inductive-data-types-separate-namespaces/src/data/b.hob @@ -0,0 +1,5 @@ +import {A} from ./a; + +struct B { + field a: Option[A]; +} diff --git a/examples/14-struct-generic/hobgoblin.json5 b/examples/14-struct-generic/hobgoblin.json5 deleted file mode 100644 index c7dc903..0000000 --- a/examples/14-struct-generic/hobgoblin.json5 +++ /dev/null @@ -1,27 +0,0 @@ -{ - outputs: { - langs: { - java: { - packageName: "org.zwobble.example.types", - }, - }, - generators: [ - { - generator: "java-types", - path: "output/java/src/gen/java", - }, - { - generator: "java-precisely-matchers", - path: "output/java/src/gen/java", - }, - { - generator: "rust-types", - path: "output/rust/src", - }, - { - generator: "typescript-types", - path: "output/typescript/src", - }, - ], - } -} diff --git a/examples/14-struct-generic/output/java/.gitignore b/examples/14-struct-generic/output/java/.gitignore deleted file mode 100644 index ff511d4..0000000 --- a/examples/14-struct-generic/output/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/src/gen/ -/target/ diff --git a/examples/14-struct-generic/output/java/pom.xml b/examples/14-struct-generic/output/java/pom.xml deleted file mode 120000 index 445fa65..0000000 --- a/examples/14-struct-generic/output/java/pom.xml +++ /dev/null @@ -1 +0,0 @@ -../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/14-struct-generic/output/java/src/test/java/org/zwobble/example/PointTests.java b/examples/14-struct-generic/output/java/src/test/java/org/zwobble/example/PointTests.java deleted file mode 100644 index fba31c7..0000000 --- a/examples/14-struct-generic/output/java/src/test/java/org/zwobble/example/PointTests.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.zwobble.example; - -import org.junit.jupiter.api.Test; -import org.zwobble.example.types.point.Line; -import org.zwobble.example.types.point.LineDrawing; -import org.zwobble.example.types.point.Point2D; - -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.zwobble.example.types.point.LineDrawingMatcher.isLineDrawing; -import static org.zwobble.example.types.point.LineMatcher.isLine; -import static org.zwobble.example.types.point.Point2DMatcher.isPoint2D; -import static org.zwobble.precisely.AssertThat.assertThat; -import static org.zwobble.precisely.Matchers.equalTo; -import static org.zwobble.precisely.Matchers.isSequence; - -public class PointTests { - @Test - public void line() { - var line = new Line<>( - new Point2D(10, 25), - new Point2D(42, 47) - ); - assertEquals(line.start().x(), 10); - assertEquals(line.end().y(), 47); - } - - @Test - public void matchers() { - var lineDrawing = new LineDrawing<>(List.of( - new Line<>(new Point2D(10, 25), new Point2D(42, 47)) - )); - - assertThat(lineDrawing, isLineDrawing() - .withLines(isSequence( - isLine() - .withStart(isPoint2D().withX(equalTo(10)).withY(equalTo(25))) - .withEnd(isPoint2D().withX(equalTo(42)).withY(equalTo(47))) - )) - ); - } -} diff --git a/examples/14-struct-generic/output/rust/.gitignore b/examples/14-struct-generic/output/rust/.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/examples/14-struct-generic/output/rust/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/examples/14-struct-generic/output/rust/Cargo.lock b/examples/14-struct-generic/output/rust/Cargo.lock deleted file mode 100644 index 9dc6e3e..0000000 --- a/examples/14-struct-generic/output/rust/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "example" -version = "0.1.0" diff --git a/examples/14-struct-generic/output/rust/Cargo.toml b/examples/14-struct-generic/output/rust/Cargo.toml deleted file mode 100644 index 5d4c622..0000000 --- a/examples/14-struct-generic/output/rust/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "example" -version = "0.1.0" -edition = "2024" - -[dependencies] diff --git a/examples/14-struct-generic/output/rust/rust-toolchain.toml b/examples/14-struct-generic/output/rust/rust-toolchain.toml deleted file mode 100644 index 4fedb95..0000000 --- a/examples/14-struct-generic/output/rust/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "1.96" diff --git a/examples/14-struct-generic/output/rust/src/lib.rs b/examples/14-struct-generic/output/rust/src/lib.rs deleted file mode 100644 index 75ae1f1..0000000 --- a/examples/14-struct-generic/output/rust/src/lib.rs +++ /dev/null @@ -1,16 +0,0 @@ -mod point; - -#[cfg(test)] -mod test { - use super::point::{Line, Point2D}; - - #[test] - fn line() { - let line = Line { - start: Point2D { x: 10, y: 25 }, - end: Point2D { x: 42, y: 47 }, - }; - assert_eq!(line.start.x, 10); - assert_eq!(line.end.y, 47); - } -} diff --git a/examples/14-struct-generic/output/rust/src/point.rs b/examples/14-struct-generic/output/rust/src/point.rs deleted file mode 100644 index a6c6615..0000000 --- a/examples/14-struct-generic/output/rust/src/point.rs +++ /dev/null @@ -1,41 +0,0 @@ -// Generated by hobgoblin. - -/// A set of drawings. -#[derive(Clone, Debug, PartialEq)] -pub struct OwnedLineDrawing { - pub drawing: crate::point::LineDrawing::, - pub owner: ::std::string::String, -} - -/// A 2D drawing made up of straight lines. -#[derive(Clone, Debug, PartialEq)] -pub struct LineDrawing2D { - pub lines: ::std::vec::Vec::>, -} - -/// A drawing made up of straight lines. -#[derive(Clone, Debug, PartialEq)] -pub struct LineDrawing { - pub lines: ::std::vec::Vec::>, -} - -/// A cubic Bezier curve. -#[derive(Clone, Debug, PartialEq)] -pub struct BezierCurve { - pub start: crate::point::Line::, - pub end: crate::point::Line::, -} - -/// A straight line from one point to another. -#[derive(Clone, Debug, PartialEq)] -pub struct Line { - pub start: TPoint, - pub end: TPoint, -} - -/// A 2D point. -#[derive(Clone, Debug, PartialEq)] -pub struct Point2D { - pub x: ::core::primitive::i32, - pub y: ::core::primitive::i32, -} diff --git a/examples/14-struct-generic/output/typescript/.gitignore b/examples/14-struct-generic/output/typescript/.gitignore deleted file mode 100644 index 07e6e47..0000000 --- a/examples/14-struct-generic/output/typescript/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/examples/14-struct-generic/output/typescript/package.json b/examples/14-struct-generic/output/typescript/package.json deleted file mode 120000 index 0bc7349..0000000 --- a/examples/14-struct-generic/output/typescript/package.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/14-struct-generic/output/typescript/pnpm-lock.yaml b/examples/14-struct-generic/output/typescript/pnpm-lock.yaml deleted file mode 100644 index 016d629..0000000 --- a/examples/14-struct-generic/output/typescript/pnpm-lock.yaml +++ /dev/null @@ -1,834 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@types/mocha': - specifier: ^10.0.10 - version: 10.0.10 - '@types/node': - specifier: ^26.4.0 - version: 26.4.1 - mocha: - specifier: ^11.8.0 - version: 11.8.0 - typescript: - specifier: ^7.0.2 - version: 7.0.2 - -packages: - - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - - '@types/mocha@10.0.10': - resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} - - '@types/node@26.4.1': - resolution: {integrity: sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==} - - '@typescript/typescript-aix-ppc64@7.0.2': - resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [aix] - - '@typescript/typescript-darwin-arm64@7.0.2': - resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [darwin] - - '@typescript/typescript-darwin-x64@7.0.2': - resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [darwin] - - '@typescript/typescript-freebsd-arm64@7.0.2': - resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [freebsd] - - '@typescript/typescript-freebsd-x64@7.0.2': - resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [freebsd] - - '@typescript/typescript-linux-arm64@7.0.2': - resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [linux] - - '@typescript/typescript-linux-arm@7.0.2': - resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} - engines: {node: '>=16.20.0'} - cpu: [arm] - os: [linux] - - '@typescript/typescript-linux-loong64@7.0.2': - resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} - engines: {node: '>=16.20.0'} - cpu: [loong64] - os: [linux] - - '@typescript/typescript-linux-mips64el@7.0.2': - resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} - engines: {node: '>=16.20.0'} - cpu: [mips64el] - os: [linux] - - '@typescript/typescript-linux-ppc64@7.0.2': - resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [linux] - - '@typescript/typescript-linux-riscv64@7.0.2': - resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} - engines: {node: '>=16.20.0'} - cpu: [riscv64] - os: [linux] - - '@typescript/typescript-linux-s390x@7.0.2': - resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} - engines: {node: '>=16.20.0'} - cpu: [s390x] - os: [linux] - - '@typescript/typescript-linux-x64@7.0.2': - resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [linux] - - '@typescript/typescript-netbsd-arm64@7.0.2': - resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [netbsd] - - '@typescript/typescript-netbsd-x64@7.0.2': - resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [netbsd] - - '@typescript/typescript-openbsd-arm64@7.0.2': - resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [openbsd] - - '@typescript/typescript-openbsd-x64@7.0.2': - resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [openbsd] - - '@typescript/typescript-sunos-x64@7.0.2': - resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [sunos] - - '@typescript/typescript-win32-arm64@7.0.2': - resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [win32] - - '@typescript/typescript-win32-x64@7.0.2': - resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [win32] - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.3.0: - resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} - engines: {node: '>=12'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - ansi-styles@6.2.3: - resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} - engines: {node: '>=12'} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - brace-expansion@2.1.4: - resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} - - browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} - - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} - - debug@4.4.3: - resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - - diff@7.0.0: - resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} - engines: {node: '>=0.3.1'} - - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - - foreground-child@3.3.1: - resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} - engines: {node: '>=14'} - - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - glob@10.5.0: - resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - hasBin: true - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - - js-yaml@4.3.2: - resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} - hasBin: true - - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - - minimatch@9.0.9: - resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} - engines: {node: '>=16 || 14 >=14.17'} - - minipass@7.1.3: - resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} - engines: {node: '>=16 || 14 >=14.17'} - - mocha@11.8.0: - resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - - readdirp@4.1.2: - resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} - engines: {node: '>= 14.18.0'} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-ansi@7.2.0: - resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} - engines: {node: '>=12'} - - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - - typescript@7.0.2: - resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} - engines: {node: '>=16.20.0'} - hasBin: true - - undici-types@8.3.0: - resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - workerpool@9.3.4: - resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - - yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - - yargs@17.7.3: - resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} - engines: {node: '>=12'} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - -snapshots: - - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.2.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 - - '@pkgjs/parseargs@0.11.0': - optional: true - - '@types/mocha@10.0.10': {} - - '@types/node@26.4.1': - dependencies: - undici-types: 8.3.0 - - '@typescript/typescript-aix-ppc64@7.0.2': - optional: true - - '@typescript/typescript-darwin-arm64@7.0.2': - optional: true - - '@typescript/typescript-darwin-x64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-x64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm@7.0.2': - optional: true - - '@typescript/typescript-linux-loong64@7.0.2': - optional: true - - '@typescript/typescript-linux-mips64el@7.0.2': - optional: true - - '@typescript/typescript-linux-ppc64@7.0.2': - optional: true - - '@typescript/typescript-linux-riscv64@7.0.2': - optional: true - - '@typescript/typescript-linux-s390x@7.0.2': - optional: true - - '@typescript/typescript-linux-x64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-sunos-x64@7.0.2': - optional: true - - '@typescript/typescript-win32-arm64@7.0.2': - optional: true - - '@typescript/typescript-win32-x64@7.0.2': - optional: true - - ansi-regex@5.0.1: {} - - ansi-regex@6.3.0: {} - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - ansi-styles@6.2.3: {} - - argparse@2.0.1: {} - - balanced-match@1.0.2: {} - - brace-expansion@2.1.4: - dependencies: - balanced-match: 1.0.2 - - browser-stdout@1.3.1: {} - - camelcase@6.3.0: {} - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - chokidar@4.0.3: - dependencies: - readdirp: 4.1.2 - - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - - cross-spawn@7.0.6: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - debug@4.4.3(supports-color@8.1.1): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - decamelize@4.0.0: {} - - diff@7.0.0: {} - - eastasianwidth@0.2.0: {} - - emoji-regex@8.0.0: {} - - emoji-regex@9.2.2: {} - - escalade@3.2.0: {} - - escape-string-regexp@4.0.0: {} - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat@5.0.2: {} - - foreground-child@3.3.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - - get-caller-file@2.0.5: {} - - glob@10.5.0: - dependencies: - foreground-child: 3.3.1 - jackspeak: 3.4.3 - minimatch: 9.0.9 - minipass: 7.1.3 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - - has-flag@4.0.0: {} - - he@1.2.0: {} - - is-fullwidth-code-point@3.0.0: {} - - is-path-inside@3.0.3: {} - - is-plain-obj@2.1.0: {} - - is-unicode-supported@0.1.0: {} - - isexe@2.0.0: {} - - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - - js-yaml@4.3.2: - dependencies: - argparse: 2.0.1 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - log-symbols@4.1.0: - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - - lru-cache@10.4.3: {} - - minimatch@9.0.9: - dependencies: - brace-expansion: 2.1.4 - - minipass@7.1.3: {} - - mocha@11.8.0: - dependencies: - browser-stdout: 1.3.1 - chokidar: 4.0.3 - debug: 4.4.3(supports-color@8.1.1) - diff: 7.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 10.5.0 - he: 1.2.0 - is-path-inside: 3.0.3 - js-yaml: 4.3.2 - log-symbols: 4.1.0 - minimatch: 9.0.9 - ms: 2.1.3 - picocolors: 1.1.1 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 9.3.4 - yargs: 17.7.3 - yargs-parser: 21.1.1 - yargs-unparser: 2.0.0 - - ms@2.1.3: {} - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - package-json-from-dist@1.0.1: {} - - path-exists@4.0.0: {} - - path-key@3.1.1: {} - - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.3 - - picocolors@1.1.1: {} - - randombytes@2.1.0: - dependencies: - safe-buffer: 5.2.1 - - readdirp@4.1.2: {} - - require-directory@2.1.1: {} - - safe-buffer@5.2.1: {} - - serialize-javascript@6.0.2: - dependencies: - randombytes: 2.1.0 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@3.0.0: {} - - signal-exit@4.1.0: {} - - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.2.0 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-ansi@7.2.0: - dependencies: - ansi-regex: 6.3.0 - - strip-json-comments@3.1.1: {} - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - - typescript@7.0.2: - optionalDependencies: - '@typescript/typescript-aix-ppc64': 7.0.2 - '@typescript/typescript-darwin-arm64': 7.0.2 - '@typescript/typescript-darwin-x64': 7.0.2 - '@typescript/typescript-freebsd-arm64': 7.0.2 - '@typescript/typescript-freebsd-x64': 7.0.2 - '@typescript/typescript-linux-arm': 7.0.2 - '@typescript/typescript-linux-arm64': 7.0.2 - '@typescript/typescript-linux-loong64': 7.0.2 - '@typescript/typescript-linux-mips64el': 7.0.2 - '@typescript/typescript-linux-ppc64': 7.0.2 - '@typescript/typescript-linux-riscv64': 7.0.2 - '@typescript/typescript-linux-s390x': 7.0.2 - '@typescript/typescript-linux-x64': 7.0.2 - '@typescript/typescript-netbsd-arm64': 7.0.2 - '@typescript/typescript-netbsd-x64': 7.0.2 - '@typescript/typescript-openbsd-arm64': 7.0.2 - '@typescript/typescript-openbsd-x64': 7.0.2 - '@typescript/typescript-sunos-x64': 7.0.2 - '@typescript/typescript-win32-arm64': 7.0.2 - '@typescript/typescript-win32-x64': 7.0.2 - - undici-types@8.3.0: {} - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - workerpool@9.3.4: {} - - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.3 - string-width: 5.1.2 - strip-ansi: 7.2.0 - - y18n@5.0.8: {} - - yargs-parser@21.1.1: {} - - yargs-unparser@2.0.0: - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - - yargs@17.7.3: - dependencies: - cliui: 8.0.1 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - - yocto-queue@0.1.0: {} diff --git a/examples/14-struct-generic/output/typescript/src/point.test.ts b/examples/14-struct-generic/output/typescript/src/point.test.ts deleted file mode 100644 index 0d59417..0000000 --- a/examples/14-struct-generic/output/typescript/src/point.test.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as assert from "node:assert"; - -import {test} from "mocha"; - -import {Line, LineDrawing, Point2D} from "./point.ts"; - -test("line", () => { - const line = new Line( - new Point2D(10, 25), - new Point2D(42, 47) - ); - assert.strictEqual(line.start.x, 10); - assert.strictEqual(line.end.y, 47); -}); diff --git a/examples/14-struct-generic/output/typescript/src/point.ts b/examples/14-struct-generic/output/typescript/src/point.ts deleted file mode 100644 index f3ecdec..0000000 --- a/examples/14-struct-generic/output/typescript/src/point.ts +++ /dev/null @@ -1,115 +0,0 @@ -// Generated by hobgoblin. - -// Custom area start: imports -// Custom area end: imports - -/** - * A set of drawings. - */ -class OwnedLineDrawing { - public readonly drawing: LineDrawing; - - public readonly owner: String; - - public constructor(drawing: LineDrawing, owner: String) { - this.drawing = drawing; - this.owner = owner; - } - - // Custom area start: OwnedLineDrawing, body - // Custom area end: OwnedLineDrawing, body -} - -export {OwnedLineDrawing}; - -/** - * A 2D drawing made up of straight lines. - */ -class LineDrawing2D { - public readonly lines: ReadonlyArray>; - - public constructor(lines: ReadonlyArray>) { - this.lines = lines; - } - - // Custom area start: LineDrawing2D, body - // Custom area end: LineDrawing2D, body -} - -export {LineDrawing2D}; - -/** - * A drawing made up of straight lines. - */ -class LineDrawing { - public readonly lines: ReadonlyArray>; - - public constructor(lines: ReadonlyArray>) { - this.lines = lines; - } - - // Custom area start: LineDrawing, body - // Custom area end: LineDrawing, body -} - -export {LineDrawing}; - -/** - * A cubic Bezier curve. - */ -class BezierCurve { - public readonly start: Line; - - public readonly end: Line; - - public constructor(start: Line, end: Line) { - this.start = start; - this.end = end; - } - - // Custom area start: BezierCurve, body - // Custom area end: BezierCurve, body -} - -export {BezierCurve}; - -/** - * A straight line from one point to another. - */ -class Line { - public readonly start: TPoint; - - public readonly end: TPoint; - - public constructor(start: TPoint, end: TPoint) { - this.start = start; - this.end = end; - } - - // Custom area start: Line, body - // Custom area end: Line, body -} - -export {Line}; - -/** - * A 2D point. - */ -class Point2D { - public readonly x: number; - - public readonly y: number; - - public constructor(x: number, y: number) { - this.x = x; - this.y = y; - } - - // Custom area start: Point2D, body - // Custom area end: Point2D, body -} - -export {Point2D}; - -// Custom area start: body -// Custom area end: body diff --git a/examples/14-struct-generic/output/typescript/tsconfig.json b/examples/14-struct-generic/output/typescript/tsconfig.json deleted file mode 120000 index 3c7cb2a..0000000 --- a/examples/14-struct-generic/output/typescript/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/14-struct-generic/src/point.hob b/examples/14-struct-generic/src/point.hob deleted file mode 100644 index 5beed86..0000000 --- a/examples/14-struct-generic/src/point.hob +++ /dev/null @@ -1,33 +0,0 @@ -/// A set of drawings. -struct OwnedLineDrawing[TPoint] { - field drawing: LineDrawing[TPoint]; - field owner: String; -} - -/// A 2D drawing made up of straight lines. -struct LineDrawing2D { - field lines: List[Line[Point2D]]; -} - -/// A drawing made up of straight lines. -struct LineDrawing[TPoint] { - field lines: List[Line[TPoint]]; -} - -/// A cubic Bezier curve. -struct BezierCurve[TPoint] { - field start: Line[TPoint]; - field end: Line[TPoint]; -} - -/// A straight line from one point to another. -struct Line[TPoint] { - field start: TPoint; - field end: TPoint; -} - -/// A 2D point. -struct Point2D { - field x: Int32; - field y: Int32; -} diff --git a/examples/15-native-type-generic/hobgoblin.json5 b/examples/15-native-type-generic/hobgoblin.json5 deleted file mode 100644 index 20c767f..0000000 --- a/examples/15-native-type-generic/hobgoblin.json5 +++ /dev/null @@ -1,37 +0,0 @@ -{ - outputs: { - langs: { - java: { - packageName: "org.zwobble.example.types", - nativeTypes: [ - { - hobgoblin: "map.NativeMap", - java: "java.util.Map", - }, - ], - }, - rust: { - nativeTypes: [ - { - hobgoblin: "map.NativeMap", - rust: "::std::collections::BTreeMap", - }, - ], - }, - }, - generators: [ - { - generator: "java-types", - path: "output/java/src/gen/java", - }, - { - generator: "rust-types", - path: "output/rust/src/gen", - }, - { - generator: "typescript-types", - path: "output/typescript/src", - }, - ], - }, -} diff --git a/examples/15-native-type-generic/output/java/.gitignore b/examples/15-native-type-generic/output/java/.gitignore deleted file mode 100644 index ff511d4..0000000 --- a/examples/15-native-type-generic/output/java/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/src/gen/ -/target/ diff --git a/examples/15-native-type-generic/output/java/pom.xml b/examples/15-native-type-generic/output/java/pom.xml deleted file mode 120000 index 445fa65..0000000 --- a/examples/15-native-type-generic/output/java/pom.xml +++ /dev/null @@ -1 +0,0 @@ -../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/15-native-type-generic/output/java/src/main/java/org/zwobble/example/types/map/HobgoblinNativeMap.java b/examples/15-native-type-generic/output/java/src/main/java/org/zwobble/example/types/map/HobgoblinNativeMap.java deleted file mode 100644 index 39fd627..0000000 --- a/examples/15-native-type-generic/output/java/src/main/java/org/zwobble/example/types/map/HobgoblinNativeMap.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.zwobble.example.types.map; - -import java.util.function.Supplier; - -public class HobgoblinNativeMap { - private HobgoblinNativeMap() {} - - public static java.util.Map arbitraryNativeMap( - Supplier supplyK, - Supplier supplyV - ) { - return new java.util.HashMap<>(); - } -} diff --git a/examples/15-native-type-generic/output/java/src/test/java/org/zwobble/example/MapTests.java b/examples/15-native-type-generic/output/java/src/test/java/org/zwobble/example/MapTests.java deleted file mode 100644 index 5b6a764..0000000 --- a/examples/15-native-type-generic/output/java/src/test/java/org/zwobble/example/MapTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.zwobble.example; - -import java.util.Map; -import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.jupiter.api.Test; -import org.zwobble.example.types.map.X; - -public class MapTests { - @Test - public void canUseGenericNativeTypes() { - var x = new X(Map.ofEntries(Map.entry("a", 1), Map.entry("b", 2))); - } -} diff --git a/examples/15-native-type-generic/output/rust/.gitignore b/examples/15-native-type-generic/output/rust/.gitignore deleted file mode 100644 index ea8c4bf..0000000 --- a/examples/15-native-type-generic/output/rust/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/examples/15-native-type-generic/output/rust/Cargo.lock b/examples/15-native-type-generic/output/rust/Cargo.lock deleted file mode 100644 index 9dc6e3e..0000000 --- a/examples/15-native-type-generic/output/rust/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "example" -version = "0.1.0" diff --git a/examples/15-native-type-generic/output/rust/Cargo.toml b/examples/15-native-type-generic/output/rust/Cargo.toml deleted file mode 100644 index 5d4c622..0000000 --- a/examples/15-native-type-generic/output/rust/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "example" -version = "0.1.0" -edition = "2024" - -[dependencies] diff --git a/examples/15-native-type-generic/output/rust/rust-toolchain.toml b/examples/15-native-type-generic/output/rust/rust-toolchain.toml deleted file mode 100644 index 4fedb95..0000000 --- a/examples/15-native-type-generic/output/rust/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "1.96" diff --git a/examples/15-native-type-generic/output/rust/src/gen/map.rs b/examples/15-native-type-generic/output/rust/src/gen/map.rs deleted file mode 100644 index 59fb30f..0000000 --- a/examples/15-native-type-generic/output/rust/src/gen/map.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Generated by hobgoblin. - -#[derive(Clone, Debug, PartialEq)] -pub struct X { - pub map: ::std::collections::BTreeMap::<::std::string::String, ::core::primitive::i32>, -} diff --git a/examples/15-native-type-generic/output/rust/src/lib.rs b/examples/15-native-type-generic/output/rust/src/lib.rs deleted file mode 100644 index b0adf47..0000000 --- a/examples/15-native-type-generic/output/rust/src/lib.rs +++ /dev/null @@ -1,12 +0,0 @@ -mod map; - -#[cfg(test)] -mod test { - use std::collections::BTreeMap; - use super::map::X; - - #[test] - fn can_use_generic_native_types() { - let x = X { map: BTreeMap::from([("a".to_string(), 1), ("b".to_string(), 2)]) }; - } -} diff --git a/examples/15-native-type-generic/output/rust/src/map.rs b/examples/15-native-type-generic/output/rust/src/map.rs deleted file mode 100644 index 3dd0a72..0000000 --- a/examples/15-native-type-generic/output/rust/src/map.rs +++ /dev/null @@ -1 +0,0 @@ -include!("gen/map.rs"); diff --git a/examples/15-native-type-generic/output/typescript/.gitignore b/examples/15-native-type-generic/output/typescript/.gitignore deleted file mode 100644 index 07e6e47..0000000 --- a/examples/15-native-type-generic/output/typescript/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/examples/15-native-type-generic/output/typescript/package.json b/examples/15-native-type-generic/output/typescript/package.json deleted file mode 120000 index 0bc7349..0000000 --- a/examples/15-native-type-generic/output/typescript/package.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/15-native-type-generic/output/typescript/pnpm-lock.yaml b/examples/15-native-type-generic/output/typescript/pnpm-lock.yaml deleted file mode 100644 index 016d629..0000000 --- a/examples/15-native-type-generic/output/typescript/pnpm-lock.yaml +++ /dev/null @@ -1,834 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@types/mocha': - specifier: ^10.0.10 - version: 10.0.10 - '@types/node': - specifier: ^26.4.0 - version: 26.4.1 - mocha: - specifier: ^11.8.0 - version: 11.8.0 - typescript: - specifier: ^7.0.2 - version: 7.0.2 - -packages: - - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - - '@types/mocha@10.0.10': - resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} - - '@types/node@26.4.1': - resolution: {integrity: sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==} - - '@typescript/typescript-aix-ppc64@7.0.2': - resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [aix] - - '@typescript/typescript-darwin-arm64@7.0.2': - resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [darwin] - - '@typescript/typescript-darwin-x64@7.0.2': - resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [darwin] - - '@typescript/typescript-freebsd-arm64@7.0.2': - resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [freebsd] - - '@typescript/typescript-freebsd-x64@7.0.2': - resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [freebsd] - - '@typescript/typescript-linux-arm64@7.0.2': - resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [linux] - - '@typescript/typescript-linux-arm@7.0.2': - resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} - engines: {node: '>=16.20.0'} - cpu: [arm] - os: [linux] - - '@typescript/typescript-linux-loong64@7.0.2': - resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} - engines: {node: '>=16.20.0'} - cpu: [loong64] - os: [linux] - - '@typescript/typescript-linux-mips64el@7.0.2': - resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} - engines: {node: '>=16.20.0'} - cpu: [mips64el] - os: [linux] - - '@typescript/typescript-linux-ppc64@7.0.2': - resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} - engines: {node: '>=16.20.0'} - cpu: [ppc64] - os: [linux] - - '@typescript/typescript-linux-riscv64@7.0.2': - resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} - engines: {node: '>=16.20.0'} - cpu: [riscv64] - os: [linux] - - '@typescript/typescript-linux-s390x@7.0.2': - resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} - engines: {node: '>=16.20.0'} - cpu: [s390x] - os: [linux] - - '@typescript/typescript-linux-x64@7.0.2': - resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [linux] - - '@typescript/typescript-netbsd-arm64@7.0.2': - resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [netbsd] - - '@typescript/typescript-netbsd-x64@7.0.2': - resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [netbsd] - - '@typescript/typescript-openbsd-arm64@7.0.2': - resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [openbsd] - - '@typescript/typescript-openbsd-x64@7.0.2': - resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [openbsd] - - '@typescript/typescript-sunos-x64@7.0.2': - resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [sunos] - - '@typescript/typescript-win32-arm64@7.0.2': - resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} - engines: {node: '>=16.20.0'} - cpu: [arm64] - os: [win32] - - '@typescript/typescript-win32-x64@7.0.2': - resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} - engines: {node: '>=16.20.0'} - cpu: [x64] - os: [win32] - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.3.0: - resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} - engines: {node: '>=12'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - ansi-styles@6.2.3: - resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} - engines: {node: '>=12'} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - brace-expansion@2.1.4: - resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} - - browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - - camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - chokidar@4.0.3: - resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} - engines: {node: '>= 14.16.0'} - - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} - - debug@4.4.3: - resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - - diff@7.0.0: - resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} - engines: {node: '>=0.3.1'} - - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - - foreground-child@3.3.1: - resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} - engines: {node: '>=14'} - - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - glob@10.5.0: - resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - hasBin: true - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - - js-yaml@4.3.2: - resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} - hasBin: true - - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - - minimatch@9.0.9: - resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} - engines: {node: '>=16 || 14 >=14.17'} - - minipass@7.1.3: - resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} - engines: {node: '>=16 || 14 >=14.17'} - - mocha@11.8.0: - resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - - readdirp@4.1.2: - resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} - engines: {node: '>= 14.18.0'} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - - serialize-javascript@6.0.2: - resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} - - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-ansi@7.2.0: - resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} - engines: {node: '>=12'} - - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - - typescript@7.0.2: - resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} - engines: {node: '>=16.20.0'} - hasBin: true - - undici-types@8.3.0: - resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - workerpool@9.3.4: - resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - - yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - - yargs@17.7.3: - resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} - engines: {node: '>=12'} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - -snapshots: - - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.2.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 - - '@pkgjs/parseargs@0.11.0': - optional: true - - '@types/mocha@10.0.10': {} - - '@types/node@26.4.1': - dependencies: - undici-types: 8.3.0 - - '@typescript/typescript-aix-ppc64@7.0.2': - optional: true - - '@typescript/typescript-darwin-arm64@7.0.2': - optional: true - - '@typescript/typescript-darwin-x64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-freebsd-x64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm64@7.0.2': - optional: true - - '@typescript/typescript-linux-arm@7.0.2': - optional: true - - '@typescript/typescript-linux-loong64@7.0.2': - optional: true - - '@typescript/typescript-linux-mips64el@7.0.2': - optional: true - - '@typescript/typescript-linux-ppc64@7.0.2': - optional: true - - '@typescript/typescript-linux-riscv64@7.0.2': - optional: true - - '@typescript/typescript-linux-s390x@7.0.2': - optional: true - - '@typescript/typescript-linux-x64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-netbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-arm64@7.0.2': - optional: true - - '@typescript/typescript-openbsd-x64@7.0.2': - optional: true - - '@typescript/typescript-sunos-x64@7.0.2': - optional: true - - '@typescript/typescript-win32-arm64@7.0.2': - optional: true - - '@typescript/typescript-win32-x64@7.0.2': - optional: true - - ansi-regex@5.0.1: {} - - ansi-regex@6.3.0: {} - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - ansi-styles@6.2.3: {} - - argparse@2.0.1: {} - - balanced-match@1.0.2: {} - - brace-expansion@2.1.4: - dependencies: - balanced-match: 1.0.2 - - browser-stdout@1.3.1: {} - - camelcase@6.3.0: {} - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - chokidar@4.0.3: - dependencies: - readdirp: 4.1.2 - - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - - cross-spawn@7.0.6: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - debug@4.4.3(supports-color@8.1.1): - dependencies: - ms: 2.1.3 - optionalDependencies: - supports-color: 8.1.1 - - decamelize@4.0.0: {} - - diff@7.0.0: {} - - eastasianwidth@0.2.0: {} - - emoji-regex@8.0.0: {} - - emoji-regex@9.2.2: {} - - escalade@3.2.0: {} - - escape-string-regexp@4.0.0: {} - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat@5.0.2: {} - - foreground-child@3.3.1: - dependencies: - cross-spawn: 7.0.6 - signal-exit: 4.1.0 - - get-caller-file@2.0.5: {} - - glob@10.5.0: - dependencies: - foreground-child: 3.3.1 - jackspeak: 3.4.3 - minimatch: 9.0.9 - minipass: 7.1.3 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - - has-flag@4.0.0: {} - - he@1.2.0: {} - - is-fullwidth-code-point@3.0.0: {} - - is-path-inside@3.0.3: {} - - is-plain-obj@2.1.0: {} - - is-unicode-supported@0.1.0: {} - - isexe@2.0.0: {} - - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - - js-yaml@4.3.2: - dependencies: - argparse: 2.0.1 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - log-symbols@4.1.0: - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - - lru-cache@10.4.3: {} - - minimatch@9.0.9: - dependencies: - brace-expansion: 2.1.4 - - minipass@7.1.3: {} - - mocha@11.8.0: - dependencies: - browser-stdout: 1.3.1 - chokidar: 4.0.3 - debug: 4.4.3(supports-color@8.1.1) - diff: 7.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 10.5.0 - he: 1.2.0 - is-path-inside: 3.0.3 - js-yaml: 4.3.2 - log-symbols: 4.1.0 - minimatch: 9.0.9 - ms: 2.1.3 - picocolors: 1.1.1 - serialize-javascript: 6.0.2 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 9.3.4 - yargs: 17.7.3 - yargs-parser: 21.1.1 - yargs-unparser: 2.0.0 - - ms@2.1.3: {} - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - package-json-from-dist@1.0.1: {} - - path-exists@4.0.0: {} - - path-key@3.1.1: {} - - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.3 - - picocolors@1.1.1: {} - - randombytes@2.1.0: - dependencies: - safe-buffer: 5.2.1 - - readdirp@4.1.2: {} - - require-directory@2.1.1: {} - - safe-buffer@5.2.1: {} - - serialize-javascript@6.0.2: - dependencies: - randombytes: 2.1.0 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@3.0.0: {} - - signal-exit@4.1.0: {} - - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.2.0 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-ansi@7.2.0: - dependencies: - ansi-regex: 6.3.0 - - strip-json-comments@3.1.1: {} - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - - typescript@7.0.2: - optionalDependencies: - '@typescript/typescript-aix-ppc64': 7.0.2 - '@typescript/typescript-darwin-arm64': 7.0.2 - '@typescript/typescript-darwin-x64': 7.0.2 - '@typescript/typescript-freebsd-arm64': 7.0.2 - '@typescript/typescript-freebsd-x64': 7.0.2 - '@typescript/typescript-linux-arm': 7.0.2 - '@typescript/typescript-linux-arm64': 7.0.2 - '@typescript/typescript-linux-loong64': 7.0.2 - '@typescript/typescript-linux-mips64el': 7.0.2 - '@typescript/typescript-linux-ppc64': 7.0.2 - '@typescript/typescript-linux-riscv64': 7.0.2 - '@typescript/typescript-linux-s390x': 7.0.2 - '@typescript/typescript-linux-x64': 7.0.2 - '@typescript/typescript-netbsd-arm64': 7.0.2 - '@typescript/typescript-netbsd-x64': 7.0.2 - '@typescript/typescript-openbsd-arm64': 7.0.2 - '@typescript/typescript-openbsd-x64': 7.0.2 - '@typescript/typescript-sunos-x64': 7.0.2 - '@typescript/typescript-win32-arm64': 7.0.2 - '@typescript/typescript-win32-x64': 7.0.2 - - undici-types@8.3.0: {} - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - workerpool@9.3.4: {} - - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.3 - string-width: 5.1.2 - strip-ansi: 7.2.0 - - y18n@5.0.8: {} - - yargs-parser@21.1.1: {} - - yargs-unparser@2.0.0: - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - - yargs@17.7.3: - dependencies: - cliui: 8.0.1 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - - yocto-queue@0.1.0: {} diff --git a/examples/15-native-type-generic/output/typescript/src/map.test.ts b/examples/15-native-type-generic/output/typescript/src/map.test.ts deleted file mode 100644 index a442c2c..0000000 --- a/examples/15-native-type-generic/output/typescript/src/map.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import * as assert from "node:assert"; - -import {test} from "mocha"; - -import {X} from "./map.ts"; - -test("can use generic native types", () => { - const x = new Map([["a", 1], ["b", 2]]); -}); diff --git a/examples/15-native-type-generic/output/typescript/src/map.ts b/examples/15-native-type-generic/output/typescript/src/map.ts deleted file mode 100644 index 394ad92..0000000 --- a/examples/15-native-type-generic/output/typescript/src/map.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Generated by hobgoblin. - -// Custom area start: imports -// Custom area end: imports - -class X { - public readonly map: NativeMap; - - public constructor(map: NativeMap) { - this.map = map; - } - - // Custom area start: X, body - // Custom area end: X, body -} - -export {X}; - -// Custom area start: body -export type NativeMap = Map; -// Custom area end: body diff --git a/examples/15-native-type-generic/output/typescript/tsconfig.json b/examples/15-native-type-generic/output/typescript/tsconfig.json deleted file mode 120000 index 3c7cb2a..0000000 --- a/examples/15-native-type-generic/output/typescript/tsconfig.json +++ /dev/null @@ -1 +0,0 @@ -../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/15-native-type-generic/src/map.hob b/examples/15-native-type-generic/src/map.hob deleted file mode 100644 index 0118889..0000000 --- a/examples/15-native-type-generic/src/map.hob +++ /dev/null @@ -1,6 +0,0 @@ -native NativeMap[K, V] { -} - -struct X { - field map: NativeMap[String, Int32]; -} diff --git a/examples/15-struct-generic/hobgoblin.json5 b/examples/15-struct-generic/hobgoblin.json5 new file mode 100644 index 0000000..c7dc903 --- /dev/null +++ b/examples/15-struct-generic/hobgoblin.json5 @@ -0,0 +1,27 @@ +{ + outputs: { + langs: { + java: { + packageName: "org.zwobble.example.types", + }, + }, + generators: [ + { + generator: "java-types", + path: "output/java/src/gen/java", + }, + { + generator: "java-precisely-matchers", + path: "output/java/src/gen/java", + }, + { + generator: "rust-types", + path: "output/rust/src", + }, + { + generator: "typescript-types", + path: "output/typescript/src", + }, + ], + } +} diff --git a/examples/15-struct-generic/output/java/.gitignore b/examples/15-struct-generic/output/java/.gitignore new file mode 100644 index 0000000..ff511d4 --- /dev/null +++ b/examples/15-struct-generic/output/java/.gitignore @@ -0,0 +1,2 @@ +/src/gen/ +/target/ diff --git a/examples/15-struct-generic/output/java/pom.xml b/examples/15-struct-generic/output/java/pom.xml new file mode 120000 index 0000000..445fa65 --- /dev/null +++ b/examples/15-struct-generic/output/java/pom.xml @@ -0,0 +1 @@ +../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/15-struct-generic/output/java/src/test/java/org/zwobble/example/PointTests.java b/examples/15-struct-generic/output/java/src/test/java/org/zwobble/example/PointTests.java new file mode 100644 index 0000000..fba31c7 --- /dev/null +++ b/examples/15-struct-generic/output/java/src/test/java/org/zwobble/example/PointTests.java @@ -0,0 +1,43 @@ +package org.zwobble.example; + +import org.junit.jupiter.api.Test; +import org.zwobble.example.types.point.Line; +import org.zwobble.example.types.point.LineDrawing; +import org.zwobble.example.types.point.Point2D; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.zwobble.example.types.point.LineDrawingMatcher.isLineDrawing; +import static org.zwobble.example.types.point.LineMatcher.isLine; +import static org.zwobble.example.types.point.Point2DMatcher.isPoint2D; +import static org.zwobble.precisely.AssertThat.assertThat; +import static org.zwobble.precisely.Matchers.equalTo; +import static org.zwobble.precisely.Matchers.isSequence; + +public class PointTests { + @Test + public void line() { + var line = new Line<>( + new Point2D(10, 25), + new Point2D(42, 47) + ); + assertEquals(line.start().x(), 10); + assertEquals(line.end().y(), 47); + } + + @Test + public void matchers() { + var lineDrawing = new LineDrawing<>(List.of( + new Line<>(new Point2D(10, 25), new Point2D(42, 47)) + )); + + assertThat(lineDrawing, isLineDrawing() + .withLines(isSequence( + isLine() + .withStart(isPoint2D().withX(equalTo(10)).withY(equalTo(25))) + .withEnd(isPoint2D().withX(equalTo(42)).withY(equalTo(47))) + )) + ); + } +} diff --git a/examples/15-struct-generic/output/rust/.gitignore b/examples/15-struct-generic/output/rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/examples/15-struct-generic/output/rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/examples/15-struct-generic/output/rust/Cargo.lock b/examples/15-struct-generic/output/rust/Cargo.lock new file mode 100644 index 0000000..9dc6e3e --- /dev/null +++ b/examples/15-struct-generic/output/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "example" +version = "0.1.0" diff --git a/examples/15-struct-generic/output/rust/Cargo.toml b/examples/15-struct-generic/output/rust/Cargo.toml new file mode 100644 index 0000000..5d4c622 --- /dev/null +++ b/examples/15-struct-generic/output/rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "example" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/examples/15-struct-generic/output/rust/rust-toolchain.toml b/examples/15-struct-generic/output/rust/rust-toolchain.toml new file mode 100644 index 0000000..4fedb95 --- /dev/null +++ b/examples/15-struct-generic/output/rust/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.96" diff --git a/examples/15-struct-generic/output/rust/src/lib.rs b/examples/15-struct-generic/output/rust/src/lib.rs new file mode 100644 index 0000000..75ae1f1 --- /dev/null +++ b/examples/15-struct-generic/output/rust/src/lib.rs @@ -0,0 +1,16 @@ +mod point; + +#[cfg(test)] +mod test { + use super::point::{Line, Point2D}; + + #[test] + fn line() { + let line = Line { + start: Point2D { x: 10, y: 25 }, + end: Point2D { x: 42, y: 47 }, + }; + assert_eq!(line.start.x, 10); + assert_eq!(line.end.y, 47); + } +} diff --git a/examples/15-struct-generic/output/rust/src/point.rs b/examples/15-struct-generic/output/rust/src/point.rs new file mode 100644 index 0000000..a6c6615 --- /dev/null +++ b/examples/15-struct-generic/output/rust/src/point.rs @@ -0,0 +1,41 @@ +// Generated by hobgoblin. + +/// A set of drawings. +#[derive(Clone, Debug, PartialEq)] +pub struct OwnedLineDrawing { + pub drawing: crate::point::LineDrawing::, + pub owner: ::std::string::String, +} + +/// A 2D drawing made up of straight lines. +#[derive(Clone, Debug, PartialEq)] +pub struct LineDrawing2D { + pub lines: ::std::vec::Vec::>, +} + +/// A drawing made up of straight lines. +#[derive(Clone, Debug, PartialEq)] +pub struct LineDrawing { + pub lines: ::std::vec::Vec::>, +} + +/// A cubic Bezier curve. +#[derive(Clone, Debug, PartialEq)] +pub struct BezierCurve { + pub start: crate::point::Line::, + pub end: crate::point::Line::, +} + +/// A straight line from one point to another. +#[derive(Clone, Debug, PartialEq)] +pub struct Line { + pub start: TPoint, + pub end: TPoint, +} + +/// A 2D point. +#[derive(Clone, Debug, PartialEq)] +pub struct Point2D { + pub x: ::core::primitive::i32, + pub y: ::core::primitive::i32, +} diff --git a/examples/15-struct-generic/output/typescript/.gitignore b/examples/15-struct-generic/output/typescript/.gitignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/examples/15-struct-generic/output/typescript/.gitignore @@ -0,0 +1 @@ +/node_modules diff --git a/examples/15-struct-generic/output/typescript/package.json b/examples/15-struct-generic/output/typescript/package.json new file mode 120000 index 0000000..0bc7349 --- /dev/null +++ b/examples/15-struct-generic/output/typescript/package.json @@ -0,0 +1 @@ +../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/15-struct-generic/output/typescript/pnpm-lock.yaml b/examples/15-struct-generic/output/typescript/pnpm-lock.yaml new file mode 100644 index 0000000..016d629 --- /dev/null +++ b/examples/15-struct-generic/output/typescript/pnpm-lock.yaml @@ -0,0 +1,834 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@types/mocha': + specifier: ^10.0.10 + version: 10.0.10 + '@types/node': + specifier: ^26.4.0 + version: 26.4.1 + mocha: + specifier: ^11.8.0 + version: 11.8.0 + typescript: + specifier: ^7.0.2 + version: 7.0.2 + +packages: + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@types/mocha@10.0.10': + resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} + + '@types/node@26.4.1': + resolution: {integrity: sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==} + + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.3.0: + resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@2.1.4: + resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} + + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + + diff@7.0.0: + resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} + engines: {node: '>=0.3.1'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + mocha@11.8.0: + resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + + undici-types@8.3.0: + resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + workerpool@9.3.4: + resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@types/mocha@10.0.10': {} + + '@types/node@26.4.1': + dependencies: + undici-types: 8.3.0 + + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + ansi-regex@5.0.1: {} + + ansi-regex@6.3.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.3: {} + + argparse@2.0.1: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.1.4: + dependencies: + balanced-match: 1.0.2 + + browser-stdout@1.3.1: {} + + camelcase@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} + + diff@7.0.0: {} + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat@5.0.2: {} + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + get-caller-file@2.0.5: {} + + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + has-flag@4.0.0: {} + + he@1.2.0: {} + + is-fullwidth-code-point@3.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-obj@2.1.0: {} + + is-unicode-supported@0.1.0: {} + + isexe@2.0.0: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + lru-cache@10.4.3: {} + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.4 + + minipass@7.1.3: {} + + mocha@11.8.0: + dependencies: + browser-stdout: 1.3.1 + chokidar: 4.0.3 + debug: 4.4.3(supports-color@8.1.1) + diff: 7.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 10.5.0 + he: 1.2.0 + is-path-inside: 3.0.3 + js-yaml: 4.3.2 + log-symbols: 4.1.0 + minimatch: 9.0.9 + ms: 2.1.3 + picocolors: 1.1.1 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 9.3.4 + yargs: 17.7.3 + yargs-parser: 21.1.1 + yargs-unparser: 2.0.0 + + ms@2.1.3: {} + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + package-json-from-dist@1.0.1: {} + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + + picocolors@1.1.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@4.1.2: {} + + require-directory@2.1.1: {} + + safe-buffer@5.2.1: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@4.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.3.0 + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + + undici-types@8.3.0: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + workerpool@9.3.4: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@17.7.3: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} diff --git a/examples/15-struct-generic/output/typescript/src/point.test.ts b/examples/15-struct-generic/output/typescript/src/point.test.ts new file mode 100644 index 0000000..0d59417 --- /dev/null +++ b/examples/15-struct-generic/output/typescript/src/point.test.ts @@ -0,0 +1,14 @@ +import * as assert from "node:assert"; + +import {test} from "mocha"; + +import {Line, LineDrawing, Point2D} from "./point.ts"; + +test("line", () => { + const line = new Line( + new Point2D(10, 25), + new Point2D(42, 47) + ); + assert.strictEqual(line.start.x, 10); + assert.strictEqual(line.end.y, 47); +}); diff --git a/examples/15-struct-generic/output/typescript/src/point.ts b/examples/15-struct-generic/output/typescript/src/point.ts new file mode 100644 index 0000000..f3ecdec --- /dev/null +++ b/examples/15-struct-generic/output/typescript/src/point.ts @@ -0,0 +1,115 @@ +// Generated by hobgoblin. + +// Custom area start: imports +// Custom area end: imports + +/** + * A set of drawings. + */ +class OwnedLineDrawing { + public readonly drawing: LineDrawing; + + public readonly owner: String; + + public constructor(drawing: LineDrawing, owner: String) { + this.drawing = drawing; + this.owner = owner; + } + + // Custom area start: OwnedLineDrawing, body + // Custom area end: OwnedLineDrawing, body +} + +export {OwnedLineDrawing}; + +/** + * A 2D drawing made up of straight lines. + */ +class LineDrawing2D { + public readonly lines: ReadonlyArray>; + + public constructor(lines: ReadonlyArray>) { + this.lines = lines; + } + + // Custom area start: LineDrawing2D, body + // Custom area end: LineDrawing2D, body +} + +export {LineDrawing2D}; + +/** + * A drawing made up of straight lines. + */ +class LineDrawing { + public readonly lines: ReadonlyArray>; + + public constructor(lines: ReadonlyArray>) { + this.lines = lines; + } + + // Custom area start: LineDrawing, body + // Custom area end: LineDrawing, body +} + +export {LineDrawing}; + +/** + * A cubic Bezier curve. + */ +class BezierCurve { + public readonly start: Line; + + public readonly end: Line; + + public constructor(start: Line, end: Line) { + this.start = start; + this.end = end; + } + + // Custom area start: BezierCurve, body + // Custom area end: BezierCurve, body +} + +export {BezierCurve}; + +/** + * A straight line from one point to another. + */ +class Line { + public readonly start: TPoint; + + public readonly end: TPoint; + + public constructor(start: TPoint, end: TPoint) { + this.start = start; + this.end = end; + } + + // Custom area start: Line, body + // Custom area end: Line, body +} + +export {Line}; + +/** + * A 2D point. + */ +class Point2D { + public readonly x: number; + + public readonly y: number; + + public constructor(x: number, y: number) { + this.x = x; + this.y = y; + } + + // Custom area start: Point2D, body + // Custom area end: Point2D, body +} + +export {Point2D}; + +// Custom area start: body +// Custom area end: body diff --git a/examples/15-struct-generic/output/typescript/tsconfig.json b/examples/15-struct-generic/output/typescript/tsconfig.json new file mode 120000 index 0000000..3c7cb2a --- /dev/null +++ b/examples/15-struct-generic/output/typescript/tsconfig.json @@ -0,0 +1 @@ +../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/15-struct-generic/src/point.hob b/examples/15-struct-generic/src/point.hob new file mode 100644 index 0000000..5beed86 --- /dev/null +++ b/examples/15-struct-generic/src/point.hob @@ -0,0 +1,33 @@ +/// A set of drawings. +struct OwnedLineDrawing[TPoint] { + field drawing: LineDrawing[TPoint]; + field owner: String; +} + +/// A 2D drawing made up of straight lines. +struct LineDrawing2D { + field lines: List[Line[Point2D]]; +} + +/// A drawing made up of straight lines. +struct LineDrawing[TPoint] { + field lines: List[Line[TPoint]]; +} + +/// A cubic Bezier curve. +struct BezierCurve[TPoint] { + field start: Line[TPoint]; + field end: Line[TPoint]; +} + +/// A straight line from one point to another. +struct Line[TPoint] { + field start: TPoint; + field end: TPoint; +} + +/// A 2D point. +struct Point2D { + field x: Int32; + field y: Int32; +} diff --git a/examples/16-native-type-generic/hobgoblin.json5 b/examples/16-native-type-generic/hobgoblin.json5 new file mode 100644 index 0000000..20c767f --- /dev/null +++ b/examples/16-native-type-generic/hobgoblin.json5 @@ -0,0 +1,37 @@ +{ + outputs: { + langs: { + java: { + packageName: "org.zwobble.example.types", + nativeTypes: [ + { + hobgoblin: "map.NativeMap", + java: "java.util.Map", + }, + ], + }, + rust: { + nativeTypes: [ + { + hobgoblin: "map.NativeMap", + rust: "::std::collections::BTreeMap", + }, + ], + }, + }, + generators: [ + { + generator: "java-types", + path: "output/java/src/gen/java", + }, + { + generator: "rust-types", + path: "output/rust/src/gen", + }, + { + generator: "typescript-types", + path: "output/typescript/src", + }, + ], + }, +} diff --git a/examples/16-native-type-generic/output/java/.gitignore b/examples/16-native-type-generic/output/java/.gitignore new file mode 100644 index 0000000..ff511d4 --- /dev/null +++ b/examples/16-native-type-generic/output/java/.gitignore @@ -0,0 +1,2 @@ +/src/gen/ +/target/ diff --git a/examples/16-native-type-generic/output/java/pom.xml b/examples/16-native-type-generic/output/java/pom.xml new file mode 120000 index 0000000..445fa65 --- /dev/null +++ b/examples/16-native-type-generic/output/java/pom.xml @@ -0,0 +1 @@ +../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/16-native-type-generic/output/java/src/main/java/org/zwobble/example/types/map/HobgoblinNativeMap.java b/examples/16-native-type-generic/output/java/src/main/java/org/zwobble/example/types/map/HobgoblinNativeMap.java new file mode 100644 index 0000000..39fd627 --- /dev/null +++ b/examples/16-native-type-generic/output/java/src/main/java/org/zwobble/example/types/map/HobgoblinNativeMap.java @@ -0,0 +1,14 @@ +package org.zwobble.example.types.map; + +import java.util.function.Supplier; + +public class HobgoblinNativeMap { + private HobgoblinNativeMap() {} + + public static java.util.Map arbitraryNativeMap( + Supplier supplyK, + Supplier supplyV + ) { + return new java.util.HashMap<>(); + } +} diff --git a/examples/16-native-type-generic/output/java/src/test/java/org/zwobble/example/MapTests.java b/examples/16-native-type-generic/output/java/src/test/java/org/zwobble/example/MapTests.java new file mode 100644 index 0000000..5b6a764 --- /dev/null +++ b/examples/16-native-type-generic/output/java/src/test/java/org/zwobble/example/MapTests.java @@ -0,0 +1,13 @@ +package org.zwobble.example; + +import java.util.Map; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; +import org.zwobble.example.types.map.X; + +public class MapTests { + @Test + public void canUseGenericNativeTypes() { + var x = new X(Map.ofEntries(Map.entry("a", 1), Map.entry("b", 2))); + } +} diff --git a/examples/16-native-type-generic/output/rust/.gitignore b/examples/16-native-type-generic/output/rust/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/examples/16-native-type-generic/output/rust/.gitignore @@ -0,0 +1 @@ +/target diff --git a/examples/16-native-type-generic/output/rust/Cargo.lock b/examples/16-native-type-generic/output/rust/Cargo.lock new file mode 100644 index 0000000..9dc6e3e --- /dev/null +++ b/examples/16-native-type-generic/output/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "example" +version = "0.1.0" diff --git a/examples/16-native-type-generic/output/rust/Cargo.toml b/examples/16-native-type-generic/output/rust/Cargo.toml new file mode 100644 index 0000000..5d4c622 --- /dev/null +++ b/examples/16-native-type-generic/output/rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "example" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/examples/16-native-type-generic/output/rust/rust-toolchain.toml b/examples/16-native-type-generic/output/rust/rust-toolchain.toml new file mode 100644 index 0000000..4fedb95 --- /dev/null +++ b/examples/16-native-type-generic/output/rust/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.96" diff --git a/examples/16-native-type-generic/output/rust/src/gen/map.rs b/examples/16-native-type-generic/output/rust/src/gen/map.rs new file mode 100644 index 0000000..59fb30f --- /dev/null +++ b/examples/16-native-type-generic/output/rust/src/gen/map.rs @@ -0,0 +1,6 @@ +// Generated by hobgoblin. + +#[derive(Clone, Debug, PartialEq)] +pub struct X { + pub map: ::std::collections::BTreeMap::<::std::string::String, ::core::primitive::i32>, +} diff --git a/examples/16-native-type-generic/output/rust/src/lib.rs b/examples/16-native-type-generic/output/rust/src/lib.rs new file mode 100644 index 0000000..b0adf47 --- /dev/null +++ b/examples/16-native-type-generic/output/rust/src/lib.rs @@ -0,0 +1,12 @@ +mod map; + +#[cfg(test)] +mod test { + use std::collections::BTreeMap; + use super::map::X; + + #[test] + fn can_use_generic_native_types() { + let x = X { map: BTreeMap::from([("a".to_string(), 1), ("b".to_string(), 2)]) }; + } +} diff --git a/examples/16-native-type-generic/output/rust/src/map.rs b/examples/16-native-type-generic/output/rust/src/map.rs new file mode 100644 index 0000000..3dd0a72 --- /dev/null +++ b/examples/16-native-type-generic/output/rust/src/map.rs @@ -0,0 +1 @@ +include!("gen/map.rs"); diff --git a/examples/16-native-type-generic/output/typescript/.gitignore b/examples/16-native-type-generic/output/typescript/.gitignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/examples/16-native-type-generic/output/typescript/.gitignore @@ -0,0 +1 @@ +/node_modules diff --git a/examples/16-native-type-generic/output/typescript/package.json b/examples/16-native-type-generic/output/typescript/package.json new file mode 120000 index 0000000..0bc7349 --- /dev/null +++ b/examples/16-native-type-generic/output/typescript/package.json @@ -0,0 +1 @@ +../../../templates/typescript/package.json \ No newline at end of file diff --git a/examples/16-native-type-generic/output/typescript/pnpm-lock.yaml b/examples/16-native-type-generic/output/typescript/pnpm-lock.yaml new file mode 100644 index 0000000..016d629 --- /dev/null +++ b/examples/16-native-type-generic/output/typescript/pnpm-lock.yaml @@ -0,0 +1,834 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@types/mocha': + specifier: ^10.0.10 + version: 10.0.10 + '@types/node': + specifier: ^26.4.0 + version: 26.4.1 + mocha: + specifier: ^11.8.0 + version: 11.8.0 + typescript: + specifier: ^7.0.2 + version: 7.0.2 + +packages: + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@types/mocha@10.0.10': + resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==} + + '@types/node@26.4.1': + resolution: {integrity: sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==} + + '@typescript/typescript-aix-ppc64@7.0.2': + resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [aix] + + '@typescript/typescript-darwin-arm64@7.0.2': + resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [darwin] + + '@typescript/typescript-darwin-x64@7.0.2': + resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [darwin] + + '@typescript/typescript-freebsd-arm64@7.0.2': + resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [freebsd] + + '@typescript/typescript-freebsd-x64@7.0.2': + resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [freebsd] + + '@typescript/typescript-linux-arm64@7.0.2': + resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [linux] + + '@typescript/typescript-linux-arm@7.0.2': + resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==} + engines: {node: '>=16.20.0'} + cpu: [arm] + os: [linux] + + '@typescript/typescript-linux-loong64@7.0.2': + resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==} + engines: {node: '>=16.20.0'} + cpu: [loong64] + os: [linux] + + '@typescript/typescript-linux-mips64el@7.0.2': + resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==} + engines: {node: '>=16.20.0'} + cpu: [mips64el] + os: [linux] + + '@typescript/typescript-linux-ppc64@7.0.2': + resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==} + engines: {node: '>=16.20.0'} + cpu: [ppc64] + os: [linux] + + '@typescript/typescript-linux-riscv64@7.0.2': + resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==} + engines: {node: '>=16.20.0'} + cpu: [riscv64] + os: [linux] + + '@typescript/typescript-linux-s390x@7.0.2': + resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==} + engines: {node: '>=16.20.0'} + cpu: [s390x] + os: [linux] + + '@typescript/typescript-linux-x64@7.0.2': + resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [linux] + + '@typescript/typescript-netbsd-arm64@7.0.2': + resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [netbsd] + + '@typescript/typescript-netbsd-x64@7.0.2': + resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [netbsd] + + '@typescript/typescript-openbsd-arm64@7.0.2': + resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [openbsd] + + '@typescript/typescript-openbsd-x64@7.0.2': + resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [openbsd] + + '@typescript/typescript-sunos-x64@7.0.2': + resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [sunos] + + '@typescript/typescript-win32-arm64@7.0.2': + resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==} + engines: {node: '>=16.20.0'} + cpu: [arm64] + os: [win32] + + '@typescript/typescript-win32-x64@7.0.2': + resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==} + engines: {node: '>=16.20.0'} + cpu: [x64] + os: [win32] + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.3.0: + resolution: {integrity: sha512-WpDfL7NO6j7tH88IDBNVdUJxDh9nmCteAVW9dsep846XdwF4naCBK+/tGLX3KJgcpgMRXCFlTM2hKGoK9FsdrQ==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@2.1.4: + resolution: {integrity: sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==} + + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + + diff@7.0.0: + resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} + engines: {node: '>=0.3.1'} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + mocha@11.8.0: + resolution: {integrity: sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + typescript@7.0.2: + resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} + engines: {node: '>=16.20.0'} + hasBin: true + + undici-types@8.3.0: + resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + workerpool@9.3.4: + resolution: {integrity: sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@pkgjs/parseargs@0.11.0': + optional: true + + '@types/mocha@10.0.10': {} + + '@types/node@26.4.1': + dependencies: + undici-types: 8.3.0 + + '@typescript/typescript-aix-ppc64@7.0.2': + optional: true + + '@typescript/typescript-darwin-arm64@7.0.2': + optional: true + + '@typescript/typescript-darwin-x64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-freebsd-x64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm64@7.0.2': + optional: true + + '@typescript/typescript-linux-arm@7.0.2': + optional: true + + '@typescript/typescript-linux-loong64@7.0.2': + optional: true + + '@typescript/typescript-linux-mips64el@7.0.2': + optional: true + + '@typescript/typescript-linux-ppc64@7.0.2': + optional: true + + '@typescript/typescript-linux-riscv64@7.0.2': + optional: true + + '@typescript/typescript-linux-s390x@7.0.2': + optional: true + + '@typescript/typescript-linux-x64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-netbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-arm64@7.0.2': + optional: true + + '@typescript/typescript-openbsd-x64@7.0.2': + optional: true + + '@typescript/typescript-sunos-x64@7.0.2': + optional: true + + '@typescript/typescript-win32-arm64@7.0.2': + optional: true + + '@typescript/typescript-win32-x64@7.0.2': + optional: true + + ansi-regex@5.0.1: {} + + ansi-regex@6.3.0: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@6.2.3: {} + + argparse@2.0.1: {} + + balanced-match@1.0.2: {} + + brace-expansion@2.1.4: + dependencies: + balanced-match: 1.0.2 + + browser-stdout@1.3.1: {} + + camelcase@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.3(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} + + diff@7.0.0: {} + + eastasianwidth@0.2.0: {} + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat@5.0.2: {} + + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + get-caller-file@2.0.5: {} + + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + has-flag@4.0.0: {} + + he@1.2.0: {} + + is-fullwidth-code-point@3.0.0: {} + + is-path-inside@3.0.3: {} + + is-plain-obj@2.1.0: {} + + is-unicode-supported@0.1.0: {} + + isexe@2.0.0: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + + lru-cache@10.4.3: {} + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.4 + + minipass@7.1.3: {} + + mocha@11.8.0: + dependencies: + browser-stdout: 1.3.1 + chokidar: 4.0.3 + debug: 4.4.3(supports-color@8.1.1) + diff: 7.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 10.5.0 + he: 1.2.0 + is-path-inside: 3.0.3 + js-yaml: 4.3.2 + log-symbols: 4.1.0 + minimatch: 9.0.9 + ms: 2.1.3 + picocolors: 1.1.1 + serialize-javascript: 6.0.2 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 9.3.4 + yargs: 17.7.3 + yargs-parser: 21.1.1 + yargs-unparser: 2.0.0 + + ms@2.1.3: {} + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + package-json-from-dist@1.0.1: {} + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + + picocolors@1.1.1: {} + + randombytes@2.1.0: + dependencies: + safe-buffer: 5.2.1 + + readdirp@4.1.2: {} + + require-directory@2.1.1: {} + + safe-buffer@5.2.1: {} + + serialize-javascript@6.0.2: + dependencies: + randombytes: 2.1.0 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + signal-exit@4.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.3.0 + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + typescript@7.0.2: + optionalDependencies: + '@typescript/typescript-aix-ppc64': 7.0.2 + '@typescript/typescript-darwin-arm64': 7.0.2 + '@typescript/typescript-darwin-x64': 7.0.2 + '@typescript/typescript-freebsd-arm64': 7.0.2 + '@typescript/typescript-freebsd-x64': 7.0.2 + '@typescript/typescript-linux-arm': 7.0.2 + '@typescript/typescript-linux-arm64': 7.0.2 + '@typescript/typescript-linux-loong64': 7.0.2 + '@typescript/typescript-linux-mips64el': 7.0.2 + '@typescript/typescript-linux-ppc64': 7.0.2 + '@typescript/typescript-linux-riscv64': 7.0.2 + '@typescript/typescript-linux-s390x': 7.0.2 + '@typescript/typescript-linux-x64': 7.0.2 + '@typescript/typescript-netbsd-arm64': 7.0.2 + '@typescript/typescript-netbsd-x64': 7.0.2 + '@typescript/typescript-openbsd-arm64': 7.0.2 + '@typescript/typescript-openbsd-x64': 7.0.2 + '@typescript/typescript-sunos-x64': 7.0.2 + '@typescript/typescript-win32-arm64': 7.0.2 + '@typescript/typescript-win32-x64': 7.0.2 + + undici-types@8.3.0: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + workerpool@9.3.4: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + + y18n@5.0.8: {} + + yargs-parser@21.1.1: {} + + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@17.7.3: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} diff --git a/examples/16-native-type-generic/output/typescript/src/map.test.ts b/examples/16-native-type-generic/output/typescript/src/map.test.ts new file mode 100644 index 0000000..a442c2c --- /dev/null +++ b/examples/16-native-type-generic/output/typescript/src/map.test.ts @@ -0,0 +1,9 @@ +import * as assert from "node:assert"; + +import {test} from "mocha"; + +import {X} from "./map.ts"; + +test("can use generic native types", () => { + const x = new Map([["a", 1], ["b", 2]]); +}); diff --git a/examples/16-native-type-generic/output/typescript/src/map.ts b/examples/16-native-type-generic/output/typescript/src/map.ts new file mode 100644 index 0000000..394ad92 --- /dev/null +++ b/examples/16-native-type-generic/output/typescript/src/map.ts @@ -0,0 +1,21 @@ +// Generated by hobgoblin. + +// Custom area start: imports +// Custom area end: imports + +class X { + public readonly map: NativeMap; + + public constructor(map: NativeMap) { + this.map = map; + } + + // Custom area start: X, body + // Custom area end: X, body +} + +export {X}; + +// Custom area start: body +export type NativeMap = Map; +// Custom area end: body diff --git a/examples/16-native-type-generic/output/typescript/tsconfig.json b/examples/16-native-type-generic/output/typescript/tsconfig.json new file mode 120000 index 0000000..3c7cb2a --- /dev/null +++ b/examples/16-native-type-generic/output/typescript/tsconfig.json @@ -0,0 +1 @@ +../../../templates/typescript/tsconfig.json \ No newline at end of file diff --git a/examples/16-native-type-generic/src/map.hob b/examples/16-native-type-generic/src/map.hob new file mode 100644 index 0000000..0118889 --- /dev/null +++ b/examples/16-native-type-generic/src/map.hob @@ -0,0 +1,6 @@ +native NativeMap[K, V] { +} + +struct X { + field map: NativeMap[String, Int32]; +} diff --git a/examples/16-transient-0/hobgoblin.json5 b/examples/16-transient-0/hobgoblin.json5 deleted file mode 100644 index e632b0a..0000000 --- a/examples/16-transient-0/hobgoblin.json5 +++ /dev/null @@ -1,27 +0,0 @@ -{ - outputs: { - langs: { - java: { - packageName: "org.zwobble.example.types", - }, - }, - generators: [ - { - generator: "java-types", - path: "output/java/src/gen/java", - }, - { - generator: "java-transient-0", - path: "output/java/src/main/java", - }, - { - generator: "rust-types", - path: "output/rust/src/gen", - }, - { - generator: "rust-transient-0", - path: "output/rust/src/gen", - } - ], - } -} diff --git a/examples/16-transient-0/output/java/.gitignore b/examples/16-transient-0/output/java/.gitignore deleted file mode 100644 index 2fcf0b8..0000000 --- a/examples/16-transient-0/output/java/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/src/gen/ -/target/ -/transient-0/ diff --git a/examples/16-transient-0/output/java/pom.xml b/examples/16-transient-0/output/java/pom.xml deleted file mode 120000 index 445fa65..0000000 --- a/examples/16-transient-0/output/java/pom.xml +++ /dev/null @@ -1 +0,0 @@ -../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/GenericNative.java b/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/GenericNative.java deleted file mode 100644 index cfd16d5..0000000 --- a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/GenericNative.java +++ /dev/null @@ -1,3 +0,0 @@ -package org.zwobble.example.types.data; - -public record GenericNative(A a, B b) {} diff --git a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/HobgoblinNativeData.java b/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/HobgoblinNativeData.java deleted file mode 100644 index cc26b7b..0000000 --- a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/HobgoblinNativeData.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.zwobble.example.types.data; - -import java.util.function.Supplier; - -public class HobgoblinNativeData { - private HobgoblinNativeData() {} - - public static Native arbitraryNative() { - return new Native(0, 0); - } - - public static GenericNative arbitraryGenericNative( - Supplier supplyA, - Supplier supplyB - ) { - return new GenericNative<>(supplyA.get(), supplyB.get()); - } -} diff --git a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/Native.java b/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/Native.java deleted file mode 100644 index 366dd74..0000000 --- a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/Native.java +++ /dev/null @@ -1,3 +0,0 @@ -package org.zwobble.example.types.data; - -public record Native(int a, int b) {} diff --git a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java b/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java deleted file mode 100644 index f8799b7..0000000 --- a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java +++ /dev/null @@ -1,636 +0,0 @@ -// Generated by hobgoblin. - -package org.zwobble.example.types.data.transient0; - -// Custom area start: org.zwobble.example.types.data.transient0.HobgoblinTransient0Data imports -import java.io.InputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import org.zwobble.example.types.data.GenericNative; -import org.zwobble.example.types.data.Native; -import org.zwobble.example.types.transient0.Decoder; -import org.zwobble.example.types.transient0.Encoder; -import org.zwobble.example.types.transient0.HobgoblinTransient0Builtins; -import org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue; -// Custom area end: org.zwobble.example.types.data.transient0.HobgoblinTransient0Data imports - -public final class HobgoblinTransient0Data { - public static void encodeStructSingleton(org.zwobble.example.types.data.StructSingleton value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - } - - public static org.zwobble.example.types.data.StructSingleton decodeStructSingleton(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - return org.zwobble.example.types.data.StructSingleton.INSTANCE; - } - - public static void encodeStructWithBool(org.zwobble.example.types.data.StructWithBool value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.a(), outputStream, sharedValues); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.b(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithBool decodeStructWithBool(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); - var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithBool(a, b); - } - - public static void encodeStructWithFloat64(org.zwobble.example.types.data.StructWithFloat64 value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeFloat64(value.a(), outputStream, sharedValues); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeFloat64(value.b(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithFloat64 decodeStructWithFloat64(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeFloat64(inputStream, sharedValues); - var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeFloat64(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithFloat64(a, b); - } - - public static void encodeStructWithInt8(org.zwobble.example.types.data.StructWithInt8 value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt8(value.a(), outputStream, sharedValues); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt8(value.b(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithInt8 decodeStructWithInt8(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt8(inputStream, sharedValues); - var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt8(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithInt8(a, b); - } - - public static void encodeStructWithInt32(org.zwobble.example.types.data.StructWithInt32 value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.a(), outputStream, sharedValues); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.b(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithInt32 decodeStructWithInt32(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithInt32(a, b); - } - - public static void encodeStructWithInt64(org.zwobble.example.types.data.StructWithInt64 value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(value.a(), outputStream, sharedValues); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(value.b(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithInt64 decodeStructWithInt64(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithInt64(a, b); - } - - public static void encodeStructWithString(org.zwobble.example.types.data.StructWithString value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeString(value.a(), outputStream, sharedValues); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeString(value.b(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithString decodeStructWithString(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeString(inputStream, sharedValues); - var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeString(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithString(a, b); - } - - public static void encodeStructWithStruct(org.zwobble.example.types.data.StructWithStruct value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.inner(), outputStream, sharedValues); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.c(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithStruct decodeStructWithStruct(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var inner = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); - var c = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithStruct(inner, c); - } - - public static void encodeGenericStruct(org.zwobble.example.types.data.GenericStruct value, java.io.OutputStream outputStream, java.util.Map sharedValues, org.zwobble.example.types.transient0.Encoder encoder$A, org.zwobble.example.types.transient0.Encoder encoder$B) throws java.io.IOException { - encoder$A.encode(value.a(), outputStream, sharedValues); - encoder$B.encode(value.b(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.GenericStruct decodeGenericStruct(java.io.InputStream inputStream, java.util.List sharedValues, org.zwobble.example.types.transient0.Decoder decoder$A, org.zwobble.example.types.transient0.Decoder decoder$B) throws java.io.IOException { - var a = decoder$A.decode(inputStream, sharedValues); - var b = decoder$B.decode(inputStream, sharedValues); - return new org.zwobble.example.types.data.GenericStruct(a, b); - } - - public static void encodeStructWithGenericStruct(org.zwobble.example.types.data.StructWithGenericStruct value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericStruct(value.a(), outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericStruct(value.b(), outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$1); - } - - public static org.zwobble.example.types.data.StructWithGenericStruct decodeStructWithGenericStruct(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericStruct(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString); - var b = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericStruct(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$1); - return new org.zwobble.example.types.data.StructWithGenericStruct(a, b); - } - - public static void encodeStructWithList(org.zwobble.example.types.data.StructWithList value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64((long) value.a().size(), outputStream, sharedValues); - for (var element : value.a()) { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(element, outputStream, sharedValues); - } - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64((long) value.b().size(), outputStream, sharedValues); - for (var element : value.b()) { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(element, outputStream, sharedValues); - } - } - - public static org.zwobble.example.types.data.StructWithList decodeStructWithList(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a$size = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (a$size > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Lists longer than Integer.MAX_VALUE are not supported"); - } - var a = new java.util.ArrayList((int) a$size); - for (long a$index = 0; a$index < a$size; a$index++) { - var a$element = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - a.add(a$element); - } - var b$size = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (b$size > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Lists longer than Integer.MAX_VALUE are not supported"); - } - var b = new java.util.ArrayList((int) b$size); - for (long b$index = 0; b$index < b$size; b$index++) { - var b$element = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); - b.add(b$element); - } - return new org.zwobble.example.types.data.StructWithList(a, b); - } - - public static void encodeStructWithOption(org.zwobble.example.types.data.StructWithOption value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.a().isPresent(), outputStream, sharedValues); - if (value.a().isPresent()) { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(value.a().get(), outputStream, sharedValues); - } - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.b().isPresent(), outputStream, sharedValues); - if (value.b().isPresent()) { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.b().get(), outputStream, sharedValues); - } - } - - public static org.zwobble.example.types.data.StructWithOption decodeStructWithOption(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a$isPresent = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); - java.util.Optional a; - if (a$isPresent) { - var a$element = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - a = java.util.Optional.of(a$element); - } else { - a = java.util.Optional.empty(); - } - var b$isPresent = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); - java.util.Optional b; - if (b$isPresent) { - var b$element = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); - b = java.util.Optional.of(b$element); - } else { - b = java.util.Optional.empty(); - } - return new org.zwobble.example.types.data.StructWithOption(a, b); - } - - public static void encodeEnumWithVariants(org.zwobble.example.types.data.EnumWithVariants value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.ordinal(), outputStream, sharedValues); - } - - private static final org.zwobble.example.types.data.EnumWithVariants[] EnumWithVariants$values = org.zwobble.example.types.data.EnumWithVariants.values(); - - public static org.zwobble.example.types.data.EnumWithVariants decodeEnumWithVariants(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var ordinal = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - if (ordinal >= 0 && ordinal < 3) { - return EnumWithVariants$values[ordinal]; - } else { - throw new java.io.IOException("unrecognised variant tag for data.EnumWithVariants: " + ordinal); - } - } - - public static void encodeStructWithEnum(org.zwobble.example.types.data.StructWithEnum value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeEnumWithVariants(value.inner(), outputStream, sharedValues); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.c(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithEnum decodeStructWithEnum(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var inner = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeEnumWithVariants(inputStream, sharedValues); - var c = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithEnum(inner, c); - } - - public static void encodeSumWithVariants(org.zwobble.example.types.data.SumWithVariants value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - switch (value) { - case org.zwobble.example.types.data.VariantOne value$0 -> { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(0, outputStream, sharedValues); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantOne(value$0, outputStream, sharedValues); - } - case org.zwobble.example.types.data.VariantTwo value$1 -> { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(1, outputStream, sharedValues); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantTwo(value$1, outputStream, sharedValues); - } - } - } - - public static org.zwobble.example.types.data.SumWithVariants decodeSumWithVariants(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var variantTag = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - switch (variantTag) { - case 0 -> { - var value$0 = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantOne(inputStream, sharedValues); - return value$0; - } - case 1 -> { - var value$1 = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantTwo(inputStream, sharedValues); - return value$1; - } - default -> { - throw new java.io.IOException("unrecognised variant tag for data.SumWithVariants: " + variantTag); - } - } - } - - public static void encodeVariantOne(org.zwobble.example.types.data.VariantOne value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.a(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.VariantOne decodeVariantOne(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - return new org.zwobble.example.types.data.VariantOne(a); - } - - public static void encodeVariantTwo(org.zwobble.example.types.data.VariantTwo value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(value.a(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.VariantTwo decodeVariantTwo(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - return new org.zwobble.example.types.data.VariantTwo(a); - } - - public static void encodeSumWithBoxedVariants(org.zwobble.example.types.data.SumWithBoxedVariants value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - switch (value) { - case org.zwobble.example.types.data.VariantOne value$0 -> { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(0, outputStream, sharedValues); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantOne(value$0, outputStream, sharedValues); - } - case org.zwobble.example.types.data.VariantTwo value$1 -> { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(1, outputStream, sharedValues); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantTwo(value$1, outputStream, sharedValues); - } - } - } - - public static org.zwobble.example.types.data.SumWithBoxedVariants decodeSumWithBoxedVariants(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var variantTag = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - switch (variantTag) { - case 0 -> { - var value$0 = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantOne(inputStream, sharedValues); - return value$0; - } - case 1 -> { - var value$1 = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantTwo(inputStream, sharedValues); - return value$1; - } - default -> { - throw new java.io.IOException("unrecognised variant tag for data.SumWithBoxedVariants: " + variantTag); - } - } - } - - public static void encodeStructWithSum(org.zwobble.example.types.data.StructWithSum value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeSumWithVariants(value.inner(), outputStream, sharedValues); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.b(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithSum decodeStructWithSum(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var inner = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeSumWithVariants(inputStream, sharedValues); - var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithSum(inner, b); - } - - public static void encodeStructWithNative(org.zwobble.example.types.data.StructWithNative value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeNative(value.a(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithNative decodeStructWithNative(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeNative(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithNative(a); - } - - public static void encodeStructWithGenericNative(org.zwobble.example.types.data.StructWithGenericNative value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value.a(), outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value.b(), outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$2); - } - - public static org.zwobble.example.types.data.StructWithGenericNative decodeStructWithGenericNative(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString); - var b = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$2); - return new org.zwobble.example.types.data.StructWithGenericNative(a, b); - } - - public static void encodeStructWithBox(org.zwobble.example.types.data.StructWithBox value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.inner(), outputStream, sharedValues); - } - - public static org.zwobble.example.types.data.StructWithBox decodeStructWithBox(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var inner = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); - return new org.zwobble.example.types.data.StructWithBox(inner); - } - - public static void encodeStructWithListOfShared(org.zwobble.example.types.data.StructWithListOfShared value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64((long) value.inner().size(), outputStream, sharedValues); - for (var element : value.inner()) { - { - var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, element)); - if (existingId != null) { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); - } else { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); - sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, element), (long) sharedValues.size()); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(element, outputStream, sharedValues); - } - } - } - } - - public static org.zwobble.example.types.data.StructWithListOfShared decodeStructWithListOfShared(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var inner$size = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (inner$size > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Lists longer than Integer.MAX_VALUE are not supported"); - } - var inner = new java.util.ArrayList((int) inner$size); - for (long inner$index = 0; inner$index < inner$size; inner$index++) { - var inner$element$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (inner$element$id > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); - } - org.zwobble.example.types.data.StructWithInt32 inner$element; - if (inner$element$id < sharedValues.size()) { - inner$element = switch (sharedValues.get((int) inner$element$id)) { - case org.zwobble.example.types.data.StructWithInt32 inner$element$decodedValue -> { - yield inner$element$decodedValue; - } - default -> { - throw new java.io.IOException("Shared value was of the wrong type"); - } - }; - } else { - var inner$element$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); - sharedValues.add(inner$element$decodedValue); - inner$element = inner$element$decodedValue; - } - inner.add(inner$element); - } - return new org.zwobble.example.types.data.StructWithListOfShared(inner); - } - - public static void encodeStructWithDifferentSharedTypes(org.zwobble.example.types.data.StructWithDifferentSharedTypes value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - { - var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, value.a())); - if (existingId != null) { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); - } else { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); - sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, value.a()), (long) sharedValues.size()); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.a(), outputStream, sharedValues); - } - } - { - var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(1, value.b())); - if (existingId != null) { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); - } else { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); - sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(1, value.b()), (long) sharedValues.size()); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt64(value.b(), outputStream, sharedValues); - } - } - { - var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, value.c())); - if (existingId != null) { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); - } else { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); - sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, value.c()), (long) sharedValues.size()); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.c(), outputStream, sharedValues); - } - } - } - - public static org.zwobble.example.types.data.StructWithDifferentSharedTypes decodeStructWithDifferentSharedTypes(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (a$id > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); - } - org.zwobble.example.types.data.StructWithInt32 a; - if (a$id < sharedValues.size()) { - a = switch (sharedValues.get((int) a$id)) { - case org.zwobble.example.types.data.StructWithInt32 a$decodedValue -> { - yield a$decodedValue; - } - default -> { - throw new java.io.IOException("Shared value was of the wrong type"); - } - }; - } else { - var a$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); - sharedValues.add(a$decodedValue); - a = a$decodedValue; - } - var b$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (b$id > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); - } - org.zwobble.example.types.data.StructWithInt64 b; - if (b$id < sharedValues.size()) { - b = switch (sharedValues.get((int) b$id)) { - case org.zwobble.example.types.data.StructWithInt64 b$decodedValue -> { - yield b$decodedValue; - } - default -> { - throw new java.io.IOException("Shared value was of the wrong type"); - } - }; - } else { - var b$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt64(inputStream, sharedValues); - sharedValues.add(b$decodedValue); - b = b$decodedValue; - } - var c$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (c$id > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); - } - org.zwobble.example.types.data.StructWithInt32 c; - if (c$id < sharedValues.size()) { - c = switch (sharedValues.get((int) c$id)) { - case org.zwobble.example.types.data.StructWithInt32 c$decodedValue -> { - yield c$decodedValue; - } - default -> { - throw new java.io.IOException("Shared value was of the wrong type"); - } - }; - } else { - var c$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); - sharedValues.add(c$decodedValue); - c = c$decodedValue; - } - return new org.zwobble.example.types.data.StructWithDifferentSharedTypes(a, b, c); - } - - public static void encodeStructWithSharedSumAndVariant(org.zwobble.example.types.data.StructWithSharedSumAndVariant value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - { - var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(2, value.a())); - if (existingId != null) { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); - } else { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); - sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(2, value.a()), (long) sharedValues.size()); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeSumWithVariants(value.a(), outputStream, sharedValues); - } - } - { - var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(3, value.b())); - if (existingId != null) { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); - } else { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); - sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(3, value.b()), (long) sharedValues.size()); - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantOne(value.b(), outputStream, sharedValues); - } - } - } - - public static org.zwobble.example.types.data.StructWithSharedSumAndVariant decodeStructWithSharedSumAndVariant(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var a$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (a$id > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); - } - org.zwobble.example.types.data.SumWithVariants a; - if (a$id < sharedValues.size()) { - a = switch (sharedValues.get((int) a$id)) { - case org.zwobble.example.types.data.SumWithVariants a$decodedValue -> { - yield a$decodedValue; - } - default -> { - throw new java.io.IOException("Shared value was of the wrong type"); - } - }; - } else { - var a$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeSumWithVariants(inputStream, sharedValues); - sharedValues.add(a$decodedValue); - a = a$decodedValue; - } - var b$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (b$id > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); - } - org.zwobble.example.types.data.VariantOne b; - if (b$id < sharedValues.size()) { - b = switch (sharedValues.get((int) b$id)) { - case org.zwobble.example.types.data.VariantOne b$decodedValue -> { - yield b$decodedValue; - } - default -> { - throw new java.io.IOException("Shared value was of the wrong type"); - } - }; - } else { - var b$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantOne(inputStream, sharedValues); - sharedValues.add(b$decodedValue); - b = b$decodedValue; - } - return new org.zwobble.example.types.data.StructWithSharedSumAndVariant(a, b); - } - - private static void encode$constructedType$0(java.util.Optional value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.isPresent(), outputStream, sharedValues); - if (value.isPresent()) { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeString(value.get(), outputStream, sharedValues); - } - } - - private static java.util.Optional decode$constructedType$0(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var value$isPresent = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); - java.util.Optional value; - if (value$isPresent) { - var value$element = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeString(inputStream, sharedValues); - value = java.util.Optional.of(value$element); - } else { - value = java.util.Optional.empty(); - } - return value; - } - - private static void encode$constructedType$1(org.zwobble.example.types.data.GenericStruct, org.zwobble.example.types.data.GenericStruct> value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericStruct(value, outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$3); - } - - private static org.zwobble.example.types.data.GenericStruct, org.zwobble.example.types.data.GenericStruct> decode$constructedType$1(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericStruct(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$3); - return value; - } - - private static void encode$constructedType$2(org.zwobble.example.types.data.GenericNative, org.zwobble.example.types.data.GenericNative> value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value, outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$4); - } - - private static org.zwobble.example.types.data.GenericNative, org.zwobble.example.types.data.GenericNative> decode$constructedType$2(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$4); - return value; - } - - private static void encode$constructedType$3(org.zwobble.example.types.data.GenericStruct value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericStruct(value, outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString); - } - - private static org.zwobble.example.types.data.GenericStruct decode$constructedType$3(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericStruct(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString); - return value; - } - - private static void encode$constructedType$4(org.zwobble.example.types.data.GenericNative value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value, outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString); - } - - private static org.zwobble.example.types.data.GenericNative decode$constructedType$4(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString); - return value; - } - - // Custom area start: org.zwobble.example.types.data.transient0.HobgoblinTransient0Data body - public static void encodeNative( - Native value, - OutputStream outputStream, - Map sharedValues - ) throws IOException { - HobgoblinTransient0Builtins.encodeInt32(value.a(), outputStream, sharedValues); - HobgoblinTransient0Builtins.encodeInt32(value.b(), outputStream, sharedValues); - } - - public static Native decodeNative( - InputStream inputStream, - List sharedValues - ) throws IOException { - var a = HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - var b = HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); - return new Native(a, b); - } - - public static void encodeGenericNative( - GenericNative value, - OutputStream outputStream, - Map sharedValues, - Encoder encoderA, - Encoder encoderB - ) throws IOException { - encoderA.encode(value.a(), outputStream, sharedValues); - encoderB.encode(value.b(), outputStream, sharedValues); - } - - public static GenericNative decodeGenericNative( - InputStream inputStream, - List sharedValues, - Decoder decoderA, - Decoder decoderB - ) throws IOException { - var a = decoderA.decode(inputStream, sharedValues); - var b = decoderB.decode(inputStream, sharedValues); - return new GenericNative(a, b); - } - // Custom area end: org.zwobble.example.types.data.transient0.HobgoblinTransient0Data body -} diff --git a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Decoder.java b/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Decoder.java deleted file mode 100644 index ad1a6d0..0000000 --- a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Decoder.java +++ /dev/null @@ -1,13 +0,0 @@ -// Generated by hobgoblin. - -package org.zwobble.example.types.transient0; - -// Custom area start: org.zwobble.example.types.transient0.Decoder imports -// Custom area end: org.zwobble.example.types.transient0.Decoder imports - -public interface Decoder { - public T decode(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException; - - // Custom area start: org.zwobble.example.types.transient0.Decoder body - // Custom area end: org.zwobble.example.types.transient0.Decoder body -} diff --git a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Encoder.java b/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Encoder.java deleted file mode 100644 index 2ba43a6..0000000 --- a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Encoder.java +++ /dev/null @@ -1,13 +0,0 @@ -// Generated by hobgoblin. - -package org.zwobble.example.types.transient0; - -// Custom area start: org.zwobble.example.types.transient0.Encoder imports -// Custom area end: org.zwobble.example.types.transient0.Encoder imports - -public interface Encoder { - public void encode(T value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException; - - // Custom area start: org.zwobble.example.types.transient0.Encoder body - // Custom area end: org.zwobble.example.types.transient0.Encoder body -} diff --git a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0Builtins.java b/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0Builtins.java deleted file mode 100644 index 861d7bb..0000000 --- a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0Builtins.java +++ /dev/null @@ -1,91 +0,0 @@ -// Generated by hobgoblin. - -package org.zwobble.example.types.transient0; - -// Custom area start: org.zwobble.example.types.transient0.HobgoblinTransient0Builtins imports -// Custom area end: org.zwobble.example.types.transient0.HobgoblinTransient0Builtins imports - -public final class HobgoblinTransient0Builtins { - public static void encodeBool(boolean value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - outputStream.write(value ? 1 : 0); - } - - public static boolean decodeBool(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - return inputStream.read() != 0; - } - - public static void encodeFloat64(double value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(java.lang.Double.doubleToLongBits(value), outputStream, sharedValues); - } - - public static double decodeFloat64(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var longBits = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - return java.lang.Double.longBitsToDouble(longBits); - } - - public static void encodeInt8(byte value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - outputStream.write(value); - } - - public static byte decodeInt8(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - return (byte) inputStream.read(); - } - - public static void encodeInt32(int value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - outputStream.write(value >>> 0 & 255); - outputStream.write(value >>> 8 & 255); - outputStream.write(value >>> 16 & 255); - outputStream.write(value >>> 24 & 255); - } - - public static int decodeInt32(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - int value = 0; - value = value | inputStream.read() << 0; - value = value | inputStream.read() << 8; - value = value | inputStream.read() << 16; - value = value | inputStream.read() << 24; - return value; - } - - public static void encodeInt64(long value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - outputStream.write((int) (value >>> 0 & 255)); - outputStream.write((int) (value >>> 8 & 255)); - outputStream.write((int) (value >>> 16 & 255)); - outputStream.write((int) (value >>> 24 & 255)); - outputStream.write((int) (value >>> 32 & 255)); - outputStream.write((int) (value >>> 40 & 255)); - outputStream.write((int) (value >>> 48 & 255)); - outputStream.write((int) (value >>> 56 & 255)); - } - - public static long decodeInt64(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - long value = 0; - value = value | (long) inputStream.read() << 0; - value = value | (long) inputStream.read() << 8; - value = value | (long) inputStream.read() << 16; - value = value | (long) inputStream.read() << 24; - value = value | (long) inputStream.read() << 32; - value = value | (long) inputStream.read() << 40; - value = value | (long) inputStream.read() << 48; - value = value | (long) inputStream.read() << 56; - return value; - } - - public static void encodeString(String value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { - var bytes = value.getBytes(java.nio.charset.StandardCharsets.UTF_8); - org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64((long) bytes.length, outputStream, sharedValues); - outputStream.write(bytes); - } - - public static String decodeString(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { - var bytesLength = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); - if (bytesLength > java.lang.Integer.MAX_VALUE) { - throw new java.io.IOException("Strings longer than Integer.MAX_VALUE are not supported"); - } - var bytes = inputStream.readNBytes((int) bytesLength); - return new String(bytes, java.nio.charset.StandardCharsets.UTF_8); - } - - // Custom area start: org.zwobble.example.types.transient0.HobgoblinTransient0Builtins body - // Custom area end: org.zwobble.example.types.transient0.HobgoblinTransient0Builtins body -} diff --git a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0TaggedSharedValue.java b/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0TaggedSharedValue.java deleted file mode 100644 index 6c5b520..0000000 --- a/examples/16-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0TaggedSharedValue.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by hobgoblin. - -package org.zwobble.example.types.transient0; - -// Custom area start: org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue imports -// Custom area end: org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue imports - -public record HobgoblinTransient0TaggedSharedValue( - long typeId, - java.lang.Object value -) { - public boolean equals(java.lang.Object other) { - return other instanceof org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue otherSharedValue && this.typeId == otherSharedValue.typeId && this.value == otherSharedValue.value; - } - - public int hashCode() { - return 37 * (37 * 17 + java.lang.Long.hashCode(this.typeId)) + java.lang.System.identityHashCode(this.value); - } - - // Custom area start: org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue body - // Custom area end: org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue body -} diff --git a/examples/16-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java b/examples/16-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java deleted file mode 100644 index 1a1d659..0000000 --- a/examples/16-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java +++ /dev/null @@ -1,452 +0,0 @@ -package org.zwobble.example; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.zwobble.example.types.data.EnumWithVariants; -import org.zwobble.example.types.data.GenericNative; -import org.zwobble.example.types.data.GenericStruct; -import org.zwobble.example.types.data.Native; -import org.zwobble.example.types.data.StructSingleton; -import org.zwobble.example.types.data.StructWithBool; -import org.zwobble.example.types.data.StructWithBox; -import org.zwobble.example.types.data.StructWithDifferentSharedTypes; -import org.zwobble.example.types.data.StructWithEnum; -import org.zwobble.example.types.data.StructWithFloat64; -import org.zwobble.example.types.data.StructWithGenericNative; -import org.zwobble.example.types.data.StructWithGenericStruct; -import org.zwobble.example.types.data.StructWithInt8; -import org.zwobble.example.types.data.StructWithInt32; -import org.zwobble.example.types.data.StructWithInt64; -import org.zwobble.example.types.data.StructWithList; -import org.zwobble.example.types.data.StructWithListOfShared; -import org.zwobble.example.types.data.StructWithNative; -import org.zwobble.example.types.data.StructWithOption; -import org.zwobble.example.types.data.StructWithSharedSumAndVariant; -import org.zwobble.example.types.data.StructWithString; -import org.zwobble.example.types.data.StructWithStruct; -import org.zwobble.example.types.data.StructWithSum; -import org.zwobble.example.types.data.VariantOne; -import org.zwobble.example.types.data.VariantTwo; -import org.zwobble.example.types.data.transient0.HobgoblinTransient0Data; -import org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue; - -public class Transient0Tests { - @Test - public void structSingleton() throws IOException { - var value = StructSingleton.INSTANCE; - - assertRoundTripEncoding( - "StructSingleton", - value, - HobgoblinTransient0Data::encodeStructSingleton, - HobgoblinTransient0Data::decodeStructSingleton - ); - } - - @Test - public void structWithBool() throws IOException { - var value = new StructWithBool(true, false); - - assertRoundTripEncoding( - "StructWithBool", - value, - HobgoblinTransient0Data::encodeStructWithBool, - HobgoblinTransient0Data::decodeStructWithBool - ); - } - - @Test - public void structWithFloat64() throws IOException { - var value = new StructWithFloat64(10, 2.5); - - assertRoundTripEncoding( - "StructWithFloat64", - value, - HobgoblinTransient0Data::encodeStructWithFloat64, - HobgoblinTransient0Data::decodeStructWithFloat64 - ); - } - - @Test - public void structWithInt8() throws IOException { - var value = new StructWithInt8((byte)10, (byte)25); - - assertRoundTripEncoding( - "StructWithInt8", - value, - HobgoblinTransient0Data::encodeStructWithInt8, - HobgoblinTransient0Data::decodeStructWithInt8 - ); - } - - @Test - public void structWithInt32() throws IOException { - var value = new StructWithInt32(10, 25); - - assertRoundTripEncoding( - "StructWithInt32", - value, - HobgoblinTransient0Data::encodeStructWithInt32, - HobgoblinTransient0Data::decodeStructWithInt32 - ); - } - - @Test - public void structWithInt32MinAndMax() throws IOException { - var value = new StructWithInt32(Integer.MIN_VALUE, Integer.MAX_VALUE); - - assertRoundTripEncoding( - "StructWithInt32MinAndMax", - value, - HobgoblinTransient0Data::encodeStructWithInt32, - HobgoblinTransient0Data::decodeStructWithInt32 - ); - } - - @Test - public void structWithInt64() throws IOException { - var value = new StructWithInt64(10, 25); - - assertRoundTripEncoding( - "StructWithInt64", - value, - HobgoblinTransient0Data::encodeStructWithInt64, - HobgoblinTransient0Data::decodeStructWithInt64 - ); - } - - @Test - public void structWithInt64MinAndMax() throws IOException { - var value = new StructWithInt64(Long.MIN_VALUE, Long.MAX_VALUE); - - assertRoundTripEncoding( - "StructWithInt64MinAndMax", - value, - HobgoblinTransient0Data::encodeStructWithInt64, - HobgoblinTransient0Data::decodeStructWithInt64 - ); - } - - @Test - public void structWithString() throws IOException { - var value = new StructWithString("abc", "def"); - - assertRoundTripEncoding( - "StructWithString", - value, - HobgoblinTransient0Data::encodeStructWithString, - HobgoblinTransient0Data::decodeStructWithString - ); - } - - @Test - public void structWithStruct() throws IOException { - var value = new StructWithStruct(new StructWithInt32(10, 25), 42); - - assertRoundTripEncoding( - "StructWithStruct", - value, - HobgoblinTransient0Data::encodeStructWithStruct, - HobgoblinTransient0Data::decodeStructWithStruct - ); - } - - @Test - public void structWithGenericStruct() throws IOException { - var value = new StructWithGenericStruct( - new GenericStruct(10, "x1"), - new GenericStruct( - Optional.of("x2"), - new GenericStruct( - Optional.of("x3"), - new GenericStruct("x4", "x5") - ) - ) - ); - - assertRoundTripEncoding( - "StructWithGenericStruct", - value, - HobgoblinTransient0Data::encodeStructWithGenericStruct, - HobgoblinTransient0Data::decodeStructWithGenericStruct - ); - } - - @Test - public void structWithList() throws IOException { - var value = new StructWithList( - List.of(10L, 25L), - List.of( - new StructWithInt32(42, 47), - new StructWithInt32(52, 57), - new StructWithInt32(62, 67) - ) - ); - - assertRoundTripEncoding( - "StructWithList", - value, - HobgoblinTransient0Data::encodeStructWithList, - HobgoblinTransient0Data::decodeStructWithList - ); - } - - @Test - public void structWithOptionNone() throws IOException { - var value = new StructWithOption( - Optional.empty(), - Optional.empty() - ); - - assertRoundTripEncoding( - "StructWithOption_None", - value, - HobgoblinTransient0Data::encodeStructWithOption, - HobgoblinTransient0Data::decodeStructWithOption - ); - } - - @Test - public void structWithOptionSome() throws IOException { - var value = new StructWithOption( - Optional.of(10L), - Optional.of(new StructWithInt32(42, 47)) - ); - - assertRoundTripEncoding( - "StructWithOption_Some", - value, - HobgoblinTransient0Data::encodeStructWithOption, - HobgoblinTransient0Data::decodeStructWithOption - ); - } - - @Test - public void enumWithVariants() throws IOException { - assertRoundTripEncoding( - "EnumWithVariants_zero", - EnumWithVariants.ZERO, - HobgoblinTransient0Data::encodeEnumWithVariants, - HobgoblinTransient0Data::decodeEnumWithVariants - ); - - assertRoundTripEncoding( - "EnumWithVariants_one", - EnumWithVariants.ONE, - HobgoblinTransient0Data::encodeEnumWithVariants, - HobgoblinTransient0Data::decodeEnumWithVariants - ); - - assertRoundTripEncoding( - "EnumWithVariants_two", - EnumWithVariants.TWO, - HobgoblinTransient0Data::encodeEnumWithVariants, - HobgoblinTransient0Data::decodeEnumWithVariants - ); - } - - @Test - public void structWithEnum() throws IOException { - var value = new StructWithEnum( - EnumWithVariants.ONE, - 42 - ); - - assertRoundTripEncoding( - "StructWithEnum", - value, - HobgoblinTransient0Data::encodeStructWithEnum, - HobgoblinTransient0Data::decodeStructWithEnum - ); - } - - @Test - public void sumWithVariants() throws IOException { - assertRoundTripEncoding( - "SumWithVariants_VariantOne", - new VariantOne(10), - HobgoblinTransient0Data::encodeSumWithVariants, - HobgoblinTransient0Data::decodeSumWithVariants - ); - - assertRoundTripEncoding( - "SumWithVariants_VariantTwo", - new VariantTwo(25), - HobgoblinTransient0Data::encodeSumWithVariants, - HobgoblinTransient0Data::decodeSumWithVariants - ); - } - - @Test - public void sumWithBoxedVariants() throws IOException { - assertRoundTripEncoding( - "SumWithBoxedVariants_VariantOne", - new VariantOne(10), - HobgoblinTransient0Data::encodeSumWithBoxedVariants, - HobgoblinTransient0Data::decodeSumWithBoxedVariants - ); - - assertRoundTripEncoding( - "SumWithBoxedVariants_VariantTwo", - new VariantTwo(25), - HobgoblinTransient0Data::encodeSumWithBoxedVariants, - HobgoblinTransient0Data::decodeSumWithBoxedVariants - ); - } - - @Test - public void structWithSum() throws IOException { - var value = new StructWithSum( - new VariantTwo(25), - 42 - ); - - assertRoundTripEncoding( - "StructWithSum", - value, - HobgoblinTransient0Data::encodeStructWithSum, - HobgoblinTransient0Data::decodeStructWithSum - ); - } - - @Test - public void structWithNative() throws IOException { - var value = new StructWithNative( - new Native(10, 25) - ); - - assertRoundTripEncoding( - "StructWithNative", - value, - HobgoblinTransient0Data::encodeStructWithNative, - HobgoblinTransient0Data::decodeStructWithNative - ); - } - - @Test - public void structWithGenericNative() throws IOException { - var value = new StructWithGenericNative( - new GenericNative(10, "x1"), - new GenericNative( - Optional.of("x2"), - new GenericNative( - Optional.of("x3"), - new GenericNative("x4", "x5") - ) - ) - ); - - assertRoundTripEncoding( - "StructWithGenericNative", - value, - HobgoblinTransient0Data::encodeStructWithGenericNative, - HobgoblinTransient0Data::decodeStructWithGenericNative - ); - } - - @Test - public void structWithBox() throws IOException { - var value = new StructWithBox( - new StructWithInt32(10, 25) - ); - - assertRoundTripEncoding( - "StructWithBox", - value, - HobgoblinTransient0Data::encodeStructWithBox, - HobgoblinTransient0Data::decodeStructWithBox - ); - } - - @Test - public void structWithListOfShared() throws IOException { - var a = new StructWithInt32(10, 25); - var b = new StructWithInt32(42, 47); - - var value = new StructWithListOfShared(List.of(a, a, b, a, b)); - - var decodedValue = assertRoundTripEncoding( - "StructWithListOfShared", - value, - HobgoblinTransient0Data::encodeStructWithListOfShared, - HobgoblinTransient0Data::decodeStructWithListOfShared - ); - Assertions.assertSame(decodedValue.inner().get(0), decodedValue.inner().get(1)); - Assertions.assertSame(decodedValue.inner().get(0), decodedValue.inner().get(3)); - Assertions.assertSame(decodedValue.inner().get(2), decodedValue.inner().get(4)); - } - - @Test - public void structWithDifferentSharedTypes() throws IOException { - var a = new StructWithInt32(10, 25); - var b = new StructWithInt64(42, 47); - var c = new StructWithInt32(52, 57); - - var value = new StructWithDifferentSharedTypes(a, b, c); - - assertRoundTripEncoding( - "StructWithDifferentSharedTypes", - value, - HobgoblinTransient0Data::encodeStructWithDifferentSharedTypes, - HobgoblinTransient0Data::decodeStructWithDifferentSharedTypes - ); - } - - @Test - public void structWithSharedSumAndVariant() throws IOException { - var a = new VariantOne(10); - - var value = new StructWithSharedSumAndVariant(a, a); - - assertRoundTripEncoding( - "StructWithSharedSumAndVariant", - value, - HobgoblinTransient0Data::encodeStructWithSharedSumAndVariant, - HobgoblinTransient0Data::decodeStructWithSharedSumAndVariant - ); - } - - private T assertRoundTripEncoding( - String name, - T value, - Encoder encoder, - Decoder decoder - ) throws IOException { - var outputStream = new ByteArrayOutputStream(); - encoder.encode(value, outputStream, new HashMap<>()); - var bytes = outputStream.toByteArray(); - - var outputDir = System.getenv("HOBGOBLIN_OUTPUT_DIR"); - var transient0OutputDir = Path.of(outputDir).resolve("transient-0"); - Files.createDirectories(transient0OutputDir); - var transient0OutputPath = transient0OutputDir.resolve(name); - Files.write(transient0OutputPath, bytes); - - var inputStream = new ByteArrayInputStream(bytes); - var decodedValue = decoder.decode(inputStream, new ArrayList<>()); - - Assertions.assertEquals(value, decodedValue); - - return decodedValue; - } - - private interface Encoder { - void encode(T value, OutputStream outputStream, Map sharedValues) throws IOException; - } - - private interface Decoder { - T decode(InputStream inputStream, List sharedValues) throws IOException; - } -} diff --git a/examples/16-transient-0/output/rust/.gitignore b/examples/16-transient-0/output/rust/.gitignore deleted file mode 100644 index fc03479..0000000 --- a/examples/16-transient-0/output/rust/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -/transient-0/ diff --git a/examples/16-transient-0/output/rust/Cargo.lock b/examples/16-transient-0/output/rust/Cargo.lock deleted file mode 100644 index 9dc6e3e..0000000 --- a/examples/16-transient-0/output/rust/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "example" -version = "0.1.0" diff --git a/examples/16-transient-0/output/rust/Cargo.toml b/examples/16-transient-0/output/rust/Cargo.toml deleted file mode 100644 index 5d4c622..0000000 --- a/examples/16-transient-0/output/rust/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "example" -version = "0.1.0" -edition = "2024" - -[dependencies] diff --git a/examples/16-transient-0/output/rust/rust-toolchain.toml b/examples/16-transient-0/output/rust/rust-toolchain.toml deleted file mode 100644 index 4fedb95..0000000 --- a/examples/16-transient-0/output/rust/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "1.96" diff --git a/examples/16-transient-0/output/rust/src/data.rs b/examples/16-transient-0/output/rust/src/data.rs deleted file mode 100644 index 2b890c2..0000000 --- a/examples/16-transient-0/output/rust/src/data.rs +++ /dev/null @@ -1,66 +0,0 @@ -include!("./gen/data.rs"); - -#[derive(Clone, Debug, Hash, PartialEq)] -pub struct Native { - pub a: i32, - pub b: i32, -} - -#[derive(Clone, Debug, Hash, PartialEq)] -pub struct GenericNative { - pub a: A, - pub b: B, -} - - -pub mod transient_0 { - use ::std::any::Any; - use ::std::sync::Arc; - use ::std::vec::Vec; - use crate::transient_0::{Decode, Encode}; - use super::{GenericNative, Native}; - - include!("./gen/data/transient_0.rs"); - - pub fn encode_native( - value: &Native, - writer: &mut impl std::io::Write, - shared_values: &mut ::std::collections::HashMap::, - ) -> std::io::Result<()> { - crate::transient_0::encode_int_32(&value.a, writer, shared_values)?; - crate::transient_0::encode_int_32(&value.b, writer, shared_values)?; - Ok(()) - } - - pub fn decode_native( - reader: &mut impl std::io::Read, - shared_values: &mut Vec>, - ) -> std::io::Result { - let a = crate::transient_0::decode_int_32(reader, shared_values)?; - let b = crate::transient_0::decode_int_32(reader, shared_values)?; - Ok(Native { a, b }) - } - - pub fn encode_generic_native( - value: &GenericNative, - writer: &mut TWrite, - shared_values: &mut ::std::collections::HashMap::, - encode_a: Encode, - encode_b: Encode, - ) -> std::io::Result<()> { - encode_a(&value.a, writer, shared_values)?; - encode_b(&value.b, writer, shared_values)?; - Ok(()) - } - - pub fn decode_generic_native( - reader: &mut TRead, - shared_values: &mut Vec>, - decode_a: Decode, - decode_b: Decode, - ) -> std::io::Result> { - let a = decode_a(reader, shared_values)?; - let b = decode_b(reader, shared_values)?; - Ok(GenericNative { a, b }) - } -} diff --git a/examples/16-transient-0/output/rust/src/gen/data.rs b/examples/16-transient-0/output/rust/src/gen/data.rs deleted file mode 100644 index 2b344e4..0000000 --- a/examples/16-transient-0/output/rust/src/gen/data.rs +++ /dev/null @@ -1,169 +0,0 @@ -// Generated by hobgoblin. - -#[derive(Clone, Debug, PartialEq)] -pub struct StructSingleton; - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithBool { - pub a: ::core::primitive::bool, - pub b: ::core::primitive::bool, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithFloat64 { - pub a: ::core::primitive::f64, - pub b: ::core::primitive::f64, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithInt8 { - pub a: ::core::primitive::i8, - pub b: ::core::primitive::i8, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithInt32 { - pub a: ::core::primitive::i32, - pub b: ::core::primitive::i32, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithInt64 { - pub a: ::core::primitive::i64, - pub b: ::core::primitive::i64, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithString { - pub a: ::std::string::String, - pub b: ::std::string::String, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithStruct { - pub inner: crate::data::StructWithInt32, - pub c: ::core::primitive::i32, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct GenericStruct { - pub a: A, - pub b: B, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithGenericStruct { - pub a: crate::data::GenericStruct::<::core::primitive::i32, ::std::string::String>, - pub b: crate::data::GenericStruct::<::std::option::Option::<::std::string::String>, crate::data::GenericStruct::<::std::option::Option::<::std::string::String>, crate::data::GenericStruct::<::std::string::String, ::std::string::String>>>, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithList { - pub a: ::std::vec::Vec::<::core::primitive::i64>, - pub b: ::std::vec::Vec::, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithOption { - pub a: ::std::option::Option::<::core::primitive::i64>, - pub b: ::std::option::Option::, -} - -#[derive(Clone, Copy, Debug, Hash, PartialEq)] -pub enum EnumWithVariants { - Zero, - One, - Two, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithEnum { - pub inner: crate::data::EnumWithVariants, - pub c: ::core::primitive::i32, -} - -#[derive(Clone, Debug, PartialEq)] -pub enum SumWithVariants { - VariantOne(crate::data::VariantOne), - VariantTwo(crate::data::VariantTwo), -} - -impl ::std::convert::From:: for crate::data::SumWithVariants { - fn from(value: crate::data::VariantOne) -> Self { - Self::VariantOne(value) - } -} - -impl ::std::convert::From:: for crate::data::SumWithVariants { - fn from(value: crate::data::VariantTwo) -> Self { - Self::VariantTwo(value) - } -} - -#[derive(Clone, Debug, PartialEq)] -pub struct VariantOne { - pub a: ::core::primitive::i32, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct VariantTwo { - pub a: ::core::primitive::i64, -} - -#[derive(Clone, Debug, PartialEq)] -pub enum SumWithBoxedVariants { - VariantOne(::std::boxed::Box::), - VariantTwo(::std::boxed::Box::), -} - -impl ::std::convert::From:: for crate::data::SumWithBoxedVariants { - fn from(value: crate::data::VariantOne) -> Self { - Self::VariantOne(::std::boxed::Box::new(value)) - } -} - -impl ::std::convert::From:: for crate::data::SumWithBoxedVariants { - fn from(value: crate::data::VariantTwo) -> Self { - Self::VariantTwo(::std::boxed::Box::new(value)) - } -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithSum { - pub inner: crate::data::SumWithVariants, - pub b: ::core::primitive::i32, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithNative { - pub a: crate::data::Native, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithGenericNative { - pub a: crate::data::GenericNative::<::core::primitive::i32, ::std::string::String>, - pub b: crate::data::GenericNative::<::std::option::Option::<::std::string::String>, crate::data::GenericNative::<::std::option::Option::<::std::string::String>, crate::data::GenericNative::<::std::string::String, ::std::string::String>>>, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithBox { - pub inner: ::std::boxed::Box::, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithListOfShared { - pub inner: ::std::vec::Vec::<::std::sync::Arc::>, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithDifferentSharedTypes { - pub a: ::std::sync::Arc::, - pub b: ::std::sync::Arc::, - pub c: ::std::sync::Arc::, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct StructWithSharedSumAndVariant { - pub a: ::std::sync::Arc::, - pub b: ::std::sync::Arc::, -} diff --git a/examples/16-transient-0/output/rust/src/gen/data/transient_0.rs b/examples/16-transient-0/output/rust/src/gen/data/transient_0.rs deleted file mode 100644 index 3c40ea2..0000000 --- a/examples/16-transient-0/output/rust/src/gen/data/transient_0.rs +++ /dev/null @@ -1,621 +0,0 @@ -// Generated by hobgoblin. - -pub fn encode_struct_singleton(value: &crate::data::StructSingleton, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_singleton(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - ::std::io::Result::Ok(crate::data::StructSingleton) -} - -pub fn encode_struct_with_bool(value: &crate::data::StructWithBool, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_bool(&value.a, writer, shared_values)?; - crate::transient_0::encode_bool(&value.b, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_bool(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::transient_0::decode_bool(reader, shared_values)?; - let b = crate::transient_0::decode_bool(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithBool { a: a, b: b }) -} - -pub fn encode_struct_with_float_64(value: &crate::data::StructWithFloat64, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_float_64(&value.a, writer, shared_values)?; - crate::transient_0::encode_float_64(&value.b, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_float_64(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::transient_0::decode_float_64(reader, shared_values)?; - let b = crate::transient_0::decode_float_64(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithFloat64 { a: a, b: b }) -} - -pub fn encode_struct_with_int_8(value: &crate::data::StructWithInt8, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_int_8(&value.a, writer, shared_values)?; - crate::transient_0::encode_int_8(&value.b, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_int_8(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::transient_0::decode_int_8(reader, shared_values)?; - let b = crate::transient_0::decode_int_8(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithInt8 { a: a, b: b }) -} - -pub fn encode_struct_with_int_32(value: &crate::data::StructWithInt32, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_int_32(&value.a, writer, shared_values)?; - crate::transient_0::encode_int_32(&value.b, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_int_32(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::transient_0::decode_int_32(reader, shared_values)?; - let b = crate::transient_0::decode_int_32(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithInt32 { a: a, b: b }) -} - -pub fn encode_struct_with_int_64(value: &crate::data::StructWithInt64, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_int_64(&value.a, writer, shared_values)?; - crate::transient_0::encode_int_64(&value.b, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_int_64(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::transient_0::decode_int_64(reader, shared_values)?; - let b = crate::transient_0::decode_int_64(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithInt64 { a: a, b: b }) -} - -pub fn encode_struct_with_string(value: &crate::data::StructWithString, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_string(&value.a, writer, shared_values)?; - crate::transient_0::encode_string(&value.b, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_string(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::transient_0::decode_string(reader, shared_values)?; - let b = crate::transient_0::decode_string(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithString { a: a, b: b }) -} - -pub fn encode_struct_with_struct(value: &crate::data::StructWithStruct, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::data::transient_0::encode_struct_with_int_32(&value.inner, writer, shared_values)?; - crate::transient_0::encode_int_32(&value.c, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_struct(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let inner = crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?; - let c = crate::transient_0::decode_int_32(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithStruct { inner: inner, c: c }) -} - -pub fn encode_generic_struct(value: &crate::data::GenericStruct::, writer: &mut TWrite, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>, encode_a: crate::transient_0::Encode::, encode_b: crate::transient_0::Encode::) -> ::std::io::Result::<()> { - encode_a(&value.a, writer, shared_values)?; - encode_b(&value.b, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_generic_struct(reader: &mut TRead, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>, decode_a: crate::transient_0::Decode::, decode_b: crate::transient_0::Decode::) -> ::std::io::Result::> { - let a = decode_a(reader, shared_values)?; - let b = decode_b(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::GenericStruct:: { a: a, b: b }) -} - -pub fn encode_struct_with_generic_struct(value: &crate::data::StructWithGenericStruct, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::data::transient_0::encode_generic_struct(&value.a, writer, shared_values, |value, writer, shared_values| { - crate::transient_0::encode_int_32(value, writer, shared_values)?; - ::std::io::Result::Ok(()) - }, |value, writer, shared_values| { - crate::transient_0::encode_string(value, writer, shared_values)?; - ::std::io::Result::Ok(()) - })?; - crate::data::transient_0::encode_generic_struct(&value.b, writer, shared_values, |value, writer, shared_values| { - match value { - ::std::option::Option::Some(value) => { - crate::transient_0::encode_bool(&true, writer, shared_values)?; - crate::transient_0::encode_string(&value, writer, shared_values)?; - }, - ::std::option::Option::None => { - crate::transient_0::encode_bool(&false, writer, shared_values)?; - }, - }; - ::std::io::Result::Ok(()) - }, |value, writer, shared_values| { - crate::data::transient_0::encode_generic_struct(value, writer, shared_values, |value, writer, shared_values| { - match value { - ::std::option::Option::Some(value) => { - crate::transient_0::encode_bool(&true, writer, shared_values)?; - crate::transient_0::encode_string(&value, writer, shared_values)?; - }, - ::std::option::Option::None => { - crate::transient_0::encode_bool(&false, writer, shared_values)?; - }, - }; - ::std::io::Result::Ok(()) - }, |value, writer, shared_values| { - crate::data::transient_0::encode_generic_struct(value, writer, shared_values, |value, writer, shared_values| { - crate::transient_0::encode_string(value, writer, shared_values)?; - ::std::io::Result::Ok(()) - }, |value, writer, shared_values| { - crate::transient_0::encode_string(value, writer, shared_values)?; - ::std::io::Result::Ok(()) - })?; - ::std::io::Result::Ok(()) - })?; - ::std::io::Result::Ok(()) - })?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_generic_struct(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::data::transient_0::decode_generic_struct(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_int_32(reader, shared_values)?), |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?))?; - let b = crate::data::transient_0::decode_generic_struct(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok({ - let is_some = crate::transient_0::decode_bool(reader, shared_values)?; - if is_some { - ::std::option::Option::Some(crate::transient_0::decode_string(reader, shared_values)?) - } else { - ::std::option::Option::None - } - }), |reader, shared_values| ::std::io::Result::Ok(crate::data::transient_0::decode_generic_struct(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok({ - let is_some = crate::transient_0::decode_bool(reader, shared_values)?; - if is_some { - ::std::option::Option::Some(crate::transient_0::decode_string(reader, shared_values)?) - } else { - ::std::option::Option::None - } - }), |reader, shared_values| ::std::io::Result::Ok(crate::data::transient_0::decode_generic_struct(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?), |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?))?))?))?; - ::std::io::Result::Ok(crate::data::StructWithGenericStruct { a: a, b: b }) -} - -pub fn encode_struct_with_list(value: &crate::data::StructWithList, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - { - crate::transient_0::encode_int_64(&(((&value.a).len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?, writer, shared_values)?; - for element in &value.a { - crate::transient_0::encode_int_64(element, writer, shared_values)?; - }; - }; - { - crate::transient_0::encode_int_64(&(((&value.b).len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?, writer, shared_values)?; - for element in &value.b { - crate::data::transient_0::encode_struct_with_int_32(element, writer, shared_values)?; - }; - }; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_list(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = { - let len = crate::transient_0::decode_int_64(reader, shared_values)?; - let mut elements = ::std::vec::Vec::with_capacity((len.try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?); - for _ in 0..len { - elements.push(crate::transient_0::decode_int_64(reader, shared_values)?); - }; - elements - }; - let b = { - let len = crate::transient_0::decode_int_64(reader, shared_values)?; - let mut elements = ::std::vec::Vec::with_capacity((len.try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?); - for _ in 0..len { - elements.push(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); - }; - elements - }; - ::std::io::Result::Ok(crate::data::StructWithList { a: a, b: b }) -} - -pub fn encode_struct_with_option(value: &crate::data::StructWithOption, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - match &value.a { - ::std::option::Option::Some(value) => { - crate::transient_0::encode_bool(&true, writer, shared_values)?; - crate::transient_0::encode_int_64(&value, writer, shared_values)?; - }, - ::std::option::Option::None => { - crate::transient_0::encode_bool(&false, writer, shared_values)?; - }, - }; - match &value.b { - ::std::option::Option::Some(value) => { - crate::transient_0::encode_bool(&true, writer, shared_values)?; - crate::data::transient_0::encode_struct_with_int_32(&value, writer, shared_values)?; - }, - ::std::option::Option::None => { - crate::transient_0::encode_bool(&false, writer, shared_values)?; - }, - }; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_option(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = { - let is_some = crate::transient_0::decode_bool(reader, shared_values)?; - if is_some { - ::std::option::Option::Some(crate::transient_0::decode_int_64(reader, shared_values)?) - } else { - ::std::option::Option::None - } - }; - let b = { - let is_some = crate::transient_0::decode_bool(reader, shared_values)?; - if is_some { - ::std::option::Option::Some(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?) - } else { - ::std::option::Option::None - } - }; - ::std::io::Result::Ok(crate::data::StructWithOption { a: a, b: b }) -} - -pub fn encode_enum_with_variants(value: &crate::data::EnumWithVariants, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_int_32(&match value { - crate::data::EnumWithVariants::Zero => 0, - crate::data::EnumWithVariants::One => 1, - crate::data::EnumWithVariants::Two => 2, - }, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_enum_with_variants(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - ::std::io::Result::Ok(match &crate::transient_0::decode_int_32(reader, shared_values)? { - 0 => crate::data::EnumWithVariants::Zero, - 1 => crate::data::EnumWithVariants::One, - 2 => crate::data::EnumWithVariants::Two, - tag => ::std::result::Result::Err(::std::io::Error::new(::std::io::ErrorKind::InvalidData, format!("unrecognised variant tag for data.EnumWithVariants: {}", tag)))?, - }) -} - -pub fn encode_struct_with_enum(value: &crate::data::StructWithEnum, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::data::transient_0::encode_enum_with_variants(&value.inner, writer, shared_values)?; - crate::transient_0::encode_int_32(&value.c, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_enum(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let inner = crate::data::transient_0::decode_enum_with_variants(reader, shared_values)?; - let c = crate::transient_0::decode_int_32(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithEnum { inner: inner, c: c }) -} - -pub fn encode_sum_with_variants(value: &crate::data::SumWithVariants, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - match value { - crate::data::SumWithVariants::VariantOne(value) => { - crate::transient_0::encode_int_32(&0, writer, shared_values)?; - crate::data::transient_0::encode_variant_one(value, writer, shared_values)?; - }, - crate::data::SumWithVariants::VariantTwo(value) => { - crate::transient_0::encode_int_32(&1, writer, shared_values)?; - crate::data::transient_0::encode_variant_two(value, writer, shared_values)?; - }, - }; - ::std::io::Result::Ok(()) -} - -pub fn decode_sum_with_variants(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - ::std::io::Result::Ok(match &crate::transient_0::decode_int_32(reader, shared_values)? { - 0 => crate::data::SumWithVariants::VariantOne(crate::data::transient_0::decode_variant_one(reader, shared_values)?), - 1 => crate::data::SumWithVariants::VariantTwo(crate::data::transient_0::decode_variant_two(reader, shared_values)?), - tag => ::std::result::Result::Err(::std::io::Error::new(::std::io::ErrorKind::InvalidData, format!("unrecognised variant tag for data.SumWithVariants: {}", tag)))?, - }) -} - -pub fn encode_variant_one(value: &crate::data::VariantOne, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_int_32(&value.a, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_variant_one(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::transient_0::decode_int_32(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::VariantOne { a: a }) -} - -pub fn encode_variant_two(value: &crate::data::VariantTwo, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_int_64(&value.a, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_variant_two(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::transient_0::decode_int_64(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::VariantTwo { a: a }) -} - -pub fn encode_sum_with_boxed_variants(value: &crate::data::SumWithBoxedVariants, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - match value { - crate::data::SumWithBoxedVariants::VariantOne(value) => { - crate::transient_0::encode_int_32(&0, writer, shared_values)?; - crate::data::transient_0::encode_variant_one(value.as_ref(), writer, shared_values)?; - }, - crate::data::SumWithBoxedVariants::VariantTwo(value) => { - crate::transient_0::encode_int_32(&1, writer, shared_values)?; - crate::data::transient_0::encode_variant_two(value.as_ref(), writer, shared_values)?; - }, - }; - ::std::io::Result::Ok(()) -} - -pub fn decode_sum_with_boxed_variants(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - ::std::io::Result::Ok(match &crate::transient_0::decode_int_32(reader, shared_values)? { - 0 => crate::data::SumWithBoxedVariants::VariantOne(::std::boxed::Box::new(crate::data::transient_0::decode_variant_one(reader, shared_values)?)), - 1 => crate::data::SumWithBoxedVariants::VariantTwo(::std::boxed::Box::new(crate::data::transient_0::decode_variant_two(reader, shared_values)?)), - tag => ::std::result::Result::Err(::std::io::Error::new(::std::io::ErrorKind::InvalidData, format!("unrecognised variant tag for data.SumWithBoxedVariants: {}", tag)))?, - }) -} - -pub fn encode_struct_with_sum(value: &crate::data::StructWithSum, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::data::transient_0::encode_sum_with_variants(&value.inner, writer, shared_values)?; - crate::transient_0::encode_int_32(&value.b, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_sum(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let inner = crate::data::transient_0::decode_sum_with_variants(reader, shared_values)?; - let b = crate::transient_0::decode_int_32(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithSum { inner: inner, b: b }) -} - -pub fn encode_struct_with_native(value: &crate::data::StructWithNative, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::data::transient_0::encode_native(&value.a, writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_native(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::data::transient_0::decode_native(reader, shared_values)?; - ::std::io::Result::Ok(crate::data::StructWithNative { a: a }) -} - -pub fn encode_struct_with_generic_native(value: &crate::data::StructWithGenericNative, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::data::transient_0::encode_generic_native(&value.a, writer, shared_values, |value, writer, shared_values| { - crate::transient_0::encode_int_32(value, writer, shared_values)?; - ::std::io::Result::Ok(()) - }, |value, writer, shared_values| { - crate::transient_0::encode_string(value, writer, shared_values)?; - ::std::io::Result::Ok(()) - })?; - crate::data::transient_0::encode_generic_native(&value.b, writer, shared_values, |value, writer, shared_values| { - match value { - ::std::option::Option::Some(value) => { - crate::transient_0::encode_bool(&true, writer, shared_values)?; - crate::transient_0::encode_string(&value, writer, shared_values)?; - }, - ::std::option::Option::None => { - crate::transient_0::encode_bool(&false, writer, shared_values)?; - }, - }; - ::std::io::Result::Ok(()) - }, |value, writer, shared_values| { - crate::data::transient_0::encode_generic_native(value, writer, shared_values, |value, writer, shared_values| { - match value { - ::std::option::Option::Some(value) => { - crate::transient_0::encode_bool(&true, writer, shared_values)?; - crate::transient_0::encode_string(&value, writer, shared_values)?; - }, - ::std::option::Option::None => { - crate::transient_0::encode_bool(&false, writer, shared_values)?; - }, - }; - ::std::io::Result::Ok(()) - }, |value, writer, shared_values| { - crate::data::transient_0::encode_generic_native(value, writer, shared_values, |value, writer, shared_values| { - crate::transient_0::encode_string(value, writer, shared_values)?; - ::std::io::Result::Ok(()) - }, |value, writer, shared_values| { - crate::transient_0::encode_string(value, writer, shared_values)?; - ::std::io::Result::Ok(()) - })?; - ::std::io::Result::Ok(()) - })?; - ::std::io::Result::Ok(()) - })?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_generic_native(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = crate::data::transient_0::decode_generic_native(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_int_32(reader, shared_values)?), |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?))?; - let b = crate::data::transient_0::decode_generic_native(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok({ - let is_some = crate::transient_0::decode_bool(reader, shared_values)?; - if is_some { - ::std::option::Option::Some(crate::transient_0::decode_string(reader, shared_values)?) - } else { - ::std::option::Option::None - } - }), |reader, shared_values| ::std::io::Result::Ok(crate::data::transient_0::decode_generic_native(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok({ - let is_some = crate::transient_0::decode_bool(reader, shared_values)?; - if is_some { - ::std::option::Option::Some(crate::transient_0::decode_string(reader, shared_values)?) - } else { - ::std::option::Option::None - } - }), |reader, shared_values| ::std::io::Result::Ok(crate::data::transient_0::decode_generic_native(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?), |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?))?))?))?; - ::std::io::Result::Ok(crate::data::StructWithGenericNative { a: a, b: b }) -} - -pub fn encode_struct_with_box(value: &crate::data::StructWithBox, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::data::transient_0::encode_struct_with_int_32((&value.inner).as_ref(), writer, shared_values)?; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_box(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let inner = ::std::boxed::Box::new(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); - ::std::io::Result::Ok(crate::data::StructWithBox { inner: inner }) -} - -pub fn encode_struct_with_list_of_shared(value: &crate::data::StructWithListOfShared, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - { - crate::transient_0::encode_int_64(&(((&value.inner).len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?, writer, shared_values)?; - for element in &value.inner { - { - let ptr = ::std::sync::Arc::as_ptr(&element) as ::core::primitive::usize; - match (shared_values.get(&ptr)).copied() { - ::std::option::Option::Some(id) => { - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - }, - ::std::option::Option::None => { - let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - shared_values.insert(ptr, id); - crate::data::transient_0::encode_struct_with_int_32(element.as_ref(), writer, shared_values)?; - }, - }; - }; - }; - }; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_list_of_shared(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let inner = { - let len = crate::transient_0::decode_int_64(reader, shared_values)?; - let mut elements = ::std::vec::Vec::with_capacity((len.try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?); - for _ in 0..len { - elements.push({ - let id = crate::transient_0::decode_int_64(reader, shared_values)?; - if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { - ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? - } else { - let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); - shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); - decoded_value - } - }); - }; - elements - }; - ::std::io::Result::Ok(crate::data::StructWithListOfShared { inner: inner }) -} - -pub fn encode_struct_with_different_shared_types(value: &crate::data::StructWithDifferentSharedTypes, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - { - let ptr = ::std::sync::Arc::as_ptr(&&value.a) as ::core::primitive::usize; - match (shared_values.get(&ptr)).copied() { - ::std::option::Option::Some(id) => { - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - }, - ::std::option::Option::None => { - let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - shared_values.insert(ptr, id); - crate::data::transient_0::encode_struct_with_int_32((&value.a).as_ref(), writer, shared_values)?; - }, - }; - }; - { - let ptr = ::std::sync::Arc::as_ptr(&&value.b) as ::core::primitive::usize; - match (shared_values.get(&ptr)).copied() { - ::std::option::Option::Some(id) => { - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - }, - ::std::option::Option::None => { - let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - shared_values.insert(ptr, id); - crate::data::transient_0::encode_struct_with_int_64((&value.b).as_ref(), writer, shared_values)?; - }, - }; - }; - { - let ptr = ::std::sync::Arc::as_ptr(&&value.c) as ::core::primitive::usize; - match (shared_values.get(&ptr)).copied() { - ::std::option::Option::Some(id) => { - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - }, - ::std::option::Option::None => { - let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - shared_values.insert(ptr, id); - crate::data::transient_0::encode_struct_with_int_32((&value.c).as_ref(), writer, shared_values)?; - }, - }; - }; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_different_shared_types(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = { - let id = crate::transient_0::decode_int_64(reader, shared_values)?; - if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { - ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? - } else { - let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); - shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); - decoded_value - } - }; - let b = { - let id = crate::transient_0::decode_int_64(reader, shared_values)?; - if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { - ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? - } else { - let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_64(reader, shared_values)?); - shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); - decoded_value - } - }; - let c = { - let id = crate::transient_0::decode_int_64(reader, shared_values)?; - if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { - ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? - } else { - let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); - shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); - decoded_value - } - }; - ::std::io::Result::Ok(crate::data::StructWithDifferentSharedTypes { a: a, b: b, c: c }) -} - -pub fn encode_struct_with_shared_sum_and_variant(value: &crate::data::StructWithSharedSumAndVariant, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - { - let ptr = ::std::sync::Arc::as_ptr(&&value.a) as ::core::primitive::usize; - match (shared_values.get(&ptr)).copied() { - ::std::option::Option::Some(id) => { - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - }, - ::std::option::Option::None => { - let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - shared_values.insert(ptr, id); - crate::data::transient_0::encode_sum_with_variants((&value.a).as_ref(), writer, shared_values)?; - }, - }; - }; - { - let ptr = ::std::sync::Arc::as_ptr(&&value.b) as ::core::primitive::usize; - match (shared_values.get(&ptr)).copied() { - ::std::option::Option::Some(id) => { - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - }, - ::std::option::Option::None => { - let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; - crate::transient_0::encode_int_64(&id, writer, shared_values)?; - shared_values.insert(ptr, id); - crate::data::transient_0::encode_variant_one((&value.b).as_ref(), writer, shared_values)?; - }, - }; - }; - ::std::io::Result::Ok(()) -} - -pub fn decode_struct_with_shared_sum_and_variant(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { - let a = { - let id = crate::transient_0::decode_int_64(reader, shared_values)?; - if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { - ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? - } else { - let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_sum_with_variants(reader, shared_values)?); - shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); - decoded_value - } - }; - let b = { - let id = crate::transient_0::decode_int_64(reader, shared_values)?; - if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { - ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? - } else { - let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_variant_one(reader, shared_values)?); - shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); - decoded_value - } - }; - ::std::io::Result::Ok(crate::data::StructWithSharedSumAndVariant { a: a, b: b }) -} diff --git a/examples/16-transient-0/output/rust/src/gen/transient_0.rs b/examples/16-transient-0/output/rust/src/gen/transient_0.rs deleted file mode 100644 index 1b1b659..0000000 --- a/examples/16-transient-0/output/rust/src/gen/transient_0.rs +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by hobgoblin. - -pub type Encode = fn(&T, &mut TWrite, &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()>; - -pub type Decode = fn(&mut TRead, &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::; - -pub fn encode_bool(value: &::core::primitive::bool, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - if *value { - writer.write_all(&1u8.to_le_bytes())?; - } else { - writer.write_all(&0u8.to_le_bytes())?; - }; - ::std::io::Result::Ok(()) -} - -pub fn decode_bool(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::bool> { - let int_value = { - let bytes = { - let mut bytes = [0; 1]; - reader.read_exact(&mut bytes)?; - bytes - }; - u8::from_le_bytes(bytes) - }; - ::std::io::Result::Ok(if int_value == 0 { - false - } else { - true - }) -} - -pub fn encode_float_64(value: &::core::primitive::f64, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - writer.write_all(&value.to_le_bytes())?; - ::std::io::Result::Ok(()) -} - -pub fn decode_float_64(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::f64> { - let bytes = { - let mut bytes = [0; 8]; - reader.read_exact(&mut bytes)?; - bytes - }; - ::std::io::Result::Ok(::core::primitive::f64::from_le_bytes(bytes)) -} - -pub fn encode_int_8(value: &::core::primitive::i8, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - writer.write_all(&value.to_le_bytes())?; - ::std::io::Result::Ok(()) -} - -pub fn decode_int_8(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::i8> { - let bytes = { - let mut bytes = [0; 1]; - reader.read_exact(&mut bytes)?; - bytes - }; - ::std::io::Result::Ok(::core::primitive::i8::from_le_bytes(bytes)) -} - -pub fn encode_int_32(value: &::core::primitive::i32, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - writer.write_all(&value.to_le_bytes())?; - ::std::io::Result::Ok(()) -} - -pub fn decode_int_32(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::i32> { - let bytes = { - let mut bytes = [0; 4]; - reader.read_exact(&mut bytes)?; - bytes - }; - ::std::io::Result::Ok(::core::primitive::i32::from_le_bytes(bytes)) -} - -pub fn encode_int_64(value: &::core::primitive::i64, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - writer.write_all(&value.to_le_bytes())?; - ::std::io::Result::Ok(()) -} - -pub fn decode_int_64(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::i64> { - let bytes = { - let mut bytes = [0; 8]; - reader.read_exact(&mut bytes)?; - bytes - }; - ::std::io::Result::Ok(::core::primitive::i64::from_le_bytes(bytes)) -} - -pub fn encode_string(value: &::std::string::String, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { - crate::transient_0::encode_int_64(&((value.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?, writer, shared_values)?; - writer.write_all(value.as_bytes())?; - ::std::io::Result::Ok(()) -} - -pub fn decode_string(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::std::string::String> { - let len = crate::transient_0::decode_int_64(reader, shared_values)?; - let bytes = { - let mut bytes = vec![0u8; (len.try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?]; - reader.read_exact(&mut bytes)?; - bytes - }; - ::std::io::Result::Ok((::std::string::String::from_utf8(bytes)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?) -} diff --git a/examples/16-transient-0/output/rust/src/lib.rs b/examples/16-transient-0/output/rust/src/lib.rs deleted file mode 100644 index ea26e60..0000000 --- a/examples/16-transient-0/output/rust/src/lib.rs +++ /dev/null @@ -1,410 +0,0 @@ -pub mod data; -pub mod transient_0; - -#[cfg(test)] -mod test { - use std::any::Any; - use std::io::Cursor; - use std::path::PathBuf; - use std::sync::Arc; - use std::collections::HashMap; - use super::data::{EnumWithVariants, GenericNative, GenericStruct, Native, StructSingleton, StructWithBool, StructWithBox, StructWithDifferentSharedTypes, StructWithEnum, StructWithFloat64, StructWithGenericNative, StructWithGenericStruct, StructWithInt8, StructWithInt32, StructWithInt64, StructWithList, StructWithListOfShared, StructWithNative, StructWithOption, StructWithSharedSumAndVariant, StructWithString, StructWithStruct, StructWithSum, SumWithBoxedVariants, SumWithVariants, VariantOne, VariantTwo }; - - #[test] - fn struct_singleton() { - let value = StructSingleton; - - assert_round_trip_encoding( - "StructSingleton", - value, - super::data::transient_0::encode_struct_singleton, - super::data::transient_0::decode_struct_singleton, - ); - } - - #[test] - fn struct_with_bool() { - let value = StructWithBool { a: true, b: false }; - - assert_round_trip_encoding( - "StructWithBool", - value, - super::data::transient_0::encode_struct_with_bool, - super::data::transient_0::decode_struct_with_bool, - ); - } - - #[test] - fn struct_with_float_64() { - let value = StructWithFloat64 { a: 10.0, b: 2.5 }; - - assert_round_trip_encoding( - "StructWithFloat64", - value, - super::data::transient_0::encode_struct_with_float_64, - super::data::transient_0::decode_struct_with_float_64, - ); - } - - #[test] - fn struct_with_int_8() { - let value = StructWithInt8 { a: 10, b: 25 }; - - assert_round_trip_encoding( - "StructWithInt8", - value, - super::data::transient_0::encode_struct_with_int_8, - super::data::transient_0::decode_struct_with_int_8, - ); - } - - #[test] - fn struct_with_int_32() { - let value = StructWithInt32 { a: 10, b: 25 }; - - assert_round_trip_encoding( - "StructWithInt32", - value, - super::data::transient_0::encode_struct_with_int_32, - super::data::transient_0::decode_struct_with_int_32, - ); - } - - #[test] - fn struct_with_int_32_min_and_max() { - let value = StructWithInt32 { a: i32::MIN, b: i32::MAX }; - - assert_round_trip_encoding( - "StructWithInt32MinAndMax", - value, - super::data::transient_0::encode_struct_with_int_32, - super::data::transient_0::decode_struct_with_int_32, - ); - } - - #[test] - fn struct_with_int_64() { - let value = StructWithInt64 { a: 10, b: 25 }; - - assert_round_trip_encoding( - "StructWithInt64", - value, - super::data::transient_0::encode_struct_with_int_64, - super::data::transient_0::decode_struct_with_int_64, - ); - } - - #[test] - fn struct_with_int_64_min_and_max() { - let value = StructWithInt64 { a: i64::MIN, b: i64::MAX }; - - assert_round_trip_encoding( - "StructWithInt64MinAndMax", - value, - super::data::transient_0::encode_struct_with_int_64, - super::data::transient_0::decode_struct_with_int_64, - ); - } - - #[test] - fn struct_with_string() { - let value = StructWithString { a: "abc".to_string(), b: "def".to_string() }; - - assert_round_trip_encoding( - "StructWithString", - value, - super::data::transient_0::encode_struct_with_string, - super::data::transient_0::decode_struct_with_string, - ); - } - - #[test] - fn struct_with_struct() { - let value = StructWithStruct { inner: StructWithInt32 { a: 10, b: 25 }, c: 42 }; - - assert_round_trip_encoding( - "StructWithStruct", - value, - super::data::transient_0::encode_struct_with_struct, - super::data::transient_0::decode_struct_with_struct, - ); - } - - #[test] - fn struct_with_generic_struct() { - let value = StructWithGenericStruct { - a: GenericStruct { a: 10, b: "x1".to_string() }, - b: GenericStruct { - a: Some("x2".to_string()), - b: GenericStruct { - a: Some("x3".to_string()), - b: GenericStruct { a: "x4".to_string(), b: "x5".to_string() }, - }, - }, - }; - - assert_round_trip_encoding( - "StructWithGenericStruct", - value, - super::data::transient_0::encode_struct_with_generic_struct, - super::data::transient_0::decode_struct_with_generic_struct, - ); - } - - #[test] - fn struct_with_list() { - let value = StructWithList { - a: vec![10, 25], - b: vec![ - StructWithInt32 { a: 42, b: 47 }, - StructWithInt32 { a: 52, b: 57 }, - StructWithInt32 { a: 62, b: 67 }, - ], - }; - - assert_round_trip_encoding( - "StructWithList", - value, - super::data::transient_0::encode_struct_with_list, - super::data::transient_0::decode_struct_with_list, - ); - } - - #[test] - fn struct_with_option_none() { - let value = StructWithOption { - a: None, - b: None, - }; - - assert_round_trip_encoding( - "StructWithOption_None", - value, - super::data::transient_0::encode_struct_with_option, - super::data::transient_0::decode_struct_with_option, - ); - } - - #[test] - fn struct_with_option_some() { - let value = StructWithOption { - a: Some(10), - b: Some(StructWithInt32 { a: 42, b: 47 }), - }; - - assert_round_trip_encoding( - "StructWithOption_Some", - value, - super::data::transient_0::encode_struct_with_option, - super::data::transient_0::decode_struct_with_option, - ); - } - - #[test] - fn enum_with_variants() { - assert_round_trip_encoding( - "EnumWithVariants_zero", - EnumWithVariants::Zero, - super::data::transient_0::encode_enum_with_variants, - super::data::transient_0::decode_enum_with_variants, - ); - - assert_round_trip_encoding( - "EnumWithVariants_one", - EnumWithVariants::One, - super::data::transient_0::encode_enum_with_variants, - super::data::transient_0::decode_enum_with_variants, - ); - - assert_round_trip_encoding( - "EnumWithVariants_two", - EnumWithVariants::Two, - super::data::transient_0::encode_enum_with_variants, - super::data::transient_0::decode_enum_with_variants, - ); - } - - #[test] - fn struct_with_enum() { - let value = StructWithEnum { inner: EnumWithVariants::One, c: 42 }; - - assert_round_trip_encoding( - "StructWithEnum", - value, - super::data::transient_0::encode_struct_with_enum, - super::data::transient_0::decode_struct_with_enum, - ); - } - - #[test] - fn sum_with_variants() { - assert_round_trip_encoding( - "SumWithVariants_VariantOne", - SumWithVariants::VariantOne(VariantOne { a: 10 }), - super::data::transient_0::encode_sum_with_variants, - super::data::transient_0::decode_sum_with_variants, - ); - - assert_round_trip_encoding( - "SumWithVariants_VariantTwo", - SumWithVariants::VariantTwo(VariantTwo { a: 25 }), - super::data::transient_0::encode_sum_with_variants, - super::data::transient_0::decode_sum_with_variants, - ); - } - - #[test] - fn sum_with_boxed_variants() { - assert_round_trip_encoding( - "SumWithBoxedVariants_VariantOne", - SumWithBoxedVariants::VariantOne(Box::new(VariantOne { a: 10 })), - super::data::transient_0::encode_sum_with_boxed_variants, - super::data::transient_0::decode_sum_with_boxed_variants, - ); - - assert_round_trip_encoding( - "SumWithBoxedVariants_VariantTwo", - SumWithBoxedVariants::VariantTwo(Box::new(VariantTwo { a: 25 })), - super::data::transient_0::encode_sum_with_boxed_variants, - super::data::transient_0::decode_sum_with_boxed_variants, - ); - } - - #[test] - fn struct_with_sum() { - let value = StructWithSum { - inner: SumWithVariants::VariantTwo(VariantTwo { a: 25 }), - b: 42, - }; - - assert_round_trip_encoding( - "StructWithSum", - value, - super::data::transient_0::encode_struct_with_sum, - super::data::transient_0::decode_struct_with_sum, - ); - } - - #[test] - fn struct_with_native() { - let value = StructWithNative { - a: Native { a: 10, b: 25 }, - }; - - assert_round_trip_encoding( - "StructWithNative", - value, - super::data::transient_0::encode_struct_with_native, - super::data::transient_0::decode_struct_with_native, - ); - } - - #[test] - fn struct_with_generic_native() { - let value = StructWithGenericNative { - a: GenericNative { a: 10, b: "x1".to_string() }, - b: GenericNative { - a: Some("x2".to_string()), - b: GenericNative { - a: Some("x3".to_string()), - b: GenericNative { a: "x4".to_string(), b: "x5".to_string() }, - }, - }, - }; - - assert_round_trip_encoding( - "StructWithGenericNative", - value, - super::data::transient_0::encode_struct_with_generic_native, - super::data::transient_0::decode_struct_with_generic_native, - ); - } - - #[test] - fn struct_with_box() { - let value = StructWithBox { - inner: Box::new(StructWithInt32 { a: 10, b: 25 }), - }; - - assert_round_trip_encoding( - "StructWithBox", - value, - super::data::transient_0::encode_struct_with_box, - super::data::transient_0::decode_struct_with_box, - ); - } - - #[test] - fn struct_with_list_of_shared() { - let a = Arc::new(StructWithInt32 { a: 10, b: 25 }); - let b = Arc::new(StructWithInt32 { a: 42, b: 47 }); - - let value = StructWithListOfShared { - inner: vec![Arc::clone(&a), Arc::clone(&a), Arc::clone(&b), a, b], - }; - - let decoded_value = assert_round_trip_encoding( - "StructWithListOfShared", - value, - super::data::transient_0::encode_struct_with_list_of_shared, - super::data::transient_0::decode_struct_with_list_of_shared, - ); - assert!(Arc::ptr_eq(&decoded_value.inner[0], &decoded_value.inner[1])); - assert!(Arc::ptr_eq(&decoded_value.inner[0], &decoded_value.inner[3])); - assert!(Arc::ptr_eq(&decoded_value.inner[2], &decoded_value.inner[4])); - } - - #[test] - fn struct_with_different_shared_types() { - let a = Arc::new(StructWithInt32 { a: 10, b: 25 }); - let b = Arc::new(StructWithInt64 { a: 42, b: 47 }); - let c = Arc::new(StructWithInt32 { a: 52, b: 57 }); - - let value = StructWithDifferentSharedTypes { a, b, c }; - - assert_round_trip_encoding( - "StructWithDifferentSharedTypes", - value, - super::data::transient_0::encode_struct_with_different_shared_types, - super::data::transient_0::decode_struct_with_different_shared_types, - ); - } - - #[test] - fn struct_with_shared_sum_and_variant() { - let a = Arc::new(SumWithVariants::VariantOne(VariantOne { a: 10 })); - let b = Arc::new(VariantOne { a: 10 }); - - let value = StructWithSharedSumAndVariant { a, b }; - - assert_round_trip_encoding( - "StructWithSharedSumAndVariant", - value, - super::data::transient_0::encode_struct_with_shared_sum_and_variant, - super::data::transient_0::decode_struct_with_shared_sum_and_variant, - ); - } - - fn assert_round_trip_encoding( - name: &str, - value: T, - encode: impl Fn(&T, &mut Cursor>, &mut HashMap) -> std::io::Result<()>, - decode: impl Fn(&mut Cursor>, &mut Vec>) -> std::io::Result, - ) -> T { - let mut bytes = Cursor::new(Vec::new()); - encode(&value, &mut bytes, &mut HashMap::new()).unwrap(); - - let output_dir = std::env::var("HOBGOBLIN_OUTPUT_DIR").unwrap(); - let transient_0_output_dir = PathBuf::from(output_dir).join("transient-0"); - std::fs::create_dir_all(&transient_0_output_dir).unwrap(); - let transient_0_output_path = transient_0_output_dir.join(name); - std::fs::write(transient_0_output_path, bytes.get_ref()).unwrap(); - - bytes.set_position(0); - let decoded_value = decode(&mut bytes, &mut Vec::new()).unwrap(); - - assert_eq!(value, decoded_value); - - decoded_value - } -} diff --git a/examples/16-transient-0/output/rust/src/transient_0.rs b/examples/16-transient-0/output/rust/src/transient_0.rs deleted file mode 100644 index 8b2b800..0000000 --- a/examples/16-transient-0/output/rust/src/transient_0.rs +++ /dev/null @@ -1 +0,0 @@ -include!("./gen/transient_0.rs"); diff --git a/examples/16-transient-0/src/data.hob b/examples/16-transient-0/src/data.hob deleted file mode 100644 index 25fb1be..0000000 --- a/examples/16-transient-0/src/data.hob +++ /dev/null @@ -1,126 +0,0 @@ -struct StructSingleton { - singleton; -} - -struct StructWithBool { - field a: Bool; - field b: Bool; -} - -struct StructWithFloat64 { - field a: Float64; - field b: Float64; -} - -struct StructWithInt8 { - field a: Int8; - field b: Int8; -} - -struct StructWithInt32 { - field a: Int32; - field b: Int32; -} - -struct StructWithInt64 { - field a: Int64; - field b: Int64; -} - -struct StructWithString { - field a: String; - field b: String; -} - -struct StructWithStruct { - field inner: StructWithInt32; - field c: Int32; -} - -struct GenericStruct[A, B] { - field a: A; - field b: B; -} - -struct StructWithGenericStruct { - field a: GenericStruct[Int32, String]; - field b: GenericStruct[Option[String], GenericStruct[Option[String], GenericStruct[String, String]]]; -} - -struct StructWithList { - field a: List[Int64]; - field b: List[StructWithInt32]; -} - -struct StructWithOption { - field a: Option[Int64]; - field b: Option[StructWithInt32]; -} - -enum EnumWithVariants { - variant zero; - variant one; - variant two; -} - -struct StructWithEnum { - field inner: EnumWithVariants; - field c: Int32; -} - -sum SumWithVariants { - variant VariantOne; - variant VariantTwo; -} - -struct VariantOne { - field a: Int32; -} - -struct VariantTwo { - field a: Int64; -} - -sum SumWithBoxedVariants { - variant Box[VariantOne]; - variant Box[VariantTwo]; -} - -struct StructWithSum { - field inner: SumWithVariants; - field b: Int32; -} - -native Native { -} - -struct StructWithNative { - field a: Native; -} - -native GenericNative[A, B] { -} - -struct StructWithGenericNative { - field a: GenericNative[Int32, String]; - field b: GenericNative[Option[String], GenericNative[Option[String], GenericNative[String, String]]]; -} - -struct StructWithBox { - field inner: Box[StructWithInt32]; -} - -struct StructWithListOfShared { - field inner: List[Shared[StructWithInt32]]; -} - -struct StructWithDifferentSharedTypes { - field a: Shared[StructWithInt32]; - field b: Shared[StructWithInt64]; - field c: Shared[StructWithInt32]; -} - -struct StructWithSharedSumAndVariant { - field a: Shared[SumWithVariants]; - field b: Shared[VariantOne]; -} diff --git a/examples/17-transient-0/hobgoblin.json5 b/examples/17-transient-0/hobgoblin.json5 new file mode 100644 index 0000000..e632b0a --- /dev/null +++ b/examples/17-transient-0/hobgoblin.json5 @@ -0,0 +1,27 @@ +{ + outputs: { + langs: { + java: { + packageName: "org.zwobble.example.types", + }, + }, + generators: [ + { + generator: "java-types", + path: "output/java/src/gen/java", + }, + { + generator: "java-transient-0", + path: "output/java/src/main/java", + }, + { + generator: "rust-types", + path: "output/rust/src/gen", + }, + { + generator: "rust-transient-0", + path: "output/rust/src/gen", + } + ], + } +} diff --git a/examples/17-transient-0/output/java/.gitignore b/examples/17-transient-0/output/java/.gitignore new file mode 100644 index 0000000..2fcf0b8 --- /dev/null +++ b/examples/17-transient-0/output/java/.gitignore @@ -0,0 +1,3 @@ +/src/gen/ +/target/ +/transient-0/ diff --git a/examples/17-transient-0/output/java/pom.xml b/examples/17-transient-0/output/java/pom.xml new file mode 120000 index 0000000..445fa65 --- /dev/null +++ b/examples/17-transient-0/output/java/pom.xml @@ -0,0 +1 @@ +../../../templates/java-junit/pom.xml \ No newline at end of file diff --git a/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/GenericNative.java b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/GenericNative.java new file mode 100644 index 0000000..cfd16d5 --- /dev/null +++ b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/GenericNative.java @@ -0,0 +1,3 @@ +package org.zwobble.example.types.data; + +public record GenericNative(A a, B b) {} diff --git a/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/HobgoblinNativeData.java b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/HobgoblinNativeData.java new file mode 100644 index 0000000..cc26b7b --- /dev/null +++ b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/HobgoblinNativeData.java @@ -0,0 +1,18 @@ +package org.zwobble.example.types.data; + +import java.util.function.Supplier; + +public class HobgoblinNativeData { + private HobgoblinNativeData() {} + + public static Native arbitraryNative() { + return new Native(0, 0); + } + + public static GenericNative arbitraryGenericNative( + Supplier supplyA, + Supplier supplyB + ) { + return new GenericNative<>(supplyA.get(), supplyB.get()); + } +} diff --git a/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/Native.java b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/Native.java new file mode 100644 index 0000000..366dd74 --- /dev/null +++ b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/Native.java @@ -0,0 +1,3 @@ +package org.zwobble.example.types.data; + +public record Native(int a, int b) {} diff --git a/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java new file mode 100644 index 0000000..f8799b7 --- /dev/null +++ b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/data/transient0/HobgoblinTransient0Data.java @@ -0,0 +1,636 @@ +// Generated by hobgoblin. + +package org.zwobble.example.types.data.transient0; + +// Custom area start: org.zwobble.example.types.data.transient0.HobgoblinTransient0Data imports +import java.io.InputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.util.List; +import java.util.Map; +import org.zwobble.example.types.data.GenericNative; +import org.zwobble.example.types.data.Native; +import org.zwobble.example.types.transient0.Decoder; +import org.zwobble.example.types.transient0.Encoder; +import org.zwobble.example.types.transient0.HobgoblinTransient0Builtins; +import org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue; +// Custom area end: org.zwobble.example.types.data.transient0.HobgoblinTransient0Data imports + +public final class HobgoblinTransient0Data { + public static void encodeStructSingleton(org.zwobble.example.types.data.StructSingleton value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + } + + public static org.zwobble.example.types.data.StructSingleton decodeStructSingleton(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + return org.zwobble.example.types.data.StructSingleton.INSTANCE; + } + + public static void encodeStructWithBool(org.zwobble.example.types.data.StructWithBool value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.a(), outputStream, sharedValues); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.b(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithBool decodeStructWithBool(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); + var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithBool(a, b); + } + + public static void encodeStructWithFloat64(org.zwobble.example.types.data.StructWithFloat64 value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeFloat64(value.a(), outputStream, sharedValues); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeFloat64(value.b(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithFloat64 decodeStructWithFloat64(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeFloat64(inputStream, sharedValues); + var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeFloat64(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithFloat64(a, b); + } + + public static void encodeStructWithInt8(org.zwobble.example.types.data.StructWithInt8 value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt8(value.a(), outputStream, sharedValues); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt8(value.b(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithInt8 decodeStructWithInt8(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt8(inputStream, sharedValues); + var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt8(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithInt8(a, b); + } + + public static void encodeStructWithInt32(org.zwobble.example.types.data.StructWithInt32 value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.a(), outputStream, sharedValues); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.b(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithInt32 decodeStructWithInt32(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithInt32(a, b); + } + + public static void encodeStructWithInt64(org.zwobble.example.types.data.StructWithInt64 value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(value.a(), outputStream, sharedValues); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(value.b(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithInt64 decodeStructWithInt64(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithInt64(a, b); + } + + public static void encodeStructWithString(org.zwobble.example.types.data.StructWithString value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeString(value.a(), outputStream, sharedValues); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeString(value.b(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithString decodeStructWithString(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeString(inputStream, sharedValues); + var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeString(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithString(a, b); + } + + public static void encodeStructWithStruct(org.zwobble.example.types.data.StructWithStruct value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.inner(), outputStream, sharedValues); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.c(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithStruct decodeStructWithStruct(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var inner = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); + var c = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithStruct(inner, c); + } + + public static void encodeGenericStruct(org.zwobble.example.types.data.GenericStruct value, java.io.OutputStream outputStream, java.util.Map sharedValues, org.zwobble.example.types.transient0.Encoder encoder$A, org.zwobble.example.types.transient0.Encoder encoder$B) throws java.io.IOException { + encoder$A.encode(value.a(), outputStream, sharedValues); + encoder$B.encode(value.b(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.GenericStruct decodeGenericStruct(java.io.InputStream inputStream, java.util.List sharedValues, org.zwobble.example.types.transient0.Decoder decoder$A, org.zwobble.example.types.transient0.Decoder decoder$B) throws java.io.IOException { + var a = decoder$A.decode(inputStream, sharedValues); + var b = decoder$B.decode(inputStream, sharedValues); + return new org.zwobble.example.types.data.GenericStruct(a, b); + } + + public static void encodeStructWithGenericStruct(org.zwobble.example.types.data.StructWithGenericStruct value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericStruct(value.a(), outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericStruct(value.b(), outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$1); + } + + public static org.zwobble.example.types.data.StructWithGenericStruct decodeStructWithGenericStruct(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericStruct(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString); + var b = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericStruct(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$1); + return new org.zwobble.example.types.data.StructWithGenericStruct(a, b); + } + + public static void encodeStructWithList(org.zwobble.example.types.data.StructWithList value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64((long) value.a().size(), outputStream, sharedValues); + for (var element : value.a()) { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(element, outputStream, sharedValues); + } + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64((long) value.b().size(), outputStream, sharedValues); + for (var element : value.b()) { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(element, outputStream, sharedValues); + } + } + + public static org.zwobble.example.types.data.StructWithList decodeStructWithList(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a$size = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (a$size > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Lists longer than Integer.MAX_VALUE are not supported"); + } + var a = new java.util.ArrayList((int) a$size); + for (long a$index = 0; a$index < a$size; a$index++) { + var a$element = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + a.add(a$element); + } + var b$size = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (b$size > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Lists longer than Integer.MAX_VALUE are not supported"); + } + var b = new java.util.ArrayList((int) b$size); + for (long b$index = 0; b$index < b$size; b$index++) { + var b$element = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); + b.add(b$element); + } + return new org.zwobble.example.types.data.StructWithList(a, b); + } + + public static void encodeStructWithOption(org.zwobble.example.types.data.StructWithOption value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.a().isPresent(), outputStream, sharedValues); + if (value.a().isPresent()) { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(value.a().get(), outputStream, sharedValues); + } + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.b().isPresent(), outputStream, sharedValues); + if (value.b().isPresent()) { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.b().get(), outputStream, sharedValues); + } + } + + public static org.zwobble.example.types.data.StructWithOption decodeStructWithOption(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a$isPresent = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); + java.util.Optional a; + if (a$isPresent) { + var a$element = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + a = java.util.Optional.of(a$element); + } else { + a = java.util.Optional.empty(); + } + var b$isPresent = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); + java.util.Optional b; + if (b$isPresent) { + var b$element = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); + b = java.util.Optional.of(b$element); + } else { + b = java.util.Optional.empty(); + } + return new org.zwobble.example.types.data.StructWithOption(a, b); + } + + public static void encodeEnumWithVariants(org.zwobble.example.types.data.EnumWithVariants value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.ordinal(), outputStream, sharedValues); + } + + private static final org.zwobble.example.types.data.EnumWithVariants[] EnumWithVariants$values = org.zwobble.example.types.data.EnumWithVariants.values(); + + public static org.zwobble.example.types.data.EnumWithVariants decodeEnumWithVariants(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var ordinal = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + if (ordinal >= 0 && ordinal < 3) { + return EnumWithVariants$values[ordinal]; + } else { + throw new java.io.IOException("unrecognised variant tag for data.EnumWithVariants: " + ordinal); + } + } + + public static void encodeStructWithEnum(org.zwobble.example.types.data.StructWithEnum value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeEnumWithVariants(value.inner(), outputStream, sharedValues); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.c(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithEnum decodeStructWithEnum(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var inner = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeEnumWithVariants(inputStream, sharedValues); + var c = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithEnum(inner, c); + } + + public static void encodeSumWithVariants(org.zwobble.example.types.data.SumWithVariants value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + switch (value) { + case org.zwobble.example.types.data.VariantOne value$0 -> { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(0, outputStream, sharedValues); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantOne(value$0, outputStream, sharedValues); + } + case org.zwobble.example.types.data.VariantTwo value$1 -> { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(1, outputStream, sharedValues); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantTwo(value$1, outputStream, sharedValues); + } + } + } + + public static org.zwobble.example.types.data.SumWithVariants decodeSumWithVariants(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var variantTag = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + switch (variantTag) { + case 0 -> { + var value$0 = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantOne(inputStream, sharedValues); + return value$0; + } + case 1 -> { + var value$1 = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantTwo(inputStream, sharedValues); + return value$1; + } + default -> { + throw new java.io.IOException("unrecognised variant tag for data.SumWithVariants: " + variantTag); + } + } + } + + public static void encodeVariantOne(org.zwobble.example.types.data.VariantOne value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.a(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.VariantOne decodeVariantOne(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + return new org.zwobble.example.types.data.VariantOne(a); + } + + public static void encodeVariantTwo(org.zwobble.example.types.data.VariantTwo value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(value.a(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.VariantTwo decodeVariantTwo(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + return new org.zwobble.example.types.data.VariantTwo(a); + } + + public static void encodeSumWithBoxedVariants(org.zwobble.example.types.data.SumWithBoxedVariants value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + switch (value) { + case org.zwobble.example.types.data.VariantOne value$0 -> { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(0, outputStream, sharedValues); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantOne(value$0, outputStream, sharedValues); + } + case org.zwobble.example.types.data.VariantTwo value$1 -> { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(1, outputStream, sharedValues); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantTwo(value$1, outputStream, sharedValues); + } + } + } + + public static org.zwobble.example.types.data.SumWithBoxedVariants decodeSumWithBoxedVariants(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var variantTag = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + switch (variantTag) { + case 0 -> { + var value$0 = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantOne(inputStream, sharedValues); + return value$0; + } + case 1 -> { + var value$1 = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantTwo(inputStream, sharedValues); + return value$1; + } + default -> { + throw new java.io.IOException("unrecognised variant tag for data.SumWithBoxedVariants: " + variantTag); + } + } + } + + public static void encodeStructWithSum(org.zwobble.example.types.data.StructWithSum value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeSumWithVariants(value.inner(), outputStream, sharedValues); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt32(value.b(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithSum decodeStructWithSum(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var inner = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeSumWithVariants(inputStream, sharedValues); + var b = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithSum(inner, b); + } + + public static void encodeStructWithNative(org.zwobble.example.types.data.StructWithNative value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeNative(value.a(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithNative decodeStructWithNative(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeNative(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithNative(a); + } + + public static void encodeStructWithGenericNative(org.zwobble.example.types.data.StructWithGenericNative value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value.a(), outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value.b(), outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$2); + } + + public static org.zwobble.example.types.data.StructWithGenericNative decodeStructWithGenericNative(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeInt32, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString); + var b = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$2); + return new org.zwobble.example.types.data.StructWithGenericNative(a, b); + } + + public static void encodeStructWithBox(org.zwobble.example.types.data.StructWithBox value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.inner(), outputStream, sharedValues); + } + + public static org.zwobble.example.types.data.StructWithBox decodeStructWithBox(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var inner = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); + return new org.zwobble.example.types.data.StructWithBox(inner); + } + + public static void encodeStructWithListOfShared(org.zwobble.example.types.data.StructWithListOfShared value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64((long) value.inner().size(), outputStream, sharedValues); + for (var element : value.inner()) { + { + var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, element)); + if (existingId != null) { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); + } else { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); + sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, element), (long) sharedValues.size()); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(element, outputStream, sharedValues); + } + } + } + } + + public static org.zwobble.example.types.data.StructWithListOfShared decodeStructWithListOfShared(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var inner$size = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (inner$size > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Lists longer than Integer.MAX_VALUE are not supported"); + } + var inner = new java.util.ArrayList((int) inner$size); + for (long inner$index = 0; inner$index < inner$size; inner$index++) { + var inner$element$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (inner$element$id > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); + } + org.zwobble.example.types.data.StructWithInt32 inner$element; + if (inner$element$id < sharedValues.size()) { + inner$element = switch (sharedValues.get((int) inner$element$id)) { + case org.zwobble.example.types.data.StructWithInt32 inner$element$decodedValue -> { + yield inner$element$decodedValue; + } + default -> { + throw new java.io.IOException("Shared value was of the wrong type"); + } + }; + } else { + var inner$element$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); + sharedValues.add(inner$element$decodedValue); + inner$element = inner$element$decodedValue; + } + inner.add(inner$element); + } + return new org.zwobble.example.types.data.StructWithListOfShared(inner); + } + + public static void encodeStructWithDifferentSharedTypes(org.zwobble.example.types.data.StructWithDifferentSharedTypes value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + { + var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, value.a())); + if (existingId != null) { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); + } else { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); + sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, value.a()), (long) sharedValues.size()); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.a(), outputStream, sharedValues); + } + } + { + var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(1, value.b())); + if (existingId != null) { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); + } else { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); + sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(1, value.b()), (long) sharedValues.size()); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt64(value.b(), outputStream, sharedValues); + } + } + { + var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, value.c())); + if (existingId != null) { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); + } else { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); + sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(0, value.c()), (long) sharedValues.size()); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeStructWithInt32(value.c(), outputStream, sharedValues); + } + } + } + + public static org.zwobble.example.types.data.StructWithDifferentSharedTypes decodeStructWithDifferentSharedTypes(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (a$id > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); + } + org.zwobble.example.types.data.StructWithInt32 a; + if (a$id < sharedValues.size()) { + a = switch (sharedValues.get((int) a$id)) { + case org.zwobble.example.types.data.StructWithInt32 a$decodedValue -> { + yield a$decodedValue; + } + default -> { + throw new java.io.IOException("Shared value was of the wrong type"); + } + }; + } else { + var a$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); + sharedValues.add(a$decodedValue); + a = a$decodedValue; + } + var b$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (b$id > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); + } + org.zwobble.example.types.data.StructWithInt64 b; + if (b$id < sharedValues.size()) { + b = switch (sharedValues.get((int) b$id)) { + case org.zwobble.example.types.data.StructWithInt64 b$decodedValue -> { + yield b$decodedValue; + } + default -> { + throw new java.io.IOException("Shared value was of the wrong type"); + } + }; + } else { + var b$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt64(inputStream, sharedValues); + sharedValues.add(b$decodedValue); + b = b$decodedValue; + } + var c$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (c$id > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); + } + org.zwobble.example.types.data.StructWithInt32 c; + if (c$id < sharedValues.size()) { + c = switch (sharedValues.get((int) c$id)) { + case org.zwobble.example.types.data.StructWithInt32 c$decodedValue -> { + yield c$decodedValue; + } + default -> { + throw new java.io.IOException("Shared value was of the wrong type"); + } + }; + } else { + var c$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeStructWithInt32(inputStream, sharedValues); + sharedValues.add(c$decodedValue); + c = c$decodedValue; + } + return new org.zwobble.example.types.data.StructWithDifferentSharedTypes(a, b, c); + } + + public static void encodeStructWithSharedSumAndVariant(org.zwobble.example.types.data.StructWithSharedSumAndVariant value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + { + var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(2, value.a())); + if (existingId != null) { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); + } else { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); + sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(2, value.a()), (long) sharedValues.size()); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeSumWithVariants(value.a(), outputStream, sharedValues); + } + } + { + var existingId = sharedValues.get(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(3, value.b())); + if (existingId != null) { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(existingId, outputStream, sharedValues); + } else { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(sharedValues.size(), outputStream, sharedValues); + sharedValues.put(new org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue(3, value.b()), (long) sharedValues.size()); + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeVariantOne(value.b(), outputStream, sharedValues); + } + } + } + + public static org.zwobble.example.types.data.StructWithSharedSumAndVariant decodeStructWithSharedSumAndVariant(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var a$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (a$id > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); + } + org.zwobble.example.types.data.SumWithVariants a; + if (a$id < sharedValues.size()) { + a = switch (sharedValues.get((int) a$id)) { + case org.zwobble.example.types.data.SumWithVariants a$decodedValue -> { + yield a$decodedValue; + } + default -> { + throw new java.io.IOException("Shared value was of the wrong type"); + } + }; + } else { + var a$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeSumWithVariants(inputStream, sharedValues); + sharedValues.add(a$decodedValue); + a = a$decodedValue; + } + var b$id = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (b$id > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Shared value IDs greater than Integer.MAX_VALUE are not supported"); + } + org.zwobble.example.types.data.VariantOne b; + if (b$id < sharedValues.size()) { + b = switch (sharedValues.get((int) b$id)) { + case org.zwobble.example.types.data.VariantOne b$decodedValue -> { + yield b$decodedValue; + } + default -> { + throw new java.io.IOException("Shared value was of the wrong type"); + } + }; + } else { + var b$decodedValue = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeVariantOne(inputStream, sharedValues); + sharedValues.add(b$decodedValue); + b = b$decodedValue; + } + return new org.zwobble.example.types.data.StructWithSharedSumAndVariant(a, b); + } + + private static void encode$constructedType$0(java.util.Optional value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeBool(value.isPresent(), outputStream, sharedValues); + if (value.isPresent()) { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeString(value.get(), outputStream, sharedValues); + } + } + + private static java.util.Optional decode$constructedType$0(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var value$isPresent = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeBool(inputStream, sharedValues); + java.util.Optional value; + if (value$isPresent) { + var value$element = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeString(inputStream, sharedValues); + value = java.util.Optional.of(value$element); + } else { + value = java.util.Optional.empty(); + } + return value; + } + + private static void encode$constructedType$1(org.zwobble.example.types.data.GenericStruct, org.zwobble.example.types.data.GenericStruct> value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericStruct(value, outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$3); + } + + private static org.zwobble.example.types.data.GenericStruct, org.zwobble.example.types.data.GenericStruct> decode$constructedType$1(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericStruct(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$3); + return value; + } + + private static void encode$constructedType$2(org.zwobble.example.types.data.GenericNative, org.zwobble.example.types.data.GenericNative> value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value, outputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::encode$constructedType$4); + } + + private static org.zwobble.example.types.data.GenericNative, org.zwobble.example.types.data.GenericNative> decode$constructedType$2(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$0, org.zwobble.example.types.data.transient0.HobgoblinTransient0Data::decode$constructedType$4); + return value; + } + + private static void encode$constructedType$3(org.zwobble.example.types.data.GenericStruct value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericStruct(value, outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString); + } + + private static org.zwobble.example.types.data.GenericStruct decode$constructedType$3(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericStruct(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString); + return value; + } + + private static void encode$constructedType$4(org.zwobble.example.types.data.GenericNative value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.encodeGenericNative(value, outputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::encodeString); + } + + private static org.zwobble.example.types.data.GenericNative decode$constructedType$4(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var value = org.zwobble.example.types.data.transient0.HobgoblinTransient0Data.decodeGenericNative(inputStream, sharedValues, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString, org.zwobble.example.types.transient0.HobgoblinTransient0Builtins::decodeString); + return value; + } + + // Custom area start: org.zwobble.example.types.data.transient0.HobgoblinTransient0Data body + public static void encodeNative( + Native value, + OutputStream outputStream, + Map sharedValues + ) throws IOException { + HobgoblinTransient0Builtins.encodeInt32(value.a(), outputStream, sharedValues); + HobgoblinTransient0Builtins.encodeInt32(value.b(), outputStream, sharedValues); + } + + public static Native decodeNative( + InputStream inputStream, + List sharedValues + ) throws IOException { + var a = HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + var b = HobgoblinTransient0Builtins.decodeInt32(inputStream, sharedValues); + return new Native(a, b); + } + + public static void encodeGenericNative( + GenericNative value, + OutputStream outputStream, + Map sharedValues, + Encoder encoderA, + Encoder encoderB + ) throws IOException { + encoderA.encode(value.a(), outputStream, sharedValues); + encoderB.encode(value.b(), outputStream, sharedValues); + } + + public static GenericNative decodeGenericNative( + InputStream inputStream, + List sharedValues, + Decoder decoderA, + Decoder decoderB + ) throws IOException { + var a = decoderA.decode(inputStream, sharedValues); + var b = decoderB.decode(inputStream, sharedValues); + return new GenericNative(a, b); + } + // Custom area end: org.zwobble.example.types.data.transient0.HobgoblinTransient0Data body +} diff --git a/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Decoder.java b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Decoder.java new file mode 100644 index 0000000..ad1a6d0 --- /dev/null +++ b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Decoder.java @@ -0,0 +1,13 @@ +// Generated by hobgoblin. + +package org.zwobble.example.types.transient0; + +// Custom area start: org.zwobble.example.types.transient0.Decoder imports +// Custom area end: org.zwobble.example.types.transient0.Decoder imports + +public interface Decoder { + public T decode(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException; + + // Custom area start: org.zwobble.example.types.transient0.Decoder body + // Custom area end: org.zwobble.example.types.transient0.Decoder body +} diff --git a/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Encoder.java b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Encoder.java new file mode 100644 index 0000000..2ba43a6 --- /dev/null +++ b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/Encoder.java @@ -0,0 +1,13 @@ +// Generated by hobgoblin. + +package org.zwobble.example.types.transient0; + +// Custom area start: org.zwobble.example.types.transient0.Encoder imports +// Custom area end: org.zwobble.example.types.transient0.Encoder imports + +public interface Encoder { + public void encode(T value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException; + + // Custom area start: org.zwobble.example.types.transient0.Encoder body + // Custom area end: org.zwobble.example.types.transient0.Encoder body +} diff --git a/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0Builtins.java b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0Builtins.java new file mode 100644 index 0000000..861d7bb --- /dev/null +++ b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0Builtins.java @@ -0,0 +1,91 @@ +// Generated by hobgoblin. + +package org.zwobble.example.types.transient0; + +// Custom area start: org.zwobble.example.types.transient0.HobgoblinTransient0Builtins imports +// Custom area end: org.zwobble.example.types.transient0.HobgoblinTransient0Builtins imports + +public final class HobgoblinTransient0Builtins { + public static void encodeBool(boolean value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + outputStream.write(value ? 1 : 0); + } + + public static boolean decodeBool(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + return inputStream.read() != 0; + } + + public static void encodeFloat64(double value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64(java.lang.Double.doubleToLongBits(value), outputStream, sharedValues); + } + + public static double decodeFloat64(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var longBits = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + return java.lang.Double.longBitsToDouble(longBits); + } + + public static void encodeInt8(byte value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + outputStream.write(value); + } + + public static byte decodeInt8(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + return (byte) inputStream.read(); + } + + public static void encodeInt32(int value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + outputStream.write(value >>> 0 & 255); + outputStream.write(value >>> 8 & 255); + outputStream.write(value >>> 16 & 255); + outputStream.write(value >>> 24 & 255); + } + + public static int decodeInt32(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + int value = 0; + value = value | inputStream.read() << 0; + value = value | inputStream.read() << 8; + value = value | inputStream.read() << 16; + value = value | inputStream.read() << 24; + return value; + } + + public static void encodeInt64(long value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + outputStream.write((int) (value >>> 0 & 255)); + outputStream.write((int) (value >>> 8 & 255)); + outputStream.write((int) (value >>> 16 & 255)); + outputStream.write((int) (value >>> 24 & 255)); + outputStream.write((int) (value >>> 32 & 255)); + outputStream.write((int) (value >>> 40 & 255)); + outputStream.write((int) (value >>> 48 & 255)); + outputStream.write((int) (value >>> 56 & 255)); + } + + public static long decodeInt64(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + long value = 0; + value = value | (long) inputStream.read() << 0; + value = value | (long) inputStream.read() << 8; + value = value | (long) inputStream.read() << 16; + value = value | (long) inputStream.read() << 24; + value = value | (long) inputStream.read() << 32; + value = value | (long) inputStream.read() << 40; + value = value | (long) inputStream.read() << 48; + value = value | (long) inputStream.read() << 56; + return value; + } + + public static void encodeString(String value, java.io.OutputStream outputStream, java.util.Map sharedValues) throws java.io.IOException { + var bytes = value.getBytes(java.nio.charset.StandardCharsets.UTF_8); + org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.encodeInt64((long) bytes.length, outputStream, sharedValues); + outputStream.write(bytes); + } + + public static String decodeString(java.io.InputStream inputStream, java.util.List sharedValues) throws java.io.IOException { + var bytesLength = org.zwobble.example.types.transient0.HobgoblinTransient0Builtins.decodeInt64(inputStream, sharedValues); + if (bytesLength > java.lang.Integer.MAX_VALUE) { + throw new java.io.IOException("Strings longer than Integer.MAX_VALUE are not supported"); + } + var bytes = inputStream.readNBytes((int) bytesLength); + return new String(bytes, java.nio.charset.StandardCharsets.UTF_8); + } + + // Custom area start: org.zwobble.example.types.transient0.HobgoblinTransient0Builtins body + // Custom area end: org.zwobble.example.types.transient0.HobgoblinTransient0Builtins body +} diff --git a/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0TaggedSharedValue.java b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0TaggedSharedValue.java new file mode 100644 index 0000000..6c5b520 --- /dev/null +++ b/examples/17-transient-0/output/java/src/main/java/org/zwobble/example/types/transient0/HobgoblinTransient0TaggedSharedValue.java @@ -0,0 +1,22 @@ +// Generated by hobgoblin. + +package org.zwobble.example.types.transient0; + +// Custom area start: org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue imports +// Custom area end: org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue imports + +public record HobgoblinTransient0TaggedSharedValue( + long typeId, + java.lang.Object value +) { + public boolean equals(java.lang.Object other) { + return other instanceof org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue otherSharedValue && this.typeId == otherSharedValue.typeId && this.value == otherSharedValue.value; + } + + public int hashCode() { + return 37 * (37 * 17 + java.lang.Long.hashCode(this.typeId)) + java.lang.System.identityHashCode(this.value); + } + + // Custom area start: org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue body + // Custom area end: org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue body +} diff --git a/examples/17-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java b/examples/17-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java new file mode 100644 index 0000000..1a1d659 --- /dev/null +++ b/examples/17-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java @@ -0,0 +1,452 @@ +package org.zwobble.example; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.zwobble.example.types.data.EnumWithVariants; +import org.zwobble.example.types.data.GenericNative; +import org.zwobble.example.types.data.GenericStruct; +import org.zwobble.example.types.data.Native; +import org.zwobble.example.types.data.StructSingleton; +import org.zwobble.example.types.data.StructWithBool; +import org.zwobble.example.types.data.StructWithBox; +import org.zwobble.example.types.data.StructWithDifferentSharedTypes; +import org.zwobble.example.types.data.StructWithEnum; +import org.zwobble.example.types.data.StructWithFloat64; +import org.zwobble.example.types.data.StructWithGenericNative; +import org.zwobble.example.types.data.StructWithGenericStruct; +import org.zwobble.example.types.data.StructWithInt8; +import org.zwobble.example.types.data.StructWithInt32; +import org.zwobble.example.types.data.StructWithInt64; +import org.zwobble.example.types.data.StructWithList; +import org.zwobble.example.types.data.StructWithListOfShared; +import org.zwobble.example.types.data.StructWithNative; +import org.zwobble.example.types.data.StructWithOption; +import org.zwobble.example.types.data.StructWithSharedSumAndVariant; +import org.zwobble.example.types.data.StructWithString; +import org.zwobble.example.types.data.StructWithStruct; +import org.zwobble.example.types.data.StructWithSum; +import org.zwobble.example.types.data.VariantOne; +import org.zwobble.example.types.data.VariantTwo; +import org.zwobble.example.types.data.transient0.HobgoblinTransient0Data; +import org.zwobble.example.types.transient0.HobgoblinTransient0TaggedSharedValue; + +public class Transient0Tests { + @Test + public void structSingleton() throws IOException { + var value = StructSingleton.INSTANCE; + + assertRoundTripEncoding( + "StructSingleton", + value, + HobgoblinTransient0Data::encodeStructSingleton, + HobgoblinTransient0Data::decodeStructSingleton + ); + } + + @Test + public void structWithBool() throws IOException { + var value = new StructWithBool(true, false); + + assertRoundTripEncoding( + "StructWithBool", + value, + HobgoblinTransient0Data::encodeStructWithBool, + HobgoblinTransient0Data::decodeStructWithBool + ); + } + + @Test + public void structWithFloat64() throws IOException { + var value = new StructWithFloat64(10, 2.5); + + assertRoundTripEncoding( + "StructWithFloat64", + value, + HobgoblinTransient0Data::encodeStructWithFloat64, + HobgoblinTransient0Data::decodeStructWithFloat64 + ); + } + + @Test + public void structWithInt8() throws IOException { + var value = new StructWithInt8((byte)10, (byte)25); + + assertRoundTripEncoding( + "StructWithInt8", + value, + HobgoblinTransient0Data::encodeStructWithInt8, + HobgoblinTransient0Data::decodeStructWithInt8 + ); + } + + @Test + public void structWithInt32() throws IOException { + var value = new StructWithInt32(10, 25); + + assertRoundTripEncoding( + "StructWithInt32", + value, + HobgoblinTransient0Data::encodeStructWithInt32, + HobgoblinTransient0Data::decodeStructWithInt32 + ); + } + + @Test + public void structWithInt32MinAndMax() throws IOException { + var value = new StructWithInt32(Integer.MIN_VALUE, Integer.MAX_VALUE); + + assertRoundTripEncoding( + "StructWithInt32MinAndMax", + value, + HobgoblinTransient0Data::encodeStructWithInt32, + HobgoblinTransient0Data::decodeStructWithInt32 + ); + } + + @Test + public void structWithInt64() throws IOException { + var value = new StructWithInt64(10, 25); + + assertRoundTripEncoding( + "StructWithInt64", + value, + HobgoblinTransient0Data::encodeStructWithInt64, + HobgoblinTransient0Data::decodeStructWithInt64 + ); + } + + @Test + public void structWithInt64MinAndMax() throws IOException { + var value = new StructWithInt64(Long.MIN_VALUE, Long.MAX_VALUE); + + assertRoundTripEncoding( + "StructWithInt64MinAndMax", + value, + HobgoblinTransient0Data::encodeStructWithInt64, + HobgoblinTransient0Data::decodeStructWithInt64 + ); + } + + @Test + public void structWithString() throws IOException { + var value = new StructWithString("abc", "def"); + + assertRoundTripEncoding( + "StructWithString", + value, + HobgoblinTransient0Data::encodeStructWithString, + HobgoblinTransient0Data::decodeStructWithString + ); + } + + @Test + public void structWithStruct() throws IOException { + var value = new StructWithStruct(new StructWithInt32(10, 25), 42); + + assertRoundTripEncoding( + "StructWithStruct", + value, + HobgoblinTransient0Data::encodeStructWithStruct, + HobgoblinTransient0Data::decodeStructWithStruct + ); + } + + @Test + public void structWithGenericStruct() throws IOException { + var value = new StructWithGenericStruct( + new GenericStruct(10, "x1"), + new GenericStruct( + Optional.of("x2"), + new GenericStruct( + Optional.of("x3"), + new GenericStruct("x4", "x5") + ) + ) + ); + + assertRoundTripEncoding( + "StructWithGenericStruct", + value, + HobgoblinTransient0Data::encodeStructWithGenericStruct, + HobgoblinTransient0Data::decodeStructWithGenericStruct + ); + } + + @Test + public void structWithList() throws IOException { + var value = new StructWithList( + List.of(10L, 25L), + List.of( + new StructWithInt32(42, 47), + new StructWithInt32(52, 57), + new StructWithInt32(62, 67) + ) + ); + + assertRoundTripEncoding( + "StructWithList", + value, + HobgoblinTransient0Data::encodeStructWithList, + HobgoblinTransient0Data::decodeStructWithList + ); + } + + @Test + public void structWithOptionNone() throws IOException { + var value = new StructWithOption( + Optional.empty(), + Optional.empty() + ); + + assertRoundTripEncoding( + "StructWithOption_None", + value, + HobgoblinTransient0Data::encodeStructWithOption, + HobgoblinTransient0Data::decodeStructWithOption + ); + } + + @Test + public void structWithOptionSome() throws IOException { + var value = new StructWithOption( + Optional.of(10L), + Optional.of(new StructWithInt32(42, 47)) + ); + + assertRoundTripEncoding( + "StructWithOption_Some", + value, + HobgoblinTransient0Data::encodeStructWithOption, + HobgoblinTransient0Data::decodeStructWithOption + ); + } + + @Test + public void enumWithVariants() throws IOException { + assertRoundTripEncoding( + "EnumWithVariants_zero", + EnumWithVariants.ZERO, + HobgoblinTransient0Data::encodeEnumWithVariants, + HobgoblinTransient0Data::decodeEnumWithVariants + ); + + assertRoundTripEncoding( + "EnumWithVariants_one", + EnumWithVariants.ONE, + HobgoblinTransient0Data::encodeEnumWithVariants, + HobgoblinTransient0Data::decodeEnumWithVariants + ); + + assertRoundTripEncoding( + "EnumWithVariants_two", + EnumWithVariants.TWO, + HobgoblinTransient0Data::encodeEnumWithVariants, + HobgoblinTransient0Data::decodeEnumWithVariants + ); + } + + @Test + public void structWithEnum() throws IOException { + var value = new StructWithEnum( + EnumWithVariants.ONE, + 42 + ); + + assertRoundTripEncoding( + "StructWithEnum", + value, + HobgoblinTransient0Data::encodeStructWithEnum, + HobgoblinTransient0Data::decodeStructWithEnum + ); + } + + @Test + public void sumWithVariants() throws IOException { + assertRoundTripEncoding( + "SumWithVariants_VariantOne", + new VariantOne(10), + HobgoblinTransient0Data::encodeSumWithVariants, + HobgoblinTransient0Data::decodeSumWithVariants + ); + + assertRoundTripEncoding( + "SumWithVariants_VariantTwo", + new VariantTwo(25), + HobgoblinTransient0Data::encodeSumWithVariants, + HobgoblinTransient0Data::decodeSumWithVariants + ); + } + + @Test + public void sumWithBoxedVariants() throws IOException { + assertRoundTripEncoding( + "SumWithBoxedVariants_VariantOne", + new VariantOne(10), + HobgoblinTransient0Data::encodeSumWithBoxedVariants, + HobgoblinTransient0Data::decodeSumWithBoxedVariants + ); + + assertRoundTripEncoding( + "SumWithBoxedVariants_VariantTwo", + new VariantTwo(25), + HobgoblinTransient0Data::encodeSumWithBoxedVariants, + HobgoblinTransient0Data::decodeSumWithBoxedVariants + ); + } + + @Test + public void structWithSum() throws IOException { + var value = new StructWithSum( + new VariantTwo(25), + 42 + ); + + assertRoundTripEncoding( + "StructWithSum", + value, + HobgoblinTransient0Data::encodeStructWithSum, + HobgoblinTransient0Data::decodeStructWithSum + ); + } + + @Test + public void structWithNative() throws IOException { + var value = new StructWithNative( + new Native(10, 25) + ); + + assertRoundTripEncoding( + "StructWithNative", + value, + HobgoblinTransient0Data::encodeStructWithNative, + HobgoblinTransient0Data::decodeStructWithNative + ); + } + + @Test + public void structWithGenericNative() throws IOException { + var value = new StructWithGenericNative( + new GenericNative(10, "x1"), + new GenericNative( + Optional.of("x2"), + new GenericNative( + Optional.of("x3"), + new GenericNative("x4", "x5") + ) + ) + ); + + assertRoundTripEncoding( + "StructWithGenericNative", + value, + HobgoblinTransient0Data::encodeStructWithGenericNative, + HobgoblinTransient0Data::decodeStructWithGenericNative + ); + } + + @Test + public void structWithBox() throws IOException { + var value = new StructWithBox( + new StructWithInt32(10, 25) + ); + + assertRoundTripEncoding( + "StructWithBox", + value, + HobgoblinTransient0Data::encodeStructWithBox, + HobgoblinTransient0Data::decodeStructWithBox + ); + } + + @Test + public void structWithListOfShared() throws IOException { + var a = new StructWithInt32(10, 25); + var b = new StructWithInt32(42, 47); + + var value = new StructWithListOfShared(List.of(a, a, b, a, b)); + + var decodedValue = assertRoundTripEncoding( + "StructWithListOfShared", + value, + HobgoblinTransient0Data::encodeStructWithListOfShared, + HobgoblinTransient0Data::decodeStructWithListOfShared + ); + Assertions.assertSame(decodedValue.inner().get(0), decodedValue.inner().get(1)); + Assertions.assertSame(decodedValue.inner().get(0), decodedValue.inner().get(3)); + Assertions.assertSame(decodedValue.inner().get(2), decodedValue.inner().get(4)); + } + + @Test + public void structWithDifferentSharedTypes() throws IOException { + var a = new StructWithInt32(10, 25); + var b = new StructWithInt64(42, 47); + var c = new StructWithInt32(52, 57); + + var value = new StructWithDifferentSharedTypes(a, b, c); + + assertRoundTripEncoding( + "StructWithDifferentSharedTypes", + value, + HobgoblinTransient0Data::encodeStructWithDifferentSharedTypes, + HobgoblinTransient0Data::decodeStructWithDifferentSharedTypes + ); + } + + @Test + public void structWithSharedSumAndVariant() throws IOException { + var a = new VariantOne(10); + + var value = new StructWithSharedSumAndVariant(a, a); + + assertRoundTripEncoding( + "StructWithSharedSumAndVariant", + value, + HobgoblinTransient0Data::encodeStructWithSharedSumAndVariant, + HobgoblinTransient0Data::decodeStructWithSharedSumAndVariant + ); + } + + private T assertRoundTripEncoding( + String name, + T value, + Encoder encoder, + Decoder decoder + ) throws IOException { + var outputStream = new ByteArrayOutputStream(); + encoder.encode(value, outputStream, new HashMap<>()); + var bytes = outputStream.toByteArray(); + + var outputDir = System.getenv("HOBGOBLIN_OUTPUT_DIR"); + var transient0OutputDir = Path.of(outputDir).resolve("transient-0"); + Files.createDirectories(transient0OutputDir); + var transient0OutputPath = transient0OutputDir.resolve(name); + Files.write(transient0OutputPath, bytes); + + var inputStream = new ByteArrayInputStream(bytes); + var decodedValue = decoder.decode(inputStream, new ArrayList<>()); + + Assertions.assertEquals(value, decodedValue); + + return decodedValue; + } + + private interface Encoder { + void encode(T value, OutputStream outputStream, Map sharedValues) throws IOException; + } + + private interface Decoder { + T decode(InputStream inputStream, List sharedValues) throws IOException; + } +} diff --git a/examples/17-transient-0/output/rust/.gitignore b/examples/17-transient-0/output/rust/.gitignore new file mode 100644 index 0000000..fc03479 --- /dev/null +++ b/examples/17-transient-0/output/rust/.gitignore @@ -0,0 +1,2 @@ +/target +/transient-0/ diff --git a/examples/17-transient-0/output/rust/Cargo.lock b/examples/17-transient-0/output/rust/Cargo.lock new file mode 100644 index 0000000..9dc6e3e --- /dev/null +++ b/examples/17-transient-0/output/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "example" +version = "0.1.0" diff --git a/examples/17-transient-0/output/rust/Cargo.toml b/examples/17-transient-0/output/rust/Cargo.toml new file mode 100644 index 0000000..5d4c622 --- /dev/null +++ b/examples/17-transient-0/output/rust/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "example" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/examples/17-transient-0/output/rust/rust-toolchain.toml b/examples/17-transient-0/output/rust/rust-toolchain.toml new file mode 100644 index 0000000..4fedb95 --- /dev/null +++ b/examples/17-transient-0/output/rust/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.96" diff --git a/examples/17-transient-0/output/rust/src/data.rs b/examples/17-transient-0/output/rust/src/data.rs new file mode 100644 index 0000000..2b890c2 --- /dev/null +++ b/examples/17-transient-0/output/rust/src/data.rs @@ -0,0 +1,66 @@ +include!("./gen/data.rs"); + +#[derive(Clone, Debug, Hash, PartialEq)] +pub struct Native { + pub a: i32, + pub b: i32, +} + +#[derive(Clone, Debug, Hash, PartialEq)] +pub struct GenericNative { + pub a: A, + pub b: B, +} + + +pub mod transient_0 { + use ::std::any::Any; + use ::std::sync::Arc; + use ::std::vec::Vec; + use crate::transient_0::{Decode, Encode}; + use super::{GenericNative, Native}; + + include!("./gen/data/transient_0.rs"); + + pub fn encode_native( + value: &Native, + writer: &mut impl std::io::Write, + shared_values: &mut ::std::collections::HashMap::, + ) -> std::io::Result<()> { + crate::transient_0::encode_int_32(&value.a, writer, shared_values)?; + crate::transient_0::encode_int_32(&value.b, writer, shared_values)?; + Ok(()) + } + + pub fn decode_native( + reader: &mut impl std::io::Read, + shared_values: &mut Vec>, + ) -> std::io::Result { + let a = crate::transient_0::decode_int_32(reader, shared_values)?; + let b = crate::transient_0::decode_int_32(reader, shared_values)?; + Ok(Native { a, b }) + } + + pub fn encode_generic_native( + value: &GenericNative, + writer: &mut TWrite, + shared_values: &mut ::std::collections::HashMap::, + encode_a: Encode, + encode_b: Encode, + ) -> std::io::Result<()> { + encode_a(&value.a, writer, shared_values)?; + encode_b(&value.b, writer, shared_values)?; + Ok(()) + } + + pub fn decode_generic_native( + reader: &mut TRead, + shared_values: &mut Vec>, + decode_a: Decode, + decode_b: Decode, + ) -> std::io::Result> { + let a = decode_a(reader, shared_values)?; + let b = decode_b(reader, shared_values)?; + Ok(GenericNative { a, b }) + } +} diff --git a/examples/17-transient-0/output/rust/src/gen/data.rs b/examples/17-transient-0/output/rust/src/gen/data.rs new file mode 100644 index 0000000..2b344e4 --- /dev/null +++ b/examples/17-transient-0/output/rust/src/gen/data.rs @@ -0,0 +1,169 @@ +// Generated by hobgoblin. + +#[derive(Clone, Debug, PartialEq)] +pub struct StructSingleton; + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithBool { + pub a: ::core::primitive::bool, + pub b: ::core::primitive::bool, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithFloat64 { + pub a: ::core::primitive::f64, + pub b: ::core::primitive::f64, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithInt8 { + pub a: ::core::primitive::i8, + pub b: ::core::primitive::i8, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithInt32 { + pub a: ::core::primitive::i32, + pub b: ::core::primitive::i32, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithInt64 { + pub a: ::core::primitive::i64, + pub b: ::core::primitive::i64, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithString { + pub a: ::std::string::String, + pub b: ::std::string::String, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithStruct { + pub inner: crate::data::StructWithInt32, + pub c: ::core::primitive::i32, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct GenericStruct { + pub a: A, + pub b: B, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithGenericStruct { + pub a: crate::data::GenericStruct::<::core::primitive::i32, ::std::string::String>, + pub b: crate::data::GenericStruct::<::std::option::Option::<::std::string::String>, crate::data::GenericStruct::<::std::option::Option::<::std::string::String>, crate::data::GenericStruct::<::std::string::String, ::std::string::String>>>, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithList { + pub a: ::std::vec::Vec::<::core::primitive::i64>, + pub b: ::std::vec::Vec::, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithOption { + pub a: ::std::option::Option::<::core::primitive::i64>, + pub b: ::std::option::Option::, +} + +#[derive(Clone, Copy, Debug, Hash, PartialEq)] +pub enum EnumWithVariants { + Zero, + One, + Two, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithEnum { + pub inner: crate::data::EnumWithVariants, + pub c: ::core::primitive::i32, +} + +#[derive(Clone, Debug, PartialEq)] +pub enum SumWithVariants { + VariantOne(crate::data::VariantOne), + VariantTwo(crate::data::VariantTwo), +} + +impl ::std::convert::From:: for crate::data::SumWithVariants { + fn from(value: crate::data::VariantOne) -> Self { + Self::VariantOne(value) + } +} + +impl ::std::convert::From:: for crate::data::SumWithVariants { + fn from(value: crate::data::VariantTwo) -> Self { + Self::VariantTwo(value) + } +} + +#[derive(Clone, Debug, PartialEq)] +pub struct VariantOne { + pub a: ::core::primitive::i32, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct VariantTwo { + pub a: ::core::primitive::i64, +} + +#[derive(Clone, Debug, PartialEq)] +pub enum SumWithBoxedVariants { + VariantOne(::std::boxed::Box::), + VariantTwo(::std::boxed::Box::), +} + +impl ::std::convert::From:: for crate::data::SumWithBoxedVariants { + fn from(value: crate::data::VariantOne) -> Self { + Self::VariantOne(::std::boxed::Box::new(value)) + } +} + +impl ::std::convert::From:: for crate::data::SumWithBoxedVariants { + fn from(value: crate::data::VariantTwo) -> Self { + Self::VariantTwo(::std::boxed::Box::new(value)) + } +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithSum { + pub inner: crate::data::SumWithVariants, + pub b: ::core::primitive::i32, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithNative { + pub a: crate::data::Native, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithGenericNative { + pub a: crate::data::GenericNative::<::core::primitive::i32, ::std::string::String>, + pub b: crate::data::GenericNative::<::std::option::Option::<::std::string::String>, crate::data::GenericNative::<::std::option::Option::<::std::string::String>, crate::data::GenericNative::<::std::string::String, ::std::string::String>>>, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithBox { + pub inner: ::std::boxed::Box::, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithListOfShared { + pub inner: ::std::vec::Vec::<::std::sync::Arc::>, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithDifferentSharedTypes { + pub a: ::std::sync::Arc::, + pub b: ::std::sync::Arc::, + pub c: ::std::sync::Arc::, +} + +#[derive(Clone, Debug, PartialEq)] +pub struct StructWithSharedSumAndVariant { + pub a: ::std::sync::Arc::, + pub b: ::std::sync::Arc::, +} diff --git a/examples/17-transient-0/output/rust/src/gen/data/transient_0.rs b/examples/17-transient-0/output/rust/src/gen/data/transient_0.rs new file mode 100644 index 0000000..3c40ea2 --- /dev/null +++ b/examples/17-transient-0/output/rust/src/gen/data/transient_0.rs @@ -0,0 +1,621 @@ +// Generated by hobgoblin. + +pub fn encode_struct_singleton(value: &crate::data::StructSingleton, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_singleton(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + ::std::io::Result::Ok(crate::data::StructSingleton) +} + +pub fn encode_struct_with_bool(value: &crate::data::StructWithBool, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_bool(&value.a, writer, shared_values)?; + crate::transient_0::encode_bool(&value.b, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_bool(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::transient_0::decode_bool(reader, shared_values)?; + let b = crate::transient_0::decode_bool(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithBool { a: a, b: b }) +} + +pub fn encode_struct_with_float_64(value: &crate::data::StructWithFloat64, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_float_64(&value.a, writer, shared_values)?; + crate::transient_0::encode_float_64(&value.b, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_float_64(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::transient_0::decode_float_64(reader, shared_values)?; + let b = crate::transient_0::decode_float_64(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithFloat64 { a: a, b: b }) +} + +pub fn encode_struct_with_int_8(value: &crate::data::StructWithInt8, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_int_8(&value.a, writer, shared_values)?; + crate::transient_0::encode_int_8(&value.b, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_int_8(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::transient_0::decode_int_8(reader, shared_values)?; + let b = crate::transient_0::decode_int_8(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithInt8 { a: a, b: b }) +} + +pub fn encode_struct_with_int_32(value: &crate::data::StructWithInt32, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_int_32(&value.a, writer, shared_values)?; + crate::transient_0::encode_int_32(&value.b, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_int_32(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::transient_0::decode_int_32(reader, shared_values)?; + let b = crate::transient_0::decode_int_32(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithInt32 { a: a, b: b }) +} + +pub fn encode_struct_with_int_64(value: &crate::data::StructWithInt64, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_int_64(&value.a, writer, shared_values)?; + crate::transient_0::encode_int_64(&value.b, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_int_64(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::transient_0::decode_int_64(reader, shared_values)?; + let b = crate::transient_0::decode_int_64(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithInt64 { a: a, b: b }) +} + +pub fn encode_struct_with_string(value: &crate::data::StructWithString, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_string(&value.a, writer, shared_values)?; + crate::transient_0::encode_string(&value.b, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_string(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::transient_0::decode_string(reader, shared_values)?; + let b = crate::transient_0::decode_string(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithString { a: a, b: b }) +} + +pub fn encode_struct_with_struct(value: &crate::data::StructWithStruct, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::data::transient_0::encode_struct_with_int_32(&value.inner, writer, shared_values)?; + crate::transient_0::encode_int_32(&value.c, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_struct(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let inner = crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?; + let c = crate::transient_0::decode_int_32(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithStruct { inner: inner, c: c }) +} + +pub fn encode_generic_struct(value: &crate::data::GenericStruct::, writer: &mut TWrite, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>, encode_a: crate::transient_0::Encode::, encode_b: crate::transient_0::Encode::) -> ::std::io::Result::<()> { + encode_a(&value.a, writer, shared_values)?; + encode_b(&value.b, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_generic_struct(reader: &mut TRead, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>, decode_a: crate::transient_0::Decode::, decode_b: crate::transient_0::Decode::) -> ::std::io::Result::> { + let a = decode_a(reader, shared_values)?; + let b = decode_b(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::GenericStruct:: { a: a, b: b }) +} + +pub fn encode_struct_with_generic_struct(value: &crate::data::StructWithGenericStruct, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::data::transient_0::encode_generic_struct(&value.a, writer, shared_values, |value, writer, shared_values| { + crate::transient_0::encode_int_32(value, writer, shared_values)?; + ::std::io::Result::Ok(()) + }, |value, writer, shared_values| { + crate::transient_0::encode_string(value, writer, shared_values)?; + ::std::io::Result::Ok(()) + })?; + crate::data::transient_0::encode_generic_struct(&value.b, writer, shared_values, |value, writer, shared_values| { + match value { + ::std::option::Option::Some(value) => { + crate::transient_0::encode_bool(&true, writer, shared_values)?; + crate::transient_0::encode_string(&value, writer, shared_values)?; + }, + ::std::option::Option::None => { + crate::transient_0::encode_bool(&false, writer, shared_values)?; + }, + }; + ::std::io::Result::Ok(()) + }, |value, writer, shared_values| { + crate::data::transient_0::encode_generic_struct(value, writer, shared_values, |value, writer, shared_values| { + match value { + ::std::option::Option::Some(value) => { + crate::transient_0::encode_bool(&true, writer, shared_values)?; + crate::transient_0::encode_string(&value, writer, shared_values)?; + }, + ::std::option::Option::None => { + crate::transient_0::encode_bool(&false, writer, shared_values)?; + }, + }; + ::std::io::Result::Ok(()) + }, |value, writer, shared_values| { + crate::data::transient_0::encode_generic_struct(value, writer, shared_values, |value, writer, shared_values| { + crate::transient_0::encode_string(value, writer, shared_values)?; + ::std::io::Result::Ok(()) + }, |value, writer, shared_values| { + crate::transient_0::encode_string(value, writer, shared_values)?; + ::std::io::Result::Ok(()) + })?; + ::std::io::Result::Ok(()) + })?; + ::std::io::Result::Ok(()) + })?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_generic_struct(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::data::transient_0::decode_generic_struct(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_int_32(reader, shared_values)?), |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?))?; + let b = crate::data::transient_0::decode_generic_struct(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok({ + let is_some = crate::transient_0::decode_bool(reader, shared_values)?; + if is_some { + ::std::option::Option::Some(crate::transient_0::decode_string(reader, shared_values)?) + } else { + ::std::option::Option::None + } + }), |reader, shared_values| ::std::io::Result::Ok(crate::data::transient_0::decode_generic_struct(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok({ + let is_some = crate::transient_0::decode_bool(reader, shared_values)?; + if is_some { + ::std::option::Option::Some(crate::transient_0::decode_string(reader, shared_values)?) + } else { + ::std::option::Option::None + } + }), |reader, shared_values| ::std::io::Result::Ok(crate::data::transient_0::decode_generic_struct(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?), |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?))?))?))?; + ::std::io::Result::Ok(crate::data::StructWithGenericStruct { a: a, b: b }) +} + +pub fn encode_struct_with_list(value: &crate::data::StructWithList, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + { + crate::transient_0::encode_int_64(&(((&value.a).len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?, writer, shared_values)?; + for element in &value.a { + crate::transient_0::encode_int_64(element, writer, shared_values)?; + }; + }; + { + crate::transient_0::encode_int_64(&(((&value.b).len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?, writer, shared_values)?; + for element in &value.b { + crate::data::transient_0::encode_struct_with_int_32(element, writer, shared_values)?; + }; + }; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_list(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = { + let len = crate::transient_0::decode_int_64(reader, shared_values)?; + let mut elements = ::std::vec::Vec::with_capacity((len.try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?); + for _ in 0..len { + elements.push(crate::transient_0::decode_int_64(reader, shared_values)?); + }; + elements + }; + let b = { + let len = crate::transient_0::decode_int_64(reader, shared_values)?; + let mut elements = ::std::vec::Vec::with_capacity((len.try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?); + for _ in 0..len { + elements.push(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); + }; + elements + }; + ::std::io::Result::Ok(crate::data::StructWithList { a: a, b: b }) +} + +pub fn encode_struct_with_option(value: &crate::data::StructWithOption, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + match &value.a { + ::std::option::Option::Some(value) => { + crate::transient_0::encode_bool(&true, writer, shared_values)?; + crate::transient_0::encode_int_64(&value, writer, shared_values)?; + }, + ::std::option::Option::None => { + crate::transient_0::encode_bool(&false, writer, shared_values)?; + }, + }; + match &value.b { + ::std::option::Option::Some(value) => { + crate::transient_0::encode_bool(&true, writer, shared_values)?; + crate::data::transient_0::encode_struct_with_int_32(&value, writer, shared_values)?; + }, + ::std::option::Option::None => { + crate::transient_0::encode_bool(&false, writer, shared_values)?; + }, + }; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_option(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = { + let is_some = crate::transient_0::decode_bool(reader, shared_values)?; + if is_some { + ::std::option::Option::Some(crate::transient_0::decode_int_64(reader, shared_values)?) + } else { + ::std::option::Option::None + } + }; + let b = { + let is_some = crate::transient_0::decode_bool(reader, shared_values)?; + if is_some { + ::std::option::Option::Some(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?) + } else { + ::std::option::Option::None + } + }; + ::std::io::Result::Ok(crate::data::StructWithOption { a: a, b: b }) +} + +pub fn encode_enum_with_variants(value: &crate::data::EnumWithVariants, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_int_32(&match value { + crate::data::EnumWithVariants::Zero => 0, + crate::data::EnumWithVariants::One => 1, + crate::data::EnumWithVariants::Two => 2, + }, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_enum_with_variants(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + ::std::io::Result::Ok(match &crate::transient_0::decode_int_32(reader, shared_values)? { + 0 => crate::data::EnumWithVariants::Zero, + 1 => crate::data::EnumWithVariants::One, + 2 => crate::data::EnumWithVariants::Two, + tag => ::std::result::Result::Err(::std::io::Error::new(::std::io::ErrorKind::InvalidData, format!("unrecognised variant tag for data.EnumWithVariants: {}", tag)))?, + }) +} + +pub fn encode_struct_with_enum(value: &crate::data::StructWithEnum, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::data::transient_0::encode_enum_with_variants(&value.inner, writer, shared_values)?; + crate::transient_0::encode_int_32(&value.c, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_enum(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let inner = crate::data::transient_0::decode_enum_with_variants(reader, shared_values)?; + let c = crate::transient_0::decode_int_32(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithEnum { inner: inner, c: c }) +} + +pub fn encode_sum_with_variants(value: &crate::data::SumWithVariants, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + match value { + crate::data::SumWithVariants::VariantOne(value) => { + crate::transient_0::encode_int_32(&0, writer, shared_values)?; + crate::data::transient_0::encode_variant_one(value, writer, shared_values)?; + }, + crate::data::SumWithVariants::VariantTwo(value) => { + crate::transient_0::encode_int_32(&1, writer, shared_values)?; + crate::data::transient_0::encode_variant_two(value, writer, shared_values)?; + }, + }; + ::std::io::Result::Ok(()) +} + +pub fn decode_sum_with_variants(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + ::std::io::Result::Ok(match &crate::transient_0::decode_int_32(reader, shared_values)? { + 0 => crate::data::SumWithVariants::VariantOne(crate::data::transient_0::decode_variant_one(reader, shared_values)?), + 1 => crate::data::SumWithVariants::VariantTwo(crate::data::transient_0::decode_variant_two(reader, shared_values)?), + tag => ::std::result::Result::Err(::std::io::Error::new(::std::io::ErrorKind::InvalidData, format!("unrecognised variant tag for data.SumWithVariants: {}", tag)))?, + }) +} + +pub fn encode_variant_one(value: &crate::data::VariantOne, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_int_32(&value.a, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_variant_one(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::transient_0::decode_int_32(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::VariantOne { a: a }) +} + +pub fn encode_variant_two(value: &crate::data::VariantTwo, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_int_64(&value.a, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_variant_two(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::transient_0::decode_int_64(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::VariantTwo { a: a }) +} + +pub fn encode_sum_with_boxed_variants(value: &crate::data::SumWithBoxedVariants, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + match value { + crate::data::SumWithBoxedVariants::VariantOne(value) => { + crate::transient_0::encode_int_32(&0, writer, shared_values)?; + crate::data::transient_0::encode_variant_one(value.as_ref(), writer, shared_values)?; + }, + crate::data::SumWithBoxedVariants::VariantTwo(value) => { + crate::transient_0::encode_int_32(&1, writer, shared_values)?; + crate::data::transient_0::encode_variant_two(value.as_ref(), writer, shared_values)?; + }, + }; + ::std::io::Result::Ok(()) +} + +pub fn decode_sum_with_boxed_variants(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + ::std::io::Result::Ok(match &crate::transient_0::decode_int_32(reader, shared_values)? { + 0 => crate::data::SumWithBoxedVariants::VariantOne(::std::boxed::Box::new(crate::data::transient_0::decode_variant_one(reader, shared_values)?)), + 1 => crate::data::SumWithBoxedVariants::VariantTwo(::std::boxed::Box::new(crate::data::transient_0::decode_variant_two(reader, shared_values)?)), + tag => ::std::result::Result::Err(::std::io::Error::new(::std::io::ErrorKind::InvalidData, format!("unrecognised variant tag for data.SumWithBoxedVariants: {}", tag)))?, + }) +} + +pub fn encode_struct_with_sum(value: &crate::data::StructWithSum, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::data::transient_0::encode_sum_with_variants(&value.inner, writer, shared_values)?; + crate::transient_0::encode_int_32(&value.b, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_sum(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let inner = crate::data::transient_0::decode_sum_with_variants(reader, shared_values)?; + let b = crate::transient_0::decode_int_32(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithSum { inner: inner, b: b }) +} + +pub fn encode_struct_with_native(value: &crate::data::StructWithNative, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::data::transient_0::encode_native(&value.a, writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_native(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::data::transient_0::decode_native(reader, shared_values)?; + ::std::io::Result::Ok(crate::data::StructWithNative { a: a }) +} + +pub fn encode_struct_with_generic_native(value: &crate::data::StructWithGenericNative, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::data::transient_0::encode_generic_native(&value.a, writer, shared_values, |value, writer, shared_values| { + crate::transient_0::encode_int_32(value, writer, shared_values)?; + ::std::io::Result::Ok(()) + }, |value, writer, shared_values| { + crate::transient_0::encode_string(value, writer, shared_values)?; + ::std::io::Result::Ok(()) + })?; + crate::data::transient_0::encode_generic_native(&value.b, writer, shared_values, |value, writer, shared_values| { + match value { + ::std::option::Option::Some(value) => { + crate::transient_0::encode_bool(&true, writer, shared_values)?; + crate::transient_0::encode_string(&value, writer, shared_values)?; + }, + ::std::option::Option::None => { + crate::transient_0::encode_bool(&false, writer, shared_values)?; + }, + }; + ::std::io::Result::Ok(()) + }, |value, writer, shared_values| { + crate::data::transient_0::encode_generic_native(value, writer, shared_values, |value, writer, shared_values| { + match value { + ::std::option::Option::Some(value) => { + crate::transient_0::encode_bool(&true, writer, shared_values)?; + crate::transient_0::encode_string(&value, writer, shared_values)?; + }, + ::std::option::Option::None => { + crate::transient_0::encode_bool(&false, writer, shared_values)?; + }, + }; + ::std::io::Result::Ok(()) + }, |value, writer, shared_values| { + crate::data::transient_0::encode_generic_native(value, writer, shared_values, |value, writer, shared_values| { + crate::transient_0::encode_string(value, writer, shared_values)?; + ::std::io::Result::Ok(()) + }, |value, writer, shared_values| { + crate::transient_0::encode_string(value, writer, shared_values)?; + ::std::io::Result::Ok(()) + })?; + ::std::io::Result::Ok(()) + })?; + ::std::io::Result::Ok(()) + })?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_generic_native(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = crate::data::transient_0::decode_generic_native(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_int_32(reader, shared_values)?), |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?))?; + let b = crate::data::transient_0::decode_generic_native(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok({ + let is_some = crate::transient_0::decode_bool(reader, shared_values)?; + if is_some { + ::std::option::Option::Some(crate::transient_0::decode_string(reader, shared_values)?) + } else { + ::std::option::Option::None + } + }), |reader, shared_values| ::std::io::Result::Ok(crate::data::transient_0::decode_generic_native(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok({ + let is_some = crate::transient_0::decode_bool(reader, shared_values)?; + if is_some { + ::std::option::Option::Some(crate::transient_0::decode_string(reader, shared_values)?) + } else { + ::std::option::Option::None + } + }), |reader, shared_values| ::std::io::Result::Ok(crate::data::transient_0::decode_generic_native(reader, shared_values, |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?), |reader, shared_values| ::std::io::Result::Ok(crate::transient_0::decode_string(reader, shared_values)?))?))?))?; + ::std::io::Result::Ok(crate::data::StructWithGenericNative { a: a, b: b }) +} + +pub fn encode_struct_with_box(value: &crate::data::StructWithBox, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::data::transient_0::encode_struct_with_int_32((&value.inner).as_ref(), writer, shared_values)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_box(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let inner = ::std::boxed::Box::new(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); + ::std::io::Result::Ok(crate::data::StructWithBox { inner: inner }) +} + +pub fn encode_struct_with_list_of_shared(value: &crate::data::StructWithListOfShared, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + { + crate::transient_0::encode_int_64(&(((&value.inner).len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?, writer, shared_values)?; + for element in &value.inner { + { + let ptr = ::std::sync::Arc::as_ptr(&element) as ::core::primitive::usize; + match (shared_values.get(&ptr)).copied() { + ::std::option::Option::Some(id) => { + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + }, + ::std::option::Option::None => { + let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + shared_values.insert(ptr, id); + crate::data::transient_0::encode_struct_with_int_32(element.as_ref(), writer, shared_values)?; + }, + }; + }; + }; + }; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_list_of_shared(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let inner = { + let len = crate::transient_0::decode_int_64(reader, shared_values)?; + let mut elements = ::std::vec::Vec::with_capacity((len.try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?); + for _ in 0..len { + elements.push({ + let id = crate::transient_0::decode_int_64(reader, shared_values)?; + if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { + ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? + } else { + let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); + shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); + decoded_value + } + }); + }; + elements + }; + ::std::io::Result::Ok(crate::data::StructWithListOfShared { inner: inner }) +} + +pub fn encode_struct_with_different_shared_types(value: &crate::data::StructWithDifferentSharedTypes, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + { + let ptr = ::std::sync::Arc::as_ptr(&&value.a) as ::core::primitive::usize; + match (shared_values.get(&ptr)).copied() { + ::std::option::Option::Some(id) => { + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + }, + ::std::option::Option::None => { + let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + shared_values.insert(ptr, id); + crate::data::transient_0::encode_struct_with_int_32((&value.a).as_ref(), writer, shared_values)?; + }, + }; + }; + { + let ptr = ::std::sync::Arc::as_ptr(&&value.b) as ::core::primitive::usize; + match (shared_values.get(&ptr)).copied() { + ::std::option::Option::Some(id) => { + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + }, + ::std::option::Option::None => { + let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + shared_values.insert(ptr, id); + crate::data::transient_0::encode_struct_with_int_64((&value.b).as_ref(), writer, shared_values)?; + }, + }; + }; + { + let ptr = ::std::sync::Arc::as_ptr(&&value.c) as ::core::primitive::usize; + match (shared_values.get(&ptr)).copied() { + ::std::option::Option::Some(id) => { + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + }, + ::std::option::Option::None => { + let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + shared_values.insert(ptr, id); + crate::data::transient_0::encode_struct_with_int_32((&value.c).as_ref(), writer, shared_values)?; + }, + }; + }; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_different_shared_types(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = { + let id = crate::transient_0::decode_int_64(reader, shared_values)?; + if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { + ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? + } else { + let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); + shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); + decoded_value + } + }; + let b = { + let id = crate::transient_0::decode_int_64(reader, shared_values)?; + if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { + ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? + } else { + let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_64(reader, shared_values)?); + shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); + decoded_value + } + }; + let c = { + let id = crate::transient_0::decode_int_64(reader, shared_values)?; + if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { + ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? + } else { + let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_32(reader, shared_values)?); + shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); + decoded_value + } + }; + ::std::io::Result::Ok(crate::data::StructWithDifferentSharedTypes { a: a, b: b, c: c }) +} + +pub fn encode_struct_with_shared_sum_and_variant(value: &crate::data::StructWithSharedSumAndVariant, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + { + let ptr = ::std::sync::Arc::as_ptr(&&value.a) as ::core::primitive::usize; + match (shared_values.get(&ptr)).copied() { + ::std::option::Option::Some(id) => { + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + }, + ::std::option::Option::None => { + let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + shared_values.insert(ptr, id); + crate::data::transient_0::encode_sum_with_variants((&value.a).as_ref(), writer, shared_values)?; + }, + }; + }; + { + let ptr = ::std::sync::Arc::as_ptr(&&value.b) as ::core::primitive::usize; + match (shared_values.get(&ptr)).copied() { + ::std::option::Option::Some(id) => { + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + }, + ::std::option::Option::None => { + let id = ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?; + crate::transient_0::encode_int_64(&id, writer, shared_values)?; + shared_values.insert(ptr, id); + crate::data::transient_0::encode_variant_one((&value.b).as_ref(), writer, shared_values)?; + }, + }; + }; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_shared_sum_and_variant(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result:: { + let a = { + let id = crate::transient_0::decode_int_64(reader, shared_values)?; + if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { + ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? + } else { + let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_sum_with_variants(reader, shared_values)?); + shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); + decoded_value + } + }; + let b = { + let id = crate::transient_0::decode_int_64(reader, shared_values)?; + if id < ((shared_values.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))? { + ((::std::sync::Arc::clone(&shared_values[(::core::primitive::usize::try_from(id)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?])).downcast()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, "referenced value has wrong type"))? + } else { + let decoded_value = ::std::sync::Arc::new(crate::data::transient_0::decode_variant_one(reader, shared_values)?); + shared_values.push(::std::sync::Arc::clone(&decoded_value) as ::std::sync::Arc::); + decoded_value + } + }; + ::std::io::Result::Ok(crate::data::StructWithSharedSumAndVariant { a: a, b: b }) +} diff --git a/examples/17-transient-0/output/rust/src/gen/transient_0.rs b/examples/17-transient-0/output/rust/src/gen/transient_0.rs new file mode 100644 index 0000000..1b1b659 --- /dev/null +++ b/examples/17-transient-0/output/rust/src/gen/transient_0.rs @@ -0,0 +1,102 @@ +// Generated by hobgoblin. + +pub type Encode = fn(&T, &mut TWrite, &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()>; + +pub type Decode = fn(&mut TRead, &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::; + +pub fn encode_bool(value: &::core::primitive::bool, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + if *value { + writer.write_all(&1u8.to_le_bytes())?; + } else { + writer.write_all(&0u8.to_le_bytes())?; + }; + ::std::io::Result::Ok(()) +} + +pub fn decode_bool(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::bool> { + let int_value = { + let bytes = { + let mut bytes = [0; 1]; + reader.read_exact(&mut bytes)?; + bytes + }; + u8::from_le_bytes(bytes) + }; + ::std::io::Result::Ok(if int_value == 0 { + false + } else { + true + }) +} + +pub fn encode_float_64(value: &::core::primitive::f64, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + writer.write_all(&value.to_le_bytes())?; + ::std::io::Result::Ok(()) +} + +pub fn decode_float_64(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::f64> { + let bytes = { + let mut bytes = [0; 8]; + reader.read_exact(&mut bytes)?; + bytes + }; + ::std::io::Result::Ok(::core::primitive::f64::from_le_bytes(bytes)) +} + +pub fn encode_int_8(value: &::core::primitive::i8, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + writer.write_all(&value.to_le_bytes())?; + ::std::io::Result::Ok(()) +} + +pub fn decode_int_8(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::i8> { + let bytes = { + let mut bytes = [0; 1]; + reader.read_exact(&mut bytes)?; + bytes + }; + ::std::io::Result::Ok(::core::primitive::i8::from_le_bytes(bytes)) +} + +pub fn encode_int_32(value: &::core::primitive::i32, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + writer.write_all(&value.to_le_bytes())?; + ::std::io::Result::Ok(()) +} + +pub fn decode_int_32(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::i32> { + let bytes = { + let mut bytes = [0; 4]; + reader.read_exact(&mut bytes)?; + bytes + }; + ::std::io::Result::Ok(::core::primitive::i32::from_le_bytes(bytes)) +} + +pub fn encode_int_64(value: &::core::primitive::i64, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + writer.write_all(&value.to_le_bytes())?; + ::std::io::Result::Ok(()) +} + +pub fn decode_int_64(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::core::primitive::i64> { + let bytes = { + let mut bytes = [0; 8]; + reader.read_exact(&mut bytes)?; + bytes + }; + ::std::io::Result::Ok(::core::primitive::i64::from_le_bytes(bytes)) +} + +pub fn encode_string(value: &::std::string::String, writer: &mut impl ::std::io::Write, shared_values: &mut ::std::collections::HashMap::<::core::primitive::usize, ::core::primitive::i64>) -> ::std::io::Result::<()> { + crate::transient_0::encode_int_64(&((value.len()).try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?, writer, shared_values)?; + writer.write_all(value.as_bytes())?; + ::std::io::Result::Ok(()) +} + +pub fn decode_string(reader: &mut impl ::std::io::Read, shared_values: &mut ::std::vec::Vec::<::std::sync::Arc::>) -> ::std::io::Result::<::std::string::String> { + let len = crate::transient_0::decode_int_64(reader, shared_values)?; + let bytes = { + let mut bytes = vec![0u8; (len.try_into()).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?]; + reader.read_exact(&mut bytes)?; + bytes + }; + ::std::io::Result::Ok((::std::string::String::from_utf8(bytes)).map_err(|error| ::std::io::Error::new(::std::io::ErrorKind::InvalidData, error))?) +} diff --git a/examples/17-transient-0/output/rust/src/lib.rs b/examples/17-transient-0/output/rust/src/lib.rs new file mode 100644 index 0000000..ea26e60 --- /dev/null +++ b/examples/17-transient-0/output/rust/src/lib.rs @@ -0,0 +1,410 @@ +pub mod data; +pub mod transient_0; + +#[cfg(test)] +mod test { + use std::any::Any; + use std::io::Cursor; + use std::path::PathBuf; + use std::sync::Arc; + use std::collections::HashMap; + use super::data::{EnumWithVariants, GenericNative, GenericStruct, Native, StructSingleton, StructWithBool, StructWithBox, StructWithDifferentSharedTypes, StructWithEnum, StructWithFloat64, StructWithGenericNative, StructWithGenericStruct, StructWithInt8, StructWithInt32, StructWithInt64, StructWithList, StructWithListOfShared, StructWithNative, StructWithOption, StructWithSharedSumAndVariant, StructWithString, StructWithStruct, StructWithSum, SumWithBoxedVariants, SumWithVariants, VariantOne, VariantTwo }; + + #[test] + fn struct_singleton() { + let value = StructSingleton; + + assert_round_trip_encoding( + "StructSingleton", + value, + super::data::transient_0::encode_struct_singleton, + super::data::transient_0::decode_struct_singleton, + ); + } + + #[test] + fn struct_with_bool() { + let value = StructWithBool { a: true, b: false }; + + assert_round_trip_encoding( + "StructWithBool", + value, + super::data::transient_0::encode_struct_with_bool, + super::data::transient_0::decode_struct_with_bool, + ); + } + + #[test] + fn struct_with_float_64() { + let value = StructWithFloat64 { a: 10.0, b: 2.5 }; + + assert_round_trip_encoding( + "StructWithFloat64", + value, + super::data::transient_0::encode_struct_with_float_64, + super::data::transient_0::decode_struct_with_float_64, + ); + } + + #[test] + fn struct_with_int_8() { + let value = StructWithInt8 { a: 10, b: 25 }; + + assert_round_trip_encoding( + "StructWithInt8", + value, + super::data::transient_0::encode_struct_with_int_8, + super::data::transient_0::decode_struct_with_int_8, + ); + } + + #[test] + fn struct_with_int_32() { + let value = StructWithInt32 { a: 10, b: 25 }; + + assert_round_trip_encoding( + "StructWithInt32", + value, + super::data::transient_0::encode_struct_with_int_32, + super::data::transient_0::decode_struct_with_int_32, + ); + } + + #[test] + fn struct_with_int_32_min_and_max() { + let value = StructWithInt32 { a: i32::MIN, b: i32::MAX }; + + assert_round_trip_encoding( + "StructWithInt32MinAndMax", + value, + super::data::transient_0::encode_struct_with_int_32, + super::data::transient_0::decode_struct_with_int_32, + ); + } + + #[test] + fn struct_with_int_64() { + let value = StructWithInt64 { a: 10, b: 25 }; + + assert_round_trip_encoding( + "StructWithInt64", + value, + super::data::transient_0::encode_struct_with_int_64, + super::data::transient_0::decode_struct_with_int_64, + ); + } + + #[test] + fn struct_with_int_64_min_and_max() { + let value = StructWithInt64 { a: i64::MIN, b: i64::MAX }; + + assert_round_trip_encoding( + "StructWithInt64MinAndMax", + value, + super::data::transient_0::encode_struct_with_int_64, + super::data::transient_0::decode_struct_with_int_64, + ); + } + + #[test] + fn struct_with_string() { + let value = StructWithString { a: "abc".to_string(), b: "def".to_string() }; + + assert_round_trip_encoding( + "StructWithString", + value, + super::data::transient_0::encode_struct_with_string, + super::data::transient_0::decode_struct_with_string, + ); + } + + #[test] + fn struct_with_struct() { + let value = StructWithStruct { inner: StructWithInt32 { a: 10, b: 25 }, c: 42 }; + + assert_round_trip_encoding( + "StructWithStruct", + value, + super::data::transient_0::encode_struct_with_struct, + super::data::transient_0::decode_struct_with_struct, + ); + } + + #[test] + fn struct_with_generic_struct() { + let value = StructWithGenericStruct { + a: GenericStruct { a: 10, b: "x1".to_string() }, + b: GenericStruct { + a: Some("x2".to_string()), + b: GenericStruct { + a: Some("x3".to_string()), + b: GenericStruct { a: "x4".to_string(), b: "x5".to_string() }, + }, + }, + }; + + assert_round_trip_encoding( + "StructWithGenericStruct", + value, + super::data::transient_0::encode_struct_with_generic_struct, + super::data::transient_0::decode_struct_with_generic_struct, + ); + } + + #[test] + fn struct_with_list() { + let value = StructWithList { + a: vec![10, 25], + b: vec![ + StructWithInt32 { a: 42, b: 47 }, + StructWithInt32 { a: 52, b: 57 }, + StructWithInt32 { a: 62, b: 67 }, + ], + }; + + assert_round_trip_encoding( + "StructWithList", + value, + super::data::transient_0::encode_struct_with_list, + super::data::transient_0::decode_struct_with_list, + ); + } + + #[test] + fn struct_with_option_none() { + let value = StructWithOption { + a: None, + b: None, + }; + + assert_round_trip_encoding( + "StructWithOption_None", + value, + super::data::transient_0::encode_struct_with_option, + super::data::transient_0::decode_struct_with_option, + ); + } + + #[test] + fn struct_with_option_some() { + let value = StructWithOption { + a: Some(10), + b: Some(StructWithInt32 { a: 42, b: 47 }), + }; + + assert_round_trip_encoding( + "StructWithOption_Some", + value, + super::data::transient_0::encode_struct_with_option, + super::data::transient_0::decode_struct_with_option, + ); + } + + #[test] + fn enum_with_variants() { + assert_round_trip_encoding( + "EnumWithVariants_zero", + EnumWithVariants::Zero, + super::data::transient_0::encode_enum_with_variants, + super::data::transient_0::decode_enum_with_variants, + ); + + assert_round_trip_encoding( + "EnumWithVariants_one", + EnumWithVariants::One, + super::data::transient_0::encode_enum_with_variants, + super::data::transient_0::decode_enum_with_variants, + ); + + assert_round_trip_encoding( + "EnumWithVariants_two", + EnumWithVariants::Two, + super::data::transient_0::encode_enum_with_variants, + super::data::transient_0::decode_enum_with_variants, + ); + } + + #[test] + fn struct_with_enum() { + let value = StructWithEnum { inner: EnumWithVariants::One, c: 42 }; + + assert_round_trip_encoding( + "StructWithEnum", + value, + super::data::transient_0::encode_struct_with_enum, + super::data::transient_0::decode_struct_with_enum, + ); + } + + #[test] + fn sum_with_variants() { + assert_round_trip_encoding( + "SumWithVariants_VariantOne", + SumWithVariants::VariantOne(VariantOne { a: 10 }), + super::data::transient_0::encode_sum_with_variants, + super::data::transient_0::decode_sum_with_variants, + ); + + assert_round_trip_encoding( + "SumWithVariants_VariantTwo", + SumWithVariants::VariantTwo(VariantTwo { a: 25 }), + super::data::transient_0::encode_sum_with_variants, + super::data::transient_0::decode_sum_with_variants, + ); + } + + #[test] + fn sum_with_boxed_variants() { + assert_round_trip_encoding( + "SumWithBoxedVariants_VariantOne", + SumWithBoxedVariants::VariantOne(Box::new(VariantOne { a: 10 })), + super::data::transient_0::encode_sum_with_boxed_variants, + super::data::transient_0::decode_sum_with_boxed_variants, + ); + + assert_round_trip_encoding( + "SumWithBoxedVariants_VariantTwo", + SumWithBoxedVariants::VariantTwo(Box::new(VariantTwo { a: 25 })), + super::data::transient_0::encode_sum_with_boxed_variants, + super::data::transient_0::decode_sum_with_boxed_variants, + ); + } + + #[test] + fn struct_with_sum() { + let value = StructWithSum { + inner: SumWithVariants::VariantTwo(VariantTwo { a: 25 }), + b: 42, + }; + + assert_round_trip_encoding( + "StructWithSum", + value, + super::data::transient_0::encode_struct_with_sum, + super::data::transient_0::decode_struct_with_sum, + ); + } + + #[test] + fn struct_with_native() { + let value = StructWithNative { + a: Native { a: 10, b: 25 }, + }; + + assert_round_trip_encoding( + "StructWithNative", + value, + super::data::transient_0::encode_struct_with_native, + super::data::transient_0::decode_struct_with_native, + ); + } + + #[test] + fn struct_with_generic_native() { + let value = StructWithGenericNative { + a: GenericNative { a: 10, b: "x1".to_string() }, + b: GenericNative { + a: Some("x2".to_string()), + b: GenericNative { + a: Some("x3".to_string()), + b: GenericNative { a: "x4".to_string(), b: "x5".to_string() }, + }, + }, + }; + + assert_round_trip_encoding( + "StructWithGenericNative", + value, + super::data::transient_0::encode_struct_with_generic_native, + super::data::transient_0::decode_struct_with_generic_native, + ); + } + + #[test] + fn struct_with_box() { + let value = StructWithBox { + inner: Box::new(StructWithInt32 { a: 10, b: 25 }), + }; + + assert_round_trip_encoding( + "StructWithBox", + value, + super::data::transient_0::encode_struct_with_box, + super::data::transient_0::decode_struct_with_box, + ); + } + + #[test] + fn struct_with_list_of_shared() { + let a = Arc::new(StructWithInt32 { a: 10, b: 25 }); + let b = Arc::new(StructWithInt32 { a: 42, b: 47 }); + + let value = StructWithListOfShared { + inner: vec![Arc::clone(&a), Arc::clone(&a), Arc::clone(&b), a, b], + }; + + let decoded_value = assert_round_trip_encoding( + "StructWithListOfShared", + value, + super::data::transient_0::encode_struct_with_list_of_shared, + super::data::transient_0::decode_struct_with_list_of_shared, + ); + assert!(Arc::ptr_eq(&decoded_value.inner[0], &decoded_value.inner[1])); + assert!(Arc::ptr_eq(&decoded_value.inner[0], &decoded_value.inner[3])); + assert!(Arc::ptr_eq(&decoded_value.inner[2], &decoded_value.inner[4])); + } + + #[test] + fn struct_with_different_shared_types() { + let a = Arc::new(StructWithInt32 { a: 10, b: 25 }); + let b = Arc::new(StructWithInt64 { a: 42, b: 47 }); + let c = Arc::new(StructWithInt32 { a: 52, b: 57 }); + + let value = StructWithDifferentSharedTypes { a, b, c }; + + assert_round_trip_encoding( + "StructWithDifferentSharedTypes", + value, + super::data::transient_0::encode_struct_with_different_shared_types, + super::data::transient_0::decode_struct_with_different_shared_types, + ); + } + + #[test] + fn struct_with_shared_sum_and_variant() { + let a = Arc::new(SumWithVariants::VariantOne(VariantOne { a: 10 })); + let b = Arc::new(VariantOne { a: 10 }); + + let value = StructWithSharedSumAndVariant { a, b }; + + assert_round_trip_encoding( + "StructWithSharedSumAndVariant", + value, + super::data::transient_0::encode_struct_with_shared_sum_and_variant, + super::data::transient_0::decode_struct_with_shared_sum_and_variant, + ); + } + + fn assert_round_trip_encoding( + name: &str, + value: T, + encode: impl Fn(&T, &mut Cursor>, &mut HashMap) -> std::io::Result<()>, + decode: impl Fn(&mut Cursor>, &mut Vec>) -> std::io::Result, + ) -> T { + let mut bytes = Cursor::new(Vec::new()); + encode(&value, &mut bytes, &mut HashMap::new()).unwrap(); + + let output_dir = std::env::var("HOBGOBLIN_OUTPUT_DIR").unwrap(); + let transient_0_output_dir = PathBuf::from(output_dir).join("transient-0"); + std::fs::create_dir_all(&transient_0_output_dir).unwrap(); + let transient_0_output_path = transient_0_output_dir.join(name); + std::fs::write(transient_0_output_path, bytes.get_ref()).unwrap(); + + bytes.set_position(0); + let decoded_value = decode(&mut bytes, &mut Vec::new()).unwrap(); + + assert_eq!(value, decoded_value); + + decoded_value + } +} diff --git a/examples/17-transient-0/output/rust/src/transient_0.rs b/examples/17-transient-0/output/rust/src/transient_0.rs new file mode 100644 index 0000000..8b2b800 --- /dev/null +++ b/examples/17-transient-0/output/rust/src/transient_0.rs @@ -0,0 +1 @@ +include!("./gen/transient_0.rs"); diff --git a/examples/17-transient-0/src/data.hob b/examples/17-transient-0/src/data.hob new file mode 100644 index 0000000..25fb1be --- /dev/null +++ b/examples/17-transient-0/src/data.hob @@ -0,0 +1,126 @@ +struct StructSingleton { + singleton; +} + +struct StructWithBool { + field a: Bool; + field b: Bool; +} + +struct StructWithFloat64 { + field a: Float64; + field b: Float64; +} + +struct StructWithInt8 { + field a: Int8; + field b: Int8; +} + +struct StructWithInt32 { + field a: Int32; + field b: Int32; +} + +struct StructWithInt64 { + field a: Int64; + field b: Int64; +} + +struct StructWithString { + field a: String; + field b: String; +} + +struct StructWithStruct { + field inner: StructWithInt32; + field c: Int32; +} + +struct GenericStruct[A, B] { + field a: A; + field b: B; +} + +struct StructWithGenericStruct { + field a: GenericStruct[Int32, String]; + field b: GenericStruct[Option[String], GenericStruct[Option[String], GenericStruct[String, String]]]; +} + +struct StructWithList { + field a: List[Int64]; + field b: List[StructWithInt32]; +} + +struct StructWithOption { + field a: Option[Int64]; + field b: Option[StructWithInt32]; +} + +enum EnumWithVariants { + variant zero; + variant one; + variant two; +} + +struct StructWithEnum { + field inner: EnumWithVariants; + field c: Int32; +} + +sum SumWithVariants { + variant VariantOne; + variant VariantTwo; +} + +struct VariantOne { + field a: Int32; +} + +struct VariantTwo { + field a: Int64; +} + +sum SumWithBoxedVariants { + variant Box[VariantOne]; + variant Box[VariantTwo]; +} + +struct StructWithSum { + field inner: SumWithVariants; + field b: Int32; +} + +native Native { +} + +struct StructWithNative { + field a: Native; +} + +native GenericNative[A, B] { +} + +struct StructWithGenericNative { + field a: GenericNative[Int32, String]; + field b: GenericNative[Option[String], GenericNative[Option[String], GenericNative[String, String]]]; +} + +struct StructWithBox { + field inner: Box[StructWithInt32]; +} + +struct StructWithListOfShared { + field inner: List[Shared[StructWithInt32]]; +} + +struct StructWithDifferentSharedTypes { + field a: Shared[StructWithInt32]; + field b: Shared[StructWithInt64]; + field c: Shared[StructWithInt32]; +} + +struct StructWithSharedSumAndVariant { + field a: Shared[SumWithVariants]; + field b: Shared[VariantOne]; +} diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/typescript/TypescriptGenerator.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/typescript/TypescriptGenerator.java index 25435c5..44bad46 100644 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/typescript/TypescriptGenerator.java +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/typescript/TypescriptGenerator.java @@ -1,6 +1,7 @@ package org.zwobble.hobgoblin.compiler.output.generators.typescript; import org.zwobble.hobgoblin.compiler.builtins.NativeTypes; +import org.zwobble.hobgoblin.compiler.output.lang.typescript.TypescriptTypes; import org.zwobble.hobgoblin.compiler.output.lang.typescript.TypescriptWriter; import org.zwobble.hobgoblin.compiler.output.lang.typescript.ast.*; import org.zwobble.hobgoblin.compiler.typechecker.TypesInfo; @@ -11,6 +12,7 @@ import java.io.File; import java.io.IOException; import java.nio.file.Path; import java.util.LinkedHashSet; +import java.util.List; import java.util.SequencedSet; import java.util.stream.Collectors; @@ -81,6 +83,15 @@ public class TypescriptGenerator { public TypescriptExpression generateTypeExpression(Type value, Context context) { return switch (collapseType(value)) { case ConstructedType constructedType -> { + if (constructedType.constructor().equals(NativeTypes.OPTION)) { + // TODO: How to deal with nested options? Forbid them in + // hobgoblin? + yield new TypescriptTypeUnion(List.of( + generateTypeExpression(constructedType.args().getFirst(), context), + TypescriptTypes.NULL + )); + } + yield new TypescriptConstructedType( generateTypeExpression(constructedType.constructor().genericType(), context), constructedType.args().stream() diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/typescript/TypescriptTypes.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/typescript/TypescriptTypes.java index 22f24a3..e6fa609 100644 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/typescript/TypescriptTypes.java +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/typescript/TypescriptTypes.java @@ -1,5 +1,6 @@ package org.zwobble.hobgoblin.compiler.output.lang.typescript; +import org.zwobble.hobgoblin.compiler.output.lang.typescript.ast.TypescriptExpression; import org.zwobble.hobgoblin.compiler.output.lang.typescript.ast.TypescriptIdentifier; import org.zwobble.hobgoblin.compiler.output.lang.typescript.ast.TypescriptRef; @@ -7,6 +8,7 @@ public class TypescriptTypes { private TypescriptTypes() { } + public static final TypescriptExpression NULL = new TypescriptRef(TypescriptIdentifier.of("null")); public static final TypescriptRef NUMBER = new TypescriptRef(TypescriptIdentifier.of("number")); public static final TypescriptRef READONLY_ARRAY = new TypescriptRef(TypescriptIdentifier.of("ReadonlyArray")); public static final TypescriptRef SYMBOL = new TypescriptRef(TypescriptIdentifier.of("Symbol")); -- cgit v1.2.3