@voxgig/sdkgen 4.34.0 → 4.34.1
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/action/copies.d.ts +4 -3
- package/dist/action/copies.js +142 -45
- package/dist/action/copies.js.map +1 -1
- package/dist/action/doctor.d.ts +1 -0
- package/dist/action/doctor.js +6 -2
- package/dist/action/doctor.js.map +1 -1
- package/dist/action/package.d.ts +3 -1
- package/dist/action/package.js +12 -5
- package/dist/action/package.js.map +1 -1
- package/dist/action/resolve.d.ts +11 -2
- package/dist/action/resolve.js +27 -0
- package/dist/action/resolve.js.map +1 -1
- package/dist/admin/npm-trust.js +7 -7
- package/dist/admin/npm-trust.js.map +1 -1
- package/dist/cmp/AgentGuide.js +4 -3
- package/dist/cmp/AgentGuide.js.map +1 -1
- package/dist/cmp/AgentGuideFeature.js +3 -2
- package/dist/cmp/AgentGuideFeature.js.map +1 -1
- package/dist/cmp/AgentGuideTop.js +2 -1
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/Changelog.js +2 -1
- package/dist/cmp/Changelog.js.map +1 -1
- package/dist/cmp/Deploy.js +2 -1
- package/dist/cmp/Deploy.js.map +1 -1
- package/dist/cmp/Entity.js +2 -2
- package/dist/cmp/Entity.js.map +1 -1
- package/dist/cmp/ExternalTarget.js +2 -1
- package/dist/cmp/ExternalTarget.js.map +1 -1
- package/dist/cmp/Feature.js +2 -1
- package/dist/cmp/Feature.js.map +1 -1
- package/dist/cmp/FeatureHook.js +2 -1
- package/dist/cmp/FeatureHook.js.map +1 -1
- package/dist/cmp/License.js +6 -4
- package/dist/cmp/License.js.map +1 -1
- package/dist/cmp/Main.js +2 -2
- package/dist/cmp/Main.js.map +1 -1
- package/dist/cmp/PublishWorkflow.js +2 -1
- package/dist/cmp/PublishWorkflow.js.map +1 -1
- package/dist/cmp/Readme.js +2 -1
- package/dist/cmp/Readme.js.map +1 -1
- package/dist/cmp/ReadmeEntity.js +4 -4
- package/dist/cmp/ReadmeEntity.js.map +1 -1
- package/dist/cmp/ReadmeErrors.js +6 -4
- package/dist/cmp/ReadmeErrors.js.map +1 -1
- package/dist/cmp/ReadmeExplanation.js +4 -3
- package/dist/cmp/ReadmeExplanation.js.map +1 -1
- package/dist/cmp/ReadmeFeatures.js +4 -3
- package/dist/cmp/ReadmeFeatures.js.map +1 -1
- package/dist/cmp/ReadmeHowto.js +4 -3
- package/dist/cmp/ReadmeHowto.js.map +1 -1
- package/dist/cmp/ReadmeInstall.js +4 -3
- package/dist/cmp/ReadmeInstall.js.map +1 -1
- package/dist/cmp/ReadmeIntro.js +4 -4
- package/dist/cmp/ReadmeIntro.js.map +1 -1
- package/dist/cmp/ReadmeModel.js +6 -3
- package/dist/cmp/ReadmeModel.js.map +1 -1
- package/dist/cmp/ReadmeOptions.js +4 -4
- package/dist/cmp/ReadmeOptions.js.map +1 -1
- package/dist/cmp/ReadmeQuick.js +4 -3
- package/dist/cmp/ReadmeQuick.js.map +1 -1
- package/dist/cmp/ReadmeRef.js +4 -4
- package/dist/cmp/ReadmeRef.js.map +1 -1
- package/dist/cmp/ReadmeRefFeatures.js +2 -1
- package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
- package/dist/cmp/ReadmeStation.js +2 -1
- package/dist/cmp/ReadmeStation.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +104 -35
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/ReadmeUnions.js +2 -1
- package/dist/cmp/ReadmeUnions.js.map +1 -1
- package/dist/cmp/Registered.js +4 -3
- package/dist/cmp/Registered.js.map +1 -1
- package/dist/cmp/Security.js +10 -6
- package/dist/cmp/Security.js.map +1 -1
- package/dist/cmp/Test.js +2 -1
- package/dist/cmp/Test.js.map +1 -1
- package/dist/cmp/TestControl.js +2 -1
- package/dist/cmp/TestControl.js.map +1 -1
- package/dist/helpers/component.d.ts +4 -0
- package/dist/helpers/component.js +54 -0
- package/dist/helpers/component.js.map +1 -0
- package/dist/helpers/definition.js +2 -2
- package/dist/helpers/definition.js.map +1 -1
- package/dist/helpers/definitionPlan.d.ts +16 -0
- package/dist/helpers/definitionPlan.js +116 -12
- package/dist/helpers/definitionPlan.js.map +1 -1
- package/dist/helpers/featureSource.d.ts +2 -1
- package/dist/helpers/featureSource.js +44 -2
- package/dist/helpers/featureSource.js.map +1 -1
- package/dist/helpers/flowGuard.d.ts +8 -0
- package/dist/helpers/flowGuard.js +84 -0
- package/dist/helpers/flowGuard.js.map +1 -0
- package/dist/helpers/generated.d.ts +26 -0
- package/dist/helpers/generated.js +363 -0
- package/dist/helpers/generated.js.map +1 -0
- package/dist/helpers/mcpTools.d.ts +11 -0
- package/dist/helpers/mcpTools.js +28 -0
- package/dist/helpers/mcpTools.js.map +1 -0
- package/dist/helpers/media.d.ts +9 -0
- package/dist/helpers/media.js +61 -0
- package/dist/helpers/media.js.map +1 -0
- package/dist/helpers/modelNames.js +147 -14
- package/dist/helpers/modelNames.js.map +1 -1
- package/dist/helpers/naming.d.ts +11 -1
- package/dist/helpers/naming.js +143 -0
- package/dist/helpers/naming.js.map +1 -1
- package/dist/helpers/npm.d.ts +13 -0
- package/dist/helpers/npm.js +41 -0
- package/dist/helpers/npm.js.map +1 -0
- package/dist/helpers/npmScripts.d.ts +4 -0
- package/dist/helpers/npmScripts.js +30 -0
- package/dist/helpers/npmScripts.js.map +1 -0
- package/dist/helpers/opExample.d.ts +5 -4
- package/dist/helpers/opExample.js +10 -7
- package/dist/helpers/opExample.js.map +1 -1
- package/dist/helpers/opShape.d.ts +20 -4
- package/dist/helpers/opShape.js +197 -30
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/optional.d.ts +20 -0
- package/dist/helpers/optional.js +51 -0
- package/dist/helpers/optional.js.map +1 -0
- package/dist/helpers/packageMeta.d.ts +9 -1
- package/dist/helpers/packageMeta.js +70 -11
- package/dist/helpers/packageMeta.js.map +1 -1
- package/dist/helpers/stdrep.js +3 -0
- package/dist/helpers/stdrep.js.map +1 -1
- package/dist/helpers/testPolicy.d.ts +9 -1
- package/dist/helpers/testPolicy.js +48 -0
- package/dist/helpers/testPolicy.js.map +1 -1
- package/dist/helpers/text.d.ts +2 -0
- package/dist/helpers/text.js +27 -0
- package/dist/helpers/text.js.map +1 -0
- package/dist/sdkgen.d.ts +15 -8
- package/dist/sdkgen.js +79 -12
- package/dist/sdkgen.js.map +1 -1
- package/dist/testkit.js +2 -1
- package/dist/testkit.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utility.d.ts +2 -1
- package/dist/utility.js +33 -18
- package/dist/utility.js.map +1 -1
- package/model/sdkgen.aontu +24 -1
- package/package.json +8 -2
- package/project/.sdk/model/feature/timeout.aontu +2 -0
- package/project/.sdk/model/target/go-mcp.aontu +2 -0
- package/project/.sdk/src/cmp/c/Config_c.ts +5 -0
- package/project/.sdk/src/cmp/c/EntityTypes_c.ts +1 -1
- package/project/.sdk/src/cmp/c/Entity_c.ts +1 -1
- package/project/.sdk/src/cmp/c/Main_c.ts +4 -20
- package/project/.sdk/src/cmp/c/PrepareAuth_c.ts +169 -51
- package/project/.sdk/src/cmp/c/ReadmeEntity_c.ts +22 -13
- package/project/.sdk/src/cmp/c/ReadmeHowto_c.ts +10 -5
- package/project/.sdk/src/cmp/c/ReadmeInstall_c.ts +2 -2
- package/project/.sdk/src/cmp/c/ReadmeIntro_c.ts +3 -3
- package/project/.sdk/src/cmp/c/ReadmeModel_c.ts +11 -10
- package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +37 -20
- package/project/.sdk/src/cmp/c/ReadmeRef_c.ts +39 -21
- package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +9 -7
- package/project/.sdk/src/cmp/c/ReadmeTopTest_c.ts +15 -4
- package/project/.sdk/src/cmp/c/TestClean_c.ts +56 -22
- package/project/.sdk/src/cmp/c/TestDirect_c.ts +2 -2
- package/project/.sdk/src/cmp/c/TestEntity_c.ts +77 -4
- package/project/.sdk/src/cmp/c/fragment/Entity.fragment.c +33 -27
- package/project/.sdk/src/cmp/c/fragment/EntityPatchOp.fragment.c +36 -0
- package/project/.sdk/src/cmp/c/fragment/Main.fragment.c +40 -7
- package/project/.sdk/src/cmp/clojure/Entity_clojure.ts +1 -1
- package/project/.sdk/src/cmp/clojure/Main_clojure.ts +3 -1
- package/project/.sdk/src/cmp/clojure/PrepareAuth_clojure.ts +44 -28
- package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +7 -4
- package/project/.sdk/src/cmp/clojure/ReadmeHowto_clojure.ts +1 -1
- package/project/.sdk/src/cmp/clojure/ReadmeInstall_clojure.ts +3 -3
- package/project/.sdk/src/cmp/clojure/ReadmeIntro_clojure.ts +3 -3
- package/project/.sdk/src/cmp/clojure/ReadmeModel_clojure.ts +7 -5
- package/project/.sdk/src/cmp/clojure/ReadmeQuick_clojure.ts +12 -4
- package/project/.sdk/src/cmp/clojure/ReadmeRef_clojure.ts +24 -7
- package/project/.sdk/src/cmp/clojure/ReadmeTopQuick_clojure.ts +2 -2
- package/project/.sdk/src/cmp/clojure/ReadmeTopTest_clojure.ts +1 -1
- package/project/.sdk/src/cmp/clojure/TestClean_clojure.ts +53 -23
- package/project/.sdk/src/cmp/clojure/TestEntity_clojure.ts +64 -5
- package/project/.sdk/src/cmp/clojure/fragment/Entity.fragment.clj +22 -11
- package/project/.sdk/src/cmp/clojure/fragment/EntityListOp.fragment.clj +7 -9
- package/project/.sdk/src/cmp/clojure/fragment/EntityPatchOp.fragment.clj +15 -0
- package/project/.sdk/src/cmp/cpp/EntityTypes_cpp.ts +1 -1
- package/project/.sdk/src/cmp/cpp/Entity_cpp.ts +2 -2
- package/project/.sdk/src/cmp/cpp/Main_cpp.ts +3 -19
- package/project/.sdk/src/cmp/cpp/PrepareAuth_cpp.ts +38 -39
- package/project/.sdk/src/cmp/cpp/ReadmeEntity_cpp.ts +19 -12
- package/project/.sdk/src/cmp/cpp/ReadmeHowto_cpp.ts +11 -6
- package/project/.sdk/src/cmp/cpp/ReadmeInstall_cpp.ts +2 -2
- package/project/.sdk/src/cmp/cpp/ReadmeIntro_cpp.ts +3 -3
- package/project/.sdk/src/cmp/cpp/ReadmeModel_cpp.ts +10 -9
- package/project/.sdk/src/cmp/cpp/ReadmeQuick_cpp.ts +26 -18
- package/project/.sdk/src/cmp/cpp/ReadmeRef_cpp.ts +42 -25
- package/project/.sdk/src/cmp/cpp/ReadmeTopQuick_cpp.ts +7 -7
- package/project/.sdk/src/cmp/cpp/ReadmeTopTest_cpp.ts +11 -4
- package/project/.sdk/src/cmp/cpp/TestClean_cpp.ts +69 -21
- package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +135 -6
- package/project/.sdk/src/cmp/cpp/fragment/Entity.fragment.cpp +2 -0
- package/project/.sdk/src/cmp/cpp/fragment/EntityPatchOp.fragment.cpp +28 -0
- package/project/.sdk/src/cmp/csharp/EntityTypes_csharp.ts +1 -1
- package/project/.sdk/src/cmp/csharp/Entity_csharp.ts +1 -1
- package/project/.sdk/src/cmp/csharp/Main_csharp.ts +3 -1
- package/project/.sdk/src/cmp/csharp/Package_csharp.ts +4 -1
- package/project/.sdk/src/cmp/csharp/PrepareAuth_csharp.ts +69 -23
- package/project/.sdk/src/cmp/csharp/ReadmeEntity_csharp.ts +7 -4
- package/project/.sdk/src/cmp/csharp/ReadmeHowto_csharp.ts +3 -3
- package/project/.sdk/src/cmp/csharp/ReadmeInstall_csharp.ts +3 -3
- package/project/.sdk/src/cmp/csharp/ReadmeIntro_csharp.ts +3 -3
- package/project/.sdk/src/cmp/csharp/ReadmeModel_csharp.ts +11 -9
- package/project/.sdk/src/cmp/csharp/ReadmeQuick_csharp.ts +17 -6
- package/project/.sdk/src/cmp/csharp/ReadmeRef_csharp.ts +33 -16
- package/project/.sdk/src/cmp/csharp/ReadmeTopQuick_csharp.ts +1 -1
- package/project/.sdk/src/cmp/csharp/ReadmeTopTest_csharp.ts +1 -1
- package/project/.sdk/src/cmp/csharp/TestClean_csharp.ts +67 -14
- package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +43 -31
- package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +187 -15
- package/project/.sdk/src/cmp/csharp/fragment/Entity.fragment.cs +2 -0
- package/project/.sdk/src/cmp/csharp/fragment/EntityBase.fragment.cs +11 -2
- package/project/.sdk/src/cmp/csharp/fragment/EntityPatchOp.fragment.cs +41 -0
- package/project/.sdk/src/cmp/csharp/fragment/Main.fragment.cs +28 -4
- package/project/.sdk/src/cmp/csharp/utility_csharp.ts +6 -0
- package/project/.sdk/src/cmp/elixir/EntityOperation_elixir.ts +5 -0
- package/project/.sdk/src/cmp/elixir/EntityTypes_elixir.ts +3 -3
- package/project/.sdk/src/cmp/elixir/Entity_elixir.ts +22 -1
- package/project/.sdk/src/cmp/elixir/MainEntity_elixir.ts +4 -2
- package/project/.sdk/src/cmp/elixir/Main_elixir.ts +6 -2
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +7 -0
- package/project/.sdk/src/cmp/elixir/PrepareAuth_elixir.ts +40 -30
- package/project/.sdk/src/cmp/elixir/ReadmeEntity_elixir.ts +13 -9
- package/project/.sdk/src/cmp/elixir/ReadmeHowto_elixir.ts +6 -5
- package/project/.sdk/src/cmp/elixir/ReadmeInstall_elixir.ts +2 -2
- package/project/.sdk/src/cmp/elixir/ReadmeIntro_elixir.ts +4 -4
- package/project/.sdk/src/cmp/elixir/ReadmeModel_elixir.ts +13 -11
- package/project/.sdk/src/cmp/elixir/ReadmeQuick_elixir.ts +25 -12
- package/project/.sdk/src/cmp/elixir/ReadmeRef_elixir.ts +29 -13
- package/project/.sdk/src/cmp/elixir/ReadmeTopQuick_elixir.ts +5 -4
- package/project/.sdk/src/cmp/elixir/ReadmeTopTest_elixir.ts +5 -4
- package/project/.sdk/src/cmp/elixir/TestClean_elixir.ts +41 -12
- package/project/.sdk/src/cmp/elixir/TestEntity_elixir.ts +152 -23
- package/project/.sdk/src/cmp/elixir/fragment/Entity.fragment.ex +4 -4
- package/project/.sdk/src/cmp/elixir/fragment/EntityPatchOp.fragment.ex +35 -0
- package/project/.sdk/src/cmp/elixir/fragment/Main.fragment.ex +29 -5
- package/project/.sdk/src/cmp/elixir/fragment/Pipeline.fragment.ex +23 -16
- package/project/.sdk/src/cmp/go/EntityTypes_go.ts +1 -1
- package/project/.sdk/src/cmp/go/Entity_go.ts +1 -1
- package/project/.sdk/src/cmp/go/Main_go.ts +5 -6
- package/project/.sdk/src/cmp/go/PrepareAuth_go.ts +40 -26
- package/project/.sdk/src/cmp/go/ReadmeEntity_go.ts +1 -0
- package/project/.sdk/src/cmp/go/ReadmeExamplesTest_go.ts +6 -1
- package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeInstall_go.ts +3 -3
- package/project/.sdk/src/cmp/go/ReadmeIntro_go.ts +3 -3
- package/project/.sdk/src/cmp/go/ReadmeModel_go.ts +3 -2
- package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +14 -0
- package/project/.sdk/src/cmp/go/ReadmeRef_go.ts +29 -7
- package/project/.sdk/src/cmp/go/ReadmeTopTest_go.ts +1 -1
- package/project/.sdk/src/cmp/go/TestClean_go.ts +81 -18
- package/project/.sdk/src/cmp/go/TestDirect_go.ts +47 -53
- package/project/.sdk/src/cmp/go/TestEntity_go.ts +204 -24
- package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +79 -60
- package/project/.sdk/src/cmp/go/fragment/EntityPatchOp.fragment.go +49 -0
- package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +26 -5
- package/project/.sdk/src/cmp/go-cli/Main_go-cli.ts +8 -10
- package/project/.sdk/src/cmp/go-mcp/Main_go-mcp.ts +240 -121
- package/project/.sdk/src/cmp/go-mcp/fragment/main.fragment.go +1 -1
- package/project/.sdk/src/cmp/go-mcp/fragment/tools.fragment.go +34 -27
- package/project/.sdk/src/cmp/java/EntityTypes_java.ts +1 -1
- package/project/.sdk/src/cmp/java/Entity_java.ts +1 -1
- package/project/.sdk/src/cmp/java/Main_java.ts +3 -1
- package/project/.sdk/src/cmp/java/PrepareAuth_java.ts +58 -23
- package/project/.sdk/src/cmp/java/ReadmeEntity_java.ts +7 -4
- package/project/.sdk/src/cmp/java/ReadmeHowto_java.ts +1 -1
- package/project/.sdk/src/cmp/java/ReadmeInstall_java.ts +3 -3
- package/project/.sdk/src/cmp/java/ReadmeIntro_java.ts +3 -3
- package/project/.sdk/src/cmp/java/ReadmeModel_java.ts +2 -1
- package/project/.sdk/src/cmp/java/ReadmeQuick_java.ts +10 -1
- package/project/.sdk/src/cmp/java/ReadmeRef_java.ts +22 -5
- package/project/.sdk/src/cmp/java/ReadmeTopTest_java.ts +1 -1
- package/project/.sdk/src/cmp/java/TestClean_java.ts +57 -12
- package/project/.sdk/src/cmp/java/TestDirect_java.ts +50 -36
- package/project/.sdk/src/cmp/java/TestEntity_java.ts +180 -13
- package/project/.sdk/src/cmp/java/fragment/Entity.fragment.java +2 -0
- package/project/.sdk/src/cmp/java/fragment/EntityBase.fragment.java +5 -3
- package/project/.sdk/src/cmp/java/fragment/EntityPatchOp.fragment.java +45 -0
- package/project/.sdk/src/cmp/js/EntityTypes_js.ts +1 -1
- package/project/.sdk/src/cmp/js/Entity_js.ts +1 -1
- package/project/.sdk/src/cmp/js/Main_js.ts +2 -0
- package/project/.sdk/src/cmp/js/Package_js.ts +11 -8
- package/project/.sdk/src/cmp/js/PrepareAuth_js.ts +39 -27
- package/project/.sdk/src/cmp/js/ReadmeEntity_js.ts +7 -4
- package/project/.sdk/src/cmp/js/ReadmeHowto_js.ts +0 -3
- package/project/.sdk/src/cmp/js/ReadmeInstall_js.ts +3 -3
- package/project/.sdk/src/cmp/js/ReadmeIntro_js.ts +3 -3
- package/project/.sdk/src/cmp/js/ReadmeModel_js.ts +4 -3
- package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +17 -0
- package/project/.sdk/src/cmp/js/ReadmeRef_js.ts +37 -8
- package/project/.sdk/src/cmp/js/ReadmeTopHowto_js.ts +2 -3
- package/project/.sdk/src/cmp/js/ReadmeTopTest_js.ts +1 -1
- package/project/.sdk/src/cmp/js/TestClean_js.ts +52 -8
- package/project/.sdk/src/cmp/js/TestDirect_js.ts +81 -54
- package/project/.sdk/src/cmp/js/TestEntity_js.ts +95 -2
- package/project/.sdk/src/cmp/js/TestLive_js.ts +4 -3
- package/project/.sdk/src/cmp/js/fragment/Direct.test.fragment.js +4 -0
- package/project/.sdk/src/cmp/js/fragment/Entity.fragment.js +2 -0
- package/project/.sdk/src/cmp/js/fragment/Entity.test.fragment.js +2 -0
- package/project/.sdk/src/cmp/js/fragment/EntityBase.fragment.js +51 -25
- package/project/.sdk/src/cmp/js/fragment/EntityPatchOp.fragment.js +129 -0
- package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +39 -15
- package/project/.sdk/src/cmp/kotlin/Config_kotlin.ts +4 -0
- package/project/.sdk/src/cmp/kotlin/EntityTypes_kotlin.ts +1 -1
- package/project/.sdk/src/cmp/kotlin/Entity_kotlin.ts +1 -1
- package/project/.sdk/src/cmp/kotlin/Main_kotlin.ts +3 -1
- package/project/.sdk/src/cmp/kotlin/PrepareAuth_kotlin.ts +56 -31
- package/project/.sdk/src/cmp/kotlin/ReadmeEntity_kotlin.ts +7 -4
- package/project/.sdk/src/cmp/kotlin/ReadmeHowto_kotlin.ts +1 -1
- package/project/.sdk/src/cmp/kotlin/ReadmeInstall_kotlin.ts +3 -3
- package/project/.sdk/src/cmp/kotlin/ReadmeIntro_kotlin.ts +3 -3
- package/project/.sdk/src/cmp/kotlin/ReadmeModel_kotlin.ts +2 -1
- package/project/.sdk/src/cmp/kotlin/ReadmeQuick_kotlin.ts +10 -1
- package/project/.sdk/src/cmp/kotlin/ReadmeRef_kotlin.ts +22 -5
- package/project/.sdk/src/cmp/kotlin/ReadmeTopTest_kotlin.ts +1 -1
- package/project/.sdk/src/cmp/kotlin/TestClean_kotlin.ts +45 -10
- package/project/.sdk/src/cmp/kotlin/TestDirect_kotlin.ts +49 -26
- package/project/.sdk/src/cmp/kotlin/TestEntity_kotlin.ts +168 -10
- package/project/.sdk/src/cmp/kotlin/fragment/Entity.fragment.kt +2 -0
- package/project/.sdk/src/cmp/kotlin/fragment/EntityBase.fragment.kt +2 -1
- package/project/.sdk/src/cmp/kotlin/fragment/EntityPatchOp.fragment.kt +40 -0
- package/project/.sdk/src/cmp/lua/EntityTypes_lua.ts +1 -1
- package/project/.sdk/src/cmp/lua/Entity_lua.ts +1 -1
- package/project/.sdk/src/cmp/lua/Main_lua.ts +2 -1
- package/project/.sdk/src/cmp/lua/PrepareAuth_lua.ts +42 -23
- package/project/.sdk/src/cmp/lua/ReadmeEntity_lua.ts +7 -4
- package/project/.sdk/src/cmp/lua/ReadmeExamplesTest_lua.ts +8 -2
- package/project/.sdk/src/cmp/lua/ReadmeHowto_lua.ts +1 -1
- package/project/.sdk/src/cmp/lua/ReadmeInstall_lua.ts +2 -2
- package/project/.sdk/src/cmp/lua/ReadmeIntro_lua.ts +3 -3
- package/project/.sdk/src/cmp/lua/ReadmeModel_lua.ts +3 -2
- package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +9 -1
- package/project/.sdk/src/cmp/lua/ReadmeRef_lua.ts +22 -6
- package/project/.sdk/src/cmp/lua/ReadmeTopTest_lua.ts +1 -1
- package/project/.sdk/src/cmp/lua/TestClean_lua.ts +46 -12
- package/project/.sdk/src/cmp/lua/TestDirect_lua.ts +100 -124
- package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +173 -20
- package/project/.sdk/src/cmp/lua/fragment/Entity.fragment.lua +85 -48
- package/project/.sdk/src/cmp/lua/fragment/EntityPatchOp.fragment.lua +34 -0
- package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +28 -6
- package/project/.sdk/src/cmp/ocaml/EntityOperation_ocaml.ts +8 -11
- package/project/.sdk/src/cmp/ocaml/Entity_ocaml.ts +8 -3
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +2 -1
- package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +7 -5
- package/project/.sdk/src/cmp/ocaml/PrepareAuth_ocaml.ts +39 -34
- package/project/.sdk/src/cmp/ocaml/ReadmeEntity_ocaml.ts +7 -4
- package/project/.sdk/src/cmp/ocaml/ReadmeHowto_ocaml.ts +3 -8
- package/project/.sdk/src/cmp/ocaml/ReadmeInstall_ocaml.ts +2 -2
- package/project/.sdk/src/cmp/ocaml/ReadmeIntro_ocaml.ts +3 -3
- package/project/.sdk/src/cmp/ocaml/ReadmeModel_ocaml.ts +2 -1
- package/project/.sdk/src/cmp/ocaml/ReadmeQuick_ocaml.ts +9 -1
- package/project/.sdk/src/cmp/ocaml/ReadmeRef_ocaml.ts +22 -6
- package/project/.sdk/src/cmp/ocaml/ReadmeTopTest_ocaml.ts +3 -7
- package/project/.sdk/src/cmp/ocaml/TestClean_ocaml.ts +47 -14
- package/project/.sdk/src/cmp/ocaml/TestEntity_ocaml.ts +88 -3
- package/project/.sdk/src/cmp/ocaml/fragment/RunOp.fragment.ml +10 -11
- package/project/.sdk/src/cmp/ocaml/utility_ocaml.ts +7 -0
- package/project/.sdk/src/cmp/perl/Entity_perl.ts +1 -1
- package/project/.sdk/src/cmp/perl/Main_perl.ts +3 -1
- package/project/.sdk/src/cmp/perl/Package_perl.ts +5 -4
- package/project/.sdk/src/cmp/perl/PrepareAuth_perl.ts +48 -33
- package/project/.sdk/src/cmp/perl/ReadmeEntity_perl.ts +9 -4
- package/project/.sdk/src/cmp/perl/ReadmeExamplesTest_perl.ts +2 -2
- package/project/.sdk/src/cmp/perl/ReadmeHowto_perl.ts +1 -1
- package/project/.sdk/src/cmp/perl/ReadmeInstall_perl.ts +9 -3
- package/project/.sdk/src/cmp/perl/ReadmeIntro_perl.ts +3 -3
- package/project/.sdk/src/cmp/perl/ReadmeModel_perl.ts +7 -5
- package/project/.sdk/src/cmp/perl/ReadmeQuick_perl.ts +12 -4
- package/project/.sdk/src/cmp/perl/ReadmeRef_perl.ts +26 -9
- package/project/.sdk/src/cmp/perl/ReadmeTopQuick_perl.ts +2 -2
- package/project/.sdk/src/cmp/perl/ReadmeTopTest_perl.ts +1 -1
- package/project/.sdk/src/cmp/perl/TestClean_perl.ts +42 -11
- package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +121 -149
- package/project/.sdk/src/cmp/perl/TestEntity_perl.ts +178 -17
- package/project/.sdk/src/cmp/perl/fragment/Entity.fragment.pm +16 -2
- package/project/.sdk/src/cmp/perl/fragment/EntityListOp.fragment.pm +2 -13
- package/project/.sdk/src/cmp/perl/fragment/EntityPatchOp.fragment.pm +32 -0
- package/project/.sdk/src/cmp/perl/fragment/Main.fragment.pm +23 -5
- package/project/.sdk/src/cmp/perl/utility_perl.ts +16 -0
- package/project/.sdk/src/cmp/php/EntityTypes_php.ts +3 -3
- package/project/.sdk/src/cmp/php/Entity_php.ts +4 -3
- package/project/.sdk/src/cmp/php/MainEntity_php.ts +1 -1
- package/project/.sdk/src/cmp/php/Main_php.ts +3 -1
- package/project/.sdk/src/cmp/php/Package_php.ts +1 -1
- package/project/.sdk/src/cmp/php/PrepareAuth_php.ts +36 -28
- package/project/.sdk/src/cmp/php/ReadmeEntity_php.ts +7 -4
- package/project/.sdk/src/cmp/php/ReadmeExamplesTest_php.ts +3 -3
- package/project/.sdk/src/cmp/php/ReadmeHowto_php.ts +1 -1
- package/project/.sdk/src/cmp/php/ReadmeInstall_php.ts +2 -2
- package/project/.sdk/src/cmp/php/ReadmeIntro_php.ts +3 -3
- package/project/.sdk/src/cmp/php/ReadmeModel_php.ts +2 -1
- package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +9 -1
- package/project/.sdk/src/cmp/php/ReadmeRef_php.ts +23 -6
- package/project/.sdk/src/cmp/php/ReadmeTopTest_php.ts +1 -1
- package/project/.sdk/src/cmp/php/TestClean_php.ts +73 -12
- package/project/.sdk/src/cmp/php/TestDirect_php.ts +95 -127
- package/project/.sdk/src/cmp/php/TestEntity_php.ts +219 -20
- package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +82 -45
- package/project/.sdk/src/cmp/php/fragment/EntityPatchOp.fragment.php +38 -0
- package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +26 -5
- package/project/.sdk/src/cmp/py/EntityTypes_py.ts +1 -1
- package/project/.sdk/src/cmp/py/Entity_py.ts +2 -2
- package/project/.sdk/src/cmp/py/Main_py.ts +6 -2
- package/project/.sdk/src/cmp/py/Package_py.ts +7 -0
- package/project/.sdk/src/cmp/py/PrepareAuth_py.ts +52 -26
- package/project/.sdk/src/cmp/py/ReadmeEntity_py.ts +7 -4
- package/project/.sdk/src/cmp/py/ReadmeExamplesTest_py.ts +12 -6
- package/project/.sdk/src/cmp/py/ReadmeHowto_py.ts +1 -1
- package/project/.sdk/src/cmp/py/ReadmeInstall_py.ts +3 -3
- package/project/.sdk/src/cmp/py/ReadmeIntro_py.ts +3 -3
- package/project/.sdk/src/cmp/py/ReadmeModel_py.ts +2 -1
- package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +9 -1
- package/project/.sdk/src/cmp/py/ReadmeRef_py.ts +23 -6
- package/project/.sdk/src/cmp/py/ReadmeTopTest_py.ts +1 -1
- package/project/.sdk/src/cmp/py/TestClean_py.ts +41 -10
- package/project/.sdk/src/cmp/py/TestDirect_py.ts +91 -121
- package/project/.sdk/src/cmp/py/TestEntity_py.ts +146 -20
- package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +62 -42
- package/project/.sdk/src/cmp/py/fragment/EntityPatchOp.fragment.py +27 -0
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +23 -5
- package/project/.sdk/src/cmp/py-data/Main_py-data.ts +1 -1
- package/project/.sdk/src/cmp/rb/EntityTypes_rb.ts +3 -3
- package/project/.sdk/src/cmp/rb/Entity_rb.ts +1 -1
- package/project/.sdk/src/cmp/rb/Main_rb.ts +5 -6
- package/project/.sdk/src/cmp/rb/Package_rb.ts +3 -1
- package/project/.sdk/src/cmp/rb/PrepareAuth_rb.ts +30 -28
- package/project/.sdk/src/cmp/rb/ReadmeEntity_rb.ts +9 -5
- package/project/.sdk/src/cmp/rb/ReadmeExamplesTest_rb.ts +16 -8
- package/project/.sdk/src/cmp/rb/ReadmeHowto_rb.ts +1 -1
- package/project/.sdk/src/cmp/rb/ReadmeInstall_rb.ts +2 -2
- package/project/.sdk/src/cmp/rb/ReadmeIntro_rb.ts +3 -3
- package/project/.sdk/src/cmp/rb/ReadmeModel_rb.ts +3 -2
- package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +14 -5
- package/project/.sdk/src/cmp/rb/ReadmeRef_rb.ts +26 -8
- package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +2 -2
- package/project/.sdk/src/cmp/rb/ReadmeTopTest_rb.ts +1 -1
- package/project/.sdk/src/cmp/rb/TestClean_rb.ts +36 -10
- package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +95 -126
- package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +177 -21
- package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +49 -29
- package/project/.sdk/src/cmp/rb/fragment/EntityListOp.fragment.rb +2 -11
- package/project/.sdk/src/cmp/rb/fragment/EntityPatchOp.fragment.rb +31 -0
- package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +19 -5
- package/project/.sdk/src/cmp/rust/EntityTypes_rust.ts +1 -1
- package/project/.sdk/src/cmp/rust/Entity_rust.ts +2 -2
- package/project/.sdk/src/cmp/rust/Main_rust.ts +7 -6
- package/project/.sdk/src/cmp/rust/PrepareAuth_rust.ts +56 -29
- package/project/.sdk/src/cmp/rust/ReadmeEntity_rust.ts +16 -9
- package/project/.sdk/src/cmp/rust/ReadmeHowto_rust.ts +11 -4
- package/project/.sdk/src/cmp/rust/ReadmeInstall_rust.ts +3 -3
- package/project/.sdk/src/cmp/rust/ReadmeIntro_rust.ts +3 -3
- package/project/.sdk/src/cmp/rust/ReadmeModel_rust.ts +12 -9
- package/project/.sdk/src/cmp/rust/ReadmeQuick_rust.ts +25 -17
- package/project/.sdk/src/cmp/rust/ReadmeRef_rust.ts +35 -21
- package/project/.sdk/src/cmp/rust/ReadmeTopQuick_rust.ts +6 -8
- package/project/.sdk/src/cmp/rust/ReadmeTopTest_rust.ts +13 -5
- package/project/.sdk/src/cmp/rust/TestClean_rust.ts +80 -21
- package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +124 -79
- package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +164 -17
- package/project/.sdk/src/cmp/rust/fragment/Entity.fragment.rs +44 -23
- package/project/.sdk/src/cmp/rust/fragment/EntityPatchOp.fragment.rs +41 -0
- package/project/.sdk/src/cmp/rust/fragment/Main.fragment.rs +39 -9
- package/project/.sdk/src/cmp/scala/Config_scala.ts +4 -0
- package/project/.sdk/src/cmp/scala/EntityTypes_scala.ts +1 -1
- package/project/.sdk/src/cmp/scala/Entity_scala.ts +1 -1
- package/project/.sdk/src/cmp/scala/Main_scala.ts +4 -20
- package/project/.sdk/src/cmp/scala/PrepareAuth_scala.ts +56 -24
- package/project/.sdk/src/cmp/scala/ReadmeEntity_scala.ts +7 -4
- package/project/.sdk/src/cmp/scala/ReadmeHowto_scala.ts +1 -1
- package/project/.sdk/src/cmp/scala/ReadmeInstall_scala.ts +3 -3
- package/project/.sdk/src/cmp/scala/ReadmeIntro_scala.ts +3 -3
- package/project/.sdk/src/cmp/scala/ReadmeModel_scala.ts +2 -1
- package/project/.sdk/src/cmp/scala/ReadmeQuick_scala.ts +10 -1
- package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +22 -5
- package/project/.sdk/src/cmp/scala/ReadmeTopTest_scala.ts +1 -1
- package/project/.sdk/src/cmp/scala/TestClean_scala.ts +39 -10
- package/project/.sdk/src/cmp/scala/TestEntity_scala.ts +113 -3
- package/project/.sdk/src/cmp/scala/fragment/Entity.fragment.scala +2 -0
- package/project/.sdk/src/cmp/scala/fragment/EntityBase.fragment.scala +4 -2
- package/project/.sdk/src/cmp/scala/fragment/EntityPatchOp.fragment.scala +33 -0
- package/project/.sdk/src/cmp/swift/EntityTypes_swift.ts +3 -3
- package/project/.sdk/src/cmp/swift/Entity_swift.ts +1 -1
- package/project/.sdk/src/cmp/swift/Main_swift.ts +6 -2
- package/project/.sdk/src/cmp/swift/PrepareAuth_swift.ts +56 -29
- package/project/.sdk/src/cmp/swift/ReadmeEntity_swift.ts +7 -4
- package/project/.sdk/src/cmp/swift/ReadmeHowto_swift.ts +1 -1
- package/project/.sdk/src/cmp/swift/ReadmeInstall_swift.ts +3 -3
- package/project/.sdk/src/cmp/swift/ReadmeIntro_swift.ts +3 -3
- package/project/.sdk/src/cmp/swift/ReadmeModel_swift.ts +2 -1
- package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +10 -1
- package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +21 -5
- package/project/.sdk/src/cmp/swift/ReadmeTopTest_swift.ts +1 -1
- package/project/.sdk/src/cmp/swift/TestClean_swift.ts +44 -10
- package/project/.sdk/src/cmp/swift/TestEntity_swift.ts +90 -2
- package/project/.sdk/src/cmp/swift/fragment/Entity.fragment.swift +2 -0
- package/project/.sdk/src/cmp/swift/fragment/EntityBase.fragment.swift +9 -1
- package/project/.sdk/src/cmp/swift/fragment/EntityPatchOp.fragment.swift +24 -0
- package/project/.sdk/src/cmp/swift/fragment/Main.fragment.swift +23 -3
- package/project/.sdk/src/cmp/ts/EntityTypes_ts.ts +9 -3
- package/project/.sdk/src/cmp/ts/Entity_ts.ts +5 -5
- package/project/.sdk/src/cmp/ts/Main_ts.ts +4 -3
- package/project/.sdk/src/cmp/ts/Package_ts.ts +18 -10
- package/project/.sdk/src/cmp/ts/PrepareAuth_ts.ts +37 -28
- package/project/.sdk/src/cmp/ts/ReadmeEntity_ts.ts +7 -4
- package/project/.sdk/src/cmp/ts/ReadmeExamplesTest_ts.ts +39 -21
- package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +0 -3
- package/project/.sdk/src/cmp/ts/ReadmeInstall_ts.ts +3 -3
- package/project/.sdk/src/cmp/ts/ReadmeIntro_ts.ts +3 -3
- package/project/.sdk/src/cmp/ts/ReadmeModel_ts.ts +4 -3
- package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +10 -1
- package/project/.sdk/src/cmp/ts/ReadmeRef_ts.ts +37 -8
- package/project/.sdk/src/cmp/ts/ReadmeTopHowto_ts.ts +2 -3
- package/project/.sdk/src/cmp/ts/ReadmeTopTest_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/TestClean_ts.ts +52 -8
- package/project/.sdk/src/cmp/ts/TestDirect_ts.ts +50 -109
- package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +92 -2
- package/project/.sdk/src/cmp/ts/TestLive_ts.ts +4 -3
- package/project/.sdk/src/cmp/ts/fragment/Direct.test.fragment.ts +3 -0
- package/project/.sdk/src/cmp/ts/fragment/Entity.fragment.ts +2 -0
- package/project/.sdk/src/cmp/ts/fragment/Entity.test.fragment.ts +3 -1
- package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +49 -24
- package/project/.sdk/src/cmp/ts/fragment/EntityPatchOp.fragment.ts +126 -0
- package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +50 -18
- package/project/.sdk/src/cmp/zig/Entity_zig.ts +2 -2
- package/project/.sdk/src/cmp/zig/Main_zig.ts +5 -22
- package/project/.sdk/src/cmp/zig/Package_zig.ts +11 -2
- package/project/.sdk/src/cmp/zig/PrepareAuth_zig.ts +57 -31
- package/project/.sdk/src/cmp/zig/ReadmeEntity_zig.ts +17 -9
- package/project/.sdk/src/cmp/zig/ReadmeHowto_zig.ts +14 -4
- package/project/.sdk/src/cmp/zig/ReadmeInstall_zig.ts +2 -2
- package/project/.sdk/src/cmp/zig/ReadmeIntro_zig.ts +3 -3
- package/project/.sdk/src/cmp/zig/ReadmeModel_zig.ts +12 -10
- package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +29 -12
- package/project/.sdk/src/cmp/zig/ReadmeRef_zig.ts +45 -22
- package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +8 -4
- package/project/.sdk/src/cmp/zig/ReadmeTopTest_zig.ts +10 -3
- package/project/.sdk/src/cmp/zig/TestClean_zig.ts +67 -28
- package/project/.sdk/src/cmp/zig/TestEntity_zig.ts +54 -5
- package/project/.sdk/src/cmp/zig/Test_zig.ts +1 -0
- package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +44 -34
- package/project/.sdk/src/cmp/zig/fragment/EntityPatchOp.fragment.zig +26 -0
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +30 -6
- package/project/.sdk/src/cmp/zig/fragment/Root.fragment.zig +1 -0
- package/project/.sdk/tm/c/LICENSE +1 -1
- package/project/.sdk/tm/c/core/context.c +2 -1
- package/project/.sdk/tm/c/core/helpers.c +21 -0
- package/project/.sdk/tm/c/core/response.c +103 -0
- package/project/.sdk/tm/c/core/sdk.h +26 -0
- package/project/.sdk/tm/c/core/spec.c +10 -0
- package/project/.sdk/tm/c/feature/test.c +46 -2
- package/project/.sdk/tm/c/feature/validate.c +2 -0
- package/project/.sdk/tm/c/tests/feature_harness.h +1 -1
- package/project/.sdk/tm/c/tests/primary_utility_test.c +9 -5
- package/project/.sdk/tm/c/tests/server_variable_test.c +80 -0
- package/project/.sdk/tm/c/utility/make_fetch_def.c +5 -1
- package/project/.sdk/tm/c/utility/make_options.c +84 -6
- package/project/.sdk/tm/c/utility/make_point.c +100 -8
- package/project/.sdk/tm/c/utility/make_spec.c +17 -1
- package/project/.sdk/tm/c/utility/make_url.c +38 -1
- package/project/.sdk/tm/c/utility/media.c +107 -0
- package/project/.sdk/tm/c/utility/param.c +52 -28
- package/project/.sdk/tm/c/utility/prepare_body.c +1 -0
- package/project/.sdk/tm/c/utility/prepare_headers.c +199 -29
- package/project/.sdk/tm/c/utility/prepare_query.c +24 -2
- package/project/.sdk/tm/c/utility/result_body.c +4 -0
- package/project/.sdk/tm/c/utility/transform_request.c +54 -17
- package/project/.sdk/tm/clojure/LICENSE +1 -1
- package/project/.sdk/tm/clojure/feature/secrets/sdk/feature/secrets.clj +0 -3
- package/project/.sdk/tm/clojure/src/sdk/client.clj +19 -5
- package/project/.sdk/tm/clojure/src/sdk/core.clj +415 -117
- package/project/.sdk/tm/clojure/src/sdk/features.clj +44 -20
- package/project/.sdk/tm/clojure/test/sdk/test/feature.clj +21 -1
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +10 -2
- package/project/.sdk/tm/cpp/LICENSE +1 -1
- package/project/.sdk/tm/cpp/core/types.hpp +131 -7
- package/project/.sdk/tm/cpp/feature/test.hpp +32 -2
- package/project/.sdk/tm/cpp/feature/timeout.hpp +29 -9
- package/project/.sdk/tm/cpp/feature/validate.hpp +2 -0
- package/project/.sdk/tm/cpp/test/feature_test.cpp +37 -0
- package/project/.sdk/tm/cpp/test/harness.hpp +1 -1
- package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +6 -2
- package/project/.sdk/tm/cpp/test/server_variable_test.cpp +57 -0
- package/project/.sdk/tm/cpp/utility/cookie.hpp +36 -0
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +441 -82
- package/project/.sdk/tm/csharp/LICENSE +1 -1
- package/project/.sdk/tm/csharp/core/Context.cs +1 -1
- package/project/.sdk/tm/csharp/core/Helpers.cs +17 -0
- package/project/.sdk/tm/csharp/core/Response.cs +75 -0
- package/project/.sdk/tm/csharp/core/Spec.cs +3 -0
- package/project/.sdk/tm/csharp/feature/TestFeature.cs +41 -3
- package/project/.sdk/tm/csharp/feature/TimeoutFeature.cs +31 -3
- package/project/.sdk/tm/csharp/feature/ValidateFeature.cs +2 -0
- package/project/.sdk/tm/csharp/test/FeatureHarness.cs +1 -1
- package/project/.sdk/tm/csharp/test/FeatureTest.cs +35 -0
- package/project/.sdk/tm/csharp/test/PipelineTest.cs +28 -0
- package/project/.sdk/tm/csharp/test/Runner.cs +119 -0
- package/project/.sdk/tm/csharp/test/feature/secrets/SecretsFeatureTest.cs +8 -3
- package/project/.sdk/tm/csharp/utility/Fetcher.cs +25 -7
- package/project/.sdk/tm/csharp/utility/MakeFetchDef.cs +1 -5
- package/project/.sdk/tm/csharp/utility/MakeOptions.cs +8 -6
- package/project/.sdk/tm/csharp/utility/MakePoint.cs +68 -17
- package/project/.sdk/tm/csharp/utility/MakeSpec.cs +24 -6
- package/project/.sdk/tm/csharp/utility/MakeUrl.cs +21 -1
- package/project/.sdk/tm/csharp/utility/Media.cs +124 -0
- package/project/.sdk/tm/csharp/utility/Param.cs +57 -20
- package/project/.sdk/tm/csharp/utility/PrepareBody.cs +4 -0
- package/project/.sdk/tm/csharp/utility/PrepareHeaders.cs +103 -24
- package/project/.sdk/tm/csharp/utility/PrepareQuery.cs +33 -3
- package/project/.sdk/tm/csharp/utility/ResultBody.cs +5 -0
- package/project/.sdk/tm/csharp/utility/TransformRequest.cs +21 -13
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +3 -2
- package/project/.sdk/tm/elixir/LICENSE +1 -1
- package/project/.sdk/tm/elixir/lib/projectname/context.ex +1 -1
- package/project/.sdk/tm/elixir/lib/projectname/core.ex +7 -2
- package/project/.sdk/tm/elixir/lib/projectname/entity_base.ex +43 -12
- package/project/.sdk/tm/elixir/lib/projectname/feature/test.ex +47 -21
- package/project/.sdk/tm/elixir/lib/projectname/feature/validate.ex +2 -0
- package/project/.sdk/tm/elixir/lib/projectname/utility.ex +482 -129
- package/project/.sdk/tm/elixir/test/support/feature_harness.ex +1 -0
- package/project/.sdk/tm/go/LICENSE +1 -1
- package/project/.sdk/tm/go/core/context.go +1 -1
- package/project/.sdk/tm/go/core/helpers.go +19 -1
- package/project/.sdk/tm/go/core/response.go +72 -0
- package/project/.sdk/tm/go/core/spec.go +3 -0
- package/project/.sdk/tm/go/core/types.go +9 -1
- package/project/.sdk/tm/go/feature/test_feature.go +44 -3
- package/project/.sdk/tm/go/feature/timeout_feature.go +39 -22
- package/project/.sdk/tm/go/feature/validate_feature.go +2 -0
- package/project/.sdk/tm/go/test/feature_corpus_test.go +45 -1
- package/project/.sdk/tm/go/test/feature_harness_test.go +1 -1
- package/project/.sdk/tm/go/test/feature_test.go +86 -0
- package/project/.sdk/tm/go/test/primary_utility_test.go +37 -1
- package/project/.sdk/tm/go/test/testsupport_test.go +106 -0
- package/project/.sdk/tm/go/utility/fetcher.go +20 -6
- package/project/.sdk/tm/go/utility/make_fetch_def.go +1 -7
- package/project/.sdk/tm/go/utility/make_options.go +12 -6
- package/project/.sdk/tm/go/utility/make_point.go +52 -3
- package/project/.sdk/tm/go/utility/make_spec.go +23 -3
- package/project/.sdk/tm/go/utility/make_url.go +23 -1
- package/project/.sdk/tm/go/utility/media.go +111 -0
- package/project/.sdk/tm/go/utility/param.go +61 -20
- package/project/.sdk/tm/go/utility/prepare_body.go +3 -0
- package/project/.sdk/tm/go/utility/prepare_headers.go +108 -22
- package/project/.sdk/tm/go/utility/prepare_query.go +25 -2
- package/project/.sdk/tm/go/utility/result_body.go +8 -0
- package/project/.sdk/tm/go/utility/transform_request.go +20 -9
- package/project/.sdk/tm/java/LICENSE +1 -1
- package/project/.sdk/tm/java/core/Context.java +1 -1
- package/project/.sdk/tm/java/core/Helpers.java +13 -0
- package/project/.sdk/tm/java/core/Response.java +61 -0
- package/project/.sdk/tm/java/core/SdkClient.java +21 -3
- package/project/.sdk/tm/java/core/SdkEntity.java +2 -0
- package/project/.sdk/tm/java/core/Spec.java +4 -0
- package/project/.sdk/tm/java/feature/TestFeature.java +46 -3
- package/project/.sdk/tm/java/feature/TimeoutFeature.java +51 -18
- package/project/.sdk/tm/java/feature/ValidateFeature.java +2 -0
- package/project/.sdk/tm/java/test/FeatureCorpusTest.java +93 -35
- package/project/.sdk/tm/java/test/FeatureHarness.java +1 -0
- package/project/.sdk/tm/java/test/FeatureTest.java +33 -0
- package/project/.sdk/tm/java/test/PipelineTest.java +4 -1
- package/project/.sdk/tm/java/test/RunnerSupport.java +97 -0
- package/project/.sdk/tm/java/utility/Clean.java +17 -7
- package/project/.sdk/tm/java/utility/Fetcher.java +27 -3
- package/project/.sdk/tm/java/utility/MakeFetchDef.java +1 -7
- package/project/.sdk/tm/java/utility/MakePoint.java +62 -10
- package/project/.sdk/tm/java/utility/MakeSpec.java +26 -1
- package/project/.sdk/tm/java/utility/MakeUrl.java +23 -1
- package/project/.sdk/tm/java/utility/Media.java +117 -0
- package/project/.sdk/tm/java/utility/Param.java +59 -20
- package/project/.sdk/tm/java/utility/PrepareBody.java +3 -0
- package/project/.sdk/tm/java/utility/PrepareHeaders.java +76 -18
- package/project/.sdk/tm/java/utility/PrepareMethod.java +2 -1
- package/project/.sdk/tm/java/utility/PrepareQuery.java +26 -2
- package/project/.sdk/tm/java/utility/ResultBody.java +5 -0
- package/project/.sdk/tm/java/utility/TransformRequest.java +24 -11
- package/project/.sdk/tm/js/LICENSE +1 -1
- package/project/.sdk/tm/js/src/Context.js +1 -1
- package/project/.sdk/tm/js/src/Control.js +1 -0
- package/project/.sdk/tm/js/src/Response.js +10 -1
- package/project/.sdk/tm/js/src/Spec.js +3 -0
- package/project/.sdk/tm/js/src/feature/base/BaseFeature.js +28 -0
- package/project/.sdk/tm/js/src/feature/netsim/NetsimFeature.js +10 -8
- package/project/.sdk/tm/js/src/feature/ratelimit/RatelimitFeature.js +8 -6
- package/project/.sdk/tm/js/src/feature/retry/RetryFeature.js +17 -4
- package/project/.sdk/tm/js/src/feature/test/TestFeature.js +40 -12
- package/project/.sdk/tm/js/src/feature/timeout/TimeoutFeature.js +17 -3
- package/project/.sdk/tm/js/src/feature/validate/ValidateFeature.js +2 -0
- package/project/.sdk/tm/js/src/utility/CleanUtility.js +25 -1
- package/project/.sdk/tm/js/src/utility/FetcherUtility.js +23 -1
- package/project/.sdk/tm/js/src/utility/MakeErrorUtility.js +2 -2
- package/project/.sdk/tm/js/src/utility/MakeFetchDefUtility.js +14 -2
- package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +6 -6
- package/project/.sdk/tm/js/src/utility/MakePointUtility.js +39 -2
- package/project/.sdk/tm/js/src/utility/MakeRequestUtility.js +27 -2
- package/project/.sdk/tm/js/src/utility/MakeResponseUtility.js +2 -1
- package/project/.sdk/tm/js/src/utility/MakeSpecUtility.js +14 -1
- package/project/.sdk/tm/js/src/utility/MakeUrlUtility.js +23 -0
- package/project/.sdk/tm/js/src/utility/MediaUtility.js +145 -0
- package/project/.sdk/tm/js/src/utility/ParamUtility.js +46 -18
- package/project/.sdk/tm/js/src/utility/PrepareBodyUtility.js +6 -0
- package/project/.sdk/tm/js/src/utility/PrepareHeadersUtility.js +55 -14
- package/project/.sdk/tm/js/src/utility/PrepareMethodUtility.js +9 -0
- package/project/.sdk/tm/js/src/utility/PrepareQueryUtility.js +23 -6
- package/project/.sdk/tm/js/src/utility/ResultBodyUtility.js +60 -3
- package/project/.sdk/tm/js/src/utility/TransformRequestUtility.js +16 -7
- package/project/.sdk/tm/js/test/definition-runner.js +103 -3
- package/project/.sdk/tm/js/test/feature/Corpus.test.js +47 -16
- package/project/.sdk/tm/js/test/feature/harness.js +4 -1
- package/project/.sdk/tm/js/test/feature/secrets/Secrets.test.js +7 -7
- package/project/.sdk/tm/js/test/feature.test.js +134 -0
- package/project/.sdk/tm/js/test/live-contract.js +73 -3
- package/project/.sdk/tm/js/test/live-entity.js +34 -15
- package/project/.sdk/tm/js/test/live-runner.js +52 -7
- package/project/.sdk/tm/js/test/live-scenarios.js +4 -4
- package/project/.sdk/tm/js/test/pipeline.test.js +52 -1
- package/project/.sdk/tm/js/test/utility.js +30 -4
- package/project/.sdk/tm/kotlin/LICENSE +1 -1
- package/project/.sdk/tm/kotlin/core/Context.kt +1 -1
- package/project/.sdk/tm/kotlin/core/Helpers.kt +8 -0
- package/project/.sdk/tm/kotlin/core/Interfaces.kt +2 -0
- package/project/.sdk/tm/kotlin/core/Response.kt +65 -0
- package/project/.sdk/tm/kotlin/core/SdkClient.kt +20 -3
- package/project/.sdk/tm/kotlin/core/Spec.kt +3 -0
- package/project/.sdk/tm/kotlin/feature/TestFeature.kt +23 -3
- package/project/.sdk/tm/kotlin/feature/TimeoutFeature.kt +42 -15
- package/project/.sdk/tm/kotlin/feature/ValidateFeature.kt +2 -0
- package/project/.sdk/tm/kotlin/test/FeatureHarness.kt +1 -1
- package/project/.sdk/tm/kotlin/test/FeatureTest.kt +32 -0
- package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +90 -0
- package/project/.sdk/tm/kotlin/test/ServerVariableTest.kt +50 -0
- package/project/.sdk/tm/kotlin/utility/CoreUtil.kt +9 -7
- package/project/.sdk/tm/kotlin/utility/Fetcher.kt +24 -4
- package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +26 -0
- package/project/.sdk/tm/kotlin/utility/MakePoint.kt +57 -12
- package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +26 -7
- package/project/.sdk/tm/kotlin/utility/Media.kt +83 -0
- package/project/.sdk/tm/kotlin/utility/Prepare.kt +127 -48
- package/project/.sdk/tm/kotlin/utility/ResultTransform.kt +18 -7
- package/project/.sdk/tm/lua/LICENSE +1 -1
- package/project/.sdk/tm/lua/core/context.lua +1 -1
- package/project/.sdk/tm/lua/core/helpers.lua +103 -0
- package/project/.sdk/tm/lua/core/response.lua +3 -0
- package/project/.sdk/tm/lua/core/spec.lua +3 -0
- package/project/.sdk/tm/lua/feature/test_feature.lua +36 -3
- package/project/.sdk/tm/lua/feature/validate_feature.lua +2 -0
- package/project/.sdk/tm/lua/test/feature_test.lua +1 -1
- package/project/.sdk/tm/lua/test/runner.lua +107 -0
- package/project/.sdk/tm/lua/utility/fetcher.lua +9 -2
- package/project/.sdk/tm/lua/utility/make_fetch_def.lua +2 -6
- package/project/.sdk/tm/lua/utility/make_options.lua +10 -7
- package/project/.sdk/tm/lua/utility/make_point.lua +65 -12
- package/project/.sdk/tm/lua/utility/make_spec.lua +19 -4
- package/project/.sdk/tm/lua/utility/make_url.lua +22 -1
- package/project/.sdk/tm/lua/utility/media.lua +106 -0
- package/project/.sdk/tm/lua/utility/param.lua +5 -45
- package/project/.sdk/tm/lua/utility/prepare_body.lua +5 -0
- package/project/.sdk/tm/lua/utility/prepare_headers.lua +71 -21
- package/project/.sdk/tm/lua/utility/prepare_query.lua +28 -6
- package/project/.sdk/tm/lua/utility/result_body.lua +7 -0
- package/project/.sdk/tm/lua/utility/transform_request.lua +23 -10
- package/project/.sdk/tm/lua/utility/unreadable_body.lua +70 -0
- package/project/.sdk/tm/ocaml/LICENSE +1 -1
- package/project/.sdk/tm/ocaml/sdk_features.ml +56 -10
- package/project/.sdk/tm/ocaml/sdk_helpers.ml +9 -0
- package/project/.sdk/tm/ocaml/sdk_runtime.ml +359 -85
- package/project/.sdk/tm/ocaml/sdk_types.ml +6 -0
- package/project/.sdk/tm/ocaml/test/harness.ml +1 -1
- package/project/.sdk/tm/ocaml/test/t_pipeline.ml +2 -1
- package/project/.sdk/tm/perl/LICENSE +1 -1
- package/project/.sdk/tm/perl/core/context.pm +1 -1
- package/project/.sdk/tm/perl/core/response.pm +2 -0
- package/project/.sdk/tm/perl/core/spec.pm +3 -0
- package/project/.sdk/tm/perl/feature/test_feature.pm +26 -3
- package/project/.sdk/tm/perl/feature/validate_feature.pm +2 -0
- package/project/.sdk/tm/perl/t/feature.t +1 -1
- package/project/.sdk/tm/perl/t/feature_corpus.t +72 -33
- package/project/.sdk/tm/perl/t/runner.pm +86 -0
- package/project/.sdk/tm/perl/t/server_variables.t +39 -0
- package/project/.sdk/tm/perl/utility/clean.pm +12 -7
- package/project/.sdk/tm/perl/utility/fetcher.pm +32 -19
- package/project/.sdk/tm/perl/utility/make_fetch_def.pm +4 -4
- package/project/.sdk/tm/perl/utility/make_options.pm +24 -0
- package/project/.sdk/tm/perl/utility/make_point.pm +55 -9
- package/project/.sdk/tm/perl/utility/make_spec.pm +27 -3
- package/project/.sdk/tm/perl/utility/make_url.pm +13 -1
- package/project/.sdk/tm/perl/utility/media.pm +109 -0
- package/project/.sdk/tm/perl/utility/param.pm +50 -24
- package/project/.sdk/tm/perl/utility/prepare_body.pm +11 -3
- package/project/.sdk/tm/perl/utility/prepare_headers.pm +63 -16
- package/project/.sdk/tm/perl/utility/prepare_method.pm +13 -0
- package/project/.sdk/tm/perl/utility/prepare_query.pm +18 -4
- package/project/.sdk/tm/perl/utility/result_body.pm +60 -0
- package/project/.sdk/tm/perl/utility/transform_request.pm +23 -8
- package/project/.sdk/tm/php/LICENSE +1 -1
- package/project/.sdk/tm/php/core/Context.php +1 -1
- package/project/.sdk/tm/php/core/Response.php +3 -0
- package/project/.sdk/tm/php/core/Spec.php +4 -0
- package/project/.sdk/tm/php/feature/CostFeature.php +2 -7
- package/project/.sdk/tm/php/feature/TestFeature.php +33 -3
- package/project/.sdk/tm/php/feature/ValidateFeature.php +14 -12
- package/project/.sdk/tm/php/test/FeatureCorpusTest.php +90 -35
- package/project/.sdk/tm/php/test/FeatureTest.php +4 -5
- package/project/.sdk/tm/php/test/PipelineTest.php +18 -1
- package/project/.sdk/tm/php/test/Runner.php +86 -0
- package/project/.sdk/tm/php/utility/Clean.php +10 -5
- package/project/.sdk/tm/php/utility/Fetcher.php +48 -6
- package/project/.sdk/tm/php/utility/MakeFetchDef.php +2 -1
- package/project/.sdk/tm/php/utility/MakePoint.php +55 -11
- package/project/.sdk/tm/php/utility/MakeSpec.php +21 -4
- package/project/.sdk/tm/php/utility/MakeUrl.php +16 -1
- package/project/.sdk/tm/php/utility/Media.php +111 -0
- package/project/.sdk/tm/php/utility/Param.php +66 -27
- package/project/.sdk/tm/php/utility/PrepareBody.php +5 -0
- package/project/.sdk/tm/php/utility/PrepareHeaders.php +83 -23
- package/project/.sdk/tm/php/utility/PrepareMethod.php +15 -0
- package/project/.sdk/tm/php/utility/PrepareQuery.php +22 -8
- package/project/.sdk/tm/php/utility/ResultBody.php +71 -0
- package/project/.sdk/tm/php/utility/TransformRequest.php +22 -11
- package/project/.sdk/tm/py/LICENSE +1 -1
- package/project/.sdk/tm/py/pkg/core/context.py +1 -1
- package/project/.sdk/tm/py/pkg/core/response.py +3 -0
- package/project/.sdk/tm/py/pkg/core/spec.py +3 -0
- package/project/.sdk/tm/py/pkg/feature/test_feature.py +27 -3
- package/project/.sdk/tm/py/pkg/feature/validate_feature.py +2 -0
- package/project/.sdk/tm/py/pkg/utility/fetcher.py +17 -7
- package/project/.sdk/tm/py/pkg/utility/make_fetch_def.py +2 -5
- package/project/.sdk/tm/py/pkg/utility/make_options.py +14 -8
- package/project/.sdk/tm/py/pkg/utility/make_point.py +40 -4
- package/project/.sdk/tm/py/pkg/utility/make_spec.py +12 -4
- package/project/.sdk/tm/py/pkg/utility/make_url.py +19 -1
- package/project/.sdk/tm/py/pkg/utility/media.py +88 -0
- package/project/.sdk/tm/py/pkg/utility/param.py +47 -18
- package/project/.sdk/tm/py/pkg/utility/prepare_body.py +4 -0
- package/project/.sdk/tm/py/pkg/utility/prepare_headers.py +56 -20
- package/project/.sdk/tm/py/pkg/utility/prepare_method.py +7 -0
- package/project/.sdk/tm/py/pkg/utility/prepare_query.py +17 -8
- package/project/.sdk/tm/py/pkg/utility/result_body.py +51 -0
- package/project/.sdk/tm/py/pkg/utility/transform_request.py +18 -9
- package/project/.sdk/tm/py/test/feature_harness.py +1 -1
- package/project/.sdk/tm/py/test/runner.py +77 -2
- package/project/.sdk/tm/py/test/test_feature_corpus.py +69 -32
- package/project/.sdk/tm/py-data/LICENSE +1 -1
- package/project/.sdk/tm/py-data/Makefile +2 -2
- package/project/.sdk/tm/rb/LICENSE +1 -1
- package/project/.sdk/tm/rb/core/context.rb +1 -1
- package/project/.sdk/tm/rb/core/response.rb +3 -1
- package/project/.sdk/tm/rb/core/spec.rb +4 -1
- package/project/.sdk/tm/rb/feature/test_feature.rb +27 -8
- package/project/.sdk/tm/rb/feature/validate_feature.rb +3 -1
- package/project/.sdk/tm/rb/test/feature_corpus_test.rb +74 -30
- package/project/.sdk/tm/rb/test/feature_test.rb +1 -1
- package/project/.sdk/tm/rb/test/runner.rb +54 -2
- package/project/.sdk/tm/rb/utility/clean.rb +14 -6
- package/project/.sdk/tm/rb/utility/fetcher.rb +22 -14
- package/project/.sdk/tm/rb/utility/make_fetch_def.rb +2 -4
- package/project/.sdk/tm/rb/utility/make_point.rb +44 -8
- package/project/.sdk/tm/rb/utility/make_spec.rb +14 -2
- package/project/.sdk/tm/rb/utility/make_url.rb +13 -1
- package/project/.sdk/tm/rb/utility/media.rb +75 -0
- package/project/.sdk/tm/rb/utility/param.rb +44 -25
- package/project/.sdk/tm/rb/utility/prepare_body.rb +4 -1
- package/project/.sdk/tm/rb/utility/prepare_headers.rb +50 -16
- package/project/.sdk/tm/rb/utility/prepare_method.rb +6 -0
- package/project/.sdk/tm/rb/utility/prepare_query.rb +12 -4
- package/project/.sdk/tm/rb/utility/result_body.rb +45 -0
- package/project/.sdk/tm/rb/utility/transform_request.rb +17 -7
- package/project/.sdk/tm/rust/LICENSE +1 -1
- package/project/.sdk/tm/rust/core/context.rs +1 -1
- package/project/.sdk/tm/rust/core/helpers.rs +10 -0
- package/project/.sdk/tm/rust/core/response.rs +80 -1
- package/project/.sdk/tm/rust/core/spec.rs +4 -0
- package/project/.sdk/tm/rust/core/types.rs +1 -0
- package/project/.sdk/tm/rust/feature/test.rs +29 -2
- package/project/.sdk/tm/rust/feature/validate.rs +2 -0
- package/project/.sdk/tm/rust/tests/common/mod.rs +108 -1
- package/project/.sdk/tm/rust/utility/clean.rs +0 -2
- package/project/.sdk/tm/rust/utility/fetcher.rs +19 -11
- package/project/.sdk/tm/rust/utility/make_fetch_def.rs +12 -1
- package/project/.sdk/tm/rust/utility/make_options.rs +6 -5
- package/project/.sdk/tm/rust/utility/make_point.rs +80 -16
- package/project/.sdk/tm/rust/utility/make_spec.rs +23 -4
- package/project/.sdk/tm/rust/utility/make_url.rs +39 -2
- package/project/.sdk/tm/rust/utility/media.rs +116 -0
- package/project/.sdk/tm/rust/utility/mod.rs +1 -0
- package/project/.sdk/tm/rust/utility/param.rs +66 -19
- package/project/.sdk/tm/rust/utility/prepare_body.rs +4 -0
- package/project/.sdk/tm/rust/utility/prepare_headers.rs +85 -28
- package/project/.sdk/tm/rust/utility/prepare_query.rs +27 -5
- package/project/.sdk/tm/rust/utility/result_body.rs +15 -2
- package/project/.sdk/tm/rust/utility/transform_request.rs +27 -14
- package/project/.sdk/tm/scala/LICENSE +1 -1
- package/project/.sdk/tm/scala/Makefile +3 -1
- package/project/.sdk/tm/scala/core/Context.scala +1 -1
- package/project/.sdk/tm/scala/core/Contracts.scala +1 -0
- package/project/.sdk/tm/scala/core/Helpers.scala +7 -0
- package/project/.sdk/tm/scala/core/Response.scala +55 -0
- package/project/.sdk/tm/scala/core/SdkClient.scala +18 -5
- package/project/.sdk/tm/scala/core/Spec.scala +3 -0
- package/project/.sdk/tm/scala/feature/TestFeature.scala +36 -3
- package/project/.sdk/tm/scala/feature/TimeoutFeature.scala +39 -13
- package/project/.sdk/tm/scala/feature/ValidateFeature.scala +2 -0
- package/project/.sdk/tm/scala/sdktest/SdkTestMain.scala +16 -1
- package/project/.sdk/tm/scala/sdktest/ServerVariableTest.scala +49 -0
- package/project/.sdk/tm/scala/sdktest/feature/secrets/SecretsTestMain.scala +1 -0
- package/project/.sdk/tm/scala/utility/Fetcher.scala +17 -2
- package/project/.sdk/tm/scala/utility/Make.scala +141 -43
- package/project/.sdk/tm/scala/utility/MakeSpec.scala +20 -2
- package/project/.sdk/tm/scala/utility/Media.scala +96 -0
- package/project/.sdk/tm/scala/utility/Misc.scala +56 -23
- package/project/.sdk/tm/scala/utility/Prepare.scala +84 -31
- package/project/.sdk/tm/scala/utility/Results.scala +5 -0
- package/project/.sdk/tm/scala/utility/Transform.scala +15 -19
- package/project/.sdk/tm/swift/LICENSE +1 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Context.swift +1 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Response.swift +57 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Spec.swift +3 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Support.swift +8 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TestFeature.swift +34 -3
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TimeoutFeature.swift +19 -3
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ValidateFeature.swift +2 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Fetcher.swift +21 -12
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Make.swift +85 -18
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +73 -7
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Media.swift +76 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Prepare.swift +118 -43
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/ResultUtil.swift +18 -8
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/FeatureTest.swift +31 -1
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +6 -0
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/ServerVariableTest.swift +42 -0
- package/project/.sdk/tm/ts/LICENSE +1 -1
- package/project/.sdk/tm/ts/src/Context.ts +1 -1
- package/project/.sdk/tm/ts/src/Control.ts +3 -0
- package/project/.sdk/tm/ts/src/Response.ts +10 -1
- package/project/.sdk/tm/ts/src/Spec.ts +4 -0
- package/project/.sdk/tm/ts/src/feature/base/BaseFeature.ts +28 -0
- package/project/.sdk/tm/ts/src/feature/netsim/NetsimFeature.ts +10 -8
- package/project/.sdk/tm/ts/src/feature/ratelimit/RatelimitFeature.ts +8 -6
- package/project/.sdk/tm/ts/src/feature/retry/RetryFeature.ts +17 -4
- package/project/.sdk/tm/ts/src/feature/test/TestFeature.ts +41 -13
- package/project/.sdk/tm/ts/src/feature/timeout/TimeoutFeature.ts +17 -3
- package/project/.sdk/tm/ts/src/feature/validate/ValidateFeature.ts +2 -0
- package/project/.sdk/tm/ts/src/tsconfig.json +2 -1
- package/project/.sdk/tm/ts/src/utility/CleanUtility.ts +25 -1
- package/project/.sdk/tm/ts/src/utility/FetcherUtility.ts +24 -1
- package/project/.sdk/tm/ts/src/utility/MakeErrorUtility.ts +2 -2
- package/project/.sdk/tm/ts/src/utility/MakeFetchDefUtility.ts +15 -2
- package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +6 -6
- package/project/.sdk/tm/ts/src/utility/MakePointUtility.ts +38 -2
- package/project/.sdk/tm/ts/src/utility/MakeRequestUtility.ts +29 -2
- package/project/.sdk/tm/ts/src/utility/MakeResponseUtility.ts +3 -1
- package/project/.sdk/tm/ts/src/utility/MakeSpecUtility.ts +16 -6
- package/project/.sdk/tm/ts/src/utility/MakeUrlUtility.ts +16 -2
- package/project/.sdk/tm/ts/src/utility/MediaUtility.ts +143 -0
- package/project/.sdk/tm/ts/src/utility/ParamUtility.ts +50 -18
- package/project/.sdk/tm/ts/src/utility/PrepareBodyUtility.ts +6 -0
- package/project/.sdk/tm/ts/src/utility/PrepareHeadersUtility.ts +53 -11
- package/project/.sdk/tm/ts/src/utility/PrepareMethodUtility.ts +9 -0
- package/project/.sdk/tm/ts/src/utility/PrepareQueryUtility.ts +22 -6
- package/project/.sdk/tm/ts/src/utility/ResultBodyUtility.ts +68 -3
- package/project/.sdk/tm/ts/src/utility/TransformRequestUtility.ts +16 -6
- package/project/.sdk/tm/ts/test/definition-runner.ts +109 -3
- package/project/.sdk/tm/ts/test/feature/Corpus.test.ts +47 -16
- package/project/.sdk/tm/ts/test/feature/harness.ts +4 -1
- package/project/.sdk/tm/ts/test/feature/secrets/Secrets.test.ts +1 -1
- package/project/.sdk/tm/ts/test/feature.test.ts +134 -0
- package/project/.sdk/tm/ts/test/live-contract.ts +60 -2
- package/project/.sdk/tm/ts/test/live-entity.ts +36 -12
- package/project/.sdk/tm/ts/test/live-runner.ts +79 -12
- package/project/.sdk/tm/ts/test/live-scenarios.ts +5 -4
- package/project/.sdk/tm/ts/test/pipeline.test.ts +52 -1
- package/project/.sdk/tm/ts/test/tsconfig.json +2 -1
- package/project/.sdk/tm/ts/test/utility.ts +35 -7
- package/project/.sdk/tm/zig/LICENSE +1 -1
- package/project/.sdk/tm/zig/core/context.zig +2 -1
- package/project/.sdk/tm/zig/core/helpers.zig +33 -0
- package/project/.sdk/tm/zig/core/response.zig +3 -0
- package/project/.sdk/tm/zig/core/spec.zig +27 -0
- package/project/.sdk/tm/zig/core/types.zig +6 -0
- package/project/.sdk/tm/zig/core/utility.zig +456 -84
- package/project/.sdk/tm/zig/feature/test.zig +31 -2
- package/project/.sdk/tm/zig/feature/validate.zig +2 -0
- package/project/.sdk/tm/zig/test/fh.zig +1 -1
- package/project/sdkgen-package.json +1 -1
- package/src/action/copies.ts +179 -46
- package/src/action/doctor.ts +13 -3
- package/src/action/package.ts +17 -9
- package/src/action/resolve.ts +41 -0
- package/src/admin/npm-trust.ts +9 -8
- package/src/cmp/AgentGuide.ts +4 -3
- package/src/cmp/AgentGuideFeature.ts +3 -2
- package/src/cmp/AgentGuideTop.ts +2 -1
- package/src/cmp/Changelog.ts +2 -1
- package/src/cmp/Deploy.ts +2 -1
- package/src/cmp/Entity.ts +1 -3
- package/src/cmp/ExternalTarget.ts +2 -1
- package/src/cmp/Feature.ts +2 -1
- package/src/cmp/FeatureHook.ts +2 -1
- package/src/cmp/License.ts +7 -5
- package/src/cmp/Main.ts +2 -1
- package/src/cmp/PublishWorkflow.ts +2 -1
- package/src/cmp/Readme.ts +2 -1
- package/src/cmp/ReadmeEntity.ts +3 -3
- package/src/cmp/ReadmeErrors.ts +6 -4
- package/src/cmp/ReadmeExplanation.ts +4 -3
- package/src/cmp/ReadmeFeatures.ts +4 -3
- package/src/cmp/ReadmeHowto.ts +4 -3
- package/src/cmp/ReadmeInstall.ts +4 -3
- package/src/cmp/ReadmeIntro.ts +3 -3
- package/src/cmp/ReadmeModel.ts +6 -3
- package/src/cmp/ReadmeOptions.ts +3 -3
- package/src/cmp/ReadmeQuick.ts +4 -3
- package/src/cmp/ReadmeRef.ts +3 -3
- package/src/cmp/ReadmeRefFeatures.ts +2 -1
- package/src/cmp/ReadmeStation.ts +2 -1
- package/src/cmp/ReadmeTop.ts +121 -37
- package/src/cmp/ReadmeUnions.ts +2 -1
- package/src/cmp/Registered.ts +4 -4
- package/src/cmp/Security.ts +14 -7
- package/src/cmp/Test.ts +2 -1
- package/src/cmp/TestControl.ts +1 -1
- package/src/helpers/component.ts +25 -0
- package/src/helpers/definition.ts +2 -2
- package/src/helpers/definitionPlan.ts +135 -13
- package/src/helpers/featureSource.ts +55 -2
- package/src/helpers/flowGuard.ts +111 -0
- package/src/helpers/generated.ts +488 -0
- package/src/helpers/mcpTools.ts +47 -0
- package/src/helpers/media.ts +79 -0
- package/src/helpers/modelNames.ts +186 -16
- package/src/helpers/naming.ts +188 -0
- package/src/helpers/npm.ts +68 -0
- package/src/helpers/npmScripts.ts +37 -0
- package/src/helpers/opExample.ts +19 -11
- package/src/helpers/opShape.ts +235 -29
- package/src/helpers/optional.ts +76 -0
- package/src/helpers/packageMeta.ts +83 -11
- package/src/helpers/stdrep.ts +5 -1
- package/src/helpers/testPolicy.ts +68 -1
- package/src/helpers/text.ts +33 -0
- package/src/sdkgen.ts +97 -14
- package/src/testkit.ts +2 -1
- package/src/utility.ts +41 -19
- package/project/.sdk/src/cmp/go/fragment/SdkError.fragment.go +0 -22
- package/project/.sdk/src/cmp/lua/fragment/SdkError.fragment.lua +0 -38
- package/project/.sdk/src/cmp/perl/fragment/SdkError.fragment.pm +0 -27
- package/project/.sdk/src/cmp/php/fragment/SdkError.fragment.php +0 -35
- package/project/.sdk/src/cmp/py/fragment/SdkError.fragment.py +0 -27
- package/project/.sdk/src/cmp/rb/fragment/SdkError.fragment.rb +0 -25
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
(ns sdk.core
|
|
16
16
|
(:require [voxgig.struct :as vs]
|
|
17
17
|
[sdk.schema :as schema]
|
|
18
|
-
[clojure.string :as str])
|
|
18
|
+
[clojure.string :as str])
|
|
19
|
+
(:import [java.net URI]
|
|
20
|
+
[java.net.http HttpClient HttpClient$Redirect HttpClient$Version
|
|
21
|
+
HttpRequest HttpRequest$BodyPublishers HttpResponse$BodyHandlers]))
|
|
19
22
|
|
|
20
23
|
(def SDK-NAME "ProjectName")
|
|
21
24
|
|
|
@@ -35,22 +38,29 @@
|
|
|
35
38
|
(let [c (peek-c)]
|
|
36
39
|
(cond (= c \{) (parse-obj) (= c \[) (parse-arr) (= c \") (parse-str)
|
|
37
40
|
(or (= c \t) (= c \f)) (parse-bool) (= c \n) (parse-null) :else (parse-num))))
|
|
41
|
+
(fail [] (throw (ex-info (str "json: unexpected input at " (aget pos 0)) {})))
|
|
42
|
+
(expect [^String word value]
|
|
43
|
+
(if (.startsWith s word (aget pos 0))
|
|
44
|
+
(do (aset pos 0 (+ (aget pos 0) (count word))) value)
|
|
45
|
+
(fail)))
|
|
38
46
|
(parse-obj []
|
|
39
47
|
(next-c)
|
|
40
48
|
(let [m (java.util.LinkedHashMap.)]
|
|
41
49
|
(skip-ws)
|
|
42
50
|
(if (= (peek-c) \}) (do (next-c) m)
|
|
43
51
|
(loop [] (skip-ws)
|
|
44
|
-
(
|
|
52
|
+
(when-not (= (peek-c) \") (fail))
|
|
53
|
+
(let [k (parse-str)] (skip-ws)
|
|
54
|
+
(when-not (= (next-c) \:) (fail))
|
|
45
55
|
(.put m k (parse-val)) (skip-ws)
|
|
46
|
-
(
|
|
56
|
+
(let [c (next-c)] (cond (= c \,) (recur) (= c \}) m :else (fail))))))))
|
|
47
57
|
(parse-arr []
|
|
48
58
|
(next-c)
|
|
49
59
|
(let [a (java.util.ArrayList.)]
|
|
50
60
|
(skip-ws)
|
|
51
61
|
(if (= (peek-c) \]) (do (next-c) a)
|
|
52
62
|
(loop [] (.add a (parse-val)) (skip-ws)
|
|
53
|
-
(
|
|
63
|
+
(let [c (next-c)] (cond (= c \,) (recur) (= c \]) a :else (fail)))))))
|
|
54
64
|
(parse-str []
|
|
55
65
|
(next-c)
|
|
56
66
|
(let [sb (StringBuilder.)]
|
|
@@ -69,10 +79,8 @@
|
|
|
69
79
|
(.append sb e))
|
|
70
80
|
(recur))
|
|
71
81
|
:else (do (.append sb c) (recur)))))))
|
|
72
|
-
(parse-bool []
|
|
73
|
-
|
|
74
|
-
(do (aset pos 0 (+ (aget pos 0) 5)) false)))
|
|
75
|
-
(parse-null [] (aset pos 0 (+ (aget pos 0) 4)) nil)
|
|
82
|
+
(parse-bool [] (if (= (peek-c) \t) (expect "true" true) (expect "false" false)))
|
|
83
|
+
(parse-null [] (expect "null" nil))
|
|
76
84
|
(parse-num []
|
|
77
85
|
(let [start (aget pos 0)]
|
|
78
86
|
(while (and (< (aget pos 0) n)
|
|
@@ -91,7 +99,10 @@
|
|
|
91
99
|
(try (Long/parseLong tok)
|
|
92
100
|
(catch NumberFormatException _
|
|
93
101
|
(bigint (java.math.BigInteger. tok))))))))]
|
|
94
|
-
(parse-val)
|
|
102
|
+
(let [v (parse-val)]
|
|
103
|
+
(skip-ws)
|
|
104
|
+
(when (< (aget pos 0) n) (fail))
|
|
105
|
+
v))))
|
|
95
106
|
|
|
96
107
|
;; The option spec, parsed ONCE. sdk.schema holds the raw JSON and nothing
|
|
97
108
|
;; else — it cannot parse its own data without requiring this namespace,
|
|
@@ -171,6 +182,12 @@
|
|
|
171
182
|
;; ctx.make_error(code, msg)
|
|
172
183
|
(defn ctx-error [ctx code msg] (make-error-obj code msg ctx))
|
|
173
184
|
|
|
185
|
+
;; Whether a comma-separated allow option names the item: whole names, any case.
|
|
186
|
+
(defn allowed? [names item]
|
|
187
|
+
(and (string? names) (string? item) (not= "" item)
|
|
188
|
+
(boolean (some #(.equalsIgnoreCase ^String (str/trim %) ^String item)
|
|
189
|
+
(str/split names #"," -1)))))
|
|
190
|
+
|
|
174
191
|
;; ---------------------------------------------------------------------------
|
|
175
192
|
;; Client accessors. A client is a plain map holding atoms (so it is shared by
|
|
176
193
|
;; reference; the atoms carry the mutable slots).
|
|
@@ -253,7 +270,10 @@
|
|
|
253
270
|
:method (g "method" "GET")
|
|
254
271
|
:body (g "body" nil)
|
|
255
272
|
:url (g "url" "")
|
|
256
|
-
:path (g "path" "")
|
|
273
|
+
:path (g "path" "")
|
|
274
|
+
;; The query parameters prepare-auth placed: the credential, which
|
|
275
|
+
;; the request sends and the entity's match leaves out.
|
|
276
|
+
:authquery (g "authquery" [])})))
|
|
257
277
|
|
|
258
278
|
;; ---------------------------------------------------------------------------
|
|
259
279
|
;; Result (atom-map).
|
|
@@ -291,7 +311,9 @@
|
|
|
291
311
|
:headers (g "headers")
|
|
292
312
|
:json (when (vs/isfunc jf) jf)
|
|
293
313
|
:body (g "body")
|
|
294
|
-
:err (g "err")
|
|
314
|
+
:err (g "err")
|
|
315
|
+
;; Set by a transport that could not read a non-blank body as JSON.
|
|
316
|
+
:unreadable (true? (g "unreadable"))})))
|
|
295
317
|
|
|
296
318
|
;; ---------------------------------------------------------------------------
|
|
297
319
|
;; Control (atom-map). Shared with the base context when not overridden.
|
|
@@ -369,7 +391,7 @@
|
|
|
369
391
|
(or (nil? opname) (= "" opname)) (make-operation (vs/jm))
|
|
370
392
|
:else
|
|
371
393
|
(let [opcfg (vs/getpath config (str "entity." entname ".op." opname))
|
|
372
|
-
input (if (or (= opname "update") (= opname "create")) "data" "match")
|
|
394
|
+
input (if (or (= opname "update") (= opname "create") (= opname "patch")) "data" "match")
|
|
373
395
|
points (let [t (when (vs/ismap opcfg) (vs/getprop opcfg "points"))]
|
|
374
396
|
(if (vs/islist t) t (vs/jt)))
|
|
375
397
|
op (make-operation (vs/jm "entity" entname "name" opname "input" input "points" points))]
|
|
@@ -698,50 +720,169 @@
|
|
|
698
720
|
;; shared corpus caught all three.
|
|
699
721
|
(get METHOD-MAP (op-name (oget ctx :op))))))
|
|
700
722
|
|
|
723
|
+
;; The arguments a point declares in one location, query or header, each as
|
|
724
|
+
;; [name wire val]: the name it travels under and the value this call passes
|
|
725
|
+
;; in its match or else its data. Unlike a path parameter, the entity's stored
|
|
726
|
+
;; match and data never supply one.
|
|
727
|
+
(defn- call-args [ctx kind]
|
|
728
|
+
(let [point (oget ctx :point)
|
|
729
|
+
args (when point (vs/getprop point "args"))
|
|
730
|
+
defs (when (vs/ismap args) (vs/getprop args kind))]
|
|
731
|
+
(if (vs/islist defs)
|
|
732
|
+
(vec (keep (fn [ad]
|
|
733
|
+
(let [name (when (vs/ismap ad) (vs/getprop ad "name"))]
|
|
734
|
+
(when (and (string? name) (seq name))
|
|
735
|
+
(let [orig (vs/getprop ad "orig")
|
|
736
|
+
wire (if (and (string? orig) (seq orig)) orig name)
|
|
737
|
+
v (vs/getprop (oget ctx :reqmatch) name)
|
|
738
|
+
v (if (nil? v) (vs/getprop (oget ctx :reqdata) name) v)]
|
|
739
|
+
[name wire v]))))
|
|
740
|
+
(vec defs)))
|
|
741
|
+
[])))
|
|
742
|
+
|
|
743
|
+
;; ---- media -------------------------------------------------------------------
|
|
744
|
+
;;
|
|
745
|
+
;; The media types a point declares: `response` (the model's `rs`) for the
|
|
746
|
+
;; Accept header, and `body` (the model's `rb`) for the request body.
|
|
747
|
+
|
|
748
|
+
;; The data key holding a raw request body. Like `$action`, it can never be a
|
|
749
|
+
;; declared argument name.
|
|
750
|
+
(def RAW-BODY "$body")
|
|
751
|
+
|
|
752
|
+
(defn json-media? [media]
|
|
753
|
+
(let [m (-> (if (string? media) media "") (str/split #";" 2) first (or "") str/trim str/lower-case)]
|
|
754
|
+
(or (= "application/json" m) (= "text/json" m) (str/ends-with? m "+json"))))
|
|
755
|
+
|
|
756
|
+
;; The declared JSON type alone, else every declared type in the model's
|
|
757
|
+
;; order; nil when no success response declares a body.
|
|
758
|
+
(defn accept-of [point]
|
|
759
|
+
(let [res (when point (vs/getprop point "response"))
|
|
760
|
+
media (when (vs/ismap res) (vs/getprop res "media"))]
|
|
761
|
+
(when (and (string? media) (seq media))
|
|
762
|
+
(if (= "json" (vs/getprop res "kind"))
|
|
763
|
+
media
|
|
764
|
+
(let [alts (vs/getprop res "alternatives")
|
|
765
|
+
others (when (vs/islist alts)
|
|
766
|
+
(keep (fn [alt]
|
|
767
|
+
(let [m (when (vs/ismap alt) (vs/getprop alt "media"))]
|
|
768
|
+
(when (and (string? m) (seq m)) m)))
|
|
769
|
+
(vec alts)))]
|
|
770
|
+
(str/join ", " (cons media others)))))))
|
|
771
|
+
|
|
772
|
+
(defn raw-request? [point]
|
|
773
|
+
(let [body (when point (vs/getprop point "body"))]
|
|
774
|
+
(and (vs/ismap body) (= "raw" (vs/getprop body "kind")))))
|
|
775
|
+
|
|
776
|
+
(defn json-request? [point]
|
|
777
|
+
(let [body (when point (vs/getprop point "body"))]
|
|
778
|
+
(and (vs/ismap body) (= "json" (vs/getprop body "kind")))))
|
|
779
|
+
|
|
780
|
+
;; Bytes or a stream go as given. A map or a list is JSON, and so is a scalar
|
|
781
|
+
;; on a point that declares a JSON body.
|
|
782
|
+
(defn request-body [point body]
|
|
783
|
+
(cond
|
|
784
|
+
(or (bytes? body) (instance? java.io.InputStream body)) body
|
|
785
|
+
(or (vs/isnode body) (json-request? point)) (vs/jsonify body)
|
|
786
|
+
:else body))
|
|
787
|
+
|
|
788
|
+
(defn- media-header? [^java.util.Map headers name]
|
|
789
|
+
(boolean (some (fn [k] (and (string? k) (= name (str/lower-case k)))) (vec (.keySet headers)))))
|
|
790
|
+
|
|
791
|
+
;; A caller's accept wins. A declared request type replaces each JSON
|
|
792
|
+
;; content-type, the SDK default, and leaves any other the caller set.
|
|
793
|
+
(defn media-headers [point ^java.util.Map headers]
|
|
794
|
+
(let [accept (accept-of point)]
|
|
795
|
+
(when (and accept (not (media-header? headers "accept")))
|
|
796
|
+
(.put headers "accept" accept)))
|
|
797
|
+
(let [body (when point (vs/getprop point "body"))
|
|
798
|
+
kind (when (vs/ismap body) (vs/getprop body "kind"))
|
|
799
|
+
media (when (vs/ismap body) (vs/getprop body "media"))]
|
|
800
|
+
(when (and (contains? #{"raw" "json"} kind) (string? media) (seq media))
|
|
801
|
+
(doseq [k (vec (.keySet headers))]
|
|
802
|
+
(when (and (string? k) (= "content-type" (str/lower-case k)) (json-media? (.get headers k)))
|
|
803
|
+
(.remove headers k)))
|
|
804
|
+
(when-not (media-header? headers "content-type")
|
|
805
|
+
(.put headers "content-type" media))))
|
|
806
|
+
headers)
|
|
807
|
+
|
|
808
|
+
;; A byte array, an InputStream or a string, sent as it is. An InputStream is
|
|
809
|
+
;; read here, once, before the first attempt, so that a retry sends the same
|
|
810
|
+
;; bytes again.
|
|
811
|
+
(defn raw-body [reqdata]
|
|
812
|
+
(let [body (when (vs/ismap reqdata) (vs/getprop reqdata RAW-BODY))]
|
|
813
|
+
(if (instance? java.io.InputStream body) (.readAllBytes ^java.io.InputStream body) body)))
|
|
814
|
+
|
|
815
|
+
;; The form style of a cookie parameter: a list repeats the name, a map sends
|
|
816
|
+
;; its own keys, and every value is percent-encoded.
|
|
817
|
+
(defn- cookie-pair [wire v]
|
|
818
|
+
(let [esc (fn [x] (vs/escurl (vs/stringify x)))]
|
|
819
|
+
(str/join "; "
|
|
820
|
+
(cond
|
|
821
|
+
(vs/islist v) (map (fn [item] (str wire "=" (esc item))) v)
|
|
822
|
+
(vs/ismap v) (map (fn [k] (str (vs/escurl k) "=" (esc (vs/getprop v k)))) (vs/keysof v))
|
|
823
|
+
:else [(str wire "=" (esc v))]))))
|
|
824
|
+
|
|
825
|
+
;; The caller's cookie pieces with the named cookies removed: a cookie is one
|
|
826
|
+
;; ;-delimited piece, whatever its value holds.
|
|
827
|
+
(defn- cookie-keep [header names]
|
|
828
|
+
(vec (for [piece (str/split header #";")
|
|
829
|
+
:let [cookie (str/trim piece)
|
|
830
|
+
name (str/trim (first (str/split cookie #"=" 2)))]
|
|
831
|
+
:when (and (not= "" cookie) (not (contains? names name)))]
|
|
832
|
+
cookie)))
|
|
833
|
+
|
|
701
834
|
(defn u-prepare-headers [ctx]
|
|
702
835
|
(let [options (client-options-map (oget ctx :client))
|
|
703
836
|
headers (vs/getprop options "headers")
|
|
704
|
-
out (
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
(
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
837
|
+
out (media-headers (oget ctx :point)
|
|
838
|
+
(if (nil? headers) (vs/jm)
|
|
839
|
+
(let [o (vs/clone headers)] (if (vs/ismap o) o (vs/jm)))))]
|
|
840
|
+
;; A header argument replaces a default of the same name, whatever its case.
|
|
841
|
+
(doseq [[_ wire v] (call-args ctx "header")]
|
|
842
|
+
(when (some? v)
|
|
843
|
+
(let [key (str/lower-case wire)]
|
|
844
|
+
(doseq [k (vec (.keySet ^java.util.Map out))]
|
|
845
|
+
(when (and (string? k) (= key (str/lower-case k)))
|
|
846
|
+
(.remove ^java.util.Map out k)))
|
|
847
|
+
(.put ^java.util.Map out key (vs/stringify v)))))
|
|
848
|
+
;; A cookie argument travels in the cookie header, form serialized and
|
|
849
|
+
;; percent-encoded, replacing a cookie of the same name among those the
|
|
850
|
+
;; caller's headers already send.
|
|
851
|
+
(let [sent (vec (for [[_ wire v] (call-args ctx "cookie") :when (some? v)] [wire v]))]
|
|
852
|
+
(when (seq sent)
|
|
853
|
+
(let [names (set (mapcat (fn [[wire v]] (if (vs/ismap v) (map vs/escurl (vs/keysof v)) [wire])) sent))
|
|
854
|
+
given (vec (filter (fn [k] (and (string? k) (= "cookie" (str/lower-case k))))
|
|
855
|
+
(vec (.keySet ^java.util.Map out))))
|
|
856
|
+
kept (vec (for [k given
|
|
857
|
+
:let [v (.get ^java.util.Map out k)]
|
|
858
|
+
:when (string? v)
|
|
859
|
+
cookie (cookie-keep v names)]
|
|
860
|
+
cookie))
|
|
861
|
+
pairs (vec (for [[wire v] sent
|
|
862
|
+
:let [pair (cookie-pair wire v)]
|
|
863
|
+
:when (not= "" pair)]
|
|
864
|
+
pair))]
|
|
865
|
+
(doseq [k given] (.remove ^java.util.Map out k))
|
|
866
|
+
(when (seq (concat kept pairs))
|
|
867
|
+
(.put ^java.util.Map out "cookie" (str/join "; " (concat kept pairs)))))))
|
|
726
868
|
out))
|
|
727
869
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
870
|
+
;; The name a point gives a parameter in the call, if it renames it.
|
|
871
|
+
(defn- param-alias [point key]
|
|
872
|
+
(let [am (when point (to-map (vs/getprop point "alias")))
|
|
873
|
+
ak (when am (vs/getprop am key))]
|
|
874
|
+
(if (string? ak) ak "")))
|
|
875
|
+
|
|
876
|
+
;; The value the call or its entity gives a point's parameter, under its name
|
|
877
|
+
;; or the point's alias for it.
|
|
878
|
+
(defn param-value [ctx point key]
|
|
879
|
+
(let [akey (param-alias point key)
|
|
732
880
|
reqmatch (oget ctx :reqmatch)
|
|
733
|
-
data (oget ctx :data)
|
|
734
881
|
reqdata (oget ctx :reqdata)
|
|
735
|
-
|
|
736
|
-
key (if (pos? (bit-and vs/T_string pt)) paramdef
|
|
737
|
-
(let [k (vs/getprop paramdef "name")] (if (string? k) k "")))
|
|
738
|
-
akey (let [am (when point (to-map (vs/getprop point "alias")))]
|
|
739
|
-
(if am (let [ak (vs/getprop am key)] (if (string? ak) ak "")) ""))
|
|
882
|
+
data (oget ctx :data)
|
|
740
883
|
v (atom (vs/getprop reqmatch key))]
|
|
741
|
-
(when (nil? @v) (reset! v (vs/getprop match key)))
|
|
742
|
-
(when (and (nil? @v) (seq akey))
|
|
743
|
-
(when spec (.put ^java.util.Map (oget spec :alias) akey key))
|
|
744
|
-
(reset! v (vs/getprop reqmatch akey)))
|
|
884
|
+
(when (nil? @v) (reset! v (vs/getprop (oget ctx :match) key)))
|
|
885
|
+
(when (and (nil? @v) (seq akey)) (reset! v (vs/getprop reqmatch akey)))
|
|
745
886
|
(when (nil? @v) (reset! v (vs/getprop reqdata key)))
|
|
746
887
|
(when (nil? @v) (reset! v (vs/getprop data key)))
|
|
747
888
|
(when (and (nil? @v) (seq akey))
|
|
@@ -749,6 +890,19 @@
|
|
|
749
890
|
(when (nil? @v) (reset! v (vs/getprop data akey))))
|
|
750
891
|
@v))
|
|
751
892
|
|
|
893
|
+
(defn u-param [ctx paramdef]
|
|
894
|
+
(let [point (oget ctx :point)
|
|
895
|
+
spec (oget ctx :spec)
|
|
896
|
+
pt (vs/typify paramdef)
|
|
897
|
+
key (if (pos? (bit-and vs/T_string pt)) paramdef
|
|
898
|
+
(let [k (vs/getprop paramdef "name")] (if (string? k) k "")))
|
|
899
|
+
akey (param-alias point key)]
|
|
900
|
+
(when (and spec (seq akey)
|
|
901
|
+
(nil? (vs/getprop (oget ctx :reqmatch) key))
|
|
902
|
+
(nil? (vs/getprop (oget ctx :match) key)))
|
|
903
|
+
(.put ^java.util.Map (oget spec :alias) akey key))
|
|
904
|
+
(param-value ctx point key)))
|
|
905
|
+
|
|
752
906
|
(defn u-prepare-params [ctx]
|
|
753
907
|
(let [point (oget ctx :point)
|
|
754
908
|
params (let [args (when point (vs/getprop point "args"))
|
|
@@ -782,9 +936,22 @@
|
|
|
782
936
|
aheader (let [args (when point (vs/getprop point "args"))
|
|
783
937
|
h (when (vs/ismap args) (vs/getprop args "header"))]
|
|
784
938
|
(if (vs/islist h) h (vs/jt)))
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
939
|
+
;; A cookie parameter travels in the cookie header, which u-prepare-headers fills.
|
|
940
|
+
acookie (let [args (when point (vs/getprop point "args"))
|
|
941
|
+
c (when (vs/ismap args) (vs/getprop args "cookie"))]
|
|
942
|
+
(if (vs/islist c) c (vs/jt)))
|
|
943
|
+
;; A header or cookie name leaves the query unless a query parameter
|
|
944
|
+
;; shares it: then both are sent.
|
|
945
|
+
declared (let [args (when point (vs/getprop point "args"))
|
|
946
|
+
q (when (vs/ismap args) (vs/getprop args "query"))]
|
|
947
|
+
(into #{} (keep (fn [qd] (when (vs/ismap qd) (vs/getprop qd "name")))
|
|
948
|
+
(vec (if (vs/islist q) q (vs/jt))))))
|
|
949
|
+
routed (fn [d] (when (vs/ismap d)
|
|
950
|
+
(let [n (vs/getprop d "name")] (when-not (contains? declared n) n))))
|
|
951
|
+
pset (into (into (into (into #{} (vec params))
|
|
952
|
+
(keep (fn [pd] (when (vs/ismap pd) (vs/getprop pd "name"))) (vec aparams)))
|
|
953
|
+
(keep routed (vec aheader)))
|
|
954
|
+
(keep routed (vec acookie)))
|
|
788
955
|
;; A query parameter travels under the name the definition gives it,
|
|
789
956
|
;; its orig, which the model may have renamed for the caller.
|
|
790
957
|
aquery (let [args (when point (vs/getprop point "args"))
|
|
@@ -801,6 +968,10 @@
|
|
|
801
968
|
(let [k (vs/getprop item 0) v (vs/getprop item 1)]
|
|
802
969
|
(when (and (some? v) (string? k) (not= "$action" k) (not (contains? pset k)))
|
|
803
970
|
(.put ^java.util.Map out (get wire k k) v))))
|
|
971
|
+
;; A create or update passes its query arguments in its data.
|
|
972
|
+
(doseq [[name orig v] (call-args ctx "query")]
|
|
973
|
+
(when (and (some? v) (not (contains? pset name)))
|
|
974
|
+
(.put ^java.util.Map out orig v)))
|
|
804
975
|
out))
|
|
805
976
|
|
|
806
977
|
(defn- omit-keys [reqdata names]
|
|
@@ -816,19 +987,32 @@
|
|
|
816
987
|
;; so the body is a copy without it. The caller's map is left untouched.
|
|
817
988
|
(defn- strip-action [reqdata] (omit-keys reqdata ["$action"]))
|
|
818
989
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
(
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
990
|
+
(defn- field-arg? [ctx name]
|
|
991
|
+
(let [point (oget ctx :point)
|
|
992
|
+
args (when point (vs/getprop point "args"))]
|
|
993
|
+
(boolean
|
|
994
|
+
(some (fn [kind]
|
|
995
|
+
(let [defs (when (vs/ismap args) (vs/getprop args kind))]
|
|
996
|
+
(when (vs/islist defs)
|
|
997
|
+
(some (fn [ad]
|
|
998
|
+
(and (vs/ismap ad)
|
|
999
|
+
(= name (vs/getprop ad "name"))
|
|
1000
|
+
(true? (vs/getprop ad "field"))))
|
|
1001
|
+
(vec defs)))))
|
|
1002
|
+
["header" "cookie" "query"]))))
|
|
1003
|
+
|
|
1004
|
+
;; A header, cookie or query argument travels where u-prepare-headers or
|
|
1005
|
+
;; u-prepare-query sends it, so the body is built from the request data
|
|
1006
|
+
;; without it, unless the entity declares it as a field too.
|
|
1007
|
+
(defn- routed-arg-names [ctx]
|
|
1008
|
+
(->> (concat (call-args ctx "header") (call-args ctx "cookie") (call-args ctx "query"))
|
|
1009
|
+
(map first)
|
|
1010
|
+
(remove (partial field-arg? ctx))
|
|
1011
|
+
vec))
|
|
828
1012
|
|
|
829
1013
|
(defn u-transform-request [ctx]
|
|
830
1014
|
(let [spec (oget ctx :spec) point (oget ctx :point)
|
|
831
|
-
data (omit-keys (oget ctx :reqdata) (
|
|
1015
|
+
data (omit-keys (oget ctx :reqdata) (routed-arg-names ctx))]
|
|
832
1016
|
(when spec (oset! spec :step "reqform"))
|
|
833
1017
|
(let [transform (to-map (vs/getprop point "transform"))]
|
|
834
1018
|
(strip-action
|
|
@@ -838,7 +1022,10 @@
|
|
|
838
1022
|
(vs/transform (vs/jm "reqdata" data) reqform))))))))
|
|
839
1023
|
|
|
840
1024
|
(defn u-prepare-body [ctx]
|
|
841
|
-
(
|
|
1025
|
+
(cond
|
|
1026
|
+
(not= "data" (op-input (oget ctx :op))) nil
|
|
1027
|
+
(raw-request? (oget ctx :point)) (raw-body (oget ctx :reqdata))
|
|
1028
|
+
:else (ucall ctx :transform-request)))
|
|
842
1029
|
|
|
843
1030
|
;; ---- graphql ---------------------------------------------------------------
|
|
844
1031
|
;;
|
|
@@ -964,6 +1151,17 @@
|
|
|
964
1151
|
;; feature/secrets) go on resolving exactly as before.
|
|
965
1152
|
(load "prepare_auth")
|
|
966
1153
|
|
|
1154
|
+
;; The path parameters of a point that neither the call nor the entity gives a
|
|
1155
|
+
;; value for, looked up as u-param looks them up.
|
|
1156
|
+
(defn- unfilled-params [ctx point]
|
|
1157
|
+
(let [parts (vs/getprop point "parts")]
|
|
1158
|
+
(if (vs/islist parts)
|
|
1159
|
+
(vec (keep (fn [part]
|
|
1160
|
+
(when-let [[_ pname] (and (string? part) (re-matches #"\{([^{}/]+)\}" part))]
|
|
1161
|
+
(when (nil? (param-value ctx point pname)) pname)))
|
|
1162
|
+
(vec parts)))
|
|
1163
|
+
[])))
|
|
1164
|
+
|
|
967
1165
|
(defn u-make-point [ctx]
|
|
968
1166
|
(let [preset (out-get ctx "point")]
|
|
969
1167
|
(if (some? preset)
|
|
@@ -972,11 +1170,12 @@
|
|
|
972
1170
|
(do (oset! ctx :point preset) [(oget ctx :point) nil]))
|
|
973
1171
|
(let [op (oget ctx :op)
|
|
974
1172
|
options (oget ctx :options)
|
|
975
|
-
allow-op (
|
|
1173
|
+
allow-op (vs/getpath options "allow.op")]
|
|
976
1174
|
(cond
|
|
977
|
-
(not (
|
|
1175
|
+
(not (allowed? allow-op (op-name op)))
|
|
978
1176
|
[nil (ctx-error ctx "point_op_allow"
|
|
979
|
-
(str "Operation \"" (op-name op) "\" not allowed by SDK option allow.op value: \""
|
|
1177
|
+
(str "Operation \"" (op-name op) "\" not allowed by SDK option allow.op value: \""
|
|
1178
|
+
(if (string? allow-op) allow-op "") "\""))]
|
|
980
1179
|
(zero? (vs/size (op-points op)))
|
|
981
1180
|
[nil (ctx-error ctx "point_no_points"
|
|
982
1181
|
(str "Operation \"" (op-name op) "\" has no endpoint definitions."))]
|
|
@@ -1044,14 +1243,34 @@
|
|
|
1044
1243
|
(str "Operation \"" (op-name op) "\" action \"" (vs/stringify req-action) "\" is not valid."))]
|
|
1045
1244
|
|
|
1046
1245
|
:else
|
|
1047
|
-
(let [
|
|
1048
|
-
|
|
1246
|
+
(let [all (vec (op-points op))
|
|
1247
|
+
;; A call without an action falls back to a point without
|
|
1248
|
+
;; one, as generation does, and only to a route the call
|
|
1249
|
+
;; can fill.
|
|
1250
|
+
plain (filterv #(nil? (vs/getprop (to-map (vs/getprop % "select")) "$action")) all)
|
|
1251
|
+
fillable (filterv #(empty? (unfilled-params ctx %)) plain)
|
|
1252
|
+
chosen (or matched (when (seq fillable) (own-point fillable)))]
|
|
1253
|
+
(cond
|
|
1254
|
+
(and (nil? matched) (empty? plain))
|
|
1255
|
+
[nil (ctx-error ctx "point_action_required"
|
|
1256
|
+
(str "Operation \"" (op-name op)
|
|
1257
|
+
"\" has only action endpoints; pass $action to choose one."))]
|
|
1258
|
+
|
|
1259
|
+
(nil? chosen)
|
|
1260
|
+
[nil (ctx-error ctx "point_no_match"
|
|
1261
|
+
(str "Operation \"" (op-name op)
|
|
1262
|
+
"\" has no endpoint whose path parameters are all given (missing: "
|
|
1263
|
+
(str/join ", " (unfilled-params ctx (own-point plain))) ")."))]
|
|
1264
|
+
|
|
1265
|
+
(and reqselector req-action)
|
|
1049
1266
|
(let [point-select (to-map (vs/getprop chosen "select"))
|
|
1050
1267
|
point-action (vs/getprop point-select "$action")]
|
|
1051
1268
|
(if (not= req-action point-action)
|
|
1052
1269
|
[nil (ctx-error ctx "point_action_invalid"
|
|
1053
1270
|
(str "Operation \"" (op-name op) "\" action \"" (vs/stringify req-action) "\" is not valid."))]
|
|
1054
1271
|
(do (oset! ctx :point chosen) [(oget ctx :point) nil])))
|
|
1272
|
+
|
|
1273
|
+
:else
|
|
1055
1274
|
(do (oset! ctx :point chosen) [(oget ctx :point) nil]))))))))))
|
|
1056
1275
|
|
|
1057
1276
|
(defn u-make-spec [ctx]
|
|
@@ -1071,10 +1290,11 @@
|
|
|
1071
1290
|
spec (make-spec (vs/jm "base" base "prefix" prefix "parts" parts "suffix" suffix "step" "start"))]
|
|
1072
1291
|
(oset! ctx :spec spec)
|
|
1073
1292
|
(oset! spec :method (ucall ctx :prepare-method))
|
|
1074
|
-
(let [allow-method (
|
|
1075
|
-
(if (not (
|
|
1293
|
+
(let [allow-method (vs/getpath options "allow.method")]
|
|
1294
|
+
(if (not (allowed? allow-method (oget spec :method)))
|
|
1076
1295
|
[nil (ctx-error ctx "spec_method_allow"
|
|
1077
|
-
(str "Method \"" (oget spec :method) "\" not allowed by SDK option allow.method value: \""
|
|
1296
|
+
(str "Method \"" (oget spec :method) "\" not allowed by SDK option allow.method value: \""
|
|
1297
|
+
(if (string? allow-method) allow-method "") "\""))]
|
|
1078
1298
|
(do
|
|
1079
1299
|
(oset! spec :params (ucall ctx :prepare-params))
|
|
1080
1300
|
(oset! spec :query (ucall ctx :prepare-query))
|
|
@@ -1097,8 +1317,17 @@
|
|
|
1097
1317
|
(oset! spec :body (ucall ctx :prepare-body))
|
|
1098
1318
|
(oset! spec :path (ucall ctx :prepare-path))))
|
|
1099
1319
|
(when-let [ex (oget (oget ctx :ctrl) :explain)] (.put ^java.util.Map ex "spec" spec))
|
|
1100
|
-
|
|
1101
|
-
|
|
1320
|
+
;; Whatever prepare-auth sets in the query, under whichever name,
|
|
1321
|
+
;; is the credential; a key it leaves as it was is the caller's.
|
|
1322
|
+
(let [query (java.util.LinkedHashMap. ^java.util.Map (or (oget spec :query) (vs/jm)))
|
|
1323
|
+
[s err] (ucall ctx :prepare-auth)]
|
|
1324
|
+
(if err [nil err]
|
|
1325
|
+
(do
|
|
1326
|
+
(oset! s :authquery
|
|
1327
|
+
(vec (for [[k v] (or (oget s :query) (vs/jm))
|
|
1328
|
+
:when (or (not (.containsKey query k)) (not= (.get query k) v))]
|
|
1329
|
+
k)))
|
|
1330
|
+
(oset! ctx :spec s) [s nil])))))))))
|
|
1102
1331
|
|
|
1103
1332
|
(defn u-make-url [ctx]
|
|
1104
1333
|
(let [spec (oget ctx :spec) result (oget ctx :result)]
|
|
@@ -1108,6 +1337,8 @@
|
|
|
1108
1337
|
:else
|
|
1109
1338
|
(let [url (atom (vs/join (vs/jt (oget spec :base) (oget spec :prefix) (oget spec :path) (oget spec :suffix)) "/" true))
|
|
1110
1339
|
resmatch (vs/jm)
|
|
1340
|
+
;; Sent with the request, never recorded as the entity's match.
|
|
1341
|
+
authquery (set (oget spec :authquery []))
|
|
1111
1342
|
point (oget ctx :point)
|
|
1112
1343
|
orig (when point (vs/getprop point "orig"))]
|
|
1113
1344
|
;; A route the definition ends with a slash keeps it: a server such as a
|
|
@@ -1123,16 +1354,26 @@
|
|
|
1123
1354
|
encoded (vs/escurl val-str)]
|
|
1124
1355
|
(reset! url (str/replace @url placeholder encoded))
|
|
1125
1356
|
(.put ^java.util.Map resmatch k v)))))
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1357
|
+
;; A placeholder left in the route would send the request to the wrong
|
|
1358
|
+
;; route. The base's own placeholders are server variables, resolved
|
|
1359
|
+
;; with the options.
|
|
1360
|
+
(if-let [unfilled (let [base (str/replace (str (or (oget spec :base) "")) #"/+$" "")]
|
|
1361
|
+
(seq (re-seq #"\{[^{}/]+\}"
|
|
1362
|
+
(if (str/starts-with? @url base) (subs @url (count base)) @url))))]
|
|
1363
|
+
["" (ctx-error ctx "url_param_missing"
|
|
1364
|
+
(str "URL path has no value for " (str/join ", " unfilled) "."))]
|
|
1365
|
+
(do
|
|
1366
|
+
(let [qsep (atom "?")]
|
|
1367
|
+
(doseq [item (or (vs/items (oget spec :query)) [])]
|
|
1368
|
+
(let [k (vs/getprop item 0) v (vs/getprop item 1)]
|
|
1369
|
+
(when (and (some? v) (string? k))
|
|
1370
|
+
(let [val-str (if (string? v) v (vs/stringify v))]
|
|
1371
|
+
(reset! url (str @url @qsep (vs/escurl k) "=" (vs/escurl val-str)))
|
|
1372
|
+
(reset! qsep "&")
|
|
1373
|
+
(when-not (contains? authquery k)
|
|
1374
|
+
(.put ^java.util.Map resmatch k v)))))))
|
|
1375
|
+
(oset! result :resmatch resmatch)
|
|
1376
|
+
[@url nil]))))))
|
|
1136
1377
|
|
|
1137
1378
|
(defn u-make-fetch-def [ctx]
|
|
1138
1379
|
(let [spec (oget ctx :spec)]
|
|
@@ -1147,7 +1388,7 @@
|
|
|
1147
1388
|
(let [fetchdef (vs/jm "url" url "method" (oget spec :method) "headers" (oget spec :headers))
|
|
1148
1389
|
body (oget spec :body)]
|
|
1149
1390
|
(when (some? body)
|
|
1150
|
-
(.put ^java.util.Map fetchdef "body" (
|
|
1391
|
+
(.put ^java.util.Map fetchdef "body" (request-body (oget ctx :point) body)))
|
|
1151
1392
|
[fetchdef nil]))))))))
|
|
1152
1393
|
|
|
1153
1394
|
(defn u-make-request [ctx]
|
|
@@ -1195,10 +1436,47 @@
|
|
|
1195
1436
|
(oset! result :headers (if (and response (vs/ismap (oget response :headers))) (oget response :headers) (vs/jm))))
|
|
1196
1437
|
result))
|
|
1197
1438
|
|
|
1439
|
+
(def ^:private preview-length 160)
|
|
1440
|
+
|
|
1441
|
+
(defn- header-value [headers name]
|
|
1442
|
+
(or (some (fn [item]
|
|
1443
|
+
(when (= name (str/lower-case (str (vs/getprop item 0)))) (str (vs/getprop item 1))))
|
|
1444
|
+
(or (when (vs/ismap headers) (vs/items headers)) []))
|
|
1445
|
+
""))
|
|
1446
|
+
|
|
1447
|
+
;; Cleaned whole: a secret the bound would split could leave its prefix.
|
|
1448
|
+
(defn- body-preview [ctx text]
|
|
1449
|
+
(let [^String flat (str (ucall ctx :clean (str/trim (str/replace (str text) #"\s+" " "))))]
|
|
1450
|
+
(if (> (.codePointCount flat 0 (count flat)) preview-length)
|
|
1451
|
+
(str (subs flat 0 (.offsetByCodePoints flat 0 (int preview-length))) "...")
|
|
1452
|
+
flat)))
|
|
1453
|
+
|
|
1454
|
+
;; A body that is not JSON. An HTTP failure keeps its own error, with the
|
|
1455
|
+
;; response described; otherwise the code tells a wrong content type from
|
|
1456
|
+
;; malformed JSON.
|
|
1457
|
+
(defn unreadable-body [ctx status headers text sent failed]
|
|
1458
|
+
(let [ctype (header-value headers "content-type")
|
|
1459
|
+
ua (str (ucall ctx :clean (header-value sent "user-agent")))
|
|
1460
|
+
detail (str "HTTP " status ", content-type " (if (= "" ctype) "none" ctype)
|
|
1461
|
+
", user-agent " (if (= "" ua) "transport default" ua)
|
|
1462
|
+
(if (nil? text) "" (str ", body: " (body-preview ctx text))))]
|
|
1463
|
+
(cond
|
|
1464
|
+
(sdk-error? failed) (assoc failed :msg (str (:msg failed) " (" detail ")"))
|
|
1465
|
+
(some? failed) (ctx-error ctx (or (err-code failed) "") (str (err-msg failed) " (" detail ")"))
|
|
1466
|
+
(or (= "" ctype) (str/includes? (str/lower-case ctype) "json"))
|
|
1467
|
+
(ctx-error ctx "response_json_invalid" (str "response: body is not valid JSON (" detail ")"))
|
|
1468
|
+
:else
|
|
1469
|
+
(ctx-error ctx "response_content_type" (str "response: expected JSON, got " ctype " (" detail ")")))))
|
|
1470
|
+
|
|
1198
1471
|
(defn u-result-body [ctx]
|
|
1199
1472
|
(let [response (oget ctx :response) result (oget ctx :result)]
|
|
1200
1473
|
(when (and result response (oget response :json) (oget response :body))
|
|
1201
1474
|
(oset! result :body ((oget response :json))))
|
|
1475
|
+
(when (and result response (oget response :unreadable))
|
|
1476
|
+
(let [spec (oget ctx :spec)]
|
|
1477
|
+
(oset! result :err (unreadable-body ctx (oget result :status) (oget result :headers)
|
|
1478
|
+
(oget response :body) (when spec (oget spec :headers))
|
|
1479
|
+
(oget result :err)))))
|
|
1202
1480
|
result))
|
|
1203
1481
|
|
|
1204
1482
|
(defn u-transform-response [ctx]
|
|
@@ -1329,16 +1607,20 @@
|
|
|
1329
1607
|
|
|
1330
1608
|
;; A feature's name is not a field name: only the sensitive names inside its
|
|
1331
1609
|
;; settings count, so `secrets` does not make every setting a secret. Entity
|
|
1332
|
-
;; blocks hold entity settings and seeded records, never a credential
|
|
1610
|
+
;; blocks hold entity settings and seeded records, never a credential, and
|
|
1611
|
+
;; rbac's rules are keyed by entity and operation names.
|
|
1333
1612
|
(defn- clean-add-options [ctx opts]
|
|
1334
|
-
(let [
|
|
1613
|
+
(let [plain (fn [block fname]
|
|
1614
|
+
(omit-keys block (if (= "rbac" fname) ["entity" "rules"] ["entity"])))
|
|
1335
1615
|
top (dissoc (into {} opts) "feature" "entity")
|
|
1336
1616
|
feature (vs/getprop opts "feature")]
|
|
1337
|
-
(u-clean-add-sensitive ctx (cond-> top (contains? top "test") (update "test"
|
|
1338
|
-
(doseq [fopts (cond (vs/ismap feature)
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1617
|
+
(u-clean-add-sensitive ctx (cond-> top (contains? top "test") (update "test" plain nil)))
|
|
1618
|
+
(doseq [[fname fopts] (cond (vs/ismap feature)
|
|
1619
|
+
(map #(vector % (vs/getprop feature %)) (vs/keysof feature))
|
|
1620
|
+
(vs/islist feature)
|
|
1621
|
+
(map #(vector (when (vs/ismap %) (vs/getprop % "name")) %) feature)
|
|
1622
|
+
:else [[nil feature]])]
|
|
1623
|
+
(u-clean-add-sensitive ctx (plain fopts fname)))))
|
|
1342
1624
|
|
|
1343
1625
|
(defn u-make-options [ctx]
|
|
1344
1626
|
(let [options (or (oget ctx :options) (vs/jm))
|
|
@@ -1488,39 +1770,55 @@
|
|
|
1488
1770
|
;; Default transport + fetcher gate.
|
|
1489
1771
|
;; ---------------------------------------------------------------------------
|
|
1490
1772
|
|
|
1773
|
+
;; java.net.http rather than HttpURLConnection, which refuses PATCH. HTTP/1.1,
|
|
1774
|
+
;; as the vendored sekreto client: over cleartext, HTTP/2 opens with an h2c
|
|
1775
|
+
;; upgrade that holds the body back, and some servers refuse that request.
|
|
1776
|
+
(def ^:private http-client
|
|
1777
|
+
(delay (-> (HttpClient/newBuilder)
|
|
1778
|
+
(.version HttpClient$Version/HTTP_1_1)
|
|
1779
|
+
(.followRedirects HttpClient$Redirect/NORMAL)
|
|
1780
|
+
(.build))))
|
|
1781
|
+
|
|
1782
|
+
(defn- body-publisher [body]
|
|
1783
|
+
(cond
|
|
1784
|
+
(string? body) (HttpRequest$BodyPublishers/ofString body)
|
|
1785
|
+
(bytes? body) (HttpRequest$BodyPublishers/ofByteArray body)
|
|
1786
|
+
(instance? java.io.InputStream body)
|
|
1787
|
+
(HttpRequest$BodyPublishers/ofByteArray (.readAllBytes ^java.io.InputStream body))
|
|
1788
|
+
:else (HttpRequest$BodyPublishers/noBody)))
|
|
1789
|
+
|
|
1491
1790
|
(defn default-http-fetch [fullurl fetchdef]
|
|
1492
1791
|
(let [method-str (or (vs/getprop fetchdef "method") "GET")
|
|
1493
|
-
body-str (vs/getprop fetchdef "body")
|
|
1494
1792
|
headers (or (vs/getprop fetchdef "headers") (vs/jm))]
|
|
1495
1793
|
(try
|
|
1496
|
-
(let [
|
|
1497
|
-
|
|
1498
|
-
(.
|
|
1499
|
-
(
|
|
1500
|
-
(
|
|
1501
|
-
(
|
|
1502
|
-
(when (
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
(.write os (.getBytes ^String body-str "UTF-8"))))
|
|
1512
|
-
(let [code (.getResponseCode ^java.net.HttpURLConnection conn)
|
|
1513
|
-
is (try (.getInputStream ^java.net.HttpURLConnection conn) (catch Exception _ (.getErrorStream ^java.net.HttpURLConnection conn)))
|
|
1514
|
-
body (when is (slurp is))
|
|
1794
|
+
(let [builder (HttpRequest/newBuilder (URI/create fullurl))
|
|
1795
|
+
has-ua (atom false)]
|
|
1796
|
+
(.method builder (str/upper-case method-str) (body-publisher (vs/getprop fetchdef "body")))
|
|
1797
|
+
(doseq [item (or (vs/items headers) [])]
|
|
1798
|
+
(let [k (vs/getprop item 0) v (vs/getprop item 1)]
|
|
1799
|
+
(when (string? v)
|
|
1800
|
+
(when (= (str/lower-case (str k)) "user-agent") (reset! has-ua true))
|
|
1801
|
+
(.setHeader builder (str k) v))))
|
|
1802
|
+
;; The default User-Agent is recorded with the headers the request sent.
|
|
1803
|
+
(when-not @has-ua
|
|
1804
|
+
(let [ua (str "Mozilla/5.0 (compatible; " SDK-NAME "SDK/1.0)")]
|
|
1805
|
+
(.setHeader builder "User-Agent" ua)
|
|
1806
|
+
(vs/setprop headers "user-agent" ua)))
|
|
1807
|
+
(let [resp (.send ^HttpClient @http-client (.build builder) (HttpResponse$BodyHandlers/ofByteArray))
|
|
1808
|
+
body (String. ^bytes (.body resp) "UTF-8")
|
|
1515
1809
|
resp-headers (vs/jm)]
|
|
1516
|
-
(doseq [[k vlist] (.
|
|
1517
|
-
(
|
|
1518
|
-
(let [json-body
|
|
1519
|
-
|
|
1520
|
-
|
|
1810
|
+
(doseq [[k vlist] (.map (.headers resp))]
|
|
1811
|
+
(.put ^java.util.Map resp-headers (str/lower-case k) (str/join "," vlist)))
|
|
1812
|
+
(let [[json-body unreadable] (if (str/blank? body)
|
|
1813
|
+
[nil false]
|
|
1814
|
+
(try [(json-parse body) false] (catch Exception _ [nil true])))]
|
|
1815
|
+
[(vs/jm "status" (.statusCode resp) "statusText" "" "headers" resp-headers
|
|
1816
|
+
"json" (fn [] json-body) "body" body "unreadable" unreadable) nil])))
|
|
1817
|
+
;; A request that got no answer fails the operation.
|
|
1521
1818
|
(catch Throwable e
|
|
1522
|
-
|
|
1523
|
-
|
|
1819
|
+
(when (instance? InterruptedException e) (.interrupt (Thread/currentThread)))
|
|
1820
|
+
[nil (make-error-obj "fetch_transport"
|
|
1821
|
+
(str (.getName (class e)) (when-let [m (.getMessage e)] (str ": " m))))]))))
|
|
1524
1822
|
|
|
1525
1823
|
(defn u-fetcher [ctx fullurl fetchdef]
|
|
1526
1824
|
(let [client (oget ctx :client)]
|