@voxgig/sdkgen 4.46.0 → 4.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/action/check.js +61 -4
- package/dist/action/check.js.map +1 -1
- package/dist/action/doctor.d.ts +5 -0
- package/dist/action/doctor.js +51 -6
- package/dist/action/doctor.js.map +1 -1
- package/dist/action/package.d.ts +1 -1
- package/dist/action/package.js +6 -16
- package/dist/action/package.js.map +1 -1
- package/dist/action/remove.js +15 -4
- package/dist/action/remove.js.map +1 -1
- package/dist/action/resolve.d.ts +1 -0
- package/dist/action/resolve.js +10 -4
- package/dist/action/resolve.js.map +1 -1
- package/dist/action/target.js +55 -29
- package/dist/action/target.js.map +1 -1
- package/dist/admin/status.d.ts +7 -1
- package/dist/admin/status.js +34 -5
- package/dist/admin/status.js.map +1 -1
- package/dist/cmp/AgentGuide.js +53 -32
- package/dist/cmp/AgentGuide.js.map +1 -1
- package/dist/cmp/AgentGuideContent.d.ts +3 -3
- package/dist/cmp/AgentGuideContent.js +26 -19
- package/dist/cmp/AgentGuideContent.js.map +1 -1
- package/dist/cmp/AgentGuideFeature.js +14 -6
- package/dist/cmp/AgentGuideFeature.js.map +1 -1
- package/dist/cmp/AgentGuideTop.js +25 -16
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/Changelog.js +37 -7
- package/dist/cmp/Changelog.js.map +1 -1
- package/dist/cmp/Deploy.js +67 -21
- package/dist/cmp/Deploy.js.map +1 -1
- package/dist/cmp/Entity.js +1 -1
- package/dist/cmp/Entity.js.map +1 -1
- package/dist/cmp/ExternalTarget.js +5 -0
- package/dist/cmp/ExternalTarget.js.map +1 -1
- package/dist/cmp/Feature.js +2 -2
- package/dist/cmp/Feature.js.map +1 -1
- package/dist/cmp/FeatureDocs.d.ts +1 -0
- package/dist/cmp/FeatureDocs.js +2 -1
- package/dist/cmp/FeatureDocs.js.map +1 -1
- package/dist/cmp/License.d.ts +3 -1
- package/dist/cmp/License.js +25 -7
- package/dist/cmp/License.js.map +1 -1
- package/dist/cmp/Main.js +1 -1
- package/dist/cmp/Main.js.map +1 -1
- package/dist/cmp/PublishWorkflow.js +63 -53
- package/dist/cmp/PublishWorkflow.js.map +1 -1
- package/dist/cmp/Readme.js +0 -2
- package/dist/cmp/Readme.js.map +1 -1
- package/dist/cmp/ReadmeErrors.js +77 -77
- package/dist/cmp/ReadmeErrors.js.map +1 -1
- package/dist/cmp/ReadmeExplanation.js +5 -10
- package/dist/cmp/ReadmeExplanation.js.map +1 -1
- package/dist/cmp/ReadmeFeatures.js +13 -9
- package/dist/cmp/ReadmeFeatures.js.map +1 -1
- package/dist/cmp/ReadmeIntro.js +1 -1
- package/dist/cmp/ReadmeIntro.js.map +1 -1
- package/dist/cmp/ReadmeModel.js +15 -11
- package/dist/cmp/ReadmeModel.js.map +1 -1
- package/dist/cmp/ReadmeOptions.js +3 -11
- package/dist/cmp/ReadmeOptions.js.map +1 -1
- package/dist/cmp/ReadmeQuick.js +10 -2
- package/dist/cmp/ReadmeQuick.js.map +1 -1
- package/dist/cmp/ReadmeRefFeatures.js +34 -30
- package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
- package/dist/cmp/ReadmeStation.js +3 -3
- package/dist/cmp/ReadmeStation.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +135 -102
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/Registered.js +1 -1
- package/dist/cmp/Registered.js.map +1 -1
- package/dist/cmp/Security.js +23 -3
- package/dist/cmp/Security.js.map +1 -1
- package/dist/cmp/Test.js +1 -1
- package/dist/cmp/Test.js.map +1 -1
- package/dist/helpers/alongside.d.ts +2 -3
- package/dist/helpers/alongside.js +16 -15
- package/dist/helpers/alongside.js.map +1 -1
- package/dist/helpers/applicability.d.ts +2 -1
- package/dist/helpers/applicability.js +14 -1
- package/dist/helpers/applicability.js.map +1 -1
- package/dist/helpers/canonSpec.d.ts +5 -1
- package/dist/helpers/canonSpec.js +44 -10
- package/dist/helpers/canonSpec.js.map +1 -1
- package/dist/helpers/clientOptions.d.ts +9 -0
- package/dist/helpers/clientOptions.js +44 -0
- package/dist/helpers/clientOptions.js.map +1 -0
- package/dist/helpers/component.js +9 -1
- package/dist/helpers/component.js.map +1 -1
- package/dist/helpers/consumer.d.ts +10 -0
- package/dist/helpers/consumer.js +42 -0
- package/dist/helpers/consumer.js.map +1 -0
- package/dist/helpers/definitionPlan.js +0 -1
- package/dist/helpers/definitionPlan.js.map +1 -1
- package/dist/helpers/doctext.js +10 -1
- package/dist/helpers/doctext.js.map +1 -1
- package/dist/helpers/facts.js +198 -4
- package/dist/helpers/facts.js.map +1 -1
- package/dist/helpers/flowGuard.d.ts +1 -1
- package/dist/helpers/flowGuard.js +21 -8
- package/dist/helpers/flowGuard.js.map +1 -1
- package/dist/helpers/generated.d.ts +1 -0
- package/dist/helpers/generated.js +1 -1
- package/dist/helpers/generated.js.map +1 -1
- package/dist/helpers/graphqlPoint.d.ts +2 -1
- package/dist/helpers/graphqlPoint.js +17 -0
- package/dist/helpers/graphqlPoint.js.map +1 -1
- package/dist/helpers/guardModel.d.ts +2 -0
- package/dist/helpers/guardModel.js +41 -0
- package/dist/helpers/guardModel.js.map +1 -0
- package/dist/helpers/manifest.d.ts +2 -1
- package/dist/helpers/manifest.js +16 -0
- package/dist/helpers/manifest.js.map +1 -1
- package/dist/helpers/mcpTools.d.ts +3 -2
- package/dist/helpers/mcpTools.js +9 -3
- package/dist/helpers/mcpTools.js.map +1 -1
- package/dist/helpers/naming.js +3 -2
- package/dist/helpers/naming.js.map +1 -1
- package/dist/helpers/opShape.d.ts +8 -2
- package/dist/helpers/opShape.js +48 -18
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/optional.d.ts +0 -1
- package/dist/helpers/optional.js +0 -1
- package/dist/helpers/optional.js.map +1 -1
- package/dist/helpers/optspec.js +16 -4
- package/dist/helpers/optspec.js.map +1 -1
- package/dist/helpers/packageMeta.d.ts +7 -4
- package/dist/helpers/packageMeta.js +130 -47
- package/dist/helpers/packageMeta.js.map +1 -1
- package/dist/helpers/placement.d.ts +15 -0
- package/dist/helpers/placement.js +76 -0
- package/dist/helpers/placement.js.map +1 -0
- package/dist/helpers/readerdir.d.ts +4 -0
- package/dist/helpers/readerdir.js +26 -0
- package/dist/helpers/readerdir.js.map +1 -0
- package/dist/helpers/semver.d.ts +2 -1
- package/dist/helpers/semver.js +21 -0
- package/dist/helpers/semver.js.map +1 -1
- package/dist/helpers/serverVars.js +3 -2
- package/dist/helpers/serverVars.js.map +1 -1
- package/dist/helpers/shipped.d.ts +2 -1
- package/dist/helpers/shipped.js +12 -0
- package/dist/helpers/shipped.js.map +1 -1
- package/dist/helpers/sourcestring.d.ts +4 -0
- package/dist/helpers/sourcestring.js +49 -0
- package/dist/helpers/sourcestring.js.map +1 -0
- package/dist/helpers/stdrep.d.ts +1 -1
- package/dist/helpers/stdrep.js +8 -4
- package/dist/helpers/stdrep.js.map +1 -1
- package/dist/helpers/surface.d.ts +12 -0
- package/dist/helpers/surface.js +81 -0
- package/dist/helpers/surface.js.map +1 -0
- package/dist/helpers/targetguard.d.ts +13 -0
- package/dist/helpers/targetguard.js +65 -0
- package/dist/helpers/targetguard.js.map +1 -0
- package/dist/helpers/testPolicy.js +3 -3
- package/dist/helpers/testPolicy.js.map +1 -1
- package/dist/helpers/text.d.ts +3 -1
- package/dist/helpers/text.js +16 -0
- package/dist/helpers/text.js.map +1 -1
- package/dist/helpers/textguard.d.ts +31 -0
- package/dist/helpers/textguard.js +157 -0
- package/dist/helpers/textguard.js.map +1 -0
- package/dist/helpers/title.d.ts +4 -0
- package/dist/helpers/title.js +52 -0
- package/dist/helpers/title.js.map +1 -0
- package/dist/sdkgen.d.ts +15 -11
- package/dist/sdkgen.js +77 -71
- package/dist/sdkgen.js.map +1 -1
- package/dist/testkit.d.ts +6 -2
- package/dist/testkit.js +4 -1
- package/dist/testkit.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utility.js +12 -4
- package/dist/utility.js.map +1 -1
- package/model/fact.aontu +106 -0
- package/model/sdkgen.aontu +11 -1
- package/package.json +1 -1
- package/project/.sdk/model/feature/netsim.aontu +1 -1
- package/project/.sdk/model/feature/secrets.aontu +1 -0
- package/project/.sdk/model/feature/test.aontu +1 -1
- package/project/.sdk/model/feature/validate.aontu +1 -1
- package/project/.sdk/model/target/c.aontu +1 -0
- package/project/.sdk/model/target/clojure.aontu +1 -0
- package/project/.sdk/model/target/cpp.aontu +1 -0
- package/project/.sdk/model/target/csharp.aontu +1 -0
- package/project/.sdk/model/target/elixir.aontu +1 -0
- package/project/.sdk/model/target/go-cli.aontu +5 -5
- package/project/.sdk/model/target/go-mcp.aontu +6 -8
- package/project/.sdk/model/target/go.aontu +1 -1
- package/project/.sdk/model/target/java.aontu +1 -0
- package/project/.sdk/model/target/kotlin.aontu +1 -0
- package/project/.sdk/model/target/ocaml.aontu +1 -0
- package/project/.sdk/model/target/perl.aontu +1 -0
- package/project/.sdk/model/target/py-data.aontu +2 -0
- package/project/.sdk/model/target/rust.aontu +1 -0
- package/project/.sdk/model/target/scala.aontu +1 -0
- package/project/.sdk/model/target/zig.aontu +1 -0
- package/project/.sdk/src/cmp/c/Config_c.ts +8 -33
- package/project/.sdk/src/cmp/c/EntityTypes_c.ts +6 -5
- package/project/.sdk/src/cmp/c/Main_c.ts +4 -0
- package/project/.sdk/src/cmp/c/PrepareAuth_c.ts +9 -19
- package/project/.sdk/src/cmp/c/ReadmeEntity_c.ts +8 -10
- package/project/.sdk/src/cmp/c/ReadmeExamplesTest_c.ts +12 -4
- package/project/.sdk/src/cmp/c/ReadmeExplanation_c.ts +4 -2
- package/project/.sdk/src/cmp/c/ReadmeHowto_c.ts +18 -22
- package/project/.sdk/src/cmp/c/ReadmeInstall_c.ts +19 -15
- package/project/.sdk/src/cmp/c/ReadmeIntro_c.ts +5 -7
- package/project/.sdk/src/cmp/c/ReadmeModel_c.ts +32 -33
- package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +29 -12
- package/project/.sdk/src/cmp/c/ReadmeRef_c.ts +35 -26
- package/project/.sdk/src/cmp/c/ReadmeTopHowto_c.ts +5 -4
- package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +19 -6
- package/project/.sdk/src/cmp/c/TestClean_c.ts +298 -22
- package/project/.sdk/src/cmp/c/TestDirect_c.ts +1 -1
- package/project/.sdk/src/cmp/c/fragment/Entity.fragment.c +9 -9
- package/project/.sdk/src/cmp/c/fragment/EntityCreateOp.fragment.c +0 -1
- package/project/.sdk/src/cmp/c/fragment/EntityLoadOp.fragment.c +0 -1
- package/project/.sdk/src/cmp/c/fragment/EntityPatchOp.fragment.c +0 -1
- package/project/.sdk/src/cmp/c/fragment/EntityRemoveOp.fragment.c +0 -1
- package/project/.sdk/src/cmp/c/fragment/EntityUpdateOp.fragment.c +0 -1
- package/project/.sdk/src/cmp/c/fragment/Main.fragment.c +19 -7
- package/project/.sdk/src/cmp/clojure/Config_clojure.ts +4 -25
- package/project/.sdk/src/cmp/clojure/Main_clojure.ts +4 -0
- package/project/.sdk/src/cmp/clojure/PrepareAuth_clojure.ts +10 -21
- package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +8 -10
- package/project/.sdk/src/cmp/clojure/ReadmeExamplesTest_clojure.ts +13 -5
- package/project/.sdk/src/cmp/clojure/ReadmeExplanation_clojure.ts +13 -3
- package/project/.sdk/src/cmp/clojure/ReadmeHowto_clojure.ts +9 -8
- package/project/.sdk/src/cmp/clojure/ReadmeInstall_clojure.ts +13 -11
- package/project/.sdk/src/cmp/clojure/ReadmeIntro_clojure.ts +5 -7
- package/project/.sdk/src/cmp/clojure/ReadmeModel_clojure.ts +24 -33
- package/project/.sdk/src/cmp/clojure/ReadmeQuick_clojure.ts +21 -10
- package/project/.sdk/src/cmp/clojure/ReadmeRef_clojure.ts +23 -23
- package/project/.sdk/src/cmp/clojure/ReadmeTopHowto_clojure.ts +5 -4
- package/project/.sdk/src/cmp/clojure/ReadmeTopQuick_clojure.ts +11 -4
- package/project/.sdk/src/cmp/clojure/Schema_clojure.ts +2 -1
- package/project/.sdk/src/cmp/clojure/TestClean_clojure.ts +177 -12
- package/project/.sdk/src/cmp/clojure/fragment/Entity.fragment.clj +11 -12
- package/project/.sdk/src/cmp/clojure/fragment/EntityLoadOp.fragment.clj +1 -1
- package/project/.sdk/src/cmp/clojure/fragment/EntityRemoveOp.fragment.clj +2 -2
- package/project/.sdk/src/cmp/cpp/Config_cpp.ts +2 -17
- package/project/.sdk/src/cmp/cpp/EntityTypes_cpp.ts +4 -9
- package/project/.sdk/src/cmp/cpp/Main_cpp.ts +4 -0
- package/project/.sdk/src/cmp/cpp/PrepareAuth_cpp.ts +10 -21
- package/project/.sdk/src/cmp/cpp/ReadmeEntity_cpp.ts +10 -12
- package/project/.sdk/src/cmp/cpp/ReadmeExamplesTest_cpp.ts +12 -4
- package/project/.sdk/src/cmp/cpp/ReadmeExplanation_cpp.ts +5 -2
- package/project/.sdk/src/cmp/cpp/ReadmeHowto_cpp.ts +28 -11
- package/project/.sdk/src/cmp/cpp/ReadmeInstall_cpp.ts +16 -11
- package/project/.sdk/src/cmp/cpp/ReadmeIntro_cpp.ts +5 -7
- package/project/.sdk/src/cmp/cpp/ReadmeModel_cpp.ts +26 -35
- package/project/.sdk/src/cmp/cpp/ReadmeQuick_cpp.ts +23 -13
- package/project/.sdk/src/cmp/cpp/ReadmeRef_cpp.ts +30 -29
- package/project/.sdk/src/cmp/cpp/ReadmeTopHowto_cpp.ts +5 -4
- package/project/.sdk/src/cmp/cpp/ReadmeTopQuick_cpp.ts +13 -7
- package/project/.sdk/src/cmp/cpp/TestClean_cpp.ts +285 -14
- package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +44 -24
- package/project/.sdk/src/cmp/cpp/fragment/EntityCreateOp.fragment.cpp +0 -1
- package/project/.sdk/src/cmp/cpp/fragment/EntityLoadOp.fragment.cpp +0 -1
- package/project/.sdk/src/cmp/cpp/fragment/EntityPatchOp.fragment.cpp +0 -1
- package/project/.sdk/src/cmp/cpp/fragment/EntityRemoveOp.fragment.cpp +0 -1
- package/project/.sdk/src/cmp/cpp/fragment/EntityUpdateOp.fragment.cpp +0 -1
- package/project/.sdk/src/cmp/csharp/Config_csharp.ts +5 -27
- package/project/.sdk/src/cmp/csharp/EntityTypes_csharp.ts +4 -5
- package/project/.sdk/src/cmp/csharp/Main_csharp.ts +5 -1
- package/project/.sdk/src/cmp/csharp/Package_csharp.ts +2 -1
- package/project/.sdk/src/cmp/csharp/PrepareAuth_csharp.ts +9 -20
- package/project/.sdk/src/cmp/csharp/ReadmeEntity_csharp.ts +10 -12
- package/project/.sdk/src/cmp/csharp/ReadmeExamplesTest_csharp.ts +18 -10
- package/project/.sdk/src/cmp/csharp/ReadmeExplanation_csharp.ts +1 -1
- package/project/.sdk/src/cmp/csharp/ReadmeHowto_csharp.ts +24 -12
- package/project/.sdk/src/cmp/csharp/ReadmeInstall_csharp.ts +9 -6
- package/project/.sdk/src/cmp/csharp/ReadmeIntro_csharp.ts +4 -6
- package/project/.sdk/src/cmp/csharp/ReadmeModel_csharp.ts +25 -35
- package/project/.sdk/src/cmp/csharp/ReadmeQuick_csharp.ts +22 -11
- package/project/.sdk/src/cmp/csharp/ReadmeRef_csharp.ts +25 -25
- package/project/.sdk/src/cmp/csharp/ReadmeTopHowto_csharp.ts +5 -4
- package/project/.sdk/src/cmp/csharp/ReadmeTopQuick_csharp.ts +11 -4
- package/project/.sdk/src/cmp/csharp/TestClean_csharp.ts +420 -27
- package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +13 -13
- package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +34 -35
- package/project/.sdk/src/cmp/csharp/fragment/EntityBase.fragment.cs +8 -7
- package/project/.sdk/src/cmp/csharp/fragment/Main.fragment.cs +4 -4
- package/project/.sdk/src/cmp/elixir/Config_elixir.ts +5 -26
- package/project/.sdk/src/cmp/elixir/EntityTypes_elixir.ts +8 -6
- package/project/.sdk/src/cmp/elixir/Main_elixir.ts +8 -2
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +3 -3
- package/project/.sdk/src/cmp/elixir/PrepareAuth_elixir.ts +10 -18
- package/project/.sdk/src/cmp/elixir/ReadmeEntity_elixir.ts +10 -12
- package/project/.sdk/src/cmp/elixir/ReadmeExamplesTest_elixir.ts +12 -5
- package/project/.sdk/src/cmp/elixir/ReadmeExplanation_elixir.ts +4 -2
- package/project/.sdk/src/cmp/elixir/ReadmeHowto_elixir.ts +13 -21
- package/project/.sdk/src/cmp/elixir/ReadmeInstall_elixir.ts +12 -8
- package/project/.sdk/src/cmp/elixir/ReadmeIntro_elixir.ts +5 -7
- package/project/.sdk/src/cmp/elixir/ReadmeModel_elixir.ts +24 -35
- package/project/.sdk/src/cmp/elixir/ReadmeQuick_elixir.ts +22 -11
- package/project/.sdk/src/cmp/elixir/ReadmeRef_elixir.ts +24 -24
- package/project/.sdk/src/cmp/elixir/ReadmeTopHowto_elixir.ts +5 -4
- package/project/.sdk/src/cmp/elixir/ReadmeTopQuick_elixir.ts +11 -4
- package/project/.sdk/src/cmp/elixir/Schema_elixir.ts +2 -1
- package/project/.sdk/src/cmp/elixir/TestClean_elixir.ts +231 -12
- package/project/.sdk/src/cmp/elixir/TestEntity_elixir.ts +3 -3
- package/project/.sdk/src/cmp/elixir/app_elixir.ts +14 -0
- package/project/.sdk/src/cmp/elixir/fragment/Main.fragment.ex +4 -4
- package/project/.sdk/src/cmp/go/Config_go.ts +16 -31
- package/project/.sdk/src/cmp/go/EntityTypes_go.ts +13 -7
- package/project/.sdk/src/cmp/go/Main_go.ts +10 -12
- package/project/.sdk/src/cmp/go/PrepareAuth_go.ts +12 -21
- package/project/.sdk/src/cmp/go/ReadmeEntity_go.ts +5 -5
- package/project/.sdk/src/cmp/go/ReadmeExamplesTest_go.ts +20 -9
- package/project/.sdk/src/cmp/go/ReadmeExplanation_go.ts +4 -2
- package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +28 -13
- package/project/.sdk/src/cmp/go/ReadmeInstall_go.ts +11 -6
- package/project/.sdk/src/cmp/go/ReadmeIntro_go.ts +5 -4
- package/project/.sdk/src/cmp/go/ReadmeModel_go.ts +32 -34
- package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +16 -12
- package/project/.sdk/src/cmp/go/ReadmeRef_go.ts +32 -22
- package/project/.sdk/src/cmp/go/ReadmeTopHowto_go.ts +5 -4
- package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +7 -4
- package/project/.sdk/src/cmp/go/Schema_go.ts +2 -1
- package/project/.sdk/src/cmp/go/TestClean_go.ts +484 -45
- package/project/.sdk/src/cmp/go/TestDirect_go.ts +15 -13
- package/project/.sdk/src/cmp/go/TestEntity_go.ts +35 -35
- package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +1 -1
- package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +14 -6
- package/project/.sdk/src/cmp/go-cli/Main_go-cli.ts +238 -96
- package/project/.sdk/src/cmp/go-cli/fragment/main.fragment.go +13 -12
- package/project/.sdk/src/cmp/go-cli/fragment/words.fragment.go +3 -8
- package/project/.sdk/src/cmp/go-mcp/Main_go-mcp.ts +183 -66
- package/project/.sdk/src/cmp/go-mcp/fragment/main.fragment.go +7 -7
- package/project/.sdk/src/cmp/java/Config_java.ts +8 -32
- package/project/.sdk/src/cmp/java/EntityTypes_java.ts +4 -5
- package/project/.sdk/src/cmp/java/Main_java.ts +5 -1
- package/project/.sdk/src/cmp/java/Package_java.ts +4 -7
- package/project/.sdk/src/cmp/java/PrepareAuth_java.ts +13 -11
- package/project/.sdk/src/cmp/java/ReadmeEntity_java.ts +10 -12
- package/project/.sdk/src/cmp/java/ReadmeExamplesTest_java.ts +17 -9
- package/project/.sdk/src/cmp/java/ReadmeExplanation_java.ts +1 -1
- package/project/.sdk/src/cmp/java/ReadmeHowto_java.ts +24 -12
- package/project/.sdk/src/cmp/java/ReadmeInstall_java.ts +8 -10
- package/project/.sdk/src/cmp/java/ReadmeIntro_java.ts +5 -7
- package/project/.sdk/src/cmp/java/ReadmeModel_java.ts +24 -35
- package/project/.sdk/src/cmp/java/ReadmeQuick_java.ts +12 -10
- package/project/.sdk/src/cmp/java/ReadmeRef_java.ts +25 -25
- package/project/.sdk/src/cmp/java/ReadmeTopHowto_java.ts +5 -4
- package/project/.sdk/src/cmp/java/ReadmeTopQuick_java.ts +3 -3
- package/project/.sdk/src/cmp/java/Schema_java.ts +2 -1
- package/project/.sdk/src/cmp/java/TestClean_java.ts +386 -19
- package/project/.sdk/src/cmp/java/TestDirect_java.ts +12 -11
- package/project/.sdk/src/cmp/java/TestEntity_java.ts +27 -27
- package/project/.sdk/src/cmp/java/fragment/EntityBase.fragment.java +8 -7
- package/project/.sdk/src/cmp/java/utility_java.ts +7 -23
- package/project/.sdk/src/cmp/js/Config_js.ts +13 -35
- package/project/.sdk/src/cmp/js/EntityBase_js.ts +1 -1
- package/project/.sdk/src/cmp/js/EntityTypes_js.ts +4 -5
- package/project/.sdk/src/cmp/js/Entity_js.ts +1 -1
- package/project/.sdk/src/cmp/js/Main_js.ts +6 -9
- package/project/.sdk/src/cmp/js/Package_js.ts +3 -2
- package/project/.sdk/src/cmp/js/PrepareAuth_js.ts +9 -17
- package/project/.sdk/src/cmp/js/ReadmeEntity_js.ts +12 -14
- package/project/.sdk/src/cmp/js/ReadmeExplanation_js.ts +1 -1
- package/project/.sdk/src/cmp/js/ReadmeHowto_js.ts +41 -16
- package/project/.sdk/src/cmp/js/ReadmeInstall_js.ts +9 -6
- package/project/.sdk/src/cmp/js/ReadmeIntro_js.ts +6 -3
- package/project/.sdk/src/cmp/js/ReadmeModel_js.ts +23 -37
- package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +15 -5
- package/project/.sdk/src/cmp/js/ReadmeRef_js.ts +31 -35
- package/project/.sdk/src/cmp/js/ReadmeTopHowto_js.ts +5 -4
- package/project/.sdk/src/cmp/js/ReadmeTopQuick_js.ts +12 -4
- package/project/.sdk/src/cmp/js/Schema_js.ts +2 -1
- package/project/.sdk/src/cmp/js/TestClean_js.ts +229 -13
- package/project/.sdk/src/cmp/js/TestDirect_js.ts +16 -14
- package/project/.sdk/src/cmp/js/TestEntity_js.ts +30 -28
- package/project/.sdk/src/cmp/js/TestLive_js.ts +7 -6
- package/project/.sdk/src/cmp/js/fragment/Direct.test.fragment.js +1 -1
- package/project/.sdk/src/cmp/js/fragment/Entity.test.fragment.js +1 -1
- package/project/.sdk/src/cmp/js/fragment/EntityBase.fragment.js +5 -4
- package/project/.sdk/src/cmp/js/fragment/EntityCreateOp.fragment.js +1 -2
- package/project/.sdk/src/cmp/js/fragment/EntityLoadOp.fragment.js +1 -2
- package/project/.sdk/src/cmp/js/fragment/EntityPatchOp.fragment.js +1 -2
- package/project/.sdk/src/cmp/js/fragment/EntityRemoveOp.fragment.js +1 -2
- package/project/.sdk/src/cmp/js/fragment/EntityUpdateOp.fragment.js +1 -2
- package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +4 -4
- package/project/.sdk/src/cmp/kotlin/Config_kotlin.ts +3 -25
- package/project/.sdk/src/cmp/kotlin/EntityTypes_kotlin.ts +4 -5
- package/project/.sdk/src/cmp/kotlin/Main_kotlin.ts +5 -1
- package/project/.sdk/src/cmp/kotlin/Package_kotlin.ts +5 -5
- package/project/.sdk/src/cmp/kotlin/PrepareAuth_kotlin.ts +13 -12
- package/project/.sdk/src/cmp/kotlin/ReadmeEntity_kotlin.ts +10 -12
- package/project/.sdk/src/cmp/kotlin/ReadmeExamplesTest_kotlin.ts +17 -9
- package/project/.sdk/src/cmp/kotlin/ReadmeExplanation_kotlin.ts +1 -1
- package/project/.sdk/src/cmp/kotlin/ReadmeHowto_kotlin.ts +24 -12
- package/project/.sdk/src/cmp/kotlin/ReadmeInstall_kotlin.ts +8 -10
- package/project/.sdk/src/cmp/kotlin/ReadmeIntro_kotlin.ts +5 -7
- package/project/.sdk/src/cmp/kotlin/ReadmeModel_kotlin.ts +24 -35
- package/project/.sdk/src/cmp/kotlin/ReadmeQuick_kotlin.ts +23 -24
- package/project/.sdk/src/cmp/kotlin/ReadmeRef_kotlin.ts +25 -25
- package/project/.sdk/src/cmp/kotlin/ReadmeTopHowto_kotlin.ts +5 -4
- package/project/.sdk/src/cmp/kotlin/ReadmeTopQuick_kotlin.ts +12 -10
- package/project/.sdk/src/cmp/kotlin/Schema_kotlin.ts +2 -1
- package/project/.sdk/src/cmp/kotlin/TestClean_kotlin.ts +306 -18
- package/project/.sdk/src/cmp/kotlin/TestDirect_kotlin.ts +19 -8
- package/project/.sdk/src/cmp/kotlin/TestEntity_kotlin.ts +34 -24
- package/project/.sdk/src/cmp/kotlin/fragment/EntityBase.fragment.kt +8 -7
- package/project/.sdk/src/cmp/kotlin/utility_kotlin.ts +7 -23
- package/project/.sdk/src/cmp/lua/Config_lua.ts +16 -26
- package/project/.sdk/src/cmp/lua/EntityTypes_lua.ts +4 -5
- package/project/.sdk/src/cmp/lua/Main_lua.ts +5 -4
- package/project/.sdk/src/cmp/lua/Package_lua.ts +12 -6
- package/project/.sdk/src/cmp/lua/PrepareAuth_lua.ts +13 -12
- package/project/.sdk/src/cmp/lua/ReadmeEntity_lua.ts +10 -12
- package/project/.sdk/src/cmp/lua/ReadmeExamplesTest_lua.ts +12 -5
- package/project/.sdk/src/cmp/lua/ReadmeExplanation_lua.ts +5 -3
- package/project/.sdk/src/cmp/lua/ReadmeHowto_lua.ts +25 -13
- package/project/.sdk/src/cmp/lua/ReadmeInstall_lua.ts +5 -4
- package/project/.sdk/src/cmp/lua/ReadmeIntro_lua.ts +6 -5
- package/project/.sdk/src/cmp/lua/ReadmeModel_lua.ts +32 -43
- package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +22 -11
- package/project/.sdk/src/cmp/lua/ReadmeRef_lua.ts +22 -26
- package/project/.sdk/src/cmp/lua/ReadmeTopHowto_lua.ts +5 -4
- package/project/.sdk/src/cmp/lua/ReadmeTopQuick_lua.ts +11 -4
- package/project/.sdk/src/cmp/lua/Schema_lua.ts +2 -1
- package/project/.sdk/src/cmp/lua/TestClean_lua.ts +297 -13
- package/project/.sdk/src/cmp/lua/TestDirect_lua.ts +13 -12
- package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +30 -30
- package/project/.sdk/src/cmp/lua/fragment/Entity.fragment.lua +10 -10
- package/project/.sdk/src/cmp/lua/fragment/Main.fragment.lua +4 -4
- package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +4 -20
- package/project/.sdk/src/cmp/ocaml/Main_ocaml.ts +4 -0
- package/project/.sdk/src/cmp/ocaml/Package_ocaml.ts +8 -5
- package/project/.sdk/src/cmp/ocaml/PrepareAuth_ocaml.ts +11 -24
- package/project/.sdk/src/cmp/ocaml/ReadmeEntity_ocaml.ts +8 -10
- package/project/.sdk/src/cmp/ocaml/ReadmeExamplesTest_ocaml.ts +11 -4
- package/project/.sdk/src/cmp/ocaml/ReadmeExplanation_ocaml.ts +1 -1
- package/project/.sdk/src/cmp/ocaml/ReadmeHowto_ocaml.ts +12 -20
- package/project/.sdk/src/cmp/ocaml/ReadmeInstall_ocaml.ts +12 -11
- package/project/.sdk/src/cmp/ocaml/ReadmeIntro_ocaml.ts +8 -10
- package/project/.sdk/src/cmp/ocaml/ReadmeModel_ocaml.ts +26 -35
- package/project/.sdk/src/cmp/ocaml/ReadmeQuick_ocaml.ts +22 -11
- package/project/.sdk/src/cmp/ocaml/ReadmeRef_ocaml.ts +24 -23
- package/project/.sdk/src/cmp/ocaml/ReadmeTopHowto_ocaml.ts +5 -4
- package/project/.sdk/src/cmp/ocaml/ReadmeTopQuick_ocaml.ts +11 -4
- package/project/.sdk/src/cmp/ocaml/TestClean_ocaml.ts +179 -14
- package/project/.sdk/src/cmp/ocaml/TestEntity_ocaml.ts +1 -1
- package/project/.sdk/src/cmp/ocaml/utility_ocaml.ts +0 -9
- package/project/.sdk/src/cmp/perl/Config_perl.ts +2 -16
- package/project/.sdk/src/cmp/perl/Main_perl.ts +3 -1
- package/project/.sdk/src/cmp/perl/PrepareAuth_perl.ts +12 -10
- package/project/.sdk/src/cmp/perl/ReadmeEntity_perl.ts +8 -10
- package/project/.sdk/src/cmp/perl/ReadmeExamplesTest_perl.ts +16 -10
- package/project/.sdk/src/cmp/perl/ReadmeExplanation_perl.ts +1 -1
- package/project/.sdk/src/cmp/perl/ReadmeHowto_perl.ts +25 -13
- package/project/.sdk/src/cmp/perl/ReadmeInstall_perl.ts +10 -9
- package/project/.sdk/src/cmp/perl/ReadmeIntro_perl.ts +4 -6
- package/project/.sdk/src/cmp/perl/ReadmeModel_perl.ts +24 -35
- package/project/.sdk/src/cmp/perl/ReadmeQuick_perl.ts +22 -11
- package/project/.sdk/src/cmp/perl/ReadmeRef_perl.ts +23 -23
- package/project/.sdk/src/cmp/perl/ReadmeTopHowto_perl.ts +5 -4
- package/project/.sdk/src/cmp/perl/ReadmeTopQuick_perl.ts +11 -4
- package/project/.sdk/src/cmp/perl/TestClean_perl.ts +407 -26
- package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +13 -12
- package/project/.sdk/src/cmp/perl/TestEntity_perl.ts +29 -30
- package/project/.sdk/src/cmp/perl/fragment/Entity.fragment.pm +20 -11
- package/project/.sdk/src/cmp/perl/fragment/EntityLoadOp.fragment.pm +5 -5
- package/project/.sdk/src/cmp/perl/fragment/EntityRemoveOp.fragment.pm +3 -3
- package/project/.sdk/src/cmp/perl/fragment/Main.fragment.pm +10 -5
- package/project/.sdk/src/cmp/php/Config_php.ts +18 -33
- package/project/.sdk/src/cmp/php/EntityTypes_php.ts +4 -5
- package/project/.sdk/src/cmp/php/Main_php.ts +5 -9
- package/project/.sdk/src/cmp/php/PrepareAuth_php.ts +7 -17
- package/project/.sdk/src/cmp/php/ReadmeEntity_php.ts +10 -12
- package/project/.sdk/src/cmp/php/ReadmeExamplesTest_php.ts +15 -9
- package/project/.sdk/src/cmp/php/ReadmeExplanation_php.ts +5 -3
- package/project/.sdk/src/cmp/php/ReadmeHowto_php.ts +24 -12
- package/project/.sdk/src/cmp/php/ReadmeInstall_php.ts +8 -5
- package/project/.sdk/src/cmp/php/ReadmeIntro_php.ts +1 -1
- package/project/.sdk/src/cmp/php/ReadmeModel_php.ts +31 -37
- package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +22 -11
- package/project/.sdk/src/cmp/php/ReadmeRef_php.ts +32 -29
- package/project/.sdk/src/cmp/php/ReadmeTopHowto_php.ts +5 -4
- package/project/.sdk/src/cmp/php/ReadmeTopQuick_php.ts +11 -4
- package/project/.sdk/src/cmp/php/Schema_php.ts +2 -1
- package/project/.sdk/src/cmp/php/TestClean_php.ts +416 -39
- package/project/.sdk/src/cmp/php/TestDirect_php.ts +13 -12
- package/project/.sdk/src/cmp/php/TestEntity_php.ts +56 -31
- package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +8 -8
- package/project/.sdk/src/cmp/php/fragment/EntityCreateOp.fragment.php +1 -1
- package/project/.sdk/src/cmp/php/fragment/EntityListOp.fragment.php +1 -1
- package/project/.sdk/src/cmp/php/fragment/EntityLoadOp.fragment.php +3 -3
- package/project/.sdk/src/cmp/php/fragment/EntityPatchOp.fragment.php +1 -1
- package/project/.sdk/src/cmp/php/fragment/EntityRemoveOp.fragment.php +3 -3
- package/project/.sdk/src/cmp/php/fragment/EntityUpdateOp.fragment.php +1 -1
- package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +4 -4
- package/project/.sdk/src/cmp/py/Config_py.ts +18 -33
- package/project/.sdk/src/cmp/py/EntityTypes_py.ts +4 -5
- package/project/.sdk/src/cmp/py/Main_py.ts +3 -9
- package/project/.sdk/src/cmp/py/PrepareAuth_py.ts +8 -19
- package/project/.sdk/src/cmp/py/ReadmeEntity_py.ts +10 -12
- package/project/.sdk/src/cmp/py/ReadmeExamplesTest_py.ts +21 -14
- package/project/.sdk/src/cmp/py/ReadmeExplanation_py.ts +25 -15
- package/project/.sdk/src/cmp/py/ReadmeHowto_py.ts +25 -13
- package/project/.sdk/src/cmp/py/ReadmeInstall_py.ts +5 -4
- package/project/.sdk/src/cmp/py/ReadmeIntro_py.ts +4 -6
- package/project/.sdk/src/cmp/py/ReadmeModel_py.ts +25 -36
- package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +11 -9
- package/project/.sdk/src/cmp/py/ReadmeRef_py.ts +28 -28
- package/project/.sdk/src/cmp/py/ReadmeTopHowto_py.ts +5 -4
- package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +3 -3
- package/project/.sdk/src/cmp/py/Schema_py.ts +2 -1
- package/project/.sdk/src/cmp/py/TestClean_py.ts +342 -28
- package/project/.sdk/src/cmp/py/TestDirect_py.ts +12 -11
- package/project/.sdk/src/cmp/py/TestEntity_py.ts +31 -31
- package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +10 -9
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +4 -6
- package/project/.sdk/src/cmp/py-data/Main_py-data.ts +280 -145
- package/project/.sdk/src/cmp/rb/Config_rb.ts +16 -26
- package/project/.sdk/src/cmp/rb/Main_rb.ts +3 -9
- package/project/.sdk/src/cmp/rb/PrepareAuth_rb.ts +9 -18
- package/project/.sdk/src/cmp/rb/ReadmeEntity_rb.ts +10 -12
- package/project/.sdk/src/cmp/rb/ReadmeExamplesTest_rb.ts +15 -10
- package/project/.sdk/src/cmp/rb/ReadmeExplanation_rb.ts +5 -3
- package/project/.sdk/src/cmp/rb/ReadmeHowto_rb.ts +24 -12
- package/project/.sdk/src/cmp/rb/ReadmeInstall_rb.ts +8 -5
- package/project/.sdk/src/cmp/rb/ReadmeIntro_rb.ts +1 -1
- package/project/.sdk/src/cmp/rb/ReadmeModel_rb.ts +28 -37
- package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +22 -11
- package/project/.sdk/src/cmp/rb/ReadmeRef_rb.ts +27 -27
- package/project/.sdk/src/cmp/rb/ReadmeTopHowto_rb.ts +5 -4
- package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +11 -4
- package/project/.sdk/src/cmp/rb/Schema_rb.ts +2 -1
- package/project/.sdk/src/cmp/rb/TestClean_rb.ts +270 -23
- package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +13 -12
- package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +30 -30
- package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +9 -9
- package/project/.sdk/src/cmp/rb/fragment/EntityLoadOp.fragment.rb +1 -1
- package/project/.sdk/src/cmp/rb/fragment/EntityRemoveOp.fragment.rb +1 -1
- package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +4 -4
- package/project/.sdk/src/cmp/rust/Config_rust.ts +4 -34
- package/project/.sdk/src/cmp/rust/EntityTypes_rust.ts +3 -4
- package/project/.sdk/src/cmp/rust/Main_rust.ts +6 -2
- package/project/.sdk/src/cmp/rust/Package_rust.ts +6 -3
- package/project/.sdk/src/cmp/rust/PrepareAuth_rust.ts +13 -12
- package/project/.sdk/src/cmp/rust/ReadmeEntity_rust.ts +10 -12
- package/project/.sdk/src/cmp/rust/ReadmeExamplesTest_rust.ts +13 -6
- package/project/.sdk/src/cmp/rust/ReadmeExplanation_rust.ts +4 -2
- package/project/.sdk/src/cmp/rust/ReadmeHowto_rust.ts +26 -13
- package/project/.sdk/src/cmp/rust/ReadmeInstall_rust.ts +11 -10
- package/project/.sdk/src/cmp/rust/ReadmeIntro_rust.ts +5 -7
- package/project/.sdk/src/cmp/rust/ReadmeModel_rust.ts +35 -37
- package/project/.sdk/src/cmp/rust/ReadmeQuick_rust.ts +22 -10
- package/project/.sdk/src/cmp/rust/ReadmeRef_rust.ts +41 -32
- package/project/.sdk/src/cmp/rust/ReadmeTopHowto_rust.ts +5 -4
- package/project/.sdk/src/cmp/rust/ReadmeTopQuick_rust.ts +12 -4
- package/project/.sdk/src/cmp/rust/TestClean_rust.ts +391 -18
- package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +17 -14
- package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +35 -34
- package/project/.sdk/src/cmp/rust/fragment/Entity.fragment.rs +2 -2
- package/project/.sdk/src/cmp/rust/fragment/EntityCreateOp.fragment.rs +0 -1
- package/project/.sdk/src/cmp/rust/fragment/EntityListOp.fragment.rs +1 -1
- package/project/.sdk/src/cmp/rust/fragment/EntityLoadOp.fragment.rs +0 -1
- package/project/.sdk/src/cmp/rust/fragment/EntityPatchOp.fragment.rs +0 -1
- package/project/.sdk/src/cmp/rust/fragment/EntityUpdateOp.fragment.rs +0 -1
- package/project/.sdk/src/cmp/rust/fragment/Main.fragment.rs +5 -4
- package/project/.sdk/src/cmp/rust/utility_rust.ts +0 -8
- package/project/.sdk/src/cmp/scala/Config_scala.ts +5 -26
- package/project/.sdk/src/cmp/scala/EntityTypes_scala.ts +4 -5
- package/project/.sdk/src/cmp/scala/Main_scala.ts +5 -1
- package/project/.sdk/src/cmp/scala/PrepareAuth_scala.ts +13 -13
- package/project/.sdk/src/cmp/scala/ReadmeEntity_scala.ts +10 -12
- package/project/.sdk/src/cmp/scala/ReadmeExamplesTest_scala.ts +11 -4
- package/project/.sdk/src/cmp/scala/ReadmeExplanation_scala.ts +3 -3
- package/project/.sdk/src/cmp/scala/ReadmeHowto_scala.ts +12 -20
- package/project/.sdk/src/cmp/scala/ReadmeInstall_scala.ts +11 -15
- package/project/.sdk/src/cmp/scala/ReadmeIntro_scala.ts +5 -7
- package/project/.sdk/src/cmp/scala/ReadmeModel_scala.ts +24 -35
- package/project/.sdk/src/cmp/scala/ReadmeQuick_scala.ts +24 -24
- package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +25 -25
- package/project/.sdk/src/cmp/scala/ReadmeTopHowto_scala.ts +5 -4
- package/project/.sdk/src/cmp/scala/ReadmeTopQuick_scala.ts +13 -10
- package/project/.sdk/src/cmp/scala/Schema_scala.ts +2 -1
- package/project/.sdk/src/cmp/scala/TestClean_scala.ts +324 -20
- package/project/.sdk/src/cmp/scala/TestEntity_scala.ts +16 -16
- package/project/.sdk/src/cmp/scala/fragment/EntityBase.fragment.scala +8 -7
- package/project/.sdk/src/cmp/scala/utility_scala.ts +4 -19
- package/project/.sdk/src/cmp/swift/Config_swift.ts +3 -14
- package/project/.sdk/src/cmp/swift/EntityTypes_swift.ts +3 -4
- package/project/.sdk/src/cmp/swift/Main_swift.ts +4 -0
- package/project/.sdk/src/cmp/swift/PrepareAuth_swift.ts +14 -14
- package/project/.sdk/src/cmp/swift/ReadmeEntity_swift.ts +10 -12
- package/project/.sdk/src/cmp/swift/ReadmeExamplesTest_swift.ts +14 -7
- package/project/.sdk/src/cmp/swift/ReadmeExplanation_swift.ts +3 -3
- package/project/.sdk/src/cmp/swift/ReadmeHowto_swift.ts +12 -20
- package/project/.sdk/src/cmp/swift/ReadmeInstall_swift.ts +13 -13
- package/project/.sdk/src/cmp/swift/ReadmeIntro_swift.ts +4 -6
- package/project/.sdk/src/cmp/swift/ReadmeModel_swift.ts +24 -35
- package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +25 -26
- package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +25 -25
- package/project/.sdk/src/cmp/swift/ReadmeTopHowto_swift.ts +5 -4
- package/project/.sdk/src/cmp/swift/ReadmeTopQuick_swift.ts +13 -11
- package/project/.sdk/src/cmp/swift/TestClean_swift.ts +352 -23
- package/project/.sdk/src/cmp/swift/fragment/EntityBase.fragment.swift +8 -7
- package/project/.sdk/src/cmp/swift/fragment/Main.fragment.swift +5 -5
- package/project/.sdk/src/cmp/ts/Config_ts.ts +13 -35
- package/project/.sdk/src/cmp/ts/EntityBase_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/EntityTypes_ts.ts +4 -5
- package/project/.sdk/src/cmp/ts/Entity_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/Main_ts.ts +6 -9
- package/project/.sdk/src/cmp/ts/Package_ts.ts +3 -2
- package/project/.sdk/src/cmp/ts/PrepareAuth_ts.ts +11 -10
- package/project/.sdk/src/cmp/ts/ReadmeEntity_ts.ts +9 -11
- package/project/.sdk/src/cmp/ts/ReadmeExampleTest_ts.ts +33 -9
- package/project/.sdk/src/cmp/ts/ReadmeExamplesTest_ts.ts +35 -7
- package/project/.sdk/src/cmp/ts/ReadmeExplanation_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +38 -18
- package/project/.sdk/src/cmp/ts/ReadmeInstall_ts.ts +9 -5
- package/project/.sdk/src/cmp/ts/ReadmeIntro_ts.ts +6 -3
- package/project/.sdk/src/cmp/ts/ReadmeModel_ts.ts +32 -53
- package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +11 -9
- package/project/.sdk/src/cmp/ts/ReadmeRef_ts.ts +22 -26
- package/project/.sdk/src/cmp/ts/ReadmeTopHowto_ts.ts +5 -4
- package/project/.sdk/src/cmp/ts/ReadmeTopQuick_ts.ts +6 -6
- package/project/.sdk/src/cmp/ts/Schema_ts.ts +2 -1
- package/project/.sdk/src/cmp/ts/TestClean_ts.ts +229 -13
- package/project/.sdk/src/cmp/ts/TestDefinition_ts.ts +3 -1
- package/project/.sdk/src/cmp/ts/TestDirect_ts.ts +17 -17
- package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +30 -30
- package/project/.sdk/src/cmp/ts/TestLive_ts.ts +7 -6
- package/project/.sdk/src/cmp/ts/fragment/Direct.test.fragment.ts +1 -1
- package/project/.sdk/src/cmp/ts/fragment/Entity.test.fragment.ts +1 -1
- package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +3 -3
- package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +2 -2
- package/project/.sdk/src/cmp/zig/Config_zig.ts +5 -21
- package/project/.sdk/src/cmp/zig/Main_zig.ts +4 -0
- package/project/.sdk/src/cmp/zig/Package_zig.ts +3 -2
- package/project/.sdk/src/cmp/zig/PrepareAuth_zig.ts +10 -21
- package/project/.sdk/src/cmp/zig/ReadmeEntity_zig.ts +9 -11
- package/project/.sdk/src/cmp/zig/ReadmeExamplesTest_zig.ts +8 -7
- package/project/.sdk/src/cmp/zig/ReadmeExplanation_zig.ts +1 -1
- package/project/.sdk/src/cmp/zig/ReadmeHowto_zig.ts +17 -22
- package/project/.sdk/src/cmp/zig/ReadmeInstall_zig.ts +12 -9
- package/project/.sdk/src/cmp/zig/ReadmeIntro_zig.ts +5 -7
- package/project/.sdk/src/cmp/zig/ReadmeModel_zig.ts +40 -37
- package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +25 -11
- package/project/.sdk/src/cmp/zig/ReadmeRef_zig.ts +46 -30
- package/project/.sdk/src/cmp/zig/ReadmeTopHowto_zig.ts +5 -4
- package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +15 -5
- package/project/.sdk/src/cmp/zig/TestClean_zig.ts +259 -26
- package/project/.sdk/src/cmp/zig/fragment/Build.fragment.zig +1 -0
- package/project/.sdk/src/cmp/zig/fragment/Entity.fragment.zig +16 -17
- package/project/.sdk/src/cmp/zig/fragment/Main.fragment.zig +23 -12
- package/project/.sdk/src/cmp/zig/fragment/Root.fragment.zig +2 -1
- package/project/.sdk/src/cmp/zig/utility_zig.ts +0 -13
- package/project/.sdk/tm/c/Makefile +2 -1
- package/project/.sdk/tm/c/core/response.c +27 -4
- package/project/.sdk/tm/c/core/sdk.h +14 -7
- package/project/.sdk/tm/c/feature/secrets/plugin/capability.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/capability.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/catalog.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/catalog.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/config.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/config.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/depend.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/depend.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/env.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/env.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/export.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/export.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/graph.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/graph.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/host.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/host.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/order.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/order.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/point.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/point.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/ref.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/ref.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/resolve.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/resolve.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/types.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/types.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/value.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/value.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/version.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugin/version.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/aws.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/azuresecrets.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/boru.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/clock.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/doppler.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/encode.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/gcpsecrets.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/hashicorp.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/httpjson.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/infisical.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/minivault.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/onepassword.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/proc.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/secretspec.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/sekretoplugins.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/sha256.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/sigv4.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/support.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/plugins/tls.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/internal.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/json.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/providers.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.c +2 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/sekreto.h +2 -2
- package/project/.sdk/tm/c/feature/secrets/sekreto/util.c +2 -2
- package/project/.sdk/tm/c/feature/secrets.c +4 -2
- package/project/.sdk/tm/c/feature/validate.c +5 -5
- package/project/.sdk/tm/c/tests/feature/secrets/secrets_test.c +200 -1
- package/project/.sdk/tm/c/tests/pipeline_test.c +1 -1
- package/project/.sdk/tm/c/tests/primary_corpus_test.c +17 -4
- package/project/.sdk/tm/c/tests/primary_utility_test.c +7 -7
- package/project/.sdk/tm/c/tests/sdk_pipeline_test.c +2 -2
- package/project/.sdk/tm/c/tests/server_variable_test.c +10 -48
- package/project/.sdk/tm/c/tests/struct_corpus_test.c +68 -2
- package/project/.sdk/tm/c/tests/transport_test.c +161 -3
- package/project/.sdk/tm/c/tests/vendor/omni/json.c +65 -26
- package/project/.sdk/tm/c/tests/vendor/omni/omni.h +2 -2
- package/project/.sdk/tm/c/tests/vendor/omni/runner.c +2 -2
- package/project/.sdk/tm/c/tests/vendor/omni/util.c +2 -2
- package/project/.sdk/tm/c/utility/clean.c +94 -12
- package/project/.sdk/tm/c/utility/fetcher.c +22 -6
- package/project/.sdk/tm/c/utility/make_error.c +4 -4
- package/project/.sdk/tm/c/utility/make_options.c +22 -16
- package/project/.sdk/tm/c/utility/struct/inject.c +23 -2
- package/project/.sdk/tm/c/utility/struct/re_util.c +3 -0
- package/project/.sdk/tm/c/utility/struct/regex.c +43 -22
- package/project/.sdk/tm/c/utility/struct/regex.h +4 -1
- package/project/.sdk/tm/c/utility/struct/transform.c +982 -296
- package/project/.sdk/tm/c/utility/struct/utility.c +712 -136
- package/project/.sdk/tm/c/utility/struct/value.c +3 -0
- package/project/.sdk/tm/c/utility/struct/value.h +3 -0
- package/project/.sdk/tm/c/utility/struct/value_io.c +3 -0
- package/project/.sdk/tm/c/utility/struct/value_io.h +3 -0
- package/project/.sdk/tm/c/utility/struct/voxgig_struct.h +36 -1
- package/project/.sdk/tm/clojure/feature/secrets/sdk/feature/secrets.clj +3 -1
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/capability.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/catalog.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/config.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/depend.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/env.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/export.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/graph.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/host.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/json.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/order.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/point.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/ref.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/resolve.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/types.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin/version.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/plugin.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/addr.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/chain.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/core.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/json.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/aws.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/azuresecrets.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/boru.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/doppler.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/gcpsecrets.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/hashicorp.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/httpjson.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/infisical.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/minivault.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/onepassword.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/proc.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/secretspec.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/plugins/sigv4.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/provider.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto/providers.clj +2 -2
- package/project/.sdk/tm/clojure/feature/secrets/voxgig/sekreto.clj +2 -2
- package/project/.sdk/tm/clojure/src/sdk/client.clj +4 -4
- package/project/.sdk/tm/clojure/src/sdk/core.clj +175 -32
- package/project/.sdk/tm/clojure/src/sdk/features.clj +6 -7
- package/project/.sdk/tm/clojure/src/voxgig/struct.clj +866 -186
- package/project/.sdk/tm/clojure/test/sdk/test/feature/secrets.clj +85 -2
- package/project/.sdk/tm/clojure/test/sdk/test/feature.clj +1 -1
- package/project/.sdk/tm/clojure/test/sdk/test/omni_smoke.clj +1 -1
- package/project/.sdk/tm/clojure/test/sdk/test/pipeline.clj +98 -3
- package/project/.sdk/tm/clojure/test/sdk/test/primary.clj +7 -2
- package/project/.sdk/tm/clojure/test/sdk/test/struct_corpus.clj +22 -9
- package/project/.sdk/tm/clojure/test/sdk/test_runner.clj +15 -14
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/json.clj +2 -2
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/runner.clj +2 -2
- package/project/.sdk/tm/clojure/test/vendor/omni/voxgig/omni/util.clj +2 -2
- package/project/.sdk/tm/cpp/Makefile +3 -3
- package/project/.sdk/tm/cpp/core/types.hpp +49 -30
- package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/capability.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/catalog.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/config.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/config.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/depend.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/env.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/env.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/export.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/export.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/graph.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/host.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/host.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/order.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/order.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/point.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/point.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/ref.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/resolve.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/types.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/types.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/value.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/value.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/version.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugin/version.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Aws.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Azuresecrets.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Boru.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Crypto.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Doppler.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Gcpsecrets.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Hashicorp.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Httpjson.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Infisical.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Minivault.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Minivault.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Onepassword.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Proc.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Secretspec.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Sigv4.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/plugins/Tls.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Json.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Provider.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Providers.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.cpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets/sekreto/Sekreto.hpp +2 -2
- package/project/.sdk/tm/cpp/feature/secrets.hpp +3 -1
- package/project/.sdk/tm/cpp/feature/validate.hpp +5 -5
- package/project/.sdk/tm/cpp/test/custom_utility_test.cpp +1 -1
- package/project/.sdk/tm/cpp/test/feature/secrets/secrets_test.cpp +226 -0
- package/project/.sdk/tm/cpp/test/omni_resolver.hpp +1 -1
- package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +9 -3
- package/project/.sdk/tm/cpp/test/runner_support.hpp +25 -4
- package/project/.sdk/tm/cpp/test/struct_corpus_test.cpp +32 -3
- package/project/.sdk/tm/cpp/test/vendor/omni/json.hpp +55 -17
- package/project/.sdk/tm/cpp/test/vendor/omni/omni.hpp +2 -2
- package/project/.sdk/tm/cpp/test/vendor/omni/util.hpp +2 -2
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +96 -20
- package/project/.sdk/tm/cpp/utility/voxgigstruct/value.hpp +3 -0
- package/project/.sdk/tm/cpp/utility/voxgigstruct/value_io.hpp +3 -0
- package/project/.sdk/tm/cpp/utility/voxgigstruct/voxgig_struct.hpp +1374 -371
- package/project/.sdk/tm/csharp/Makefile +6 -6
- package/project/.sdk/tm/csharp/core/Response.cs +21 -2
- package/project/.sdk/tm/csharp/core/Result.cs +2 -2
- package/project/.sdk/tm/csharp/core/Utility.cs +2 -0
- package/project/.sdk/tm/csharp/feature/SecretsFeature.cs +7 -6
- package/project/.sdk/tm/csharp/feature/ValidateFeature.cs +4 -5
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Capability.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Catalog.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Config.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Definition.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Depend.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Entry.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Env.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Export.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Graph.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Host.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Inst.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Json.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Order.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Plugin.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Point.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Refs.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Resolve.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Types.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugin/Version.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Aws.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/AzureSecrets.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Boru.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Child.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Doppler.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/GcpSecrets.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Hashicorp.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/HttpJson.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Infisical.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/MiniVault.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/OnePassword.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/SecretSpec.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/plugins/Sigv4.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/sekreto/Json.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/sekreto/Providers.cs +2 -2
- package/project/.sdk/tm/csharp/feature/secrets/sekreto/Sekreto.cs +2 -2
- package/project/.sdk/tm/csharp/test/PipelineTest.cs +1 -1
- package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +242 -1
- package/project/.sdk/tm/csharp/test/Runner.cs +4 -4
- package/project/.sdk/tm/csharp/test/StructUtilityTest.cs +38 -38
- package/project/.sdk/tm/csharp/test/feature/secrets/SecretsFeatureTest.cs +267 -0
- package/project/.sdk/tm/csharp/test/vendor/omni/Runner.cs +2 -2
- package/project/.sdk/tm/csharp/test/vendor/omni/Util.cs +2 -2
- package/project/.sdk/tm/csharp/utility/Clean.cs +139 -12
- package/project/.sdk/tm/csharp/utility/Fetcher.cs +115 -35
- package/project/.sdk/tm/csharp/utility/MakeError.cs +4 -5
- package/project/.sdk/tm/csharp/utility/MakeOptions.cs +5 -5
- package/project/.sdk/tm/csharp/utility/Register.cs +1 -0
- package/project/.sdk/tm/csharp/utility/struct/Struct.cs +1587 -325
- package/project/.sdk/tm/elixir/lib/projectname/entity_base.ex +9 -11
- package/project/.sdk/tm/elixir/lib/projectname/error.ex +1 -1
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/capability.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/catalog.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/config.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/depend.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/env.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/error.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/export.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/graph.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/host.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/inst.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/json.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/order.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/point.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/ref.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/resolve.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/types.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/version.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/plugin/voxgig_plugin.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/json.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/aws.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/azuresecrets.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/boru.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/doppler.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/gcpsecrets.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/hashicorp.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/http.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/httpjson.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/infisical.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/minivault.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/onepassword.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/proc.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/secretspec.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/plugins/sigv4.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/provider.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/providers.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets/sekreto/sekreto.ex +2 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/secrets.ex +4 -2
- package/project/.sdk/tm/elixir/lib/projectname/feature/validate.ex +4 -5
- package/project/.sdk/tm/elixir/lib/projectname/utility.ex +219 -37
- package/project/.sdk/tm/elixir/lib/utility/struct/voxgig_struct.ex +1088 -253
- package/project/.sdk/tm/elixir/test/feature/secrets/secrets_test.exs +147 -1
- package/project/.sdk/tm/elixir/test/pipeline_test.exs +167 -1
- package/project/.sdk/tm/elixir/test/primary_utility_test.exs +12 -1
- package/project/.sdk/tm/elixir/test/struct_corpus_test.exs +43 -21
- package/project/.sdk/tm/elixir/test/support/omni.ex +2 -2
- package/project/.sdk/tm/elixir/test/vendor/omni/json.ex +33 -5
- package/project/.sdk/tm/elixir/test/vendor/omni/runner.ex +2 -2
- package/project/.sdk/tm/elixir/test/vendor/omni/util.ex +2 -2
- package/project/.sdk/tm/go/Makefile +4 -4
- package/project/.sdk/tm/go/core/response.go +17 -4
- package/project/.sdk/tm/go/core/result.go +2 -2
- package/project/.sdk/tm/go/core/utility_type.go +2 -1
- package/project/.sdk/tm/go/feature/secrets/plugin/capability.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/catalog.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/config.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/depend.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/env.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/export.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/graph.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/host.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/order.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/point.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/ref.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/resolve.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/types.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/util.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugin/version.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/aws.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/aws/sigv4.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/azuresecrets/azuresecrets.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/boru/boru.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/doppler/doppler.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/gcpsecrets/gcpsecrets.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/hashicorp/hashicorp.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/httpjson/httpjson.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/infisical/infisical.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/minivault/format.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/minivault/minivault.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/onepassword/onepassword.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/plugins/secretspec/secretspec.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/sekreto/addr.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/sekreto/providers.go +2 -2
- package/project/.sdk/tm/go/feature/secrets/sekreto/sekreto.go +2 -2
- package/project/.sdk/tm/go/feature/secrets_feature.go +8 -1
- package/project/.sdk/tm/go/test/concurrency_test.go +1 -1
- package/project/.sdk/tm/go/test/custom_utility_test.go +5 -5
- package/project/.sdk/tm/go/test/feature/secrets/secrets_feature_test.go +160 -7
- package/project/.sdk/tm/go/test/feature_corpus_test.go +1 -1
- package/project/.sdk/tm/go/test/feature_test.go +5 -1
- package/project/.sdk/tm/go/test/omni/omni.go +2 -2
- package/project/.sdk/tm/go/test/omni/util.go +12 -5
- package/project/.sdk/tm/go/test/omniresolver_test.go +1 -1
- package/project/.sdk/tm/go/test/pipeline_test.go +4 -1
- package/project/.sdk/tm/go/test/primary_utility_test.go +181 -5
- package/project/.sdk/tm/go/test/server_variable_test.go +50 -0
- package/project/.sdk/tm/go/test/struct_utility_test.go +59 -56
- package/project/.sdk/tm/go/test/testsupport_test.go +13 -3
- package/project/.sdk/tm/go/utility/clean.go +223 -6
- package/project/.sdk/tm/go/utility/fetcher.go +59 -10
- package/project/.sdk/tm/go/utility/make_error.go +4 -4
- package/project/.sdk/tm/go/utility/make_options.go +12 -5
- package/project/.sdk/tm/go/utility/register.go +12 -1
- package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +1510 -430
- package/project/.sdk/tm/java/Makefile +7 -6
- package/project/.sdk/tm/java/core/Response.java +16 -2
- package/project/.sdk/tm/java/core/Result.java +2 -2
- package/project/.sdk/tm/java/core/SdkClient.java +4 -4
- package/project/.sdk/tm/java/core/Utility.java +7 -0
- package/project/.sdk/tm/java/feature/SecretsFeature.java +3 -0
- package/project/.sdk/tm/java/feature/ValidateFeature.java +4 -5
- package/project/.sdk/tm/java/feature/secrets/plugin/Capability.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Catalog.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Config.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Definition.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Depend.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Entry.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Env.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Export.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Graph.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Host.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Inst.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Json.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Order.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Plugin.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/PluginException.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Point.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Refs.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Resolve.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Types.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/plugin/Version.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Addr.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Builtins.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Json.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Provider.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Sekreto.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/Support.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Aws.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Azuresecrets.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Boru.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Doppler.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Gcpsecrets.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Hashicorp.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Httpjson.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Infisical.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Minivault.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Onepassword.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Proc.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Secretspec.java +2 -2
- package/project/.sdk/tm/java/feature/secrets/sekreto/plugins/Sigv4.java +2 -2
- package/project/.sdk/tm/java/test/PipelineTest.java +1 -1
- package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +199 -2
- package/project/.sdk/tm/java/test/RunnerSupport.java +4 -4
- package/project/.sdk/tm/java/test/StructCorpusTest.java +32 -3
- package/project/.sdk/tm/java/test/feature/secrets/SecretsFeatureTest.java +111 -2
- package/project/.sdk/tm/java/test/vendor/omni/Json.java +2 -2
- package/project/.sdk/tm/java/test/vendor/omni/Runner.java +2 -2
- package/project/.sdk/tm/java/test/vendor/omni/Util.java +2 -2
- package/project/.sdk/tm/java/utility/Clean.java +186 -19
- package/project/.sdk/tm/java/utility/Fetcher.java +109 -14
- package/project/.sdk/tm/java/utility/MakeError.java +4 -4
- package/project/.sdk/tm/java/utility/MakeOptions.java +5 -5
- package/project/.sdk/tm/java/utility/Register.java +4 -0
- package/project/.sdk/tm/java/utility/TransformResponse.java +5 -0
- package/project/.sdk/tm/java/utility/struct/Struct.java +1239 -229
- package/project/.sdk/tm/js/Makefile +5 -4
- package/project/.sdk/tm/js/src/feature/secrets/SecretsFeature.js +2 -0
- package/project/.sdk/tm/js/src/feature/secrets/plugin/capability.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/catalog.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/config.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/depend.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/env.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/export.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/graph.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/host.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/index.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/order.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/point.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/ref.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/resolve.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/types.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/plugin/version.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/Sekreto.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/index.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/aws.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/azuresecrets.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/boru.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/doppler.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/gcpsecrets.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/hashicorp.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/httpjson.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/infisical.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/minivault.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/onepassword.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/secretspec.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/plugins/sigv4.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/addr.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/builtin.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/dotenv.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/env.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/file.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/memory.js +1 -1
- package/project/.sdk/tm/js/src/feature/secrets/sekreto/provider/support.js +1 -1
- package/project/.sdk/tm/js/src/feature/validate/ValidateFeature.js +4 -5
- package/project/.sdk/tm/js/src/utility/CleanUtility.js +104 -10
- package/project/.sdk/tm/js/src/utility/FetcherUtility.js +99 -1
- package/project/.sdk/tm/js/src/utility/MakeErrorUtility.js +4 -4
- package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +5 -5
- package/project/.sdk/tm/js/src/utility/MediaUtility.js +32 -0
- package/project/.sdk/tm/js/src/utility/ResultBodyUtility.js +6 -14
- package/project/.sdk/tm/js/src/utility/StructUtility.js +972 -180
- package/project/.sdk/tm/js/src/utility/Utility.js +2 -1
- package/project/.sdk/tm/js/test/feature/harness.js +6 -7
- package/project/.sdk/tm/js/test/feature/secrets/Secrets.test.js +92 -2
- package/project/.sdk/tm/js/test/live-entity.js +8 -8
- package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +9 -1
- package/project/.sdk/tm/js/test/utility/StructUtility.test.js +32 -27
- package/project/.sdk/tm/js/test/utility/index.js +1 -1
- package/project/.sdk/tm/js/test/vendor/omni/index.js +1 -1
- package/project/.sdk/tm/js/test/vendor/omni/runner.js +1 -1
- package/project/.sdk/tm/js/test/vendor/omni/util.js +1 -1
- package/project/.sdk/tm/kotlin/Makefile +7 -6
- package/project/.sdk/tm/kotlin/core/Response.kt +17 -2
- package/project/.sdk/tm/kotlin/core/Result.kt +2 -2
- package/project/.sdk/tm/kotlin/core/SdkClient.kt +4 -4
- package/project/.sdk/tm/kotlin/core/Utility.kt +4 -2
- package/project/.sdk/tm/kotlin/feature/SecretsFeature.kt +2 -0
- package/project/.sdk/tm/kotlin/feature/ValidateFeature.kt +4 -5
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Capability.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Catalog.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Config.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Depend.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Env.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Export.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Graph.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Host.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Json.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Order.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Plugin.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Point.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Refs.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Resolve.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Types.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/plugin/Version.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Json.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Provider.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Providers.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Sekreto.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Spec.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/Support.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Aws.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Azuresecrets.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Boru.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Doppler.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Gcpsecrets.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Hashicorp.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Httpjson.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Infisical.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Minivault.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Onepassword.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Secretspec.kt +2 -2
- package/project/.sdk/tm/kotlin/feature/secrets/sekreto/plugins/Sigv4.kt +2 -2
- package/project/.sdk/tm/kotlin/test/PipelineTest.kt +1 -1
- package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +188 -2
- package/project/.sdk/tm/kotlin/test/RunnerSupport.kt +23 -4
- package/project/.sdk/tm/kotlin/test/StructCorpusTest.kt +23 -3
- package/project/.sdk/tm/kotlin/test/feature/secrets/SecretsTest.kt +110 -1
- package/project/.sdk/tm/kotlin/test/vendor/omni/Json.kt +2 -2
- package/project/.sdk/tm/kotlin/test/vendor/omni/Runner.kt +2 -2
- package/project/.sdk/tm/kotlin/test/vendor/omni/Util.kt +2 -2
- package/project/.sdk/tm/kotlin/utility/CoreUtil.kt +142 -16
- package/project/.sdk/tm/kotlin/utility/Fetcher.kt +113 -14
- package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +5 -5
- package/project/.sdk/tm/kotlin/utility/Register.kt +1 -0
- package/project/.sdk/tm/kotlin/utility/struct/Struct.kt +1074 -164
- package/project/.sdk/tm/lua/Makefile +4 -3
- package/project/.sdk/tm/lua/core/utility_type.lua +2 -0
- package/project/.sdk/tm/lua/feature/secrets/native/sekretonet.c +2 -2
- package/project/.sdk/tm/lua/feature/secrets/native/sekretovault.c +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/capability.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/catalog.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/config.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/depend.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/env.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/export.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/graph.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/host.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/json.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/order.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/point.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/ref.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/resolve.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/types.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin/version.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/plugin.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/addr.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/err.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/name.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/aws.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/azuresecrets.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/boru.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/crypto.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/doppler.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/gcpsecrets.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/hashicorp.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/httpjson.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/infisical.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/json.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/minivault.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/net.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/onepassword.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/secretspec.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/sigv4.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/plugins/support.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto/providers.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets/sekreto.lua +2 -2
- package/project/.sdk/tm/lua/feature/secrets_feature.lua +3 -0
- package/project/.sdk/tm/lua/feature/validate_feature.lua +5 -6
- package/project/.sdk/tm/lua/test/feature/secrets/secrets_feature_test.lua +115 -2
- package/project/.sdk/tm/lua/test/omni.lua +1 -1
- package/project/.sdk/tm/lua/test/pipeline_test.lua +1 -1
- package/project/.sdk/tm/lua/test/primary_utility_test.lua +160 -1
- package/project/.sdk/tm/lua/test/runner.lua +3 -1
- package/project/.sdk/tm/lua/test/struct_utility_test.lua +152 -44
- package/project/.sdk/tm/lua/test/vendor/omni/json.lua +26 -6
- package/project/.sdk/tm/lua/test/vendor/omni/regex.lua +2 -2
- package/project/.sdk/tm/lua/test/vendor/omni/runner.lua +2 -2
- package/project/.sdk/tm/lua/test/vendor/omni/util.lua +2 -2
- package/project/.sdk/tm/lua/utility/clean.lua +86 -6
- package/project/.sdk/tm/lua/utility/fetcher.lua +19 -5
- package/project/.sdk/tm/lua/utility/make_error.lua +4 -5
- package/project/.sdk/tm/lua/utility/make_options.lua +5 -5
- package/project/.sdk/tm/lua/utility/media.lua +36 -0
- package/project/.sdk/tm/lua/utility/register.lua +1 -0
- package/project/.sdk/tm/lua/utility/struct/regex.lua +26 -9
- package/project/.sdk/tm/lua/utility/struct/struct.lua +1289 -245
- package/project/.sdk/tm/lua/utility/unreadable_body.lua +6 -16
- package/project/.sdk/tm/ocaml/Makefile +1 -1
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/capability.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/catalog.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/config.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/defs.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/depend.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/env.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/export.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/graph.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/host.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/order.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/point.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/ref.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/resolve.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/types.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/value.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugin/version.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/aws.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/azuresecrets.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/boru.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/crypto.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/doppler.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/gcpsecrets.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/hashicorp.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/http.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/httpjson.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/infisical.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/minivault.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/minivault_stubs.c +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/onepassword.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/runcmd.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/secretspec.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/sigv4.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/plugins/tls_stubs.c +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/json.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/provider.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/secret.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets/sekreto/sekreto.ml +2 -2
- package/project/.sdk/tm/ocaml/feature/secrets_feature.ml +3 -1
- package/project/.sdk/tm/ocaml/sdk_features.ml +9 -10
- package/project/.sdk/tm/ocaml/sdk_runtime.ml +78 -15
- package/project/.sdk/tm/ocaml/sdk_types.ml +1 -1
- package/project/.sdk/tm/ocaml/test/feature/secrets/t_secrets.ml +157 -4
- package/project/.sdk/tm/ocaml/test/primary_utility_test.ml +14 -9
- package/project/.sdk/tm/ocaml/test/struct_corpus.ml +24 -15
- package/project/.sdk/tm/ocaml/test/vendor/omni/omni.ml +34 -28
- package/project/.sdk/tm/ocaml/utility/voxgig_struct.ml +807 -157
- package/project/.sdk/tm/ocaml/utility/vregex.ml +190 -60
- package/project/.sdk/tm/perl/Makefile +8 -7
- package/project/.sdk/tm/perl/core/control.pm +1 -1
- package/project/.sdk/tm/perl/core/error.pm +14 -1
- package/project/.sdk/tm/perl/core/helpers.pm +8 -7
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Capability.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Catalog.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Config.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Depend.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Env.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Export.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Graph.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Host.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Order.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Point.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Ref.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Resolve.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Types.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin/Version.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugin/Voxgig/Plugin.pm +2 -2
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Aws.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Azuresecrets.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Boru.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Doppler.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Gcpsecrets.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Hashicorp.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Httpjson.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Infisical.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Minivault.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Onepassword.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Proc.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Secretspec.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/plugins/Voxgig/Sekreto/Plugins/Sigv4.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/sekreto/Voxgig/Sekreto/Addr.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/sekreto/Voxgig/Sekreto/Providers.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets/sekreto/Voxgig/Sekreto.pm +1 -1
- package/project/.sdk/tm/perl/feature/secrets_feature.pm +2 -0
- package/project/.sdk/tm/perl/feature/validate_feature.pm +4 -5
- package/project/.sdk/tm/perl/lib/Voxgig/Struct.pm +1082 -149
- package/project/.sdk/tm/perl/t/feature/secrets/secrets.t +105 -0
- package/project/.sdk/tm/perl/t/feature_corpus.t +1 -1
- package/project/.sdk/tm/perl/t/omni.pm +16 -6
- package/project/.sdk/tm/perl/t/primary_utility.t +151 -2
- package/project/.sdk/tm/perl/t/runner.pm +1 -1
- package/project/.sdk/tm/perl/t/struct_utility.t +19 -11
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Runner.pm +1 -1
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni/Util.pm +1 -1
- package/project/.sdk/tm/perl/t/vendor/omni/Voxgig/Omni.pm +1 -1
- package/project/.sdk/tm/perl/utility/clean.pm +130 -15
- package/project/.sdk/tm/perl/utility/fetcher.pm +18 -5
- package/project/.sdk/tm/perl/utility/make_error.pm +4 -4
- package/project/.sdk/tm/perl/utility/make_options.pm +5 -5
- package/project/.sdk/tm/perl/utility/media.pm +29 -0
- package/project/.sdk/tm/perl/utility/result_body.pm +6 -13
- package/project/.sdk/tm/perl/utility/transform_response.pm +3 -0
- package/project/.sdk/tm/php/Makefile +4 -3
- package/project/.sdk/tm/php/core/Control.php +3 -2
- package/project/.sdk/tm/php/core/Helpers.php +49 -0
- package/project/.sdk/tm/php/core/UtilityType.php +2 -0
- package/project/.sdk/tm/php/feature/SecretsFeature.php +2 -0
- package/project/.sdk/tm/php/feature/ValidateFeature.php +6 -5
- package/project/.sdk/tm/php/feature/secrets/plugin/Capability.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Catalog.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Config.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Depend.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Env.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Export.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Graph.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Host.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Order.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Point.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Ref.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Resolve.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Types.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/Version.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/plugin/plugin.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/aws.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/azuresecrets.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/boru.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/doppler.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/gcpsecrets.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/hashicorp.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/httpjson.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/infisical.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/minivault.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/onepassword.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/runcmd.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/secretspec.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/plugins/sigv4.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/src/Addr.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/src/Providers.php +2 -2
- package/project/.sdk/tm/php/feature/secrets/sekreto/src/Sekreto.php +2 -2
- package/project/.sdk/tm/php/test/FeatureCorpusTest.php +1 -1
- package/project/.sdk/tm/php/test/Omni.php +1 -1
- package/project/.sdk/tm/php/test/PipelineTest.php +146 -1
- package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +23 -1
- package/project/.sdk/tm/php/test/Runner.php +1 -1
- package/project/.sdk/tm/php/test/StructUtilityTest.php +65 -116
- package/project/.sdk/tm/php/test/feature/secrets/SecretsTest.php +119 -2
- package/project/.sdk/tm/php/test/vendor/omni/Runner.php +2 -2
- package/project/.sdk/tm/php/test/vendor/omni/Util.php +2 -2
- package/project/.sdk/tm/php/utility/Clean.php +119 -19
- package/project/.sdk/tm/php/utility/Fetcher.php +24 -7
- package/project/.sdk/tm/php/utility/MakeError.php +4 -5
- package/project/.sdk/tm/php/utility/MakeOptions.php +9 -5
- package/project/.sdk/tm/php/utility/Media.php +29 -0
- package/project/.sdk/tm/php/utility/PrepareBody.php +7 -5
- package/project/.sdk/tm/php/utility/Register.php +1 -0
- package/project/.sdk/tm/php/utility/ResultBody.php +6 -16
- package/project/.sdk/tm/php/utility/TransformResponse.php +5 -0
- package/project/.sdk/tm/php/utility/struct/Struct.php +1933 -530
- package/project/.sdk/tm/py/Makefile +3 -2
- package/project/.sdk/tm/py/pkg/core/utility_type.py +2 -0
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/__init__.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/capability.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/catalog.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/config.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/depend.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/env.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/export.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/graph.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/host.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/order.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/point.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/ref.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/resolve.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/types.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_plugin/version.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/__init__.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/addr.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/aws.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/azuresecrets.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/boru.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/doppler.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/hashicorp.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/httpjson.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/infisical.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/minivault.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/onepassword.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/secretspec.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/plugins/sigv4.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/providers.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets/voxgig_sekreto/sekreto.py +1 -1
- package/project/.sdk/tm/py/pkg/feature/secrets_feature.py +12 -1
- package/project/.sdk/tm/py/pkg/feature/validate_feature.py +4 -5
- package/project/.sdk/tm/py/pkg/utility/clean.py +104 -16
- package/project/.sdk/tm/py/pkg/utility/fetcher.py +64 -4
- package/project/.sdk/tm/py/pkg/utility/make_error.py +4 -4
- package/project/.sdk/tm/py/pkg/utility/make_options.py +5 -5
- package/project/.sdk/tm/py/pkg/utility/media.py +24 -0
- package/project/.sdk/tm/py/pkg/utility/register.py +2 -1
- package/project/.sdk/tm/py/pkg/utility/result_body.py +7 -12
- package/project/.sdk/tm/py/pkg/utility/voxgig_struct/voxgig_struct.py +1057 -198
- package/project/.sdk/tm/py/test/feature/secrets/test_secrets.py +124 -0
- package/project/.sdk/tm/py/test/feature_harness.py +6 -6
- package/project/.sdk/tm/py/test/omni.py +1 -1
- package/project/.sdk/tm/py/test/runner.py +6 -4
- package/project/.sdk/tm/py/test/test_feature_corpus.py +2 -2
- package/project/.sdk/tm/py/test/test_pipeline.py +1 -1
- package/project/.sdk/tm/py/test/test_primary_utility.py +135 -1
- package/project/.sdk/tm/py/test/test_struct_utility.py +29 -30
- package/project/.sdk/tm/py/test/voxgig_omni/__init__.py +1 -1
- package/project/.sdk/tm/py/test/voxgig_omni/runner.py +1 -1
- package/project/.sdk/tm/py/test/voxgig_omni/util.py +1 -1
- package/project/.sdk/tm/py-data/Makefile +5 -4
- package/project/.sdk/tm/py-data/pkg/auth.py +8 -5
- package/project/.sdk/tm/py-data/pkg/fetch.py +8 -8
- package/project/.sdk/tm/py-data/test/conftest.py +6 -7
- package/project/.sdk/tm/py-data/test/test_auth.py +5 -0
- package/project/.sdk/tm/rb/Makefile +3 -2
- package/project/.sdk/tm/rb/core/control.rb +1 -1
- package/project/.sdk/tm/rb/core/utility_type.rb +2 -1
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/capability.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/catalog.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/config.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/depend.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/env.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/export.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/graph.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/host.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/order.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/point.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/ref.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/resolve.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/types.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin/version.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_plugin.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/addr.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/aws.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/azuresecrets.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/boru.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/doppler.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/gcpsecrets.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/hashicorp.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/httpjson.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/infisical.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/minivault.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/onepassword.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/secretspec.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/plugins/sigv4.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/providers.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto/sekreto.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets/voxgig_sekreto.rb +2 -2
- package/project/.sdk/tm/rb/feature/secrets_feature.rb +3 -0
- package/project/.sdk/tm/rb/feature/validate_feature.rb +4 -5
- package/project/.sdk/tm/rb/test/feature/secrets/secrets_feature_test.rb +117 -0
- package/project/.sdk/tm/rb/test/feature_corpus_test.rb +1 -1
- package/project/.sdk/tm/rb/test/omni.rb +1 -1
- package/project/.sdk/tm/rb/test/pipeline_test.rb +1 -1
- package/project/.sdk/tm/rb/test/primary_utility_test.rb +121 -1
- package/project/.sdk/tm/rb/test/runner.rb +1 -1
- package/project/.sdk/tm/rb/test/struct_utility_test.rb +30 -34
- package/project/.sdk/tm/rb/test/vendor/omni/runner.rb +2 -2
- package/project/.sdk/tm/rb/test/vendor/omni/util.rb +2 -2
- package/project/.sdk/tm/rb/test/vendor/omni/voxgig_omni.rb +2 -2
- package/project/.sdk/tm/rb/utility/clean.rb +94 -14
- package/project/.sdk/tm/rb/utility/fetcher.rb +12 -3
- package/project/.sdk/tm/rb/utility/make_error.rb +4 -4
- package/project/.sdk/tm/rb/utility/make_options.rb +5 -5
- package/project/.sdk/tm/rb/utility/media.rb +21 -0
- package/project/.sdk/tm/rb/utility/register.rb +1 -0
- package/project/.sdk/tm/rb/utility/result_body.rb +7 -9
- package/project/.sdk/tm/rb/utility/struct/voxgig_struct.rb +1569 -678
- package/project/.sdk/tm/rust/Makefile +5 -5
- package/project/.sdk/tm/rust/core/helpers.rs +1 -1
- package/project/.sdk/tm/rust/core/response.rs +18 -2
- package/project/.sdk/tm/rust/core/result.rs +4 -4
- package/project/.sdk/tm/rust/core/utility_type.rs +5 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/capability.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/catalog.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/config.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/depend.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/env.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/export.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/graph.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/host.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/mod.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/order.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/point.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/refs.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/resolve.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/types.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/value.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugin/version.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/aws/crypto.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/aws/sigv4.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/aws.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/azuresecrets.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/boru.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/doppler.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/gcpsecrets.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/hashicorp.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/httpjson/http.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/httpjson/json.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/httpjson.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/infisical.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/minivault/format.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/minivault.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/onepassword.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/plugins/secretspec.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/sekreto/addr.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/sekreto/mod.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/sekreto/providers.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets/sekreto/sekreto.rs +1 -1
- package/project/.sdk/tm/rust/feature/secrets.rs +10 -1
- package/project/.sdk/tm/rust/tests/common/mod.rs +3 -3
- package/project/.sdk/tm/rust/tests/feature/secrets/main.rs +309 -10
- package/project/.sdk/tm/rust/tests/omni_resolver/mod.rs +1 -1
- package/project/.sdk/tm/rust/tests/pipeline_test.rs +5 -2
- package/project/.sdk/tm/rust/tests/primary_utility_test.rs +281 -13
- package/project/.sdk/tm/rust/tests/server_variable_test.rs +48 -0
- package/project/.sdk/tm/rust/tests/struct_utility_test.rs +9 -1
- package/project/.sdk/tm/rust/tests/vendor/omni/json.rs +27 -11
- package/project/.sdk/tm/rust/tests/vendor/omni/mod.rs +1 -1
- package/project/.sdk/tm/rust/tests/vendor/omni/regex.rs +1 -1
- package/project/.sdk/tm/rust/tests/vendor/omni/runner.rs +1 -1
- package/project/.sdk/tm/rust/tests/vendor/omni/util.rs +1 -1
- package/project/.sdk/tm/rust/utility/clean.rs +128 -9
- package/project/.sdk/tm/rust/utility/fetcher.rs +107 -44
- package/project/.sdk/tm/rust/utility/make_error.rs +4 -4
- package/project/.sdk/tm/rust/utility/make_options.rs +12 -8
- package/project/.sdk/tm/rust/utility/voxgigstruct/consts.rs +18 -20
- package/project/.sdk/tm/rust/utility/voxgigstruct/major.rs +1328 -227
- package/project/.sdk/tm/rust/utility/voxgigstruct/mini.rs +90 -95
- package/project/.sdk/tm/rust/utility/voxgigstruct/mod.rs +12 -8
- package/project/.sdk/tm/rust/utility/voxgigstruct/ordered_map.rs +3 -1
- package/project/.sdk/tm/rust/utility/voxgigstruct/re.rs +49 -6
- package/project/.sdk/tm/rust/utility/voxgigstruct/value.rs +5 -2
- package/project/.sdk/tm/scala/Makefile +4 -4
- package/project/.sdk/tm/scala/core/Response.scala +19 -2
- package/project/.sdk/tm/scala/core/Result.scala +2 -2
- package/project/.sdk/tm/scala/core/SdkClient.scala +4 -4
- package/project/.sdk/tm/scala/core/Types.scala +3 -0
- package/project/.sdk/tm/scala/core/Utility.scala +2 -0
- package/project/.sdk/tm/scala/feature/SecretsFeature.scala +2 -0
- package/project/.sdk/tm/scala/feature/ValidateFeature.scala +4 -5
- package/project/.sdk/tm/scala/feature/secrets/plugin/Capability.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Config.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Depend.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Env.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Export.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Graph.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Host.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Json.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Order.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Plugin.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Point.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Refs.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Resolve.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Types.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Value.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/plugin/Version.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Json.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Provider.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Providers.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Sekreto.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Spec.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/Support.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Aws.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Azuresecrets.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Boru.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Doppler.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Gcpsecrets.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Hashicorp.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Httpjson.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Infisical.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Minivault.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Onepassword.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Secretspec.scala +2 -2
- package/project/.sdk/tm/scala/feature/secrets/sekreto/plugins/Sigv4.scala +2 -2
- package/project/.sdk/tm/scala/sdktest/PrimaryCorpus.scala +10 -4
- package/project/.sdk/tm/scala/sdktest/SdkTestMain.scala +219 -3
- package/project/.sdk/tm/scala/sdktest/StructCorpus.scala +20 -14
- package/project/.sdk/tm/scala/sdktest/feature/secrets/SecretsTestMain.scala +108 -0
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Json.scala +2 -2
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Runner.scala +2 -2
- package/project/.sdk/tm/scala/sdktest/vendor/omni/Util.scala +2 -2
- package/project/.sdk/tm/scala/utility/Fetcher.scala +101 -14
- package/project/.sdk/tm/scala/utility/Make.scala +4 -4
- package/project/.sdk/tm/scala/utility/Misc.scala +133 -13
- package/project/.sdk/tm/scala/utility/Register.scala +1 -0
- package/project/.sdk/tm/scala/utility/Transform.scala +6 -1
- package/project/.sdk/tm/scala/utility/struct/Struct.java +1267 -253
- package/project/.sdk/tm/scala/utility/struct/voxgig_struct.scala +909 -202
- package/project/.sdk/tm/swift/Makefile +5 -5
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Condense.swift +351 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Constants.swift +7 -4
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Inject.swift +39 -24
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Injection.swift +51 -14
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/JSON.swift +4 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Merge.swift +3 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Minor.swift +190 -77
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/OrderedDictionary.swift +3 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Path.swift +37 -8
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Select.swift +37 -20
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Transform.swift +67 -46
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Validate.swift +602 -110
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Value.swift +22 -16
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/Struct/Walk.swift +9 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Response.swift +20 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Result.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Support.swift +15 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/core/Utility.swift +2 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/SecretsFeature.swift +2 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TestFeature.swift +6 -6
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/ValidateFeature.swift +5 -6
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Capability.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Catalog.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Config.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Depend.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Env.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Export.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Graph.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Host.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Json.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Order.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Point.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Refs.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Resolve.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Types.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Value.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugin/Version.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Aws.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Azuresecrets.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Boru.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Crypto.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Doppler.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Gcpsecrets.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Hashicorp.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Httpjson.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Infisical.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Onepassword.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Proc.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Secretspec.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/plugins/Sigv4.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Addr.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Json.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Provider.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Providers.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/secrets/sekreto/Sekreto.swift +2 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Fetcher.swift +24 -8
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeError.swift +4 -4
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +7 -7
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Register.swift +1 -0
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/ResultUtil.swift +130 -30
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/OmniResolver.swift +2 -2
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PipelineTest.swift +1 -1
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +191 -1
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/Runner.swift +3 -3
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/StructUtilityTest.swift +36 -14
- package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/feature/secrets/SecretsFeatureTest.swift +167 -1
- package/project/.sdk/tm/swift/Tests/vendor/omni/Json.swift +32 -8
- package/project/.sdk/tm/swift/Tests/vendor/omni/Runner.swift +2 -2
- package/project/.sdk/tm/swift/Tests/vendor/omni/Util.swift +2 -2
- package/project/.sdk/tm/ts/Makefile +3 -2
- package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +2 -0
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Capability.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Catalog.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Config.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Depend.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Env.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Export.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/FeatureHost.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Graph.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Host.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Order.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Point.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Ref.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Resolve.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Types.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/Version.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/plugin/index.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/aws.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/azuresecrets.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/boru.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/doppler.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/gcpsecrets.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/hashicorp.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/httpjson.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/infisical.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/minivault.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/onepassword.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/secretspec.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/plugins/sigv4.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/builtin.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +1 -1
- package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +1 -1
- package/project/.sdk/tm/ts/src/utility/CleanUtility.ts +115 -10
- package/project/.sdk/tm/ts/src/utility/FetcherUtility.ts +100 -1
- package/project/.sdk/tm/ts/src/utility/MakeErrorUtility.ts +2 -1
- package/project/.sdk/tm/ts/src/utility/MediaUtility.ts +32 -0
- package/project/.sdk/tm/ts/src/utility/ResultBodyUtility.ts +5 -14
- package/project/.sdk/tm/ts/src/utility/StructUtility.ts +708 -199
- package/project/.sdk/tm/ts/src/utility/Utility.ts +2 -1
- package/project/.sdk/tm/ts/test/feature/secrets/Secrets.test.ts +93 -2
- package/project/.sdk/tm/ts/test/live-entity.ts +8 -8
- package/project/.sdk/tm/ts/test/utility/PrimaryUtility.test.ts +9 -1
- package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +32 -27
- package/project/.sdk/tm/ts/test/utility/index.ts +1 -1
- package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +1 -1
- package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +1 -1
- package/project/.sdk/tm/ts/test/vendor/omni/index.ts +1 -1
- package/project/.sdk/tm/zig/core/helpers.zig +2 -2
- package/project/.sdk/tm/zig/core/result.zig +2 -2
- package/project/.sdk/tm/zig/core/types.zig +2 -2
- package/project/.sdk/tm/zig/core/utility.zig +96 -20
- package/project/.sdk/tm/zig/feature/netsim.zig +1 -1
- package/project/.sdk/tm/zig/feature/rbac.zig +1 -1
- package/project/.sdk/tm/zig/feature/secrets/plugin/capability.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/catalog.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/config.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/depend.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/env.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/export.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/graph.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/host.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/inst.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/order.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/plugin.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/point.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/ref.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/resolve.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/types.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/value.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugin/version.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/aws.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/azuresecrets.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/boru.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/doppler.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/gcpsecrets.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/hashicorp.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/httpjson.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/infisical.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/minivault.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/onepassword.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/secretspec.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/plugins/sigv4.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/sekreto/addr.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/sekreto/builtins.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/sekreto/provider.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets/sekreto/sekreto.zig +2 -2
- package/project/.sdk/tm/zig/feature/secrets.zig +3 -1
- package/project/.sdk/tm/zig/feature/validate.zig +4 -5
- package/project/.sdk/tm/zig/test/feature/secrets/secrets_test.zig +199 -39
- package/project/.sdk/tm/zig/test/fh.zig +11 -0
- package/project/.sdk/tm/zig/test/gotcha_test.zig +11 -10
- package/project/.sdk/tm/zig/test/omniresolver.zig +1 -1
- package/project/.sdk/tm/zig/test/pipeline_test.zig +1 -1
- package/project/.sdk/tm/zig/test/primary_utility_test.zig +17 -9
- package/project/.sdk/tm/zig/test/server_variable_test.zig +46 -0
- package/project/.sdk/tm/zig/test/struct_corpus.zig +54 -34
- package/project/.sdk/tm/zig/test/vendor/omni/omni.zig +2 -2
- package/project/.sdk/tm/zig/test/vendor/omni/regex.zig +2 -2
- package/project/.sdk/tm/zig/utility/voxgigstruct/regex.zig +35 -16
- package/project/.sdk/tm/zig/utility/voxgigstruct/struct.zig +1680 -563
- package/project/sdkgen-package.json +1 -1
- package/src/action/check.ts +82 -4
- package/src/action/doctor.ts +70 -6
- package/src/action/package.ts +1 -13
- package/src/action/remove.ts +19 -5
- package/src/action/resolve.ts +11 -4
- package/src/action/target.ts +75 -32
- package/src/admin/status.ts +25 -5
- package/src/cmp/AgentGuide.ts +57 -32
- package/src/cmp/AgentGuideContent.ts +26 -19
- package/src/cmp/AgentGuideFeature.ts +15 -6
- package/src/cmp/AgentGuideTop.ts +28 -16
- package/src/cmp/Changelog.ts +46 -6
- package/src/cmp/Deploy.ts +76 -25
- package/src/cmp/Entity.ts +1 -1
- package/src/cmp/ExternalTarget.ts +6 -0
- package/src/cmp/Feature.ts +3 -3
- package/src/cmp/FeatureDocs.ts +4 -2
- package/src/cmp/License.ts +33 -10
- package/src/cmp/Main.ts +1 -1
- package/src/cmp/PublishWorkflow.ts +66 -58
- package/src/cmp/Readme.ts +0 -2
- package/src/cmp/ReadmeErrors.ts +82 -81
- package/src/cmp/ReadmeExplanation.ts +7 -11
- package/src/cmp/ReadmeFeatures.ts +16 -9
- package/src/cmp/ReadmeIntro.ts +1 -1
- package/src/cmp/ReadmeModel.ts +17 -11
- package/src/cmp/ReadmeOptions.ts +3 -16
- package/src/cmp/ReadmeQuick.ts +11 -2
- package/src/cmp/ReadmeRefFeatures.ts +38 -33
- package/src/cmp/ReadmeStation.ts +4 -5
- package/src/cmp/ReadmeTop.ts +145 -102
- package/src/cmp/Registered.ts +1 -1
- package/src/cmp/Security.ts +32 -5
- package/src/cmp/Test.ts +1 -1
- package/src/helpers/alongside.ts +16 -19
- package/src/helpers/applicability.ts +16 -1
- package/src/helpers/canonSpec.ts +56 -10
- package/src/helpers/clientOptions.ts +67 -0
- package/src/helpers/component.ts +11 -1
- package/src/helpers/consumer.ts +62 -0
- package/src/helpers/definitionPlan.ts +0 -1
- package/src/helpers/doctext.ts +12 -2
- package/src/helpers/facts.ts +243 -5
- package/src/helpers/flowGuard.ts +23 -8
- package/src/helpers/generated.ts +3 -1
- package/src/helpers/graphqlPoint.ts +20 -1
- package/src/helpers/guardModel.ts +50 -0
- package/src/helpers/manifest.ts +19 -0
- package/src/helpers/mcpTools.ts +15 -3
- package/src/helpers/naming.ts +3 -2
- package/src/helpers/opShape.ts +56 -18
- package/src/helpers/optional.ts +0 -1
- package/src/helpers/optspec.ts +22 -5
- package/src/helpers/packageMeta.ts +142 -45
- package/src/helpers/placement.ts +114 -0
- package/src/helpers/readerdir.ts +33 -0
- package/src/helpers/semver.ts +26 -0
- package/src/helpers/serverVars.ts +4 -2
- package/src/helpers/shipped.ts +13 -0
- package/src/helpers/sourcestring.ts +55 -0
- package/src/helpers/stdrep.ts +9 -4
- package/src/helpers/surface.ts +100 -0
- package/src/helpers/targetguard.ts +91 -0
- package/src/helpers/testPolicy.ts +3 -3
- package/src/helpers/text.ts +22 -0
- package/src/helpers/textguard.ts +208 -0
- package/src/helpers/title.ts +59 -0
- package/src/sdkgen.ts +89 -88
- package/src/testkit.ts +12 -0
- package/src/utility.ts +12 -5
- package/project/.sdk/src/cmp/c/ReadmeOptions_c.ts +0 -65
- package/project/.sdk/src/cmp/clojure/ReadmeOptions_clojure.ts +0 -61
- package/project/.sdk/src/cmp/cpp/ReadmeOptions_cpp.ts +0 -62
- package/project/.sdk/src/cmp/csharp/ReadmeOptions_csharp.ts +0 -60
- package/project/.sdk/src/cmp/elixir/ReadmeOptions_elixir.ts +0 -62
- package/project/.sdk/src/cmp/go/ReadmeOptions_go.ts +0 -59
- package/project/.sdk/src/cmp/java/ReadmeOptions_java.ts +0 -61
- package/project/.sdk/src/cmp/js/ReadmeOptions_js.ts +0 -59
- package/project/.sdk/src/cmp/kotlin/ReadmeOptions_kotlin.ts +0 -61
- package/project/.sdk/src/cmp/lua/ReadmeOptions_lua.ts +0 -59
- package/project/.sdk/src/cmp/ocaml/ReadmeOptions_ocaml.ts +0 -59
- package/project/.sdk/src/cmp/perl/ReadmeOptions_perl.ts +0 -59
- package/project/.sdk/src/cmp/php/ReadmeOptions_php.ts +0 -59
- package/project/.sdk/src/cmp/py/ReadmeOptions_py.ts +0 -59
- package/project/.sdk/src/cmp/rb/ReadmeOptions_rb.ts +0 -59
- package/project/.sdk/src/cmp/rust/ReadmeOptions_rust.ts +0 -60
- package/project/.sdk/src/cmp/scala/ReadmeOptions_scala.ts +0 -61
- package/project/.sdk/src/cmp/swift/ReadmeOptions_swift.ts +0 -62
- package/project/.sdk/src/cmp/ts/ReadmeOptions_ts.ts +0 -59
- package/project/.sdk/src/cmp/zig/ReadmeOptions_zig.ts +0 -60
- package/project/.sdk/tm/c/LICENSE +0 -22
- package/project/.sdk/tm/c/VERSION +0 -1
- package/project/.sdk/tm/clojure/LICENSE +0 -22
- package/project/.sdk/tm/clojure/VERSION +0 -1
- package/project/.sdk/tm/cpp/LICENSE +0 -22
- package/project/.sdk/tm/cpp/VERSION +0 -1
- package/project/.sdk/tm/csharp/LICENSE +0 -22
- package/project/.sdk/tm/csharp/VERSION +0 -1
- package/project/.sdk/tm/elixir/LICENSE +0 -21
- package/project/.sdk/tm/elixir/VERSION +0 -1
- package/project/.sdk/tm/go/LICENSE +0 -22
- package/project/.sdk/tm/go/VERSION +0 -1
- package/project/.sdk/tm/java/LICENSE +0 -22
- package/project/.sdk/tm/java/VERSION +0 -1
- package/project/.sdk/tm/js/LICENSE +0 -22
- package/project/.sdk/tm/kotlin/LICENSE +0 -22
- package/project/.sdk/tm/kotlin/VERSION +0 -1
- package/project/.sdk/tm/lua/LICENSE +0 -22
- package/project/.sdk/tm/ocaml/LICENSE +0 -21
- package/project/.sdk/tm/ocaml/VERSION +0 -1
- package/project/.sdk/tm/perl/LICENSE +0 -22
- package/project/.sdk/tm/php/LICENSE +0 -22
- package/project/.sdk/tm/php/VERSION +0 -1
- package/project/.sdk/tm/py/LICENSE +0 -22
- package/project/.sdk/tm/py-data/LICENSE +0 -22
- package/project/.sdk/tm/rb/LICENSE +0 -22
- package/project/.sdk/tm/rust/LICENSE +0 -22
- package/project/.sdk/tm/rust/VERSION +0 -1
- package/project/.sdk/tm/scala/LICENSE +0 -22
- package/project/.sdk/tm/scala/VERSION +0 -1
- package/project/.sdk/tm/swift/LICENSE +0 -22
- package/project/.sdk/tm/swift/VERSION +0 -1
- package/project/.sdk/tm/ts/LICENSE +0 -22
- package/project/.sdk/tm/zig/LICENSE +0 -21
- package/project/.sdk/tm/zig/VERSION +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// VENDORED: @voxgig/struct 0.0.3 (zig/src/struct.zig)
|
|
2
|
-
// Source: https://github.com/voxgig/struct @
|
|
2
|
+
// Source: https://github.com/voxgig/struct @ 358af9d51c90b589a295a70b2165dbe4629eaf8e [tag: sdk-20261125-1959-0]
|
|
3
3
|
// License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
4
4
|
// Copyright (c) 2025-2026 Voxgig Ltd. MIT LICENSE.
|
|
5
5
|
|
|
@@ -378,30 +378,69 @@ pub fn strkey(allocator: Allocator, key: JsonValue) ![]const u8 {
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
//
|
|
381
|
+
// The string String(n) prints for a number, as a map key or a path part.
|
|
382
|
+
fn numtext(allocator: Allocator, n: JsonValue) ![]const u8 {
|
|
383
|
+
return switch (n) {
|
|
384
|
+
.integer => |i| try std.fmt.allocPrint(allocator, "{d}", .{i}),
|
|
385
|
+
.float => |f| blk: {
|
|
386
|
+
if (f == @trunc(f) and -9.0e15 < f and f < 9.0e15) {
|
|
387
|
+
break :blk try std.fmt.allocPrint(allocator, "{d}", .{@as(i64, @intFromFloat(f))});
|
|
388
|
+
}
|
|
389
|
+
break :blk try std.fmt.allocPrint(allocator, "{d}", .{f});
|
|
390
|
+
},
|
|
391
|
+
else => S_MT,
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// A list key's index: an integral number, or the string String(n) prints for
|
|
396
|
+
// one, so "01", "+1" and "-0" are not. An index beyond i64 saturates, so it
|
|
397
|
+
// stays past that end of any list.
|
|
398
|
+
fn listkey(key: JsonValue) ?i64 {
|
|
399
|
+
return switch (key) {
|
|
400
|
+
.integer => |i| i,
|
|
401
|
+
.float => |f| blk: {
|
|
402
|
+
if (std.math.isNan(f) or std.math.isInf(f) or f != @trunc(f)) break :blk null;
|
|
403
|
+
if (9223372036854775808.0 <= f) break :blk std.math.maxInt(i64);
|
|
404
|
+
if (f < -9223372036854775808.0) break :blk std.math.minInt(i64);
|
|
405
|
+
break :blk @as(i64, @intFromFloat(f));
|
|
406
|
+
},
|
|
407
|
+
.string => |s| blk: {
|
|
408
|
+
const neg = 0 < s.len and '-' == s[0];
|
|
409
|
+
const digits = if (neg) s[1..] else s;
|
|
410
|
+
if (0 == digits.len or ('0' == digits[0] and (neg or 1 < digits.len))) break :blk null;
|
|
411
|
+
for (digits) |c| {
|
|
412
|
+
if (c < '0' or '9' < c) break :blk null;
|
|
413
|
+
}
|
|
414
|
+
const past: i64 = if (neg) std.math.minInt(i64) else std.math.maxInt(i64);
|
|
415
|
+
break :blk std.fmt.parseInt(i64, s, 10) catch past;
|
|
416
|
+
},
|
|
417
|
+
else => null,
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// The index a non-negative list key reads, or null.
|
|
422
|
+
fn listIndex(key: JsonValue) ?usize {
|
|
423
|
+
const k = listkey(key) orelse return null;
|
|
424
|
+
return if (0 <= k and k <= std.math.maxInt(u32)) @as(usize, @intCast(k)) else null;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// Get a list element; a negative integer key counts from the end.
|
|
382
428
|
pub fn getelem(allocator: Allocator, val: JsonValue, key: JsonValue, alt: JsonValue) !JsonValue {
|
|
383
429
|
if (val == .null or key == .null) return resolveAlt(allocator, alt);
|
|
384
430
|
|
|
385
431
|
if (val != .array) return resolveAlt(allocator, alt);
|
|
386
432
|
|
|
387
433
|
const list = val.array.data.items;
|
|
434
|
+
const len: i64 = @intCast(list.len);
|
|
388
435
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
nkey = @as(i64, @intCast(list.len)) + nkey;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
if (nkey >= 0 and nkey < @as(i64, @intCast(list.len))) {
|
|
401
|
-
const v = list[@intCast(nkey)];
|
|
402
|
-
// Group A: a stored JSON null counts as "no value" → alt.
|
|
403
|
-
if (v == .null) return resolveAlt(allocator, alt);
|
|
404
|
-
return v;
|
|
436
|
+
if (listkey(key)) |k| {
|
|
437
|
+
const nkey = if (k < 0) len + k else k;
|
|
438
|
+
if (0 <= nkey and nkey < len) {
|
|
439
|
+
const v = list[@intCast(nkey)];
|
|
440
|
+
// Group A: a stored JSON null counts as "no value" → alt.
|
|
441
|
+
if (v == .null) return resolveAlt(allocator, alt);
|
|
442
|
+
return v;
|
|
443
|
+
}
|
|
405
444
|
}
|
|
406
445
|
|
|
407
446
|
return resolveAlt(allocator, alt);
|
|
@@ -418,7 +457,12 @@ pub fn getprop(allocator: Allocator, val: JsonValue, key: JsonValue, alt: JsonVa
|
|
|
418
457
|
if (val == .null or key == .null) return alt;
|
|
419
458
|
|
|
420
459
|
if (val == .object) {
|
|
421
|
-
|
|
460
|
+
// Only a string or a number names a map key.
|
|
461
|
+
const ks: []const u8 = switch (key) {
|
|
462
|
+
.string => |s| s,
|
|
463
|
+
.integer, .float => try numtext(allocator, key),
|
|
464
|
+
else => return alt,
|
|
465
|
+
};
|
|
422
466
|
if (val.object.get(ks)) |v| {
|
|
423
467
|
// Group A: a stored JSON null counts as "no value" → alt.
|
|
424
468
|
if (v == .null) return alt;
|
|
@@ -428,18 +472,9 @@ pub fn getprop(allocator: Allocator, val: JsonValue, key: JsonValue, alt: JsonVa
|
|
|
428
472
|
}
|
|
429
473
|
|
|
430
474
|
if (val == .array) {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
.float => |f| ki = @intFromFloat(f),
|
|
435
|
-
.string => |s| {
|
|
436
|
-
ki = std.fmt.parseInt(i64, s, 10) catch null;
|
|
437
|
-
},
|
|
438
|
-
else => {},
|
|
439
|
-
}
|
|
440
|
-
if (ki) |idx| {
|
|
441
|
-
if (idx >= 0 and idx < @as(i64, @intCast(val.array.data.items.len))) {
|
|
442
|
-
const v = val.array.data.items[@intCast(idx)];
|
|
475
|
+
if (listIndex(key)) |idx| {
|
|
476
|
+
if (idx < val.array.data.items.len) {
|
|
477
|
+
const v = val.array.data.items[idx];
|
|
443
478
|
// Group A: a stored JSON null counts as "no value" → alt.
|
|
444
479
|
if (v == .null) return alt;
|
|
445
480
|
return v;
|
|
@@ -651,6 +686,7 @@ pub fn jt(allocator: Allocator, v: []const JsonValue) !JsonValue {
|
|
|
651
686
|
pub fn delprop(allocator: Allocator, parent: JsonValue, key: JsonValue) !JsonValue {
|
|
652
687
|
_ = allocator;
|
|
653
688
|
if (!iskey(key)) return parent;
|
|
689
|
+
if (iscondensed(parent)) return error.CondensedImmutable;
|
|
654
690
|
|
|
655
691
|
if (parent == .object) {
|
|
656
692
|
var obj = parent.object;
|
|
@@ -661,23 +697,13 @@ pub fn delprop(allocator: Allocator, parent: JsonValue, key: JsonValue) !JsonVal
|
|
|
661
697
|
}
|
|
662
698
|
|
|
663
699
|
if (parent == .array) {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
}
|
|
671
|
-
else => {},
|
|
672
|
-
}
|
|
673
|
-
if (ki) |idx| {
|
|
674
|
-
const plen: i64 = @intCast(parent.array.data.items.len);
|
|
675
|
-
// No negative index support for delprop
|
|
676
|
-
if (idx >= 0 and idx < plen) {
|
|
677
|
-
var arr = parent.array;
|
|
678
|
-
_ = arr.orderedRemove(@intCast(idx));
|
|
679
|
-
return JsonValue{ .array = arr };
|
|
680
|
-
}
|
|
700
|
+
const idx = listkey(key) orelse return parent;
|
|
701
|
+
const plen: i64 = @intCast(parent.array.data.items.len);
|
|
702
|
+
// No negative index support for delprop
|
|
703
|
+
if (idx >= 0 and idx < plen) {
|
|
704
|
+
var arr = parent.array;
|
|
705
|
+
_ = arr.orderedRemove(@intCast(idx));
|
|
706
|
+
return JsonValue{ .array = arr };
|
|
681
707
|
}
|
|
682
708
|
return parent;
|
|
683
709
|
}
|
|
@@ -688,48 +714,32 @@ pub fn delprop(allocator: Allocator, parent: JsonValue, key: JsonValue) !JsonVal
|
|
|
688
714
|
// Set a property value by key.
|
|
689
715
|
pub fn setprop(allocator: Allocator, parent: JsonValue, key: JsonValue, newval: JsonValue) !JsonValue {
|
|
690
716
|
if (!iskey(key)) return parent;
|
|
717
|
+
if (iscondensed(parent)) return error.CondensedImmutable;
|
|
691
718
|
|
|
692
719
|
if (parent == .object) {
|
|
693
720
|
var obj = parent.object;
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
// Dupe the key if it was generated from the stack buffer (integer/float keys)
|
|
697
|
-
const owned_key = if (key != .string)
|
|
698
|
-
try allocator.dupe(u8, ks)
|
|
699
|
-
else
|
|
700
|
-
ks;
|
|
701
|
-
try obj.put(owned_key, newval);
|
|
721
|
+
const ks = if (key == .string) key.string else try numtext(allocator, key);
|
|
722
|
+
try obj.put(ks, newval);
|
|
702
723
|
return JsonValue{ .object = obj };
|
|
703
724
|
}
|
|
704
725
|
|
|
705
726
|
if (parent == .array) {
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
else => {},
|
|
714
|
-
}
|
|
715
|
-
if (ki) |idx| {
|
|
716
|
-
var arr = parent.array;
|
|
717
|
-
const plen: i64 = @intCast(arr.data.items.len);
|
|
718
|
-
if (idx >= 0) {
|
|
719
|
-
if (idx >= plen) {
|
|
720
|
-
// Append
|
|
721
|
-
try arr.append(newval);
|
|
722
|
-
} else {
|
|
723
|
-
// Replace
|
|
724
|
-
arr.data.items[@intCast(idx)] = newval;
|
|
725
|
-
}
|
|
727
|
+
const idx = listkey(key) orelse return parent;
|
|
728
|
+
var arr = parent.array;
|
|
729
|
+
const plen: i64 = @intCast(arr.data.items.len);
|
|
730
|
+
if (idx >= 0) {
|
|
731
|
+
if (idx >= plen) {
|
|
732
|
+
// Append
|
|
733
|
+
try arr.append(newval);
|
|
726
734
|
} else {
|
|
727
|
-
//
|
|
728
|
-
|
|
735
|
+
// Replace
|
|
736
|
+
arr.data.items[@intCast(idx)] = newval;
|
|
729
737
|
}
|
|
730
|
-
|
|
738
|
+
} else {
|
|
739
|
+
// Prepend
|
|
740
|
+
try arr.insert(0, newval);
|
|
731
741
|
}
|
|
732
|
-
return
|
|
742
|
+
return JsonValue{ .array = arr };
|
|
733
743
|
}
|
|
734
744
|
|
|
735
745
|
return parent;
|
|
@@ -1790,7 +1800,8 @@ pub fn getpath(allocator: Allocator, path_val: JsonValue, store: JsonValue) anye
|
|
|
1790
1800
|
return getpathInj(allocator, path_val, store, null);
|
|
1791
1801
|
}
|
|
1792
1802
|
|
|
1793
|
-
pub fn getpathInj(allocator: Allocator, path_val: JsonValue,
|
|
1803
|
+
pub fn getpathInj(allocator: Allocator, path_val: JsonValue, store_in: JsonValue, inj: ?*Injection) anyerror!JsonValue {
|
|
1804
|
+
var store = store_in;
|
|
1794
1805
|
var parts_buf: [64][]const u8 = undefined;
|
|
1795
1806
|
var numparts: usize = 0;
|
|
1796
1807
|
|
|
@@ -1811,13 +1822,24 @@ pub fn getpathInj(allocator: Allocator, path_val: JsonValue, store: JsonValue, i
|
|
|
1811
1822
|
}
|
|
1812
1823
|
},
|
|
1813
1824
|
.array => |arr| {
|
|
1825
|
+
// A number part reads as String(n); any other part that is not a
|
|
1826
|
+
// string makes the whole path miss.
|
|
1814
1827
|
for (arr.data.items) |item| {
|
|
1828
|
+
const part: []const u8 = switch (item) {
|
|
1829
|
+
.string => |s| s,
|
|
1830
|
+
.integer, .float => try numtext(allocator, item),
|
|
1831
|
+
else => return .null,
|
|
1832
|
+
};
|
|
1815
1833
|
if (numparts < parts_buf.len) {
|
|
1816
|
-
parts_buf[numparts] =
|
|
1834
|
+
parts_buf[numparts] = part;
|
|
1817
1835
|
numparts += 1;
|
|
1818
1836
|
}
|
|
1819
1837
|
}
|
|
1820
1838
|
},
|
|
1839
|
+
.integer, .float => {
|
|
1840
|
+
parts_buf[0] = try numtext(allocator, path_val);
|
|
1841
|
+
numparts = 1;
|
|
1842
|
+
},
|
|
1821
1843
|
.null => {
|
|
1822
1844
|
// Null path without injection → return null.
|
|
1823
1845
|
// With injection, null path returns the source.
|
|
@@ -1829,12 +1851,19 @@ pub fn getpathInj(allocator: Allocator, path_val: JsonValue, store: JsonValue, i
|
|
|
1829
1851
|
|
|
1830
1852
|
const parts = parts_buf[0..numparts];
|
|
1831
1853
|
|
|
1832
|
-
//
|
|
1833
|
-
//
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1854
|
+
// A condensed store reads as the node it was built from, touching only the
|
|
1855
|
+
// nodes on the path. A base changes what the walk below starts from, so a
|
|
1856
|
+
// read with one expands the store instead.
|
|
1857
|
+
if (iscondensed(store)) {
|
|
1858
|
+
if (inj == null or 0 == inj.?.base.len) {
|
|
1859
|
+
return condenseMaterialise(allocator, store, condenseWalk(store, condenseRoot(store), parts));
|
|
1860
|
+
}
|
|
1861
|
+
store = try expand(allocator, store);
|
|
1837
1862
|
}
|
|
1863
|
+
|
|
1864
|
+
// An empty path finds the source, with an injection or without; "." is
|
|
1865
|
+
// the one that finds dparent.
|
|
1866
|
+
if (numparts == 1 and parts[0].len == 0) return getpropFromStore(store);
|
|
1838
1867
|
// Single "." (splits to ["",""]) → return dparent.
|
|
1839
1868
|
if (numparts == 2 and parts[0].len == 0 and parts[1].len == 0) {
|
|
1840
1869
|
if (inj) |ij| return ij.dparent;
|
|
@@ -1957,12 +1986,12 @@ pub fn getpathInj(allocator: Allocator, path_val: JsonValue, store: JsonValue, i
|
|
|
1957
1986
|
resolved = .null;
|
|
1958
1987
|
}
|
|
1959
1988
|
} else if (resolved == .array) {
|
|
1960
|
-
const idx =
|
|
1989
|
+
const idx = listIndex(JsonValue{ .string = fp }) orelse {
|
|
1961
1990
|
resolved = .null;
|
|
1962
1991
|
break;
|
|
1963
1992
|
};
|
|
1964
|
-
if (idx
|
|
1965
|
-
resolved = resolved.array.data.items[
|
|
1993
|
+
if (idx < resolved.array.data.items.len) {
|
|
1994
|
+
resolved = resolved.array.data.items[idx];
|
|
1966
1995
|
} else {
|
|
1967
1996
|
resolved = .null;
|
|
1968
1997
|
}
|
|
@@ -2016,9 +2045,9 @@ fn resolvePart(allocator: Allocator, val: JsonValue, part_in: []const u8, inj: ?
|
|
|
2016
2045
|
if (val == .object) {
|
|
2017
2046
|
return val.object.get(part) orelse .null;
|
|
2018
2047
|
} else if (val == .array) {
|
|
2019
|
-
const idx =
|
|
2020
|
-
if (idx
|
|
2021
|
-
return val.array.data.items[
|
|
2048
|
+
const idx = listIndex(JsonValue{ .string = part }) orelse return .null;
|
|
2049
|
+
if (idx < val.array.data.items.len) {
|
|
2050
|
+
return val.array.data.items[idx];
|
|
2022
2051
|
}
|
|
2023
2052
|
return .null;
|
|
2024
2053
|
}
|
|
@@ -2043,6 +2072,9 @@ pub fn setpath(allocator: Allocator, store: JsonValue, path_val: JsonValue, val:
|
|
|
2043
2072
|
/// setpath with an injdef: its `base` names the store key the path starts
|
|
2044
2073
|
/// from, falling back to the store itself when that key is absent or null.
|
|
2045
2074
|
pub fn setpathWith(allocator: Allocator, store: JsonValue, path_val: JsonValue, val: JsonValue, injdef: JsonValue) !JsonValue {
|
|
2075
|
+
// Same contract as setprop and delprop: a condensed store is immutable.
|
|
2076
|
+
if (iscondensed(store)) return error.CondensedImmutable;
|
|
2077
|
+
|
|
2046
2078
|
var parts_buf: [64][]const u8 = undefined;
|
|
2047
2079
|
var is_numeric: [64]bool = undefined;
|
|
2048
2080
|
var numparts: usize = 0;
|
|
@@ -2133,6 +2165,7 @@ pub const Injection = struct {
|
|
|
2133
2165
|
skip: bool = false, // Set by handlers to suppress setval.
|
|
2134
2166
|
validate_mode: bool = false, // Enables $STRING/$NUMBER/etc validation commands.
|
|
2135
2167
|
exact_mode: bool = false, // Exact matching mode for select.
|
|
2168
|
+
named: bool = false, // Current map node names keys of its own (not $ commands).
|
|
2136
2169
|
key_i: usize = 0,
|
|
2137
2170
|
key: []const u8 = S_DTOP,
|
|
2138
2171
|
val: JsonValue = .null,
|
|
@@ -2208,7 +2241,10 @@ pub const Injection = struct {
|
|
|
2208
2241
|
pub fn setval(self: *Injection, val: JsonValue, ancestor: usize) !JsonValue {
|
|
2209
2242
|
const a = self.allocator;
|
|
2210
2243
|
if (ancestor < 2) {
|
|
2211
|
-
|
|
2244
|
+
// A list keeps the removed slot as a hole until inject's loop ends.
|
|
2245
|
+
if (val == .null and self.parent == .array) {
|
|
2246
|
+
self.parent = setprop(a, self.parent, JsonValue{ .string = self.key }, HOLE) catch self.parent;
|
|
2247
|
+
} else if (val == .null) {
|
|
2212
2248
|
self.parent = delprop(a, self.parent, JsonValue{ .string = self.key }) catch self.parent;
|
|
2213
2249
|
} else {
|
|
2214
2250
|
self.parent = setprop(a, self.parent, JsonValue{ .string = self.key }, val) catch self.parent;
|
|
@@ -2264,6 +2300,18 @@ pub const Injection = struct {
|
|
|
2264
2300
|
}
|
|
2265
2301
|
};
|
|
2266
2302
|
|
|
2303
|
+
// The marker setval leaves in a list slot it removes, until inject's loop for
|
|
2304
|
+
// the list ends: a function, so no data value can equal it.
|
|
2305
|
+
fn holeFn(_: Allocator) anyerror!JsonValue {
|
|
2306
|
+
return .null;
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
const HOLE = JsonValue{ .function = &holeFn };
|
|
2310
|
+
|
|
2311
|
+
fn ishole(val: JsonValue) bool {
|
|
2312
|
+
return val == .function and val.function == &holeFn;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2267
2315
|
fn appendSlice(allocator: Allocator, comptime T: type, existing: []const T, item: T) ![]T {
|
|
2268
2316
|
var new = try allocator.alloc(T, existing.len + 1);
|
|
2269
2317
|
@memcpy(new[0..existing.len], existing);
|
|
@@ -2334,6 +2382,8 @@ pub fn inject(allocator: Allocator, val: JsonValue, store: JsonValue, inj_opt: ?
|
|
|
2334
2382
|
inj.descend();
|
|
2335
2383
|
var current = val;
|
|
2336
2384
|
|
|
2385
|
+
inj.named = false;
|
|
2386
|
+
|
|
2337
2387
|
if (isnode(val)) {
|
|
2338
2388
|
// Get sorted keys: normal first, then $ transform keys.
|
|
2339
2389
|
var normal_keys = std.array_list.Managed([]const u8).init(allocator);
|
|
@@ -2355,11 +2405,12 @@ pub fn inject(allocator: Allocator, val: JsonValue, store: JsonValue, inj_opt: ?
|
|
|
2355
2405
|
var node_keys = std.array_list.Managed([]const u8).init(allocator);
|
|
2356
2406
|
for (normal_keys.items) |k| try node_keys.append(k);
|
|
2357
2407
|
for (transform_keys.items) |k| try node_keys.append(k);
|
|
2408
|
+
inj.named = ismap(val) and 0 < normal_keys.items.len;
|
|
2358
2409
|
|
|
2359
2410
|
// nkI is signed so cmdRef's `prior.key_i -%= 1` on a fresh 0 wraps to
|
|
2360
2411
|
// max-usize and bit-casts back to -1 here — then `nkI += 1` lands on
|
|
2361
|
-
// the same index again, re-visiting the slot that
|
|
2362
|
-
//
|
|
2412
|
+
// the same index again, re-visiting the slot that cmdRef has just
|
|
2413
|
+
// filled, or that the parent list has just shifted into place.
|
|
2363
2414
|
var nkI: isize = 0;
|
|
2364
2415
|
while (nkI < @as(isize, @intCast(node_keys.items.len))) {
|
|
2365
2416
|
const nodekey = node_keys.items[@as(usize, @intCast(nkI))];
|
|
@@ -2411,6 +2462,17 @@ pub fn inject(allocator: Allocator, val: JsonValue, store: JsonValue, inj_opt: ?
|
|
|
2411
2462
|
|
|
2412
2463
|
nkI += 1;
|
|
2413
2464
|
}
|
|
2465
|
+
|
|
2466
|
+
if (current == .array) {
|
|
2467
|
+
const elems = current.array.data.items;
|
|
2468
|
+
var kept: usize = 0;
|
|
2469
|
+
for (elems) |elem| {
|
|
2470
|
+
if (ishole(elem)) continue;
|
|
2471
|
+
elems[kept] = elem;
|
|
2472
|
+
kept += 1;
|
|
2473
|
+
}
|
|
2474
|
+
current.array.data.items.len = kept;
|
|
2475
|
+
}
|
|
2414
2476
|
} else if (val == .string) {
|
|
2415
2477
|
// Inject paths into string scalars.
|
|
2416
2478
|
inj.mode = M_VAL;
|
|
@@ -2428,7 +2490,8 @@ pub fn inject(allocator: Allocator, val: JsonValue, store: JsonValue, inj_opt: ?
|
|
|
2428
2490
|
// and modify). Reset skip only after both checks have seen it.
|
|
2429
2491
|
if (!inj.skip) {
|
|
2430
2492
|
if (inj.modify) |modify_fn| {
|
|
2431
|
-
const
|
|
2493
|
+
const stored: JsonValue = getprop(allocator, inj.parent, JsonValue{ .string = inj.key }, .null) catch .null;
|
|
2494
|
+
const mval: JsonValue = if (ishole(stored)) .null else stored;
|
|
2432
2495
|
modify_fn(allocator, mval, inj.key, inj.parent, inj, store);
|
|
2433
2496
|
}
|
|
2434
2497
|
}
|
|
@@ -2608,13 +2671,18 @@ fn dispatchCmd(allocator: Allocator, cmd: []const u8, store: JsonValue, inj: *In
|
|
|
2608
2671
|
if (std.mem.eql(u8, cmd, "$BOOLEAN")) return try cmdValidateType(allocator, inj, S_boolean, T_boolean);
|
|
2609
2672
|
if (std.mem.eql(u8, cmd, "$NULL")) return try cmdValidateType(allocator, inj, S_null, T_null);
|
|
2610
2673
|
if (std.mem.eql(u8, cmd, "$NIL")) return try cmdValidateNil(allocator, inj);
|
|
2611
|
-
if (std.mem.eql(u8, cmd, "$
|
|
2612
|
-
|
|
2613
|
-
if (std.mem.eql(u8, cmd, "$
|
|
2614
|
-
|
|
2615
|
-
if (std.mem.eql(u8, cmd, "$ANY")) return cmdValidateAny(inj);
|
|
2616
|
-
if (std.mem.eql(u8, cmd, "$ONE")) return try cmdValidateOne(allocator, inj, store);
|
|
2674
|
+
if (std.mem.eql(u8, cmd, "$MAP")) return try cmdValidateType(allocator, inj, S_map, T_map);
|
|
2675
|
+
if (std.mem.eql(u8, cmd, "$LIST")) return try cmdValidateType(allocator, inj, S_list, T_list);
|
|
2676
|
+
if (std.mem.eql(u8, cmd, "$FUNCTION")) return try cmdValidateType(allocator, inj, S_function, T_function);
|
|
2677
|
+
if (std.mem.eql(u8, cmd, "$INSTANCE")) return try cmdValidateType(allocator, inj, S_instance, T_instance);
|
|
2678
|
+
if (std.mem.eql(u8, cmd, "$ANY")) return try cmdValidateAny(allocator, inj);
|
|
2617
2679
|
if (std.mem.eql(u8, cmd, "$EXACT")) return try cmdValidateExactCmd(allocator, inj);
|
|
2680
|
+
if (std.mem.eql(u8, cmd, "$NOF")) return try validateCount(allocator, inj, "$NOF", true);
|
|
2681
|
+
if (std.mem.eql(u8, cmd, "$ALL")) return try validateCount(allocator, inj, "$ALL", false);
|
|
2682
|
+
if (std.mem.eql(u8, cmd, "$LEN")) return try validateBound(allocator, inj, "$LEN");
|
|
2683
|
+
if (std.mem.eql(u8, cmd, "$RANGE")) return try validateBound(allocator, inj, "$RANGE");
|
|
2684
|
+
if (std.mem.eql(u8, cmd, "$LIKE")) return try validateBound(allocator, inj, "$LIKE");
|
|
2685
|
+
if (std.mem.eql(u8, cmd, "$REST")) return try cmdValidateRest(allocator, inj);
|
|
2618
2686
|
if (std.mem.eql(u8, cmd, "$CHILD")) return try cmdValidateChildCmd(allocator, inj, store);
|
|
2619
2687
|
}
|
|
2620
2688
|
|
|
@@ -2627,7 +2695,9 @@ fn dispatchCmd(allocator: Allocator, cmd: []const u8, store: JsonValue, inj: *In
|
|
|
2627
2695
|
return val;
|
|
2628
2696
|
}
|
|
2629
2697
|
}
|
|
2630
|
-
|
|
2698
|
+
|
|
2699
|
+
// Otherwise a data path, as canonical getpath reads a $id reference.
|
|
2700
|
+
return try getpathInj(allocator, JsonValue{ .string = cmd }, store, inj);
|
|
2631
2701
|
}
|
|
2632
2702
|
|
|
2633
2703
|
fn cmdCopy(allocator: Allocator, inj: *Injection) JsonValue {
|
|
@@ -2732,15 +2802,21 @@ fn cmdValidateType(allocator: Allocator, inj: *Injection, tname: []const u8, tbi
|
|
|
2732
2802
|
const out = getprop(allocator, inj.dparent, JsonValue{ .string = inj.key }, .null) catch .null;
|
|
2733
2803
|
const t = typify(out);
|
|
2734
2804
|
|
|
2805
|
+
// A missing slot is no value, where getprop reads .null. A $NOF or $ALL
|
|
2806
|
+
// trial of a missing value leaves $TOP out of its store.
|
|
2807
|
+
if (tbit == T_null and null == lookupLiteral(inj.dparent, inj.key)) {
|
|
2808
|
+
try inj.errs.append(try invalidTypeMsg(allocator, inj.path, tname, .null));
|
|
2809
|
+
return .null;
|
|
2810
|
+
}
|
|
2811
|
+
|
|
2735
2812
|
// $STRING: also reject empty strings.
|
|
2736
2813
|
if (tbit == T_string) {
|
|
2737
2814
|
if (0 == (@as(i64, T_string) & t)) {
|
|
2738
2815
|
try inj.errs.append(try invalidTypeMsg(allocator, inj.path, tname, out));
|
|
2739
|
-
return
|
|
2816
|
+
return try setchecked(allocator, inj, out);
|
|
2740
2817
|
}
|
|
2741
2818
|
if (out == .string and out.string.len == 0) {
|
|
2742
2819
|
try inj.errs.append(try std.fmt.allocPrint(allocator, "Empty string at {s}", .{try pathifySlice(allocator, inj.path[1..])}));
|
|
2743
|
-
return .null;
|
|
2744
2820
|
}
|
|
2745
2821
|
_ = try inj.setval(out, 0);
|
|
2746
2822
|
return out;
|
|
@@ -2748,17 +2824,14 @@ fn cmdValidateType(allocator: Allocator, inj: *Injection, tname: []const u8, tbi
|
|
|
2748
2824
|
|
|
2749
2825
|
if (0 == (@as(i64, tbit) & t)) {
|
|
2750
2826
|
try inj.errs.append(try invalidTypeMsg(allocator, inj.path, tname, out));
|
|
2751
|
-
return .null;
|
|
2752
2827
|
}
|
|
2753
|
-
|
|
2754
|
-
return out;
|
|
2828
|
+
return try setchecked(allocator, inj, out);
|
|
2755
2829
|
}
|
|
2756
2830
|
|
|
2757
|
-
fn cmdValidateAny(inj: *Injection) JsonValue {
|
|
2831
|
+
fn cmdValidateAny(allocator: Allocator, inj: *Injection) anyerror!JsonValue {
|
|
2758
2832
|
if (inj.mode != M_VAL) return .null;
|
|
2759
|
-
const out = getprop(
|
|
2760
|
-
|
|
2761
|
-
return out;
|
|
2833
|
+
const out = getprop(allocator, inj.dparent, JsonValue{ .string = inj.key }, .null) catch .null;
|
|
2834
|
+
return try setchecked(allocator, inj, out);
|
|
2762
2835
|
}
|
|
2763
2836
|
|
|
2764
2837
|
fn cmdValidateNil(allocator: Allocator, inj: *Injection) anyerror!JsonValue {
|
|
@@ -2767,58 +2840,28 @@ fn cmdValidateNil(allocator: Allocator, inj: *Injection) anyerror!JsonValue {
|
|
|
2767
2840
|
if (out != .null) {
|
|
2768
2841
|
try inj.errs.append(try invalidTypeMsg(allocator, inj.path, S_nil, out));
|
|
2769
2842
|
}
|
|
2770
|
-
|
|
2771
|
-
return out;
|
|
2843
|
+
return try setchecked(allocator, inj, out);
|
|
2772
2844
|
}
|
|
2773
2845
|
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
// The data value to validate is inj.dparent itself — $ONE wraps the
|
|
2786
|
-
// current data, not a sub-slot of it. Mirrors the Rust / Go ports.
|
|
2787
|
-
const data_val = inj.dparent;
|
|
2788
|
-
|
|
2789
|
-
// Replace [$ONE, alt0, alt1, ...] in the grandparent with data_val.
|
|
2790
|
-
_ = try inj.setval(data_val, 2);
|
|
2791
|
-
|
|
2792
|
-
// Try each alternative.
|
|
2793
|
-
const alts = parent_items[1..];
|
|
2794
|
-
for (alts) |alt| {
|
|
2795
|
-
const terrs = std.array_list.Managed([]const u8).init(allocator);
|
|
2796
|
-
const terrs_ptr = try allocator.create(std.array_list.Managed([]const u8));
|
|
2797
|
-
terrs_ptr.* = terrs;
|
|
2798
|
-
_ = try validateWalk(allocator, alt, data_val, terrs_ptr, if (inj.path.len > 1) inj.path[1..] else inj.path);
|
|
2799
|
-
if (terrs_ptr.items.len == 0) return .null;
|
|
2846
|
+
// Write a checker's result to its slot. setval deletes on .null, so a JSON
|
|
2847
|
+
// null the data holds is set directly, and skip keeps inject from deleting it.
|
|
2848
|
+
fn setchecked(allocator: Allocator, inj: *Injection, out: JsonValue) anyerror!JsonValue {
|
|
2849
|
+
if (out == .null) {
|
|
2850
|
+
if (lookupLiteral(inj.dparent, inj.key)) |lit| {
|
|
2851
|
+
if (lit == .null) {
|
|
2852
|
+
_ = try setprop(allocator, inj.parent, JsonValue{ .string = inj.key }, .null);
|
|
2853
|
+
inj.skip = true;
|
|
2854
|
+
return .null;
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2800
2857
|
}
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
var desc = std.array_list.Managed(u8).init(allocator);
|
|
2804
|
-
for (alts, 0..) |alt, i| {
|
|
2805
|
-
if (i > 0) try desc.appendSlice(", ");
|
|
2806
|
-
try desc.appendSlice(try stringify(allocator, alt, null));
|
|
2807
|
-
}
|
|
2808
|
-
const prefix = if (alts.len > 1) "one of " else "";
|
|
2809
|
-
// Canonical does `inj.path = slice(inj.path, -1)`: $ONE wraps the value
|
|
2810
|
-
// in its parent, so the error belongs to the parent's path, not to the
|
|
2811
|
-
// list slot the command happens to occupy. Without this every message
|
|
2812
|
-
// carried a trailing `.0`.
|
|
2813
|
-
const reportpath = if (0 < inj.path.len) inj.path[0 .. inj.path.len - 1] else inj.path;
|
|
2814
|
-
const named = try transformNames(allocator, desc.items);
|
|
2815
|
-
try inj.errs.append(try invalidTypeMsg(allocator, reportpath, try std.fmt.allocPrint(allocator, "{s}{s}", .{ prefix, named }), data_val));
|
|
2816
|
-
return .null;
|
|
2858
|
+
_ = try inj.setval(out, 0);
|
|
2859
|
+
return out;
|
|
2817
2860
|
}
|
|
2818
2861
|
|
|
2819
2862
|
/// Canonical renders a validator description through R_TRANSFORM_NAME
|
|
2820
|
-
/// (/`\$([A-Z]+)`/g), lowercasing the captured name: the
|
|
2821
|
-
/// `["`$
|
|
2863
|
+
/// (/`\$([A-Z]+)`/g), lowercasing the captured name: the specs of
|
|
2864
|
+
/// `["`$NOF`",1,"`$STRING`","`$NUMBER`"]` read back as "string, number", not
|
|
2822
2865
|
/// as the spec literals. Applied to the joined description, so every
|
|
2823
2866
|
/// command name inside it is rewritten.
|
|
2824
2867
|
fn transformNames(allocator: Allocator, src: []const u8) ![]const u8 {
|
|
@@ -2842,187 +2885,869 @@ fn transformNames(allocator: Allocator, src: []const u8) ![]const u8 {
|
|
|
2842
2885
|
}
|
|
2843
2886
|
|
|
2844
2887
|
fn cmdValidateExactCmd(allocator: Allocator, inj: *Injection) anyerror!JsonValue {
|
|
2845
|
-
if (inj.mode != M_VAL)
|
|
2846
|
-
|
|
2888
|
+
if (inj.mode != M_VAL) {
|
|
2889
|
+
_ = try delprop(allocator, inj.parent, JsonValue{ .string = inj.key });
|
|
2890
|
+
return .null;
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
if (inj.parent != .array or inj.key_i != 0) {
|
|
2894
|
+
try inj.errs.append(try std.fmt.allocPrint(
|
|
2895
|
+
allocator,
|
|
2896
|
+
"The $EXACT validator at field {s} must be the first element of an array.",
|
|
2897
|
+
.{try pathifySlice(allocator, pathrange(inj.path, 1, 1))},
|
|
2898
|
+
));
|
|
2899
|
+
return .null;
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
const cval = slotval(inj);
|
|
2847
2903
|
|
|
2848
2904
|
inj.key_i = inj.keys.len;
|
|
2905
|
+
|
|
2906
|
+
// Replace [$EXACT, ...] with the data value; skip keeps inject off the detached list.
|
|
2907
|
+
try setslot(allocator, inj, cval);
|
|
2849
2908
|
inj.skip = true;
|
|
2850
2909
|
|
|
2851
|
-
|
|
2852
|
-
if (parent_items.len < 2) return .null;
|
|
2910
|
+
inj.path = inj.path[0 .. inj.path.len - 1];
|
|
2853
2911
|
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2912
|
+
const tvals = inj.parent.array.data.items[1..];
|
|
2913
|
+
if (0 == tvals.len) {
|
|
2914
|
+
try inj.errs.append(try std.fmt.allocPrint(
|
|
2915
|
+
allocator,
|
|
2916
|
+
"The $EXACT validator at field {s} must have at least one argument.",
|
|
2917
|
+
.{try pathifySlice(allocator, pathrange(inj.path, 1, 1))},
|
|
2918
|
+
));
|
|
2919
|
+
return .null;
|
|
2920
|
+
}
|
|
2858
2921
|
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
if (stdJsonEqual(a, b)) return .null;
|
|
2864
|
-
// Also try string comparison.
|
|
2865
|
-
const sa = try stringify(allocator, alt, null);
|
|
2866
|
-
const sb = try stringify(allocator, data_val, null);
|
|
2867
|
-
if (std.mem.eql(u8, sa, sb)) return .null;
|
|
2922
|
+
if (cval) |v| {
|
|
2923
|
+
for (tvals) |tval| {
|
|
2924
|
+
if (deepequal(tval, v)) return .null;
|
|
2925
|
+
}
|
|
2868
2926
|
}
|
|
2869
2927
|
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
}
|
|
2875
|
-
const prefix = if (alts.len > 1) "one of " else "";
|
|
2876
|
-
// Same parent-path rule as $ONE above.
|
|
2877
|
-
const reportpath = if (0 < inj.path.len) inj.path[0 .. inj.path.len - 1] else inj.path;
|
|
2878
|
-
const root_prefix = if (1 < reportpath.len) "" else "value ";
|
|
2879
|
-
const named = try transformNames(allocator, desc.items);
|
|
2880
|
-
try inj.errs.append(try invalidTypeMsg(allocator, reportpath, try std.fmt.allocPrint(allocator, "{s}exactly equal to {s}{s}", .{ root_prefix, prefix, named }), data_val));
|
|
2928
|
+
const root_prefix: []const u8 = if (1 < inj.path.len) "" else "value ";
|
|
2929
|
+
const prefix: []const u8 = if (1 == tvals.len) "" else "one of ";
|
|
2930
|
+
const need = try std.fmt.allocPrint(allocator, "{s}exactly equal to {s}{s}", .{ root_prefix, prefix, try valdesc(allocator, tvals) });
|
|
2931
|
+
try inj.errs.append(try invalidTypeMsg(allocator, inj.path, need, cval orelse .null));
|
|
2881
2932
|
return .null;
|
|
2882
2933
|
}
|
|
2883
2934
|
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
const child = getprop(allocator, inj.parent, JsonValue{ .string = inj.key }, .null) catch .null;
|
|
2889
|
-
const pkey = if (inj.path.len >= 2) inj.path[inj.path.len - 2] else S_DTOP;
|
|
2890
|
-
const tval = getprop(allocator, inj.dparent, JsonValue{ .string = pkey }, .null) catch .null;
|
|
2891
|
-
|
|
2892
|
-
if (tval == .object) {
|
|
2893
|
-
// For each key in data, clone the child spec into the parent.
|
|
2894
|
-
const ckeys = try keysof(allocator, tval);
|
|
2895
|
-
if (ckeys == .array) {
|
|
2896
|
-
for (ckeys.array.data.items) |ck| {
|
|
2897
|
-
if (ck == .string) {
|
|
2898
|
-
try inj.parent.object.put(ck.string, try clone(allocator, child));
|
|
2899
|
-
// Append to keys for further processing.
|
|
2900
|
-
inj.keys = appendSlice(allocator, []const u8, inj.keys, ck.string) catch inj.keys;
|
|
2901
|
-
}
|
|
2902
|
-
}
|
|
2903
|
-
}
|
|
2904
|
-
} else if (tval != .null) {
|
|
2905
|
-
try inj.errs.append(try invalidTypeMsg(allocator, if (inj.path.len > 1) inj.path[0 .. inj.path.len - 1] else inj.path, S_object, tval));
|
|
2906
|
-
}
|
|
2935
|
+
// The counting list directives, $NOF and $ALL. Without a count, every spec
|
|
2936
|
+
// has to admit.
|
|
2937
|
+
fn validateCount(allocator: Allocator, inj: *Injection, name: []const u8, counted: bool) anyerror!JsonValue {
|
|
2938
|
+
if (inj.mode != M_VAL) return .null;
|
|
2907
2939
|
|
|
2908
|
-
|
|
2909
|
-
|
|
2940
|
+
if (inj.parent != .array or inj.key_i != 0) {
|
|
2941
|
+
try inj.errs.append(try std.fmt.allocPrint(
|
|
2942
|
+
allocator,
|
|
2943
|
+
"The {s} validator at field {s} must be the first element of an array.",
|
|
2944
|
+
.{ name, try pathifySlice(allocator, pathrange(inj.path, 1, 1)) },
|
|
2945
|
+
));
|
|
2910
2946
|
return .null;
|
|
2911
2947
|
}
|
|
2912
2948
|
|
|
2913
|
-
|
|
2914
|
-
// List mode: [$CHILD, template] — expand for each element.
|
|
2915
|
-
if (inj.parent.array.data.items.len < 2) return .null;
|
|
2916
|
-
const child = inj.parent.array.data.items[1];
|
|
2917
|
-
const dparent_val = inj.dparent;
|
|
2918
|
-
|
|
2919
|
-
if (dparent_val == .null) {
|
|
2920
|
-
inj.parent.array.data.items.len = 0;
|
|
2921
|
-
return .null;
|
|
2922
|
-
}
|
|
2949
|
+
const cval = slotval(inj);
|
|
2923
2950
|
|
|
2924
|
-
|
|
2925
|
-
try inj.errs.append(try invalidTypeMsg(allocator, if (inj.path.len > 1) inj.path[0 .. inj.path.len - 1] else inj.path, S_list, dparent_val));
|
|
2926
|
-
return dparent_val;
|
|
2927
|
-
}
|
|
2951
|
+
inj.key_i = inj.keys.len;
|
|
2928
2952
|
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
try inj.parent.array.append(try clone(allocator, child));
|
|
2934
|
-
}
|
|
2953
|
+
// Replace the directive's list with the data value. Every later return
|
|
2954
|
+
// skips, so that inject leaves the detached list alone.
|
|
2955
|
+
try setslot(allocator, inj, cval);
|
|
2956
|
+
inj.skip = true;
|
|
2935
2957
|
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2958
|
+
inj.path = inj.path[0 .. inj.path.len - 1];
|
|
2959
|
+
|
|
2960
|
+
const elems = inj.parent.array.data.items;
|
|
2961
|
+
const count: ?JsonValue = if (counted and 1 < elems.len) elems[1] else null;
|
|
2962
|
+
const argsfrom: usize = if (counted) 2 else 1;
|
|
2963
|
+
const tvals = elems[@min(argsfrom, elems.len)..];
|
|
2964
|
+
const numtvals: i64 = @intCast(tvals.len);
|
|
2965
|
+
const field = try std.fmt.allocPrint(
|
|
2966
|
+
allocator,
|
|
2967
|
+
"The {s} validator at field {s}",
|
|
2968
|
+
.{ name, try pathifySlice(allocator, pathrange(inj.path, 1, 0)) },
|
|
2969
|
+
);
|
|
2970
|
+
|
|
2971
|
+
if (0 == numtvals) {
|
|
2972
|
+
const need: []const u8 = if (counted) " must have a count and" else " must have";
|
|
2973
|
+
try inj.errs.append(try std.fmt.allocPrint(allocator, "{s}{s} at least one argument.", .{ field, need }));
|
|
2974
|
+
return .null;
|
|
2975
|
+
}
|
|
2943
2976
|
|
|
2944
|
-
|
|
2945
|
-
// increments its signed nkI counter on resume) so that the first
|
|
2946
|
-
// element is also validated against the child template. key_i is
|
|
2947
|
-
// usize: max-usize bit-casts to -1 in inject's nkI — the same wrap
|
|
2948
|
-
// idiom cmdRef already relies on.
|
|
2949
|
-
inj.key_i = std.math.maxInt(usize);
|
|
2977
|
+
const bounds: NofCount = if (counted) try nofcount(allocator, count, numtvals) else .{ .lo = numtvals, .hi = numtvals, .desc = "all" };
|
|
2950
2978
|
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2979
|
+
const countdesc = bounds.desc orelse {
|
|
2980
|
+
try inj.errs.append(try std.fmt.allocPrint(
|
|
2981
|
+
allocator,
|
|
2982
|
+
"{s} has an invalid count: {s}.",
|
|
2983
|
+
.{ field, try stringify(allocator, count orelse .null, null) },
|
|
2984
|
+
));
|
|
2955
2985
|
return .null;
|
|
2986
|
+
};
|
|
2987
|
+
|
|
2988
|
+
var admitted: i64 = 0;
|
|
2989
|
+
for (tvals, 0..) |tval, tI| {
|
|
2990
|
+
const left = numtvals - @as(i64, @intCast(tI));
|
|
2991
|
+
|
|
2992
|
+
// Stop once the specs left cannot change the verdict.
|
|
2993
|
+
const decided = bounds.hi < admitted or admitted + left < bounds.lo or (bounds.lo <= admitted and admitted + left <= bounds.hi);
|
|
2994
|
+
if (decided) break;
|
|
2995
|
+
|
|
2996
|
+
if (try admits(allocator, cval, tval, inj)) admitted += 1;
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
if (admitted < bounds.lo or bounds.hi < admitted) {
|
|
3000
|
+
const need = try std.fmt.allocPrint(allocator, "{s} of {s}", .{ countdesc, try valdesc(allocator, tvals) });
|
|
3001
|
+
try inj.errs.append(try invalidTypeMsg(allocator, inj.path, need, cval orelse .null));
|
|
2956
3002
|
}
|
|
2957
3003
|
|
|
2958
3004
|
return .null;
|
|
2959
3005
|
}
|
|
2960
3006
|
|
|
2961
|
-
//
|
|
2962
|
-
//
|
|
2963
|
-
|
|
2964
|
-
// ============================================================================
|
|
2965
|
-
|
|
2966
|
-
fn cmdFormat(allocator: Allocator, inj: *Injection, store: JsonValue) !JsonValue {
|
|
3007
|
+
// The bounding list directives, $LEN, $RANGE and $LIKE: a bound or pattern,
|
|
3008
|
+
// then at most one spec that also admits.
|
|
3009
|
+
fn validateBound(allocator: Allocator, inj: *Injection, name: []const u8) anyerror!JsonValue {
|
|
2967
3010
|
if (inj.mode != M_VAL) return .null;
|
|
2968
|
-
if (inj.keys.len > 1) inj.keys = inj.keys[0..1];
|
|
2969
3011
|
|
|
2970
|
-
if (inj.parent != .array or inj.
|
|
2971
|
-
|
|
2972
|
-
|
|
3012
|
+
if (inj.parent != .array or inj.key_i != 0) {
|
|
3013
|
+
try inj.errs.append(try std.fmt.allocPrint(
|
|
3014
|
+
allocator,
|
|
3015
|
+
"The {s} validator at field {s} must be the first element of an array.",
|
|
3016
|
+
.{ name, try pathifySlice(allocator, pathrange(inj.path, 1, 1)) },
|
|
3017
|
+
));
|
|
3018
|
+
return .null;
|
|
3019
|
+
}
|
|
2973
3020
|
|
|
2974
|
-
const
|
|
3021
|
+
const cval = slotval(inj);
|
|
2975
3022
|
|
|
2976
|
-
|
|
2977
|
-
const child = try injectChild(allocator, child_raw, store, inj);
|
|
3023
|
+
inj.key_i = inj.keys.len;
|
|
2978
3024
|
|
|
2979
|
-
//
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
inj.nodes[inj.nodes.len - 2]
|
|
2983
|
-
else if (inj.nodes.len > 0)
|
|
2984
|
-
inj.nodes[inj.nodes.len - 1]
|
|
2985
|
-
else
|
|
2986
|
-
JsonValue{ .null = {} };
|
|
3025
|
+
// As for the counting directives: skip keeps inject off the detached list.
|
|
3026
|
+
try setslot(allocator, inj, cval);
|
|
3027
|
+
inj.skip = true;
|
|
2987
3028
|
|
|
2988
|
-
|
|
2989
|
-
if (out == .null and !std.mem.eql(u8, name, "identity")) {
|
|
2990
|
-
// Unknown format or error → delete from target.
|
|
2991
|
-
if (target != .null) _ = delprop(allocator, target, JsonValue{ .string = tkey }) catch {};
|
|
2992
|
-
return .null;
|
|
2993
|
-
}
|
|
3029
|
+
inj.path = inj.path[0 .. inj.path.len - 1];
|
|
2994
3030
|
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
3031
|
+
const elems = inj.parent.array.data.items;
|
|
3032
|
+
const field = try std.fmt.allocPrint(
|
|
3033
|
+
allocator,
|
|
3034
|
+
"The {s} validator at field {s}",
|
|
3035
|
+
.{ name, try pathifySlice(allocator, pathrange(inj.path, 1, 0)) },
|
|
3036
|
+
);
|
|
2998
3037
|
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
if (
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
if (std.mem.eql(u8, name, "concat")) {
|
|
3007
|
-
if (val == .array) {
|
|
3008
|
-
var buf = std.array_list.Managed(u8).init(allocator);
|
|
3009
|
-
for (val.array.data.items) |item| {
|
|
3010
|
-
if (isnode(item)) continue;
|
|
3011
|
-
try buf.appendSlice(try fmtStr(allocator, item));
|
|
3012
|
-
}
|
|
3013
|
-
return JsonValue{ .string = buf.items };
|
|
3014
|
-
}
|
|
3015
|
-
return val;
|
|
3038
|
+
const islen = std.mem.eql(u8, name, "$LEN");
|
|
3039
|
+
const islike = std.mem.eql(u8, name, "$LIKE");
|
|
3040
|
+
const argname: []const u8 = if (islike) "pattern" else "bound";
|
|
3041
|
+
|
|
3042
|
+
if (elems.len < 2 or 3 < elems.len) {
|
|
3043
|
+
try inj.errs.append(try std.fmt.allocPrint(allocator, "{s} must have a {s} and at most one spec.", .{ field, argname }));
|
|
3044
|
+
return .null;
|
|
3016
3045
|
}
|
|
3017
|
-
const msg = try std.fmt.allocPrint(allocator, "$FORMAT: unknown format: {s}.", .{name});
|
|
3018
|
-
try errs.append(msg);
|
|
3019
|
-
return .null;
|
|
3020
|
-
}
|
|
3021
3046
|
|
|
3022
|
-
const
|
|
3047
|
+
const bound = elems[1];
|
|
3048
|
+
const like: ?[]const u8 = if (islike) likere(bound) else null;
|
|
3049
|
+
const likedesc: ?[]const u8 = if (like) |p| try std.fmt.allocPrint(allocator, "like /{s}/", .{p}) else null;
|
|
3050
|
+
const bounds: NofCount = if (islen) try lenbound(allocator, bound) else .{ .lo = 0, .hi = 0, .desc = if (islike) likedesc else try rangedesc(allocator, bound) };
|
|
3023
3051
|
|
|
3024
|
-
|
|
3025
|
-
|
|
3052
|
+
const desc = bounds.desc orelse {
|
|
3053
|
+
try inj.errs.append(try std.fmt.allocPrint(
|
|
3054
|
+
allocator,
|
|
3055
|
+
"{s} has an invalid {s}: {s}.",
|
|
3056
|
+
.{ field, argname, try stringify(allocator, bound, null) },
|
|
3057
|
+
));
|
|
3058
|
+
return .null;
|
|
3059
|
+
};
|
|
3060
|
+
|
|
3061
|
+
const val: JsonValue = cval orelse .null;
|
|
3062
|
+
|
|
3063
|
+
if (3 == elems.len and !(try admits(allocator, cval, elems[2], inj))) {
|
|
3064
|
+
try inj.errs.append(try invalidTypeMsg(allocator, inj.path, try valdesc(allocator, elems[2..]), val));
|
|
3065
|
+
return .null;
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
const tbits: i64 = if (islen) T_string | T_list | T_map else if (islike) T_string else T_number;
|
|
3069
|
+
if (0 == (tbits & typify(val))) {
|
|
3070
|
+
const tname: []const u8 = if (islen) "string, list or map" else if (islike) S_string else S_number;
|
|
3071
|
+
try inj.errs.append(try invalidTypeMsg(allocator, inj.path, tname, val));
|
|
3072
|
+
return .null;
|
|
3073
|
+
}
|
|
3074
|
+
|
|
3075
|
+
const len = lenof(val);
|
|
3076
|
+
const inbound = if (islen) bounds.lo <= len and (-1 == bounds.hi or len <= bounds.hi) else if (islike) re_test(like.?, val.string) else inrange(bound, val);
|
|
3077
|
+
|
|
3078
|
+
if (!inbound) {
|
|
3079
|
+
const root_prefix: []const u8 = if (1 < inj.path.len) "" else "value ";
|
|
3080
|
+
const need = try std.fmt.allocPrint(allocator, "{s}{s}", .{ root_prefix, desc });
|
|
3081
|
+
try inj.errs.append(try invalidTypeMsg(allocator, inj.path, need, val));
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
return .null;
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
// The length $LEN bounds: a list's elements, a map's keys, and a string's code
|
|
3088
|
+
// points, one for each byte that is not a UTF-8 continuation byte.
|
|
3089
|
+
fn lenof(val: JsonValue) i64 {
|
|
3090
|
+
return switch (val) {
|
|
3091
|
+
.string => |s| blk: {
|
|
3092
|
+
var n: i64 = 0;
|
|
3093
|
+
for (s) |b| {
|
|
3094
|
+
if ((b & 0xC0) != 0x80) n += 1;
|
|
3095
|
+
}
|
|
3096
|
+
break :blk n;
|
|
3097
|
+
},
|
|
3098
|
+
.array => |a| @intCast(a.data.items.len),
|
|
3099
|
+
.object => |o| @intCast(o.count()),
|
|
3100
|
+
else => 0,
|
|
3101
|
+
};
|
|
3102
|
+
}
|
|
3103
|
+
|
|
3104
|
+
// The bounds of a $LEN bound, with -1 for no maximum, and the words for it,
|
|
3105
|
+
// which are null when the bound is invalid.
|
|
3106
|
+
fn lenbound(allocator: Allocator, bound: JsonValue) anyerror!NofCount {
|
|
3107
|
+
const b = try nofcount(allocator, bound, -1);
|
|
3108
|
+
if (null == b.desc) return b;
|
|
3109
|
+
|
|
3110
|
+
var desc: []const u8 = undefined;
|
|
3111
|
+
if (b.lo == b.hi) {
|
|
3112
|
+
desc = try std.fmt.allocPrint(allocator, "of length {d}", .{b.lo});
|
|
3113
|
+
} else if (-1 == b.hi) {
|
|
3114
|
+
desc = try std.fmt.allocPrint(allocator, "of length at least {d}", .{b.lo});
|
|
3115
|
+
} else if (0 == b.lo) {
|
|
3116
|
+
desc = try std.fmt.allocPrint(allocator, "of length at most {d}", .{b.hi});
|
|
3117
|
+
} else {
|
|
3118
|
+
desc = try std.fmt.allocPrint(allocator, "of length {d} to {d}", .{ b.lo, b.hi });
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3121
|
+
return .{ .lo = b.lo, .hi = b.hi, .desc = desc };
|
|
3122
|
+
}
|
|
3123
|
+
|
|
3124
|
+
// A $LIKE pattern, null unless the port's own regex engine compiles it.
|
|
3125
|
+
fn likere(pattern: JsonValue) ?[]const u8 {
|
|
3126
|
+
if (pattern != .string) return null;
|
|
3127
|
+
var re = re_compile(pattern.string) orelse return null;
|
|
3128
|
+
re.deinit();
|
|
3129
|
+
return pattern.string;
|
|
3130
|
+
}
|
|
3131
|
+
|
|
3132
|
+
// A $RANGE bound's number, or null when it is absent or not a number.
|
|
3133
|
+
fn rangenum(n: ?JsonValue) ?f64 {
|
|
3134
|
+
const v = n orelse return null;
|
|
3135
|
+
if (0 == (@as(i64, T_number) & typify(v))) return null;
|
|
3136
|
+
return numval(v);
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
// The words for a $RANGE bound, which are null when the bound is invalid.
|
|
3140
|
+
fn rangedesc(allocator: Allocator, bound: JsonValue) anyerror!?[]const u8 {
|
|
3141
|
+
if (bound != .object) return null;
|
|
3142
|
+
|
|
3143
|
+
const min = bound.object.get("min");
|
|
3144
|
+
const max = bound.object.get("max");
|
|
3145
|
+
const gt = bound.object.get("gt");
|
|
3146
|
+
const lt = bound.object.get("lt");
|
|
3147
|
+
|
|
3148
|
+
var numkeys: usize = 0;
|
|
3149
|
+
for ([_]?JsonValue{ min, max, gt, lt }) |n| {
|
|
3150
|
+
if (n == null) continue;
|
|
3151
|
+
if (null == rangenum(n)) return null;
|
|
3152
|
+
numkeys += 1;
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
if (0 == numkeys or bound.object.count() != numkeys) return null;
|
|
3156
|
+
if ((min != null and gt != null) or (max != null and lt != null)) return null;
|
|
3157
|
+
|
|
3158
|
+
const lower = rangenum(min) orelse rangenum(gt);
|
|
3159
|
+
const upper = rangenum(max) orelse rangenum(lt);
|
|
3160
|
+
if (lower != null and upper != null and upper.? < lower.?) return null;
|
|
3161
|
+
|
|
3162
|
+
var desc = std.array_list.Managed(u8).init(allocator);
|
|
3163
|
+
if (min orelse gt) |n| {
|
|
3164
|
+
const words: []const u8 = if (min != null) "at least " else "greater than ";
|
|
3165
|
+
try desc.appendSlice(words);
|
|
3166
|
+
try desc.appendSlice(try stringify(allocator, n, null));
|
|
3167
|
+
}
|
|
3168
|
+
if (max orelse lt) |n| {
|
|
3169
|
+
const words: []const u8 = if (max != null) "at most " else "less than ";
|
|
3170
|
+
if (0 < desc.items.len) try desc.appendSlice(" and ");
|
|
3171
|
+
try desc.appendSlice(words);
|
|
3172
|
+
try desc.appendSlice(try stringify(allocator, n, null));
|
|
3173
|
+
}
|
|
3174
|
+
return desc.items;
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
// A number within a valid $RANGE bound.
|
|
3178
|
+
fn inrange(bound: JsonValue, val: JsonValue) bool {
|
|
3179
|
+
const v = numval(val) orelse return false;
|
|
3180
|
+
const min = rangenum(bound.object.get("min"));
|
|
3181
|
+
const max = rangenum(bound.object.get("max"));
|
|
3182
|
+
const gt = rangenum(bound.object.get("gt"));
|
|
3183
|
+
const lt = rangenum(bound.object.get("lt"));
|
|
3184
|
+
return (min == null or min.? <= v) and (max == null or v <= max.?) and (gt == null or gt.? < v) and (lt == null or v < lt.?);
|
|
3185
|
+
}
|
|
3186
|
+
|
|
3187
|
+
// The data value at a list directive's slot: .null for a JSON null, and null
|
|
3188
|
+
// when absent. The directive's own dparent was read with getprop.
|
|
3189
|
+
fn slotval(inj: *Injection) ?JsonValue {
|
|
3190
|
+
if (inj.prior) |prior| return lookupLiteral(prior.dparent, prior.key);
|
|
3191
|
+
return inj.dparent;
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3194
|
+
// Replace a list directive's list with its slot value. setval deletes on
|
|
3195
|
+
// .null, so a JSON null is set directly, and an absent value deletes.
|
|
3196
|
+
fn setslot(allocator: Allocator, inj: *Injection, cval: ?JsonValue) anyerror!void {
|
|
3197
|
+
const v = cval orelse {
|
|
3198
|
+
_ = try inj.setval(.null, 2);
|
|
3199
|
+
return;
|
|
3200
|
+
};
|
|
3201
|
+
if (v == .null and 2 <= inj.nodes.len and 2 <= inj.path.len) {
|
|
3202
|
+
const akey = JsonValue{ .string = inj.path[inj.path.len - 2] };
|
|
3203
|
+
_ = try setprop(allocator, inj.nodes[inj.nodes.len - 2], akey, .null);
|
|
3204
|
+
return;
|
|
3205
|
+
}
|
|
3206
|
+
_ = try inj.setval(v, 2);
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
// The value stored at key, a JSON null included, or null when val holds no
|
|
3210
|
+
// such key. getprop reads both as .null.
|
|
3211
|
+
fn lookupLiteral(val: JsonValue, key: []const u8) ?JsonValue {
|
|
3212
|
+
return switch (val) {
|
|
3213
|
+
.object => |obj| obj.get(key),
|
|
3214
|
+
.array => |arr| blk: {
|
|
3215
|
+
const idx = listIndex(JsonValue{ .string = key }) orelse break :blk null;
|
|
3216
|
+
break :blk if (idx < arr.data.items.len) arr.data.items[idx] else null;
|
|
3217
|
+
},
|
|
3218
|
+
else => null,
|
|
3219
|
+
};
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3222
|
+
// The part of a path that canonical pathify(path, from, end) renders.
|
|
3223
|
+
fn pathrange(path: []const []const u8, from: usize, end: usize) []const []const u8 {
|
|
3224
|
+
const start = @min(from, path.len);
|
|
3225
|
+
const stop = if (path.len < start + end) start else path.len - end;
|
|
3226
|
+
return path[start..stop];
|
|
3227
|
+
}
|
|
3228
|
+
|
|
3229
|
+
// Directive arguments for a message: stringified, with checker names
|
|
3230
|
+
// lower-cased.
|
|
3231
|
+
fn valdesc(allocator: Allocator, tvals: []const JsonValue) anyerror![]const u8 {
|
|
3232
|
+
var desc = std.array_list.Managed(u8).init(allocator);
|
|
3233
|
+
for (tvals, 0..) |tval, i| {
|
|
3234
|
+
if (i > 0) try desc.appendSlice(", ");
|
|
3235
|
+
try desc.appendSlice(try stringify(allocator, tval, null));
|
|
3236
|
+
}
|
|
3237
|
+
return try transformNames(allocator, desc.items);
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
// JSON equality: numbers by value, lists in order, maps by key in any order.
|
|
3241
|
+
fn deepequal(a: JsonValue, b: JsonValue) bool {
|
|
3242
|
+
const na = numval(a);
|
|
3243
|
+
const nb = numval(b);
|
|
3244
|
+
if (na != null or nb != null) return na != null and nb != null and na.? == nb.?;
|
|
3245
|
+
|
|
3246
|
+
return switch (a) {
|
|
3247
|
+
.null => b == .null,
|
|
3248
|
+
.bool => |ab| b == .bool and ab == b.bool,
|
|
3249
|
+
.string => |astr| b == .string and std.mem.eql(u8, astr, b.string),
|
|
3250
|
+
.function => |af| b == .function and af == b.function,
|
|
3251
|
+
.array => |aa| blk: {
|
|
3252
|
+
if (b != .array or aa.data.items.len != b.array.data.items.len) break :blk false;
|
|
3253
|
+
for (aa.data.items, b.array.data.items) |x, y| {
|
|
3254
|
+
if (!deepequal(x, y)) break :blk false;
|
|
3255
|
+
}
|
|
3256
|
+
break :blk true;
|
|
3257
|
+
},
|
|
3258
|
+
.object => |ao| blk: {
|
|
3259
|
+
if (b != .object or ao.count() != b.object.count()) break :blk false;
|
|
3260
|
+
var it = ao.iterator();
|
|
3261
|
+
while (it.next()) |kv| {
|
|
3262
|
+
const bv = b.object.get(kv.key_ptr.*) orelse break :blk false;
|
|
3263
|
+
if (!deepequal(kv.value_ptr.*, bv)) break :blk false;
|
|
3264
|
+
}
|
|
3265
|
+
break :blk true;
|
|
3266
|
+
},
|
|
3267
|
+
.integer, .float, .number_string => false,
|
|
3268
|
+
};
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3271
|
+
fn numval(v: JsonValue) ?f64 {
|
|
3272
|
+
return switch (v) {
|
|
3273
|
+
.integer => |i| @as(f64, @floatFromInt(i)),
|
|
3274
|
+
.float => |f| f,
|
|
3275
|
+
.number_string => |s| std.fmt.parseFloat(f64, s) catch null,
|
|
3276
|
+
else => null,
|
|
3277
|
+
};
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
// Every member val has is in out, unchanged. A member only out has is a
|
|
3281
|
+
// default the spec supplied, and is ignored.
|
|
3282
|
+
fn keeps(val: ?JsonValue, out: ?JsonValue) bool {
|
|
3283
|
+
const v = val orelse return true;
|
|
3284
|
+
const o = out orelse return false;
|
|
3285
|
+
if (!isnode(v) or islist(v) != islist(o) or !isnode(o)) return deepequal(v, o);
|
|
3286
|
+
|
|
3287
|
+
switch (v) {
|
|
3288
|
+
.object => |vo| {
|
|
3289
|
+
var it = vo.iterator();
|
|
3290
|
+
while (it.next()) |kv| {
|
|
3291
|
+
if (!keeps(kv.value_ptr.*, o.object.get(kv.key_ptr.*))) return false;
|
|
3292
|
+
}
|
|
3293
|
+
},
|
|
3294
|
+
.array => |va| {
|
|
3295
|
+
const oitems = o.array.data.items;
|
|
3296
|
+
for (va.data.items, 0..) |item, i| {
|
|
3297
|
+
const oitem: ?JsonValue = if (i < oitems.len) oitems[i] else null;
|
|
3298
|
+
if (!keeps(item, oitem)) return false;
|
|
3299
|
+
}
|
|
3300
|
+
},
|
|
3301
|
+
else => {},
|
|
3302
|
+
}
|
|
3303
|
+
return true;
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
// A spec admits a value when validating the value against it finds no error
|
|
3307
|
+
// and gives back the value as it is.
|
|
3308
|
+
fn admits(allocator: Allocator, val: ?JsonValue, spec: JsonValue, inj: *Injection) anyerror!bool {
|
|
3309
|
+
// validateValue reads the meta, and with it the exact flag, from injdef.
|
|
3310
|
+
const injdef: JsonValue = if (inj.meta == .object) blk: {
|
|
3311
|
+
const d = try JsonValue.makeMap(allocator);
|
|
3312
|
+
try d.object.put("meta", inj.meta);
|
|
3313
|
+
break :blk d;
|
|
3314
|
+
} else .null;
|
|
3315
|
+
|
|
3316
|
+
const result = try validateValue(allocator, val, spec, injdef);
|
|
3317
|
+
return result.err == null and keeps(val, result.out);
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
// A $NOF count's bounds, and the words for it, which are null when the count
|
|
3321
|
+
// is invalid.
|
|
3322
|
+
const NofCount = struct { lo: i64, hi: i64, desc: ?[]const u8 };
|
|
3323
|
+
|
|
3324
|
+
fn natval(v: ?JsonValue) ?i64 {
|
|
3325
|
+
const n = v orelse return null;
|
|
3326
|
+
if (0 == (@as(i64, T_integer) & typify(n))) return null;
|
|
3327
|
+
return switch (n) {
|
|
3328
|
+
.integer => |i| if (0 <= i) i else null,
|
|
3329
|
+
.float => |f| if (0 <= f and f < 9.0e15) @as(i64, @intFromFloat(f)) else null,
|
|
3330
|
+
else => null,
|
|
3331
|
+
};
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
// The count is a non-negative integer, or a map holding min, max or both.
|
|
3335
|
+
// Without a max, the bound is the number of specs.
|
|
3336
|
+
fn nofcount(allocator: Allocator, count: ?JsonValue, numtvals: i64) anyerror!NofCount {
|
|
3337
|
+
const invalid = NofCount{ .lo = 0, .hi = 0, .desc = null };
|
|
3338
|
+
|
|
3339
|
+
if (natval(count)) |n| {
|
|
3340
|
+
const words: []const u8 = if (0 == n) "none" else try std.fmt.allocPrint(allocator, "exactly {d}", .{n});
|
|
3341
|
+
return .{ .lo = n, .hi = n, .desc = words };
|
|
3342
|
+
}
|
|
3343
|
+
|
|
3344
|
+
const c = count orelse return invalid;
|
|
3345
|
+
if (c != .object) return invalid;
|
|
3346
|
+
|
|
3347
|
+
const cmin = c.object.get("min");
|
|
3348
|
+
const cmax = c.object.get("max");
|
|
3349
|
+
const nmin = natval(cmin);
|
|
3350
|
+
const nmax = natval(cmax);
|
|
3351
|
+
|
|
3352
|
+
var numkeys: usize = 0;
|
|
3353
|
+
if (cmin != null) numkeys += 1;
|
|
3354
|
+
if (cmax != null) numkeys += 1;
|
|
3355
|
+
|
|
3356
|
+
if (0 == numkeys or c.object.count() != numkeys) return invalid;
|
|
3357
|
+
if (cmin != null and nmin == null) return invalid;
|
|
3358
|
+
if (cmax != null and nmax == null) return invalid;
|
|
3359
|
+
if (nmin != null and nmax != null and nmax.? < nmin.?) return invalid;
|
|
3360
|
+
|
|
3361
|
+
const lo: i64 = nmin orelse 0;
|
|
3362
|
+
const hi: i64 = nmax orelse numtvals;
|
|
3363
|
+
|
|
3364
|
+
var desc: []const u8 = "none";
|
|
3365
|
+
if (cmax == null) {
|
|
3366
|
+
desc = try std.fmt.allocPrint(allocator, "at least {d}", .{lo});
|
|
3367
|
+
} else if (0 == hi) {
|
|
3368
|
+
desc = "none";
|
|
3369
|
+
} else if (cmin == null) {
|
|
3370
|
+
desc = try std.fmt.allocPrint(allocator, "at most {d}", .{hi});
|
|
3371
|
+
} else if (lo == hi) {
|
|
3372
|
+
desc = try std.fmt.allocPrint(allocator, "exactly {d}", .{lo});
|
|
3373
|
+
} else {
|
|
3374
|
+
desc = try std.fmt.allocPrint(allocator, "{d} to {d}", .{ lo, hi });
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3377
|
+
return .{ .lo = lo, .hi = hi, .desc = desc };
|
|
3378
|
+
}
|
|
3379
|
+
|
|
3380
|
+
// Names a validate spec may use besides its checkers: transform's that it
|
|
3381
|
+
// keeps, and $OPEN.
|
|
3382
|
+
const VALIDATE_NAMES = [_][]const u8{
|
|
3383
|
+
"$TOP",
|
|
3384
|
+
"$SPEC",
|
|
3385
|
+
"$BT",
|
|
3386
|
+
"$DS",
|
|
3387
|
+
"$WHEN",
|
|
3388
|
+
"$ANNO",
|
|
3389
|
+
"$REF",
|
|
3390
|
+
"$FORMAT",
|
|
3391
|
+
"$APPLY",
|
|
3392
|
+
"$OPEN",
|
|
3393
|
+
};
|
|
3394
|
+
|
|
3395
|
+
// The checkers dispatchCmd runs in validate mode, and the error list.
|
|
3396
|
+
const VALIDATE_CHECKERS = [_][]const u8{
|
|
3397
|
+
"$STRING",
|
|
3398
|
+
"$NUMBER",
|
|
3399
|
+
"$INTEGER",
|
|
3400
|
+
"$DECIMAL",
|
|
3401
|
+
"$BOOLEAN",
|
|
3402
|
+
"$NULL",
|
|
3403
|
+
"$NIL",
|
|
3404
|
+
"$MAP",
|
|
3405
|
+
"$LIST",
|
|
3406
|
+
"$FUNCTION",
|
|
3407
|
+
"$INSTANCE",
|
|
3408
|
+
"$ANY",
|
|
3409
|
+
"$CHILD",
|
|
3410
|
+
"$EXACT",
|
|
3411
|
+
"$NOF",
|
|
3412
|
+
"$ALL",
|
|
3413
|
+
"$LEN",
|
|
3414
|
+
"$RANGE",
|
|
3415
|
+
"$LIKE",
|
|
3416
|
+
"$REST",
|
|
3417
|
+
S_DERRS,
|
|
3418
|
+
};
|
|
3419
|
+
|
|
3420
|
+
// The query operators select adds to the checkers.
|
|
3421
|
+
const SELECT_NAMES = [_][]const u8{
|
|
3422
|
+
"$AND",
|
|
3423
|
+
"$OR",
|
|
3424
|
+
"$NOT",
|
|
3425
|
+
"$GT",
|
|
3426
|
+
"$LT",
|
|
3427
|
+
"$GTE",
|
|
3428
|
+
"$LTE",
|
|
3429
|
+
"$LIKE",
|
|
3430
|
+
};
|
|
3431
|
+
|
|
3432
|
+
// Report each checker the spec names that validate lacks, and each misplaced
|
|
3433
|
+
// $REST; $EXACT's arguments are literals. Last: spec is a list's last item.
|
|
3434
|
+
fn checknames(
|
|
3435
|
+
allocator: Allocator,
|
|
3436
|
+
spec: JsonValue,
|
|
3437
|
+
path: []const []const u8,
|
|
3438
|
+
errs: *std.array_list.Managed([]const u8),
|
|
3439
|
+
extra: []const []const u8,
|
|
3440
|
+
last: bool,
|
|
3441
|
+
) anyerror!void {
|
|
3442
|
+
if (refname(spec)) |name| {
|
|
3443
|
+
if (try unknownname(allocator, name, extra)) {
|
|
3444
|
+
try errs.append(try std.fmt.allocPrint(
|
|
3445
|
+
allocator,
|
|
3446
|
+
"Unknown validator {s} at field {s}.",
|
|
3447
|
+
.{ name, try pathifySlice(allocator, path) },
|
|
3448
|
+
));
|
|
3449
|
+
} else if (std.mem.eql(u8, name, "$REST")) {
|
|
3450
|
+
try errs.append(try restmsg(allocator, path, " must be the last element of an array."));
|
|
3451
|
+
}
|
|
3452
|
+
return;
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
const restkey = "`$REST`";
|
|
3456
|
+
switch (spec) {
|
|
3457
|
+
.array => |arr| {
|
|
3458
|
+
const elems = arr.data.items;
|
|
3459
|
+
if (0 < elems.len) {
|
|
3460
|
+
if (refname(elems[0])) |first| {
|
|
3461
|
+
if (std.mem.eql(u8, first, "$EXACT")) return;
|
|
3462
|
+
if (std.mem.eql(u8, first, "$REST")) {
|
|
3463
|
+
if (!last) {
|
|
3464
|
+
try errs.append(try restmsg(allocator, path, " must be the last element of an array."));
|
|
3465
|
+
} else if (2 != elems.len) {
|
|
3466
|
+
try errs.append(try restmsg(allocator, path, " must have exactly one spec."));
|
|
3467
|
+
}
|
|
3468
|
+
const rest: JsonValue = if (1 < elems.len) elems[1] else .null;
|
|
3469
|
+
try checknames(allocator, rest, try appendSlice(allocator, []const u8, path, "1"), errs, extra, false);
|
|
3470
|
+
return;
|
|
3471
|
+
}
|
|
3472
|
+
}
|
|
3473
|
+
}
|
|
3474
|
+
for (elems, 0..) |elem, i| {
|
|
3475
|
+
const key = try std.fmt.allocPrint(allocator, "{d}", .{i});
|
|
3476
|
+
try checknames(allocator, elem, try appendSlice(allocator, []const u8, path, key), errs, extra, i + 1 == elems.len);
|
|
3477
|
+
}
|
|
3478
|
+
},
|
|
3479
|
+
.object => |obj| {
|
|
3480
|
+
if (obj.get(restkey) != null and obj.get("`$CHILD`") != null) {
|
|
3481
|
+
try errs.append(try restmsg(allocator, path, " cannot be used with $CHILD."));
|
|
3482
|
+
}
|
|
3483
|
+
const keys = try keysof(allocator, spec);
|
|
3484
|
+
for (keys.array.data.items) |k| {
|
|
3485
|
+
if (!std.mem.eql(u8, k.string, restkey)) try checknames(allocator, k, path, errs, extra, false);
|
|
3486
|
+
const child = obj.get(k.string) orelse .null;
|
|
3487
|
+
try checknames(allocator, child, try appendSlice(allocator, []const u8, path, k.string), errs, extra, false);
|
|
3488
|
+
}
|
|
3489
|
+
},
|
|
3490
|
+
else => {},
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
|
|
3494
|
+
fn restmsg(allocator: Allocator, path: []const []const u8, problem: []const u8) anyerror![]const u8 {
|
|
3495
|
+
return try std.fmt.allocPrint(allocator, "The $REST validator at field {s}{s}", .{ try pathifySlice(allocator, path), problem });
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3498
|
+
// The name a whole-string reference gives, when it is a checker name in any case.
|
|
3499
|
+
fn refname(val: JsonValue) ?[]const u8 {
|
|
3500
|
+
if (val != .string) return null;
|
|
3501
|
+
const s = val.string;
|
|
3502
|
+
if (s.len < 2 or s[0] != '`' or s[s.len - 1] != '`') return null;
|
|
3503
|
+
const inner = s[1 .. s.len - 1];
|
|
3504
|
+
if (std.mem.indexOfScalar(u8, inner, '`') != null) return null;
|
|
3505
|
+
|
|
3506
|
+
// As R_INJECTION_FULL captures it: a $ and capitals before any digits,
|
|
3507
|
+
// else the whole reference.
|
|
3508
|
+
var name = inner;
|
|
3509
|
+
if (1 < inner.len and inner[0] == '$') {
|
|
3510
|
+
var j: usize = 1;
|
|
3511
|
+
while (j < inner.len and 'A' <= inner[j] and inner[j] <= 'Z') : (j += 1) {}
|
|
3512
|
+
var k = j;
|
|
3513
|
+
while (k < inner.len and '0' <= inner[k] and inner[k] <= '9') : (k += 1) {}
|
|
3514
|
+
if (1 < j and k == inner.len) name = inner[0..j];
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
// R_CHECKER_NAME, upper-cased.
|
|
3518
|
+
if (name.len < 2 or name[0] != '$') return null;
|
|
3519
|
+
for (name[1..]) |c| {
|
|
3520
|
+
const up = std.ascii.toUpper(c);
|
|
3521
|
+
if (up < 'A' or 'Z' < up) return null;
|
|
3522
|
+
}
|
|
3523
|
+
return name;
|
|
3524
|
+
}
|
|
3525
|
+
|
|
3526
|
+
// Unknown: undefined and upper case, or a defined name in another case.
|
|
3527
|
+
fn unknownname(allocator: Allocator, name: []const u8, extra: []const []const u8) anyerror!bool {
|
|
3528
|
+
const upper = try allocator.alloc(u8, name.len);
|
|
3529
|
+
for (name, 0..) |c, i| upper[i] = std.ascii.toUpper(c);
|
|
3530
|
+
return !isknown(name, extra) and (std.mem.eql(u8, upper, name) or isknown(upper, extra));
|
|
3531
|
+
}
|
|
3532
|
+
|
|
3533
|
+
fn isknown(name: []const u8, extra: []const []const u8) bool {
|
|
3534
|
+
for (VALIDATE_NAMES) |n| {
|
|
3535
|
+
if (std.mem.eql(u8, n, name)) return true;
|
|
3536
|
+
}
|
|
3537
|
+
for (VALIDATE_CHECKERS) |n| {
|
|
3538
|
+
if (std.mem.eql(u8, n, name)) return true;
|
|
3539
|
+
}
|
|
3540
|
+
for (extra) |n| {
|
|
3541
|
+
if (std.mem.eql(u8, n, name)) return true;
|
|
3542
|
+
}
|
|
3543
|
+
return false;
|
|
3544
|
+
}
|
|
3545
|
+
|
|
3546
|
+
fn cmdValidateChildCmd(allocator: Allocator, inj: *Injection, store: JsonValue) anyerror!JsonValue {
|
|
3547
|
+
_ = store;
|
|
3548
|
+
if (inj.mode == M_KEYPRE and inj.parent == .object) {
|
|
3549
|
+
// Map mode: expand $CHILD for each key in the data.
|
|
3550
|
+
const child = getprop(allocator, inj.parent, JsonValue{ .string = inj.key }, .null) catch .null;
|
|
3551
|
+
const pkey = if (inj.path.len >= 2) inj.path[inj.path.len - 2] else S_DTOP;
|
|
3552
|
+
const tval = getprop(allocator, inj.dparent, JsonValue{ .string = pkey }, .null) catch .null;
|
|
3553
|
+
|
|
3554
|
+
// validationModify reports a mismatch, once.
|
|
3555
|
+
if (tval != .null and tval != .object) return .null;
|
|
3556
|
+
|
|
3557
|
+
if (tval == .object) {
|
|
3558
|
+
// For each key in data, clone the child spec into the parent.
|
|
3559
|
+
const ckeys = try keysof(allocator, tval);
|
|
3560
|
+
if (ckeys == .array) {
|
|
3561
|
+
for (ckeys.array.data.items) |ck| {
|
|
3562
|
+
if (ck == .string) {
|
|
3563
|
+
try inj.parent.object.put(ck.string, try clone(allocator, child));
|
|
3564
|
+
// Append to keys for further processing.
|
|
3565
|
+
inj.keys = appendSlice(allocator, []const u8, inj.keys, ck.string) catch inj.keys;
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
}
|
|
3569
|
+
}
|
|
3570
|
+
|
|
3571
|
+
// Remove the $CHILD key.
|
|
3572
|
+
_ = inj.parent.object.fetchOrderedRemove(inj.key);
|
|
3573
|
+
return .null;
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3576
|
+
if (inj.mode == M_VAL and inj.parent == .array) {
|
|
3577
|
+
// List mode: [$CHILD, template] — expand for each element.
|
|
3578
|
+
if (inj.parent.array.data.items.len < 2) return .null;
|
|
3579
|
+
const child = inj.parent.array.data.items[1];
|
|
3580
|
+
const dparent_val = inj.dparent;
|
|
3581
|
+
|
|
3582
|
+
if (dparent_val == .null) {
|
|
3583
|
+
inj.parent.array.data.items.len = 0;
|
|
3584
|
+
return .null;
|
|
3585
|
+
}
|
|
3586
|
+
|
|
3587
|
+
// validationModify reports the mismatch; the loop stops past the list.
|
|
3588
|
+
if (dparent_val != .array) {
|
|
3589
|
+
inj.key_i = inj.parent.array.data.items.len;
|
|
3590
|
+
return dparent_val;
|
|
3591
|
+
}
|
|
3592
|
+
|
|
3593
|
+
const dlen = dparent_val.array.data.items.len;
|
|
3594
|
+
inj.parent.array.data.items.len = 0;
|
|
3595
|
+
var li: usize = 0;
|
|
3596
|
+
while (li < dlen) : (li += 1) {
|
|
3597
|
+
try inj.parent.array.append(try clone(allocator, child));
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3600
|
+
// NOTE: modifying inj! This extends the child value loop in inject
|
|
3601
|
+
// to cover every cloned child.
|
|
3602
|
+
var ckey_i: usize = inj.keys.len;
|
|
3603
|
+
while (ckey_i < inj.parent.array.data.items.len) : (ckey_i += 1) {
|
|
3604
|
+
const ckey = try strkey(allocator, JsonValue{ .integer = @intCast(ckey_i) });
|
|
3605
|
+
inj.keys = appendSlice(allocator, []const u8, inj.keys, ckey) catch inj.keys;
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3608
|
+
// Restart the child value loop at the first element (the loop
|
|
3609
|
+
// increments its signed nkI counter on resume) so that the first
|
|
3610
|
+
// element is also validated against the child template. key_i is
|
|
3611
|
+
// usize: max-usize bit-casts to -1 in inject's nkI — the same wrap
|
|
3612
|
+
// idiom cmdRef already relies on.
|
|
3613
|
+
inj.key_i = std.math.maxInt(usize);
|
|
3614
|
+
|
|
3615
|
+
// Suppress setval (and modify) so the cloned child template stays
|
|
3616
|
+
// in place at the first element for the resumed loop to validate.
|
|
3617
|
+
// This is the zig spelling of the canonical `return SKIP`.
|
|
3618
|
+
inj.skip = true;
|
|
3619
|
+
return .null;
|
|
3620
|
+
}
|
|
3621
|
+
|
|
3622
|
+
return .null;
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3625
|
+
// The members a spec does not name: the map form is a key, the list form a
|
|
3626
|
+
// tuple's last item. Each places clones of its spec for the loop to check.
|
|
3627
|
+
fn cmdValidateRest(allocator: Allocator, inj: *Injection) anyerror!JsonValue {
|
|
3628
|
+
if (inj.mode == M_KEYPRE) {
|
|
3629
|
+
const resttm = lookupLiteral(inj.parent, inj.key) orelse .null;
|
|
3630
|
+
const pkey = if (inj.path.len >= 2) inj.path[inj.path.len - 2] else S_DTOP;
|
|
3631
|
+
const tval = getprop(allocator, inj.dparent, JsonValue{ .string = pkey }, .null) catch .null;
|
|
3632
|
+
|
|
3633
|
+
if (tval == .object) {
|
|
3634
|
+
const ckeys = try keysof(allocator, tval);
|
|
3635
|
+
for (ckeys.array.data.items) |ck| {
|
|
3636
|
+
const named = for (inj.keys) |k| {
|
|
3637
|
+
if (std.mem.eql(u8, k, ck.string)) break true;
|
|
3638
|
+
} else false;
|
|
3639
|
+
if (!named) {
|
|
3640
|
+
_ = try setprop(allocator, inj.parent, ck, try clone(allocator, resttm));
|
|
3641
|
+
inj.keys = try appendSlice(allocator, []const u8, inj.keys, ck.string);
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
|
|
3646
|
+
_ = try inj.setval(.null, 0);
|
|
3647
|
+
return .null;
|
|
3648
|
+
}
|
|
3649
|
+
|
|
3650
|
+
const prior = inj.prior;
|
|
3651
|
+
if (inj.mode != M_VAL or prior == null or prior.?.parent != .array or inj.key_i != 0) {
|
|
3652
|
+
try inj.errs.append(try restmsg(allocator, pathrange(inj.path, 1, 0), " must be the last element of an array."));
|
|
3653
|
+
return .null;
|
|
3654
|
+
}
|
|
3655
|
+
const p = prior.?;
|
|
3656
|
+
|
|
3657
|
+
inj.key_i = inj.keys.len;
|
|
3658
|
+
p.modify = null;
|
|
3659
|
+
|
|
3660
|
+
const tuple = p.parent;
|
|
3661
|
+
const slot = listIndex(JsonValue{ .string = p.key }) orelse 0;
|
|
3662
|
+
const numitems: usize = if (p.dparent == .array) p.dparent.array.data.items.len else 0;
|
|
3663
|
+
|
|
3664
|
+
// The zig spelling of the canonical `return SKIP`, on both paths below.
|
|
3665
|
+
inj.skip = true;
|
|
3666
|
+
if (numitems <= slot) {
|
|
3667
|
+
_ = try inj.setval(.null, 2);
|
|
3668
|
+
return .null;
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3671
|
+
const restlist = inj.parent;
|
|
3672
|
+
const resttm: JsonValue = if (restlist == .array and 1 < restlist.array.data.items.len) restlist.array.data.items[1] else .null;
|
|
3673
|
+
var i = slot;
|
|
3674
|
+
while (i < numitems) : (i += 1) {
|
|
3675
|
+
_ = try setprop(allocator, tuple, JsonValue{ .integer = @intCast(i) }, try clone(allocator, resttm));
|
|
3676
|
+
}
|
|
3677
|
+
i = p.keys.len;
|
|
3678
|
+
while (i < numitems) : (i += 1) {
|
|
3679
|
+
p.keys = try appendSlice(allocator, []const u8, p.keys, try strkey(allocator, JsonValue{ .integer = @intCast(i) }));
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
p.key_i = p.key_i -% 1;
|
|
3683
|
+
return .null;
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
// ============================================================================
|
|
3687
|
+
// $FORMAT — apply a named formatter to a child value.
|
|
3688
|
+
// Format: ["`$FORMAT`", "name", child]
|
|
3689
|
+
// ============================================================================
|
|
3690
|
+
|
|
3691
|
+
fn cmdFormat(allocator: Allocator, inj: *Injection, store: JsonValue) !JsonValue {
|
|
3692
|
+
if (inj.mode != M_VAL) return .null;
|
|
3693
|
+
if (inj.keys.len > 1) inj.keys = inj.keys[0..1];
|
|
3694
|
+
|
|
3695
|
+
if (inj.parent != .array or inj.parent.array.data.items.len < 3) return .null;
|
|
3696
|
+
const name_val = inj.parent.array.data.items[1];
|
|
3697
|
+
const child_raw = inj.parent.array.data.items[2];
|
|
3698
|
+
|
|
3699
|
+
const name = if (name_val == .string) name_val.string else "";
|
|
3700
|
+
|
|
3701
|
+
// Inject the child value first (resolve $COPY etc).
|
|
3702
|
+
const child = try injectChild(allocator, child_raw, store, inj);
|
|
3703
|
+
|
|
3704
|
+
// Find target node and key.
|
|
3705
|
+
const tkey = if (inj.path.len >= 2) inj.path[inj.path.len - 2] else S_DTOP;
|
|
3706
|
+
const target = if (inj.nodes.len >= 2)
|
|
3707
|
+
inj.nodes[inj.nodes.len - 2]
|
|
3708
|
+
else if (inj.nodes.len > 0)
|
|
3709
|
+
inj.nodes[inj.nodes.len - 1]
|
|
3710
|
+
else
|
|
3711
|
+
JsonValue{ .null = {} };
|
|
3712
|
+
|
|
3713
|
+
const out = try applyFormat(allocator, name, child, inj.errs);
|
|
3714
|
+
if (out == .null and !std.mem.eql(u8, name, "identity")) {
|
|
3715
|
+
// Unknown format or error → delete from target.
|
|
3716
|
+
if (target != .null) _ = delprop(allocator, target, JsonValue{ .string = tkey }) catch {};
|
|
3717
|
+
return .null;
|
|
3718
|
+
}
|
|
3719
|
+
|
|
3720
|
+
if (target != .null) _ = setprop(allocator, target, JsonValue{ .string = tkey }, out) catch {};
|
|
3721
|
+
return out;
|
|
3722
|
+
}
|
|
3723
|
+
|
|
3724
|
+
fn applyFormat(allocator: Allocator, name: []const u8, val: JsonValue, errs: *std.array_list.Managed([]const u8)) !JsonValue {
|
|
3725
|
+
if (std.mem.eql(u8, name, "upper")) return try walkFormat(allocator, val, fmtUpper);
|
|
3726
|
+
if (std.mem.eql(u8, name, "lower")) return try walkFormat(allocator, val, fmtLower);
|
|
3727
|
+
if (std.mem.eql(u8, name, "string")) return try walkFormat(allocator, val, fmtString);
|
|
3728
|
+
if (std.mem.eql(u8, name, "number")) return try walkFormat(allocator, val, fmtNumber);
|
|
3729
|
+
if (std.mem.eql(u8, name, "integer")) return try walkFormat(allocator, val, fmtInteger);
|
|
3730
|
+
if (std.mem.eql(u8, name, "identity")) return val;
|
|
3731
|
+
if (std.mem.eql(u8, name, "concat")) {
|
|
3732
|
+
if (val == .array) {
|
|
3733
|
+
var buf = std.array_list.Managed(u8).init(allocator);
|
|
3734
|
+
for (val.array.data.items) |item| {
|
|
3735
|
+
if (isnode(item)) continue;
|
|
3736
|
+
try buf.appendSlice(try fmtStr(allocator, item));
|
|
3737
|
+
}
|
|
3738
|
+
return JsonValue{ .string = buf.items };
|
|
3739
|
+
}
|
|
3740
|
+
return val;
|
|
3741
|
+
}
|
|
3742
|
+
const msg = try std.fmt.allocPrint(allocator, "$FORMAT: unknown format: {s}.", .{name});
|
|
3743
|
+
try errs.append(msg);
|
|
3744
|
+
return .null;
|
|
3745
|
+
}
|
|
3746
|
+
|
|
3747
|
+
const FormatFn = *const fn (Allocator, JsonValue) anyerror!JsonValue;
|
|
3748
|
+
|
|
3749
|
+
fn walkFormat(allocator: Allocator, val: JsonValue, fmt_fn: FormatFn) !JsonValue {
|
|
3750
|
+
if (val == .object) {
|
|
3026
3751
|
const new_obj = try allocator.create(MapRef);
|
|
3027
3752
|
new_obj.* = .{ .data = .empty, .allocator = allocator };
|
|
3028
3753
|
var it = val.object.iterator();
|
|
@@ -3419,6 +4144,15 @@ fn scanForRef(val: JsonValue, found: *bool) void {
|
|
|
3419
4144
|
}
|
|
3420
4145
|
}
|
|
3421
4146
|
|
|
4147
|
+
// Element 1 of a list whose element 0 is head, when val is one: the path of
|
|
4148
|
+
// a $REF list, the spec of a $REST list.
|
|
4149
|
+
fn headarg(val: JsonValue, head: []const u8) ?JsonValue {
|
|
4150
|
+
if (val != .array) return null;
|
|
4151
|
+
const elems = val.array.data.items;
|
|
4152
|
+
if (0 == elems.len or elems[0] != .string or !std.mem.eql(u8, elems[0].string, head)) return null;
|
|
4153
|
+
return if (1 < elems.len) elems[1] else JsonValue{ .null = {} };
|
|
4154
|
+
}
|
|
4155
|
+
|
|
3422
4156
|
fn cmdRef(allocator: Allocator, inj: *Injection, store: JsonValue) !JsonValue {
|
|
3423
4157
|
if (inj.mode != M_VAL) return .null;
|
|
3424
4158
|
|
|
@@ -3434,110 +4168,74 @@ fn cmdRef(allocator: Allocator, inj: *Injection, store: JsonValue) !JsonValue {
|
|
|
3434
4168
|
const spec_val = if (store == .object) store.object.get(S_DSPEC) orelse .null else .null;
|
|
3435
4169
|
if (spec_val == .null) return .null;
|
|
3436
4170
|
|
|
4171
|
+
// A relative path starts at the node holding this slot, so .x is a sibling.
|
|
4172
|
+
const dpath = try allocator.dupe([]const u8, pathrange(inj.path, 1, 2));
|
|
4173
|
+
const dpath_val = try JsonValue.makeList(allocator);
|
|
4174
|
+
for (dpath) |part| try dpath_val.array.append(JsonValue{ .string = part });
|
|
4175
|
+
const ref_inj = try allocator.create(Injection);
|
|
4176
|
+
ref_inj.* = Injection{
|
|
4177
|
+
.allocator = allocator,
|
|
4178
|
+
.base = S_MT,
|
|
4179
|
+
.dparent = try getpath(allocator, dpath_val, spec_val),
|
|
4180
|
+
.keys = try allocator.alloc([]const u8, 0),
|
|
4181
|
+
.path = try allocator.alloc([]const u8, 0),
|
|
4182
|
+
.nodes = try allocator.alloc(JsonValue, 0),
|
|
4183
|
+
.dpath = dpath,
|
|
4184
|
+
.errs = inj.errs,
|
|
4185
|
+
};
|
|
4186
|
+
|
|
3437
4187
|
// Resolve the ref path within the spec.
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
4188
|
+
var ref_result = try getpathInj(allocator, JsonValue{ .string = refpath }, spec_val, ref_inj);
|
|
4189
|
+
|
|
4190
|
+
// A chain of references that comes back to a path it has named names nothing.
|
|
4191
|
+
var seen = std.array_list.Managed(JsonValue).init(allocator);
|
|
4192
|
+
try seen.append(refpath_val);
|
|
4193
|
+
var next = ref_result;
|
|
4194
|
+
while (headarg(next, "`$REF`")) |nextpath| {
|
|
4195
|
+
const looped = for (seen.items) |p| {
|
|
4196
|
+
if (deepequal(p, nextpath)) break true;
|
|
4197
|
+
} else false;
|
|
4198
|
+
if (looped) {
|
|
4199
|
+
ref_result = .null;
|
|
4200
|
+
break;
|
|
4201
|
+
}
|
|
4202
|
+
try seen.append(nextpath);
|
|
4203
|
+
next = try getpathInj(allocator, nextpath, spec_val, ref_inj);
|
|
3445
4204
|
}
|
|
3446
4205
|
|
|
3447
|
-
// Cycle break: if the resolved spec contains another `$REF` literal AND
|
|
3448
|
-
// there is no current data at the target slot, do NOT inject. This is the
|
|
3449
|
-
// self-recursive-ref case (e.g. spec {z:{y:["$REF","z"]}} with data {}).
|
|
3450
|
-
// Other ports do the same check; without it the inject loop recurses
|
|
3451
|
-
// infinitely into the same clone and the test process stack-overflows
|
|
3452
|
-
// (manifests as a SIGSEGV during the transform-ref test).
|
|
3453
4206
|
var has_sub_ref = false;
|
|
3454
4207
|
if (isnode(ref_result)) scanForRef(ref_result, &has_sub_ref);
|
|
3455
4208
|
|
|
3456
|
-
//
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
// Compute paths following Go: tpath = path[:-1], cpath = path[:-3]
|
|
4209
|
+
// A recursive reference stops where the data does. getpath reads $TOP
|
|
4210
|
+
// itself, so the slot's path drops its leading "$TOP".
|
|
3460
4211
|
const tpath = if (inj.path.len > 0) inj.path[0 .. inj.path.len - 1] else inj.path;
|
|
3461
|
-
const cpath = if (inj.path.len > 3) inj.path[0 .. inj.path.len - 3] else &[_][]const u8{};
|
|
3462
|
-
|
|
3463
|
-
// Resolve data at these paths.
|
|
3464
|
-
const tcur = if (cpath.len > 0) blk: {
|
|
3465
|
-
var joined = std.array_list.Managed(u8).init(allocator);
|
|
3466
|
-
for (cpath, 0..) |p, pi| {
|
|
3467
|
-
if (pi > 0) try joined.append('.');
|
|
3468
|
-
try joined.appendSlice(p);
|
|
3469
|
-
}
|
|
3470
|
-
break :blk try getpath(allocator, JsonValue{ .string = joined.items }, store);
|
|
3471
|
-
} else store;
|
|
3472
|
-
|
|
3473
|
-
// Build child injection with proper context.
|
|
3474
|
-
const lastPath = if (tpath.len > 0) tpath[tpath.len - 1] else S_DTOP;
|
|
3475
|
-
const tinj = try allocator.create(Injection);
|
|
3476
|
-
const tinj_nodes_src = if (inj.nodes.len > 1) inj.nodes[0 .. inj.nodes.len - 1] else inj.nodes[0..0];
|
|
3477
|
-
const tinj_nodes = try allocator.alloc(JsonValue, tinj_nodes_src.len);
|
|
3478
|
-
@memcpy(tinj_nodes, tinj_nodes_src);
|
|
3479
|
-
const tinj_dpath = try allocator.alloc([]const u8, cpath.len);
|
|
3480
|
-
@memcpy(tinj_dpath, cpath);
|
|
3481
|
-
tinj.* = Injection{
|
|
3482
|
-
.allocator = allocator,
|
|
3483
|
-
.mode = M_VAL,
|
|
3484
|
-
.key = lastPath,
|
|
3485
|
-
.val = tref,
|
|
3486
|
-
.parent = if (inj.nodes.len >= 2) inj.nodes[inj.nodes.len - 2] else .null,
|
|
3487
|
-
.base = inj.base,
|
|
3488
|
-
.dparent = tcur,
|
|
3489
|
-
.keys = try allocator.alloc([]const u8, 1),
|
|
3490
|
-
.path = tpath,
|
|
3491
|
-
.nodes = tinj_nodes,
|
|
3492
|
-
.dpath = tinj_dpath,
|
|
3493
|
-
.meta = inj.meta,
|
|
3494
|
-
.errs = inj.errs,
|
|
3495
|
-
};
|
|
3496
|
-
tinj.keys[0] = lastPath;
|
|
3497
|
-
|
|
3498
|
-
// Cycle break (matches the Rust / JS / Py / Go ports): if the resolved
|
|
3499
|
-
// ref contains another `$REF` literal AND there is no current data at
|
|
3500
|
-
// the target path, skip injection. Otherwise inject the cloned ref.
|
|
3501
|
-
//
|
|
3502
|
-
// Zig's getpath auto-unwraps store.$TOP, so an absolute path like
|
|
3503
|
-
// ["$TOP", "z", "p"] would re-traverse "$TOP" inside the data and hit
|
|
3504
|
-
// a dead end. Strip the leading "$TOP" before joining.
|
|
3505
4212
|
const tpath_strip: []const []const u8 = if (tpath.len > 0 and std.mem.eql(u8, tpath[0], S_DTOP))
|
|
3506
4213
|
tpath[1..]
|
|
3507
4214
|
else
|
|
3508
4215
|
tpath;
|
|
3509
|
-
const
|
|
3510
|
-
if (tpath_strip.len == 0) break :
|
|
4216
|
+
const tval: JsonValue = blk: {
|
|
4217
|
+
if (tpath_strip.len == 0) break :blk store;
|
|
3511
4218
|
var joined = std.array_list.Managed(u8).init(allocator);
|
|
3512
4219
|
for (tpath_strip, 0..) |p, pi| {
|
|
3513
|
-
if (pi > 0) joined.append('.') catch break :
|
|
3514
|
-
joined.appendSlice(p) catch break :
|
|
4220
|
+
if (pi > 0) joined.append('.') catch break :blk .null;
|
|
4221
|
+
joined.appendSlice(p) catch break :blk .null;
|
|
3515
4222
|
}
|
|
3516
|
-
break :
|
|
3517
|
-
};
|
|
3518
|
-
const skip_for_cycle = has_sub_ref and tval_at == .null;
|
|
3519
|
-
const rval: JsonValue = if (skip_for_cycle) .null else blk: {
|
|
3520
|
-
_ = try inject(allocator, tref, store, tinj);
|
|
3521
|
-
break :blk tinj.val;
|
|
4223
|
+
break :blk getpath(allocator, JsonValue{ .string = joined.items }, store) catch .null;
|
|
3522
4224
|
};
|
|
4225
|
+
const rval: JsonValue = if (!has_sub_ref or tval != .null) try clone(allocator, ref_result) else .null;
|
|
3523
4226
|
|
|
3524
|
-
//
|
|
3525
|
-
|
|
4227
|
+
// The enclosing loop injects the referenced spec in this list's place, so
|
|
4228
|
+
// neither this pass nor this element leaves a value for modify to check.
|
|
4229
|
+
const grandparent = try inj.setval(rval, 2);
|
|
3526
4230
|
|
|
3527
|
-
// Adjust prior key index if grandparent is a list. Wrap on underflow:
|
|
3528
|
-
// setval(rval, 2) above just shrunk the grandparent list at path[-2], so
|
|
3529
|
-
// the caller's loop variable needs to step back one slot to re-visit the
|
|
3530
|
-
// index that the shift moved into the current position. The TS / JS / Py
|
|
3531
|
-
// / Go / Rust ports do `prior.keyI--` on a signed counter; here key_i is
|
|
3532
|
-
// usize, so we wrap with -%= 1 — the consumer loop bit-casts back through
|
|
3533
|
-
// isize so 0 -% 1 reads as -1 and `+ 1` lands back on the same index.
|
|
3534
4231
|
if (inj.prior) |prior| {
|
|
3535
|
-
|
|
3536
|
-
if (islist(
|
|
4232
|
+
prior.modify = null;
|
|
4233
|
+
if (islist(grandparent) or rval != .null) {
|
|
3537
4234
|
prior.key_i = prior.key_i -% 1;
|
|
3538
4235
|
}
|
|
3539
4236
|
}
|
|
3540
4237
|
|
|
4238
|
+
inj.skip = true;
|
|
3541
4239
|
return .null;
|
|
3542
4240
|
}
|
|
3543
4241
|
|
|
@@ -3814,14 +4512,20 @@ pub fn validate(allocator: Allocator, data: JsonValue, spec: JsonValue) anyerror
|
|
|
3814
4512
|
}
|
|
3815
4513
|
|
|
3816
4514
|
pub fn validateWith(allocator: Allocator, data: JsonValue, spec: JsonValue, injdef: JsonValue) anyerror!ValidateResult {
|
|
4515
|
+
return validateValue(allocator, data, spec, injdef);
|
|
4516
|
+
}
|
|
4517
|
+
|
|
4518
|
+
// validateWith over a value that may be absent. A missing value leaves $TOP
|
|
4519
|
+
// out of the store, so the checkers at the root find no value.
|
|
4520
|
+
fn validateValue(allocator: Allocator, data: ?JsonValue, spec: JsonValue, injdef: JsonValue) anyerror!ValidateResult {
|
|
3817
4521
|
const spec_clone = try clone(allocator, spec);
|
|
3818
|
-
const data_clone = if (data
|
|
4522
|
+
const data_clone: ?JsonValue = if (data) |d| try clone(allocator, d) else null;
|
|
3819
4523
|
const orig_spec = try clone(allocator, spec);
|
|
3820
4524
|
|
|
3821
4525
|
// Build store with data and spec.
|
|
3822
4526
|
const store = try allocator.create(MapRef);
|
|
3823
4527
|
store.* = .{ .data = .empty, .allocator = allocator };
|
|
3824
|
-
try store.put(S_DTOP,
|
|
4528
|
+
if (data_clone) |d| try store.put(S_DTOP, d);
|
|
3825
4529
|
try store.put(S_DSPEC, orig_spec);
|
|
3826
4530
|
const store_val = JsonValue{ .object = store };
|
|
3827
4531
|
|
|
@@ -3851,7 +4555,9 @@ pub fn validateWith(allocator: Allocator, data: JsonValue, spec: JsonValue, injd
|
|
|
3851
4555
|
}
|
|
3852
4556
|
}
|
|
3853
4557
|
|
|
3854
|
-
|
|
4558
|
+
// A spec that names an unknown checker validates nothing.
|
|
4559
|
+
try checknames(allocator, spec, &[_][]const u8{}, errs, &[_][]const u8{}, false);
|
|
4560
|
+
const result = if (0 < errs.items.len) try clone(allocator, data orelse .null) else try inject(allocator, spec_clone, store_val, inj_init);
|
|
3855
4561
|
|
|
3856
4562
|
if (errs.items.len > 0) {
|
|
3857
4563
|
// Canonical is `throw new Error(join(errs, ' | '))` - the collected
|
|
@@ -3870,12 +4576,11 @@ pub fn validateWith(allocator: Allocator, data: JsonValue, spec: JsonValue, injd
|
|
|
3870
4576
|
|
|
3871
4577
|
// Validation modify callback — runs after each injection step.
|
|
3872
4578
|
// Matches TS's makeValidation(false) behavior.
|
|
3873
|
-
fn validationModify(allocator: Allocator,
|
|
4579
|
+
fn validationModify(allocator: Allocator, pval: JsonValue, key: []const u8, parent: JsonValue, inj: *Injection, _: JsonValue) void {
|
|
3874
4580
|
// Get the actual data value at this path.
|
|
3875
4581
|
const cval = getprop(allocator, inj.dparent, JsonValue{ .string = key }, .null) catch .null;
|
|
3876
4582
|
if (cval == .null and !inj.exact_mode) return;
|
|
3877
4583
|
|
|
3878
|
-
const pval = getprop(allocator, parent, JsonValue{ .string = key }, .null) catch .null;
|
|
3879
4584
|
const ptype = typify(pval);
|
|
3880
4585
|
|
|
3881
4586
|
// Skip remaining $ command strings.
|
|
@@ -3894,9 +4599,9 @@ fn validationModify(allocator: Allocator, _: JsonValue, key: []const u8, parent:
|
|
|
3894
4599
|
if (ismap(cval)) {
|
|
3895
4600
|
if (!ismap(pval)) return;
|
|
3896
4601
|
|
|
3897
|
-
//
|
|
4602
|
+
// Only a spec written as {} is open, even if named keys resolved away.
|
|
3898
4603
|
const pkeys = keysof(allocator, pval) catch return;
|
|
3899
|
-
if (pkeys == .array and pkeys.array.data.items.len > 0) {
|
|
4604
|
+
if (inj.named or (pkeys == .array and pkeys.array.data.items.len > 0)) {
|
|
3900
4605
|
// Check for $OPEN flag.
|
|
3901
4606
|
if (pval == .object) {
|
|
3902
4607
|
if (pval.object.get(S_BOPEN)) |ov| {
|
|
@@ -3943,6 +4648,33 @@ fn validationModify(allocator: Allocator, _: JsonValue, key: []const u8, parent:
|
|
|
3943
4648
|
// returns) sees the data.
|
|
3944
4649
|
mergeIntoMap(pval, cval) catch {};
|
|
3945
4650
|
}
|
|
4651
|
+
} else if (islist(cval)) {
|
|
4652
|
+
if (!islist(pval)) return;
|
|
4653
|
+
|
|
4654
|
+
const plen = pval.array.data.items.len;
|
|
4655
|
+
if (0 < plen) {
|
|
4656
|
+
// Closed list, so reject items past the end of the shape.
|
|
4657
|
+
var bad = std.array_list.Managed([]const u8).init(allocator);
|
|
4658
|
+
var i = plen;
|
|
4659
|
+
while (i < cval.array.data.items.len) : (i += 1) {
|
|
4660
|
+
const bk = strkey(allocator, JsonValue{ .integer = @intCast(i) }) catch continue;
|
|
4661
|
+
bad.append(bk) catch {};
|
|
4662
|
+
}
|
|
4663
|
+
if (bad.items.len > 0) {
|
|
4664
|
+
var badmsg = std.array_list.Managed(u8).init(allocator);
|
|
4665
|
+
badmsg.appendSlice("Unexpected keys at field ") catch {};
|
|
4666
|
+
badmsg.appendSlice(pathifySlice(allocator, inj.path[1..]) catch "<root>") catch {};
|
|
4667
|
+
badmsg.appendSlice(": ") catch {};
|
|
4668
|
+
for (bad.items, 0..) |bk, bi| {
|
|
4669
|
+
if (bi > 0) badmsg.appendSlice(", ") catch {};
|
|
4670
|
+
badmsg.appendSlice(bk) catch {};
|
|
4671
|
+
}
|
|
4672
|
+
inj.errs.append(badmsg.items) catch {};
|
|
4673
|
+
}
|
|
4674
|
+
} else {
|
|
4675
|
+
// Empty spec list [] means list can be open (any items).
|
|
4676
|
+
for (cval.array.data.items) |item| pval.array.append(item) catch {};
|
|
4677
|
+
}
|
|
3946
4678
|
} else if (!isnode(cval)) {
|
|
3947
4679
|
if (inj.exact_mode) {
|
|
3948
4680
|
// Exact matching for select.
|
|
@@ -3962,116 +4694,6 @@ fn validationModify(allocator: Allocator, _: JsonValue, key: []const u8, parent:
|
|
|
3962
4694
|
}
|
|
3963
4695
|
}
|
|
3964
4696
|
|
|
3965
|
-
fn validateWalk(
|
|
3966
|
-
allocator: Allocator,
|
|
3967
|
-
spec_val: JsonValue,
|
|
3968
|
-
data_val: JsonValue,
|
|
3969
|
-
errs: *std.array_list.Managed([]const u8),
|
|
3970
|
-
path: []const []const u8,
|
|
3971
|
-
) anyerror!JsonValue {
|
|
3972
|
-
// Type command strings: `$STRING`, `$NUMBER` etc resolve to type checks.
|
|
3973
|
-
if (spec_val == .string) {
|
|
3974
|
-
const s = spec_val.string;
|
|
3975
|
-
if (s.len > 2 and s[0] == '`' and s[s.len - 1] == '`') {
|
|
3976
|
-
const cmd = s[1 .. s.len - 1];
|
|
3977
|
-
if (std.mem.startsWith(u8, cmd, "$")) {
|
|
3978
|
-
return try validateTypeCheck(allocator, cmd, data_val, errs, path);
|
|
3979
|
-
}
|
|
3980
|
-
}
|
|
3981
|
-
return try validateDefault(allocator, spec_val, data_val, errs, path);
|
|
3982
|
-
}
|
|
3983
|
-
|
|
3984
|
-
if (spec_val == .array) {
|
|
3985
|
-
// Check for [$ONE, ...] and [$EXACT, ...].
|
|
3986
|
-
if (spec_val.array.data.items.len > 0) {
|
|
3987
|
-
const first = spec_val.array.data.items[0];
|
|
3988
|
-
if (first == .string) {
|
|
3989
|
-
if (std.mem.eql(u8, first.string, "`$ONE`")) {
|
|
3990
|
-
return try validateOne(allocator, spec_val, data_val, errs, path);
|
|
3991
|
-
}
|
|
3992
|
-
if (std.mem.eql(u8, first.string, "`$EXACT`")) {
|
|
3993
|
-
return try validateExact(allocator, spec_val, data_val, errs, path);
|
|
3994
|
-
}
|
|
3995
|
-
if (std.mem.eql(u8, first.string, "`$CHILD`")) {
|
|
3996
|
-
return try validateChild(allocator, spec_val, data_val, errs, path);
|
|
3997
|
-
}
|
|
3998
|
-
}
|
|
3999
|
-
}
|
|
4000
|
-
// Array spec: validate element by element.
|
|
4001
|
-
if (data_val != .array) {
|
|
4002
|
-
try errs.append(try invalidTypeMsg(allocator, path, S_list, data_val));
|
|
4003
|
-
return data_val;
|
|
4004
|
-
}
|
|
4005
|
-
return data_val;
|
|
4006
|
-
}
|
|
4007
|
-
|
|
4008
|
-
if (spec_val == .object) {
|
|
4009
|
-
if (data_val != .object) {
|
|
4010
|
-
// Check for $CHILD as map key.
|
|
4011
|
-
if (spec_val.object.get("`$CHILD`")) |child_spec| {
|
|
4012
|
-
return try validateChildMap(allocator, child_spec, data_val, errs, path);
|
|
4013
|
-
}
|
|
4014
|
-
try errs.append(try invalidTypeMsg(allocator, path, S_map, data_val));
|
|
4015
|
-
return data_val;
|
|
4016
|
-
}
|
|
4017
|
-
|
|
4018
|
-
// Map validation: check each spec key exists in data.
|
|
4019
|
-
const is_open = spec_val.object.get(S_BOPEN) != null;
|
|
4020
|
-
var result = try clone(allocator, data_val);
|
|
4021
|
-
|
|
4022
|
-
var it = spec_val.object.iterator();
|
|
4023
|
-
while (it.next()) |kv| {
|
|
4024
|
-
const k = kv.key_ptr.*;
|
|
4025
|
-
if (std.mem.eql(u8, k, S_BOPEN)) continue;
|
|
4026
|
-
if (k.len > 0 and k[0] == '`') continue; // Skip command keys.
|
|
4027
|
-
|
|
4028
|
-
var new_path = try allocator.alloc([]const u8, path.len + 1);
|
|
4029
|
-
@memcpy(new_path[0..path.len], path);
|
|
4030
|
-
new_path[path.len] = k;
|
|
4031
|
-
|
|
4032
|
-
const child_data = if (data_val.object.get(k)) |v| v else .null;
|
|
4033
|
-
const child_spec = kv.value_ptr.*;
|
|
4034
|
-
const child_result = try validateWalk(allocator, child_spec, child_data, errs, new_path);
|
|
4035
|
-
try result.object.put(k, child_result);
|
|
4036
|
-
}
|
|
4037
|
-
|
|
4038
|
-
// Check for unexpected keys (closed validation).
|
|
4039
|
-
if (!is_open and spec_val.object.count() > 0) {
|
|
4040
|
-
var dit = data_val.object.iterator();
|
|
4041
|
-
while (dit.next()) |dkv| {
|
|
4042
|
-
if (spec_val.object.get(dkv.key_ptr.*) == null) {
|
|
4043
|
-
try errs.append(try std.fmt.allocPrint(
|
|
4044
|
-
allocator,
|
|
4045
|
-
"Unexpected keys at field {s}: {s}",
|
|
4046
|
-
.{ try pathify(allocator, .null, 0, 0), dkv.key_ptr.* },
|
|
4047
|
-
));
|
|
4048
|
-
}
|
|
4049
|
-
}
|
|
4050
|
-
}
|
|
4051
|
-
|
|
4052
|
-
return result;
|
|
4053
|
-
}
|
|
4054
|
-
|
|
4055
|
-
return try validateDefault(allocator, spec_val, data_val, errs, path);
|
|
4056
|
-
}
|
|
4057
|
-
|
|
4058
|
-
// A scalar spec is a default: absent data takes it, present data must share its type.
|
|
4059
|
-
fn validateDefault(
|
|
4060
|
-
allocator: Allocator,
|
|
4061
|
-
spec_val: JsonValue,
|
|
4062
|
-
data_val: JsonValue,
|
|
4063
|
-
errs: *std.array_list.Managed([]const u8),
|
|
4064
|
-
path: []const []const u8,
|
|
4065
|
-
) anyerror!JsonValue {
|
|
4066
|
-
if (data_val == .null) return spec_val;
|
|
4067
|
-
if (spec_val == .null) return data_val;
|
|
4068
|
-
const ptype = typify(spec_val);
|
|
4069
|
-
if (ptype != typify(data_val)) {
|
|
4070
|
-
try errs.append(try invalidTypeMsg(allocator, path, typename(ptype), data_val));
|
|
4071
|
-
}
|
|
4072
|
-
return data_val;
|
|
4073
|
-
}
|
|
4074
|
-
|
|
4075
4697
|
fn validateTypeCheck(
|
|
4076
4698
|
allocator: Allocator,
|
|
4077
4699
|
cmd: []const u8,
|
|
@@ -4121,14 +4743,14 @@ fn validateTypeCheck(
|
|
|
4121
4743
|
}
|
|
4122
4744
|
return data_val;
|
|
4123
4745
|
}
|
|
4124
|
-
if (std.mem.eql(u8, cmd, "$
|
|
4746
|
+
if (std.mem.eql(u8, cmd, "$MAP")) {
|
|
4125
4747
|
if (0 == (@as(i64, T_map) & t)) {
|
|
4126
4748
|
try errs.append(try invalidTypeMsg(allocator, path, S_map, data_val));
|
|
4127
4749
|
return .null;
|
|
4128
4750
|
}
|
|
4129
4751
|
return data_val;
|
|
4130
4752
|
}
|
|
4131
|
-
if (std.mem.eql(u8, cmd, "$
|
|
4753
|
+
if (std.mem.eql(u8, cmd, "$LIST")) {
|
|
4132
4754
|
if (0 == (@as(i64, T_list) & t)) {
|
|
4133
4755
|
try errs.append(try invalidTypeMsg(allocator, path, S_list, data_val));
|
|
4134
4756
|
return .null;
|
|
@@ -4156,25 +4778,6 @@ fn validateTypeCheck(
|
|
|
4156
4778
|
return data_val;
|
|
4157
4779
|
}
|
|
4158
4780
|
|
|
4159
|
-
fn validateOne(
|
|
4160
|
-
allocator: Allocator,
|
|
4161
|
-
spec_val: JsonValue,
|
|
4162
|
-
data_val: JsonValue,
|
|
4163
|
-
errs: *std.array_list.Managed([]const u8),
|
|
4164
|
-
path: []const []const u8,
|
|
4165
|
-
) anyerror!JsonValue {
|
|
4166
|
-
const alts = spec_val.array.data.items[1..];
|
|
4167
|
-
for (alts) |alt| {
|
|
4168
|
-
var terrs = std.array_list.Managed([]const u8).init(allocator);
|
|
4169
|
-
_ = try validateWalk(allocator, alt, data_val, &terrs, path);
|
|
4170
|
-
if (terrs.items.len == 0) return data_val;
|
|
4171
|
-
}
|
|
4172
|
-
// No match.
|
|
4173
|
-
const p = try pathifySlice(allocator, path);
|
|
4174
|
-
try errs.append(try std.fmt.allocPrint(allocator, "Expected one of alternatives at {s}, but found {s}.", .{ p, typename(typify(data_val)) }));
|
|
4175
|
-
return data_val;
|
|
4176
|
-
}
|
|
4177
|
-
|
|
4178
4781
|
fn validateExact(
|
|
4179
4782
|
allocator: Allocator,
|
|
4180
4783
|
spec_val: JsonValue,
|
|
@@ -4184,62 +4787,94 @@ fn validateExact(
|
|
|
4184
4787
|
) anyerror!JsonValue {
|
|
4185
4788
|
const alts = spec_val.array.data.items[1..];
|
|
4186
4789
|
for (alts) |alt| {
|
|
4187
|
-
|
|
4188
|
-
const a = try toStdJson(allocator, alt);
|
|
4189
|
-
const b = try toStdJson(allocator, data_val);
|
|
4190
|
-
if (stdJsonEqual(a, b)) return data_val;
|
|
4191
|
-
// Also try string comparison.
|
|
4192
|
-
const sa = try stringify(allocator, alt, null);
|
|
4193
|
-
const sb = try stringify(allocator, data_val, null);
|
|
4194
|
-
if (std.mem.eql(u8, sa, sb)) return data_val;
|
|
4790
|
+
if (deepequal(alt, data_val)) return data_val;
|
|
4195
4791
|
}
|
|
4196
4792
|
const p = try pathifySlice(allocator, path);
|
|
4197
4793
|
try errs.append(try std.fmt.allocPrint(allocator, "Expected exactly equal at {s}, but found {s}.", .{ p, typename(typify(data_val)) }));
|
|
4198
4794
|
return data_val;
|
|
4199
4795
|
}
|
|
4200
4796
|
|
|
4201
|
-
|
|
4797
|
+
// $NOF and $ALL in a query: count the terms that match the value.
|
|
4798
|
+
fn selectCount(
|
|
4202
4799
|
allocator: Allocator,
|
|
4203
4800
|
spec_val: JsonValue,
|
|
4204
4801
|
data_val: JsonValue,
|
|
4205
4802
|
errs: *std.array_list.Managed([]const u8),
|
|
4206
4803
|
path: []const []const u8,
|
|
4804
|
+
counted: bool,
|
|
4207
4805
|
) anyerror!JsonValue {
|
|
4208
|
-
|
|
4209
|
-
if (
|
|
4210
|
-
const
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4806
|
+
const elems = spec_val.array.data.items;
|
|
4807
|
+
const count: ?JsonValue = if (counted and 1 < elems.len) elems[1] else null;
|
|
4808
|
+
const argsfrom: usize = if (counted) 2 else 1;
|
|
4809
|
+
const terms = elems[@min(argsfrom, elems.len)..];
|
|
4810
|
+
const numterms: i64 = @intCast(terms.len);
|
|
4811
|
+
|
|
4812
|
+
const bounds: NofCount = if (counted) try nofcount(allocator, count, numterms) else .{ .lo = numterms, .hi = numterms, .desc = "all" };
|
|
4813
|
+
if (0 == numterms or null == bounds.desc) {
|
|
4814
|
+
try errs.append("Invalid count.");
|
|
4214
4815
|
return data_val;
|
|
4215
4816
|
}
|
|
4216
4817
|
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4818
|
+
var matched: i64 = 0;
|
|
4819
|
+
for (terms) |term| {
|
|
4820
|
+
var terrs = std.array_list.Managed([]const u8).init(allocator);
|
|
4821
|
+
_ = try validateExactMatch(allocator, term, data_val, &terrs, path);
|
|
4822
|
+
if (0 == terrs.items.len) matched += 1;
|
|
4823
|
+
}
|
|
4824
|
+
|
|
4825
|
+
if (matched < bounds.lo or bounds.hi < matched) {
|
|
4826
|
+
try errs.append(try std.fmt.allocPrint(
|
|
4827
|
+
allocator,
|
|
4828
|
+
"Count at {s}: {d} should be {s}.",
|
|
4829
|
+
.{ try pathifySlice(allocator, path), matched, bounds.desc.? },
|
|
4830
|
+
));
|
|
4222
4831
|
}
|
|
4223
4832
|
return data_val;
|
|
4224
4833
|
}
|
|
4225
4834
|
|
|
4226
|
-
|
|
4835
|
+
// $LEN, $RANGE and $LIKE in a query: the value matches the spec, if there is
|
|
4836
|
+
// one, and has a length or is a number within the bound, or is a string the
|
|
4837
|
+
// pattern finds.
|
|
4838
|
+
fn selectBound(
|
|
4227
4839
|
allocator: Allocator,
|
|
4228
|
-
|
|
4840
|
+
spec_val: JsonValue,
|
|
4229
4841
|
data_val: JsonValue,
|
|
4230
4842
|
errs: *std.array_list.Managed([]const u8),
|
|
4231
4843
|
path: []const []const u8,
|
|
4844
|
+
name: []const u8,
|
|
4232
4845
|
) anyerror!JsonValue {
|
|
4233
|
-
|
|
4234
|
-
|
|
4846
|
+
const elems = spec_val.array.data.items;
|
|
4847
|
+
const bound: JsonValue = if (1 < elems.len) elems[1] else .null;
|
|
4848
|
+
const islen = std.mem.eql(u8, name, "$LEN");
|
|
4849
|
+
const islike = std.mem.eql(u8, name, "$LIKE");
|
|
4850
|
+
const like: ?[]const u8 = if (islike) likere(bound) else null;
|
|
4851
|
+
const likedesc: ?[]const u8 = if (like) |p| try std.fmt.allocPrint(allocator, "like /{s}/", .{p}) else null;
|
|
4852
|
+
|
|
4853
|
+
const bounds: NofCount = if (islen) try lenbound(allocator, bound) else .{ .lo = 0, .hi = 0, .desc = if (islike) likedesc else try rangedesc(allocator, bound) };
|
|
4854
|
+
if (elems.len < 2 or 3 < elems.len or null == bounds.desc) {
|
|
4855
|
+
try errs.append("Invalid bound.");
|
|
4235
4856
|
return data_val;
|
|
4236
4857
|
}
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
var
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4858
|
+
|
|
4859
|
+
if (3 == elems.len) {
|
|
4860
|
+
var terrs = std.array_list.Managed([]const u8).init(allocator);
|
|
4861
|
+
_ = try validateExactMatch(allocator, elems[2], data_val, &terrs, path);
|
|
4862
|
+
if (0 < terrs.items.len) {
|
|
4863
|
+
try errs.append("Spec not matched.");
|
|
4864
|
+
return data_val;
|
|
4865
|
+
}
|
|
4866
|
+
}
|
|
4867
|
+
|
|
4868
|
+
const tbits: i64 = if (islen) T_string | T_list | T_map else if (islike) T_string else T_number;
|
|
4869
|
+
const len = lenof(data_val);
|
|
4870
|
+
const inbound = if (islen) bounds.lo <= len and (-1 == bounds.hi or len <= bounds.hi) else if (islike) data_val == .string and re_test(like.?, data_val.string) else inrange(bound, data_val);
|
|
4871
|
+
|
|
4872
|
+
if (0 == (tbits & typify(data_val)) or !inbound) {
|
|
4873
|
+
try errs.append(try std.fmt.allocPrint(
|
|
4874
|
+
allocator,
|
|
4875
|
+
"Bound at {s}: {s} should be {s}.",
|
|
4876
|
+
.{ try pathifySlice(allocator, path), try stringify(allocator, data_val, null), bounds.desc.? },
|
|
4877
|
+
));
|
|
4243
4878
|
}
|
|
4244
4879
|
return data_val;
|
|
4245
4880
|
}
|
|
@@ -4365,12 +5000,15 @@ pub fn select(allocator: Allocator, children: JsonValue, query: JsonValue) anyer
|
|
|
4365
5000
|
const result_lr = try allocator.create(ListRef);
|
|
4366
5001
|
result_lr.* = .{ .data = ListData.init(allocator) };
|
|
4367
5002
|
|
|
5003
|
+
// A query that names an unknown checker selects nothing.
|
|
5004
|
+
var qerrs = std.array_list.Managed([]const u8).init(allocator);
|
|
5005
|
+
try checknames(allocator, query, &[_][]const u8{}, &qerrs, &SELECT_NAMES, false);
|
|
5006
|
+
if (0 < qerrs.items.len) return JsonValue{ .array = result_lr };
|
|
5007
|
+
|
|
4368
5008
|
for (child_list.items) |child| {
|
|
4369
5009
|
var terrs = std.array_list.Managed([]const u8).init(allocator);
|
|
4370
5010
|
const q = try clone(allocator, query);
|
|
4371
|
-
|
|
4372
|
-
// Mark all maps in query as open.
|
|
4373
|
-
_ = try walk(allocator, q, markOpen, null, MAXDEPTH);
|
|
5011
|
+
try openquery(q);
|
|
4374
5012
|
|
|
4375
5013
|
// Validate with exact matching.
|
|
4376
5014
|
_ = try validateExactMatch(allocator, q, child, &terrs, &[_][]const u8{});
|
|
@@ -4383,11 +5021,28 @@ pub fn select(allocator: Allocator, children: JsonValue, query: JsonValue) anyer
|
|
|
4383
5021
|
return JsonValue{ .array = result_lr };
|
|
4384
5022
|
}
|
|
4385
5023
|
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
5024
|
+
// Open every map in a select query, so a child may hold keys the query does
|
|
5025
|
+
// not name, but leave a directive's literals as written: what $EXACT
|
|
5026
|
+
// compares, and the count or bound of $NOF, $LEN and $RANGE.
|
|
5027
|
+
fn openquery(q: JsonValue) anyerror!void {
|
|
5028
|
+
switch (q) {
|
|
5029
|
+
.object => |obj| {
|
|
5030
|
+
const open: JsonValue = obj.get(S_BOPEN) orelse .null;
|
|
5031
|
+
if (open == .null) try obj.put(S_BOPEN, JsonValue{ .bool = true });
|
|
5032
|
+
var it = obj.iterator();
|
|
5033
|
+
while (it.next()) |kv| try openquery(kv.value_ptr.*);
|
|
5034
|
+
},
|
|
5035
|
+
.array => |arr| {
|
|
5036
|
+
const elems = arr.data.items;
|
|
5037
|
+
const head: []const u8 = if (0 < elems.len and elems[0] == .string) elems[0].string else "";
|
|
5038
|
+
const exact = std.mem.eql(u8, head, S_BEXACT);
|
|
5039
|
+
const bounded = std.mem.eql(u8, head, "`$NOF`") or std.mem.eql(u8, head, "`$LEN`") or std.mem.eql(u8, head, "`$RANGE`");
|
|
5040
|
+
for (elems, 0..) |elem, i| {
|
|
5041
|
+
if (0 == i or !(exact or (bounded and 1 == i))) try openquery(elem);
|
|
5042
|
+
}
|
|
5043
|
+
},
|
|
5044
|
+
else => {},
|
|
4389
5045
|
}
|
|
4390
|
-
return val;
|
|
4391
5046
|
}
|
|
4392
5047
|
|
|
4393
5048
|
fn validateExactMatch(
|
|
@@ -4440,7 +5095,8 @@ fn validateExactMatch(
|
|
|
4440
5095
|
_ = try selectCmp(allocator, "$LIKE", term, data_val, errs, path);
|
|
4441
5096
|
}
|
|
4442
5097
|
|
|
4443
|
-
|
|
5098
|
+
const rest = spec_val.object.get("`$REST`");
|
|
5099
|
+
if (!has_plain_key and rest == null) return data_val;
|
|
4444
5100
|
|
|
4445
5101
|
if (data_val != .object) {
|
|
4446
5102
|
try errs.append("type mismatch: expected object");
|
|
@@ -4473,6 +5129,16 @@ fn validateExactMatch(
|
|
|
4473
5129
|
));
|
|
4474
5130
|
}
|
|
4475
5131
|
}
|
|
5132
|
+
|
|
5133
|
+
// $REST checks each data key the query does not name.
|
|
5134
|
+
if (rest) |rspec| {
|
|
5135
|
+
var dit = data_val.object.iterator();
|
|
5136
|
+
while (dit.next()) |kv| {
|
|
5137
|
+
const k = kv.key_ptr.*;
|
|
5138
|
+
if (spec_val.object.get(k) != null) continue;
|
|
5139
|
+
_ = try validateExactMatch(allocator, rspec, kv.value_ptr.*, errs, try appendSlice(allocator, []const u8, path, k));
|
|
5140
|
+
}
|
|
5141
|
+
}
|
|
4476
5142
|
return data_val;
|
|
4477
5143
|
}
|
|
4478
5144
|
|
|
@@ -4480,10 +5146,18 @@ fn validateExactMatch(
|
|
|
4480
5146
|
if (spec_val.array.data.items.len > 0) {
|
|
4481
5147
|
const first = spec_val.array.data.items[0];
|
|
4482
5148
|
if (first == .string) {
|
|
4483
|
-
if (std.mem.eql(u8, first.string, "`$ONE`"))
|
|
4484
|
-
return try validateOne(allocator, spec_val, data_val, errs, path);
|
|
4485
5149
|
if (std.mem.eql(u8, first.string, "`$EXACT`"))
|
|
4486
5150
|
return try validateExact(allocator, spec_val, data_val, errs, path);
|
|
5151
|
+
if (std.mem.eql(u8, first.string, "`$NOF`"))
|
|
5152
|
+
return try selectCount(allocator, spec_val, data_val, errs, path, true);
|
|
5153
|
+
if (std.mem.eql(u8, first.string, "`$ALL`"))
|
|
5154
|
+
return try selectCount(allocator, spec_val, data_val, errs, path, false);
|
|
5155
|
+
if (std.mem.eql(u8, first.string, "`$LEN`"))
|
|
5156
|
+
return try selectBound(allocator, spec_val, data_val, errs, path, "$LEN");
|
|
5157
|
+
if (std.mem.eql(u8, first.string, "`$RANGE`"))
|
|
5158
|
+
return try selectBound(allocator, spec_val, data_val, errs, path, "$RANGE");
|
|
5159
|
+
if (std.mem.eql(u8, first.string, "`$LIKE`"))
|
|
5160
|
+
return try selectBound(allocator, spec_val, data_val, errs, path, "$LIKE");
|
|
4487
5161
|
}
|
|
4488
5162
|
}
|
|
4489
5163
|
// Plain array spec: compare to data element-by-element. Length and
|
|
@@ -4498,6 +5172,23 @@ fn validateExactMatch(
|
|
|
4498
5172
|
));
|
|
4499
5173
|
return data_val;
|
|
4500
5174
|
}
|
|
5175
|
+
// Empty spec list [] means list can be open (any items).
|
|
5176
|
+
if (0 == spec_val.array.data.items.len) return data_val;
|
|
5177
|
+
|
|
5178
|
+
// A trailing ['$REST', spec] checks each item after the named ones.
|
|
5179
|
+
const sitems = spec_val.array.data.items;
|
|
5180
|
+
if (headarg(sitems[sitems.len - 1], "`$REST`")) |rspec| {
|
|
5181
|
+
const ditems = data_val.array.data.items;
|
|
5182
|
+
const named = sitems.len - 1;
|
|
5183
|
+
for (0..@max(named, ditems.len)) |i| {
|
|
5184
|
+
const sv = if (i < named) sitems[i] else rspec;
|
|
5185
|
+
const dv: JsonValue = if (i < ditems.len) ditems[i] else .null;
|
|
5186
|
+
const key = try std.fmt.allocPrint(allocator, "{d}", .{i});
|
|
5187
|
+
_ = try validateExactMatch(allocator, sv, dv, errs, try appendSlice(allocator, []const u8, path, key));
|
|
5188
|
+
}
|
|
5189
|
+
return data_val;
|
|
5190
|
+
}
|
|
5191
|
+
|
|
4501
5192
|
if (spec_val.array.data.items.len != data_val.array.data.items.len) {
|
|
4502
5193
|
const p = try pathifySlice(allocator, path);
|
|
4503
5194
|
try errs.append(try std.fmt.allocPrint(
|
|
@@ -4640,3 +5331,429 @@ fn regexMatch(pattern: []const u8, subject: []const u8) bool {
|
|
|
4640
5331
|
defer regex.deinit();
|
|
4641
5332
|
return regex.isMatch(subject);
|
|
4642
5333
|
}
|
|
5334
|
+
|
|
5335
|
+
// ============================================================================
|
|
5336
|
+
// Condense — a structure as a sorted symbol table and a table of shared
|
|
5337
|
+
// nodes, each node an encoding list led by its kind.
|
|
5338
|
+
// ============================================================================
|
|
5339
|
+
|
|
5340
|
+
const CONDENSE_VERSION = 1;
|
|
5341
|
+
|
|
5342
|
+
const CONDENSE_MAP = 0;
|
|
5343
|
+
const CONDENSE_LIST = 1;
|
|
5344
|
+
const CONDENSE_STR = 2;
|
|
5345
|
+
const CONDENSE_NUM = 3;
|
|
5346
|
+
const CONDENSE_TRUE = 4;
|
|
5347
|
+
const CONDENSE_FALSE = 5;
|
|
5348
|
+
const CONDENSE_NULL = 6;
|
|
5349
|
+
|
|
5350
|
+
pub const S_condense = "$condense";
|
|
5351
|
+
pub const S_condsym = "sym";
|
|
5352
|
+
pub const S_condnode = "node";
|
|
5353
|
+
pub const S_condroot = "root";
|
|
5354
|
+
|
|
5355
|
+
/// The message for error.CondensedImmutable, which setprop, delprop and
|
|
5356
|
+
/// setpath return for a condensed structure.
|
|
5357
|
+
pub const CONDENSED_IMMUTABLE = "struct: condensed structures are immutable - expand() first, then modify the copy";
|
|
5358
|
+
|
|
5359
|
+
// The version must match, not merely be numeric: a future profile would
|
|
5360
|
+
// otherwise be decoded under this one's schema.
|
|
5361
|
+
pub fn iscondensed(val: JsonValue) bool {
|
|
5362
|
+
if (val != .object) return false;
|
|
5363
|
+
const m = val.object;
|
|
5364
|
+
const version = numval(m.get(S_condense) orelse .null) orelse return false;
|
|
5365
|
+
return CONDENSE_VERSION == version and
|
|
5366
|
+
islist(m.get(S_condsym) orelse .null) and
|
|
5367
|
+
islist(m.get(S_condnode) orelse .null) and
|
|
5368
|
+
null != numval(m.get(S_condroot) orelse .null);
|
|
5369
|
+
}
|
|
5370
|
+
|
|
5371
|
+
// Condense any JSON-shaped node. Pure: the same input always produces a
|
|
5372
|
+
// byte-identical result, on every port.
|
|
5373
|
+
pub fn condense(allocator: Allocator, val: JsonValue) !JsonValue {
|
|
5374
|
+
// Pass one: every distinct map key and string value, once, sorted. Byte
|
|
5375
|
+
// order is code-point order in UTF-8.
|
|
5376
|
+
var all = std.array_list.Managed([]const u8).init(allocator);
|
|
5377
|
+
defer all.deinit();
|
|
5378
|
+
try condenseCollect(&all, val);
|
|
5379
|
+
std.mem.sort([]const u8, all.items, {}, stringLessThan);
|
|
5380
|
+
|
|
5381
|
+
const sym = try JsonValue.makeList(allocator);
|
|
5382
|
+
for (all.items, 0..) |s, i| {
|
|
5383
|
+
if (0 == i or !std.mem.eql(u8, all.items[i - 1], s)) try sym.array.append(JsonValue{ .string = s });
|
|
5384
|
+
}
|
|
5385
|
+
|
|
5386
|
+
var condenser = Condenser{
|
|
5387
|
+
.allocator = allocator,
|
|
5388
|
+
.sym = sym.array.data.items,
|
|
5389
|
+
.node = (try JsonValue.makeList(allocator)).array,
|
|
5390
|
+
.seen = (try JsonValue.makeMap(allocator)).object,
|
|
5391
|
+
};
|
|
5392
|
+
const root = try condenser.build(val);
|
|
5393
|
+
|
|
5394
|
+
const out = try JsonValue.makeMap(allocator);
|
|
5395
|
+
try out.object.put(S_condense, JsonValue{ .integer = CONDENSE_VERSION });
|
|
5396
|
+
try out.object.put(S_condsym, sym);
|
|
5397
|
+
try out.object.put(S_condnode, JsonValue{ .array = condenser.node });
|
|
5398
|
+
try out.object.put(S_condroot, JsonValue{ .integer = root });
|
|
5399
|
+
return out;
|
|
5400
|
+
}
|
|
5401
|
+
|
|
5402
|
+
fn condenseCollect(all: *std.array_list.Managed([]const u8), n: JsonValue) anyerror!void {
|
|
5403
|
+
switch (n) {
|
|
5404
|
+
.object => |m| {
|
|
5405
|
+
var it = m.iterator();
|
|
5406
|
+
while (it.next()) |kv| {
|
|
5407
|
+
try all.append(kv.key_ptr.*);
|
|
5408
|
+
try condenseCollect(all, kv.value_ptr.*);
|
|
5409
|
+
}
|
|
5410
|
+
},
|
|
5411
|
+
.array => |l| {
|
|
5412
|
+
for (l.data.items) |item| try condenseCollect(all, item);
|
|
5413
|
+
},
|
|
5414
|
+
.string => |s| try all.append(s),
|
|
5415
|
+
else => {},
|
|
5416
|
+
}
|
|
5417
|
+
}
|
|
5418
|
+
|
|
5419
|
+
const Condenser = struct {
|
|
5420
|
+
allocator: Allocator,
|
|
5421
|
+
sym: []const JsonValue,
|
|
5422
|
+
node: *ListRef,
|
|
5423
|
+
seen: *MapRef,
|
|
5424
|
+
|
|
5425
|
+
// Build post-order, interning on the encoding. Children are built first,
|
|
5426
|
+
// so identical subtrees are one node by the time a parent refers to them.
|
|
5427
|
+
fn build(self: *Condenser, n: JsonValue) anyerror!i64 {
|
|
5428
|
+
const enc = (try JsonValue.makeList(self.allocator)).array;
|
|
5429
|
+
switch (n) {
|
|
5430
|
+
.object => |m| {
|
|
5431
|
+
try enc.append(JsonValue{ .integer = CONDENSE_MAP });
|
|
5432
|
+
// keysof sorts by byte, which is code-point order in UTF-8, so the
|
|
5433
|
+
// key ids ascend and lookup can bisect.
|
|
5434
|
+
const names = try keysof(self.allocator, n);
|
|
5435
|
+
for (names.array.data.items) |k| {
|
|
5436
|
+
try enc.append(JsonValue{ .integer = condenseBisect(self.sym, k.string) });
|
|
5437
|
+
try enc.append(JsonValue{ .integer = try self.build(m.get(k.string) orelse .null) });
|
|
5438
|
+
}
|
|
5439
|
+
},
|
|
5440
|
+
.array => |l| {
|
|
5441
|
+
try enc.append(JsonValue{ .integer = CONDENSE_LIST });
|
|
5442
|
+
for (l.data.items) |item| {
|
|
5443
|
+
try enc.append(JsonValue{ .integer = try self.build(item) });
|
|
5444
|
+
}
|
|
5445
|
+
},
|
|
5446
|
+
.string => |s| {
|
|
5447
|
+
try enc.append(JsonValue{ .integer = CONDENSE_STR });
|
|
5448
|
+
try enc.append(JsonValue{ .integer = condenseBisect(self.sym, s) });
|
|
5449
|
+
},
|
|
5450
|
+
.integer, .float, .number_string => {
|
|
5451
|
+
try enc.append(JsonValue{ .integer = CONDENSE_NUM });
|
|
5452
|
+
try enc.append(n);
|
|
5453
|
+
},
|
|
5454
|
+
.bool => |b| {
|
|
5455
|
+
const kind: i64 = if (b) CONDENSE_TRUE else CONDENSE_FALSE;
|
|
5456
|
+
try enc.append(JsonValue{ .integer = kind });
|
|
5457
|
+
},
|
|
5458
|
+
.null, .function => {
|
|
5459
|
+
try enc.append(JsonValue{ .integer = CONDENSE_NULL });
|
|
5460
|
+
},
|
|
5461
|
+
}
|
|
5462
|
+
return self.intern(enc);
|
|
5463
|
+
}
|
|
5464
|
+
|
|
5465
|
+
// The kind leads every encoding, so nodes of different kinds never share
|
|
5466
|
+
// a key.
|
|
5467
|
+
fn intern(self: *Condenser, enc: *ListRef) anyerror!i64 {
|
|
5468
|
+
var enckey = std.array_list.Managed(u8).init(self.allocator);
|
|
5469
|
+
for (enc.data.items) |e| {
|
|
5470
|
+
var buf: [32]u8 = undefined;
|
|
5471
|
+
try enckey.appendSlice(condenseNumText(&buf, e));
|
|
5472
|
+
try enckey.append(',');
|
|
5473
|
+
}
|
|
5474
|
+
if (self.seen.get(enckey.items)) |hit| return hit.integer;
|
|
5475
|
+
const idx: i64 = @intCast(self.node.data.items.len);
|
|
5476
|
+
try self.node.append(JsonValue{ .array = enc });
|
|
5477
|
+
try self.seen.put(enckey.items, JsonValue{ .integer = idx });
|
|
5478
|
+
return idx;
|
|
5479
|
+
}
|
|
5480
|
+
};
|
|
5481
|
+
|
|
5482
|
+
// An encoding element as interning text. A number is keyed by value, so an
|
|
5483
|
+
// integer and a decimal with the same value share a node.
|
|
5484
|
+
fn condenseNumText(buf: *[32]u8, e: JsonValue) []const u8 {
|
|
5485
|
+
return switch (e) {
|
|
5486
|
+
.integer => |i| std.fmt.bufPrint(buf, "{d}", .{i}) catch S_MT,
|
|
5487
|
+
.float => |f| blk: {
|
|
5488
|
+
if (f == @trunc(f) and -9.0e18 < f and f < 9.0e18) {
|
|
5489
|
+
break :blk std.fmt.bufPrint(buf, "{d}", .{@as(i64, @intFromFloat(f))}) catch S_MT;
|
|
5490
|
+
}
|
|
5491
|
+
break :blk std.fmt.bufPrint(buf, "f{d}", .{@as(u64, @bitCast(f))}) catch S_MT;
|
|
5492
|
+
},
|
|
5493
|
+
.number_string => |s| s,
|
|
5494
|
+
else => S_MT,
|
|
5495
|
+
};
|
|
5496
|
+
}
|
|
5497
|
+
|
|
5498
|
+
// Bisect the sorted symbol table for key: its id, or -1 when the string
|
|
5499
|
+
// occurs nowhere in the structure, a fast negative answer for a key lookup.
|
|
5500
|
+
fn condenseBisect(sym: []const JsonValue, key: []const u8) i64 {
|
|
5501
|
+
var lo: usize = 0;
|
|
5502
|
+
var hi: usize = sym.len;
|
|
5503
|
+
while (lo < hi) {
|
|
5504
|
+
const mid = lo + (hi - lo) / 2;
|
|
5505
|
+
const s = if (sym[mid] == .string) sym[mid].string else return -1;
|
|
5506
|
+
switch (std.mem.order(u8, s, key)) {
|
|
5507
|
+
.eq => return @intCast(mid),
|
|
5508
|
+
.lt => lo = mid + 1,
|
|
5509
|
+
.gt => hi = mid,
|
|
5510
|
+
}
|
|
5511
|
+
}
|
|
5512
|
+
return -1;
|
|
5513
|
+
}
|
|
5514
|
+
|
|
5515
|
+
// A kind, symbol id or node index read from an encoding, or -1 for anything
|
|
5516
|
+
// but a non-negative integer.
|
|
5517
|
+
fn condenseInt(v: JsonValue) i64 {
|
|
5518
|
+
return switch (v) {
|
|
5519
|
+
.integer => |i| if (0 <= i) i else -1,
|
|
5520
|
+
.float => |f| if (f == @trunc(f) and 0 <= f and f < 9.0e15) @as(i64, @intFromFloat(f)) else -1,
|
|
5521
|
+
else => -1,
|
|
5522
|
+
};
|
|
5523
|
+
}
|
|
5524
|
+
|
|
5525
|
+
fn condenseTable(cond: JsonValue, name: []const u8) ?[]const JsonValue {
|
|
5526
|
+
if (cond != .object) return null;
|
|
5527
|
+
const t = cond.object.get(name) orelse return null;
|
|
5528
|
+
return if (t == .array) t.array.data.items else null;
|
|
5529
|
+
}
|
|
5530
|
+
|
|
5531
|
+
fn condenseRoot(cond: JsonValue) i64 {
|
|
5532
|
+
if (cond != .object) return -1;
|
|
5533
|
+
return condenseInt(cond.object.get(S_condroot) orelse .null);
|
|
5534
|
+
}
|
|
5535
|
+
|
|
5536
|
+
// The encoding of node idx, or null when there is no such node.
|
|
5537
|
+
fn condenseEnc(cond: JsonValue, idx: i64) ?[]const JsonValue {
|
|
5538
|
+
const node = condenseTable(cond, S_condnode) orelse return null;
|
|
5539
|
+
if (0 > idx or idx >= @as(i64, @intCast(node.len))) return null;
|
|
5540
|
+
const enc = node[@intCast(idx)];
|
|
5541
|
+
return if (enc == .array) enc.array.data.items else null;
|
|
5542
|
+
}
|
|
5543
|
+
|
|
5544
|
+
fn condenseKind(enc: []const JsonValue) i64 {
|
|
5545
|
+
return if (0 < enc.len) condenseInt(enc[0]) else -1;
|
|
5546
|
+
}
|
|
5547
|
+
|
|
5548
|
+
fn condenseSymAt(sym: []const JsonValue, v: JsonValue) ?[]const u8 {
|
|
5549
|
+
const i = condenseInt(v);
|
|
5550
|
+
if (0 > i or i >= @as(i64, @intCast(sym.len))) return null;
|
|
5551
|
+
const s = sym[@intCast(i)];
|
|
5552
|
+
return if (s == .string) s.string else null;
|
|
5553
|
+
}
|
|
5554
|
+
|
|
5555
|
+
// The node index of key inside node idx, or -1. Touches only this node.
|
|
5556
|
+
fn condenseChild(cond: JsonValue, idx: i64, key: []const u8) i64 {
|
|
5557
|
+
const enc = condenseEnc(cond, idx) orelse return -1;
|
|
5558
|
+
switch (condenseKind(enc)) {
|
|
5559
|
+
CONDENSE_MAP => {
|
|
5560
|
+
const symid = condenseBisect(condenseTable(cond, S_condsym) orelse return -1, key);
|
|
5561
|
+
if (0 > symid) return -1;
|
|
5562
|
+
// Pairs live at [1,2], [3,4], ... with keys ascending: bisect the pairs.
|
|
5563
|
+
var lo: usize = 0;
|
|
5564
|
+
var hi: usize = (enc.len - 1) / 2;
|
|
5565
|
+
while (lo < hi) {
|
|
5566
|
+
const mid = lo + (hi - lo) / 2;
|
|
5567
|
+
const k = condenseInt(enc[1 + mid * 2]);
|
|
5568
|
+
if (k == symid) return condenseInt(enc[2 + mid * 2]);
|
|
5569
|
+
if (k < symid) lo = mid + 1 else hi = mid;
|
|
5570
|
+
}
|
|
5571
|
+
return -1;
|
|
5572
|
+
},
|
|
5573
|
+
CONDENSE_LIST => {
|
|
5574
|
+
const i = listIndex(JsonValue{ .string = key }) orelse return -1;
|
|
5575
|
+
return if (i < enc.len - 1) condenseInt(enc[1 + i]) else -1;
|
|
5576
|
+
},
|
|
5577
|
+
else => return -1,
|
|
5578
|
+
}
|
|
5579
|
+
}
|
|
5580
|
+
|
|
5581
|
+
// Walk path parts from a starting node, returning the node index or -1.
|
|
5582
|
+
fn condenseWalk(cond: JsonValue, idx: i64, parts: []const []const u8) i64 {
|
|
5583
|
+
var at = idx;
|
|
5584
|
+
for (parts) |part| {
|
|
5585
|
+
if (0 > at) return -1;
|
|
5586
|
+
if (0 == part.len) continue;
|
|
5587
|
+
at = condenseChild(cond, at, part);
|
|
5588
|
+
}
|
|
5589
|
+
return at;
|
|
5590
|
+
}
|
|
5591
|
+
|
|
5592
|
+
// A path as parts: a list is its parts, a string splits on dots, and any
|
|
5593
|
+
// other value is one part, its string form. No path is no parts. Null when a
|
|
5594
|
+
// list part is neither a string nor a number, which names no child.
|
|
5595
|
+
fn condenseParts(allocator: Allocator, path: JsonValue) !?[]const []const u8 {
|
|
5596
|
+
var parts = std.array_list.Managed([]const u8).init(allocator);
|
|
5597
|
+
switch (path) {
|
|
5598
|
+
.null => {},
|
|
5599
|
+
.array => |l| {
|
|
5600
|
+
for (l.data.items) |p| {
|
|
5601
|
+
const part: []const u8 = switch (p) {
|
|
5602
|
+
.string => |s| s,
|
|
5603
|
+
.integer, .float => try numtext(allocator, p),
|
|
5604
|
+
else => return null,
|
|
5605
|
+
};
|
|
5606
|
+
try parts.append(part);
|
|
5607
|
+
}
|
|
5608
|
+
},
|
|
5609
|
+
.string => |s| {
|
|
5610
|
+
if (0 < s.len) {
|
|
5611
|
+
var it = std.mem.splitScalar(u8, s, '.');
|
|
5612
|
+
while (it.next()) |p| try parts.append(p);
|
|
5613
|
+
}
|
|
5614
|
+
},
|
|
5615
|
+
else => try parts.append(try stringify(allocator, path, null)),
|
|
5616
|
+
}
|
|
5617
|
+
return parts.items;
|
|
5618
|
+
}
|
|
5619
|
+
|
|
5620
|
+
// Node idx as a fresh tree, .null when there is no such node. Every
|
|
5621
|
+
// materialisation is independent, even where the condensed form shares a node.
|
|
5622
|
+
fn condenseMaterialise(allocator: Allocator, cond: JsonValue, idx: i64) anyerror!JsonValue {
|
|
5623
|
+
const node = condenseTable(cond, S_condnode) orelse return .null;
|
|
5624
|
+
const sym = condenseTable(cond, S_condsym) orelse &[_]JsonValue{};
|
|
5625
|
+
return condenseRebuild(allocator, sym, node, idx);
|
|
5626
|
+
}
|
|
5627
|
+
|
|
5628
|
+
fn condenseRebuild(allocator: Allocator, sym: []const JsonValue, node: []const JsonValue, i: i64) anyerror!JsonValue {
|
|
5629
|
+
if (0 > i or i >= @as(i64, @intCast(node.len))) return .null;
|
|
5630
|
+
const encv = node[@intCast(i)];
|
|
5631
|
+
if (encv != .array) return .null;
|
|
5632
|
+
const enc = encv.array.data.items;
|
|
5633
|
+
switch (condenseKind(enc)) {
|
|
5634
|
+
CONDENSE_MAP => {
|
|
5635
|
+
const out = try JsonValue.makeMap(allocator);
|
|
5636
|
+
var j: usize = 1;
|
|
5637
|
+
while (j + 1 < enc.len) : (j += 2) {
|
|
5638
|
+
const key = condenseSymAt(sym, enc[j]) orelse continue;
|
|
5639
|
+
try out.object.put(key, try condenseRebuild(allocator, sym, node, condenseInt(enc[j + 1])));
|
|
5640
|
+
}
|
|
5641
|
+
return out;
|
|
5642
|
+
},
|
|
5643
|
+
CONDENSE_LIST => {
|
|
5644
|
+
const out = try JsonValue.makeList(allocator);
|
|
5645
|
+
for (enc[1..]) |e| try out.array.append(try condenseRebuild(allocator, sym, node, condenseInt(e)));
|
|
5646
|
+
return out;
|
|
5647
|
+
},
|
|
5648
|
+
CONDENSE_STR => {
|
|
5649
|
+
const s = condenseSymAt(sym, if (1 < enc.len) enc[1] else .null) orelse return .null;
|
|
5650
|
+
return JsonValue{ .string = s };
|
|
5651
|
+
},
|
|
5652
|
+
CONDENSE_NUM => return if (1 < enc.len) enc[1] else .null,
|
|
5653
|
+
CONDENSE_TRUE => return JsonValue{ .bool = true },
|
|
5654
|
+
CONDENSE_FALSE => return JsonValue{ .bool = false },
|
|
5655
|
+
else => return .null,
|
|
5656
|
+
}
|
|
5657
|
+
}
|
|
5658
|
+
|
|
5659
|
+
// The value a condensed structure stands for. Any other value comes back as
|
|
5660
|
+
// it is, so a caller holding either shape can call expand.
|
|
5661
|
+
pub fn expand(allocator: Allocator, cond: JsonValue) !JsonValue {
|
|
5662
|
+
if (!iscondensed(cond)) return cond;
|
|
5663
|
+
return condenseMaterialise(allocator, cond, condenseRoot(cond));
|
|
5664
|
+
}
|
|
5665
|
+
|
|
5666
|
+
// The keys of node idx, without materialising any of its values.
|
|
5667
|
+
fn condenseKeys(allocator: Allocator, cond: JsonValue, idx: i64) !JsonValue {
|
|
5668
|
+
const out = try JsonValue.makeList(allocator);
|
|
5669
|
+
const enc = condenseEnc(cond, idx) orelse return out;
|
|
5670
|
+
switch (condenseKind(enc)) {
|
|
5671
|
+
CONDENSE_MAP => {
|
|
5672
|
+
const sym = condenseTable(cond, S_condsym) orelse return out;
|
|
5673
|
+
var j: usize = 1;
|
|
5674
|
+
while (j < enc.len) : (j += 2) {
|
|
5675
|
+
if (condenseSymAt(sym, enc[j])) |k| try out.array.append(JsonValue{ .string = k });
|
|
5676
|
+
}
|
|
5677
|
+
},
|
|
5678
|
+
CONDENSE_LIST => {
|
|
5679
|
+
for (1..enc.len) |j| {
|
|
5680
|
+
try out.array.append(JsonValue{ .string = try std.fmt.allocPrint(allocator, "{d}", .{j - 1}) });
|
|
5681
|
+
}
|
|
5682
|
+
},
|
|
5683
|
+
else => {},
|
|
5684
|
+
}
|
|
5685
|
+
return out;
|
|
5686
|
+
}
|
|
5687
|
+
|
|
5688
|
+
// A cursor into a condensed structure. Reads resolve by integer index and
|
|
5689
|
+
// touch only the nodes on the path, so the cost of a lookup follows path
|
|
5690
|
+
// depth and result size, never total structure size.
|
|
5691
|
+
pub const CondenseView = struct {
|
|
5692
|
+
allocator: Allocator,
|
|
5693
|
+
cond: JsonValue,
|
|
5694
|
+
start: i64,
|
|
5695
|
+
memo: *MapRef,
|
|
5696
|
+
|
|
5697
|
+
// The value at path, materialised: a container comes back as an
|
|
5698
|
+
// independent copy.
|
|
5699
|
+
pub fn get(self: CondenseView, path: JsonValue) !JsonValue {
|
|
5700
|
+
return condenseMaterialise(self.allocator, self.cond, try self.resolve(path));
|
|
5701
|
+
}
|
|
5702
|
+
|
|
5703
|
+
// The key names at path, with no value decoded.
|
|
5704
|
+
pub fn keys(self: CondenseView, path: JsonValue) !JsonValue {
|
|
5705
|
+
const found = try self.resolve(path);
|
|
5706
|
+
if (0 > found) return JsonValue.makeList(self.allocator);
|
|
5707
|
+
return condenseKeys(self.allocator, self.cond, found);
|
|
5708
|
+
}
|
|
5709
|
+
|
|
5710
|
+
pub fn has(self: CondenseView, path: JsonValue) !bool {
|
|
5711
|
+
return 0 <= try self.resolve(path);
|
|
5712
|
+
}
|
|
5713
|
+
|
|
5714
|
+
// A cursor at path, sharing this view's memo. Nothing is decoded.
|
|
5715
|
+
pub fn at(self: CondenseView, path: JsonValue) !CondenseView {
|
|
5716
|
+
return condenseview(self.allocator, self.cond, try self.resolve(path), self.memo);
|
|
5717
|
+
}
|
|
5718
|
+
|
|
5719
|
+
pub fn value(self: CondenseView) !JsonValue {
|
|
5720
|
+
return condenseMaterialise(self.allocator, self.cond, self.start);
|
|
5721
|
+
}
|
|
5722
|
+
|
|
5723
|
+
pub fn size(self: CondenseView) i64 {
|
|
5724
|
+
const enc = condenseEnc(self.cond, self.start) orelse return 0;
|
|
5725
|
+
return switch (condenseKind(enc)) {
|
|
5726
|
+
CONDENSE_MAP => @intCast((enc.len - 1) / 2),
|
|
5727
|
+
CONDENSE_LIST => @intCast(enc.len - 1),
|
|
5728
|
+
else => 0,
|
|
5729
|
+
};
|
|
5730
|
+
}
|
|
5731
|
+
|
|
5732
|
+
pub fn exists(self: CondenseView) bool {
|
|
5733
|
+
return 0 <= self.start;
|
|
5734
|
+
}
|
|
5735
|
+
|
|
5736
|
+
// Unlike value and get, a shared materialisation: the same container for
|
|
5737
|
+
// the same node from every view on the memo, so a change to it reaches
|
|
5738
|
+
// them all.
|
|
5739
|
+
pub fn ref(self: CondenseView) !JsonValue {
|
|
5740
|
+
const k = try std.fmt.allocPrint(self.allocator, "{d}", .{self.start});
|
|
5741
|
+
if (self.memo.get(k)) |hit| return hit;
|
|
5742
|
+
const out = try condenseMaterialise(self.allocator, self.cond, self.start);
|
|
5743
|
+
try self.memo.put(k, out);
|
|
5744
|
+
return out;
|
|
5745
|
+
}
|
|
5746
|
+
|
|
5747
|
+
fn resolve(self: CondenseView, path: JsonValue) !i64 {
|
|
5748
|
+
const parts = try condenseParts(self.allocator, path) orelse return -1;
|
|
5749
|
+
return condenseWalk(self.cond, self.start, parts);
|
|
5750
|
+
}
|
|
5751
|
+
};
|
|
5752
|
+
|
|
5753
|
+
// A cursor at node idx when given, else at the root of cond. Views made by at
|
|
5754
|
+
// share memo, the cache that ref reads.
|
|
5755
|
+
pub fn condenseview(allocator: Allocator, cond: JsonValue, idx: ?i64, memo: ?*MapRef) !CondenseView {
|
|
5756
|
+
const start: i64 = idx orelse (if (iscondensed(cond)) condenseRoot(cond) else -1);
|
|
5757
|
+
const refmemo = memo orelse (try JsonValue.makeMap(allocator)).object;
|
|
5758
|
+
return .{ .allocator = allocator, .cond = cond, .start = start, .memo = refmemo };
|
|
5759
|
+
}
|