@voxgig/sdkgen 1.3.7 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/cmp/AgentGuide.d.ts +2 -0
- package/dist/cmp/AgentGuide.js +124 -0
- package/dist/cmp/AgentGuide.js.map +1 -0
- package/dist/cmp/AgentGuideContent.d.ts +25 -0
- package/dist/cmp/AgentGuideContent.js +248 -0
- package/dist/cmp/AgentGuideContent.js.map +1 -0
- package/dist/cmp/AgentGuideFeature.d.ts +2 -0
- package/dist/cmp/AgentGuideFeature.js +92 -0
- package/dist/cmp/AgentGuideFeature.js.map +1 -0
- package/dist/cmp/AgentGuideTop.d.ts +2 -0
- package/dist/cmp/AgentGuideTop.js +97 -0
- package/dist/cmp/AgentGuideTop.js.map +1 -0
- package/dist/cmp/ReadmeTop.js +16 -3
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/sdkgen.d.ts +4 -1
- package/dist/sdkgen.js +8 -2
- package/dist/sdkgen.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/project/.sdk/model/feature/audit.aontu +22 -0
- package/project/.sdk/model/feature/cache.aontu +23 -0
- package/project/.sdk/model/feature/clienttrack.aontu +20 -0
- package/project/.sdk/model/feature/debug.aontu +25 -0
- package/project/.sdk/model/feature/feature-index.aontu +20 -1
- package/project/.sdk/model/feature/idempotency.aontu +21 -0
- package/project/.sdk/model/feature/metrics.aontu +20 -0
- package/project/.sdk/model/feature/netsim.aontu +36 -0
- package/project/.sdk/model/feature/paging.aontu +23 -0
- package/project/.sdk/model/feature/proxy.aontu +23 -0
- package/project/.sdk/model/feature/ratelimit.aontu +21 -0
- package/project/.sdk/model/feature/rbac.aontu +24 -0
- package/project/.sdk/model/feature/retry.aontu +23 -0
- package/project/.sdk/model/feature/streaming.aontu +22 -0
- package/project/.sdk/model/feature/telemetry.aontu +21 -0
- package/project/.sdk/model/feature/timeout.aontu +18 -0
- package/project/.sdk/model/target/c.aontu +37 -0
- package/project/.sdk/model/target/clojure.aontu +36 -0
- package/project/.sdk/model/target/cpp.aontu +35 -0
- package/project/.sdk/model/target/csharp.aontu +35 -0
- package/project/.sdk/model/target/dart.aontu +34 -0
- package/project/.sdk/model/target/elixir.aontu +33 -0
- package/project/.sdk/model/target/go-cli.aontu +5 -4
- package/project/.sdk/model/target/go-mcp.aontu +5 -4
- package/project/.sdk/model/target/haskell.aontu +47 -0
- package/project/.sdk/model/target/java.aontu +37 -0
- package/project/.sdk/model/target/kotlin.aontu +37 -0
- package/project/.sdk/model/target/ocaml.aontu +36 -0
- package/project/.sdk/model/target/perl.aontu +37 -0
- package/project/.sdk/model/target/rust.aontu +37 -0
- package/project/.sdk/model/target/scala.aontu +37 -0
- package/project/.sdk/model/target/swift.aontu +35 -0
- package/project/.sdk/model/target/zig.aontu +27 -0
- package/project/.sdk/src/cmp/c/Config_c.ts +109 -0
- package/project/.sdk/src/cmp/c/EntityBase_c.ts +61 -0
- package/project/.sdk/src/cmp/c/EntityOperation_c.ts +41 -0
- package/project/.sdk/src/cmp/c/Entity_c.ts +85 -0
- package/project/.sdk/src/cmp/c/Gitignore_c.ts +29 -0
- package/project/.sdk/src/cmp/c/MainEntity_c.ts +31 -0
- package/project/.sdk/src/cmp/c/Main_c.ts +83 -0
- package/project/.sdk/src/cmp/c/Package_c.ts +17 -0
- package/project/.sdk/src/cmp/c/TestDirect_c.ts +227 -0
- package/project/.sdk/src/cmp/c/TestEntity_c.ts +82 -0
- package/project/.sdk/src/cmp/c/Test_c.ts +51 -0
- package/project/.sdk/src/cmp/c/fragment/Entity.fragment.c +265 -0
- package/project/.sdk/src/cmp/c/fragment/EntityCreateOp.fragment.c +27 -0
- package/project/.sdk/src/cmp/c/fragment/EntityListOp.fragment.c +24 -0
- package/project/.sdk/src/cmp/c/fragment/EntityLoadOp.fragment.c +29 -0
- package/project/.sdk/src/cmp/c/fragment/EntityRemoveOp.fragment.c +29 -0
- package/project/.sdk/src/cmp/c/fragment/EntityUpdateOp.fragment.c +29 -0
- package/project/.sdk/src/cmp/c/fragment/Main.fragment.c +220 -0
- package/project/.sdk/src/cmp/c/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/c/utility_c.ts +102 -0
- package/project/.sdk/src/cmp/clojure/Config_clojure.ts +94 -0
- package/project/.sdk/src/cmp/clojure/EntityOperation_clojure.ts +35 -0
- package/project/.sdk/src/cmp/clojure/Entity_clojure.ts +77 -0
- package/project/.sdk/src/cmp/clojure/Gitignore_clojure.ts +28 -0
- package/project/.sdk/src/cmp/clojure/MainEntity_clojure.ts +21 -0
- package/project/.sdk/src/cmp/clojure/Main_clojure.ts +88 -0
- package/project/.sdk/src/cmp/clojure/Package_clojure.ts +41 -0
- package/project/.sdk/src/cmp/clojure/Test_clojure.ts +120 -0
- package/project/.sdk/src/cmp/clojure/fragment/Entity.fragment.clj +158 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityCreateOp.fragment.clj +14 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityListOp.fragment.clj +17 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityLoadOp.fragment.clj +15 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityRemoveOp.fragment.clj +15 -0
- package/project/.sdk/src/cmp/clojure/fragment/EntityUpdateOp.fragment.clj +15 -0
- package/project/.sdk/src/cmp/clojure/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/clojure/utility_clojure.ts +82 -0
- package/project/.sdk/src/cmp/cpp/Config_cpp.ts +136 -0
- package/project/.sdk/src/cmp/cpp/EntityBase_cpp.ts +51 -0
- package/project/.sdk/src/cmp/cpp/EntityOperation_cpp.ts +37 -0
- package/project/.sdk/src/cmp/cpp/Entity_cpp.ts +78 -0
- package/project/.sdk/src/cmp/cpp/Gitignore_cpp.ts +27 -0
- package/project/.sdk/src/cmp/cpp/MainEntity_cpp.ts +35 -0
- package/project/.sdk/src/cmp/cpp/Main_cpp.ts +84 -0
- package/project/.sdk/src/cmp/cpp/Package_cpp.ts +17 -0
- package/project/.sdk/src/cmp/cpp/TestDirect_cpp.ts +258 -0
- package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +454 -0
- package/project/.sdk/src/cmp/cpp/Test_cpp.ts +36 -0
- package/project/.sdk/src/cmp/cpp/fragment/Entity.fragment.cpp +40 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityCreateOp.fragment.cpp +22 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityListOp.fragment.cpp +21 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityLoadOp.fragment.cpp +25 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityRemoveOp.fragment.cpp +21 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityUpdateOp.fragment.cpp +22 -0
- package/project/.sdk/src/cmp/cpp/fragment/Main.fragment.cpp +43 -0
- package/project/.sdk/src/cmp/cpp/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/cpp/utility_cpp.ts +83 -0
- package/project/.sdk/src/cmp/csharp/Config_csharp.ts +134 -0
- package/project/.sdk/src/cmp/csharp/EntityBase_csharp.ts +39 -0
- package/project/.sdk/src/cmp/csharp/EntityOperation_csharp.ts +41 -0
- package/project/.sdk/src/cmp/csharp/Entity_csharp.ts +85 -0
- package/project/.sdk/src/cmp/csharp/Gitignore_csharp.ts +38 -0
- package/project/.sdk/src/cmp/csharp/MainEntity_csharp.ts +36 -0
- package/project/.sdk/src/cmp/csharp/Main_csharp.ts +91 -0
- package/project/.sdk/src/cmp/csharp/Package_csharp.ts +101 -0
- package/project/.sdk/src/cmp/csharp/SdkError_csharp.ts +42 -0
- package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +560 -0
- package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +618 -0
- package/project/.sdk/src/cmp/csharp/Test_csharp.ts +38 -0
- package/project/.sdk/src/cmp/csharp/fragment/Entity.fragment.cs +28 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityBase.fragment.cs +268 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityCreateOp.fragment.cs +37 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityListOp.fragment.cs +35 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityLoadOp.fragment.cs +41 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityRemoveOp.fragment.cs +41 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityUpdateOp.fragment.cs +41 -0
- package/project/.sdk/src/cmp/csharp/fragment/Main.fragment.cs +278 -0
- package/project/.sdk/src/cmp/csharp/fragment/SdkError.fragment.cs +21 -0
- package/project/.sdk/src/cmp/csharp/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/csharp/utility_csharp.ts +143 -0
- package/project/.sdk/src/cmp/dart/Config_dart.ts +99 -0
- package/project/.sdk/src/cmp/dart/EntityBase_dart.ts +34 -0
- package/project/.sdk/src/cmp/dart/EntityOperation_dart.ts +43 -0
- package/project/.sdk/src/cmp/dart/EntityTypes_dart.ts +190 -0
- package/project/.sdk/src/cmp/dart/Entity_dart.ts +79 -0
- package/project/.sdk/src/cmp/dart/Gitignore_dart.ts +34 -0
- package/project/.sdk/src/cmp/dart/MainEntity_dart.ts +33 -0
- package/project/.sdk/src/cmp/dart/Main_dart.ts +105 -0
- package/project/.sdk/src/cmp/dart/Package_dart.ts +81 -0
- package/project/.sdk/src/cmp/dart/SdkError_dart.ts +42 -0
- package/project/.sdk/src/cmp/dart/TestDirect_dart.ts +498 -0
- package/project/.sdk/src/cmp/dart/TestEntity_dart.ts +552 -0
- package/project/.sdk/src/cmp/dart/Test_dart.ts +105 -0
- package/project/.sdk/src/cmp/dart/fragment/Config.fragment.dart +48 -0
- package/project/.sdk/src/cmp/dart/fragment/Direct.test.fragment.dart +25 -0
- package/project/.sdk/src/cmp/dart/fragment/Entity.fragment.dart +31 -0
- package/project/.sdk/src/cmp/dart/fragment/Entity.test.fragment.dart +67 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityBase.fragment.dart +285 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityCreateOp.fragment.dart +90 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityListOp.fragment.dart +90 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityLoadOp.fragment.dart +94 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityRemoveOp.fragment.dart +94 -0
- package/project/.sdk/src/cmp/dart/fragment/EntityUpdateOp.fragment.dart +94 -0
- package/project/.sdk/src/cmp/dart/fragment/Main.fragment.dart +240 -0
- package/project/.sdk/src/cmp/dart/fragment/SdkError.fragment.dart +18 -0
- package/project/.sdk/src/cmp/dart/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/dart/utility_dart.ts +86 -0
- package/project/.sdk/src/cmp/elixir/Config_elixir.ts +101 -0
- package/project/.sdk/src/cmp/elixir/EntityOperation_elixir.ts +27 -0
- package/project/.sdk/src/cmp/elixir/Entity_elixir.ts +54 -0
- package/project/.sdk/src/cmp/elixir/Gitignore_elixir.ts +28 -0
- package/project/.sdk/src/cmp/elixir/MainEntity_elixir.ts +26 -0
- package/project/.sdk/src/cmp/elixir/Main_elixir.ts +124 -0
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +64 -0
- package/project/.sdk/src/cmp/elixir/TestDirect_elixir.ts +95 -0
- package/project/.sdk/src/cmp/elixir/TestEntity_elixir.ts +115 -0
- package/project/.sdk/src/cmp/elixir/Test_elixir.ts +47 -0
- package/project/.sdk/src/cmp/elixir/fragment/Entity.fragment.ex +37 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityCreateOp.fragment.ex +28 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityListOp.fragment.ex +30 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityLoadOp.fragment.ex +32 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityRemoveOp.fragment.ex +32 -0
- package/project/.sdk/src/cmp/elixir/fragment/EntityUpdateOp.fragment.ex +30 -0
- package/project/.sdk/src/cmp/elixir/fragment/Main.fragment.ex +218 -0
- package/project/.sdk/src/cmp/elixir/fragment/Pipeline.fragment.ex +62 -0
- package/project/.sdk/src/cmp/elixir/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/elixir/utility_elixir.ts +85 -0
- package/project/.sdk/src/cmp/go/TestEntity_go.ts +54 -0
- package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +133 -0
- package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +14 -8
- package/project/.sdk/src/cmp/go-cli/Main_go-cli.ts +20 -2
- package/project/.sdk/src/cmp/go-mcp/Main_go-mcp.ts +42 -2
- package/project/.sdk/src/cmp/haskell/Config_haskell.ts +115 -0
- package/project/.sdk/src/cmp/haskell/Entity_haskell.ts +13 -0
- package/project/.sdk/src/cmp/haskell/Gitignore_haskell.ts +27 -0
- package/project/.sdk/src/cmp/haskell/Main_haskell.ts +123 -0
- package/project/.sdk/src/cmp/haskell/Package_haskell.ts +58 -0
- package/project/.sdk/src/cmp/haskell/Test_haskell.ts +263 -0
- package/project/.sdk/src/cmp/haskell/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/haskell/utility_haskell.ts +105 -0
- package/project/.sdk/src/cmp/java/Config_java.ts +138 -0
- package/project/.sdk/src/cmp/java/EntityBase_java.ts +50 -0
- package/project/.sdk/src/cmp/java/EntityOperation_java.ts +48 -0
- package/project/.sdk/src/cmp/java/Entity_java.ts +95 -0
- package/project/.sdk/src/cmp/java/Gitignore_java.ts +37 -0
- package/project/.sdk/src/cmp/java/MainEntity_java.ts +41 -0
- package/project/.sdk/src/cmp/java/Main_java.ts +100 -0
- package/project/.sdk/src/cmp/java/Package_java.ts +126 -0
- package/project/.sdk/src/cmp/java/SdkError_java.ts +49 -0
- package/project/.sdk/src/cmp/java/TestDirect_java.ts +509 -0
- package/project/.sdk/src/cmp/java/TestEntity_java.ts +599 -0
- package/project/.sdk/src/cmp/java/Test_java.ts +42 -0
- package/project/.sdk/src/cmp/java/fragment/Entity.fragment.java +35 -0
- package/project/.sdk/src/cmp/java/fragment/EntityBase.fragment.java +235 -0
- package/project/.sdk/src/cmp/java/fragment/EntityCreateOp.fragment.java +42 -0
- package/project/.sdk/src/cmp/java/fragment/EntityListOp.fragment.java +39 -0
- package/project/.sdk/src/cmp/java/fragment/EntityLoadOp.fragment.java +45 -0
- package/project/.sdk/src/cmp/java/fragment/EntityRemoveOp.fragment.java +45 -0
- package/project/.sdk/src/cmp/java/fragment/EntityUpdateOp.fragment.java +45 -0
- package/project/.sdk/src/cmp/java/fragment/Main.fragment.java +34 -0
- package/project/.sdk/src/cmp/java/fragment/SdkError.fragment.java +27 -0
- package/project/.sdk/src/cmp/java/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/java/utility_java.ts +102 -0
- package/project/.sdk/src/cmp/js/Config_js.ts +4 -2
- package/project/.sdk/src/cmp/js/TestEntity_js.ts +1 -0
- package/project/.sdk/src/cmp/js/fragment/Entity.test.fragment.js +32 -1
- package/project/.sdk/src/cmp/js/fragment/EntityBase.fragment.js +81 -0
- package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +10 -5
- package/project/.sdk/src/cmp/kotlin/Config_kotlin.ts +128 -0
- package/project/.sdk/src/cmp/kotlin/EntityBase_kotlin.ts +50 -0
- package/project/.sdk/src/cmp/kotlin/EntityOperation_kotlin.ts +48 -0
- package/project/.sdk/src/cmp/kotlin/Entity_kotlin.ts +93 -0
- package/project/.sdk/src/cmp/kotlin/Gitignore_kotlin.ts +41 -0
- package/project/.sdk/src/cmp/kotlin/MainEntity_kotlin.ts +40 -0
- package/project/.sdk/src/cmp/kotlin/Main_kotlin.ts +94 -0
- package/project/.sdk/src/cmp/kotlin/Package_kotlin.ts +110 -0
- package/project/.sdk/src/cmp/kotlin/SdkError_kotlin.ts +48 -0
- package/project/.sdk/src/cmp/kotlin/TestDirect_kotlin.ts +479 -0
- package/project/.sdk/src/cmp/kotlin/TestEntity_kotlin.ts +567 -0
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +42 -0
- package/project/.sdk/src/cmp/kotlin/fragment/Entity.fragment.kt +28 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityBase.fragment.kt +195 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityCreateOp.fragment.kt +37 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityListOp.fragment.kt +34 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityLoadOp.fragment.kt +40 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityRemoveOp.fragment.kt +40 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityUpdateOp.fragment.kt +40 -0
- package/project/.sdk/src/cmp/kotlin/fragment/Main.fragment.kt +28 -0
- package/project/.sdk/src/cmp/kotlin/fragment/SdkError.fragment.kt +24 -0
- package/project/.sdk/src/cmp/kotlin/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/kotlin/utility_kotlin.ts +101 -0
- package/project/.sdk/src/cmp/lua/Entity_lua.ts +7 -2
- package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +47 -0
- package/project/.sdk/src/cmp/lua/fragment/Entity.fragment.lua +137 -0
- package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +9 -6
- package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +114 -0
- package/project/.sdk/src/cmp/ocaml/EntityOperation_ocaml.ts +63 -0
- package/project/.sdk/src/cmp/ocaml/Entity_ocaml.ts +152 -0
- package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +37 -0
- package/project/.sdk/src/cmp/ocaml/MainEntity_ocaml.ts +28 -0
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +111 -0
- package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +47 -0
- package/project/.sdk/src/cmp/ocaml/SdkError_ocaml.ts +42 -0
- package/project/.sdk/src/cmp/ocaml/TestDirect_ocaml.ts +47 -0
- package/project/.sdk/src/cmp/ocaml/TestEntity_ocaml.ts +130 -0
- package/project/.sdk/src/cmp/ocaml/Test_ocaml.ts +35 -0
- package/project/.sdk/src/cmp/ocaml/fragment/RunOp.fragment.ml +32 -0
- package/project/.sdk/src/cmp/ocaml/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/ocaml/utility_ocaml.ts +129 -0
- package/project/.sdk/src/cmp/perl/Config_perl.ts +127 -0
- package/project/.sdk/src/cmp/perl/EntityOperation_perl.ts +42 -0
- package/project/.sdk/src/cmp/perl/Entity_perl.ts +84 -0
- package/project/.sdk/src/cmp/perl/Gitignore_perl.ts +32 -0
- package/project/.sdk/src/cmp/perl/MainEntity_perl.ts +34 -0
- package/project/.sdk/src/cmp/perl/Main_perl.ts +140 -0
- package/project/.sdk/src/cmp/perl/Package_perl.ts +63 -0
- package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +433 -0
- package/project/.sdk/src/cmp/perl/TestEntity_perl.ts +515 -0
- package/project/.sdk/src/cmp/perl/Test_perl.ts +54 -0
- package/project/.sdk/src/cmp/perl/fragment/Entity.fragment.pm +235 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityCreateOp.fragment.pm +31 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityListOp.fragment.pm +43 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityLoadOp.fragment.pm +34 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityRemoveOp.fragment.pm +32 -0
- package/project/.sdk/src/cmp/perl/fragment/EntityUpdateOp.fragment.pm +32 -0
- package/project/.sdk/src/cmp/perl/fragment/Main.fragment.pm +263 -0
- package/project/.sdk/src/cmp/perl/fragment/SdkError.fragment.pm +27 -0
- package/project/.sdk/src/cmp/perl/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/perl/utility_perl.ts +30 -0
- package/project/.sdk/src/cmp/php/TestEntity_php.ts +45 -0
- package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +124 -0
- package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +13 -6
- package/project/.sdk/src/cmp/py/Entity_py.ts +8 -2
- package/project/.sdk/src/cmp/py/TestEntity_py.ts +40 -0
- package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +135 -28
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +9 -6
- package/project/.sdk/src/cmp/rb/Entity_rb.ts +8 -2
- package/project/.sdk/src/cmp/rb/ReadmeExamplesTest_rb.ts +4 -1
- package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +42 -0
- package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +122 -23
- package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +9 -6
- package/project/.sdk/src/cmp/rust/Config_rust.ts +118 -0
- package/project/.sdk/src/cmp/rust/EntityBase_rust.ts +59 -0
- package/project/.sdk/src/cmp/rust/EntityOperation_rust.ts +44 -0
- package/project/.sdk/src/cmp/rust/Entity_rust.ts +94 -0
- package/project/.sdk/src/cmp/rust/Gitignore_rust.ts +29 -0
- package/project/.sdk/src/cmp/rust/MainEntity_rust.ts +37 -0
- package/project/.sdk/src/cmp/rust/Main_rust.ts +146 -0
- package/project/.sdk/src/cmp/rust/Package_rust.ts +80 -0
- package/project/.sdk/src/cmp/rust/SdkError_rust.ts +42 -0
- package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +448 -0
- package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +635 -0
- package/project/.sdk/src/cmp/rust/Test_rust.ts +51 -0
- package/project/.sdk/src/cmp/rust/fragment/Entity.fragment.rs +288 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityCreateOp.fragment.rs +29 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityListOp.fragment.rs +26 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityLoadOp.fragment.rs +35 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityRemoveOp.fragment.rs +35 -0
- package/project/.sdk/src/cmp/rust/fragment/EntityUpdateOp.fragment.rs +35 -0
- package/project/.sdk/src/cmp/rust/fragment/Main.fragment.rs +296 -0
- package/project/.sdk/src/cmp/rust/fragment/SdkError.fragment.rs +34 -0
- package/project/.sdk/src/cmp/rust/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/rust/utility_rust.ts +104 -0
- package/project/.sdk/src/cmp/scala/Config_scala.ts +126 -0
- package/project/.sdk/src/cmp/scala/EntityBase_scala.ts +50 -0
- package/project/.sdk/src/cmp/scala/EntityOperation_scala.ts +46 -0
- package/project/.sdk/src/cmp/scala/Entity_scala.ts +87 -0
- package/project/.sdk/src/cmp/scala/Gitignore_scala.ts +31 -0
- package/project/.sdk/src/cmp/scala/MainEntity_scala.ts +40 -0
- package/project/.sdk/src/cmp/scala/Main_scala.ts +93 -0
- package/project/.sdk/src/cmp/scala/Package_scala.ts +22 -0
- package/project/.sdk/src/cmp/scala/TestDirect_scala.ts +233 -0
- package/project/.sdk/src/cmp/scala/TestEntity_scala.ts +397 -0
- package/project/.sdk/src/cmp/scala/Test_scala.ts +93 -0
- package/project/.sdk/src/cmp/scala/fragment/Entity.fragment.scala +24 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityBase.fragment.scala +169 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityCreateOp.fragment.scala +32 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityListOp.fragment.scala +28 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityLoadOp.fragment.scala +33 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityRemoveOp.fragment.scala +33 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityUpdateOp.fragment.scala +33 -0
- package/project/.sdk/src/cmp/scala/fragment/Main.fragment.scala +27 -0
- package/project/.sdk/src/cmp/scala/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/scala/utility_scala.ts +99 -0
- package/project/.sdk/src/cmp/swift/Config_swift.ts +127 -0
- package/project/.sdk/src/cmp/swift/EntityBase_swift.ts +38 -0
- package/project/.sdk/src/cmp/swift/EntityOperation_swift.ts +39 -0
- package/project/.sdk/src/cmp/swift/Entity_swift.ts +86 -0
- package/project/.sdk/src/cmp/swift/Gitignore_swift.ts +32 -0
- package/project/.sdk/src/cmp/swift/MainEntity_swift.ts +35 -0
- package/project/.sdk/src/cmp/swift/Main_swift.ts +94 -0
- package/project/.sdk/src/cmp/swift/Package_swift.ts +66 -0
- package/project/.sdk/src/cmp/swift/SdkError_swift.ts +41 -0
- package/project/.sdk/src/cmp/swift/TestDirect_swift.ts +84 -0
- package/project/.sdk/src/cmp/swift/TestEntity_swift.ts +84 -0
- package/project/.sdk/src/cmp/swift/Test_swift.ts +39 -0
- package/project/.sdk/src/cmp/swift/fragment/Entity.fragment.swift +23 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityBase.fragment.swift +202 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityCreateOp.fragment.swift +23 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityListOp.fragment.swift +21 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityLoadOp.fragment.swift +24 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityRemoveOp.fragment.swift +24 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityUpdateOp.fragment.swift +24 -0
- package/project/.sdk/src/cmp/swift/fragment/Main.fragment.swift +211 -0
- package/project/.sdk/src/cmp/swift/fragment/SdkError.fragment.swift +22 -0
- package/project/.sdk/src/cmp/swift/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/swift/utility_swift.ts +76 -0
- package/project/.sdk/src/cmp/ts/Config_ts.ts +4 -2
- package/project/.sdk/src/cmp/ts/Package_ts.ts +17 -2
- package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +81 -0
- package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +10 -5
- package/project/.sdk/src/cmp/zig/Config_zig.ts +113 -0
- package/project/.sdk/src/cmp/zig/EntityOperation_zig.ts +39 -0
- package/project/.sdk/src/cmp/zig/Entity_zig.ts +89 -0
- package/project/.sdk/src/cmp/zig/Gitignore_zig.ts +27 -0
- package/project/.sdk/src/cmp/zig/MainEntity_zig.ts +38 -0
- package/project/.sdk/src/cmp/zig/Main_zig.ts +78 -0
- package/project/.sdk/src/cmp/zig/Test_zig.ts +114 -0
- package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +278 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityCreateOp.fragment.zig +24 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityListOp.fragment.zig +21 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityLoadOp.fragment.zig +26 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityRemoveOp.fragment.zig +26 -0
- package/project/.sdk/src/cmp/zig/fragment/EntityUpdateOp.fragment.zig +26 -0
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +258 -0
- package/project/.sdk/src/cmp/zig/tsconfig.json +15 -0
- package/project/.sdk/src/cmp/zig/utility_zig.ts +95 -0
- package/project/.sdk/tm/c/LICENSE +22 -0
- package/project/.sdk/tm/c/Makefile +50 -0
- package/project/.sdk/tm/c/VERSION +1 -0
- package/project/.sdk/tm/c/core/context.c +145 -0
- package/project/.sdk/tm/c/core/control.c +19 -0
- package/project/.sdk/tm/c/core/error.c +24 -0
- package/project/.sdk/tm/c/core/helpers.c +228 -0
- package/project/.sdk/tm/c/core/operation.c +34 -0
- package/project/.sdk/tm/c/core/point.c +49 -0
- package/project/.sdk/tm/c/core/response.c +29 -0
- package/project/.sdk/tm/c/core/result.c +60 -0
- package/project/.sdk/tm/c/core/sdk.h +514 -0
- package/project/.sdk/tm/c/core/spec.c +94 -0
- package/project/.sdk/tm/c/core/utility.c +74 -0
- package/project/.sdk/tm/c/feature/audit.c +134 -0
- package/project/.sdk/tm/c/feature/base.c +40 -0
- package/project/.sdk/tm/c/feature/cache.c +262 -0
- package/project/.sdk/tm/c/feature/clienttrack.c +144 -0
- package/project/.sdk/tm/c/feature/debug.c +230 -0
- package/project/.sdk/tm/c/feature/idempotency.c +164 -0
- package/project/.sdk/tm/c/feature/log.c +79 -0
- package/project/.sdk/tm/c/feature/metrics.c +177 -0
- package/project/.sdk/tm/c/feature/netsim.c +211 -0
- package/project/.sdk/tm/c/feature/paging.c +223 -0
- package/project/.sdk/tm/c/feature/proxy.c +249 -0
- package/project/.sdk/tm/c/feature/ratelimit.c +124 -0
- package/project/.sdk/tm/c/feature/rbac.c +167 -0
- package/project/.sdk/tm/c/feature/retry.c +164 -0
- package/project/.sdk/tm/c/feature/streaming.c +147 -0
- package/project/.sdk/tm/c/feature/support.c +115 -0
- package/project/.sdk/tm/c/feature/telemetry.c +205 -0
- package/project/.sdk/tm/c/feature/test.c +385 -0
- package/project/.sdk/tm/c/feature/timeout.c +106 -0
- package/project/.sdk/tm/c/src/feature/README.md +1 -0
- package/project/.sdk/tm/c/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/c/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/c/tests/ctest.h +58 -0
- package/project/.sdk/tm/c/tests/feature_harness.h +441 -0
- package/project/.sdk/tm/c/tests/feature_test.c +1210 -0
- package/project/.sdk/tm/c/tests/pipeline_test.c +561 -0
- package/project/.sdk/tm/c/tests/primary_utility_test.c +573 -0
- package/project/.sdk/tm/c/tests/runner.h +274 -0
- package/project/.sdk/tm/c/tests/sdk_pipeline_test.c +89 -0
- package/project/.sdk/tm/c/tests/struct_corpus_test.c +939 -0
- package/project/.sdk/tm/c/utility/clean.c +20 -0
- package/project/.sdk/tm/c/utility/done.c +26 -0
- package/project/.sdk/tm/c/utility/feature_add.c +42 -0
- package/project/.sdk/tm/c/utility/feature_hook.c +22 -0
- package/project/.sdk/tm/c/utility/feature_init.c +22 -0
- package/project/.sdk/tm/c/utility/fetcher.c +78 -0
- package/project/.sdk/tm/c/utility/jsonparse.c +11 -0
- package/project/.sdk/tm/c/utility/make_context.c +7 -0
- package/project/.sdk/tm/c/utility/make_error.c +66 -0
- package/project/.sdk/tm/c/utility/make_fetch_def.c +43 -0
- package/project/.sdk/tm/c/utility/make_options.c +179 -0
- package/project/.sdk/tm/c/utility/make_point.c +109 -0
- package/project/.sdk/tm/c/utility/make_request.c +62 -0
- package/project/.sdk/tm/c/utility/make_response.c +45 -0
- package/project/.sdk/tm/c/utility/make_result.c +61 -0
- package/project/.sdk/tm/c/utility/make_spec.c +60 -0
- package/project/.sdk/tm/c/utility/make_url.c +88 -0
- package/project/.sdk/tm/c/utility/param.c +58 -0
- package/project/.sdk/tm/c/utility/prepare_auth.c +65 -0
- package/project/.sdk/tm/c/utility/prepare_body.c +12 -0
- package/project/.sdk/tm/c/utility/prepare_headers.c +13 -0
- package/project/.sdk/tm/c/utility/prepare_method.c +16 -0
- package/project/.sdk/tm/c/utility/prepare_params.c +30 -0
- package/project/.sdk/tm/c/utility/prepare_path.c +17 -0
- package/project/.sdk/tm/c/utility/prepare_query.c +37 -0
- package/project/.sdk/tm/c/utility/result_basic.c +43 -0
- package/project/.sdk/tm/c/utility/result_body.c +17 -0
- package/project/.sdk/tm/c/utility/result_headers.c +17 -0
- package/project/.sdk/tm/c/utility/struct/inject.c +703 -0
- package/project/.sdk/tm/c/utility/struct/re_util.c +221 -0
- package/project/.sdk/tm/c/utility/struct/regex.c +1103 -0
- package/project/.sdk/tm/c/utility/struct/regex.h +84 -0
- package/project/.sdk/tm/c/utility/struct/transform.c +2224 -0
- package/project/.sdk/tm/c/utility/struct/utility.c +1971 -0
- package/project/.sdk/tm/c/utility/struct/value.c +640 -0
- package/project/.sdk/tm/c/utility/struct/value.h +273 -0
- package/project/.sdk/tm/c/utility/struct/value_io.c +366 -0
- package/project/.sdk/tm/c/utility/struct/value_io.h +31 -0
- package/project/.sdk/tm/c/utility/struct/voxgig_struct.h +216 -0
- package/project/.sdk/tm/c/utility/transform_request.c +21 -0
- package/project/.sdk/tm/c/utility/transform_response.c +36 -0
- package/project/.sdk/tm/clojure/LICENSE +22 -0
- package/project/.sdk/tm/clojure/Makefile +15 -0
- package/project/.sdk/tm/clojure/VERSION +1 -0
- package/project/.sdk/tm/clojure/src/feature/README.md +1 -0
- package/project/.sdk/tm/clojure/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/clojure/src/sdk/client.clj +119 -0
- package/project/.sdk/tm/clojure/src/sdk/core.clj +901 -0
- package/project/.sdk/tm/clojure/src/sdk/features.clj +1027 -0
- package/project/.sdk/tm/clojure/src/voxgig/struct.clj +1734 -0
- package/project/.sdk/tm/clojure/test/sdk/test/feature.clj +596 -0
- package/project/.sdk/tm/clojure/test/sdk/test/netsim.clj +42 -0
- package/project/.sdk/tm/clojure/test/sdk/test/pipeline.clj +314 -0
- package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +52 -0
- package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +337 -0
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +39 -0
- package/project/.sdk/tm/clojure/test/sdk/testutil.clj +35 -0
- package/project/.sdk/tm/cpp/LICENSE +22 -0
- package/project/.sdk/tm/cpp/Makefile +36 -0
- package/project/.sdk/tm/cpp/VERSION +1 -0
- package/project/.sdk/tm/cpp/core/sdk.hpp +16 -0
- package/project/.sdk/tm/cpp/core/struct.hpp +225 -0
- package/project/.sdk/tm/cpp/core/types.hpp +1105 -0
- package/project/.sdk/tm/cpp/feature/audit.hpp +107 -0
- package/project/.sdk/tm/cpp/feature/base.hpp +34 -0
- package/project/.sdk/tm/cpp/feature/cache.hpp +189 -0
- package/project/.sdk/tm/cpp/feature/clienttrack.hpp +105 -0
- package/project/.sdk/tm/cpp/feature/debug.hpp +157 -0
- package/project/.sdk/tm/cpp/feature/idempotency.hpp +119 -0
- package/project/.sdk/tm/cpp/feature/log.hpp +90 -0
- package/project/.sdk/tm/cpp/feature/metrics.hpp +103 -0
- package/project/.sdk/tm/cpp/feature/netsim.hpp +152 -0
- package/project/.sdk/tm/cpp/feature/options.hpp +156 -0
- package/project/.sdk/tm/cpp/feature/paging.hpp +156 -0
- package/project/.sdk/tm/cpp/feature/proxy.hpp +145 -0
- package/project/.sdk/tm/cpp/feature/ratelimit.hpp +87 -0
- package/project/.sdk/tm/cpp/feature/rbac.hpp +108 -0
- package/project/.sdk/tm/cpp/feature/retry.hpp +130 -0
- package/project/.sdk/tm/cpp/feature/streaming.hpp +98 -0
- package/project/.sdk/tm/cpp/feature/telemetry.hpp +139 -0
- package/project/.sdk/tm/cpp/feature/test.hpp +289 -0
- package/project/.sdk/tm/cpp/feature/timeout.hpp +88 -0
- package/project/.sdk/tm/cpp/src/feature/README.md +1 -0
- package/project/.sdk/tm/cpp/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/cpp/test/custom_utility_test.cpp +57 -0
- package/project/.sdk/tm/cpp/test/exists_test.cpp +16 -0
- package/project/.sdk/tm/cpp/test/feature_test.cpp +911 -0
- package/project/.sdk/tm/cpp/test/harness.hpp +344 -0
- package/project/.sdk/tm/cpp/test/netsim_test.cpp +48 -0
- package/project/.sdk/tm/cpp/test/pipeline_test.cpp +526 -0
- package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +841 -0
- package/project/.sdk/tm/cpp/test/runner_support.hpp +437 -0
- package/project/.sdk/tm/cpp/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +494 -0
- package/project/.sdk/tm/cpp/test/struct_runner.hpp +314 -0
- package/project/.sdk/tm/cpp/test/testlib.hpp +82 -0
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +1054 -0
- package/project/.sdk/tm/cpp/utility/voxgigstruct/value.hpp +525 -0
- package/project/.sdk/tm/cpp/utility/voxgigstruct/value_io.hpp +315 -0
- package/project/.sdk/tm/cpp/utility/voxgigstruct/voxgig_struct.hpp +3379 -0
- package/project/.sdk/tm/csharp/LICENSE +22 -0
- package/project/.sdk/tm/csharp/Makefile +43 -0
- package/project/.sdk/tm/csharp/VERSION +1 -0
- package/project/.sdk/tm/csharp/core/Context.cs +257 -0
- package/project/.sdk/tm/csharp/core/Control.cs +17 -0
- package/project/.sdk/tm/csharp/core/Helpers.cs +61 -0
- package/project/.sdk/tm/csharp/core/Operation.cs +51 -0
- package/project/.sdk/tm/csharp/core/Point.cs +68 -0
- package/project/.sdk/tm/csharp/core/Response.cs +45 -0
- package/project/.sdk/tm/csharp/core/Result.cs +63 -0
- package/project/.sdk/tm/csharp/core/Spec.cs +81 -0
- package/project/.sdk/tm/csharp/core/Types.cs +21 -0
- package/project/.sdk/tm/csharp/core/Utility.cs +88 -0
- package/project/.sdk/tm/csharp/feature/AuditFeature.cs +116 -0
- package/project/.sdk/tm/csharp/feature/BaseFeature.cs +39 -0
- package/project/.sdk/tm/csharp/feature/CacheFeature.cs +186 -0
- package/project/.sdk/tm/csharp/feature/ClienttrackFeature.cs +103 -0
- package/project/.sdk/tm/csharp/feature/DebugFeature.cs +157 -0
- package/project/.sdk/tm/csharp/feature/FeatureOptions.cs +197 -0
- package/project/.sdk/tm/csharp/feature/IdempotencyFeature.cs +97 -0
- package/project/.sdk/tm/csharp/feature/LogFeature.cs +109 -0
- package/project/.sdk/tm/csharp/feature/MetricsFeature.cs +117 -0
- package/project/.sdk/tm/csharp/feature/NetsimFeature.cs +200 -0
- package/project/.sdk/tm/csharp/feature/PagingFeature.cs +187 -0
- package/project/.sdk/tm/csharp/feature/ProxyFeature.cs +138 -0
- package/project/.sdk/tm/csharp/feature/RatelimitFeature.cs +89 -0
- package/project/.sdk/tm/csharp/feature/RbacFeature.cs +124 -0
- package/project/.sdk/tm/csharp/feature/RetryFeature.cs +174 -0
- package/project/.sdk/tm/csharp/feature/StreamingFeature.cs +93 -0
- package/project/.sdk/tm/csharp/feature/TelemetryFeature.cs +145 -0
- package/project/.sdk/tm/csharp/feature/TestFeature.cs +368 -0
- package/project/.sdk/tm/csharp/feature/TimeoutFeature.cs +69 -0
- package/project/.sdk/tm/csharp/src/feature/README.md +1 -0
- package/project/.sdk/tm/csharp/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/csharp/test/CustomUtilityTest.cs +51 -0
- package/project/.sdk/tm/csharp/test/ExistsTest.cs +17 -0
- package/project/.sdk/tm/csharp/test/FeatureTest.cs +1653 -0
- package/project/.sdk/tm/csharp/test/NetsimTest.cs +67 -0
- package/project/.sdk/tm/csharp/test/PipelineTest.cs +605 -0
- package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +957 -0
- package/project/.sdk/tm/csharp/test/Runner.cs +626 -0
- package/project/.sdk/tm/csharp/test/StructRunner.cs +276 -0
- package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +1273 -0
- package/project/.sdk/tm/csharp/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/csharp/utility/Clean.cs +11 -0
- package/project/.sdk/tm/csharp/utility/Done.cs +28 -0
- package/project/.sdk/tm/csharp/utility/FeatureAdd.cs +54 -0
- package/project/.sdk/tm/csharp/utility/FeatureHook.cs +35 -0
- package/project/.sdk/tm/csharp/utility/FeatureInit.cs +28 -0
- package/project/.sdk/tm/csharp/utility/Fetcher.cs +181 -0
- package/project/.sdk/tm/csharp/utility/MakeContext.cs +11 -0
- package/project/.sdk/tm/csharp/utility/MakeError.cs +69 -0
- package/project/.sdk/tm/csharp/utility/MakeFetchDef.cs +38 -0
- package/project/.sdk/tm/csharp/utility/MakeOptions.cs +203 -0
- package/project/.sdk/tm/csharp/utility/MakePoint.cs +127 -0
- package/project/.sdk/tm/csharp/utility/MakeRequest.cs +87 -0
- package/project/.sdk/tm/csharp/utility/MakeResponse.cs +55 -0
- package/project/.sdk/tm/csharp/utility/MakeResult.cs +64 -0
- package/project/.sdk/tm/csharp/utility/MakeSpec.cs +64 -0
- package/project/.sdk/tm/csharp/utility/MakeUrl.cs +54 -0
- package/project/.sdk/tm/csharp/utility/Param.cs +67 -0
- package/project/.sdk/tm/csharp/utility/PrepareAuth.cs +54 -0
- package/project/.sdk/tm/csharp/utility/PrepareBody.cs +19 -0
- package/project/.sdk/tm/csharp/utility/PrepareHeaders.cs +22 -0
- package/project/.sdk/tm/csharp/utility/PrepareMethod.cs +22 -0
- package/project/.sdk/tm/csharp/utility/PrepareParams.cs +38 -0
- package/project/.sdk/tm/csharp/utility/PreparePath.cs +18 -0
- package/project/.sdk/tm/csharp/utility/PrepareQuery.cs +40 -0
- package/project/.sdk/tm/csharp/utility/Register.cs +41 -0
- package/project/.sdk/tm/csharp/utility/ResultBasic.cs +39 -0
- package/project/.sdk/tm/csharp/utility/ResultBody.cs +22 -0
- package/project/.sdk/tm/csharp/utility/ResultHeaders.cs +26 -0
- package/project/.sdk/tm/csharp/utility/TransformRequest.cs +39 -0
- package/project/.sdk/tm/csharp/utility/TransformResponse.cs +53 -0
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +3582 -0
- package/project/.sdk/tm/dart/LICENSE +22 -0
- package/project/.sdk/tm/dart/Makefile +50 -0
- package/project/.sdk/tm/dart/lib/Context.dart +150 -0
- package/project/.sdk/tm/dart/lib/Control.dart +15 -0
- package/project/.sdk/tm/dart/lib/Operation.dart +31 -0
- package/project/.sdk/tm/dart/lib/Point.dart +43 -0
- package/project/.sdk/tm/dart/lib/Response.dart +32 -0
- package/project/.sdk/tm/dart/lib/Result.dart +39 -0
- package/project/.sdk/tm/dart/lib/Spec.dart +49 -0
- package/project/.sdk/tm/dart/lib/feature/audit/AuditFeature.dart +103 -0
- package/project/.sdk/tm/dart/lib/feature/base/BaseFeature.dart +76 -0
- package/project/.sdk/tm/dart/lib/feature/cache/CacheFeature.dart +152 -0
- package/project/.sdk/tm/dart/lib/feature/clienttrack/ClienttrackFeature.dart +104 -0
- package/project/.sdk/tm/dart/lib/feature/debug/DebugFeature.dart +153 -0
- package/project/.sdk/tm/dart/lib/feature/idempotency/IdempotencyFeature.dart +92 -0
- package/project/.sdk/tm/dart/lib/feature/log/LogFeature.dart +85 -0
- package/project/.sdk/tm/dart/lib/feature/metrics/MetricsFeature.dart +103 -0
- package/project/.sdk/tm/dart/lib/feature/netsim/NetsimFeature.dart +186 -0
- package/project/.sdk/tm/dart/lib/feature/paging/PagingFeature.dart +145 -0
- package/project/.sdk/tm/dart/lib/feature/proxy/ProxyFeature.dart +118 -0
- package/project/.sdk/tm/dart/lib/feature/ratelimit/RatelimitFeature.dart +103 -0
- package/project/.sdk/tm/dart/lib/feature/rbac/RbacFeature.dart +121 -0
- package/project/.sdk/tm/dart/lib/feature/retry/RetryFeature.dart +155 -0
- package/project/.sdk/tm/dart/lib/feature/streaming/StreamingFeature.dart +97 -0
- package/project/.sdk/tm/dart/lib/feature/telemetry/TelemetryFeature.dart +136 -0
- package/project/.sdk/tm/dart/lib/feature/test/TestFeature.dart +270 -0
- package/project/.sdk/tm/dart/lib/feature/timeout/TimeoutFeature.dart +104 -0
- package/project/.sdk/tm/dart/lib/utility/CleanUtility.dart +12 -0
- package/project/.sdk/tm/dart/lib/utility/DoneUtility.dart +18 -0
- package/project/.sdk/tm/dart/lib/utility/ErrUtility.dart +46 -0
- package/project/.sdk/tm/dart/lib/utility/FeatureAddUtility.dart +35 -0
- package/project/.sdk/tm/dart/lib/utility/FeatureHookUtility.dart +20 -0
- package/project/.sdk/tm/dart/lib/utility/FeatureInitUtility.dart +9 -0
- package/project/.sdk/tm/dart/lib/utility/FetcherUtility.dart +95 -0
- package/project/.sdk/tm/dart/lib/utility/MakeContextUtility.dart +6 -0
- package/project/.sdk/tm/dart/lib/utility/MakeErrorUtility.dart +67 -0
- package/project/.sdk/tm/dart/lib/utility/MakeFetchDefUtility.dart +42 -0
- package/project/.sdk/tm/dart/lib/utility/MakeOptionsUtility.dart +147 -0
- package/project/.sdk/tm/dart/lib/utility/MakePointUtility.dart +84 -0
- package/project/.sdk/tm/dart/lib/utility/MakeRequestUtility.dart +63 -0
- package/project/.sdk/tm/dart/lib/utility/MakeResponseUtility.dart +54 -0
- package/project/.sdk/tm/dart/lib/utility/MakeResultUtility.dart +49 -0
- package/project/.sdk/tm/dart/lib/utility/MakeSpecUtility.dart +61 -0
- package/project/.sdk/tm/dart/lib/utility/MakeUrlUtility.dart +51 -0
- package/project/.sdk/tm/dart/lib/utility/ParamUtility.dart +56 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareAuthUtility.dart +46 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareBodyUtility.dart +19 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareHeadersUtility.dart +11 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareMethodUtility.dart +15 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareParamsUtility.dart +23 -0
- package/project/.sdk/tm/dart/lib/utility/PreparePathUtility.dart +9 -0
- package/project/.sdk/tm/dart/lib/utility/PrepareQueryUtility.dart +18 -0
- package/project/.sdk/tm/dart/lib/utility/ResultBasicUtility.dart +29 -0
- package/project/.sdk/tm/dart/lib/utility/ResultBodyUtility.dart +15 -0
- package/project/.sdk/tm/dart/lib/utility/ResultHeadersUtility.dart +18 -0
- package/project/.sdk/tm/dart/lib/utility/StructUtility.dart +127 -0
- package/project/.sdk/tm/dart/lib/utility/TransformRequestUtility.dart +28 -0
- package/project/.sdk/tm/dart/lib/utility/TransformResponseUtility.dart +44 -0
- package/project/.sdk/tm/dart/lib/utility/Utility.dart +230 -0
- package/project/.sdk/tm/dart/lib/utility/voxgig_struct.dart +2456 -0
- package/project/.sdk/tm/dart/src/feature/README.md +3 -0
- package/project/.sdk/tm/dart/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/dart/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/dart/test/custom_test.dart +65 -0
- package/project/.sdk/tm/dart/test/exists_test.dart +12 -0
- package/project/.sdk/tm/dart/test/feature/harness.dart +329 -0
- package/project/.sdk/tm/dart/test/feature_test.dart +1139 -0
- package/project/.sdk/tm/dart/test/harness.dart +153 -0
- package/project/.sdk/tm/dart/test/netsim_test.dart +48 -0
- package/project/.sdk/tm/dart/test/pipeline_test.dart +608 -0
- package/project/.sdk/tm/dart/test/primary_test.dart +411 -0
- package/project/.sdk/tm/dart/test/runner.dart +406 -0
- package/project/.sdk/tm/dart/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/dart/test/struct_corpus.dart +531 -0
- package/project/.sdk/tm/dart/test/struct_test.dart +41 -0
- package/project/.sdk/tm/dart/test/utility.dart +159 -0
- package/project/.sdk/tm/elixir/LICENSE +21 -0
- package/project/.sdk/tm/elixir/Makefile +15 -0
- package/project/.sdk/tm/elixir/VERSION +1 -0
- package/project/.sdk/tm/elixir/lib/projectname/context.ex +138 -0
- package/project/.sdk/tm/elixir/lib/projectname/core.ex +125 -0
- package/project/.sdk/tm/elixir/lib/projectname/entity_base.ex +155 -0
- package/project/.sdk/tm/elixir/lib/projectname/error.ex +16 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/audit.ex +125 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/cache.ex +170 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/clienttrack.ex +136 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/debug.ex +232 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/idempotency.ex +107 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/log.ex +62 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/metrics.ex +130 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/netsim.ex +213 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/paging.ex +191 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/proxy.ex +142 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/ratelimit.ex +81 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/rbac.ex +139 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/retry.ex +150 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/streaming.ex +107 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/telemetry.ex +172 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/test.ex +285 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/timeout.ex +64 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature.ex +90 -0
- package/project/.sdk/tm/elixir/lib/projectname/helpers.ex +66 -0
- package/project/.sdk/tm/elixir/lib/projectname/json.ex +115 -0
- package/project/.sdk/tm/elixir/lib/projectname/utility.ex +1257 -0
- package/project/.sdk/tm/elixir/lib/utility/struct/voxgig_struct.ex +2615 -0
- package/project/.sdk/tm/elixir/src/feature/README.md +3 -0
- package/project/.sdk/tm/elixir/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/elixir/test/feature_test.exs +879 -0
- package/project/.sdk/tm/elixir/test/netsim_test.exs +58 -0
- package/project/.sdk/tm/elixir/test/pipeline_test.exs +558 -0
- package/project/.sdk/tm/elixir/test/primary_utility_test.exs +133 -0
- package/project/.sdk/tm/elixir/test/stream_test.exs +119 -0
- package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +18 -0
- package/project/.sdk/tm/elixir/test/support/feature_harness.ex +346 -0
- package/project/.sdk/tm/elixir/test/support/struct_corpus.ex +677 -0
- package/project/.sdk/tm/elixir/test/test_helper.exs +1 -0
- package/project/.sdk/tm/go/core/context.go +10 -0
- package/project/.sdk/tm/go/core/control.go +2 -0
- package/project/.sdk/tm/go/core/result.go +6 -0
- package/project/.sdk/tm/go/core/types.go +1 -0
- package/project/.sdk/tm/go/feature/audit_feature.go +110 -0
- package/project/.sdk/tm/go/feature/base_feature.go +8 -0
- package/project/.sdk/tm/go/feature/cache_feature.go +171 -0
- package/project/.sdk/tm/go/feature/clienttrack_feature.go +100 -0
- package/project/.sdk/tm/go/feature/debug_feature.go +159 -0
- package/project/.sdk/tm/go/feature/feature_options.go +204 -0
- package/project/.sdk/tm/go/feature/idempotency_feature.go +115 -0
- package/project/.sdk/tm/go/feature/metrics_feature.go +112 -0
- package/project/.sdk/tm/go/feature/netsim_feature.go +184 -0
- package/project/.sdk/tm/go/feature/paging_feature.go +173 -0
- package/project/.sdk/tm/go/feature/proxy_feature.go +121 -0
- package/project/.sdk/tm/go/feature/ratelimit_feature.go +88 -0
- package/project/.sdk/tm/go/feature/rbac_feature.go +126 -0
- package/project/.sdk/tm/go/feature/retry_feature.go +165 -0
- package/project/.sdk/tm/go/feature/streaming_feature.go +119 -0
- package/project/.sdk/tm/go/feature/telemetry_feature.go +142 -0
- package/project/.sdk/tm/go/feature/test_feature.go +78 -3
- package/project/.sdk/tm/go/feature/timeout_feature.go +88 -0
- package/project/.sdk/tm/go/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/go/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/go/test/feature_test.go +1465 -0
- package/project/.sdk/tm/go/test/netsim_test.go +70 -0
- package/project/.sdk/tm/go/test/pipeline_test.go +571 -0
- package/project/.sdk/tm/go/utility/feature_add.go +38 -0
- package/project/.sdk/tm/go/utility/fetcher.go +13 -1
- package/project/.sdk/tm/go/utility/make_error.go +8 -0
- package/project/.sdk/tm/go/utility/make_options.go +62 -0
- package/project/.sdk/tm/go/utility/make_point.go +6 -0
- package/project/.sdk/tm/go-cli/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/LICENSE +21 -0
- package/project/.sdk/tm/haskell/Makefile +22 -0
- package/project/.sdk/tm/haskell/VERSION +1 -0
- package/project/.sdk/tm/haskell/src/SdkFeatures.hs +1278 -0
- package/project/.sdk/tm/haskell/src/SdkHelpers.hs +337 -0
- package/project/.sdk/tm/haskell/src/SdkRuntime.hs +1007 -0
- package/project/.sdk/tm/haskell/src/SdkTypes.hs +186 -0
- package/project/.sdk/tm/haskell/src/VoxgigStruct.hs +2299 -0
- package/project/.sdk/tm/haskell/src/Vregex.hs +237 -0
- package/project/.sdk/tm/haskell/src/feature/README.md +5 -0
- package/project/.sdk/tm/haskell/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/test/Harness.hs +276 -0
- package/project/.sdk/tm/haskell/test/Runner.hs +47 -0
- package/project/.sdk/tm/haskell/test/StructCorpus.hs +449 -0
- package/project/.sdk/tm/haskell/test/TCustomUtility.hs +38 -0
- package/project/.sdk/tm/haskell/test/TFeature.hs +794 -0
- package/project/.sdk/tm/haskell/test/TNetsim.hs +50 -0
- package/project/.sdk/tm/haskell/test/TPipeline.hs +334 -0
- package/project/.sdk/tm/haskell/test/TPrimaryUtility.hs +386 -0
- package/project/.sdk/tm/haskell/test/TestJson.hs +107 -0
- package/project/.sdk/tm/haskell/test/Testutil.hs +59 -0
- package/project/.sdk/tm/java/LICENSE +22 -0
- package/project/.sdk/tm/java/Makefile +44 -0
- package/project/.sdk/tm/java/VERSION +1 -0
- package/project/.sdk/tm/java/core/Context.java +269 -0
- package/project/.sdk/tm/java/core/Control.java +23 -0
- package/project/.sdk/tm/java/core/Entity.java +13 -0
- package/project/.sdk/tm/java/core/Feature.java +45 -0
- package/project/.sdk/tm/java/core/FeaturePlacement.java +13 -0
- package/project/.sdk/tm/java/core/Helpers.java +50 -0
- package/project/.sdk/tm/java/core/Operation.java +47 -0
- package/project/.sdk/tm/java/core/Point.java +90 -0
- package/project/.sdk/tm/java/core/Response.java +48 -0
- package/project/.sdk/tm/java/core/Result.java +64 -0
- package/project/.sdk/tm/java/core/SdkClient.java +280 -0
- package/project/.sdk/tm/java/core/SdkEntity.java +28 -0
- package/project/.sdk/tm/java/core/Spec.java +84 -0
- package/project/.sdk/tm/java/core/Utility.java +128 -0
- package/project/.sdk/tm/java/feature/AuditFeature.java +113 -0
- package/project/.sdk/tm/java/feature/BaseFeature.java +91 -0
- package/project/.sdk/tm/java/feature/CacheFeature.java +184 -0
- package/project/.sdk/tm/java/feature/ClienttrackFeature.java +103 -0
- package/project/.sdk/tm/java/feature/DebugFeature.java +163 -0
- package/project/.sdk/tm/java/feature/FeatureOptions.java +204 -0
- package/project/.sdk/tm/java/feature/IdempotencyFeature.java +115 -0
- package/project/.sdk/tm/java/feature/LogFeature.java +143 -0
- package/project/.sdk/tm/java/feature/MetricsFeature.java +115 -0
- package/project/.sdk/tm/java/feature/NetsimFeature.java +181 -0
- package/project/.sdk/tm/java/feature/PagingFeature.java +178 -0
- package/project/.sdk/tm/java/feature/ProxyFeature.java +122 -0
- package/project/.sdk/tm/java/feature/RatelimitFeature.java +83 -0
- package/project/.sdk/tm/java/feature/RbacFeature.java +132 -0
- package/project/.sdk/tm/java/feature/RetryFeature.java +156 -0
- package/project/.sdk/tm/java/feature/StreamingFeature.java +110 -0
- package/project/.sdk/tm/java/feature/TelemetryFeature.java +146 -0
- package/project/.sdk/tm/java/feature/TestFeature.java +333 -0
- package/project/.sdk/tm/java/feature/TimeoutFeature.java +89 -0
- package/project/.sdk/tm/java/src/feature/README.md +1 -0
- package/project/.sdk/tm/java/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/java/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/java/test/CustomUtilityTest.java +59 -0
- package/project/.sdk/tm/java/test/ExistsTest.java +16 -0
- package/project/.sdk/tm/java/test/FeatureHarness.java +448 -0
- package/project/.sdk/tm/java/test/FeatureTest.java +1018 -0
- package/project/.sdk/tm/java/test/NetsimTest.java +59 -0
- package/project/.sdk/tm/java/test/PipelineTest.java +618 -0
- package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +864 -0
- package/project/.sdk/tm/java/test/RunnerSupport.java +545 -0
- package/project/.sdk/tm/java/test/StructCorpusTest.java +351 -0
- package/project/.sdk/tm/java/test/StructRunner.java +281 -0
- package/project/.sdk/tm/java/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/java/utility/Clean.java +12 -0
- package/project/.sdk/tm/java/utility/Done.java +29 -0
- package/project/.sdk/tm/java/utility/FeatureAdd.java +59 -0
- package/project/.sdk/tm/java/utility/FeatureHookUtil.java +72 -0
- package/project/.sdk/tm/java/utility/FeatureInit.java +35 -0
- package/project/.sdk/tm/java/utility/Fetcher.java +170 -0
- package/project/.sdk/tm/java/utility/Json.java +268 -0
- package/project/.sdk/tm/java/utility/MakeContext.java +14 -0
- package/project/.sdk/tm/java/utility/MakeError.java +81 -0
- package/project/.sdk/tm/java/utility/MakeFetchDef.java +48 -0
- package/project/.sdk/tm/java/utility/MakeOptions.java +168 -0
- package/project/.sdk/tm/java/utility/MakePoint.java +118 -0
- package/project/.sdk/tm/java/utility/MakeRequest.java +83 -0
- package/project/.sdk/tm/java/utility/MakeResponse.java +54 -0
- package/project/.sdk/tm/java/utility/MakeResult.java +68 -0
- package/project/.sdk/tm/java/utility/MakeSpec.java +69 -0
- package/project/.sdk/tm/java/utility/MakeUrl.java +67 -0
- package/project/.sdk/tm/java/utility/Param.java +74 -0
- package/project/.sdk/tm/java/utility/PrepareAuth.java +66 -0
- package/project/.sdk/tm/java/utility/PrepareBody.java +16 -0
- package/project/.sdk/tm/java/utility/PrepareHeaders.java +28 -0
- package/project/.sdk/tm/java/utility/PrepareMethod.java +28 -0
- package/project/.sdk/tm/java/utility/PrepareParams.java +50 -0
- package/project/.sdk/tm/java/utility/PreparePath.java +26 -0
- package/project/.sdk/tm/java/utility/PrepareQuery.java +54 -0
- package/project/.sdk/tm/java/utility/Register.java +41 -0
- package/project/.sdk/tm/java/utility/ResultBasic.java +36 -0
- package/project/.sdk/tm/java/utility/ResultBody.java +23 -0
- package/project/.sdk/tm/java/utility/ResultHeaders.java +36 -0
- package/project/.sdk/tm/java/utility/TransformRequest.java +35 -0
- package/project/.sdk/tm/java/utility/TransformResponse.java +52 -0
- package/project/.sdk/tm/java/utility/struct/Struct.java +3550 -0
- package/project/.sdk/tm/js/src/feature/audit/AuditFeature.js +96 -0
- package/project/.sdk/tm/js/src/feature/cache/CacheFeature.js +150 -0
- package/project/.sdk/tm/js/src/feature/clienttrack/ClienttrackFeature.js +104 -0
- package/project/.sdk/tm/js/src/feature/debug/DebugFeature.js +132 -0
- package/project/.sdk/tm/js/src/feature/idempotency/IdempotencyFeature.js +95 -0
- package/project/.sdk/tm/js/src/feature/metrics/MetricsFeature.js +102 -0
- package/project/.sdk/tm/js/src/feature/netsim/NetsimFeature.js +187 -0
- package/project/.sdk/tm/js/src/feature/paging/PagingFeature.js +139 -0
- package/project/.sdk/tm/js/src/feature/proxy/ProxyFeature.js +110 -0
- package/project/.sdk/tm/js/src/feature/ratelimit/RatelimitFeature.js +106 -0
- package/project/.sdk/tm/js/src/feature/rbac/RbacFeature.js +102 -0
- package/project/.sdk/tm/js/src/feature/retry/RetryFeature.js +158 -0
- package/project/.sdk/tm/js/src/feature/streaming/StreamingFeature.js +96 -0
- package/project/.sdk/tm/js/src/feature/telemetry/TelemetryFeature.js +128 -0
- package/project/.sdk/tm/js/src/feature/test/TestFeature.js +58 -1
- package/project/.sdk/tm/js/src/feature/timeout/TimeoutFeature.js +101 -0
- package/project/.sdk/tm/js/src/utility/FeatureHookUtility.js +4 -1
- package/project/.sdk/tm/js/src/utility/MakeErrorUtility.js +9 -0
- package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +31 -1
- package/project/.sdk/tm/js/test/feature/harness.js +275 -0
- package/project/.sdk/tm/js/test/feature.test.js +772 -0
- package/project/.sdk/tm/js/test/netsim.test.js +43 -0
- package/project/.sdk/tm/js/test/pipeline.test.js +382 -0
- package/project/.sdk/tm/kotlin/LICENSE +22 -0
- package/project/.sdk/tm/kotlin/Makefile +43 -0
- package/project/.sdk/tm/kotlin/VERSION +1 -0
- package/project/.sdk/tm/kotlin/core/Context.kt +247 -0
- package/project/.sdk/tm/kotlin/core/Control.kt +21 -0
- package/project/.sdk/tm/kotlin/core/Helpers.kt +49 -0
- package/project/.sdk/tm/kotlin/core/Interfaces.kt +88 -0
- package/project/.sdk/tm/kotlin/core/Operation.kt +43 -0
- package/project/.sdk/tm/kotlin/core/Point.kt +83 -0
- package/project/.sdk/tm/kotlin/core/Response.kt +43 -0
- package/project/.sdk/tm/kotlin/core/Result.kt +61 -0
- package/project/.sdk/tm/kotlin/core/SdkClient.kt +266 -0
- package/project/.sdk/tm/kotlin/core/Spec.kt +76 -0
- package/project/.sdk/tm/kotlin/core/Utility.kt +93 -0
- package/project/.sdk/tm/kotlin/feature/AuditFeature.kt +96 -0
- package/project/.sdk/tm/kotlin/feature/BaseFeature.kt +57 -0
- package/project/.sdk/tm/kotlin/feature/CacheFeature.kt +167 -0
- package/project/.sdk/tm/kotlin/feature/ClienttrackFeature.kt +84 -0
- package/project/.sdk/tm/kotlin/feature/DebugFeature.kt +141 -0
- package/project/.sdk/tm/kotlin/feature/FeatureOptions.kt +191 -0
- package/project/.sdk/tm/kotlin/feature/IdempotencyFeature.kt +98 -0
- package/project/.sdk/tm/kotlin/feature/LogFeature.kt +92 -0
- package/project/.sdk/tm/kotlin/feature/MetricsFeature.kt +96 -0
- package/project/.sdk/tm/kotlin/feature/NetsimFeature.kt +162 -0
- package/project/.sdk/tm/kotlin/feature/PagingFeature.kt +143 -0
- package/project/.sdk/tm/kotlin/feature/ProxyFeature.kt +109 -0
- package/project/.sdk/tm/kotlin/feature/RatelimitFeature.kt +77 -0
- package/project/.sdk/tm/kotlin/feature/RbacFeature.kt +100 -0
- package/project/.sdk/tm/kotlin/feature/RetryFeature.kt +140 -0
- package/project/.sdk/tm/kotlin/feature/StreamingFeature.kt +90 -0
- package/project/.sdk/tm/kotlin/feature/TelemetryFeature.kt +118 -0
- package/project/.sdk/tm/kotlin/feature/TestFeature.kt +306 -0
- package/project/.sdk/tm/kotlin/feature/TimeoutFeature.kt +74 -0
- package/project/.sdk/tm/kotlin/src/feature/README.md +1 -0
- package/project/.sdk/tm/kotlin/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/kotlin/test/CustomUtilityTest.kt +51 -0
- package/project/.sdk/tm/kotlin/test/ExistsTest.kt +15 -0
- package/project/.sdk/tm/kotlin/test/FeatureHarness.kt +380 -0
- package/project/.sdk/tm/kotlin/test/FeatureTest.kt +924 -0
- package/project/.sdk/tm/kotlin/test/NetsimTest.kt +50 -0
- package/project/.sdk/tm/kotlin/test/PipelineTest.kt +556 -0
- package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +829 -0
- package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +477 -0
- package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +297 -0
- package/project/.sdk/tm/kotlin/test/StructRunner.kt +177 -0
- package/project/.sdk/tm/kotlin/test/sdk-test-control.json +19 -0
- package/project/.sdk/tm/kotlin/utility/CoreUtil.kt +96 -0
- package/project/.sdk/tm/kotlin/utility/FeatureUtil.kt +121 -0
- package/project/.sdk/tm/kotlin/utility/Fetcher.kt +156 -0
- package/project/.sdk/tm/kotlin/utility/Json.kt +237 -0
- package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +152 -0
- package/project/.sdk/tm/kotlin/utility/MakePoint.kt +108 -0
- package/project/.sdk/tm/kotlin/utility/MakeReqRes.kt +152 -0
- package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +142 -0
- package/project/.sdk/tm/kotlin/utility/Prepare.kt +236 -0
- package/project/.sdk/tm/kotlin/utility/Register.kt +39 -0
- package/project/.sdk/tm/kotlin/utility/ResultTransform.kt +109 -0
- package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +2697 -0
- package/project/.sdk/tm/lua/feature/audit_feature.lua +132 -0
- package/project/.sdk/tm/lua/feature/cache_feature.lua +188 -0
- package/project/.sdk/tm/lua/feature/clienttrack_feature.lua +127 -0
- package/project/.sdk/tm/lua/feature/debug_feature.lua +194 -0
- package/project/.sdk/tm/lua/feature/idempotency_feature.lua +127 -0
- package/project/.sdk/tm/lua/feature/metrics_feature.lua +135 -0
- package/project/.sdk/tm/lua/feature/netsim_feature.lua +205 -0
- package/project/.sdk/tm/lua/feature/paging_feature.lua +180 -0
- package/project/.sdk/tm/lua/feature/proxy_feature.lua +147 -0
- package/project/.sdk/tm/lua/feature/ratelimit_feature.lua +120 -0
- package/project/.sdk/tm/lua/feature/rbac_feature.lua +141 -0
- package/project/.sdk/tm/lua/feature/retry_feature.lua +188 -0
- package/project/.sdk/tm/lua/feature/streaming_feature.lua +143 -0
- package/project/.sdk/tm/lua/feature/telemetry_feature.lua +159 -0
- package/project/.sdk/tm/lua/feature/test_feature.lua +85 -1
- package/project/.sdk/tm/lua/feature/timeout_feature.lua +94 -0
- package/project/.sdk/tm/lua/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/lua/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/lua/test/feature_test.lua +1244 -0
- package/project/.sdk/tm/lua/test/netsim_test.lua +61 -0
- package/project/.sdk/tm/lua/test/pipeline_test.lua +613 -0
- package/project/.sdk/tm/lua/utility/feature_add.lua +28 -1
- package/project/.sdk/tm/lua/utility/make_error.lua +9 -0
- package/project/.sdk/tm/lua/utility/make_options.lua +58 -0
- package/project/.sdk/tm/lua/utility/make_point.lua +8 -1
- package/project/.sdk/tm/ocaml/LICENSE +21 -0
- package/project/.sdk/tm/ocaml/Makefile +58 -0
- package/project/.sdk/tm/ocaml/VERSION +1 -0
- package/project/.sdk/tm/ocaml/sdk_features.ml +1127 -0
- package/project/.sdk/tm/ocaml/sdk_helpers.ml +110 -0
- package/project/.sdk/tm/ocaml/sdk_runtime.ml +942 -0
- package/project/.sdk/tm/ocaml/sdk_types.ml +259 -0
- package/project/.sdk/tm/ocaml/src/feature/README.md +1 -0
- package/project/.sdk/tm/ocaml/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/ocaml/test/custom_utility.ml +30 -0
- package/project/.sdk/tm/ocaml/test/harness.ml +198 -0
- package/project/.sdk/tm/ocaml/test/struct_corpus.ml +487 -0
- package/project/.sdk/tm/ocaml/test/t_feature.ml +533 -0
- package/project/.sdk/tm/ocaml/test/t_main.ml +5 -0
- package/project/.sdk/tm/ocaml/test/t_pipeline.ml +354 -0
- package/project/.sdk/tm/ocaml/test/testutil.ml +57 -0
- package/project/.sdk/tm/ocaml/utility/voxgig_struct.ml +1858 -0
- package/project/.sdk/tm/ocaml/utility/vregex.ml +254 -0
- package/project/.sdk/tm/perl/LICENSE +22 -0
- package/project/.sdk/tm/perl/Makefile +57 -0
- package/project/.sdk/tm/perl/core/context.pm +138 -0
- package/project/.sdk/tm/perl/core/control.pm +22 -0
- package/project/.sdk/tm/perl/core/error.pm +30 -0
- package/project/.sdk/tm/perl/core/helpers.pm +142 -0
- package/project/.sdk/tm/perl/core/operation.pm +47 -0
- package/project/.sdk/tm/perl/core/response.pm +40 -0
- package/project/.sdk/tm/perl/core/result.pm +45 -0
- package/project/.sdk/tm/perl/core/spec.pm +33 -0
- package/project/.sdk/tm/perl/core/utility_type.pm +32 -0
- package/project/.sdk/tm/perl/feature/audit_feature.pm +128 -0
- package/project/.sdk/tm/perl/feature/base_feature.pm +41 -0
- package/project/.sdk/tm/perl/feature/cache_feature.pm +168 -0
- package/project/.sdk/tm/perl/feature/clienttrack_feature.pm +126 -0
- package/project/.sdk/tm/perl/feature/debug_feature.pm +168 -0
- package/project/.sdk/tm/perl/feature/idempotency_feature.pm +104 -0
- package/project/.sdk/tm/perl/feature/log_feature.pm +77 -0
- package/project/.sdk/tm/perl/feature/metrics_feature.pm +124 -0
- package/project/.sdk/tm/perl/feature/netsim_feature.pm +215 -0
- package/project/.sdk/tm/perl/feature/paging_feature.pm +158 -0
- package/project/.sdk/tm/perl/feature/proxy_feature.pm +128 -0
- package/project/.sdk/tm/perl/feature/ratelimit_feature.pm +126 -0
- package/project/.sdk/tm/perl/feature/rbac_feature.pm +124 -0
- package/project/.sdk/tm/perl/feature/retry_feature.pm +153 -0
- package/project/.sdk/tm/perl/feature/streaming_feature.pm +112 -0
- package/project/.sdk/tm/perl/feature/telemetry_feature.pm +155 -0
- package/project/.sdk/tm/perl/feature/test_feature.pm +314 -0
- package/project/.sdk/tm/perl/feature/timeout_feature.pm +110 -0
- package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +2897 -0
- package/project/.sdk/tm/perl/src/feature/README.md +3 -0
- package/project/.sdk/tm/perl/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/perl/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/perl/t/feature.t +1054 -0
- package/project/.sdk/tm/perl/t/netsim.t +55 -0
- package/project/.sdk/tm/perl/t/pipeline.t +632 -0
- package/project/.sdk/tm/perl/t/primary_utility.t +1023 -0
- package/project/.sdk/tm/perl/t/runner.pm +140 -0
- package/project/.sdk/tm/perl/t/sdk-test-control.json +19 -0
- package/project/.sdk/tm/perl/t/stream.t +132 -0
- package/project/.sdk/tm/perl/t/struct_runner.pm +275 -0
- package/project/.sdk/tm/perl/t/struct_utility.t +438 -0
- package/project/.sdk/tm/perl/utility/clean.pm +15 -0
- package/project/.sdk/tm/perl/utility/done.pm +34 -0
- package/project/.sdk/tm/perl/utility/feature_add.pm +47 -0
- package/project/.sdk/tm/perl/utility/feature_hook.pm +25 -0
- package/project/.sdk/tm/perl/utility/feature_init.pm +33 -0
- package/project/.sdk/tm/perl/utility/fetcher.pm +112 -0
- package/project/.sdk/tm/perl/utility/make_context.pm +22 -0
- package/project/.sdk/tm/perl/utility/make_error.pm +74 -0
- package/project/.sdk/tm/perl/utility/make_fetch_def.pm +46 -0
- package/project/.sdk/tm/perl/utility/make_options.pm +123 -0
- package/project/.sdk/tm/perl/utility/make_point.pm +104 -0
- package/project/.sdk/tm/perl/utility/make_request.pm +66 -0
- package/project/.sdk/tm/perl/utility/make_response.pm +38 -0
- package/project/.sdk/tm/perl/utility/make_result.pm +53 -0
- package/project/.sdk/tm/perl/utility/make_spec.pm +71 -0
- package/project/.sdk/tm/perl/utility/make_url.pm +63 -0
- package/project/.sdk/tm/perl/utility/param.pm +65 -0
- package/project/.sdk/tm/perl/utility/prepare_auth.pm +56 -0
- package/project/.sdk/tm/perl/utility/prepare_body.pm +17 -0
- package/project/.sdk/tm/perl/utility/prepare_headers.pm +27 -0
- package/project/.sdk/tm/perl/utility/prepare_method.pm +25 -0
- package/project/.sdk/tm/perl/utility/prepare_params.pm +41 -0
- package/project/.sdk/tm/perl/utility/prepare_path.pm +29 -0
- package/project/.sdk/tm/perl/utility/prepare_query.pm +40 -0
- package/project/.sdk/tm/perl/utility/register.pm +53 -0
- package/project/.sdk/tm/perl/utility/result_basic.pm +38 -0
- package/project/.sdk/tm/perl/utility/result_body.pm +28 -0
- package/project/.sdk/tm/perl/utility/result_headers.pm +32 -0
- package/project/.sdk/tm/perl/utility/transform_request.pm +30 -0
- package/project/.sdk/tm/perl/utility/transform_response.pm +43 -0
- package/project/.sdk/tm/php/core/Result.php +10 -0
- package/project/.sdk/tm/php/feature/AuditFeature.php +125 -0
- package/project/.sdk/tm/php/feature/BaseFeature.php +6 -0
- package/project/.sdk/tm/php/feature/CacheFeature.php +158 -0
- package/project/.sdk/tm/php/feature/ClienttrackFeature.php +126 -0
- package/project/.sdk/tm/php/feature/DebugFeature.php +167 -0
- package/project/.sdk/tm/php/feature/IdempotencyFeature.php +102 -0
- package/project/.sdk/tm/php/feature/MetricsFeature.php +122 -0
- package/project/.sdk/tm/php/feature/NetsimFeature.php +190 -0
- package/project/.sdk/tm/php/feature/PagingFeature.php +153 -0
- package/project/.sdk/tm/php/feature/ProxyFeature.php +136 -0
- package/project/.sdk/tm/php/feature/RatelimitFeature.php +116 -0
- package/project/.sdk/tm/php/feature/RbacFeature.php +133 -0
- package/project/.sdk/tm/php/feature/RetryFeature.php +159 -0
- package/project/.sdk/tm/php/feature/StreamingFeature.php +107 -0
- package/project/.sdk/tm/php/feature/TelemetryFeature.php +156 -0
- package/project/.sdk/tm/php/feature/TestFeature.php +80 -1
- package/project/.sdk/tm/php/feature/TimeoutFeature.php +95 -0
- package/project/.sdk/tm/php/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/php/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/php/test/FeatureTest.php +1259 -0
- package/project/.sdk/tm/php/test/NetsimTest.php +53 -0
- package/project/.sdk/tm/php/test/PipelineTest.php +674 -0
- package/project/.sdk/tm/php/utility/FeatureAdd.php +32 -1
- package/project/.sdk/tm/php/utility/MakeError.php +9 -0
- package/project/.sdk/tm/php/utility/MakeOptions.php +46 -0
- package/project/.sdk/tm/php/utility/MakePoint.php +7 -0
- package/project/.sdk/tm/py/core/context.py +4 -0
- package/project/.sdk/tm/py/core/control.py +3 -0
- package/project/.sdk/tm/py/feature/audit_feature.py +98 -0
- package/project/.sdk/tm/py/feature/cache_feature.py +138 -0
- package/project/.sdk/tm/py/feature/clienttrack_feature.py +97 -0
- package/project/.sdk/tm/py/feature/debug_feature.py +134 -0
- package/project/.sdk/tm/py/feature/idempotency_feature.py +89 -0
- package/project/.sdk/tm/py/feature/metrics_feature.py +93 -0
- package/project/.sdk/tm/py/feature/netsim_feature.py +170 -0
- package/project/.sdk/tm/py/feature/paging_feature.py +134 -0
- package/project/.sdk/tm/py/feature/proxy_feature.py +104 -0
- package/project/.sdk/tm/py/feature/ratelimit_feature.py +98 -0
- package/project/.sdk/tm/py/feature/rbac_feature.py +102 -0
- package/project/.sdk/tm/py/feature/retry_feature.py +142 -0
- package/project/.sdk/tm/py/feature/streaming_feature.py +84 -0
- package/project/.sdk/tm/py/feature/telemetry_feature.py +128 -0
- package/project/.sdk/tm/py/feature/test_feature.py +70 -1
- package/project/.sdk/tm/py/feature/timeout_feature.py +78 -0
- package/project/.sdk/tm/py/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/py/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/py/test/feature_harness.py +336 -0
- package/project/.sdk/tm/py/test/test_feature.py +807 -0
- package/project/.sdk/tm/py/test/test_netsim.py +52 -0
- package/project/.sdk/tm/py/test/test_pipeline.py +606 -0
- package/project/.sdk/tm/py/utility/feature_add.py +25 -1
- package/project/.sdk/tm/py/utility/make_error.py +8 -0
- package/project/.sdk/tm/py/utility/make_options.py +32 -0
- package/project/.sdk/tm/py/utility/make_point.py +8 -2
- package/project/.sdk/tm/py/utility/make_request.py +6 -2
- package/project/.sdk/tm/py/utility/make_response.py +6 -2
- package/project/.sdk/tm/py/utility/make_result.py +6 -2
- package/project/.sdk/tm/py/utility/make_spec.py +6 -2
- package/project/.sdk/tm/rb/core/context.rb +2 -0
- package/project/.sdk/tm/rb/core/control.rb +5 -1
- package/project/.sdk/tm/rb/core/result.rb +2 -1
- package/project/.sdk/tm/rb/feature/audit_feature.rb +103 -0
- package/project/.sdk/tm/rb/feature/base_feature.rb +5 -0
- package/project/.sdk/tm/rb/feature/cache_feature.rb +133 -0
- package/project/.sdk/tm/rb/feature/clienttrack_feature.rb +91 -0
- package/project/.sdk/tm/rb/feature/debug_feature.rb +138 -0
- package/project/.sdk/tm/rb/feature/idempotency_feature.rb +78 -0
- package/project/.sdk/tm/rb/feature/metrics_feature.rb +91 -0
- package/project/.sdk/tm/rb/feature/netsim_feature.rb +167 -0
- package/project/.sdk/tm/rb/feature/paging_feature.rb +120 -0
- package/project/.sdk/tm/rb/feature/proxy_feature.rb +93 -0
- package/project/.sdk/tm/rb/feature/ratelimit_feature.rb +95 -0
- package/project/.sdk/tm/rb/feature/rbac_feature.rb +96 -0
- package/project/.sdk/tm/rb/feature/retry_feature.rb +116 -0
- package/project/.sdk/tm/rb/feature/streaming_feature.rb +85 -0
- package/project/.sdk/tm/rb/feature/telemetry_feature.rb +122 -0
- package/project/.sdk/tm/rb/feature/test_feature.rb +65 -1
- package/project/.sdk/tm/rb/feature/timeout_feature.rb +74 -0
- package/project/.sdk/tm/rb/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/rb/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/rb/test/feature_test.rb +1031 -0
- package/project/.sdk/tm/rb/test/netsim_test.rb +48 -0
- package/project/.sdk/tm/rb/test/pipeline_test.rb +584 -0
- package/project/.sdk/tm/rb/utility/feature_add.rb +28 -1
- package/project/.sdk/tm/rb/utility/make_error.rb +8 -0
- package/project/.sdk/tm/rb/utility/make_options.rb +35 -0
- package/project/.sdk/tm/rb/utility/make_point.rb +7 -1
- package/project/.sdk/tm/rust/LICENSE +22 -0
- package/project/.sdk/tm/rust/Makefile +41 -0
- package/project/.sdk/tm/rust/VERSION +1 -0
- package/project/.sdk/tm/rust/core/context.rs +320 -0
- package/project/.sdk/tm/rust/core/control.rs +37 -0
- package/project/.sdk/tm/rust/core/helpers.rs +168 -0
- package/project/.sdk/tm/rust/core/mod.rs +18 -0
- package/project/.sdk/tm/rust/core/operation.rs +35 -0
- package/project/.sdk/tm/rust/core/point.rs +68 -0
- package/project/.sdk/tm/rust/core/response.rs +38 -0
- package/project/.sdk/tm/rust/core/result.rs +90 -0
- package/project/.sdk/tm/rust/core/spec.rs +109 -0
- package/project/.sdk/tm/rust/core/types.rs +105 -0
- package/project/.sdk/tm/rust/core/utility_type.rs +184 -0
- package/project/.sdk/tm/rust/feature/audit.rs +138 -0
- package/project/.sdk/tm/rust/feature/base.rs +49 -0
- package/project/.sdk/tm/rust/feature/cache.rs +198 -0
- package/project/.sdk/tm/rust/feature/clienttrack.rs +154 -0
- package/project/.sdk/tm/rust/feature/debug.rs +188 -0
- package/project/.sdk/tm/rust/feature/idempotency.rs +139 -0
- package/project/.sdk/tm/rust/feature/log.rs +114 -0
- package/project/.sdk/tm/rust/feature/metrics.rs +136 -0
- package/project/.sdk/tm/rust/feature/mod.rs +24 -0
- package/project/.sdk/tm/rust/feature/netsim.rs +233 -0
- package/project/.sdk/tm/rust/feature/paging.rs +209 -0
- package/project/.sdk/tm/rust/feature/proxy.rs +165 -0
- package/project/.sdk/tm/rust/feature/ratelimit.rs +116 -0
- package/project/.sdk/tm/rust/feature/rbac.rs +152 -0
- package/project/.sdk/tm/rust/feature/retry.rs +190 -0
- package/project/.sdk/tm/rust/feature/streaming.rs +124 -0
- package/project/.sdk/tm/rust/feature/support.rs +145 -0
- package/project/.sdk/tm/rust/feature/telemetry.rs +185 -0
- package/project/.sdk/tm/rust/feature/test.rs +397 -0
- package/project/.sdk/tm/rust/feature/timeout.rs +103 -0
- package/project/.sdk/tm/rust/src/feature/README.md +1 -0
- package/project/.sdk/tm/rust/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/rust/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/rust/tests/common/mod.rs +969 -0
- package/project/.sdk/tm/rust/tests/custom_utility_test.rs +69 -0
- package/project/.sdk/tm/rust/tests/feature_test.rs +1864 -0
- package/project/.sdk/tm/rust/tests/netsim_test.rs +78 -0
- package/project/.sdk/tm/rust/tests/pipeline_test.rs +699 -0
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +999 -0
- package/project/.sdk/tm/rust/tests/sdk-test-control.json +19 -0
- package/project/.sdk/tm/rust/tests/struct_runner/mod.rs +424 -0
- package/project/.sdk/tm/rust/tests/struct_utility_test.rs +733 -0
- package/project/.sdk/tm/rust/utility/clean.rs +13 -0
- package/project/.sdk/tm/rust/utility/done.rs +31 -0
- package/project/.sdk/tm/rust/utility/feature_add.rs +46 -0
- package/project/.sdk/tm/rust/utility/feature_hook.rs +18 -0
- package/project/.sdk/tm/rust/utility/feature_init.rs +26 -0
- package/project/.sdk/tm/rust/utility/fetcher.rs +142 -0
- package/project/.sdk/tm/rust/utility/jsonparse.rs +211 -0
- package/project/.sdk/tm/rust/utility/make_context.rs +7 -0
- package/project/.sdk/tm/rust/utility/make_error.rs +79 -0
- package/project/.sdk/tm/rust/utility/make_fetch_def.rs +42 -0
- package/project/.sdk/tm/rust/utility/make_options.rs +175 -0
- package/project/.sdk/tm/rust/utility/make_point.rs +116 -0
- package/project/.sdk/tm/rust/utility/make_request.rs +73 -0
- package/project/.sdk/tm/rust/utility/make_response.rs +56 -0
- package/project/.sdk/tm/rust/utility/make_result.rs +64 -0
- package/project/.sdk/tm/rust/utility/make_spec.rs +70 -0
- package/project/.sdk/tm/rust/utility/make_url.rs +83 -0
- package/project/.sdk/tm/rust/utility/mod.rs +36 -0
- package/project/.sdk/tm/rust/utility/param.rs +67 -0
- package/project/.sdk/tm/rust/utility/prepare_auth.rs +65 -0
- package/project/.sdk/tm/rust/utility/prepare_body.rs +14 -0
- package/project/.sdk/tm/rust/utility/prepare_headers.rs +23 -0
- package/project/.sdk/tm/rust/utility/prepare_method.rs +18 -0
- package/project/.sdk/tm/rust/utility/prepare_params.rs +33 -0
- package/project/.sdk/tm/rust/utility/prepare_path.rs +17 -0
- package/project/.sdk/tm/rust/utility/prepare_query.rs +47 -0
- package/project/.sdk/tm/rust/utility/result_basic.rs +35 -0
- package/project/.sdk/tm/rust/utility/result_body.rs +26 -0
- package/project/.sdk/tm/rust/utility/result_headers.rs +24 -0
- package/project/.sdk/tm/rust/utility/transform_request.rs +31 -0
- package/project/.sdk/tm/rust/utility/transform_response.rs +55 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/consts.rs +122 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/major.rs +2688 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/mini.rs +1081 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/mod.rs +70 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/ordered_map.rs +159 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/re.rs +1229 -0
- package/project/.sdk/tm/rust/utility/voxgigstruct/value.rs +372 -0
- package/project/.sdk/tm/scala/LICENSE +22 -0
- package/project/.sdk/tm/scala/Makefile +24 -0
- package/project/.sdk/tm/scala/VERSION +1 -0
- package/project/.sdk/tm/scala/core/Context.scala +160 -0
- package/project/.sdk/tm/scala/core/Contracts.scala +76 -0
- package/project/.sdk/tm/scala/core/Control.scala +23 -0
- package/project/.sdk/tm/scala/core/Helpers.scala +38 -0
- package/project/.sdk/tm/scala/core/Operation.scala +37 -0
- package/project/.sdk/tm/scala/core/Point.scala +44 -0
- package/project/.sdk/tm/scala/core/Response.scala +37 -0
- package/project/.sdk/tm/scala/core/Result.scala +42 -0
- package/project/.sdk/tm/scala/core/SdkClient.scala +220 -0
- package/project/.sdk/tm/scala/core/SdkError.scala +15 -0
- package/project/.sdk/tm/scala/core/Spec.scala +39 -0
- package/project/.sdk/tm/scala/core/Types.scala +31 -0
- package/project/.sdk/tm/scala/core/Utility.scala +85 -0
- package/project/.sdk/tm/scala/feature/AuditFeature.scala +101 -0
- package/project/.sdk/tm/scala/feature/BaseFeature.scala +21 -0
- package/project/.sdk/tm/scala/feature/CacheFeature.scala +181 -0
- package/project/.sdk/tm/scala/feature/ClienttrackFeature.scala +93 -0
- package/project/.sdk/tm/scala/feature/DebugFeature.scala +149 -0
- package/project/.sdk/tm/scala/feature/FeatureOptions.scala +111 -0
- package/project/.sdk/tm/scala/feature/IdempotencyFeature.scala +106 -0
- package/project/.sdk/tm/scala/feature/LogFeature.scala +64 -0
- package/project/.sdk/tm/scala/feature/MetricsFeature.scala +105 -0
- package/project/.sdk/tm/scala/feature/NetsimFeature.scala +134 -0
- package/project/.sdk/tm/scala/feature/PagingFeature.scala +170 -0
- package/project/.sdk/tm/scala/feature/ProxyFeature.scala +113 -0
- package/project/.sdk/tm/scala/feature/RatelimitFeature.scala +58 -0
- package/project/.sdk/tm/scala/feature/RbacFeature.scala +90 -0
- package/project/.sdk/tm/scala/feature/RetryFeature.scala +104 -0
- package/project/.sdk/tm/scala/feature/StreamingFeature.scala +98 -0
- package/project/.sdk/tm/scala/feature/TelemetryFeature.scala +129 -0
- package/project/.sdk/tm/scala/feature/TestFeature.scala +253 -0
- package/project/.sdk/tm/scala/feature/TimeoutFeature.scala +57 -0
- package/project/.sdk/tm/scala/sdktest/SdkTestMain.scala +766 -0
- package/project/.sdk/tm/scala/sdktest/SdkTestSupport.scala +93 -0
- package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +0 -0
- package/project/.sdk/tm/scala/sdktest/sdk-test-control.json +19 -0
- package/project/.sdk/tm/scala/src/feature/README.md +1 -0
- package/project/.sdk/tm/scala/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/scala/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/scala/utility/FeatureUtils.scala +68 -0
- package/project/.sdk/tm/scala/utility/Fetcher.scala +129 -0
- package/project/.sdk/tm/scala/utility/Json.java +268 -0
- package/project/.sdk/tm/scala/utility/Make.scala +463 -0
- package/project/.sdk/tm/scala/utility/MakeSpec.scala +49 -0
- package/project/.sdk/tm/scala/utility/Misc.scala +68 -0
- package/project/.sdk/tm/scala/utility/Prepare.scala +142 -0
- package/project/.sdk/tm/scala/utility/Register.scala +38 -0
- package/project/.sdk/tm/scala/utility/Results.scala +63 -0
- package/project/.sdk/tm/scala/utility/StructUtility.scala +29 -0
- package/project/.sdk/tm/scala/utility/Transform.scala +52 -0
- package/project/.sdk/tm/scala/utility/struct/Struct.java +3550 -0
- package/project/.sdk/tm/scala/utility/struct/voxgig_struct.scala +1833 -0
- package/project/.sdk/tm/swift/LICENSE +22 -0
- package/project/.sdk/tm/swift/Makefile +41 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +113 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +260 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +111 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/JSON.swift +327 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Merge.swift +55 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +601 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/OrderedDictionary.swift +79 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Path.swift +157 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Select.swift +259 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Transform.swift +462 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +378 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Value.swift +184 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Walk.swift +44 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Context.swift +161 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Control.swift +20 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Operation.swift +27 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Point.swift +37 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Response.swift +29 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Result.swift +41 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Spec.swift +36 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Support.swift +98 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Types.swift +25 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Utility.swift +81 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/AuditFeature.swift +99 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/BaseFeature.swift +60 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/CacheFeature.swift +164 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ClienttrackFeature.swift +95 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/DebugFeature.swift +126 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/FeatureOptions.swift +96 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/IdempotencyFeature.swift +80 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/LogFeature.swift +69 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/MetricsFeature.swift +103 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/NetsimFeature.swift +177 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/PagingFeature.swift +154 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ProxyFeature.swift +122 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RatelimitFeature.swift +79 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RbacFeature.swift +103 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/RetryFeature.swift +150 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/StreamingFeature.swift +82 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TelemetryFeature.swift +119 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TestFeature.swift +257 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TimeoutFeature.swift +83 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Feature.swift +56 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Fetcher.swift +107 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Make.swift +321 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeError.swift +56 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +151 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +157 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Register.swift +40 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/ResultUtil.swift +107 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/CustomUtilityTest.swift +44 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/ExistsTest.swift +12 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/FeatureTest.swift +1049 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/NetsimTest.swift +50 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PipelineTest.swift +398 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +750 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +237 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +523 -0
- package/project/.sdk/tm/swift/VERSION +1 -0
- package/project/.sdk/tm/swift/src/feature/README.md +6 -0
- package/project/.sdk/tm/swift/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/swift/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/ts/Makefile +6 -1
- package/project/.sdk/tm/ts/src/feature/audit/AuditFeature.ts +98 -0
- package/project/.sdk/tm/ts/src/feature/cache/CacheFeature.ts +152 -0
- package/project/.sdk/tm/ts/src/feature/clienttrack/ClienttrackFeature.ts +106 -0
- package/project/.sdk/tm/ts/src/feature/debug/DebugFeature.ts +134 -0
- package/project/.sdk/tm/ts/src/feature/idempotency/IdempotencyFeature.ts +97 -0
- package/project/.sdk/tm/ts/src/feature/metrics/MetricsFeature.ts +104 -0
- package/project/.sdk/tm/ts/src/feature/netsim/NetsimFeature.ts +189 -0
- package/project/.sdk/tm/ts/src/feature/paging/PagingFeature.ts +141 -0
- package/project/.sdk/tm/ts/src/feature/proxy/ProxyFeature.ts +112 -0
- package/project/.sdk/tm/ts/src/feature/ratelimit/RatelimitFeature.ts +108 -0
- package/project/.sdk/tm/ts/src/feature/rbac/RbacFeature.ts +104 -0
- package/project/.sdk/tm/ts/src/feature/retry/RetryFeature.ts +160 -0
- package/project/.sdk/tm/ts/src/feature/streaming/StreamingFeature.ts +98 -0
- package/project/.sdk/tm/ts/src/feature/telemetry/TelemetryFeature.ts +130 -0
- package/project/.sdk/tm/ts/src/feature/test/TestFeature.ts +58 -1
- package/project/.sdk/tm/ts/src/feature/timeout/TimeoutFeature.ts +103 -0
- package/project/.sdk/tm/ts/src/utility/FeatureHookUtility.ts +4 -1
- package/project/.sdk/tm/ts/src/utility/MakeErrorUtility.ts +9 -0
- package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +31 -1
- package/project/.sdk/tm/ts/test/feature/harness.ts +293 -0
- package/project/.sdk/tm/ts/test/feature.test.ts +772 -0
- package/project/.sdk/tm/ts/test/netsim.test.ts +43 -0
- package/project/.sdk/tm/ts/test/pipeline.test.ts +382 -0
- package/project/.sdk/tm/zig/LICENSE +21 -0
- package/project/.sdk/tm/zig/Makefile +31 -0
- package/project/.sdk/tm/zig/VERSION +1 -0
- package/project/.sdk/tm/zig/build.zig +58 -0
- package/project/.sdk/tm/zig/build.zig.zon +11 -0
- package/project/.sdk/tm/zig/core/context.zig +258 -0
- package/project/.sdk/tm/zig/core/control.zig +26 -0
- package/project/.sdk/tm/zig/core/error.zig +28 -0
- package/project/.sdk/tm/zig/core/helpers.zig +326 -0
- package/project/.sdk/tm/zig/core/mem.zig +20 -0
- package/project/.sdk/tm/zig/core/operation.zig +34 -0
- package/project/.sdk/tm/zig/core/point.zig +63 -0
- package/project/.sdk/tm/zig/core/response.zig +32 -0
- package/project/.sdk/tm/zig/core/result.zig +73 -0
- package/project/.sdk/tm/zig/core/spec.zig +68 -0
- package/project/.sdk/tm/zig/core/types.zig +101 -0
- package/project/.sdk/tm/zig/core/utility.zig +1115 -0
- package/project/.sdk/tm/zig/feature/audit.zig +131 -0
- package/project/.sdk/tm/zig/feature/base.zig +52 -0
- package/project/.sdk/tm/zig/feature/cache.zig +216 -0
- package/project/.sdk/tm/zig/feature/clienttrack.zig +129 -0
- package/project/.sdk/tm/zig/feature/debug.zig +191 -0
- package/project/.sdk/tm/zig/feature/idempotency.zig +121 -0
- package/project/.sdk/tm/zig/feature/log.zig +93 -0
- package/project/.sdk/tm/zig/feature/metrics.zig +145 -0
- package/project/.sdk/tm/zig/feature/netsim.zig +186 -0
- package/project/.sdk/tm/zig/feature/paging.zig +201 -0
- package/project/.sdk/tm/zig/feature/proxy.zig +180 -0
- package/project/.sdk/tm/zig/feature/ratelimit.zig +123 -0
- package/project/.sdk/tm/zig/feature/rbac.zig +126 -0
- package/project/.sdk/tm/zig/feature/retry.zig +167 -0
- package/project/.sdk/tm/zig/feature/streaming.zig +127 -0
- package/project/.sdk/tm/zig/feature/support.zig +128 -0
- package/project/.sdk/tm/zig/feature/telemetry.zig +165 -0
- package/project/.sdk/tm/zig/feature/test.zig +315 -0
- package/project/.sdk/tm/zig/feature/timeout.zig +105 -0
- package/project/.sdk/tm/zig/root.zig +74 -0
- package/project/.sdk/tm/zig/src/feature/README.md +1 -0
- package/project/.sdk/tm/zig/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/zig/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/zig/test/feature_test.zig +1045 -0
- package/project/.sdk/tm/zig/test/fh.zig +531 -0
- package/project/.sdk/tm/zig/test/gotcha_test.zig +230 -0
- package/project/.sdk/tm/zig/test/pipeline_test.zig +493 -0
- package/project/.sdk/tm/zig/test/primary_utility_test.zig +346 -0
- package/project/.sdk/tm/zig/test/struct_corpus.zig +1145 -0
- package/project/.sdk/tm/zig/test/struct_runner.zig +226 -0
- package/project/.sdk/tm/zig/utility/jsonparse.zig +13 -0
- package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +779 -0
- package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +4400 -0
- package/src/cmp/AgentGuide.ts +150 -0
- package/src/cmp/AgentGuideContent.ts +286 -0
- package/src/cmp/AgentGuideFeature.ts +107 -0
- package/src/cmp/AgentGuideTop.ts +121 -0
- package/src/cmp/ReadmeTop.ts +16 -3
- package/src/sdkgen.ts +6 -0
|
@@ -0,0 +1,1971 @@
|
|
|
1
|
+
/* Copyright (c) 2025-2026 Voxgig Ltd. MIT LICENSE.
|
|
2
|
+
*
|
|
3
|
+
* Minor utilities and helpers, plus walk/merge/getpath/setpath.
|
|
4
|
+
* The inject / transform / validate / select machinery lives in inject.c.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#include "voxgig_struct.h"
|
|
8
|
+
|
|
9
|
+
#include <ctype.h>
|
|
10
|
+
#include <limits.h>
|
|
11
|
+
#include <math.h>
|
|
12
|
+
#include <stdarg.h>
|
|
13
|
+
#include <stdio.h>
|
|
14
|
+
#include <stdlib.h>
|
|
15
|
+
#include <string.h>
|
|
16
|
+
|
|
17
|
+
/* ===========================================================================
|
|
18
|
+
* Static helpers
|
|
19
|
+
* ===========================================================================*/
|
|
20
|
+
|
|
21
|
+
static char* xstrdup_s(const char* s) {
|
|
22
|
+
if (!s)
|
|
23
|
+
s = "";
|
|
24
|
+
size_t n = strlen(s);
|
|
25
|
+
char* o = (char*)malloc(n + 1);
|
|
26
|
+
if (!o)
|
|
27
|
+
abort();
|
|
28
|
+
memcpy(o, s, n + 1);
|
|
29
|
+
return o;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static char* xstrndup_s(const char* s, size_t n) {
|
|
33
|
+
char* o = (char*)malloc(n + 1);
|
|
34
|
+
if (!o)
|
|
35
|
+
abort();
|
|
36
|
+
if (n)
|
|
37
|
+
memcpy(o, s, n);
|
|
38
|
+
o[n] = '\0';
|
|
39
|
+
return o;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* "intdup" — format int as string. Caller must free. */
|
|
43
|
+
static char* intstr(int64_t v) {
|
|
44
|
+
char buf[32];
|
|
45
|
+
snprintf(buf, sizeof(buf), "%lld", (long long)v);
|
|
46
|
+
return xstrdup_s(buf);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* doublestr: format double, removing trailing zeros. */
|
|
50
|
+
static char* doublestr(double v) {
|
|
51
|
+
char buf[64];
|
|
52
|
+
/* Use %g for compact representation. */
|
|
53
|
+
if (isnan(v)) {
|
|
54
|
+
return xstrdup_s("null");
|
|
55
|
+
}
|
|
56
|
+
if (isinf(v)) {
|
|
57
|
+
return xstrdup_s(v < 0 ? "-Infinity" : "Infinity");
|
|
58
|
+
}
|
|
59
|
+
if (floor(v) == v && fabs(v) < 1e15) {
|
|
60
|
+
snprintf(buf, sizeof(buf), "%lld", (long long)v);
|
|
61
|
+
} else {
|
|
62
|
+
snprintf(buf, sizeof(buf), "%g", v);
|
|
63
|
+
}
|
|
64
|
+
return xstrdup_s(buf);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* parseInt-style: returns true if the string represents an integer (possibly
|
|
68
|
+
* with leading sign). Outputs the integer in *out.
|
|
69
|
+
*/
|
|
70
|
+
static bool parse_intstr(const char* s, size_t n, int64_t* out) {
|
|
71
|
+
if (!s || n == 0)
|
|
72
|
+
return false;
|
|
73
|
+
size_t i = 0;
|
|
74
|
+
int sign = 1;
|
|
75
|
+
if (s[0] == '-') {
|
|
76
|
+
sign = -1;
|
|
77
|
+
i = 1;
|
|
78
|
+
} else if (s[0] == '+') {
|
|
79
|
+
i = 1;
|
|
80
|
+
}
|
|
81
|
+
if (i >= n)
|
|
82
|
+
return false;
|
|
83
|
+
int64_t v = 0;
|
|
84
|
+
for (; i < n; i++) {
|
|
85
|
+
if (s[i] < '0' || s[i] > '9')
|
|
86
|
+
return false;
|
|
87
|
+
v = v * 10 + (s[i] - '0');
|
|
88
|
+
}
|
|
89
|
+
*out = sign * v;
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* R_INTEGER_KEY: ^[-0-9]+$ — goes through the vendored regex engine so the
|
|
94
|
+
call sites read the same as the canonical TS. */
|
|
95
|
+
static voxgig_regex* R_INTEGER_KEY_re(void) {
|
|
96
|
+
static voxgig_regex* re = NULL;
|
|
97
|
+
if (!re)
|
|
98
|
+
re = voxgig_re_compile("^[-0-9]+$");
|
|
99
|
+
return re;
|
|
100
|
+
}
|
|
101
|
+
static bool match_integer_key(const char* s, size_t n) {
|
|
102
|
+
if (!s || n == 0)
|
|
103
|
+
return false;
|
|
104
|
+
char buf[64];
|
|
105
|
+
char* tmp = NULL;
|
|
106
|
+
const char* z;
|
|
107
|
+
if (n < sizeof(buf)) {
|
|
108
|
+
memcpy(buf, s, n);
|
|
109
|
+
buf[n] = '\0';
|
|
110
|
+
z = buf;
|
|
111
|
+
} else {
|
|
112
|
+
tmp = (char*)malloc(n + 1);
|
|
113
|
+
memcpy(tmp, s, n);
|
|
114
|
+
tmp[n] = '\0';
|
|
115
|
+
z = tmp;
|
|
116
|
+
}
|
|
117
|
+
bool ok = voxgig_re_test_re(R_INTEGER_KEY_re(), z);
|
|
118
|
+
free(tmp);
|
|
119
|
+
return ok;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* ===========================================================================
|
|
123
|
+
* String vector
|
|
124
|
+
* ===========================================================================*/
|
|
125
|
+
|
|
126
|
+
void voxgig_strvec_init(voxgig_strvec* v) {
|
|
127
|
+
v->len = 0;
|
|
128
|
+
v->cap = 0;
|
|
129
|
+
v->data = NULL;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
void voxgig_strvec_free(voxgig_strvec* v) {
|
|
133
|
+
if (!v)
|
|
134
|
+
return;
|
|
135
|
+
for (size_t i = 0; i < v->len; i++)
|
|
136
|
+
free(v->data[i]);
|
|
137
|
+
free(v->data);
|
|
138
|
+
v->data = NULL;
|
|
139
|
+
v->len = 0;
|
|
140
|
+
v->cap = 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
void voxgig_strvec_clear(voxgig_strvec* v) {
|
|
144
|
+
for (size_t i = 0; i < v->len; i++)
|
|
145
|
+
free(v->data[i]);
|
|
146
|
+
v->len = 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
static void strvec_reserve(voxgig_strvec* v, size_t need) {
|
|
150
|
+
if (v->cap >= need)
|
|
151
|
+
return;
|
|
152
|
+
size_t nc = v->cap == 0 ? 8 : v->cap;
|
|
153
|
+
while (nc < need)
|
|
154
|
+
nc *= 2;
|
|
155
|
+
char** nd = (char**)realloc(v->data, nc * sizeof(char*));
|
|
156
|
+
if (!nd)
|
|
157
|
+
abort();
|
|
158
|
+
v->data = nd;
|
|
159
|
+
v->cap = nc;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
void voxgig_strvec_push(voxgig_strvec* v, const char* s) {
|
|
163
|
+
voxgig_strvec_push_n(v, s, s ? strlen(s) : 0);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
void voxgig_strvec_push_n(voxgig_strvec* v, const char* s, size_t n) {
|
|
167
|
+
strvec_reserve(v, v->len + 1);
|
|
168
|
+
v->data[v->len++] = xstrndup_s(s ? s : "", n);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
void voxgig_strvec_resize(voxgig_strvec* v, size_t n) {
|
|
172
|
+
if (n < v->len) {
|
|
173
|
+
for (size_t i = n; i < v->len; i++)
|
|
174
|
+
free(v->data[i]);
|
|
175
|
+
v->len = n;
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (n > v->len) {
|
|
179
|
+
strvec_reserve(v, n);
|
|
180
|
+
for (size_t i = v->len; i < n; i++)
|
|
181
|
+
v->data[i] = xstrdup_s("");
|
|
182
|
+
v->len = n;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
void voxgig_strvec_set(voxgig_strvec* v, size_t i, const char* s) {
|
|
187
|
+
if (i >= v->len)
|
|
188
|
+
voxgig_strvec_resize(v, i + 1);
|
|
189
|
+
free(v->data[i]);
|
|
190
|
+
v->data[i] = xstrdup_s(s ? s : "");
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
void voxgig_strvec_copy(voxgig_strvec* dst, const voxgig_strvec* src) {
|
|
194
|
+
voxgig_strvec_clear(dst);
|
|
195
|
+
for (size_t i = 0; i < src->len; i++)
|
|
196
|
+
voxgig_strvec_push(dst, src->data[i]);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* ===========================================================================
|
|
200
|
+
* Type-name table (matches TS TYPENAME).
|
|
201
|
+
* ===========================================================================*/
|
|
202
|
+
|
|
203
|
+
static const char* TYPENAME_TABLE[26] = {
|
|
204
|
+
"any", "nil", "boolean", "decimal", "integer", "number", "string", "function", "symbol",
|
|
205
|
+
"null", "", "", "", "", "", "", "", "list",
|
|
206
|
+
"map", "instance", "", "", "", "", "scalar", "node",
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
static int clz32(uint32_t x) {
|
|
210
|
+
if (x == 0)
|
|
211
|
+
return 32;
|
|
212
|
+
int n = 0;
|
|
213
|
+
while ((x & 0x80000000u) == 0) {
|
|
214
|
+
n++;
|
|
215
|
+
x <<= 1;
|
|
216
|
+
}
|
|
217
|
+
return n;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const char* voxgig_typename(int t) {
|
|
221
|
+
int idx = clz32((uint32_t)t);
|
|
222
|
+
if (idx < 0 || idx >= 26)
|
|
223
|
+
return "any";
|
|
224
|
+
const char* s = TYPENAME_TABLE[idx];
|
|
225
|
+
return (s && *s) ? s : "any";
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* ===========================================================================
|
|
229
|
+
* typify
|
|
230
|
+
* ===========================================================================*/
|
|
231
|
+
|
|
232
|
+
int voxgig_typify(const voxgig_value* v) {
|
|
233
|
+
if (!v || voxgig_is_undef(v))
|
|
234
|
+
return VOXGIG_T_NOVAL;
|
|
235
|
+
if (voxgig_is_null(v))
|
|
236
|
+
return VOXGIG_T_SCALAR | VOXGIG_T_NULL;
|
|
237
|
+
if (voxgig_is_bool(v))
|
|
238
|
+
return VOXGIG_T_SCALAR | VOXGIG_T_BOOLEAN;
|
|
239
|
+
if (voxgig_is_int(v))
|
|
240
|
+
return VOXGIG_T_SCALAR | VOXGIG_T_NUMBER | VOXGIG_T_INTEGER;
|
|
241
|
+
if (voxgig_is_double(v)) {
|
|
242
|
+
double d = voxgig_as_double(v);
|
|
243
|
+
if (isnan(d))
|
|
244
|
+
return VOXGIG_T_NOVAL;
|
|
245
|
+
return VOXGIG_T_SCALAR | VOXGIG_T_NUMBER | VOXGIG_T_DECIMAL;
|
|
246
|
+
}
|
|
247
|
+
if (voxgig_is_string(v))
|
|
248
|
+
return VOXGIG_T_SCALAR | VOXGIG_T_STRING;
|
|
249
|
+
if (voxgig_is_list(v))
|
|
250
|
+
return VOXGIG_T_NODE | VOXGIG_T_LIST;
|
|
251
|
+
if (voxgig_is_map(v))
|
|
252
|
+
return VOXGIG_T_NODE | VOXGIG_T_MAP;
|
|
253
|
+
if (voxgig_is_func(v))
|
|
254
|
+
return VOXGIG_T_SCALAR | VOXGIG_T_FUNCTION;
|
|
255
|
+
if (voxgig_is_sentinel(v))
|
|
256
|
+
return VOXGIG_T_NODE | VOXGIG_T_MAP;
|
|
257
|
+
return VOXGIG_T_ANY;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* ===========================================================================
|
|
261
|
+
* Predicates (voxgig_*)
|
|
262
|
+
* ===========================================================================*/
|
|
263
|
+
|
|
264
|
+
bool voxgig_isnode(const voxgig_value* v) {
|
|
265
|
+
return voxgig_is_node(v);
|
|
266
|
+
}
|
|
267
|
+
bool voxgig_ismap(const voxgig_value* v) {
|
|
268
|
+
return voxgig_is_map(v);
|
|
269
|
+
}
|
|
270
|
+
bool voxgig_islist(const voxgig_value* v) {
|
|
271
|
+
return voxgig_is_list(v);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
bool voxgig_iskey(const voxgig_value* v) {
|
|
275
|
+
if (voxgig_is_string(v))
|
|
276
|
+
return voxgig_string_len(v) > 0;
|
|
277
|
+
return voxgig_is_int(v) || voxgig_is_double(v);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
bool voxgig_isempty(const voxgig_value* v) {
|
|
281
|
+
if (!v || voxgig_is_undef(v) || voxgig_is_null(v))
|
|
282
|
+
return true;
|
|
283
|
+
if (voxgig_is_string(v))
|
|
284
|
+
return voxgig_string_len(v) == 0;
|
|
285
|
+
if (voxgig_is_list(v))
|
|
286
|
+
return voxgig_list_len(voxgig_as_list(v)) == 0;
|
|
287
|
+
if (voxgig_is_map(v))
|
|
288
|
+
return voxgig_map_len(voxgig_as_map(v)) == 0;
|
|
289
|
+
return false;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
bool voxgig_isfunc(const voxgig_value* v) {
|
|
293
|
+
return voxgig_is_func(v);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* ===========================================================================
|
|
297
|
+
* getdef
|
|
298
|
+
* ===========================================================================*/
|
|
299
|
+
|
|
300
|
+
voxgig_value* voxgig_getdef(voxgig_value* val, voxgig_value* alt) {
|
|
301
|
+
if (!val || voxgig_is_undef(val))
|
|
302
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
303
|
+
return voxgig_retain(val);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* ===========================================================================
|
|
307
|
+
* size
|
|
308
|
+
* ===========================================================================*/
|
|
309
|
+
|
|
310
|
+
int64_t voxgig_size(const voxgig_value* v) {
|
|
311
|
+
if (!v)
|
|
312
|
+
return 0;
|
|
313
|
+
if (voxgig_is_list(v))
|
|
314
|
+
return (int64_t)voxgig_list_len(voxgig_as_list(v));
|
|
315
|
+
if (voxgig_is_map(v))
|
|
316
|
+
return (int64_t)voxgig_map_len(voxgig_as_map(v));
|
|
317
|
+
if (voxgig_is_string(v))
|
|
318
|
+
return (int64_t)voxgig_string_len(v);
|
|
319
|
+
if (voxgig_is_int(v))
|
|
320
|
+
return (int64_t)floor((double)voxgig_as_int(v));
|
|
321
|
+
if (voxgig_is_double(v))
|
|
322
|
+
return (int64_t)floor(voxgig_as_double(v));
|
|
323
|
+
if (voxgig_is_bool(v))
|
|
324
|
+
return voxgig_as_bool(v) ? 1 : 0;
|
|
325
|
+
return 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/* ===========================================================================
|
|
329
|
+
* slice
|
|
330
|
+
* ===========================================================================*/
|
|
331
|
+
|
|
332
|
+
voxgig_value* voxgig_slice(voxgig_value* v, voxgig_value* start, voxgig_value* end, bool mutate) {
|
|
333
|
+
if (voxgig_is_number(v)) {
|
|
334
|
+
int64_t s =
|
|
335
|
+
(voxgig_is_int(start) || voxgig_is_double(start)) ? voxgig_as_int(start) : INT64_MIN / 2;
|
|
336
|
+
int64_t e = (voxgig_is_int(end) || voxgig_is_double(end)) ? voxgig_as_int(end) : INT64_MAX / 2;
|
|
337
|
+
e -= 1;
|
|
338
|
+
int64_t val = voxgig_as_int(v);
|
|
339
|
+
if (val < s)
|
|
340
|
+
val = s;
|
|
341
|
+
if (val > e)
|
|
342
|
+
val = e;
|
|
343
|
+
return voxgig_new_int(val);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
int64_t vlen = voxgig_size(v);
|
|
347
|
+
bool has_start = (start != NULL && !voxgig_is_undef(start));
|
|
348
|
+
bool has_end = (end != NULL && !voxgig_is_undef(end));
|
|
349
|
+
|
|
350
|
+
int64_t s = has_start ? voxgig_as_int(start) : -1;
|
|
351
|
+
int64_t e = has_end ? voxgig_as_int(end) : -1;
|
|
352
|
+
|
|
353
|
+
if (has_end && !has_start) {
|
|
354
|
+
s = 0;
|
|
355
|
+
has_start = true;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if (!has_start) {
|
|
359
|
+
/* No start: return as-is (deep clone for safety since canonical returns input). */
|
|
360
|
+
if (voxgig_is_string(v))
|
|
361
|
+
return voxgig_new_string_n(voxgig_as_string(v), voxgig_string_len(v));
|
|
362
|
+
if (voxgig_is_list(v))
|
|
363
|
+
return voxgig_clone(v);
|
|
364
|
+
return voxgig_retain(v);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
if (s < 0) {
|
|
368
|
+
e = vlen + s;
|
|
369
|
+
if (e < 0)
|
|
370
|
+
e = 0;
|
|
371
|
+
s = 0;
|
|
372
|
+
} else if (has_end) {
|
|
373
|
+
if (e < 0) {
|
|
374
|
+
e = vlen + e;
|
|
375
|
+
if (e < 0)
|
|
376
|
+
e = 0;
|
|
377
|
+
} else if (vlen < e) {
|
|
378
|
+
e = vlen;
|
|
379
|
+
}
|
|
380
|
+
} else {
|
|
381
|
+
e = vlen;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
if (vlen < s)
|
|
385
|
+
s = vlen;
|
|
386
|
+
|
|
387
|
+
if (s >= 0 && s <= e && e <= vlen) {
|
|
388
|
+
if (voxgig_is_list(v)) {
|
|
389
|
+
voxgig_list* src = voxgig_as_list(v);
|
|
390
|
+
if (mutate) {
|
|
391
|
+
for (int64_t i = 0, j = s; j < e; i++, j++) {
|
|
392
|
+
voxgig_value* old = src->items[i];
|
|
393
|
+
src->items[i] = voxgig_retain(src->items[j]);
|
|
394
|
+
voxgig_release(old);
|
|
395
|
+
}
|
|
396
|
+
for (int64_t i = (int64_t)src->len - 1; i >= e - s; i--) {
|
|
397
|
+
voxgig_release(src->items[i]);
|
|
398
|
+
}
|
|
399
|
+
src->len = (size_t)(e - s);
|
|
400
|
+
return voxgig_retain(v);
|
|
401
|
+
}
|
|
402
|
+
voxgig_value* out = voxgig_new_list();
|
|
403
|
+
for (int64_t i = s; i < e; i++) {
|
|
404
|
+
voxgig_list_push(voxgig_as_list(out), voxgig_clone(voxgig_list_get(src, (size_t)i)));
|
|
405
|
+
}
|
|
406
|
+
return out;
|
|
407
|
+
}
|
|
408
|
+
if (voxgig_is_string(v)) {
|
|
409
|
+
return voxgig_new_string_n(voxgig_as_string(v) + s, (size_t)(e - s));
|
|
410
|
+
}
|
|
411
|
+
} else {
|
|
412
|
+
if (voxgig_is_list(v)) {
|
|
413
|
+
if (mutate) {
|
|
414
|
+
voxgig_list_clear(voxgig_as_list(v));
|
|
415
|
+
return voxgig_retain(v);
|
|
416
|
+
}
|
|
417
|
+
return voxgig_new_list();
|
|
418
|
+
}
|
|
419
|
+
if (voxgig_is_string(v)) {
|
|
420
|
+
return voxgig_new_string("");
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return voxgig_retain(v);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/* ===========================================================================
|
|
427
|
+
* strkey
|
|
428
|
+
* ===========================================================================*/
|
|
429
|
+
|
|
430
|
+
char* voxgig_strkey(voxgig_value* key) {
|
|
431
|
+
if (!key || voxgig_is_undef(key))
|
|
432
|
+
return xstrdup_s("");
|
|
433
|
+
int t = voxgig_typify(key);
|
|
434
|
+
if (t & VOXGIG_T_STRING)
|
|
435
|
+
return xstrdup_s(voxgig_as_string(key));
|
|
436
|
+
if (t & VOXGIG_T_BOOLEAN)
|
|
437
|
+
return xstrdup_s("");
|
|
438
|
+
if (t & VOXGIG_T_NUMBER) {
|
|
439
|
+
if (voxgig_is_int(key)) {
|
|
440
|
+
return intstr(voxgig_as_int(key));
|
|
441
|
+
}
|
|
442
|
+
double d = voxgig_as_double(key);
|
|
443
|
+
if (d == floor(d))
|
|
444
|
+
return intstr((int64_t)d);
|
|
445
|
+
return intstr((int64_t)floor(d));
|
|
446
|
+
}
|
|
447
|
+
return xstrdup_s("");
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/* ===========================================================================
|
|
451
|
+
* keysof
|
|
452
|
+
* ===========================================================================*/
|
|
453
|
+
|
|
454
|
+
static int qsort_str_cmp(const void* a, const void* b) {
|
|
455
|
+
const char* sa = *(const char* const*)a;
|
|
456
|
+
const char* sb = *(const char* const*)b;
|
|
457
|
+
return strcmp(sa, sb);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
voxgig_strvec voxgig_keysof(voxgig_value* val) {
|
|
461
|
+
voxgig_strvec out;
|
|
462
|
+
voxgig_strvec_init(&out);
|
|
463
|
+
if (!voxgig_is_node(val))
|
|
464
|
+
return out;
|
|
465
|
+
if (voxgig_is_map(val)) {
|
|
466
|
+
voxgig_map* m = voxgig_as_map(val);
|
|
467
|
+
for (size_t i = 0; i < m->len; i++) {
|
|
468
|
+
voxgig_strvec_push_n(&out, m->entries[i].key, m->entries[i].klen);
|
|
469
|
+
}
|
|
470
|
+
if (out.len > 1)
|
|
471
|
+
qsort(out.data, out.len, sizeof(char*), qsort_str_cmp);
|
|
472
|
+
} else {
|
|
473
|
+
voxgig_list* l = voxgig_as_list(val);
|
|
474
|
+
for (size_t i = 0; i < l->len; i++) {
|
|
475
|
+
char* s = intstr((int64_t)i);
|
|
476
|
+
voxgig_strvec_push(&out, s);
|
|
477
|
+
free(s);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
return out;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/* ===========================================================================
|
|
484
|
+
* getelem / getprop / haskey
|
|
485
|
+
* ===========================================================================*/
|
|
486
|
+
|
|
487
|
+
voxgig_value* voxgig_getelem(voxgig_value* val, voxgig_value* key, voxgig_value* alt) {
|
|
488
|
+
if (!val || voxgig_is_undef(val) || !key || voxgig_is_undef(key)) {
|
|
489
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
490
|
+
}
|
|
491
|
+
if (voxgig_is_list(val)) {
|
|
492
|
+
voxgig_list* l = voxgig_as_list(val);
|
|
493
|
+
int64_t nk = 0;
|
|
494
|
+
bool ok = false;
|
|
495
|
+
if (voxgig_is_int(key)) {
|
|
496
|
+
nk = voxgig_as_int(key);
|
|
497
|
+
ok = true;
|
|
498
|
+
} else if (voxgig_is_double(key)) {
|
|
499
|
+
nk = (int64_t)voxgig_as_double(key);
|
|
500
|
+
ok = true;
|
|
501
|
+
} else if (voxgig_is_string(key)) {
|
|
502
|
+
ok = match_integer_key(voxgig_as_string(key), voxgig_string_len(key)) &&
|
|
503
|
+
parse_intstr(voxgig_as_string(key), voxgig_string_len(key), &nk);
|
|
504
|
+
}
|
|
505
|
+
if (!ok) {
|
|
506
|
+
if (alt && voxgig_is_injector(alt)) {
|
|
507
|
+
return alt->as.fn.fn.inj(NULL, alt, "", NULL, alt->as.fn.ud);
|
|
508
|
+
}
|
|
509
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
510
|
+
}
|
|
511
|
+
if (nk < 0)
|
|
512
|
+
nk = (int64_t)l->len + nk;
|
|
513
|
+
if (nk < 0 || nk >= (int64_t)l->len) {
|
|
514
|
+
if (alt && voxgig_is_injector(alt)) {
|
|
515
|
+
return alt->as.fn.fn.inj(NULL, alt, "", NULL, alt->as.fn.ud);
|
|
516
|
+
}
|
|
517
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
518
|
+
}
|
|
519
|
+
voxgig_value* v = voxgig_list_get(l, (size_t)nk);
|
|
520
|
+
/* Group A: null at a slot counts as "no value" — same rule as getprop.
|
|
521
|
+
Canonical TS getelem returns alt when the slot is null/absent. */
|
|
522
|
+
if (v && !voxgig_is_undef(v) && !voxgig_is_null(v))
|
|
523
|
+
return voxgig_retain(v);
|
|
524
|
+
if (alt && voxgig_is_injector(alt)) {
|
|
525
|
+
return alt->as.fn.fn.inj(NULL, alt, "", NULL, alt->as.fn.ud);
|
|
526
|
+
}
|
|
527
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
528
|
+
}
|
|
529
|
+
if (alt && voxgig_is_injector(alt)) {
|
|
530
|
+
return alt->as.fn.fn.inj(NULL, alt, "", NULL, alt->as.fn.ud);
|
|
531
|
+
}
|
|
532
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
voxgig_value* voxgig_getprop(voxgig_value* val, voxgig_value* key, voxgig_value* alt) {
|
|
536
|
+
if (!val || voxgig_is_undef(val) || !key || voxgig_is_undef(key)) {
|
|
537
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
538
|
+
}
|
|
539
|
+
if (voxgig_is_map(val)) {
|
|
540
|
+
char* k = voxgig_strkey(key);
|
|
541
|
+
voxgig_value* v = voxgig_map_get(voxgig_as_map(val), k);
|
|
542
|
+
free(k);
|
|
543
|
+
/* Group A: JSON null at the key is treated as "no value" — same rule as
|
|
544
|
+
absent. Returns alt. Mirrors the canonical TS post-spec semantics. */
|
|
545
|
+
if (v && !voxgig_is_undef(v) && !voxgig_is_null(v))
|
|
546
|
+
return voxgig_retain(v);
|
|
547
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
548
|
+
}
|
|
549
|
+
if (voxgig_is_list(val)) {
|
|
550
|
+
voxgig_list* l = voxgig_as_list(val);
|
|
551
|
+
int64_t nk = 0;
|
|
552
|
+
if (voxgig_is_int(key)) {
|
|
553
|
+
nk = voxgig_as_int(key);
|
|
554
|
+
} else if (voxgig_is_double(key)) {
|
|
555
|
+
nk = (int64_t)voxgig_as_double(key);
|
|
556
|
+
} else if (voxgig_is_string(key)) {
|
|
557
|
+
if (!match_integer_key(voxgig_as_string(key), voxgig_string_len(key)) ||
|
|
558
|
+
!parse_intstr(voxgig_as_string(key), voxgig_string_len(key), &nk)) {
|
|
559
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
560
|
+
}
|
|
561
|
+
} else {
|
|
562
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
563
|
+
}
|
|
564
|
+
if (nk < 0 || nk >= (int64_t)l->len) {
|
|
565
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
566
|
+
}
|
|
567
|
+
voxgig_value* v = voxgig_list_get(l, (size_t)nk);
|
|
568
|
+
/* Group A: null at the slot also returns alt. */
|
|
569
|
+
if (v && !voxgig_is_undef(v) && !voxgig_is_null(v))
|
|
570
|
+
return voxgig_retain(v);
|
|
571
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
572
|
+
}
|
|
573
|
+
return alt ? voxgig_retain(alt) : voxgig_new_undef();
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
bool voxgig_haskey(voxgig_value* val, voxgig_value* key) {
|
|
577
|
+
voxgig_value* v = voxgig_getprop(val, key, NULL);
|
|
578
|
+
/* Group A: null counts as "no value", same rule as getprop. */
|
|
579
|
+
bool out = v && !voxgig_is_undef(v) && !voxgig_is_null(v);
|
|
580
|
+
voxgig_release(v);
|
|
581
|
+
return out;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/* Internal literal lookup. See header. */
|
|
585
|
+
voxgig_value* voxgig_lookup(voxgig_value* val, voxgig_value* key) {
|
|
586
|
+
if (!val || voxgig_is_undef(val) || !key || voxgig_is_undef(key))
|
|
587
|
+
return NULL;
|
|
588
|
+
if (voxgig_is_map(val)) {
|
|
589
|
+
char* k = voxgig_strkey(key);
|
|
590
|
+
voxgig_value* v = voxgig_map_get(voxgig_as_map(val), k);
|
|
591
|
+
free(k);
|
|
592
|
+
return v;
|
|
593
|
+
}
|
|
594
|
+
if (voxgig_is_list(val)) {
|
|
595
|
+
int64_t nk = 0;
|
|
596
|
+
if (voxgig_is_int(key))
|
|
597
|
+
nk = voxgig_as_int(key);
|
|
598
|
+
else if (voxgig_is_double(key))
|
|
599
|
+
nk = (int64_t)voxgig_as_double(key);
|
|
600
|
+
else if (voxgig_is_string(key)) {
|
|
601
|
+
if (!parse_intstr(voxgig_as_string(key), voxgig_string_len(key), &nk))
|
|
602
|
+
return NULL;
|
|
603
|
+
} else
|
|
604
|
+
return NULL;
|
|
605
|
+
voxgig_list* l = voxgig_as_list(val);
|
|
606
|
+
if (nk < 0 || nk >= (int64_t)l->len)
|
|
607
|
+
return NULL;
|
|
608
|
+
return voxgig_list_get(l, (size_t)nk);
|
|
609
|
+
}
|
|
610
|
+
return NULL;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/* ===========================================================================
|
|
614
|
+
* items_v: returns list of [key, value] tuples
|
|
615
|
+
* ===========================================================================*/
|
|
616
|
+
|
|
617
|
+
voxgig_value* voxgig_items_v(voxgig_value* val) {
|
|
618
|
+
voxgig_value* out = voxgig_new_list();
|
|
619
|
+
if (!voxgig_is_node(val))
|
|
620
|
+
return out;
|
|
621
|
+
voxgig_strvec keys = voxgig_keysof(val);
|
|
622
|
+
for (size_t i = 0; i < keys.len; i++) {
|
|
623
|
+
voxgig_value* pair = voxgig_new_list();
|
|
624
|
+
voxgig_list_push(voxgig_as_list(pair), voxgig_new_string(keys.data[i]));
|
|
625
|
+
voxgig_value* keyv = voxgig_new_string(keys.data[i]);
|
|
626
|
+
voxgig_value* v = voxgig_getprop(val, keyv, NULL);
|
|
627
|
+
voxgig_release(keyv);
|
|
628
|
+
voxgig_list_push(voxgig_as_list(pair), v);
|
|
629
|
+
voxgig_list_push(voxgig_as_list(out), pair);
|
|
630
|
+
}
|
|
631
|
+
voxgig_strvec_free(&keys);
|
|
632
|
+
return out;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/* ===========================================================================
|
|
636
|
+
* setprop / delprop
|
|
637
|
+
* ===========================================================================*/
|
|
638
|
+
|
|
639
|
+
voxgig_value* voxgig_setprop(voxgig_value* parent, voxgig_value* key, voxgig_value* val) {
|
|
640
|
+
if (!parent || !voxgig_iskey(key))
|
|
641
|
+
return parent;
|
|
642
|
+
if (voxgig_is_map(parent)) {
|
|
643
|
+
char* k = voxgig_strkey(key);
|
|
644
|
+
if (val && voxgig_is_undef(val)) {
|
|
645
|
+
voxgig_map_erase(voxgig_as_map(parent), k);
|
|
646
|
+
} else {
|
|
647
|
+
voxgig_map_set(voxgig_as_map(parent), k, val ? voxgig_retain(val) : voxgig_new_undef());
|
|
648
|
+
}
|
|
649
|
+
free(k);
|
|
650
|
+
} else if (voxgig_is_list(parent)) {
|
|
651
|
+
int64_t ki = 0;
|
|
652
|
+
if (voxgig_is_int(key))
|
|
653
|
+
ki = voxgig_as_int(key);
|
|
654
|
+
else if (voxgig_is_double(key))
|
|
655
|
+
ki = (int64_t)floor(voxgig_as_double(key));
|
|
656
|
+
else if (voxgig_is_string(key)) {
|
|
657
|
+
if (!parse_intstr(voxgig_as_string(key), voxgig_string_len(key), &ki))
|
|
658
|
+
return parent;
|
|
659
|
+
} else {
|
|
660
|
+
return parent;
|
|
661
|
+
}
|
|
662
|
+
voxgig_list* l = voxgig_as_list(parent);
|
|
663
|
+
if (ki >= 0) {
|
|
664
|
+
int64_t cap = (int64_t)l->len + 1;
|
|
665
|
+
if (ki > cap - 1)
|
|
666
|
+
ki = cap - 1;
|
|
667
|
+
if (ki < cap) {
|
|
668
|
+
voxgig_list_set(l, (size_t)ki, val ? voxgig_retain(val) : voxgig_new_undef());
|
|
669
|
+
}
|
|
670
|
+
} else {
|
|
671
|
+
voxgig_list_insert(l, 0, val ? voxgig_retain(val) : voxgig_new_undef());
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
return parent;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
voxgig_value* voxgig_delprop(voxgig_value* parent, voxgig_value* key) {
|
|
678
|
+
if (!parent || !voxgig_iskey(key))
|
|
679
|
+
return parent;
|
|
680
|
+
if (voxgig_is_map(parent)) {
|
|
681
|
+
char* k = voxgig_strkey(key);
|
|
682
|
+
voxgig_map_erase(voxgig_as_map(parent), k);
|
|
683
|
+
free(k);
|
|
684
|
+
} else if (voxgig_is_list(parent)) {
|
|
685
|
+
int64_t ki = 0;
|
|
686
|
+
if (voxgig_is_int(key))
|
|
687
|
+
ki = voxgig_as_int(key);
|
|
688
|
+
else if (voxgig_is_double(key))
|
|
689
|
+
ki = (int64_t)floor(voxgig_as_double(key));
|
|
690
|
+
else if (voxgig_is_string(key)) {
|
|
691
|
+
if (!parse_intstr(voxgig_as_string(key), voxgig_string_len(key), &ki))
|
|
692
|
+
return parent;
|
|
693
|
+
} else {
|
|
694
|
+
return parent;
|
|
695
|
+
}
|
|
696
|
+
voxgig_list* l = voxgig_as_list(parent);
|
|
697
|
+
if (ki >= 0 && ki < (int64_t)l->len) {
|
|
698
|
+
voxgig_list_erase(l, (size_t)ki);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return parent;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/* ===========================================================================
|
|
705
|
+
* flatten / filter
|
|
706
|
+
* ===========================================================================*/
|
|
707
|
+
|
|
708
|
+
static void flatten_into(voxgig_value* out, voxgig_value* list, int depth) {
|
|
709
|
+
if (!voxgig_is_list(list)) {
|
|
710
|
+
voxgig_list_push(voxgig_as_list(out), voxgig_retain(list));
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
if (depth <= 0) {
|
|
714
|
+
/* Append all items as-is (one level of flattening already exhausted). */
|
|
715
|
+
voxgig_list* src = voxgig_as_list(list);
|
|
716
|
+
for (size_t i = 0; i < src->len; i++) {
|
|
717
|
+
voxgig_list_push(voxgig_as_list(out), voxgig_retain(src->items[i]));
|
|
718
|
+
}
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
voxgig_list* src = voxgig_as_list(list);
|
|
722
|
+
for (size_t i = 0; i < src->len; i++) {
|
|
723
|
+
voxgig_value* it = src->items[i];
|
|
724
|
+
if (voxgig_is_list(it)) {
|
|
725
|
+
flatten_into(out, it, depth - 1);
|
|
726
|
+
} else {
|
|
727
|
+
voxgig_list_push(voxgig_as_list(out), voxgig_retain(it));
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
voxgig_value* voxgig_flatten(voxgig_value* list, voxgig_value* depth) {
|
|
733
|
+
if (!voxgig_is_list(list))
|
|
734
|
+
return voxgig_retain(list);
|
|
735
|
+
int d = 1;
|
|
736
|
+
if (depth && !voxgig_is_undef(depth)) {
|
|
737
|
+
if (voxgig_is_int(depth))
|
|
738
|
+
d = (int)voxgig_as_int(depth);
|
|
739
|
+
else if (voxgig_is_double(depth))
|
|
740
|
+
d = (int)voxgig_as_double(depth);
|
|
741
|
+
}
|
|
742
|
+
voxgig_value* out = voxgig_new_list();
|
|
743
|
+
voxgig_list* src = voxgig_as_list(list);
|
|
744
|
+
for (size_t i = 0; i < src->len; i++) {
|
|
745
|
+
voxgig_value* it = src->items[i];
|
|
746
|
+
if (voxgig_is_list(it) && d > 0) {
|
|
747
|
+
flatten_into(out, it, d - 1);
|
|
748
|
+
} else {
|
|
749
|
+
voxgig_list_push(voxgig_as_list(out), voxgig_retain(it));
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
return out;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
voxgig_value* voxgig_filter(voxgig_value* val, voxgig_itemcheck_fn check, void* ud) {
|
|
756
|
+
voxgig_value* all = voxgig_items_v(val);
|
|
757
|
+
voxgig_value* out = voxgig_new_list();
|
|
758
|
+
voxgig_list* l = voxgig_as_list(all);
|
|
759
|
+
for (size_t i = 0; i < l->len; i++) {
|
|
760
|
+
voxgig_value* pair = l->items[i];
|
|
761
|
+
if (check(pair, ud)) {
|
|
762
|
+
voxgig_value* v = voxgig_list_get(voxgig_as_list(pair), 1);
|
|
763
|
+
voxgig_list_push(voxgig_as_list(out), voxgig_retain(v));
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
voxgig_release(all);
|
|
767
|
+
return out;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/* ===========================================================================
|
|
771
|
+
* escre / escurl / replace
|
|
772
|
+
* ===========================================================================*/
|
|
773
|
+
|
|
774
|
+
char* voxgig_escre(voxgig_value* v) {
|
|
775
|
+
const char* s = "";
|
|
776
|
+
if (voxgig_is_string(v))
|
|
777
|
+
s = voxgig_as_string(v);
|
|
778
|
+
/* Equivalent to canonical TS: replace /[.*+?^${}()|[\]\\]/g with "\\$&".
|
|
779
|
+
voxgig_re_escape implements the same character set. */
|
|
780
|
+
return voxgig_re_escape(s);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
char* voxgig_escurl(voxgig_value* v) {
|
|
784
|
+
const char* s = "";
|
|
785
|
+
if (voxgig_is_string(v))
|
|
786
|
+
s = voxgig_as_string(v);
|
|
787
|
+
size_t n = strlen(s);
|
|
788
|
+
char* o = (char*)malloc(n * 3 + 1);
|
|
789
|
+
if (!o)
|
|
790
|
+
abort();
|
|
791
|
+
size_t j = 0;
|
|
792
|
+
static const char hex[] = "0123456789ABCDEF";
|
|
793
|
+
for (size_t i = 0; i < n; i++) {
|
|
794
|
+
unsigned char c = (unsigned char)s[i];
|
|
795
|
+
/* RFC 3986 encodeURIComponent: unreserved chars: A-Z a-z 0-9 - _ . ~ ! * ' ( ) */
|
|
796
|
+
if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' ||
|
|
797
|
+
c == '_' || c == '.' || c == '~' || c == '!' || c == '*' || c == '\'' || c == '(' ||
|
|
798
|
+
c == ')') {
|
|
799
|
+
o[j++] = (char)c;
|
|
800
|
+
} else {
|
|
801
|
+
o[j++] = '%';
|
|
802
|
+
o[j++] = hex[(c >> 4) & 0xF];
|
|
803
|
+
o[j++] = hex[c & 0xF];
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
o[j] = '\0';
|
|
807
|
+
return o;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
char* voxgig_replace_str(const char* s, const char* from, const char* to) {
|
|
811
|
+
if (!s)
|
|
812
|
+
s = "";
|
|
813
|
+
if (!from || !*from)
|
|
814
|
+
return xstrdup_s(s);
|
|
815
|
+
if (!to)
|
|
816
|
+
to = "";
|
|
817
|
+
size_t sl = strlen(s);
|
|
818
|
+
size_t fl = strlen(from);
|
|
819
|
+
size_t tl = strlen(to);
|
|
820
|
+
size_t cap = sl + 16;
|
|
821
|
+
char* out = (char*)malloc(cap);
|
|
822
|
+
if (!out)
|
|
823
|
+
abort();
|
|
824
|
+
size_t o = 0;
|
|
825
|
+
for (size_t i = 0; i < sl;) {
|
|
826
|
+
if (i + fl <= sl && memcmp(s + i, from, fl) == 0) {
|
|
827
|
+
while (o + tl >= cap) {
|
|
828
|
+
cap *= 2;
|
|
829
|
+
out = (char*)realloc(out, cap);
|
|
830
|
+
if (!out)
|
|
831
|
+
abort();
|
|
832
|
+
}
|
|
833
|
+
memcpy(out + o, to, tl);
|
|
834
|
+
o += tl;
|
|
835
|
+
i += fl;
|
|
836
|
+
} else {
|
|
837
|
+
if (o + 1 >= cap) {
|
|
838
|
+
cap *= 2;
|
|
839
|
+
out = (char*)realloc(out, cap);
|
|
840
|
+
if (!out)
|
|
841
|
+
abort();
|
|
842
|
+
}
|
|
843
|
+
out[o++] = s[i++];
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
if (o + 1 > cap) {
|
|
847
|
+
cap = o + 1;
|
|
848
|
+
out = (char*)realloc(out, cap);
|
|
849
|
+
if (!out)
|
|
850
|
+
abort();
|
|
851
|
+
}
|
|
852
|
+
out[o] = '\0';
|
|
853
|
+
return out;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/* ===========================================================================
|
|
857
|
+
* stringify / jsonify / pathify / pad
|
|
858
|
+
* ===========================================================================*/
|
|
859
|
+
|
|
860
|
+
static void sb_append(char** buf, size_t* len, size_t* cap, const char* s, size_t n) {
|
|
861
|
+
if (*len + n + 1 > *cap) {
|
|
862
|
+
size_t nc = *cap == 0 ? 64 : *cap;
|
|
863
|
+
while (nc < *len + n + 1)
|
|
864
|
+
nc *= 2;
|
|
865
|
+
char* nb = (char*)realloc(*buf, nc);
|
|
866
|
+
if (!nb)
|
|
867
|
+
abort();
|
|
868
|
+
*buf = nb;
|
|
869
|
+
*cap = nc;
|
|
870
|
+
}
|
|
871
|
+
memcpy(*buf + *len, s, n);
|
|
872
|
+
*len += n;
|
|
873
|
+
(*buf)[*len] = '\0';
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
static void sb_append_str(char** buf, size_t* len, size_t* cap, const char* s) {
|
|
877
|
+
sb_append(buf, len, cap, s, strlen(s));
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/* Sort keys for "stringify": canonical orders map keys by insertion (so stable). */
|
|
881
|
+
static void stringify_inner(voxgig_value* v, char** buf, size_t* len, size_t* cap, bool top);
|
|
882
|
+
|
|
883
|
+
static void escape_json_str(const char* s, size_t n, char** buf, size_t* len, size_t* cap) {
|
|
884
|
+
for (size_t i = 0; i < n; i++) {
|
|
885
|
+
unsigned char c = (unsigned char)s[i];
|
|
886
|
+
if (c == '"' || c == '\\') {
|
|
887
|
+
char esc[2] = {'\\', (char)c};
|
|
888
|
+
sb_append(buf, len, cap, esc, 2);
|
|
889
|
+
} else if (c == '\n') {
|
|
890
|
+
sb_append(buf, len, cap, "\\n", 2);
|
|
891
|
+
} else if (c == '\r') {
|
|
892
|
+
sb_append(buf, len, cap, "\\r", 2);
|
|
893
|
+
} else if (c == '\t') {
|
|
894
|
+
sb_append(buf, len, cap, "\\t", 2);
|
|
895
|
+
} else if (c == '\b') {
|
|
896
|
+
sb_append(buf, len, cap, "\\b", 2);
|
|
897
|
+
} else if (c == '\f') {
|
|
898
|
+
sb_append(buf, len, cap, "\\f", 2);
|
|
899
|
+
} else if (c < 0x20) {
|
|
900
|
+
char tmp[8];
|
|
901
|
+
snprintf(tmp, sizeof(tmp), "\\u%04x", c);
|
|
902
|
+
sb_append_str(buf, len, cap, tmp);
|
|
903
|
+
} else {
|
|
904
|
+
sb_append(buf, len, cap, (const char*)&c, 1);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
static void stringify_inner(voxgig_value* v, char** buf, size_t* len, size_t* cap, bool top) {
|
|
910
|
+
if (!v || voxgig_is_undef(v)) {
|
|
911
|
+
if (top)
|
|
912
|
+
sb_append_str(buf, len, cap, "");
|
|
913
|
+
else
|
|
914
|
+
sb_append_str(buf, len, cap, "null");
|
|
915
|
+
return;
|
|
916
|
+
}
|
|
917
|
+
if (voxgig_is_null(v)) {
|
|
918
|
+
sb_append_str(buf, len, cap, "null");
|
|
919
|
+
return;
|
|
920
|
+
}
|
|
921
|
+
if (voxgig_is_bool(v)) {
|
|
922
|
+
sb_append_str(buf, len, cap, voxgig_as_bool(v) ? "true" : "false");
|
|
923
|
+
return;
|
|
924
|
+
}
|
|
925
|
+
if (voxgig_is_int(v)) {
|
|
926
|
+
char tmp[32];
|
|
927
|
+
snprintf(tmp, sizeof(tmp), "%lld", (long long)voxgig_as_int(v));
|
|
928
|
+
sb_append_str(buf, len, cap, tmp);
|
|
929
|
+
return;
|
|
930
|
+
}
|
|
931
|
+
if (voxgig_is_double(v)) {
|
|
932
|
+
char* s = doublestr(voxgig_as_double(v));
|
|
933
|
+
sb_append_str(buf, len, cap, s);
|
|
934
|
+
free(s);
|
|
935
|
+
return;
|
|
936
|
+
}
|
|
937
|
+
if (voxgig_is_string(v)) {
|
|
938
|
+
/* In TS stringify, JSON.stringify then remove all quotes. */
|
|
939
|
+
sb_append(buf, len, cap, "\"", 1);
|
|
940
|
+
escape_json_str(voxgig_as_string(v), voxgig_string_len(v), buf, len, cap);
|
|
941
|
+
sb_append(buf, len, cap, "\"", 1);
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
if (voxgig_is_list(v)) {
|
|
945
|
+
sb_append_str(buf, len, cap, "[");
|
|
946
|
+
voxgig_list* l = voxgig_as_list(v);
|
|
947
|
+
for (size_t i = 0; i < l->len; i++) {
|
|
948
|
+
if (i > 0)
|
|
949
|
+
sb_append_str(buf, len, cap, ",");
|
|
950
|
+
stringify_inner(l->items[i], buf, len, cap, false);
|
|
951
|
+
}
|
|
952
|
+
sb_append_str(buf, len, cap, "]");
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
if (voxgig_is_map(v)) {
|
|
956
|
+
sb_append_str(buf, len, cap, "{");
|
|
957
|
+
voxgig_map* m = voxgig_as_map(v);
|
|
958
|
+
/* In TS stringify, map keys are visited via items() which yields sorted keys. */
|
|
959
|
+
/* Build sorted index. */
|
|
960
|
+
size_t* idx = (size_t*)malloc(m->len * sizeof(size_t) + 1);
|
|
961
|
+
if (!idx)
|
|
962
|
+
abort();
|
|
963
|
+
for (size_t i = 0; i < m->len; i++)
|
|
964
|
+
idx[i] = i;
|
|
965
|
+
/* Sort by key. */
|
|
966
|
+
for (size_t i = 1; i < m->len; i++) {
|
|
967
|
+
size_t j = i;
|
|
968
|
+
while (j > 0 && strcmp(m->entries[idx[j - 1]].key, m->entries[idx[j]].key) > 0) {
|
|
969
|
+
size_t t = idx[j - 1];
|
|
970
|
+
idx[j - 1] = idx[j];
|
|
971
|
+
idx[j] = t;
|
|
972
|
+
j--;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
for (size_t i = 0; i < m->len; i++) {
|
|
976
|
+
if (i > 0)
|
|
977
|
+
sb_append_str(buf, len, cap, ",");
|
|
978
|
+
sb_append(buf, len, cap, "\"", 1);
|
|
979
|
+
escape_json_str(m->entries[idx[i]].key, m->entries[idx[i]].klen, buf, len, cap);
|
|
980
|
+
sb_append_str(buf, len, cap, "\":");
|
|
981
|
+
stringify_inner(m->entries[idx[i]].value, buf, len, cap, false);
|
|
982
|
+
}
|
|
983
|
+
free(idx);
|
|
984
|
+
sb_append_str(buf, len, cap, "}");
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
if (voxgig_is_sentinel(v)) {
|
|
988
|
+
char tmp[48];
|
|
989
|
+
snprintf(tmp, sizeof(tmp), "{\"`$%s`\":true}", voxgig_as_sentinel(v)->name);
|
|
990
|
+
sb_append_str(buf, len, cap, tmp);
|
|
991
|
+
return;
|
|
992
|
+
}
|
|
993
|
+
if (voxgig_is_func(v)) {
|
|
994
|
+
sb_append_str(buf, len, cap, "null");
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
sb_append_str(buf, len, cap, "null");
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
char* voxgig_stringify(voxgig_value* val, int maxlen) {
|
|
1001
|
+
if (!val || voxgig_is_undef(val))
|
|
1002
|
+
return xstrdup_s("");
|
|
1003
|
+
char* buf = NULL;
|
|
1004
|
+
size_t len = 0, cap = 0;
|
|
1005
|
+
|
|
1006
|
+
if (voxgig_is_string(val)) {
|
|
1007
|
+
sb_append(&buf, &len, &cap, voxgig_as_string(val), voxgig_string_len(val));
|
|
1008
|
+
} else {
|
|
1009
|
+
stringify_inner(val, &buf, &len, &cap, true);
|
|
1010
|
+
/* Remove all double quotes. */
|
|
1011
|
+
size_t w = 0;
|
|
1012
|
+
for (size_t r = 0; r < len; r++) {
|
|
1013
|
+
if (buf[r] != '"')
|
|
1014
|
+
buf[w++] = buf[r];
|
|
1015
|
+
}
|
|
1016
|
+
buf[w] = '\0';
|
|
1017
|
+
len = w;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
if (maxlen >= 0 && (int64_t)len > (int64_t)maxlen) {
|
|
1021
|
+
if (maxlen >= 3) {
|
|
1022
|
+
memcpy(buf + maxlen - 3, "...", 3);
|
|
1023
|
+
buf[maxlen] = '\0';
|
|
1024
|
+
} else {
|
|
1025
|
+
buf[maxlen] = '\0';
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
if (!buf)
|
|
1029
|
+
buf = xstrdup_s("");
|
|
1030
|
+
return buf;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/* jsonify: emit standard JSON. */
|
|
1034
|
+
static void jsonify_inner(voxgig_value* v, char** buf, size_t* len, size_t* cap, int indent,
|
|
1035
|
+
int depth) {
|
|
1036
|
+
if (!v || voxgig_is_undef(v) || voxgig_is_null(v)) {
|
|
1037
|
+
sb_append_str(buf, len, cap, "null");
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
if (voxgig_is_bool(v)) {
|
|
1041
|
+
sb_append_str(buf, len, cap, voxgig_as_bool(v) ? "true" : "false");
|
|
1042
|
+
return;
|
|
1043
|
+
}
|
|
1044
|
+
if (voxgig_is_int(v)) {
|
|
1045
|
+
char tmp[32];
|
|
1046
|
+
snprintf(tmp, sizeof(tmp), "%lld", (long long)voxgig_as_int(v));
|
|
1047
|
+
sb_append_str(buf, len, cap, tmp);
|
|
1048
|
+
return;
|
|
1049
|
+
}
|
|
1050
|
+
if (voxgig_is_double(v)) {
|
|
1051
|
+
char* s = doublestr(voxgig_as_double(v));
|
|
1052
|
+
sb_append_str(buf, len, cap, s);
|
|
1053
|
+
free(s);
|
|
1054
|
+
return;
|
|
1055
|
+
}
|
|
1056
|
+
if (voxgig_is_string(v)) {
|
|
1057
|
+
sb_append(buf, len, cap, "\"", 1);
|
|
1058
|
+
escape_json_str(voxgig_as_string(v), voxgig_string_len(v), buf, len, cap);
|
|
1059
|
+
sb_append(buf, len, cap, "\"", 1);
|
|
1060
|
+
return;
|
|
1061
|
+
}
|
|
1062
|
+
if (voxgig_is_list(v)) {
|
|
1063
|
+
voxgig_list* l = voxgig_as_list(v);
|
|
1064
|
+
if (l->len == 0) {
|
|
1065
|
+
sb_append_str(buf, len, cap, "[]");
|
|
1066
|
+
return;
|
|
1067
|
+
}
|
|
1068
|
+
sb_append_str(buf, len, cap, "[");
|
|
1069
|
+
for (size_t i = 0; i < l->len; i++) {
|
|
1070
|
+
if (i > 0)
|
|
1071
|
+
sb_append_str(buf, len, cap, ",");
|
|
1072
|
+
if (indent > 0) {
|
|
1073
|
+
sb_append_str(buf, len, cap, "\n");
|
|
1074
|
+
for (int j = 0; j < (depth + 1) * indent; j++)
|
|
1075
|
+
sb_append_str(buf, len, cap, " ");
|
|
1076
|
+
}
|
|
1077
|
+
jsonify_inner(l->items[i], buf, len, cap, indent, depth + 1);
|
|
1078
|
+
}
|
|
1079
|
+
if (indent > 0) {
|
|
1080
|
+
sb_append_str(buf, len, cap, "\n");
|
|
1081
|
+
for (int j = 0; j < depth * indent; j++)
|
|
1082
|
+
sb_append_str(buf, len, cap, " ");
|
|
1083
|
+
}
|
|
1084
|
+
sb_append_str(buf, len, cap, "]");
|
|
1085
|
+
return;
|
|
1086
|
+
}
|
|
1087
|
+
if (voxgig_is_map(v)) {
|
|
1088
|
+
voxgig_map* m = voxgig_as_map(v);
|
|
1089
|
+
if (m->len == 0) {
|
|
1090
|
+
sb_append_str(buf, len, cap, "{}");
|
|
1091
|
+
return;
|
|
1092
|
+
}
|
|
1093
|
+
sb_append_str(buf, len, cap, "{");
|
|
1094
|
+
for (size_t i = 0; i < m->len; i++) {
|
|
1095
|
+
if (i > 0)
|
|
1096
|
+
sb_append_str(buf, len, cap, ",");
|
|
1097
|
+
if (indent > 0) {
|
|
1098
|
+
sb_append_str(buf, len, cap, "\n");
|
|
1099
|
+
for (int j = 0; j < (depth + 1) * indent; j++)
|
|
1100
|
+
sb_append_str(buf, len, cap, " ");
|
|
1101
|
+
}
|
|
1102
|
+
sb_append(buf, len, cap, "\"", 1);
|
|
1103
|
+
escape_json_str(m->entries[i].key, m->entries[i].klen, buf, len, cap);
|
|
1104
|
+
sb_append_str(buf, len, cap, indent > 0 ? "\": " : "\":");
|
|
1105
|
+
jsonify_inner(m->entries[i].value, buf, len, cap, indent, depth + 1);
|
|
1106
|
+
}
|
|
1107
|
+
if (indent > 0) {
|
|
1108
|
+
sb_append_str(buf, len, cap, "\n");
|
|
1109
|
+
for (int j = 0; j < depth * indent; j++)
|
|
1110
|
+
sb_append_str(buf, len, cap, " ");
|
|
1111
|
+
}
|
|
1112
|
+
sb_append_str(buf, len, cap, "}");
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1115
|
+
sb_append_str(buf, len, cap, "null");
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
char* voxgig_jsonify(voxgig_value* val, voxgig_value* flags) {
|
|
1119
|
+
if (!val || voxgig_is_undef(val) || voxgig_is_null(val))
|
|
1120
|
+
return xstrdup_s("null");
|
|
1121
|
+
int indent = 2;
|
|
1122
|
+
int offset = 0;
|
|
1123
|
+
if (flags && voxgig_is_map(flags)) {
|
|
1124
|
+
voxgig_value* iv = voxgig_map_get(voxgig_as_map(flags), "indent");
|
|
1125
|
+
if (voxgig_is_int(iv))
|
|
1126
|
+
indent = (int)voxgig_as_int(iv);
|
|
1127
|
+
else if (voxgig_is_double(iv))
|
|
1128
|
+
indent = (int)voxgig_as_double(iv);
|
|
1129
|
+
voxgig_value* ov = voxgig_map_get(voxgig_as_map(flags), "offset");
|
|
1130
|
+
if (voxgig_is_int(ov))
|
|
1131
|
+
offset = (int)voxgig_as_int(ov);
|
|
1132
|
+
else if (voxgig_is_double(ov))
|
|
1133
|
+
offset = (int)voxgig_as_double(ov);
|
|
1134
|
+
}
|
|
1135
|
+
char* buf = NULL;
|
|
1136
|
+
size_t len = 0, cap = 0;
|
|
1137
|
+
jsonify_inner(val, &buf, &len, &cap, indent, 0);
|
|
1138
|
+
if (offset > 0) {
|
|
1139
|
+
/* Re-indent: find first newline, prepend "{" + "\n" and pad subsequent lines by offset. */
|
|
1140
|
+
/* The first brace is on the same line as the assignment, so it's not offset. */
|
|
1141
|
+
char* nb = NULL;
|
|
1142
|
+
size_t nlen = 0, ncap = 0;
|
|
1143
|
+
sb_append_str(&nb, &nlen, &ncap, "{\n");
|
|
1144
|
+
bool first_line = true;
|
|
1145
|
+
size_t i = 0;
|
|
1146
|
+
while (i < len) {
|
|
1147
|
+
size_t lstart = i;
|
|
1148
|
+
while (i < len && buf[i] != '\n')
|
|
1149
|
+
i++;
|
|
1150
|
+
size_t llen = i - lstart;
|
|
1151
|
+
if (first_line) {
|
|
1152
|
+
/* Skip the first '{' line. */
|
|
1153
|
+
first_line = false;
|
|
1154
|
+
} else {
|
|
1155
|
+
/* Pad with offset spaces. */
|
|
1156
|
+
for (int j = 0; j < offset; j++)
|
|
1157
|
+
sb_append_str(&nb, &nlen, &ncap, " ");
|
|
1158
|
+
sb_append(&nb, &nlen, &ncap, buf + lstart, llen);
|
|
1159
|
+
sb_append_str(&nb, &nlen, &ncap, "\n");
|
|
1160
|
+
}
|
|
1161
|
+
if (i < len)
|
|
1162
|
+
i++;
|
|
1163
|
+
}
|
|
1164
|
+
free(buf);
|
|
1165
|
+
/* Strip trailing newline. */
|
|
1166
|
+
if (nlen > 0 && nb[nlen - 1] == '\n')
|
|
1167
|
+
nb[--nlen] = '\0';
|
|
1168
|
+
buf = nb;
|
|
1169
|
+
}
|
|
1170
|
+
if (!buf)
|
|
1171
|
+
return xstrdup_s("null");
|
|
1172
|
+
return buf;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
char* voxgig_pad(voxgig_value* str, voxgig_value* padding, voxgig_value* padchar) {
|
|
1176
|
+
char* s;
|
|
1177
|
+
if (voxgig_is_string(str))
|
|
1178
|
+
s = xstrdup_s(voxgig_as_string(str));
|
|
1179
|
+
else
|
|
1180
|
+
s = voxgig_stringify(str, -1);
|
|
1181
|
+
int p = 44;
|
|
1182
|
+
if (padding && !voxgig_is_undef(padding)) {
|
|
1183
|
+
if (voxgig_is_int(padding))
|
|
1184
|
+
p = (int)voxgig_as_int(padding);
|
|
1185
|
+
else if (voxgig_is_double(padding))
|
|
1186
|
+
p = (int)voxgig_as_double(padding);
|
|
1187
|
+
}
|
|
1188
|
+
char pc = ' ';
|
|
1189
|
+
if (voxgig_is_string(padchar) && voxgig_string_len(padchar) > 0)
|
|
1190
|
+
pc = voxgig_as_string(padchar)[0];
|
|
1191
|
+
size_t slen = strlen(s);
|
|
1192
|
+
if (p < 0) {
|
|
1193
|
+
/* Left pad. */
|
|
1194
|
+
int width = -p;
|
|
1195
|
+
if (slen >= (size_t)width)
|
|
1196
|
+
return s;
|
|
1197
|
+
size_t pad = width - slen;
|
|
1198
|
+
char* o = (char*)malloc(width + 1);
|
|
1199
|
+
if (!o)
|
|
1200
|
+
abort();
|
|
1201
|
+
memset(o, pc, pad);
|
|
1202
|
+
memcpy(o + pad, s, slen);
|
|
1203
|
+
o[width] = '\0';
|
|
1204
|
+
free(s);
|
|
1205
|
+
return o;
|
|
1206
|
+
} else {
|
|
1207
|
+
/* Right pad. */
|
|
1208
|
+
if (slen >= (size_t)p)
|
|
1209
|
+
return s;
|
|
1210
|
+
char* o = (char*)realloc(s, p + 1);
|
|
1211
|
+
if (!o)
|
|
1212
|
+
abort();
|
|
1213
|
+
memset(o + slen, pc, p - slen);
|
|
1214
|
+
o[p] = '\0';
|
|
1215
|
+
return o;
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
char* voxgig_pathify(voxgig_value* val, int startin, int endin) {
|
|
1220
|
+
/* Determine path: list, string, or number. */
|
|
1221
|
+
voxgig_value* path = NULL;
|
|
1222
|
+
bool path_owned = false;
|
|
1223
|
+
if (voxgig_is_list(val)) {
|
|
1224
|
+
path = val;
|
|
1225
|
+
} else if (voxgig_is_string(val)) {
|
|
1226
|
+
path = voxgig_new_list();
|
|
1227
|
+
path_owned = true;
|
|
1228
|
+
voxgig_list_push(voxgig_as_list(path), voxgig_retain(val));
|
|
1229
|
+
} else if (voxgig_is_number(val)) {
|
|
1230
|
+
path = voxgig_new_list();
|
|
1231
|
+
path_owned = true;
|
|
1232
|
+
voxgig_list_push(voxgig_as_list(path), voxgig_retain(val));
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
int start = startin < 0 ? 0 : startin;
|
|
1236
|
+
int end = endin < 0 ? 0 : endin;
|
|
1237
|
+
|
|
1238
|
+
char* out = NULL;
|
|
1239
|
+
if (path && voxgig_is_list(path)) {
|
|
1240
|
+
voxgig_list* l = voxgig_as_list(path);
|
|
1241
|
+
int64_t plen = (int64_t)l->len;
|
|
1242
|
+
/* path = slice(path, start, path.length - end) */
|
|
1243
|
+
int64_t s = start;
|
|
1244
|
+
int64_t e = plen - end;
|
|
1245
|
+
if (s < 0)
|
|
1246
|
+
s = 0;
|
|
1247
|
+
if (e > plen)
|
|
1248
|
+
e = plen;
|
|
1249
|
+
if (e <= s) {
|
|
1250
|
+
out = xstrdup_s("<root>");
|
|
1251
|
+
} else {
|
|
1252
|
+
/* Build dotted joined string. */
|
|
1253
|
+
char* buf = NULL;
|
|
1254
|
+
size_t len = 0, cap = 0;
|
|
1255
|
+
bool first = true;
|
|
1256
|
+
for (int64_t i = s; i < e; i++) {
|
|
1257
|
+
voxgig_value* p = voxgig_list_get(l, (size_t)i);
|
|
1258
|
+
if (!voxgig_iskey(p))
|
|
1259
|
+
continue;
|
|
1260
|
+
char* part;
|
|
1261
|
+
if (voxgig_is_number(p)) {
|
|
1262
|
+
int64_t n;
|
|
1263
|
+
if (voxgig_is_int(p))
|
|
1264
|
+
n = voxgig_as_int(p);
|
|
1265
|
+
else
|
|
1266
|
+
n = (int64_t)floor(voxgig_as_double(p));
|
|
1267
|
+
part = intstr(n);
|
|
1268
|
+
} else {
|
|
1269
|
+
/* Remove dots from string. */
|
|
1270
|
+
const char* ps = voxgig_as_string(p);
|
|
1271
|
+
size_t pn = voxgig_string_len(p);
|
|
1272
|
+
char* tmp = (char*)malloc(pn + 1);
|
|
1273
|
+
if (!tmp)
|
|
1274
|
+
abort();
|
|
1275
|
+
size_t w = 0;
|
|
1276
|
+
for (size_t k = 0; k < pn; k++) {
|
|
1277
|
+
if (ps[k] != '.')
|
|
1278
|
+
tmp[w++] = ps[k];
|
|
1279
|
+
}
|
|
1280
|
+
tmp[w] = '\0';
|
|
1281
|
+
part = tmp;
|
|
1282
|
+
}
|
|
1283
|
+
if (!first)
|
|
1284
|
+
sb_append_str(&buf, &len, &cap, ".");
|
|
1285
|
+
sb_append_str(&buf, &len, &cap, part);
|
|
1286
|
+
first = false;
|
|
1287
|
+
free(part);
|
|
1288
|
+
}
|
|
1289
|
+
if (!buf)
|
|
1290
|
+
out = xstrdup_s("");
|
|
1291
|
+
else
|
|
1292
|
+
out = buf;
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
if (!out) {
|
|
1297
|
+
char* s;
|
|
1298
|
+
if (voxgig_is_undef(val))
|
|
1299
|
+
s = xstrdup_s("");
|
|
1300
|
+
else {
|
|
1301
|
+
char* tmp = voxgig_stringify(val, 47);
|
|
1302
|
+
size_t ln = strlen(tmp) + 32;
|
|
1303
|
+
s = (char*)malloc(ln);
|
|
1304
|
+
snprintf(s, ln, ":%s", tmp);
|
|
1305
|
+
free(tmp);
|
|
1306
|
+
}
|
|
1307
|
+
char* full = (char*)malloc(strlen(s) + 32);
|
|
1308
|
+
snprintf(full, strlen(s) + 32, "<unknown-path%s>", s);
|
|
1309
|
+
free(s);
|
|
1310
|
+
out = full;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
if (path_owned)
|
|
1314
|
+
voxgig_release(path);
|
|
1315
|
+
return out;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
/* ===========================================================================
|
|
1319
|
+
* join
|
|
1320
|
+
* ===========================================================================*/
|
|
1321
|
+
|
|
1322
|
+
char* voxgig_join_v(voxgig_value* arr, voxgig_value* sep, voxgig_value* url) {
|
|
1323
|
+
const char* sepstr = ",";
|
|
1324
|
+
if (voxgig_is_string(sep))
|
|
1325
|
+
sepstr = voxgig_as_string(sep);
|
|
1326
|
+
bool url_mode = voxgig_is_bool(url) && voxgig_as_bool(url);
|
|
1327
|
+
size_t seplen = strlen(sepstr);
|
|
1328
|
+
|
|
1329
|
+
if (!voxgig_is_list(arr))
|
|
1330
|
+
return xstrdup_s("");
|
|
1331
|
+
voxgig_list* l = voxgig_as_list(arr);
|
|
1332
|
+
/* Collect string entries (filter out non-string and empty). */
|
|
1333
|
+
size_t* keepi = (size_t*)malloc(sizeof(size_t) * (l->len + 1));
|
|
1334
|
+
size_t nkeep = 0;
|
|
1335
|
+
for (size_t i = 0; i < l->len; i++) {
|
|
1336
|
+
if (voxgig_is_string(l->items[i]) && voxgig_string_len(l->items[i]) > 0) {
|
|
1337
|
+
keepi[nkeep++] = i;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
/* Now process each. */
|
|
1341
|
+
char* result = NULL;
|
|
1342
|
+
size_t rlen = 0, rcap = 0;
|
|
1343
|
+
bool first = true;
|
|
1344
|
+
for (size_t k = 0; k < nkeep; k++) {
|
|
1345
|
+
size_t i = keepi[k];
|
|
1346
|
+
const char* sin = voxgig_as_string(l->items[i]);
|
|
1347
|
+
size_t inlen = voxgig_string_len(l->items[i]);
|
|
1348
|
+
char* s = xstrndup_s(sin, inlen);
|
|
1349
|
+
/* Apply sep-trimming rules. */
|
|
1350
|
+
if (seplen == 1) {
|
|
1351
|
+
char sc = sepstr[0];
|
|
1352
|
+
bool early_return = false;
|
|
1353
|
+
/* URL mode at index 0: strip trailing sep then EARLY-RETURN. */
|
|
1354
|
+
if (url_mode && i == 0) {
|
|
1355
|
+
size_t sl = strlen(s);
|
|
1356
|
+
while (sl > 0 && s[sl - 1] == sc)
|
|
1357
|
+
s[--sl] = '\0';
|
|
1358
|
+
early_return = true;
|
|
1359
|
+
} else {
|
|
1360
|
+
if (i > 0) {
|
|
1361
|
+
/* Strip leading sep. */
|
|
1362
|
+
size_t st = 0;
|
|
1363
|
+
size_t sl = strlen(s);
|
|
1364
|
+
while (st < sl && s[st] == sc)
|
|
1365
|
+
st++;
|
|
1366
|
+
if (st > 0) {
|
|
1367
|
+
memmove(s, s + st, sl - st + 1);
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
if (i < l->len - 1 || !url_mode) {
|
|
1371
|
+
size_t sl = strlen(s);
|
|
1372
|
+
while (sl > 0 && s[sl - 1] == sc)
|
|
1373
|
+
s[--sl] = '\0';
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
if (!early_return) {
|
|
1377
|
+
/* Collapse "X<sep>+Y" -> "X<sep>Y" — only the FIRST match per the TS
|
|
1378
|
+
* regex which is unanchored and not /g. */
|
|
1379
|
+
size_t sl = strlen(s);
|
|
1380
|
+
char* tmp = (char*)malloc(sl + 1);
|
|
1381
|
+
size_t w = 0;
|
|
1382
|
+
bool replaced = false;
|
|
1383
|
+
for (size_t p = 0; p < sl; p++) {
|
|
1384
|
+
if (!replaced && p > 0 && p < sl - 1 && s[p] == sc && s[p - 1] != sc) {
|
|
1385
|
+
size_t q = p + 1;
|
|
1386
|
+
while (q < sl && s[q] == sc)
|
|
1387
|
+
q++;
|
|
1388
|
+
if (q < sl && q > p + 1 && s[q] != sc) {
|
|
1389
|
+
tmp[w++] = sc;
|
|
1390
|
+
p = q - 1;
|
|
1391
|
+
replaced = true;
|
|
1392
|
+
continue;
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
tmp[w++] = s[p];
|
|
1396
|
+
}
|
|
1397
|
+
tmp[w] = '\0';
|
|
1398
|
+
free(s);
|
|
1399
|
+
s = tmp;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
if (strlen(s) > 0) {
|
|
1403
|
+
if (!first)
|
|
1404
|
+
sb_append(&result, &rlen, &rcap, sepstr, seplen);
|
|
1405
|
+
sb_append_str(&result, &rlen, &rcap, s);
|
|
1406
|
+
first = false;
|
|
1407
|
+
}
|
|
1408
|
+
free(s);
|
|
1409
|
+
}
|
|
1410
|
+
free(keepi);
|
|
1411
|
+
if (!result)
|
|
1412
|
+
return xstrdup_s("");
|
|
1413
|
+
return result;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
/* ===========================================================================
|
|
1417
|
+
* jm / jt builders
|
|
1418
|
+
* ===========================================================================*/
|
|
1419
|
+
|
|
1420
|
+
voxgig_value* voxgig_jm_va(int n, voxgig_value** kv) {
|
|
1421
|
+
voxgig_value* o = voxgig_new_map();
|
|
1422
|
+
for (int i = 0; i < n; i += 2) {
|
|
1423
|
+
voxgig_value* k = (i < n) ? kv[i] : NULL;
|
|
1424
|
+
voxgig_value* v = (i + 1 < n) ? kv[i + 1] : NULL;
|
|
1425
|
+
char buf[32];
|
|
1426
|
+
char* key;
|
|
1427
|
+
if (voxgig_is_string(k)) {
|
|
1428
|
+
key = xstrdup_s(voxgig_as_string(k));
|
|
1429
|
+
} else if (k) {
|
|
1430
|
+
key = voxgig_stringify(k, -1);
|
|
1431
|
+
} else {
|
|
1432
|
+
snprintf(buf, sizeof(buf), "$KEY%d", i);
|
|
1433
|
+
key = xstrdup_s(buf);
|
|
1434
|
+
}
|
|
1435
|
+
voxgig_map_set(voxgig_as_map(o), key, v ? voxgig_retain(v) : voxgig_new_null());
|
|
1436
|
+
free(key);
|
|
1437
|
+
}
|
|
1438
|
+
return o;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
voxgig_value* voxgig_jt_va(int n, voxgig_value** v) {
|
|
1442
|
+
voxgig_value* a = voxgig_new_list();
|
|
1443
|
+
for (int i = 0; i < n; i++) {
|
|
1444
|
+
voxgig_list_push(voxgig_as_list(a), v[i] ? voxgig_retain(v[i]) : voxgig_new_null());
|
|
1445
|
+
}
|
|
1446
|
+
return a;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
/* ===========================================================================
|
|
1450
|
+
* walk
|
|
1451
|
+
* ===========================================================================*/
|
|
1452
|
+
|
|
1453
|
+
typedef struct walk_state {
|
|
1454
|
+
voxgig_walkapply_fn before;
|
|
1455
|
+
voxgig_walkapply_fn after;
|
|
1456
|
+
int maxdepth;
|
|
1457
|
+
void* ud;
|
|
1458
|
+
} walk_state;
|
|
1459
|
+
|
|
1460
|
+
/* path_stack: a voxgig_value list of strings; reused/mutated for child calls (per-depth pool). */
|
|
1461
|
+
|
|
1462
|
+
static voxgig_value* walk_rec(walk_state* st, voxgig_value* val, voxgig_value* key,
|
|
1463
|
+
voxgig_value* parent, voxgig_value* path) {
|
|
1464
|
+
int depth = (int)voxgig_list_len(voxgig_as_list(path));
|
|
1465
|
+
voxgig_value* out = val ? voxgig_retain(val) : voxgig_new_undef();
|
|
1466
|
+
if (st->before) {
|
|
1467
|
+
voxgig_value* nval = st->before(key, out, parent, path, st->ud);
|
|
1468
|
+
/* Callback returns a new owned ref; release the prior one unconditionally. */
|
|
1469
|
+
voxgig_release(out);
|
|
1470
|
+
out = nval;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
int maxd = st->maxdepth;
|
|
1474
|
+
if (maxd == 0 || (maxd > 0 && maxd <= depth)) {
|
|
1475
|
+
return out;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
if (voxgig_is_node(out)) {
|
|
1479
|
+
/* Build child key list (sorted as keysof returns). */
|
|
1480
|
+
voxgig_strvec keys = voxgig_keysof(out);
|
|
1481
|
+
/* Path push placeholder. */
|
|
1482
|
+
voxgig_list_push(voxgig_as_list(path), voxgig_new_string(""));
|
|
1483
|
+
for (size_t i = 0; i < keys.len; i++) {
|
|
1484
|
+
/* Set path[depth] = key. */
|
|
1485
|
+
voxgig_release(voxgig_list_get(voxgig_as_list(path), (size_t)depth));
|
|
1486
|
+
voxgig_as_list(path)->items[depth] = voxgig_new_string(keys.data[i]);
|
|
1487
|
+
|
|
1488
|
+
voxgig_value* ckey;
|
|
1489
|
+
if (voxgig_is_list(out)) {
|
|
1490
|
+
ckey = voxgig_new_int((int64_t)i);
|
|
1491
|
+
} else {
|
|
1492
|
+
ckey = voxgig_new_string(keys.data[i]);
|
|
1493
|
+
}
|
|
1494
|
+
voxgig_value* ckeyv = voxgig_new_string(keys.data[i]);
|
|
1495
|
+
voxgig_value* cp = voxgig_lookup(out, ckeyv);
|
|
1496
|
+
voxgig_value* child = cp ? voxgig_retain(cp) : voxgig_new_undef();
|
|
1497
|
+
voxgig_release(ckeyv);
|
|
1498
|
+
|
|
1499
|
+
voxgig_value* nchild = walk_rec(st, child, ckey, out, path);
|
|
1500
|
+
voxgig_release(child);
|
|
1501
|
+
voxgig_setprop(out, ckey, nchild);
|
|
1502
|
+
voxgig_release(nchild);
|
|
1503
|
+
voxgig_release(ckey);
|
|
1504
|
+
}
|
|
1505
|
+
/* Path pop. */
|
|
1506
|
+
voxgig_release(voxgig_list_get(voxgig_as_list(path), (size_t)depth));
|
|
1507
|
+
voxgig_as_list(path)->len--;
|
|
1508
|
+
voxgig_strvec_free(&keys);
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
if (st->after) {
|
|
1512
|
+
voxgig_value* nval = st->after(key, out, parent, path, st->ud);
|
|
1513
|
+
voxgig_release(out);
|
|
1514
|
+
out = nval;
|
|
1515
|
+
}
|
|
1516
|
+
return out;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
voxgig_value* voxgig_walk(voxgig_value* val, voxgig_walkapply_fn before, voxgig_walkapply_fn after,
|
|
1520
|
+
int maxdepth, void* ud) {
|
|
1521
|
+
walk_state st;
|
|
1522
|
+
st.before = before;
|
|
1523
|
+
st.after = after;
|
|
1524
|
+
st.maxdepth = (maxdepth >= 0 || maxdepth == INT_MAX) ? maxdepth : VOXGIG_MAXDEPTH;
|
|
1525
|
+
if (maxdepth < 0 && maxdepth != INT_MAX)
|
|
1526
|
+
st.maxdepth = VOXGIG_MAXDEPTH;
|
|
1527
|
+
st.ud = ud;
|
|
1528
|
+
voxgig_value* path = voxgig_new_list();
|
|
1529
|
+
voxgig_value* undef = voxgig_new_undef();
|
|
1530
|
+
voxgig_value* out = walk_rec(&st, val, undef, NULL, path);
|
|
1531
|
+
voxgig_release(undef);
|
|
1532
|
+
voxgig_release(path);
|
|
1533
|
+
return out;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
/* ===========================================================================
|
|
1537
|
+
* merge
|
|
1538
|
+
* ===========================================================================*/
|
|
1539
|
+
|
|
1540
|
+
typedef struct merge_state {
|
|
1541
|
+
voxgig_value* cur_stack; /* list */
|
|
1542
|
+
voxgig_value* dst_stack; /* list */
|
|
1543
|
+
int maxdepth;
|
|
1544
|
+
} merge_state;
|
|
1545
|
+
|
|
1546
|
+
static voxgig_value* merge_before(voxgig_value* key, voxgig_value* val, voxgig_value* parent,
|
|
1547
|
+
voxgig_value* path, void* ud) {
|
|
1548
|
+
(void)parent;
|
|
1549
|
+
merge_state* st = (merge_state*)ud;
|
|
1550
|
+
int pI = (int)voxgig_list_len(voxgig_as_list(path));
|
|
1551
|
+
|
|
1552
|
+
if (st->maxdepth <= pI) {
|
|
1553
|
+
/* setprop(cur[pI-1], key, val) */
|
|
1554
|
+
voxgig_value* target = voxgig_list_get(voxgig_as_list(st->cur_stack), pI - 1);
|
|
1555
|
+
if (target)
|
|
1556
|
+
voxgig_setprop(target, key, val);
|
|
1557
|
+
return val ? voxgig_retain(val) : voxgig_new_undef();
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
if (!voxgig_is_node(val)) {
|
|
1561
|
+
/* cur[pI] = val */
|
|
1562
|
+
voxgig_list_set(voxgig_as_list(st->cur_stack), (size_t)pI,
|
|
1563
|
+
val ? voxgig_retain(val) : voxgig_new_undef());
|
|
1564
|
+
return val ? voxgig_retain(val) : voxgig_new_undef();
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
/* dst[pI] = pI>0 ? getprop(dst[pI-1], key) : dst[pI]; */
|
|
1568
|
+
voxgig_value* tval = NULL;
|
|
1569
|
+
if (pI > 0) {
|
|
1570
|
+
voxgig_value* dp = voxgig_list_get(voxgig_as_list(st->dst_stack), (size_t)(pI - 1));
|
|
1571
|
+
tval = dp ? voxgig_getprop(dp, key, NULL) : voxgig_new_undef();
|
|
1572
|
+
} else {
|
|
1573
|
+
tval = voxgig_retain(voxgig_list_get(voxgig_as_list(st->dst_stack), (size_t)pI));
|
|
1574
|
+
}
|
|
1575
|
+
/* dst[pI] = tval */
|
|
1576
|
+
voxgig_list_set(voxgig_as_list(st->dst_stack), (size_t)pI, voxgig_retain(tval));
|
|
1577
|
+
|
|
1578
|
+
int tvt = voxgig_typify(tval);
|
|
1579
|
+
int valt = voxgig_typify(val);
|
|
1580
|
+
|
|
1581
|
+
if (voxgig_is_undef(tval)) {
|
|
1582
|
+
/* Destination empty; create node unless override is instance. */
|
|
1583
|
+
if (!(VOXGIG_T_INSTANCE & valt)) {
|
|
1584
|
+
voxgig_value* nc = voxgig_is_list(val) ? voxgig_new_list() : voxgig_new_map();
|
|
1585
|
+
voxgig_list_set(voxgig_as_list(st->cur_stack), (size_t)pI, nc);
|
|
1586
|
+
}
|
|
1587
|
+
voxgig_release(tval);
|
|
1588
|
+
return val ? voxgig_retain(val) : voxgig_new_undef();
|
|
1589
|
+
}
|
|
1590
|
+
if (tvt == valt) {
|
|
1591
|
+
voxgig_list_set(voxgig_as_list(st->cur_stack), (size_t)pI, voxgig_retain(tval));
|
|
1592
|
+
voxgig_release(tval);
|
|
1593
|
+
return val ? voxgig_retain(val) : voxgig_new_undef();
|
|
1594
|
+
}
|
|
1595
|
+
/* Override wins. */
|
|
1596
|
+
voxgig_list_set(voxgig_as_list(st->cur_stack), (size_t)pI, voxgig_retain(val));
|
|
1597
|
+
voxgig_release(tval);
|
|
1598
|
+
/* Don't descend; set val to undef. */
|
|
1599
|
+
return voxgig_new_undef();
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
static voxgig_value* merge_after(voxgig_value* key, voxgig_value* val, voxgig_value* parent,
|
|
1603
|
+
voxgig_value* path, void* ud) {
|
|
1604
|
+
(void)val;
|
|
1605
|
+
(void)parent;
|
|
1606
|
+
merge_state* st = (merge_state*)ud;
|
|
1607
|
+
int cI = (int)voxgig_list_len(voxgig_as_list(path));
|
|
1608
|
+
voxgig_value* target = voxgig_list_get(voxgig_as_list(st->cur_stack), (size_t)(cI - 1));
|
|
1609
|
+
voxgig_value* value = voxgig_list_get(voxgig_as_list(st->cur_stack), (size_t)cI);
|
|
1610
|
+
if (target)
|
|
1611
|
+
voxgig_setprop(target, key, value);
|
|
1612
|
+
return val ? voxgig_retain(val) : voxgig_new_undef();
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
voxgig_value* voxgig_merge(voxgig_value* val, int maxdepth) {
|
|
1616
|
+
/* slice(maxdepth ?? MAXDEPTH, 0) — TS numeric slice clamps below 0. */
|
|
1617
|
+
int md = maxdepth;
|
|
1618
|
+
if (md < 0)
|
|
1619
|
+
md = 0;
|
|
1620
|
+
if (md > VOXGIG_MAXDEPTH)
|
|
1621
|
+
md = VOXGIG_MAXDEPTH;
|
|
1622
|
+
|
|
1623
|
+
if (!voxgig_is_list(val))
|
|
1624
|
+
return val ? voxgig_retain(val) : voxgig_new_undef();
|
|
1625
|
+
voxgig_list* l = voxgig_as_list(val);
|
|
1626
|
+
size_t n = l->len;
|
|
1627
|
+
if (n == 0)
|
|
1628
|
+
return voxgig_new_undef();
|
|
1629
|
+
if (n == 1)
|
|
1630
|
+
return voxgig_retain(l->items[0]);
|
|
1631
|
+
|
|
1632
|
+
voxgig_value* out = voxgig_list_get(l, 0);
|
|
1633
|
+
out = out ? voxgig_retain(out) : voxgig_new_map();
|
|
1634
|
+
|
|
1635
|
+
for (size_t oI = 1; oI < n; oI++) {
|
|
1636
|
+
voxgig_value* obj = l->items[oI];
|
|
1637
|
+
if (!voxgig_is_node(obj)) {
|
|
1638
|
+
voxgig_release(out);
|
|
1639
|
+
out = obj ? voxgig_retain(obj) : voxgig_new_undef();
|
|
1640
|
+
} else {
|
|
1641
|
+
merge_state st;
|
|
1642
|
+
st.cur_stack = voxgig_new_list();
|
|
1643
|
+
st.dst_stack = voxgig_new_list();
|
|
1644
|
+
voxgig_list_push(voxgig_as_list(st.cur_stack), voxgig_retain(out));
|
|
1645
|
+
voxgig_list_push(voxgig_as_list(st.dst_stack), voxgig_retain(out));
|
|
1646
|
+
st.maxdepth = md;
|
|
1647
|
+
|
|
1648
|
+
voxgig_value* walked = voxgig_walk(obj, merge_before, merge_after, md, &st);
|
|
1649
|
+
/* out = walk(obj, before, after, maxdepth) — TS reassigns. The walk
|
|
1650
|
+
callbacks update cur[0]; we use cur[0] as the new out. */
|
|
1651
|
+
voxgig_value* newcur = voxgig_list_get(voxgig_as_list(st.cur_stack), 0);
|
|
1652
|
+
if (newcur) {
|
|
1653
|
+
voxgig_release(out);
|
|
1654
|
+
out = voxgig_retain(newcur);
|
|
1655
|
+
}
|
|
1656
|
+
voxgig_release(walked);
|
|
1657
|
+
voxgig_release(st.cur_stack);
|
|
1658
|
+
voxgig_release(st.dst_stack);
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
if (md == 0) {
|
|
1663
|
+
voxgig_value* last = voxgig_list_get(l, n - 1);
|
|
1664
|
+
voxgig_release(out);
|
|
1665
|
+
if (voxgig_is_list(last))
|
|
1666
|
+
out = voxgig_new_list();
|
|
1667
|
+
else if (voxgig_is_map(last))
|
|
1668
|
+
out = voxgig_new_map();
|
|
1669
|
+
else
|
|
1670
|
+
out = last ? voxgig_retain(last) : voxgig_new_undef();
|
|
1671
|
+
}
|
|
1672
|
+
return out;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
/* ===========================================================================
|
|
1676
|
+
* setpath / getpath
|
|
1677
|
+
* ===========================================================================*/
|
|
1678
|
+
|
|
1679
|
+
voxgig_value* voxgig_setpath(voxgig_value* store, voxgig_value* path, voxgig_value* val,
|
|
1680
|
+
voxgig_injection* injdef) {
|
|
1681
|
+
int pt = voxgig_typify(path);
|
|
1682
|
+
voxgig_value* parts = NULL;
|
|
1683
|
+
bool parts_owned = false;
|
|
1684
|
+
if (pt & VOXGIG_T_LIST) {
|
|
1685
|
+
parts = path;
|
|
1686
|
+
} else if (pt & VOXGIG_T_STRING) {
|
|
1687
|
+
parts = voxgig_new_list();
|
|
1688
|
+
parts_owned = true;
|
|
1689
|
+
const char* s = voxgig_as_string(path);
|
|
1690
|
+
size_t n = voxgig_string_len(path);
|
|
1691
|
+
size_t i = 0;
|
|
1692
|
+
while (i <= n) {
|
|
1693
|
+
size_t j = i;
|
|
1694
|
+
while (j < n && s[j] != '.')
|
|
1695
|
+
j++;
|
|
1696
|
+
voxgig_list_push(voxgig_as_list(parts), voxgig_new_string_n(s + i, j - i));
|
|
1697
|
+
i = j + 1;
|
|
1698
|
+
if (j == n)
|
|
1699
|
+
break;
|
|
1700
|
+
}
|
|
1701
|
+
} else if (pt & VOXGIG_T_NUMBER) {
|
|
1702
|
+
parts = voxgig_new_list();
|
|
1703
|
+
parts_owned = true;
|
|
1704
|
+
voxgig_list_push(voxgig_as_list(parts), voxgig_retain(path));
|
|
1705
|
+
} else {
|
|
1706
|
+
return NULL;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
voxgig_value* base_v = NULL;
|
|
1710
|
+
if (injdef && injdef->base) {
|
|
1711
|
+
base_v = voxgig_map_get(voxgig_as_map(store), injdef->base);
|
|
1712
|
+
}
|
|
1713
|
+
voxgig_value* parent = base_v ? base_v : store;
|
|
1714
|
+
|
|
1715
|
+
size_t nparts = voxgig_list_len(voxgig_as_list(parts));
|
|
1716
|
+
for (size_t pI = 0; pI + 1 < nparts; pI++) {
|
|
1717
|
+
voxgig_value* partKey = voxgig_list_get(voxgig_as_list(parts), pI);
|
|
1718
|
+
voxgig_value* nextParent = voxgig_getprop(parent, partKey, NULL);
|
|
1719
|
+
if (!voxgig_is_node(nextParent)) {
|
|
1720
|
+
voxgig_release(nextParent);
|
|
1721
|
+
voxgig_value* nextKey = voxgig_list_get(voxgig_as_list(parts), pI + 1);
|
|
1722
|
+
int nkt = voxgig_typify(nextKey);
|
|
1723
|
+
nextParent = (nkt & VOXGIG_T_NUMBER) ? voxgig_new_list() : voxgig_new_map();
|
|
1724
|
+
voxgig_setprop(parent, partKey, nextParent);
|
|
1725
|
+
/* nextParent ref ownership: voxgig_setprop retains, so we need to release our own. */
|
|
1726
|
+
voxgig_value* held = nextParent;
|
|
1727
|
+
nextParent = voxgig_getprop(parent, partKey, NULL);
|
|
1728
|
+
voxgig_release(held);
|
|
1729
|
+
}
|
|
1730
|
+
parent = nextParent;
|
|
1731
|
+
/* Release temporary borrowed ref carefully. nextParent was returned with
|
|
1732
|
+
a new ref via voxgig_getprop, so it's owned now; we'll leak refcount unless
|
|
1733
|
+
balanced. Reduce by 1 via release at end of loop. */
|
|
1734
|
+
/* For simplicity, treat parent as borrowed; release at end. */
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
voxgig_value* lastKey = nparts > 0 ? voxgig_list_get(voxgig_as_list(parts), nparts - 1) : NULL;
|
|
1738
|
+
if (val && voxgig_is_delete(val)) {
|
|
1739
|
+
voxgig_delprop(parent, lastKey);
|
|
1740
|
+
} else {
|
|
1741
|
+
voxgig_setprop(parent, lastKey, val);
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
if (parts_owned)
|
|
1745
|
+
voxgig_release(parts);
|
|
1746
|
+
return parent;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
/* getpath: see TS reference, lines 1082–1188. */
|
|
1750
|
+
voxgig_value* voxgig_getpath(voxgig_value* store, voxgig_value* path, voxgig_injection* injdef) {
|
|
1751
|
+
/* Parse path into string list. */
|
|
1752
|
+
voxgig_strvec parts;
|
|
1753
|
+
voxgig_strvec_init(&parts);
|
|
1754
|
+
bool path_ok = false;
|
|
1755
|
+
if (voxgig_is_list(path)) {
|
|
1756
|
+
voxgig_list* l = voxgig_as_list(path);
|
|
1757
|
+
for (size_t i = 0; i < l->len; i++) {
|
|
1758
|
+
char* sk = voxgig_strkey(l->items[i]);
|
|
1759
|
+
voxgig_strvec_push(&parts, sk);
|
|
1760
|
+
free(sk);
|
|
1761
|
+
}
|
|
1762
|
+
path_ok = true;
|
|
1763
|
+
} else if (voxgig_is_string(path)) {
|
|
1764
|
+
const char* s = voxgig_as_string(path);
|
|
1765
|
+
size_t n = voxgig_string_len(path);
|
|
1766
|
+
size_t i = 0;
|
|
1767
|
+
while (i <= n) {
|
|
1768
|
+
size_t j = i;
|
|
1769
|
+
while (j < n && s[j] != '.')
|
|
1770
|
+
j++;
|
|
1771
|
+
voxgig_strvec_push_n(&parts, s + i, j - i);
|
|
1772
|
+
i = j + 1;
|
|
1773
|
+
if (j == n)
|
|
1774
|
+
break;
|
|
1775
|
+
}
|
|
1776
|
+
path_ok = true;
|
|
1777
|
+
} else if (voxgig_is_number(path)) {
|
|
1778
|
+
char* sk = voxgig_strkey(path);
|
|
1779
|
+
voxgig_strvec_push(&parts, sk);
|
|
1780
|
+
free(sk);
|
|
1781
|
+
path_ok = true;
|
|
1782
|
+
}
|
|
1783
|
+
if (!path_ok)
|
|
1784
|
+
return voxgig_new_undef();
|
|
1785
|
+
|
|
1786
|
+
voxgig_value* val = store ? voxgig_retain(store) : voxgig_new_undef();
|
|
1787
|
+
voxgig_value* base_v = NULL;
|
|
1788
|
+
if (injdef && injdef->base) {
|
|
1789
|
+
voxgig_value* keyv = voxgig_new_string(injdef->base);
|
|
1790
|
+
base_v = voxgig_getprop(store, keyv, NULL);
|
|
1791
|
+
voxgig_release(keyv);
|
|
1792
|
+
}
|
|
1793
|
+
voxgig_value* src = base_v && !voxgig_is_undef(base_v)
|
|
1794
|
+
? base_v
|
|
1795
|
+
: (store ? voxgig_retain(store) : voxgig_new_undef());
|
|
1796
|
+
if (!base_v || voxgig_is_undef(base_v)) {
|
|
1797
|
+
voxgig_release(base_v);
|
|
1798
|
+
}
|
|
1799
|
+
size_t numparts = parts.len;
|
|
1800
|
+
voxgig_value* dparent =
|
|
1801
|
+
injdef ? (injdef->dparent ? voxgig_retain(injdef->dparent) : voxgig_new_undef())
|
|
1802
|
+
: voxgig_new_undef();
|
|
1803
|
+
bool emptypath = false;
|
|
1804
|
+
if (!path || voxgig_is_undef(path) || !store || (numparts == 1 && parts.data[0][0] == '\0')) {
|
|
1805
|
+
emptypath = true;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
if (emptypath) {
|
|
1809
|
+
voxgig_release(val);
|
|
1810
|
+
val = voxgig_retain(src);
|
|
1811
|
+
} else if (numparts > 0) {
|
|
1812
|
+
/* Check for $ACTIONs. */
|
|
1813
|
+
if (numparts == 1) {
|
|
1814
|
+
voxgig_value* k = voxgig_new_string(parts.data[0]);
|
|
1815
|
+
voxgig_value* tv = voxgig_getprop(store, k, NULL);
|
|
1816
|
+
voxgig_release(k);
|
|
1817
|
+
voxgig_release(val);
|
|
1818
|
+
val = tv;
|
|
1819
|
+
}
|
|
1820
|
+
if (!voxgig_is_func(val)) {
|
|
1821
|
+
voxgig_release(val);
|
|
1822
|
+
val = voxgig_retain(src);
|
|
1823
|
+
|
|
1824
|
+
/* Meta path regex: ^([^$]+)\$([=~])(.+)$ */
|
|
1825
|
+
if (injdef && injdef->meta && numparts > 0) {
|
|
1826
|
+
const char* p0 = parts.data[0];
|
|
1827
|
+
const char* dol = strchr(p0, '$');
|
|
1828
|
+
if (dol && dol != p0) {
|
|
1829
|
+
char sep = dol[1];
|
|
1830
|
+
if (sep == '=' || sep == '~') {
|
|
1831
|
+
char* lhs = xstrndup_s(p0, dol - p0);
|
|
1832
|
+
char* rhs = xstrdup_s(dol + 2);
|
|
1833
|
+
voxgig_value* k = voxgig_new_string(lhs);
|
|
1834
|
+
voxgig_value* tv = voxgig_getprop(injdef->meta, k, NULL);
|
|
1835
|
+
voxgig_release(k);
|
|
1836
|
+
voxgig_release(val);
|
|
1837
|
+
val = tv;
|
|
1838
|
+
voxgig_strvec_set(&parts, 0, rhs);
|
|
1839
|
+
free(lhs);
|
|
1840
|
+
free(rhs);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
for (size_t pI = 0; !voxgig_is_undef(val) && pI < numparts; pI++) {
|
|
1846
|
+
char* part = xstrdup_s(parts.data[pI]);
|
|
1847
|
+
|
|
1848
|
+
if (injdef && strcmp(part, "$KEY") == 0) {
|
|
1849
|
+
if (injdef->key) {
|
|
1850
|
+
free(part);
|
|
1851
|
+
part = xstrdup_s(injdef->key);
|
|
1852
|
+
}
|
|
1853
|
+
} else if (injdef && strncmp(part, "$GET:", 5) == 0) {
|
|
1854
|
+
/* $GET:path$ - inner path is part[5..len-1] */
|
|
1855
|
+
size_t pl = strlen(part);
|
|
1856
|
+
if (pl > 5 && part[pl - 1] == '$') {
|
|
1857
|
+
char* inner = xstrndup_s(part + 5, pl - 6);
|
|
1858
|
+
voxgig_value* ipath = voxgig_new_string(inner);
|
|
1859
|
+
free(inner);
|
|
1860
|
+
voxgig_value* iv = voxgig_getpath(src, ipath, NULL);
|
|
1861
|
+
voxgig_release(ipath);
|
|
1862
|
+
free(part);
|
|
1863
|
+
part = voxgig_stringify(iv, -1);
|
|
1864
|
+
voxgig_release(iv);
|
|
1865
|
+
}
|
|
1866
|
+
} else if (injdef && strncmp(part, "$REF:", 5) == 0) {
|
|
1867
|
+
size_t pl = strlen(part);
|
|
1868
|
+
if (pl > 5 && part[pl - 1] == '$') {
|
|
1869
|
+
char* inner = xstrndup_s(part + 5, pl - 6);
|
|
1870
|
+
voxgig_value* spec_key = voxgig_new_string("$SPEC");
|
|
1871
|
+
voxgig_value* spec = voxgig_getprop(store, spec_key, NULL);
|
|
1872
|
+
voxgig_release(spec_key);
|
|
1873
|
+
voxgig_value* ipath = voxgig_new_string(inner);
|
|
1874
|
+
free(inner);
|
|
1875
|
+
voxgig_value* iv = voxgig_getpath(spec, ipath, NULL);
|
|
1876
|
+
voxgig_release(spec);
|
|
1877
|
+
voxgig_release(ipath);
|
|
1878
|
+
free(part);
|
|
1879
|
+
part = voxgig_stringify(iv, -1);
|
|
1880
|
+
voxgig_release(iv);
|
|
1881
|
+
}
|
|
1882
|
+
} else if (injdef && strncmp(part, "$META:", 6) == 0) {
|
|
1883
|
+
size_t pl = strlen(part);
|
|
1884
|
+
if (pl > 6 && part[pl - 1] == '$') {
|
|
1885
|
+
char* inner = xstrndup_s(part + 6, pl - 7);
|
|
1886
|
+
voxgig_value* ipath = voxgig_new_string(inner);
|
|
1887
|
+
free(inner);
|
|
1888
|
+
voxgig_value* iv = voxgig_getpath(injdef->meta, ipath, NULL);
|
|
1889
|
+
voxgig_release(ipath);
|
|
1890
|
+
free(part);
|
|
1891
|
+
part = voxgig_stringify(iv, -1);
|
|
1892
|
+
voxgig_release(iv);
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
/* $$ escapes $ */
|
|
1897
|
+
char* unescaped = voxgig_replace_str(part, "$$", "$");
|
|
1898
|
+
free(part);
|
|
1899
|
+
part = unescaped;
|
|
1900
|
+
|
|
1901
|
+
if (part[0] == '\0') {
|
|
1902
|
+
int ascends = 0;
|
|
1903
|
+
while (pI + 1 < numparts && parts.data[pI + 1][0] == '\0') {
|
|
1904
|
+
ascends++;
|
|
1905
|
+
pI++;
|
|
1906
|
+
}
|
|
1907
|
+
if (injdef && ascends > 0) {
|
|
1908
|
+
if (pI == numparts - 1)
|
|
1909
|
+
ascends--;
|
|
1910
|
+
if (ascends == 0) {
|
|
1911
|
+
voxgig_release(val);
|
|
1912
|
+
val = dparent ? voxgig_retain(dparent) : voxgig_new_undef();
|
|
1913
|
+
} else {
|
|
1914
|
+
/* fullpath = flatten([slice(dpath, -ascends), parts.slice(pI+1)])
|
|
1915
|
+
* NOTE: TS slice with negative start clamps via end = vlen+start, so
|
|
1916
|
+
* slice(arr, -ascends) keeps the FIRST (vlen-ascends) elements. */
|
|
1917
|
+
voxgig_value* fp = voxgig_new_list();
|
|
1918
|
+
int dpathlen = (int)(injdef ? injdef->dpath.len : 0);
|
|
1919
|
+
int dend = dpathlen - ascends;
|
|
1920
|
+
if (dend < 0)
|
|
1921
|
+
dend = 0;
|
|
1922
|
+
for (int di = 0; di < dend; di++) {
|
|
1923
|
+
voxgig_list_push(voxgig_as_list(fp), voxgig_new_string(injdef->dpath.data[di]));
|
|
1924
|
+
}
|
|
1925
|
+
for (size_t pj = pI + 1; pj < numparts; pj++) {
|
|
1926
|
+
voxgig_list_push(voxgig_as_list(fp), voxgig_new_string(parts.data[pj]));
|
|
1927
|
+
}
|
|
1928
|
+
if (ascends <= dpathlen) {
|
|
1929
|
+
voxgig_release(val);
|
|
1930
|
+
val = voxgig_getpath(store, fp, NULL);
|
|
1931
|
+
} else {
|
|
1932
|
+
voxgig_release(val);
|
|
1933
|
+
val = voxgig_new_undef();
|
|
1934
|
+
}
|
|
1935
|
+
voxgig_release(fp);
|
|
1936
|
+
free(part);
|
|
1937
|
+
break;
|
|
1938
|
+
}
|
|
1939
|
+
} else {
|
|
1940
|
+
voxgig_release(val);
|
|
1941
|
+
val = dparent ? voxgig_retain(dparent) : voxgig_new_undef();
|
|
1942
|
+
}
|
|
1943
|
+
} else {
|
|
1944
|
+
voxgig_value* k = voxgig_new_string(part);
|
|
1945
|
+
voxgig_value* nv = voxgig_lookup(val, k);
|
|
1946
|
+
voxgig_release(k);
|
|
1947
|
+
voxgig_value* tv = nv ? voxgig_retain(nv) : voxgig_new_undef();
|
|
1948
|
+
voxgig_release(val);
|
|
1949
|
+
val = tv;
|
|
1950
|
+
}
|
|
1951
|
+
free(part);
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
voxgig_release(dparent);
|
|
1957
|
+
voxgig_release(src);
|
|
1958
|
+
voxgig_strvec_free(&parts);
|
|
1959
|
+
|
|
1960
|
+
/* Handler from injdef. */
|
|
1961
|
+
if (injdef && injdef->handler_val && voxgig_is_func(injdef->handler_val)) {
|
|
1962
|
+
char* ref = voxgig_pathify(path, 0, 0);
|
|
1963
|
+
voxgig_value* tv =
|
|
1964
|
+
injdef->handler_val->as.fn.fn.inj(injdef, val, ref, store, injdef->handler_val->as.fn.ud);
|
|
1965
|
+
free(ref);
|
|
1966
|
+
voxgig_release(val);
|
|
1967
|
+
val = tv;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
return val ? val : voxgig_new_undef();
|
|
1971
|
+
}
|