@voxgig/sdkgen 4.32.1 → 4.33.0
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/helpers/naming.js +1 -1
- package/dist/helpers/naming.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aontu +7 -1
- package/package.json +1 -1
- package/project/.sdk/model/feature/debug.aontu +3 -1
- package/project/.sdk/src/cmp/c/PrepareAuth_c.ts +8 -28
- package/project/.sdk/src/cmp/c/TestClean_c.ts +774 -0
- package/project/.sdk/src/cmp/c/Test_c.ts +3 -0
- package/project/.sdk/src/cmp/c/fragment/Entity.fragment.c +16 -5
- package/project/.sdk/src/cmp/c/fragment/Main.fragment.c +1 -1
- package/project/.sdk/src/cmp/clojure/PrepareAuth_clojure.ts +3 -0
- package/project/.sdk/src/cmp/clojure/TestClean_clojure.ts +473 -0
- package/project/.sdk/src/cmp/clojure/Test_clojure.ts +6 -0
- package/project/.sdk/src/cmp/clojure/fragment/Entity.fragment.clj +18 -8
- package/project/.sdk/src/cmp/cpp/PrepareAuth_cpp.ts +3 -0
- package/project/.sdk/src/cmp/cpp/TestClean_cpp.ts +782 -0
- package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +1 -1
- package/project/.sdk/src/cmp/cpp/Test_cpp.ts +2 -0
- package/project/.sdk/src/cmp/csharp/PrepareAuth_csharp.ts +3 -0
- package/project/.sdk/src/cmp/csharp/TestClean_csharp.ts +887 -0
- package/project/.sdk/src/cmp/csharp/Test_csharp.ts +2 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityBase.fragment.cs +68 -4
- package/project/.sdk/src/cmp/csharp/fragment/Main.fragment.cs +8 -2
- package/project/.sdk/src/cmp/csharp/fragment/SdkError.fragment.cs +49 -0
- package/project/.sdk/src/cmp/elixir/PrepareAuth_elixir.ts +3 -0
- package/project/.sdk/src/cmp/elixir/Schema_elixir.ts +20 -10
- package/project/.sdk/src/cmp/elixir/TestClean_elixir.ts +666 -0
- package/project/.sdk/src/cmp/elixir/Test_elixir.ts +4 -0
- package/project/.sdk/src/cmp/elixir/fragment/Main.fragment.ex +1 -1
- package/project/.sdk/src/cmp/elixir/fragment/Pipeline.fragment.ex +14 -2
- package/project/.sdk/src/cmp/go/PrepareAuth_go.ts +3 -0
- package/project/.sdk/src/cmp/go/TestClean_go.ts +804 -0
- package/project/.sdk/src/cmp/go/Test_go.ts +3 -0
- package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +54 -4
- package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +27 -2
- package/project/.sdk/src/cmp/java/PrepareAuth_java.ts +3 -0
- package/project/.sdk/src/cmp/java/TestClean_java.ts +884 -0
- package/project/.sdk/src/cmp/java/Test_java.ts +2 -0
- package/project/.sdk/src/cmp/java/fragment/EntityBase.fragment.java +56 -11
- package/project/.sdk/src/cmp/java/fragment/SdkError.fragment.java +36 -3
- package/project/.sdk/src/cmp/js/PrepareAuth_js.ts +3 -0
- package/project/.sdk/src/cmp/js/TestClean_js.ts +458 -0
- package/project/.sdk/src/cmp/js/Test_js.ts +2 -0
- package/project/.sdk/src/cmp/js/fragment/EntityBase.fragment.js +5 -4
- package/project/.sdk/src/cmp/js/fragment/EntityCreateOp.fragment.js +7 -1
- package/project/.sdk/src/cmp/js/fragment/EntityListOp.fragment.js +7 -1
- package/project/.sdk/src/cmp/js/fragment/EntityLoadOp.fragment.js +7 -1
- package/project/.sdk/src/cmp/js/fragment/EntityRemoveOp.fragment.js +7 -1
- package/project/.sdk/src/cmp/js/fragment/EntityUpdateOp.fragment.js +7 -1
- package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +11 -2
- package/project/.sdk/src/cmp/js/fragment/SdkError.fragment.js +17 -1
- package/project/.sdk/src/cmp/kotlin/Package_kotlin.ts +5 -0
- package/project/.sdk/src/cmp/kotlin/PrepareAuth_kotlin.ts +3 -0
- package/project/.sdk/src/cmp/kotlin/TestClean_kotlin.ts +654 -0
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +3 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityBase.fragment.kt +44 -11
- package/project/.sdk/src/cmp/kotlin/fragment/SdkError.fragment.kt +31 -0
- package/project/.sdk/src/cmp/lua/PrepareAuth_lua.ts +3 -0
- package/project/.sdk/src/cmp/lua/TestClean_lua.ts +769 -0
- package/project/.sdk/src/cmp/lua/Test_lua.ts +3 -0
- package/project/.sdk/src/cmp/lua/fragment/Entity.fragment.lua +77 -1
- package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +49 -2
- package/project/.sdk/src/cmp/ocaml/Entity_ocaml.ts +3 -2
- package/project/.sdk/src/cmp/ocaml/PrepareAuth_ocaml.ts +4 -25
- package/project/.sdk/src/cmp/ocaml/TestClean_ocaml.ts +538 -0
- package/project/.sdk/src/cmp/ocaml/Test_ocaml.ts +5 -0
- package/project/.sdk/src/cmp/ocaml/fragment/RunOp.fragment.ml +16 -4
- package/project/.sdk/src/cmp/perl/PrepareAuth_perl.ts +3 -0
- package/project/.sdk/src/cmp/perl/TestClean_perl.ts +619 -0
- package/project/.sdk/src/cmp/perl/Test_perl.ts +3 -0
- package/project/.sdk/src/cmp/perl/fragment/Entity.fragment.pm +67 -5
- package/project/.sdk/src/cmp/perl/fragment/Main.fragment.pm +13 -1
- package/project/.sdk/src/cmp/php/PrepareAuth_php.ts +3 -0
- package/project/.sdk/src/cmp/php/TestClean_php.ts +809 -0
- package/project/.sdk/src/cmp/php/Test_php.ts +2 -0
- package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +96 -55
- package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +15 -2
- package/project/.sdk/src/cmp/py/PrepareAuth_py.ts +3 -0
- package/project/.sdk/src/cmp/py/TestClean_py.ts +549 -0
- package/project/.sdk/src/cmp/py/Test_py.ts +3 -0
- package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +83 -55
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +19 -3
- package/project/.sdk/src/cmp/rb/PrepareAuth_rb.ts +3 -0
- package/project/.sdk/src/cmp/rb/TestClean_rb.ts +535 -0
- package/project/.sdk/src/cmp/rb/Test_rb.ts +3 -0
- package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +108 -46
- package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +12 -1
- package/project/.sdk/src/cmp/rust/PrepareAuth_rust.ts +9 -45
- package/project/.sdk/src/cmp/rust/TestClean_rust.ts +881 -0
- package/project/.sdk/src/cmp/rust/Test_rust.ts +3 -0
- package/project/.sdk/src/cmp/rust/fragment/Entity.fragment.rs +14 -6
- package/project/.sdk/src/cmp/rust/fragment/Main.fragment.rs +17 -1
- package/project/.sdk/src/cmp/rust/fragment/SdkError.fragment.rs +34 -2
- package/project/.sdk/src/cmp/scala/PrepareAuth_scala.ts +3 -0
- package/project/.sdk/src/cmp/scala/TestClean_scala.ts +608 -0
- package/project/.sdk/src/cmp/scala/Test_scala.ts +3 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityBase.fragment.scala +58 -6
- package/project/.sdk/src/cmp/swift/PrepareAuth_swift.ts +3 -0
- package/project/.sdk/src/cmp/swift/TestClean_swift.ts +671 -0
- package/project/.sdk/src/cmp/swift/Test_swift.ts +3 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityBase.fragment.swift +10 -0
- package/project/.sdk/src/cmp/swift/fragment/Main.fragment.swift +16 -2
- package/project/.sdk/src/cmp/swift/fragment/SdkError.fragment.swift +47 -3
- package/project/.sdk/src/cmp/ts/PrepareAuth_ts.ts +3 -0
- package/project/.sdk/src/cmp/ts/TestClean_ts.ts +465 -0
- package/project/.sdk/src/cmp/ts/Test_ts.ts +2 -0
- package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +5 -4
- package/project/.sdk/src/cmp/ts/fragment/EntityCreateOp.fragment.ts +7 -1
- package/project/.sdk/src/cmp/ts/fragment/EntityListOp.fragment.ts +7 -1
- package/project/.sdk/src/cmp/ts/fragment/EntityLoadOp.fragment.ts +7 -1
- package/project/.sdk/src/cmp/ts/fragment/EntityRemoveOp.fragment.ts +7 -1
- package/project/.sdk/src/cmp/ts/fragment/EntityUpdateOp.fragment.ts +7 -1
- package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +8 -2
- package/project/.sdk/src/cmp/ts/fragment/SdkError.fragment.ts +20 -2
- package/project/.sdk/src/cmp/zig/PrepareAuth_zig.ts +3 -0
- package/project/.sdk/src/cmp/zig/TestClean_zig.ts +791 -0
- package/project/.sdk/src/cmp/zig/Test_zig.ts +5 -0
- package/project/.sdk/src/cmp/zig/fragment/Build.fragment.zig +19 -0
- package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +14 -5
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +1 -1
- package/project/.sdk/tm/c/core/context.c +25 -0
- package/project/.sdk/tm/c/core/error.c +16 -0
- package/project/.sdk/tm/c/core/sdk.h +22 -0
- package/project/.sdk/tm/c/feature/audit.c +2 -0
- package/project/.sdk/tm/c/feature/cost.c +1 -0
- package/project/.sdk/tm/c/feature/debug.c +19 -29
- package/project/.sdk/tm/c/feature/log.c +21 -2
- package/project/.sdk/tm/c/feature/proxy.c +55 -3
- package/project/.sdk/tm/c/feature/secrets.c +7 -0
- package/project/.sdk/tm/c/feature/telemetry.c +2 -0
- package/project/.sdk/tm/c/tests/feature_test.c +2 -2
- package/project/.sdk/tm/c/utility/clean.c +530 -8
- package/project/.sdk/tm/c/utility/done.c +28 -12
- package/project/.sdk/tm/c/utility/make_error.c +4 -3
- package/project/.sdk/tm/c/utility/make_options.c +71 -45
- package/project/.sdk/tm/clojure/feature/secrets/sdk/feature/secrets.clj +15 -0
- package/project/.sdk/tm/clojure/src/sdk/client.clj +20 -4
- package/project/.sdk/tm/clojure/src/sdk/core.clj +319 -35
- package/project/.sdk/tm/clojure/src/sdk/features.clj +68 -30
- package/project/.sdk/tm/clojure/test/sdk/test/feature.clj +4 -2
- package/project/.sdk/tm/clojure/test/sdk/test/pipeline.clj +47 -20
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +4 -0
- package/project/.sdk/tm/cpp/core/types.hpp +93 -3
- package/project/.sdk/tm/cpp/feature/audit.hpp +1 -0
- package/project/.sdk/tm/cpp/feature/cost.hpp +1 -0
- package/project/.sdk/tm/cpp/feature/debug.hpp +20 -12
- package/project/.sdk/tm/cpp/feature/log.hpp +31 -9
- package/project/.sdk/tm/cpp/feature/proxy.hpp +52 -6
- package/project/.sdk/tm/cpp/feature/secrets.hpp +13 -0
- package/project/.sdk/tm/cpp/feature/telemetry.hpp +4 -2
- package/project/.sdk/tm/cpp/test/feature_test.cpp +2 -2
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +426 -51
- package/project/.sdk/tm/csharp/core/Context.cs +32 -0
- package/project/.sdk/tm/csharp/core/Utility.cs +2 -0
- package/project/.sdk/tm/csharp/feature/AuditFeature.cs +1 -0
- package/project/.sdk/tm/csharp/feature/CostFeature.cs +7 -5
- package/project/.sdk/tm/csharp/feature/DebugFeature.cs +19 -16
- package/project/.sdk/tm/csharp/feature/FeatureOptions.cs +16 -0
- package/project/.sdk/tm/csharp/feature/LogFeature.cs +4 -1
- package/project/.sdk/tm/csharp/feature/ProxyFeature.cs +26 -5
- package/project/.sdk/tm/csharp/feature/SecretsFeature.cs +16 -0
- package/project/.sdk/tm/csharp/feature/TelemetryFeature.cs +4 -2
- package/project/.sdk/tm/csharp/test/FeatureTest.cs +2 -2
- package/project/.sdk/tm/csharp/utility/Clean.cs +440 -2
- package/project/.sdk/tm/csharp/utility/Done.cs +27 -11
- package/project/.sdk/tm/csharp/utility/MakeError.cs +19 -8
- package/project/.sdk/tm/csharp/utility/MakeOptions.cs +119 -29
- package/project/.sdk/tm/csharp/utility/MakeResponse.cs +21 -11
- package/project/.sdk/tm/csharp/utility/Register.cs +1 -0
- package/project/.sdk/tm/elixir/lib/projectname/context.ex +19 -0
- package/project/.sdk/tm/elixir/lib/projectname/entity_base.ex +22 -1
- package/project/.sdk/tm/elixir/lib/projectname/error.ex +24 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/audit.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/cost.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/debug.ex +13 -13
- package/project/.sdk/tm/elixir/lib/projectname/feature/log.ex +18 -5
- package/project/.sdk/tm/elixir/lib/projectname/feature/proxy.ex +19 -1
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets.ex +15 -0
- package/project/.sdk/tm/elixir/lib/projectname/feature/telemetry.ex +4 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature.ex +22 -0
- package/project/.sdk/tm/elixir/lib/projectname/utility.ex +464 -41
- package/project/.sdk/tm/elixir/test/feature_test.exs +3 -2
- package/project/.sdk/tm/go/core/context.go +42 -0
- package/project/.sdk/tm/go/core/error.go +30 -10
- package/project/.sdk/tm/go/core/utility_type.go +2 -0
- package/project/.sdk/tm/go/feature/audit_feature.go +1 -0
- package/project/.sdk/tm/go/feature/base_feature.go +12 -0
- package/project/.sdk/tm/go/feature/cost_feature.go +2 -2
- package/project/.sdk/tm/go/feature/debug_feature.go +14 -12
- package/project/.sdk/tm/go/feature/log_feature.go +13 -8
- package/project/.sdk/tm/go/feature/proxy_feature.go +26 -6
- package/project/.sdk/tm/go/feature/secrets_feature.go +19 -0
- package/project/.sdk/tm/go/feature/telemetry_feature.go +4 -2
- package/project/.sdk/tm/go/test/feature_test.go +2 -2
- package/project/.sdk/tm/go/utility/clean.go +585 -2
- package/project/.sdk/tm/go/utility/done.go +29 -9
- package/project/.sdk/tm/go/utility/make_error.go +51 -16
- package/project/.sdk/tm/go/utility/make_options.go +77 -36
- package/project/.sdk/tm/go/utility/register.go +12 -0
- package/project/.sdk/tm/java/core/Context.java +29 -0
- package/project/.sdk/tm/java/core/SdkClient.java +4 -2
- package/project/.sdk/tm/java/core/Utility.java +7 -0
- package/project/.sdk/tm/java/feature/AuditFeature.java +6 -0
- package/project/.sdk/tm/java/feature/CostFeature.java +5 -0
- package/project/.sdk/tm/java/feature/DebugFeature.java +25 -14
- package/project/.sdk/tm/java/feature/LogFeature.java +11 -4
- package/project/.sdk/tm/java/feature/ProxyFeature.java +41 -6
- package/project/.sdk/tm/java/feature/SecretsFeature.java +18 -0
- package/project/.sdk/tm/java/feature/TelemetryFeature.java +8 -2
- package/project/.sdk/tm/java/test/FeatureTest.java +2 -2
- package/project/.sdk/tm/java/utility/Clean.java +519 -1
- package/project/.sdk/tm/java/utility/Done.java +1 -1
- package/project/.sdk/tm/java/utility/MakeError.java +5 -1
- package/project/.sdk/tm/java/utility/MakeOptions.java +55 -31
- package/project/.sdk/tm/java/utility/Register.java +4 -0
- package/project/.sdk/tm/js/src/Context.js +5 -1
- package/project/.sdk/tm/js/src/feature/audit/AuditFeature.js +2 -2
- package/project/.sdk/tm/js/src/feature/cost/CostFeature.js +2 -2
- package/project/.sdk/tm/js/src/feature/debug/DebugFeature.js +13 -7
- package/project/.sdk/tm/js/src/feature/log/LogFeature.js +9 -5
- package/project/.sdk/tm/js/src/feature/proxy/ProxyFeature.js +19 -1
- package/project/.sdk/tm/js/src/feature/secrets/SecretsFeature.js +14 -0
- package/project/.sdk/tm/js/src/feature/telemetry/TelemetryFeature.js +4 -2
- package/project/.sdk/tm/js/src/utility/CleanUtility.js +294 -21
- package/project/.sdk/tm/js/src/utility/DoneUtility.js +17 -5
- package/project/.sdk/tm/js/src/utility/MakeErrorUtility.js +18 -2
- package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +39 -15
- package/project/.sdk/tm/js/src/utility/Utility.js +4 -2
- package/project/.sdk/tm/js/test/feature/harness.js +11 -1
- package/project/.sdk/tm/js/test/feature.test.js +9 -2
- package/project/.sdk/tm/kotlin/core/Context.kt +19 -0
- package/project/.sdk/tm/kotlin/core/SdkClient.kt +9 -2
- package/project/.sdk/tm/kotlin/core/Utility.kt +2 -0
- package/project/.sdk/tm/kotlin/feature/AuditFeature.kt +11 -9
- package/project/.sdk/tm/kotlin/feature/CostFeature.kt +8 -5
- package/project/.sdk/tm/kotlin/feature/DebugFeature.kt +15 -22
- package/project/.sdk/tm/kotlin/feature/LogFeature.kt +8 -4
- package/project/.sdk/tm/kotlin/feature/ProxyFeature.kt +26 -2
- package/project/.sdk/tm/kotlin/feature/SecretsFeature.kt +11 -0
- package/project/.sdk/tm/kotlin/feature/TelemetryFeature.kt +4 -2
- package/project/.sdk/tm/kotlin/test/FeatureTest.kt +2 -2
- package/project/.sdk/tm/kotlin/utility/CoreUtil.kt +447 -11
- package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +38 -31
- package/project/.sdk/tm/kotlin/utility/Register.kt +1 -0
- package/project/.sdk/tm/lua/core/context.lua +43 -0
- package/project/.sdk/tm/lua/core/error.lua +36 -1
- package/project/.sdk/tm/lua/core/utility_type.lua +4 -0
- package/project/.sdk/tm/lua/feature/audit_feature.lua +2 -2
- package/project/.sdk/tm/lua/feature/cost_feature.lua +2 -2
- package/project/.sdk/tm/lua/feature/debug_feature.lua +21 -17
- package/project/.sdk/tm/lua/feature/log_feature.lua +2 -1
- package/project/.sdk/tm/lua/feature/proxy_feature.lua +23 -1
- package/project/.sdk/tm/lua/feature/secrets_feature.lua +18 -0
- package/project/.sdk/tm/lua/feature/telemetry_feature.lua +4 -2
- package/project/.sdk/tm/lua/test/feature/secrets/secrets_feature_test.lua +3 -2
- package/project/.sdk/tm/lua/test/feature_test.lua +10 -3
- package/project/.sdk/tm/lua/utility/clean.lua +426 -2
- package/project/.sdk/tm/lua/utility/clean_explain.lua +34 -0
- package/project/.sdk/tm/lua/utility/done.lua +1 -7
- package/project/.sdk/tm/lua/utility/make_error.lua +3 -1
- package/project/.sdk/tm/lua/utility/make_options.lua +76 -30
- package/project/.sdk/tm/lua/utility/register.lua +4 -1
- package/project/.sdk/tm/ocaml/Makefile +5 -1
- package/project/.sdk/tm/ocaml/feature/secrets_feature.ml +12 -1
- package/project/.sdk/tm/ocaml/sdk_features.ml +78 -18
- package/project/.sdk/tm/ocaml/sdk_helpers.ml +27 -0
- package/project/.sdk/tm/ocaml/sdk_runtime.ml +304 -26
- package/project/.sdk/tm/ocaml/sdk_types.ml +1 -0
- package/project/.sdk/tm/ocaml/test/feature/secrets/t_secrets.ml +3 -1
- package/project/.sdk/tm/ocaml/test/t_feature.ml +2 -2
- package/project/.sdk/tm/perl/core/context.pm +27 -0
- package/project/.sdk/tm/perl/core/error.pm +52 -5
- package/project/.sdk/tm/perl/feature/audit_feature.pm +2 -2
- package/project/.sdk/tm/perl/feature/cost_feature.pm +2 -2
- package/project/.sdk/tm/perl/feature/debug_feature.pm +17 -13
- package/project/.sdk/tm/perl/feature/log_feature.pm +3 -1
- package/project/.sdk/tm/perl/feature/proxy_feature.pm +21 -1
- package/project/.sdk/tm/perl/feature/secrets_feature.pm +20 -1
- package/project/.sdk/tm/perl/feature/telemetry_feature.pm +4 -2
- package/project/.sdk/tm/perl/t/feature.t +4 -2
- package/project/.sdk/tm/perl/utility/clean.pm +345 -1
- package/project/.sdk/tm/perl/utility/done.pm +24 -6
- package/project/.sdk/tm/perl/utility/make_error.pm +17 -4
- package/project/.sdk/tm/perl/utility/make_options.pm +33 -14
- package/project/.sdk/tm/php/core/Context.php +24 -1
- package/project/.sdk/tm/php/core/Error.php +34 -3
- package/project/.sdk/tm/php/core/UtilityType.php +4 -0
- package/project/.sdk/tm/php/feature/AuditFeature.php +2 -2
- package/project/.sdk/tm/php/feature/CostFeature.php +2 -2
- package/project/.sdk/tm/php/feature/DebugFeature.php +18 -9
- package/project/.sdk/tm/php/feature/LogFeature.php +5 -2
- package/project/.sdk/tm/php/feature/ProxyFeature.php +20 -1
- package/project/.sdk/tm/php/feature/SecretsFeature.php +18 -0
- package/project/.sdk/tm/php/feature/TelemetryFeature.php +4 -2
- package/project/.sdk/tm/php/test/FeatureTest.php +2 -2
- package/project/.sdk/tm/php/utility/Clean.php +438 -2
- package/project/.sdk/tm/php/utility/Done.php +14 -7
- package/project/.sdk/tm/php/utility/MakeError.php +9 -7
- package/project/.sdk/tm/php/utility/MakeOptions.php +62 -38
- package/project/.sdk/tm/php/utility/Register.php +2 -0
- package/project/.sdk/tm/py/pkg/core/context.py +17 -0
- package/project/.sdk/tm/py/pkg/core/error.py +42 -1
- package/project/.sdk/tm/py/pkg/core/utility_type.py +4 -0
- package/project/.sdk/tm/py/pkg/feature/audit_feature.py +2 -2
- package/project/.sdk/tm/py/pkg/feature/cost_feature.py +2 -2
- package/project/.sdk/tm/py/pkg/feature/debug_feature.py +17 -12
- package/project/.sdk/tm/py/pkg/feature/log_feature.py +2 -1
- package/project/.sdk/tm/py/pkg/feature/proxy_feature.py +18 -1
- package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +12 -0
- package/project/.sdk/tm/py/pkg/feature/telemetry_feature.py +4 -2
- package/project/.sdk/tm/py/pkg/utility/clean.py +311 -1
- package/project/.sdk/tm/py/pkg/utility/done.py +18 -5
- package/project/.sdk/tm/py/pkg/utility/make_error.py +9 -6
- package/project/.sdk/tm/py/pkg/utility/make_options.py +64 -25
- package/project/.sdk/tm/py/pkg/utility/make_response.py +19 -13
- package/project/.sdk/tm/py/pkg/utility/register.py +4 -2
- package/project/.sdk/tm/py/test/feature_harness.py +4 -0
- package/project/.sdk/tm/py/test/test_feature.py +2 -2
- package/project/.sdk/tm/py/test/test_primary_utility.py +1 -0
- package/project/.sdk/tm/rb/core/context.rb +28 -0
- package/project/.sdk/tm/rb/core/error.rb +30 -0
- package/project/.sdk/tm/rb/core/utility_type.rb +1 -1
- package/project/.sdk/tm/rb/feature/audit_feature.rb +2 -2
- package/project/.sdk/tm/rb/feature/cost_feature.rb +2 -2
- package/project/.sdk/tm/rb/feature/debug_feature.rb +15 -12
- package/project/.sdk/tm/rb/feature/log_feature.rb +3 -1
- package/project/.sdk/tm/rb/feature/proxy_feature.rb +25 -1
- package/project/.sdk/tm/rb/feature/secrets_feature.rb +17 -0
- package/project/.sdk/tm/rb/feature/telemetry_feature.rb +4 -2
- package/project/.sdk/tm/rb/test/feature_test.rb +4 -2
- package/project/.sdk/tm/rb/utility/clean.rb +312 -1
- package/project/.sdk/tm/rb/utility/done.rb +15 -5
- package/project/.sdk/tm/rb/utility/make_error.rb +13 -4
- package/project/.sdk/tm/rb/utility/make_options.rb +31 -12
- package/project/.sdk/tm/rb/utility/register.rb +2 -0
- package/project/.sdk/tm/rust/core/context.rs +55 -0
- package/project/.sdk/tm/rust/core/utility_type.rs +17 -0
- package/project/.sdk/tm/rust/feature/audit.rs +2 -0
- package/project/.sdk/tm/rust/feature/cost.rs +3 -2
- package/project/.sdk/tm/rust/feature/debug.rs +16 -16
- package/project/.sdk/tm/rust/feature/log.rs +42 -7
- package/project/.sdk/tm/rust/feature/proxy.rs +48 -2
- package/project/.sdk/tm/rust/feature/secrets.rs +12 -0
- package/project/.sdk/tm/rust/feature/telemetry.rs +2 -0
- package/project/.sdk/tm/rust/tests/feature_test.rs +2 -2
- package/project/.sdk/tm/rust/utility/clean.rs +446 -5
- package/project/.sdk/tm/rust/utility/done.rs +22 -12
- package/project/.sdk/tm/rust/utility/make_error.rs +4 -1
- package/project/.sdk/tm/rust/utility/make_options.rs +73 -19
- package/project/.sdk/tm/scala/Makefile +3 -1
- package/project/.sdk/tm/scala/core/Context.scala +16 -0
- package/project/.sdk/tm/scala/core/SdkClient.scala +14 -4
- package/project/.sdk/tm/scala/core/SdkError.scala +28 -0
- package/project/.sdk/tm/scala/core/Types.scala +3 -0
- package/project/.sdk/tm/scala/core/Utility.scala +2 -0
- package/project/.sdk/tm/scala/feature/AuditFeature.scala +16 -10
- package/project/.sdk/tm/scala/feature/CostFeature.scala +10 -5
- package/project/.sdk/tm/scala/feature/DebugFeature.scala +24 -21
- package/project/.sdk/tm/scala/feature/LogFeature.scala +9 -4
- package/project/.sdk/tm/scala/feature/ProxyFeature.scala +23 -2
- package/project/.sdk/tm/scala/feature/SecretsFeature.scala +14 -0
- package/project/.sdk/tm/scala/feature/TelemetryFeature.scala +9 -2
- package/project/.sdk/tm/scala/sdktest/SdkTestMain.scala +2 -2
- package/project/.sdk/tm/scala/utility/Make.scala +63 -20
- package/project/.sdk/tm/scala/utility/Misc.scala +358 -5
- package/project/.sdk/tm/scala/utility/Register.scala +1 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Context.swift +29 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Utility.swift +2 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/AuditFeature.swift +10 -9
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/CostFeature.swift +7 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/DebugFeature.swift +19 -15
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/FeatureOptions.swift +16 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/LogFeature.swift +4 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ProxyFeature.swift +20 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/SecretsFeature.swift +13 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TelemetryFeature.swift +4 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeError.swift +15 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +58 -19
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Register.swift +1 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/ResultUtil.swift +391 -4
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/FeatureTest.swift +2 -2
- package/project/.sdk/tm/ts/src/Context.ts +5 -1
- package/project/.sdk/tm/ts/src/feature/audit/AuditFeature.ts +2 -2
- package/project/.sdk/tm/ts/src/feature/cost/CostFeature.ts +2 -2
- package/project/.sdk/tm/ts/src/feature/debug/DebugFeature.ts +13 -7
- package/project/.sdk/tm/ts/src/feature/log/LogFeature.ts +9 -5
- package/project/.sdk/tm/ts/src/feature/proxy/ProxyFeature.ts +19 -1
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +12 -0
- package/project/.sdk/tm/ts/src/feature/telemetry/TelemetryFeature.ts +4 -2
- package/project/.sdk/tm/ts/src/utility/CleanUtility.ts +287 -9
- package/project/.sdk/tm/ts/src/utility/DoneUtility.ts +18 -5
- package/project/.sdk/tm/ts/src/utility/MakeErrorUtility.ts +18 -8
- package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +38 -16
- package/project/.sdk/tm/ts/src/utility/Utility.ts +4 -2
- package/project/.sdk/tm/ts/test/feature/harness.ts +11 -1
- package/project/.sdk/tm/ts/test/feature.test.ts +9 -2
- package/project/.sdk/tm/zig/core/context.zig +34 -0
- package/project/.sdk/tm/zig/core/error.zig +22 -1
- package/project/.sdk/tm/zig/core/utility.zig +403 -39
- package/project/.sdk/tm/zig/feature/audit.zig +4 -2
- package/project/.sdk/tm/zig/feature/cost.zig +3 -2
- package/project/.sdk/tm/zig/feature/debug.zig +20 -25
- package/project/.sdk/tm/zig/feature/log.zig +3 -1
- package/project/.sdk/tm/zig/feature/proxy.zig +47 -6
- package/project/.sdk/tm/zig/feature/secrets.zig +7 -0
- package/project/.sdk/tm/zig/feature/telemetry.zig +4 -2
- package/project/.sdk/tm/zig/test/feature_test.zig +2 -2
- package/project/sdkgen-package.json +1 -1
- package/src/helpers/naming.ts +1 -1
|
@@ -1,25 +1,45 @@
|
|
|
1
1
|
package core
|
|
2
2
|
|
|
3
|
+
import "encoding/json"
|
|
4
|
+
|
|
3
5
|
type ProjectNameError struct {
|
|
4
6
|
IsProjectNameError bool
|
|
5
|
-
Sdk
|
|
6
|
-
Code
|
|
7
|
-
Msg
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
Sdk string
|
|
8
|
+
Code string
|
|
9
|
+
Msg string
|
|
10
|
+
// Reachable for a debugger, invisible to a serialiser: the context holds
|
|
11
|
+
// the live spec and options, and an error is what gets logged.
|
|
12
|
+
Ctx *Context `json:"-"`
|
|
13
|
+
Result any
|
|
14
|
+
Spec any
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
func NewProjectNameError(code string, msg string, ctx *Context) *ProjectNameError {
|
|
14
18
|
return &ProjectNameError{
|
|
15
19
|
IsProjectNameError: true,
|
|
16
|
-
Sdk:
|
|
17
|
-
Code:
|
|
18
|
-
Msg:
|
|
19
|
-
Ctx:
|
|
20
|
+
Sdk: "ProjectName",
|
|
21
|
+
Code: code,
|
|
22
|
+
Msg: msg,
|
|
23
|
+
Ctx: ctx,
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
func (e *ProjectNameError) Error() string {
|
|
24
28
|
return e.Msg
|
|
25
29
|
}
|
|
30
|
+
|
|
31
|
+
// What makeError attached is already cleaned; the context is not part of
|
|
32
|
+
// the record.
|
|
33
|
+
func (e *ProjectNameError) Record() map[string]any {
|
|
34
|
+
return map[string]any{
|
|
35
|
+
"sdk": e.Sdk,
|
|
36
|
+
"code": e.Code,
|
|
37
|
+
"message": e.Msg,
|
|
38
|
+
"result": e.Result,
|
|
39
|
+
"spec": e.Spec,
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
func (e *ProjectNameError) MarshalJSON() ([]byte, error) {
|
|
44
|
+
return json.Marshal(e.Record())
|
|
45
|
+
}
|
|
@@ -2,6 +2,8 @@ package core
|
|
|
2
2
|
|
|
3
3
|
type Utility struct {
|
|
4
4
|
Clean func(ctx *Context, val any) any
|
|
5
|
+
CleanAdd func(ctx *Context, val any)
|
|
6
|
+
CleanExplain func(ctx *Context)
|
|
5
7
|
Done func(ctx *Context) (any, error)
|
|
6
8
|
MakeError func(ctx *Context, err error) (any, error)
|
|
7
9
|
FeatureAdd func(ctx *Context, f Feature)
|
|
@@ -26,6 +26,18 @@ func NewBaseFeature() *BaseFeature {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
// A record on its way to a sink, a buffer or a logger leaves the pipeline,
|
|
30
|
+
// so it is cleaned through the utility slot.
|
|
31
|
+
func fclean(ctx *core.Context, record map[string]any) map[string]any {
|
|
32
|
+
if ctx == nil || ctx.Utility == nil || ctx.Utility.Clean == nil {
|
|
33
|
+
return record
|
|
34
|
+
}
|
|
35
|
+
if out, ok := ctx.Utility.Clean(ctx, record).(map[string]any); ok {
|
|
36
|
+
return out
|
|
37
|
+
}
|
|
38
|
+
return record
|
|
39
|
+
}
|
|
40
|
+
|
|
29
41
|
func (f *BaseFeature) GetVersion() string { return f.Version }
|
|
30
42
|
func (f *BaseFeature) GetName() string { return f.Name }
|
|
31
43
|
func (f *BaseFeature) GetActive() bool { return f.Active }
|
|
@@ -233,7 +233,7 @@ func (f *CostFeature) commit(ctx *core.Context, pending *costPending, entity, op
|
|
|
233
233
|
f.bump(f.Actors, actor, amount)
|
|
234
234
|
|
|
235
235
|
f.seq++
|
|
236
|
-
record := map[string]any{
|
|
236
|
+
record := fclean(ctx, map[string]any{
|
|
237
237
|
"seq": f.seq,
|
|
238
238
|
"entity": entity,
|
|
239
239
|
"op": opname,
|
|
@@ -242,7 +242,7 @@ func (f *CostFeature) commit(ctx *core.Context, pending *costPending, entity, op
|
|
|
242
242
|
"currency": f.Currency,
|
|
243
243
|
"source": source,
|
|
244
244
|
"attempts": pending.attempts,
|
|
245
|
-
}
|
|
245
|
+
})
|
|
246
246
|
f.Last = record
|
|
247
247
|
|
|
248
248
|
if sink, ok := f.options["sink"].(func(map[string]any)); ok {
|
|
@@ -17,11 +17,6 @@ type DebugFeature struct {
|
|
|
17
17
|
|
|
18
18
|
const debugEntryKey = "debug_entry"
|
|
19
19
|
|
|
20
|
-
var debugDefaultRedact = []string{
|
|
21
|
-
"authorization", "cookie", "set-cookie", "api-key", "apikey",
|
|
22
|
-
"x-api-key", "idempotency-key",
|
|
23
|
-
}
|
|
24
|
-
|
|
25
20
|
func NewDebugFeature() *DebugFeature {
|
|
26
21
|
return &DebugFeature{
|
|
27
22
|
BaseFeature: BaseFeature{
|
|
@@ -61,7 +56,7 @@ func (f *DebugFeature) PreRequest(ctx *core.Context) {
|
|
|
61
56
|
} else {
|
|
62
57
|
entry["url"] = ctx.Spec.Path
|
|
63
58
|
}
|
|
64
|
-
entry["headers"] = f.redact(ctx.Spec.Headers)
|
|
59
|
+
entry["headers"] = f.redact(ctx, ctx.Spec.Headers)
|
|
65
60
|
}
|
|
66
61
|
ctx.Out[debugEntryKey] = entry
|
|
67
62
|
}
|
|
@@ -115,6 +110,11 @@ func (f *DebugFeature) finish(ctx *core.Context, ok bool) {
|
|
|
115
110
|
entry["status"] = ctx.Result.Status
|
|
116
111
|
}
|
|
117
112
|
|
|
113
|
+
// The whole entry leaves through the buffer and the callback: the url
|
|
114
|
+
// and the error message can carry a query credential the header mask
|
|
115
|
+
// above never saw.
|
|
116
|
+
entry = fclean(ctx, entry)
|
|
117
|
+
|
|
118
118
|
f.Entries = append(f.Entries, entry)
|
|
119
119
|
max := foptInt(f.options, "max", 100)
|
|
120
120
|
for len(f.Entries) > max {
|
|
@@ -126,14 +126,16 @@ func (f *DebugFeature) finish(ctx *core.Context, ok bool) {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
// The core clean rules apply (clean.keys, every registered value); the
|
|
130
|
+
// feature's own `redact` list ADDS header names on top of them.
|
|
131
|
+
func (f *DebugFeature) redact(ctx *core.Context, headers map[string]any) map[string]any {
|
|
130
132
|
out := map[string]any{}
|
|
131
133
|
if headers == nil {
|
|
132
134
|
return out
|
|
133
135
|
}
|
|
134
|
-
patterns :=
|
|
135
|
-
|
|
136
|
-
patterns =
|
|
136
|
+
patterns := []string{}
|
|
137
|
+
for _, p := range foptStrList(f.options, "redact") {
|
|
138
|
+
patterns = append(patterns, strings.ToLower(p))
|
|
137
139
|
}
|
|
138
140
|
for k, v := range headers {
|
|
139
141
|
masked := false
|
|
@@ -144,10 +146,10 @@ func (f *DebugFeature) redact(headers map[string]any) map[string]any {
|
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
if masked {
|
|
147
|
-
out[k] = "
|
|
149
|
+
out[k] = "[redacted]"
|
|
148
150
|
} else {
|
|
149
151
|
out[k] = v
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
|
-
return out
|
|
154
|
+
return fclean(ctx, out)
|
|
153
155
|
}
|
|
@@ -108,16 +108,21 @@ func (f *LogFeature) loghook(hook string, ctx *core.Context, level string) {
|
|
|
108
108
|
level = "info"
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
// A log line leaves the pipeline, so it carries the cleaned record: the
|
|
112
|
+
// spec after auth holds the credential, and a logger serialises whatever
|
|
113
|
+
// it is handed.
|
|
114
|
+
record := fclean(ctx, map[string]any{
|
|
115
|
+
"hook": hook,
|
|
116
|
+
"op": ctx.Op,
|
|
117
|
+
"spec": ctx.Spec,
|
|
118
|
+
"ctx": ctx.Record(),
|
|
119
|
+
})
|
|
120
|
+
|
|
111
121
|
attrs := []any{
|
|
112
122
|
"hook", hook,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
attrs = append(attrs, "op", ctx.Op.Name)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if ctx.Spec != nil {
|
|
120
|
-
attrs = append(attrs, "spec", ctx.Spec.Method+" "+ctx.Spec.Path)
|
|
123
|
+
"op", record["op"],
|
|
124
|
+
"spec", record["spec"],
|
|
125
|
+
"ctx", record["ctx"],
|
|
121
126
|
}
|
|
122
127
|
|
|
123
128
|
switch level {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package feature
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
neturl "net/url"
|
|
4
5
|
"os"
|
|
5
6
|
"regexp"
|
|
6
7
|
"strings"
|
|
@@ -13,8 +14,10 @@ type ProxyFeature struct {
|
|
|
13
14
|
client *core.ProjectNameSDK
|
|
14
15
|
options map[string]any
|
|
15
16
|
noProxy []string
|
|
17
|
+
url string
|
|
16
18
|
|
|
17
|
-
// Activity tracking (mirrors the ts client._proxy record)
|
|
19
|
+
// Activity tracking (mirrors the ts client._proxy record); the url here
|
|
20
|
+
// is the cleaned one, the routing target keeps its userinfo.
|
|
18
21
|
Routed int
|
|
19
22
|
Url string
|
|
20
23
|
}
|
|
@@ -40,12 +43,12 @@ func (f *ProxyFeature) Init(ctx *core.Context, options map[string]any) {
|
|
|
40
43
|
return
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
f.
|
|
46
|
+
f.url = foptStr(f.options, "url", "")
|
|
44
47
|
noProxy := foptStrList(f.options, "noProxy")
|
|
45
48
|
|
|
46
49
|
if foptBool(f.options, "fromEnv", false) {
|
|
47
|
-
if f.
|
|
48
|
-
f.
|
|
50
|
+
if f.url == "" {
|
|
51
|
+
f.url = firstEnv("HTTPS_PROXY", "https_proxy", "HTTP_PROXY", "http_proxy")
|
|
49
52
|
}
|
|
50
53
|
if noProxy == nil {
|
|
51
54
|
if np := firstEnv("NO_PROXY", "no_proxy"); np != "" {
|
|
@@ -62,6 +65,23 @@ func (f *ProxyFeature) Init(ctx *core.Context, options map[string]any) {
|
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
|
|
68
|
+
// A proxy URL may carry credentials as userinfo, from the option or the
|
|
69
|
+
// environment, and neither is under a sensitive key name.
|
|
70
|
+
f.Url = f.url
|
|
71
|
+
if parsed, err := neturl.Parse(f.url); err == nil && parsed.User != nil {
|
|
72
|
+
password, _ := parsed.User.Password()
|
|
73
|
+
for _, part := range []string{parsed.User.Username(), password} {
|
|
74
|
+
if part != "" && ctx.Utility.CleanAdd != nil {
|
|
75
|
+
ctx.Utility.CleanAdd(ctx, part)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if ctx.Utility.Clean != nil {
|
|
80
|
+
if cleaned, ok := ctx.Utility.Clean(ctx, f.url).(string); ok {
|
|
81
|
+
f.Url = cleaned
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
65
85
|
inner := ctx.Utility.Fetcher
|
|
66
86
|
|
|
67
87
|
ctx.Utility.Fetcher = func(ctx2 *core.Context, url string, fetchdef map[string]any) (any, error) {
|
|
@@ -71,7 +91,7 @@ func (f *ProxyFeature) Init(ctx *core.Context, options map[string]any) {
|
|
|
71
91
|
}
|
|
72
92
|
|
|
73
93
|
func (f *ProxyFeature) route(url string, fetchdef map[string]any) map[string]any {
|
|
74
|
-
if f.
|
|
94
|
+
if f.url == "" || f.bypass(url) {
|
|
75
95
|
return fetchdef
|
|
76
96
|
}
|
|
77
97
|
|
|
@@ -79,7 +99,7 @@ func (f *ProxyFeature) route(url string, fetchdef map[string]any) map[string]any
|
|
|
79
99
|
for k, v := range fetchdef {
|
|
80
100
|
out[k] = v
|
|
81
101
|
}
|
|
82
|
-
out["proxy"] = f.
|
|
102
|
+
out["proxy"] = f.url
|
|
83
103
|
|
|
84
104
|
f.Routed++
|
|
85
105
|
return out
|
|
@@ -120,6 +120,7 @@ func (f *SecretsFeature) Init(ctx *core.Context, options map[string]any) {
|
|
|
120
120
|
specs := []*sekreto.ProviderSpec{}
|
|
121
121
|
|
|
122
122
|
if "" != explicit {
|
|
123
|
+
f.register(explicit)
|
|
123
124
|
key, err := sekreto.EnvKey(f.secretname, "")
|
|
124
125
|
if nil == err {
|
|
125
126
|
specs = append(specs, &sekreto.ProviderSpec{
|
|
@@ -183,6 +184,18 @@ func (f *SecretsFeature) Init(ctx *core.Context, options map[string]any) {
|
|
|
183
184
|
}
|
|
184
185
|
}
|
|
185
186
|
|
|
187
|
+
// Every value this feature resolves or buys is a secret the SDK handles,
|
|
188
|
+
// and none arrives under an option key the intake registration saw.
|
|
189
|
+
func (f *SecretsFeature) register(value string) {
|
|
190
|
+
if "" == value || nil == f.client {
|
|
191
|
+
return
|
|
192
|
+
}
|
|
193
|
+
ctx := f.client.GetRootCtx()
|
|
194
|
+
if nil != ctx && nil != ctx.Utility && nil != ctx.Utility.CleanAdd {
|
|
195
|
+
ctx.Utility.CleanAdd(ctx, value)
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
186
199
|
func (f *SecretsFeature) resolve() error {
|
|
187
200
|
if nil != f.initerr {
|
|
188
201
|
return f.initerr
|
|
@@ -223,6 +236,9 @@ func (f *SecretsFeature) resolveonce() (bool, error) {
|
|
|
223
236
|
if nil != err {
|
|
224
237
|
return false, err
|
|
225
238
|
}
|
|
239
|
+
if has {
|
|
240
|
+
f.register(found)
|
|
241
|
+
}
|
|
226
242
|
|
|
227
243
|
if nil == f.exchange {
|
|
228
244
|
f.mu.Lock()
|
|
@@ -391,6 +407,7 @@ func (f *SecretsFeature) reauth(fetchdef map[string]any, token string) {
|
|
|
391
407
|
func (f *SecretsFeature) buy() (string, error) {
|
|
392
408
|
if "live" != f.client.Mode {
|
|
393
409
|
token := "test-" + f.exchange.response
|
|
410
|
+
f.register(token)
|
|
394
411
|
f.mu.Lock()
|
|
395
412
|
f.cred = token
|
|
396
413
|
f.mu.Unlock()
|
|
@@ -484,6 +501,8 @@ func (f *SecretsFeature) buyonce() (string, error) {
|
|
|
484
501
|
"secrets: token exchange returned no '" + x.response + "' field from " + url)
|
|
485
502
|
}
|
|
486
503
|
|
|
504
|
+
f.register(token)
|
|
505
|
+
|
|
487
506
|
return token, nil
|
|
488
507
|
}
|
|
489
508
|
|
|
@@ -108,11 +108,13 @@ func (f *TelemetryFeature) close(ctx *core.Context, ok bool) {
|
|
|
108
108
|
span["durationMs"] = dur
|
|
109
109
|
span["ok"] = ok
|
|
110
110
|
|
|
111
|
+
out := fclean(ctx, span)
|
|
112
|
+
|
|
111
113
|
f.ActiveSpans--
|
|
112
|
-
f.Spans = append(f.Spans,
|
|
114
|
+
f.Spans = append(f.Spans, out)
|
|
113
115
|
|
|
114
116
|
if exporter, ok := f.options["exporter"].(func(map[string]any)); ok {
|
|
115
|
-
exporter(
|
|
117
|
+
exporter(out)
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
|
|
@@ -812,7 +812,7 @@ func TestFeatureDebug(t *testing.T) {
|
|
|
812
812
|
t.Errorf("expected onEntry for both ops, got %d", len(seen))
|
|
813
813
|
}
|
|
814
814
|
headers, _ := seen[0]["headers"].(map[string]any)
|
|
815
|
-
if headers["authorization"] != "
|
|
815
|
+
if headers["authorization"] != "[redacted]" {
|
|
816
816
|
t.Errorf("expected redacted authorization, got %v", headers["authorization"])
|
|
817
817
|
}
|
|
818
818
|
})
|
|
@@ -839,7 +839,7 @@ func TestFeatureDebug(t *testing.T) {
|
|
|
839
839
|
}))
|
|
840
840
|
h.op(fhOpSpec{op: "load", headers: map[string]any{"x-secret": "hide", "x-ok": "show"}})
|
|
841
841
|
headers, _ := f.Entries[0]["headers"].(map[string]any)
|
|
842
|
-
if headers["x-secret"] != "
|
|
842
|
+
if headers["x-secret"] != "[redacted]" {
|
|
843
843
|
t.Errorf("expected x-secret redacted, got %v", headers["x-secret"])
|
|
844
844
|
}
|
|
845
845
|
if headers["x-ok"] != "show" {
|