@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,32 +1,18 @@
|
|
|
1
|
+
# VENDORED: @voxgig/struct 0.1.1 (ruby/voxgig_struct.rb)
|
|
2
|
+
# Source: https://github.com/voxgig/struct @ 358af9d51c90b589a295a70b2165dbe4629eaf8e [tag: sdk-20261125-1959-0]
|
|
3
|
+
# License: MIT (c) voxgig - see repository LICENSE. Do not edit: resync from upstream.
|
|
1
4
|
require 'json'
|
|
2
5
|
require 'uri'
|
|
3
6
|
|
|
4
7
|
module VoxgigStruct
|
|
5
8
|
# --- Debug Logging Configuration ---
|
|
6
9
|
DEBUG = false
|
|
7
|
-
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# into O(n^2).
|
|
14
|
-
#
|
|
15
|
-
# Measured on gitlab-sdk (276 entities in config.options), which constructs
|
|
16
|
-
# one client per generated test:
|
|
17
|
-
#
|
|
18
|
-
# validate(options) 4.620s -> 0.039s (118x)
|
|
19
|
-
# client construction 5.790s -> 0.041s (141x)
|
|
20
|
-
# per-entity validate 0.0182s -> 0.0001s, and flat instead of climbing
|
|
21
|
-
#
|
|
22
|
-
# The whole rb suite took 7,894s against 431s for ts and 255s for php on the
|
|
23
|
-
# SAME model. Ruby was not slow; this was.
|
|
24
|
-
#
|
|
25
|
-
# A block is not evaluated unless yielded, so with DEBUG false the message
|
|
26
|
-
# now costs nothing. Call sites pass `log { "..." }`, never `log("...")`.
|
|
27
|
-
def self.log(msg = nil)
|
|
28
|
-
return unless DEBUG
|
|
29
|
-
puts "[DEBUG] #{block_given? ? yield : msg}"
|
|
10
|
+
|
|
11
|
+
# Lazy: the message block is only evaluated when DEBUG is on, so hot paths
|
|
12
|
+
# never pay to build (and `.inspect`-serialise whole nodes into) a debug
|
|
13
|
+
# string that would just be discarded.
|
|
14
|
+
def self.log
|
|
15
|
+
puts "[DEBUG] #{yield}" if DEBUG
|
|
30
16
|
end
|
|
31
17
|
|
|
32
18
|
# --- Helper to convert internal undefined marker to Ruby nil ---
|
|
@@ -35,58 +21,72 @@ module VoxgigStruct
|
|
|
35
21
|
end
|
|
36
22
|
|
|
37
23
|
# --- Constants ---
|
|
38
|
-
S_MKEYPRE = 'key:pre'
|
|
39
|
-
S_MKEYPOST = 'key:post'
|
|
40
|
-
S_MVAL = 'val'
|
|
41
|
-
S_MKEY = 'key'
|
|
42
|
-
|
|
43
|
-
S_DKEY = '`$KEY`'
|
|
44
|
-
S_DMETA = '`$META`'
|
|
45
|
-
S_DTOP = '$TOP'
|
|
46
|
-
S_DERRS = '$ERRS'
|
|
47
|
-
|
|
48
|
-
S_any = 'any'
|
|
49
|
-
S_array = 'array'
|
|
50
|
-
S_boolean = 'boolean'
|
|
51
|
-
S_decimal = 'decimal'
|
|
52
|
-
S_function = 'function'
|
|
53
|
-
S_instance = 'instance'
|
|
54
|
-
S_integer = 'integer'
|
|
55
|
-
S_list = 'list'
|
|
56
|
-
S_map = 'map'
|
|
57
|
-
S_nil = 'nil'
|
|
58
|
-
S_node = 'node'
|
|
59
|
-
S_number = 'number'
|
|
60
|
-
S_null = 'null'
|
|
61
|
-
S_object = 'object'
|
|
62
|
-
S_scalar = 'scalar'
|
|
63
|
-
S_string = 'string'
|
|
64
|
-
S_symbol = 'symbol'
|
|
65
|
-
S_MT = '' # empty string constant (used as a prefix)
|
|
66
|
-
S_BT = '`'
|
|
67
|
-
S_DS = '$'
|
|
68
|
-
S_DT = '.' # delimiter for key paths
|
|
69
|
-
S_CN = ':' # colon for unknown paths
|
|
70
|
-
S_SP = ' '
|
|
71
|
-
S_VIZ = ': '
|
|
72
|
-
S_KEY = 'KEY'
|
|
24
|
+
S_MKEYPRE = 'key:pre'.freeze
|
|
25
|
+
S_MKEYPOST = 'key:post'.freeze
|
|
26
|
+
S_MVAL = 'val'.freeze
|
|
27
|
+
S_MKEY = 'key'.freeze
|
|
28
|
+
|
|
29
|
+
S_DKEY = '`$KEY`'.freeze
|
|
30
|
+
S_DMETA = '`$META`'.freeze
|
|
31
|
+
S_DTOP = '$TOP'.freeze
|
|
32
|
+
S_DERRS = '$ERRS'.freeze
|
|
33
|
+
|
|
34
|
+
S_any = 'any'.freeze
|
|
35
|
+
S_array = 'array'.freeze
|
|
36
|
+
S_boolean = 'boolean'.freeze
|
|
37
|
+
S_decimal = 'decimal'.freeze
|
|
38
|
+
S_function = 'function'.freeze
|
|
39
|
+
S_instance = 'instance'.freeze
|
|
40
|
+
S_integer = 'integer'.freeze
|
|
41
|
+
S_list = 'list'.freeze
|
|
42
|
+
S_map = 'map'.freeze
|
|
43
|
+
S_nil = 'nil'.freeze
|
|
44
|
+
S_node = 'node'.freeze
|
|
45
|
+
S_number = 'number'.freeze
|
|
46
|
+
S_null = 'null'.freeze
|
|
47
|
+
S_object = 'object'.freeze
|
|
48
|
+
S_scalar = 'scalar'.freeze
|
|
49
|
+
S_string = 'string'.freeze
|
|
50
|
+
S_symbol = 'symbol'.freeze
|
|
51
|
+
S_MT = ''.freeze # empty string constant (used as a prefix)
|
|
52
|
+
S_BT = '`'.freeze
|
|
53
|
+
S_DS = '$'.freeze
|
|
54
|
+
S_DT = '.'.freeze # delimiter for key paths
|
|
55
|
+
S_CN = ':'.freeze # colon for unknown paths
|
|
56
|
+
S_SP = ' '.freeze
|
|
57
|
+
S_VIZ = ': '.freeze
|
|
58
|
+
S_KEY = 'KEY'.freeze
|
|
73
59
|
|
|
74
60
|
# Types - bitfield integers matching TypeScript canonical
|
|
75
61
|
_t = 31
|
|
76
|
-
T_any
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
62
|
+
T_any = (1 << _t) - 1
|
|
63
|
+
_t -= 1
|
|
64
|
+
T_noval = 1 << _t
|
|
65
|
+
_t -= 1
|
|
66
|
+
T_boolean = 1 << _t
|
|
67
|
+
_t -= 1
|
|
68
|
+
T_decimal = 1 << _t
|
|
69
|
+
_t -= 1
|
|
70
|
+
T_integer = 1 << _t
|
|
71
|
+
_t -= 1
|
|
72
|
+
T_number = 1 << _t
|
|
73
|
+
_t -= 1
|
|
74
|
+
T_string = 1 << _t
|
|
75
|
+
_t -= 1
|
|
76
|
+
T_function = 1 << _t
|
|
77
|
+
_t -= 1
|
|
78
|
+
T_symbol = 1 << _t
|
|
79
|
+
_t -= 1
|
|
80
|
+
T_null = 1 << _t
|
|
81
|
+
_t -= 8
|
|
82
|
+
T_list = 1 << _t
|
|
83
|
+
_t -= 1
|
|
84
|
+
T_map = 1 << _t
|
|
85
|
+
_t -= 1
|
|
86
|
+
T_instance = 1 << _t
|
|
87
|
+
_t -= 5
|
|
88
|
+
T_scalar = 1 << _t
|
|
89
|
+
_t -= 1
|
|
90
90
|
T_node = 1 << _t
|
|
91
91
|
|
|
92
92
|
TYPENAME = [
|
|
@@ -95,11 +95,11 @@ module VoxgigStruct
|
|
|
95
95
|
'', '', '', '', '', '', '',
|
|
96
96
|
S_list, S_map, S_instance,
|
|
97
97
|
'', '', '', '',
|
|
98
|
-
S_scalar, S_node
|
|
99
|
-
]
|
|
98
|
+
S_scalar, S_node
|
|
99
|
+
].freeze
|
|
100
100
|
|
|
101
|
-
SKIP = { '`$SKIP`' => true }
|
|
102
|
-
DELETE = { '`$DELETE`' => true }
|
|
101
|
+
SKIP = { '`$SKIP`' => true }.freeze
|
|
102
|
+
DELETE = { '`$DELETE`' => true }.freeze
|
|
103
103
|
|
|
104
104
|
# Unique undefined marker.
|
|
105
105
|
UNDEF = Object.new.freeze
|
|
@@ -131,6 +131,7 @@ module VoxgigStruct
|
|
|
131
131
|
|
|
132
132
|
def self.clone(val)
|
|
133
133
|
return nil if val.nil? || val.equal?(UNDEF)
|
|
134
|
+
|
|
134
135
|
if isfunc(val)
|
|
135
136
|
val
|
|
136
137
|
elsif islist(val)
|
|
@@ -145,14 +146,86 @@ module VoxgigStruct
|
|
|
145
146
|
end
|
|
146
147
|
|
|
147
148
|
def self.escre(s)
|
|
148
|
-
s = s.nil?
|
|
149
|
+
s = '' if s.nil?
|
|
149
150
|
Regexp.escape(s)
|
|
150
151
|
end
|
|
151
152
|
|
|
153
|
+
# ---------------------------------------------------------------------
|
|
154
|
+
# Regex utility — uniform re_* API (see /REGEX_API.md). Ruby's Onigmo
|
|
155
|
+
# engine is a strict superset of RE2.
|
|
156
|
+
# ---------------------------------------------------------------------
|
|
157
|
+
|
|
158
|
+
def self.re_compile(pattern)
|
|
159
|
+
pattern.is_a?(Regexp) ? pattern : Regexp.new(pattern)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def self.re_test(pattern, input)
|
|
163
|
+
!!(re_compile(pattern) =~ input.to_s)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
def self.re_find(pattern, input)
|
|
167
|
+
m = re_compile(pattern).match(input.to_s)
|
|
168
|
+
return nil if m.nil?
|
|
169
|
+
|
|
170
|
+
[m[0]] + m.captures.map { |c| c.nil? ? '' : c }
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
def self.re_find_all(pattern, input)
|
|
174
|
+
out = []
|
|
175
|
+
input.to_s.scan(re_compile(pattern)) do
|
|
176
|
+
m = Regexp.last_match
|
|
177
|
+
out << ([m[0]] + m.captures.map { |c| c.nil? ? '' : c })
|
|
178
|
+
end
|
|
179
|
+
out
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
def self.re_replace(pattern, input, replacement)
|
|
183
|
+
rx = re_compile(pattern)
|
|
184
|
+
if replacement.respond_to?(:call)
|
|
185
|
+
input.to_s.gsub(rx) do |_match|
|
|
186
|
+
m = Regexp.last_match
|
|
187
|
+
replacement.call([m[0]] + m.captures.map { |c| c.nil? ? '' : c })
|
|
188
|
+
end
|
|
189
|
+
else
|
|
190
|
+
# Translate JS-style $& / $1 to Ruby's \0 / \1
|
|
191
|
+
ruby_repl = replacement.gsub(/\$([&0-9])/) do |_|
|
|
192
|
+
ch = ::Regexp.last_match(1)
|
|
193
|
+
ch == '&' ? '\\0' : "\\#{ch}"
|
|
194
|
+
end
|
|
195
|
+
input.to_s.gsub(rx, ruby_repl)
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
def self.re_escape(s)
|
|
200
|
+
escre(s)
|
|
201
|
+
end
|
|
202
|
+
|
|
152
203
|
# Keeps what encodeURIComponent keeps.
|
|
153
204
|
def self.escurl(s)
|
|
154
|
-
s = s.nil?
|
|
155
|
-
URI::DEFAULT_PARSER.escape(s, /[^A-Za-z0-9
|
|
205
|
+
s = '' if s.nil?
|
|
206
|
+
URI::DEFAULT_PARSER.escape(s, /[^A-Za-z0-9\-._~!*'()]/)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
R_LIST_KEY = /\A(0|-?[1-9][0-9]*)\z/.freeze
|
|
210
|
+
|
|
211
|
+
# A list key's index, or nil. As JavaScript reads list[key], that is an integral
|
|
212
|
+
# number or the string String(n) prints for one: "1" and "-1", not "01", "+1" or "-0".
|
|
213
|
+
def self._listkey(key)
|
|
214
|
+
return key if key.is_a?(Integer)
|
|
215
|
+
return key.to_i if key.is_a?(Float) && key.finite? && key == key.to_i
|
|
216
|
+
return key.to_i if key.is_a?(String) && R_LIST_KEY.match?(key)
|
|
217
|
+
|
|
218
|
+
nil
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# The index key reads in a list of size items, or -1. With fromend, as getelem
|
|
222
|
+
# reads it, a negative key counts back from the end.
|
|
223
|
+
def self._listindex(key, size, fromend = false)
|
|
224
|
+
index = _listkey(key)
|
|
225
|
+
return -1 if index.nil?
|
|
226
|
+
|
|
227
|
+
index += size if fromend && index.negative?
|
|
228
|
+
index >= 0 && index < size ? index : -1
|
|
156
229
|
end
|
|
157
230
|
|
|
158
231
|
# --- Internal getprop ---
|
|
@@ -160,46 +233,55 @@ module VoxgigStruct
|
|
|
160
233
|
def self._getprop(val, key, alt = UNDEF)
|
|
161
234
|
log { "(_getprop) called with val=#{val.inspect} and key=#{key.inspect}" }
|
|
162
235
|
return alt if val.nil? || key.nil?
|
|
236
|
+
|
|
163
237
|
if islist(val)
|
|
164
|
-
|
|
165
|
-
|
|
238
|
+
index = _listindex(key, val.size)
|
|
239
|
+
if index.negative?
|
|
166
240
|
log { "(_getprop) index #{key.inspect} out of bounds; returning alt" }
|
|
167
241
|
return alt
|
|
168
242
|
end
|
|
169
|
-
result = val[
|
|
243
|
+
result = val[index]
|
|
170
244
|
log { "(_getprop) returning #{result.inspect} from array for key #{key}" }
|
|
171
|
-
|
|
245
|
+
result
|
|
172
246
|
elsif ismap(val)
|
|
173
247
|
key_str = key.to_s
|
|
174
|
-
|
|
248
|
+
# As in JavaScript, only a string or a number names a map entry: true and [1] do not.
|
|
249
|
+
if !key.is_a?(String) && !key.is_a?(Numeric)
|
|
250
|
+
log { "(_getprop) key #{key.inspect} names no entry; returning alt" }
|
|
251
|
+
alt
|
|
252
|
+
elsif val.key?(key_str)
|
|
175
253
|
result = val[key_str]
|
|
176
254
|
log { "(_getprop) found key #{key_str.inspect} in hash, returning #{result.inspect}" }
|
|
177
|
-
|
|
255
|
+
result
|
|
178
256
|
elsif key.is_a?(String) && val.key?(key.to_sym)
|
|
179
257
|
result = val[key.to_sym]
|
|
180
258
|
log { "(_getprop) found symbol key #{key.to_sym.inspect} in hash, returning #{result.inspect}" }
|
|
181
|
-
|
|
259
|
+
result
|
|
182
260
|
else
|
|
183
261
|
log { "(_getprop) key #{key.inspect} not found; returning alt" }
|
|
184
|
-
|
|
262
|
+
alt
|
|
185
263
|
end
|
|
186
264
|
else
|
|
187
|
-
log {
|
|
265
|
+
log { '(_getprop) value is not a node; returning alt' }
|
|
188
266
|
alt
|
|
189
267
|
end
|
|
190
268
|
end
|
|
191
269
|
|
|
192
270
|
# --- Public getprop ---
|
|
193
|
-
#
|
|
271
|
+
# Group A reader: a stored JSON null (nil) at the key counts as "no value",
|
|
272
|
+
# indistinguishable from absent, so it falls back to alt (canonical TS:
|
|
273
|
+
# `if (null == out) return alt`). Group B callers that must preserve a
|
|
274
|
+
# stored null use _getprop directly.
|
|
194
275
|
def self.getprop(val, key, alt = nil)
|
|
195
|
-
result = _getprop(val, key,
|
|
196
|
-
result.equal?(UNDEF) ? alt : result
|
|
276
|
+
result = _getprop(val, key, UNDEF)
|
|
277
|
+
result.equal?(UNDEF) || result.nil? ? alt : result
|
|
197
278
|
end
|
|
198
279
|
|
|
199
280
|
def self.isempty(val)
|
|
200
|
-
return true if val.nil? || val.equal?(UNDEF) || val ==
|
|
281
|
+
return true if val.nil? || val.equal?(UNDEF) || val == ''
|
|
201
282
|
return true if islist(val) && val.empty?
|
|
202
283
|
return true if ismap(val) && val.empty?
|
|
284
|
+
|
|
203
285
|
false
|
|
204
286
|
end
|
|
205
287
|
|
|
@@ -233,6 +315,8 @@ module VoxgigStruct
|
|
|
233
315
|
def self.setprop(parent, key, val = :no_val_provided)
|
|
234
316
|
log { ">>> setprop called with parent=#{parent.inspect}, key=#{key.inspect}, val=#{val.inspect}" }
|
|
235
317
|
return parent unless iskey(key)
|
|
318
|
+
raise S_CONDENSED_IMMUTABLE if iscondensed(parent)
|
|
319
|
+
|
|
236
320
|
if ismap(parent)
|
|
237
321
|
key_str = key.to_s
|
|
238
322
|
if val == :no_val_provided
|
|
@@ -241,27 +325,23 @@ module VoxgigStruct
|
|
|
241
325
|
parent[key_str] = val
|
|
242
326
|
end
|
|
243
327
|
elsif islist(parent)
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
return parent
|
|
248
|
-
end
|
|
328
|
+
key_i = _listkey(key)
|
|
329
|
+
return parent if key_i.nil?
|
|
330
|
+
|
|
249
331
|
if val == :no_val_provided
|
|
250
332
|
parent.delete_at(key_i) if key_i >= 0 && key_i < parent.length
|
|
333
|
+
elsif key_i >= 0
|
|
334
|
+
index = [key_i, parent.length].min
|
|
335
|
+
parent[index] = val
|
|
251
336
|
else
|
|
252
|
-
|
|
253
|
-
index = key_i >= parent.length ? parent.length : key_i
|
|
254
|
-
parent[index] = val
|
|
255
|
-
else
|
|
256
|
-
parent.unshift(val)
|
|
257
|
-
end
|
|
337
|
+
parent.unshift(val)
|
|
258
338
|
end
|
|
259
339
|
end
|
|
260
340
|
log { "<<< setprop result: #{parent.inspect}" }
|
|
261
341
|
parent
|
|
262
342
|
end
|
|
263
343
|
|
|
264
|
-
def self.stringify(val, maxlen = nil,
|
|
344
|
+
def self.stringify(val, maxlen = nil, _pretty = nil)
|
|
265
345
|
return '' if val.equal?(UNDEF)
|
|
266
346
|
return 'null' if val.nil?
|
|
267
347
|
|
|
@@ -269,7 +349,7 @@ module VoxgigStruct
|
|
|
269
349
|
valstr = val
|
|
270
350
|
else
|
|
271
351
|
begin
|
|
272
|
-
v =
|
|
352
|
+
v = sorted(val)
|
|
273
353
|
valstr = JSON.generate(v)
|
|
274
354
|
valstr = valstr.gsub('"', '')
|
|
275
355
|
rescue StandardError
|
|
@@ -277,11 +357,7 @@ module VoxgigStruct
|
|
|
277
357
|
end
|
|
278
358
|
end
|
|
279
359
|
|
|
280
|
-
if !maxlen.nil? && maxlen >= 0
|
|
281
|
-
if valstr.length > maxlen
|
|
282
|
-
valstr = valstr[0, maxlen - 3] + '...'
|
|
283
|
-
end
|
|
284
|
-
end
|
|
360
|
+
valstr = "#{valstr[0, maxlen - 3]}..." if !maxlen.nil? && maxlen >= 0 && (valstr.length > maxlen)
|
|
285
361
|
|
|
286
362
|
valstr
|
|
287
363
|
end
|
|
@@ -290,48 +366,47 @@ module VoxgigStruct
|
|
|
290
366
|
pathstr = nil
|
|
291
367
|
|
|
292
368
|
path = if islist(val)
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
nil
|
|
300
|
-
end
|
|
369
|
+
val
|
|
370
|
+
elsif val.is_a?(String)
|
|
371
|
+
[val]
|
|
372
|
+
elsif val.is_a?(Numeric)
|
|
373
|
+
[val]
|
|
374
|
+
end
|
|
301
375
|
|
|
302
|
-
start = startin.nil? ? 0 : startin
|
|
303
|
-
end_idx = endin.nil? ? 0 : endin
|
|
376
|
+
start = startin.nil? ? 0 : startin.negative? ? 0 : startin
|
|
377
|
+
end_idx = endin.nil? ? 0 : endin.negative? ? 0 : endin
|
|
304
378
|
|
|
305
379
|
if path && start >= 0
|
|
306
|
-
path = path[start
|
|
307
|
-
if path.empty?
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
380
|
+
path = path[start..(-end_idx - 1)] || []
|
|
381
|
+
pathstr = if path.empty?
|
|
382
|
+
'<root>'
|
|
383
|
+
else
|
|
384
|
+
path
|
|
385
|
+
.select { |p| iskey(p) }
|
|
386
|
+
.map do |p|
|
|
387
|
+
if p.is_a?(Numeric)
|
|
388
|
+
S_MT + p.floor.to_s
|
|
389
|
+
else
|
|
390
|
+
p.gsub('.', S_MT)
|
|
391
|
+
end
|
|
392
|
+
end
|
|
393
|
+
.join(S_DT)
|
|
394
|
+
end
|
|
321
395
|
end
|
|
322
396
|
|
|
323
397
|
if pathstr.nil?
|
|
324
|
-
pathstr =
|
|
398
|
+
pathstr = "<unknown-path#{S_CN + stringify(val, 47) unless val.equal?(UNDEF)}>"
|
|
325
399
|
end
|
|
326
400
|
|
|
327
401
|
pathstr
|
|
328
402
|
end
|
|
329
403
|
|
|
330
404
|
def self.strkey(key = nil)
|
|
331
|
-
return
|
|
405
|
+
return '' if key.nil?
|
|
332
406
|
return key if key.is_a?(String)
|
|
333
407
|
return key.floor.to_s if key.is_a?(Numeric)
|
|
334
|
-
|
|
408
|
+
|
|
409
|
+
''
|
|
335
410
|
end
|
|
336
411
|
|
|
337
412
|
def self.isfunc(val)
|
|
@@ -346,8 +421,9 @@ module VoxgigStruct
|
|
|
346
421
|
return 0 if val.nil? || val.equal?(UNDEF)
|
|
347
422
|
return val.length if val.is_a?(String) || islist(val)
|
|
348
423
|
return val.keys.length if ismap(val)
|
|
349
|
-
return (val == true ? 1 : 0) if
|
|
424
|
+
return (val == true ? 1 : 0) if [true, false].include?(val)
|
|
350
425
|
return val.to_i if val.is_a?(Numeric)
|
|
426
|
+
|
|
351
427
|
0
|
|
352
428
|
end
|
|
353
429
|
|
|
@@ -357,25 +433,26 @@ module VoxgigStruct
|
|
|
357
433
|
if val.is_a?(Numeric) && !val.is_a?(TrueClass) && !val.is_a?(FalseClass)
|
|
358
434
|
s = start_idx.nil? ? (-Float::INFINITY) : start_idx
|
|
359
435
|
e = end_idx.nil? ? Float::INFINITY : (end_idx - 1)
|
|
360
|
-
|
|
436
|
+
# Not Comparable#clamp: that raises when s > e, but here we want e returned.
|
|
437
|
+
return [[val, s].max, e].min # rubocop:disable Style/ComparableClamp
|
|
361
438
|
end
|
|
362
439
|
|
|
363
440
|
vlen = size(val)
|
|
364
441
|
|
|
365
442
|
start_idx = 0 if !end_idx.nil? && start_idx.nil?
|
|
366
443
|
|
|
367
|
-
|
|
444
|
+
unless start_idx.nil?
|
|
368
445
|
s = start_idx
|
|
369
446
|
e = end_idx
|
|
370
447
|
|
|
371
|
-
if s
|
|
448
|
+
if s.negative?
|
|
372
449
|
e = vlen + s
|
|
373
|
-
e = 0 if e
|
|
450
|
+
e = 0 if e.negative?
|
|
374
451
|
s = 0
|
|
375
452
|
elsif !e.nil?
|
|
376
|
-
if e
|
|
453
|
+
if e.negative?
|
|
377
454
|
e = vlen + e
|
|
378
|
-
e = 0 if e
|
|
455
|
+
e = 0 if e.negative?
|
|
379
456
|
elsif vlen < e
|
|
380
457
|
e = vlen
|
|
381
458
|
end
|
|
@@ -401,9 +478,9 @@ module VoxgigStruct
|
|
|
401
478
|
end
|
|
402
479
|
|
|
403
480
|
def self.pad(str, padding = nil, padchar = nil)
|
|
404
|
-
str = str.is_a?(String)
|
|
405
|
-
padding = padding.nil?
|
|
406
|
-
padchar = padchar.nil? ? ' ' :
|
|
481
|
+
str = stringify(str) unless str.is_a?(String)
|
|
482
|
+
padding = 44 if padding.nil?
|
|
483
|
+
padchar = padchar.nil? ? ' ' : "#{padchar} "[0]
|
|
407
484
|
if padding >= 0
|
|
408
485
|
str.ljust(padding, padchar)
|
|
409
486
|
else
|
|
@@ -413,28 +490,26 @@ module VoxgigStruct
|
|
|
413
490
|
|
|
414
491
|
def self.getelem(val, key, alt = UNDEF)
|
|
415
492
|
out = UNDEF
|
|
416
|
-
if islist(val)
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
if key.to_s.strip.match?(/\A-?\d+\z/)
|
|
420
|
-
nkey = val.length + nkey if nkey < 0
|
|
421
|
-
out = (0 <= nkey && nkey < val.length) ? val[nkey] : UNDEF
|
|
422
|
-
end
|
|
423
|
-
rescue
|
|
424
|
-
end
|
|
493
|
+
if islist(val)
|
|
494
|
+
nkey = _listindex(key, val.length, true)
|
|
495
|
+
out = val[nkey] unless nkey.negative?
|
|
425
496
|
end
|
|
426
|
-
|
|
497
|
+
# A null (or absent) slot counts as "no value" — the same Group A rule
|
|
498
|
+
# getprop applies (canonical TS: `if (null == out) return alt`).
|
|
499
|
+
if out.equal?(UNDEF) || out.nil?
|
|
427
500
|
return isfunc(alt) ? alt.call : (alt.equal?(UNDEF) ? nil : alt)
|
|
428
501
|
end
|
|
502
|
+
|
|
429
503
|
out
|
|
430
504
|
end
|
|
431
505
|
|
|
432
506
|
def self.flatten(lst, depth = nil)
|
|
433
507
|
depth = 1 if depth.nil?
|
|
434
508
|
return lst unless islist(lst)
|
|
509
|
+
|
|
435
510
|
out = []
|
|
436
511
|
lst.each do |item|
|
|
437
|
-
if islist(item) && depth
|
|
512
|
+
if islist(item) && depth.positive?
|
|
438
513
|
out.concat(flatten(item, depth - 1))
|
|
439
514
|
else
|
|
440
515
|
out << item unless item.nil? || item.equal?(UNDEF)
|
|
@@ -445,48 +520,46 @@ module VoxgigStruct
|
|
|
445
520
|
|
|
446
521
|
def self.filter(val, check)
|
|
447
522
|
return [] unless isnode(val)
|
|
523
|
+
|
|
448
524
|
items(val).select { |item| check.call(item) }.map { |item| item[1] }
|
|
449
525
|
end
|
|
450
526
|
|
|
451
527
|
def self.delprop(parent, key)
|
|
452
528
|
return parent unless iskey(key)
|
|
529
|
+
raise S_CONDENSED_IMMUTABLE if iscondensed(parent)
|
|
530
|
+
|
|
453
531
|
if ismap(parent)
|
|
454
532
|
ks = strkey(key)
|
|
455
533
|
parent.delete(ks)
|
|
456
534
|
elsif islist(parent)
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
ki = key.to_i
|
|
460
|
-
if 0 <= ki && ki < parent.length
|
|
461
|
-
parent.delete_at(ki)
|
|
462
|
-
end
|
|
463
|
-
rescue
|
|
464
|
-
end
|
|
535
|
+
ki = _listkey(key)
|
|
536
|
+
parent.delete_at(ki) if !ki.nil? && ki >= 0 && ki < parent.length
|
|
465
537
|
end
|
|
466
538
|
parent
|
|
467
539
|
end
|
|
468
540
|
|
|
469
541
|
def self.join(arr, sep = nil, url = nil)
|
|
470
542
|
return '' unless islist(arr)
|
|
543
|
+
|
|
471
544
|
sepdef = sep.nil? ? ',' : sep.to_s
|
|
472
|
-
sepre =
|
|
545
|
+
sepre = sepdef.length == 1 ? Regexp.escape(sepdef) : nil
|
|
473
546
|
|
|
474
547
|
# Filter to non-empty strings only
|
|
475
548
|
parts = arr.select { |n| n.is_a?(String) && n != '' }
|
|
476
549
|
|
|
477
|
-
parts = parts.map.with_index
|
|
550
|
+
parts = parts.map.with_index do |s, i|
|
|
478
551
|
if sepre
|
|
479
|
-
if url && i
|
|
552
|
+
if url && i.zero?
|
|
480
553
|
s = s.sub(/#{sepre}+$/, '')
|
|
481
554
|
next s
|
|
482
555
|
end
|
|
483
|
-
s = s.sub(/^#{sepre}+/, '') if i
|
|
556
|
+
s = s.sub(/^#{sepre}+/, '') if i.positive?
|
|
484
557
|
s = s.sub(/#{sepre}+$/, '') if i < parts.length - 1 || !url
|
|
485
558
|
# Collapse internal duplicate separators
|
|
486
559
|
s = s.gsub(/([^#{sepre}])#{sepre}+([^#{sepre}])/, "\\1#{sepdef}\\2")
|
|
487
560
|
end
|
|
488
561
|
s
|
|
489
|
-
|
|
562
|
+
end.reject(&:empty?)
|
|
490
563
|
|
|
491
564
|
parts.join(sepdef)
|
|
492
565
|
end
|
|
@@ -497,49 +570,55 @@ module VoxgigStruct
|
|
|
497
570
|
|
|
498
571
|
def self.jsonify(val, flags = nil)
|
|
499
572
|
str = 'null'
|
|
500
|
-
|
|
573
|
+
unless val.nil?
|
|
501
574
|
begin
|
|
502
575
|
indent = (flags.is_a?(Hash) ? (flags['indent'] || flags[:indent]) : nil) || 2
|
|
503
576
|
str = _json_stringify(val, indent, 0)
|
|
504
|
-
if str.nil?
|
|
505
|
-
str = 'null'
|
|
506
|
-
end
|
|
577
|
+
str = 'null' if str.nil?
|
|
507
578
|
offset = (flags.is_a?(Hash) ? (flags['offset'] || flags[:offset]) : nil) || 0
|
|
508
|
-
if offset
|
|
579
|
+
if offset.positive?
|
|
509
580
|
lines = str.split("\n")
|
|
510
|
-
|
|
511
|
-
rest = lines[1
|
|
581
|
+
lines[0] || ''
|
|
582
|
+
rest = lines[1..] || []
|
|
512
583
|
rest_indented = rest.map { |l| (' ' * offset) + l }
|
|
513
|
-
str = "{\n
|
|
584
|
+
str = "{\n#{rest_indented.join("\n")}"
|
|
514
585
|
end
|
|
515
|
-
rescue
|
|
586
|
+
rescue StandardError
|
|
516
587
|
str = '__JSONIFY_FAILED__'
|
|
517
588
|
end
|
|
518
589
|
end
|
|
519
590
|
str
|
|
520
591
|
end
|
|
521
592
|
|
|
522
|
-
# Mimic JSON.stringify(val, null, indent) from JavaScript
|
|
593
|
+
# Mimic JSON.stringify(val, null, indent) from JavaScript.
|
|
594
|
+
# indent == 0 → compact single-line. indent > 0 → pretty printed.
|
|
595
|
+
# Map keys are emitted in insertion order (matches TS canonical).
|
|
523
596
|
def self._json_stringify(val, indent, depth)
|
|
524
597
|
return 'null' if val.nil?
|
|
525
|
-
return val.to_s if
|
|
526
|
-
return val.
|
|
598
|
+
return val.to_s if [true, false].include?(val)
|
|
599
|
+
return val.to_s if val.is_a?(Numeric)
|
|
527
600
|
return JSON.generate(val) if val.is_a?(String)
|
|
528
601
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
602
|
+
compact = indent.nil? || indent <= 0
|
|
603
|
+
ind = compact ? '' : ' ' * indent
|
|
604
|
+
current_indent = compact ? '' : ind * (depth + 1)
|
|
605
|
+
closing_indent = compact ? '' : ind * depth
|
|
606
|
+
open_nl = compact ? '' : "\n"
|
|
607
|
+
pair_sep = compact ? ',' : ",\n"
|
|
608
|
+
kv_sep = compact ? ':' : ': '
|
|
532
609
|
|
|
533
610
|
if islist(val)
|
|
534
611
|
return '[]' if val.empty?
|
|
612
|
+
|
|
535
613
|
items_str = val.map { |v| current_indent + _json_stringify(v, indent, depth + 1) }
|
|
536
|
-
"[
|
|
614
|
+
"[#{open_nl}#{items_str.join(pair_sep)}#{open_nl}#{closing_indent}]"
|
|
537
615
|
elsif ismap(val)
|
|
538
616
|
return '{}' if val.empty?
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
617
|
+
|
|
618
|
+
pairs = val.keys.map do |k|
|
|
619
|
+
"#{current_indent}#{JSON.generate(k)}#{kv_sep}#{_json_stringify(val[k], indent, depth + 1)}"
|
|
620
|
+
end
|
|
621
|
+
"{#{open_nl}#{pairs.join(pair_sep)}#{open_nl}#{closing_indent}}"
|
|
543
622
|
elsif isfunc(val)
|
|
544
623
|
'null'
|
|
545
624
|
else
|
|
@@ -563,6 +642,7 @@ module VoxgigStruct
|
|
|
563
642
|
|
|
564
643
|
def self.replace(s, from, to)
|
|
565
644
|
return s.to_s unless s.is_a?(String)
|
|
645
|
+
|
|
566
646
|
if from.is_a?(Regexp)
|
|
567
647
|
s.gsub(from, to.to_s)
|
|
568
648
|
else
|
|
@@ -572,6 +652,7 @@ module VoxgigStruct
|
|
|
572
652
|
|
|
573
653
|
def self.keysof(val)
|
|
574
654
|
return [] unless isnode(val)
|
|
655
|
+
|
|
575
656
|
if ismap(val)
|
|
576
657
|
val.keys.sort
|
|
577
658
|
elsif islist(val)
|
|
@@ -581,34 +662,39 @@ module VoxgigStruct
|
|
|
581
662
|
end
|
|
582
663
|
end
|
|
583
664
|
|
|
584
|
-
#
|
|
665
|
+
# Group A reader: a key whose stored value is JSON null (nil) counts as
|
|
666
|
+
# "no value", same rule as getprop (canonical TS: `null != getprop(val, key)`).
|
|
585
667
|
def self.haskey(val = UNDEF, key = UNDEF)
|
|
586
|
-
|
|
668
|
+
!getprop(val, key).nil?
|
|
587
669
|
end
|
|
588
670
|
|
|
589
|
-
|
|
671
|
+
# NOTE: this is a second, simpler joinurl definition that intentionally
|
|
672
|
+
# overrides the join-based one above; kept for cross-language source parity.
|
|
673
|
+
def self.joinurl(parts) # rubocop:disable Lint/DuplicateMethods
|
|
590
674
|
parts.compact.map.with_index do |s, i|
|
|
591
675
|
s = s.to_s
|
|
592
676
|
if i.zero?
|
|
593
|
-
s.sub(
|
|
677
|
+
s.sub(%r{/+$}, '')
|
|
594
678
|
else
|
|
595
|
-
s.sub(
|
|
679
|
+
s.sub(%r{([^/])/+}, '\1/').sub(%r{^/+}, '').sub(%r{/+$}, '')
|
|
596
680
|
end
|
|
597
|
-
end.reject
|
|
681
|
+
end.reject(&:empty?).join('/')
|
|
598
682
|
end
|
|
599
683
|
|
|
600
684
|
# Get type name string from type bitfield value.
|
|
601
685
|
def self._clz32(n)
|
|
602
686
|
return 32 if n <= 0
|
|
687
|
+
|
|
603
688
|
31 - (n.bit_length - 1)
|
|
604
689
|
end
|
|
605
690
|
|
|
606
691
|
def self.typename(t)
|
|
607
692
|
t = t.to_i
|
|
608
693
|
idx = _clz32(t)
|
|
609
|
-
return TYPENAME[0] if idx
|
|
694
|
+
return TYPENAME[0] if idx.negative? || idx >= TYPENAME.length
|
|
695
|
+
|
|
610
696
|
r = TYPENAME[idx]
|
|
611
|
-
|
|
697
|
+
r.nil? || r == S_MT ? TYPENAME[0] : r
|
|
612
698
|
end
|
|
613
699
|
|
|
614
700
|
# Determine the type of a value as a bitfield integer.
|
|
@@ -616,58 +702,66 @@ module VoxgigStruct
|
|
|
616
702
|
return T_noval if value.equal?(UNDEF)
|
|
617
703
|
return T_scalar | T_null if value.nil?
|
|
618
704
|
|
|
619
|
-
|
|
620
|
-
return T_scalar | T_boolean
|
|
621
|
-
end
|
|
705
|
+
return T_scalar | T_boolean if [true, false].include?(value)
|
|
622
706
|
|
|
623
|
-
if isfunc(value)
|
|
624
|
-
return T_scalar | T_function
|
|
625
|
-
end
|
|
707
|
+
return T_scalar | T_function if isfunc(value)
|
|
626
708
|
|
|
627
|
-
if value.is_a?(Integer)
|
|
628
|
-
return T_scalar | T_number | T_integer
|
|
629
|
-
end
|
|
709
|
+
return T_scalar | T_number | T_integer if value.is_a?(Integer)
|
|
630
710
|
|
|
631
711
|
if value.is_a?(Float)
|
|
632
712
|
return value.nan? ? T_noval : (T_scalar | T_number | T_decimal)
|
|
633
713
|
end
|
|
634
714
|
|
|
635
|
-
if value.is_a?(String)
|
|
636
|
-
return T_scalar | T_string
|
|
637
|
-
end
|
|
715
|
+
return T_scalar | T_string if value.is_a?(String)
|
|
638
716
|
|
|
639
|
-
if value.is_a?(Symbol)
|
|
640
|
-
return T_scalar | T_symbol
|
|
641
|
-
end
|
|
717
|
+
return T_scalar | T_symbol if value.is_a?(Symbol)
|
|
642
718
|
|
|
643
|
-
if islist(value)
|
|
644
|
-
return T_node | T_list
|
|
645
|
-
end
|
|
719
|
+
return T_node | T_list if islist(value)
|
|
646
720
|
|
|
647
|
-
if ismap(value)
|
|
648
|
-
return T_node | T_map
|
|
649
|
-
end
|
|
721
|
+
return T_node | T_map if ismap(value)
|
|
650
722
|
|
|
651
723
|
T_any
|
|
652
724
|
end
|
|
653
725
|
|
|
654
|
-
|
|
655
|
-
|
|
726
|
+
# Walk a data structure depth first, applying a function to each value.
|
|
727
|
+
# The `path` argument passed to the before/after callbacks is a single
|
|
728
|
+
# mutable array per depth, shared across all callback invocations for the
|
|
729
|
+
# lifetime of this top-level walk call. Callbacks that need to store the
|
|
730
|
+
# path MUST clone it (e.g. `path.dup`); the contents will otherwise be
|
|
731
|
+
# overwritten by subsequent visits.
|
|
732
|
+
def self.walk(val, before = nil, after = nil, maxdepth = nil, key: nil, parent: nil, path: nil, pool: nil)
|
|
733
|
+
pool = [[]] if pool.nil?
|
|
734
|
+
path = pool[0] if path.nil?
|
|
735
|
+
|
|
736
|
+
depth = path.length
|
|
656
737
|
|
|
657
738
|
_before = before
|
|
658
739
|
_after = after
|
|
659
740
|
|
|
660
741
|
out = _before.nil? ? val : _before.call(key, val, parent, path)
|
|
661
742
|
|
|
662
|
-
md =
|
|
663
|
-
if md
|
|
664
|
-
return out
|
|
665
|
-
end
|
|
743
|
+
md = maxdepth.is_a?(Numeric) && maxdepth >= 0 ? maxdepth : MAXDEPTH
|
|
744
|
+
return out if md.zero? || (md.positive? && md <= depth)
|
|
666
745
|
|
|
667
746
|
if isnode(out)
|
|
747
|
+
child_depth = depth + 1
|
|
748
|
+
child_path = pool[child_depth]
|
|
749
|
+
if child_path.nil?
|
|
750
|
+
child_path = Array.new(child_depth)
|
|
751
|
+
pool[child_depth] = child_path
|
|
752
|
+
end
|
|
753
|
+
# Sync prefix [0..depth-1] from the current path. Only needed once per
|
|
754
|
+
# parent: siblings share the same prefix and will each overwrite slot
|
|
755
|
+
# [depth] below.
|
|
756
|
+
i = 0
|
|
757
|
+
while i < depth
|
|
758
|
+
child_path[i] = path[i]
|
|
759
|
+
i += 1
|
|
760
|
+
end
|
|
761
|
+
|
|
668
762
|
items(out).each do |ckey, child|
|
|
669
|
-
|
|
670
|
-
result = walk(child, _before, _after, md, key: ckey, parent: out, path:
|
|
763
|
+
child_path[depth] = ckey.to_s
|
|
764
|
+
result = walk(child, _before, _after, md, key: ckey, parent: out, path: child_path, pool: pool)
|
|
671
765
|
if ismap(out)
|
|
672
766
|
out[ckey.to_s] = result
|
|
673
767
|
elsif islist(out)
|
|
@@ -691,24 +785,24 @@ module VoxgigStruct
|
|
|
691
785
|
if ismap(a) && ismap(b)
|
|
692
786
|
merged = a.dup
|
|
693
787
|
b.each do |k, v|
|
|
694
|
-
if merged.key?(k)
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
788
|
+
merged[k] = if merged.key?(k)
|
|
789
|
+
deep_merge(merged[k], v)
|
|
790
|
+
else
|
|
791
|
+
v
|
|
792
|
+
end
|
|
699
793
|
end
|
|
700
794
|
merged
|
|
701
795
|
elsif islist(a) && islist(b)
|
|
702
796
|
max_len = [a.size, b.size].max
|
|
703
797
|
merged = []
|
|
704
798
|
(0...max_len).each do |i|
|
|
705
|
-
if i < a.size && i < b.size
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
799
|
+
merged[i] = if i < a.size && i < b.size
|
|
800
|
+
deep_merge(a[i], b[i])
|
|
801
|
+
elsif i < b.size
|
|
802
|
+
b[i]
|
|
803
|
+
else
|
|
804
|
+
a[i]
|
|
805
|
+
end
|
|
712
806
|
end
|
|
713
807
|
merged
|
|
714
808
|
else
|
|
@@ -726,7 +820,7 @@ module VoxgigStruct
|
|
|
726
820
|
return val unless islist(val)
|
|
727
821
|
|
|
728
822
|
lenlist = val.length
|
|
729
|
-
return nil if lenlist
|
|
823
|
+
return nil if lenlist.zero?
|
|
730
824
|
return val[0] if lenlist == 1
|
|
731
825
|
|
|
732
826
|
out = getprop(val, 0, {})
|
|
@@ -734,10 +828,7 @@ module VoxgigStruct
|
|
|
734
828
|
(1...lenlist).each do |oI|
|
|
735
829
|
obj = val[oI]
|
|
736
830
|
|
|
737
|
-
if
|
|
738
|
-
# Non-nodes (including nil) override directly
|
|
739
|
-
out = obj
|
|
740
|
-
else
|
|
831
|
+
if isnode(obj)
|
|
741
832
|
cur = [out]
|
|
742
833
|
dst = [out]
|
|
743
834
|
|
|
@@ -745,18 +836,18 @@ module VoxgigStruct
|
|
|
745
836
|
pI = path.length
|
|
746
837
|
|
|
747
838
|
if md <= pI
|
|
748
|
-
while cur.length <= pI
|
|
839
|
+
cur << nil while cur.length <= pI
|
|
749
840
|
cur[pI] = v
|
|
750
|
-
setprop(cur[pI - 1], key, v) if pI
|
|
751
|
-
next nil
|
|
841
|
+
setprop(cur[pI - 1], key, v) if pI.positive? && pI - 1 < cur.length
|
|
842
|
+
next nil # stop descending
|
|
752
843
|
elsif !isnode(v)
|
|
753
844
|
cur[pI] = v
|
|
754
845
|
else
|
|
755
846
|
# Extend arrays as needed
|
|
756
|
-
while dst.length <= pI
|
|
757
|
-
while cur.length <= pI
|
|
847
|
+
dst << nil while dst.length <= pI
|
|
848
|
+
cur << nil while cur.length <= pI
|
|
758
849
|
|
|
759
|
-
dst[pI] = pI
|
|
850
|
+
dst[pI] = pI.positive? ? getprop(dst[pI - 1], key) : dst[pI]
|
|
760
851
|
tval = dst[pI]
|
|
761
852
|
|
|
762
853
|
if (islist(v) && islist(tval)) || (ismap(v) && ismap(tval))
|
|
@@ -775,11 +866,11 @@ module VoxgigStruct
|
|
|
775
866
|
after_fn = lambda { |key, _v, parent, path|
|
|
776
867
|
cI = path.length
|
|
777
868
|
if cI < 1
|
|
778
|
-
next (cur.length
|
|
869
|
+
next (cur.length.positive? ? cur[0] : _v)
|
|
779
870
|
end
|
|
780
871
|
|
|
781
|
-
target =
|
|
782
|
-
value =
|
|
872
|
+
target = cI - 1 < cur.length ? cur[cI - 1] : nil
|
|
873
|
+
value = cI < cur.length ? cur[cI] : nil
|
|
783
874
|
|
|
784
875
|
setprop(target, key, value) if target
|
|
785
876
|
|
|
@@ -789,10 +880,13 @@ module VoxgigStruct
|
|
|
789
880
|
}
|
|
790
881
|
|
|
791
882
|
out = walk(obj, before_fn, after_fn)
|
|
883
|
+
else
|
|
884
|
+
# Non-nodes (including nil) override directly
|
|
885
|
+
out = obj
|
|
792
886
|
end
|
|
793
887
|
end
|
|
794
888
|
|
|
795
|
-
if md
|
|
889
|
+
if md.zero?
|
|
796
890
|
out = getelem(val, -1)
|
|
797
891
|
out = islist(out) ? [] : ismap(out) ? {} : out
|
|
798
892
|
end
|
|
@@ -805,15 +899,35 @@ module VoxgigStruct
|
|
|
805
899
|
def self.getpath(store, path, injdef = nil)
|
|
806
900
|
# Operate on a string array.
|
|
807
901
|
if islist(path)
|
|
808
|
-
parts =
|
|
902
|
+
parts = []
|
|
903
|
+
path.each do |part|
|
|
904
|
+
if part.is_a?(Numeric)
|
|
905
|
+
parts << _condensestr(part)
|
|
906
|
+
elsif part.is_a?(String)
|
|
907
|
+
parts << part
|
|
908
|
+
else
|
|
909
|
+
return nil
|
|
910
|
+
end
|
|
911
|
+
end
|
|
809
912
|
elsif path.is_a?(String)
|
|
810
913
|
parts = path.split(S_DT, -1)
|
|
811
914
|
elsif path.is_a?(Numeric)
|
|
812
|
-
parts = [
|
|
915
|
+
parts = [_condensestr(path)]
|
|
813
916
|
else
|
|
814
917
|
return nil
|
|
815
918
|
end
|
|
816
919
|
|
|
920
|
+
# A condensed store answers a path as the node it was built from does,
|
|
921
|
+
# touching only the nodes on the path. A base needs the whole node.
|
|
922
|
+
if iscondensed(store)
|
|
923
|
+
if _injdef_prop(injdef, 'base').nil?
|
|
924
|
+
# A stored null reads as absent, as through getprop.
|
|
925
|
+
return condenseMaterialise(store, condenseResolve(store, store[S_condroot], parts))
|
|
926
|
+
end
|
|
927
|
+
|
|
928
|
+
store = expand(store)
|
|
929
|
+
end
|
|
930
|
+
|
|
817
931
|
val = store
|
|
818
932
|
|
|
819
933
|
# Extract injdef properties (support both Hash and object with accessors)
|
|
@@ -832,22 +946,25 @@ module VoxgigStruct
|
|
|
832
946
|
dpath = injdef.dpath
|
|
833
947
|
handler = injdef.handler
|
|
834
948
|
else
|
|
835
|
-
base = nil
|
|
949
|
+
base = nil
|
|
950
|
+
dparent = nil
|
|
951
|
+
inj_meta = nil
|
|
952
|
+
inj_key = nil
|
|
953
|
+
dpath = nil
|
|
954
|
+
handler = nil
|
|
836
955
|
end
|
|
837
956
|
|
|
838
957
|
src = base ? _getprop(store, base, store) : store
|
|
839
958
|
numparts = parts.length
|
|
840
959
|
|
|
841
960
|
# An empty path (incl empty string) just finds the src.
|
|
842
|
-
if path.nil? || store.nil? || (numparts == 1 && parts[0] == S_MT) || numparts
|
|
961
|
+
if path.nil? || store.nil? || (numparts == 1 && parts[0] == S_MT) || numparts.zero?
|
|
843
962
|
val = src
|
|
844
|
-
elsif numparts
|
|
963
|
+
elsif numparts.positive?
|
|
845
964
|
# Check for $ACTIONs
|
|
846
|
-
if numparts == 1
|
|
847
|
-
val = _getprop(store, parts[0], UNDEF)
|
|
848
|
-
end
|
|
965
|
+
val = _getprop(store, parts[0], UNDEF) if numparts == 1
|
|
849
966
|
|
|
850
|
-
|
|
967
|
+
unless isfunc(val)
|
|
851
968
|
val = src
|
|
852
969
|
|
|
853
970
|
# Check for meta path syntax
|
|
@@ -870,8 +987,8 @@ module VoxgigStruct
|
|
|
870
987
|
part = stringify(getpath(inj_meta, part[6..-2]))
|
|
871
988
|
end
|
|
872
989
|
|
|
873
|
-
# $$ escapes $
|
|
874
|
-
part = part.gsub('$$', '$') if part.is_a?(String)
|
|
990
|
+
# $$ escapes $ (skip the gsub allocation for the common no-`$$` part)
|
|
991
|
+
part = part.gsub('$$', '$') if part.is_a?(String) && part.include?('$$')
|
|
875
992
|
|
|
876
993
|
if part == S_MT
|
|
877
994
|
ascends = 0
|
|
@@ -880,21 +997,21 @@ module VoxgigStruct
|
|
|
880
997
|
pI += 1
|
|
881
998
|
end
|
|
882
999
|
|
|
883
|
-
if injdef && ascends
|
|
1000
|
+
if injdef && ascends.positive?
|
|
884
1001
|
ascends -= 1 if pI == parts.length - 1
|
|
885
|
-
if ascends
|
|
1002
|
+
if ascends.zero?
|
|
886
1003
|
val = dparent
|
|
887
1004
|
else
|
|
888
|
-
fullpath = flatten([slice(dpath, 0 - ascends), parts[(pI + 1)
|
|
889
|
-
if dpath.is_a?(Array) && ascends <= dpath.length
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
1005
|
+
fullpath = flatten([slice(dpath, 0 - ascends), parts[(pI + 1)..]])
|
|
1006
|
+
val = if dpath.is_a?(Array) && ascends <= dpath.length
|
|
1007
|
+
getpath(store, fullpath)
|
|
1008
|
+
else
|
|
1009
|
+
UNDEF
|
|
1010
|
+
end
|
|
894
1011
|
break
|
|
895
1012
|
end
|
|
896
1013
|
else
|
|
897
|
-
val = dparent
|
|
1014
|
+
val = dparent
|
|
898
1015
|
end
|
|
899
1016
|
else
|
|
900
1017
|
val = _getprop(val, part, UNDEF)
|
|
@@ -913,17 +1030,17 @@ module VoxgigStruct
|
|
|
913
1030
|
val.equal?(UNDEF) ? nil : val
|
|
914
1031
|
end
|
|
915
1032
|
|
|
1033
|
+
S_BKEY = '`$KEY`'.freeze
|
|
1034
|
+
S_BANNO = '`$ANNO`'.freeze
|
|
1035
|
+
S_BEXACT = '`$EXACT`'.freeze
|
|
1036
|
+
S_BVAL = '`$VAL`'.freeze
|
|
1037
|
+
S_DSPEC = '$SPEC'.freeze
|
|
916
1038
|
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
R_FULL_INJECT = /\A`(\$[A-Z]+|[^`]*)[0-9]*`\z/
|
|
924
|
-
R_PART_INJECT = /`([^`]*)`/
|
|
925
|
-
R_META_PATH = /\A([^$]+)\$([=~])(.+)\z/
|
|
926
|
-
R_DOUBLE_DOLLAR = /\$\$/
|
|
1039
|
+
R_FULL_INJECT = /\A`(\$[A-Z]+|[^`]*)[0-9]*`\z/.freeze
|
|
1040
|
+
R_CHECKER_NAME = /\A\$[A-Z]+\z/.freeze
|
|
1041
|
+
R_PART_INJECT = /`([^`]*)`/.freeze
|
|
1042
|
+
R_META_PATH = /\A([^$]+)\$([=~])(.+)\z/.freeze
|
|
1043
|
+
R_DOUBLE_DOLLAR = /\$\$/.freeze
|
|
927
1044
|
|
|
928
1045
|
# --- _injectstr: Resolve backtick expressions in strings ---
|
|
929
1046
|
def self._injectstr(val, store, inj = nil)
|
|
@@ -937,19 +1054,15 @@ module VoxgigStruct
|
|
|
937
1054
|
inj.full = true if inj
|
|
938
1055
|
|
|
939
1056
|
pathref = m[1]
|
|
940
|
-
if pathref.length > 3
|
|
941
|
-
pathref = pathref.gsub('$BT', S_BT).gsub('$DS', S_DS)
|
|
942
|
-
end
|
|
1057
|
+
pathref = pathref.gsub('$BT', S_BT).gsub('$DS', S_DS) if pathref.length > 3
|
|
943
1058
|
|
|
944
1059
|
out = getpath(store, pathref, inj)
|
|
945
1060
|
|
|
946
1061
|
else
|
|
947
1062
|
# Partial string injection: "prefix`ref`suffix"
|
|
948
1063
|
out = val.gsub(R_PART_INJECT) do |_match|
|
|
949
|
-
ref =
|
|
950
|
-
if ref.length > 3
|
|
951
|
-
ref = ref.gsub('$BT', S_BT).gsub('$DS', S_DS)
|
|
952
|
-
end
|
|
1064
|
+
ref = ::Regexp.last_match(1)
|
|
1065
|
+
ref = ref.gsub('$BT', S_BT).gsub('$DS', S_DS) if ref.length > 3
|
|
953
1066
|
|
|
954
1067
|
inj.full = false if inj
|
|
955
1068
|
|
|
@@ -968,7 +1081,7 @@ module VoxgigStruct
|
|
|
968
1081
|
else
|
|
969
1082
|
begin
|
|
970
1083
|
JSON.generate(found)
|
|
971
|
-
rescue
|
|
1084
|
+
rescue StandardError
|
|
972
1085
|
stringify(found)
|
|
973
1086
|
end
|
|
974
1087
|
end
|
|
@@ -1014,12 +1127,15 @@ module VoxgigStruct
|
|
|
1014
1127
|
|
|
1015
1128
|
inj.descend
|
|
1016
1129
|
|
|
1130
|
+
inj.named = false
|
|
1131
|
+
|
|
1017
1132
|
# Descend into node.
|
|
1018
1133
|
if isnode(val)
|
|
1019
1134
|
if ismap(val)
|
|
1020
|
-
normal = val.keys.
|
|
1135
|
+
normal = val.keys.reject { |k| k.include?(S_DS) }.sort
|
|
1021
1136
|
transforms = val.keys.select { |k| k.include?(S_DS) }.sort
|
|
1022
1137
|
nodekeys = normal + transforms
|
|
1138
|
+
inj.named = !normal.empty?
|
|
1023
1139
|
else
|
|
1024
1140
|
nodekeys = (0...val.length).to_a
|
|
1025
1141
|
end
|
|
@@ -1035,7 +1151,7 @@ module VoxgigStruct
|
|
|
1035
1151
|
nkI = childinj.keyI
|
|
1036
1152
|
nodekeys = childinj.keys
|
|
1037
1153
|
|
|
1038
|
-
|
|
1154
|
+
unless prekey.nil?
|
|
1039
1155
|
childinj.val = getprop(val, prekey)
|
|
1040
1156
|
childinj.mode = S_MVAL
|
|
1041
1157
|
|
|
@@ -1054,6 +1170,8 @@ module VoxgigStruct
|
|
|
1054
1170
|
nkI += 1
|
|
1055
1171
|
end
|
|
1056
1172
|
|
|
1173
|
+
val.reject! { |v| v.equal?(SKIP) } if islist(val)
|
|
1174
|
+
|
|
1057
1175
|
elsif val.is_a?(String)
|
|
1058
1176
|
inj.mode = S_MVAL
|
|
1059
1177
|
val = _injectstr(val, store, inj)
|
|
@@ -1065,29 +1183,29 @@ module VoxgigStruct
|
|
|
1065
1183
|
mkey = inj.key
|
|
1066
1184
|
mparent = inj.parent
|
|
1067
1185
|
mval = getprop(mparent, mkey)
|
|
1068
|
-
inj.modify.call(mval, mkey, mparent, inj)
|
|
1186
|
+
inj.modify.call(mval.equal?(SKIP) ? nil : mval, mkey, mparent, inj)
|
|
1069
1187
|
end
|
|
1070
1188
|
|
|
1071
1189
|
inj.val = val
|
|
1072
1190
|
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
return getprop(inj.parent, S_DTOP)
|
|
1191
|
+
# Read the top literally: a null stored there is the result, a removed top is no value.
|
|
1192
|
+
if inj.prior.nil? && ismap(inj.root)
|
|
1193
|
+
top = _getprop(inj.root, S_DTOP)
|
|
1194
|
+
return top.equal?(UNDEF) ? nil : top
|
|
1078
1195
|
end
|
|
1196
|
+
return getprop(inj.parent, S_DTOP) if inj.key == S_DTOP && inj.parent && haskey(inj.parent, S_DTOP)
|
|
1197
|
+
|
|
1079
1198
|
val
|
|
1080
1199
|
end
|
|
1081
1200
|
|
|
1082
1201
|
# Helper to read a property from injdef (Hash or object)
|
|
1083
1202
|
def self._injdef_prop(injdef, key)
|
|
1084
1203
|
return nil if injdef.nil?
|
|
1204
|
+
|
|
1085
1205
|
if injdef.is_a?(Hash)
|
|
1086
1206
|
injdef[key] || injdef[key.to_sym]
|
|
1087
1207
|
elsif injdef.respond_to?(key.to_sym)
|
|
1088
1208
|
injdef.send(key.to_sym)
|
|
1089
|
-
else
|
|
1090
|
-
nil
|
|
1091
1209
|
end
|
|
1092
1210
|
end
|
|
1093
1211
|
|
|
@@ -1108,7 +1226,7 @@ module VoxgigStruct
|
|
|
1108
1226
|
# --- Transform commands ---
|
|
1109
1227
|
|
|
1110
1228
|
def self.transform_DELETE(inj, _val, _ref, _store)
|
|
1111
|
-
inj.setval(
|
|
1229
|
+
inj.setval(UNDEF)
|
|
1112
1230
|
nil
|
|
1113
1231
|
end
|
|
1114
1232
|
|
|
@@ -1120,11 +1238,11 @@ module VoxgigStruct
|
|
|
1120
1238
|
if mode.start_with?('key')
|
|
1121
1239
|
out = key
|
|
1122
1240
|
else
|
|
1123
|
-
if
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1241
|
+
out = if isnode(inj.dparent)
|
|
1242
|
+
getprop(inj.dparent, key)
|
|
1243
|
+
else
|
|
1244
|
+
inj.path.length == 2 ? nil : inj.dparent
|
|
1245
|
+
end
|
|
1128
1246
|
inj.setval(out)
|
|
1129
1247
|
end
|
|
1130
1248
|
out
|
|
@@ -1144,9 +1262,7 @@ module VoxgigStruct
|
|
|
1144
1262
|
return getprop(inj.dparent, keyspec)
|
|
1145
1263
|
end
|
|
1146
1264
|
|
|
1147
|
-
if ismap(inj.dparent) && inj.key && haskey(inj.dparent, inj.key)
|
|
1148
|
-
return getprop(inj.dparent, inj.key)
|
|
1149
|
-
end
|
|
1265
|
+
return getprop(inj.dparent, inj.key) if ismap(inj.dparent) && inj.key && haskey(inj.dparent, inj.key)
|
|
1150
1266
|
|
|
1151
1267
|
meta = getprop(parent, S_BANNO)
|
|
1152
1268
|
getprop(meta, S_KEY, getprop(path, path.length - 2))
|
|
@@ -1171,19 +1287,19 @@ module VoxgigStruct
|
|
|
1171
1287
|
return key
|
|
1172
1288
|
elsif mode == S_MKEYPOST
|
|
1173
1289
|
args = getprop(parent, key)
|
|
1174
|
-
args = islist(args)
|
|
1175
|
-
inj.setval(
|
|
1290
|
+
args = [args] unless islist(args)
|
|
1291
|
+
inj.setval(UNDEF)
|
|
1176
1292
|
mergelist = [parent] + args + [clone(parent)]
|
|
1177
1293
|
merge(mergelist)
|
|
1178
1294
|
return key
|
|
1179
1295
|
elsif mode == S_MVAL && islist(parent)
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
end
|
|
1296
|
+
return getprop(parent, inj.key) unless strkey(inj.key) == '0' && size(parent).positive?
|
|
1297
|
+
|
|
1298
|
+
parent.delete_at(0)
|
|
1299
|
+
return getprop(parent, 0)
|
|
1300
|
+
|
|
1186
1301
|
end
|
|
1302
|
+
|
|
1187
1303
|
nil
|
|
1188
1304
|
end
|
|
1189
1305
|
|
|
@@ -1194,7 +1310,7 @@ module VoxgigStruct
|
|
|
1194
1310
|
parent = inj.parent
|
|
1195
1311
|
nodes_ = inj.nodes
|
|
1196
1312
|
|
|
1197
|
-
keys_
|
|
1313
|
+
keys_&.replace(keys_[0, 1])
|
|
1198
1314
|
|
|
1199
1315
|
return nil if mode != S_MVAL || !path || !nodes_
|
|
1200
1316
|
|
|
@@ -1214,7 +1330,7 @@ module VoxgigStruct
|
|
|
1214
1330
|
tval = src.map { clone(child_template) }
|
|
1215
1331
|
else
|
|
1216
1332
|
tval = []
|
|
1217
|
-
src.
|
|
1333
|
+
src.each_key do |k|
|
|
1218
1334
|
cc = clone(child_template)
|
|
1219
1335
|
setprop(cc, S_BANNO, { S_KEY => k }) if ismap(cc)
|
|
1220
1336
|
tval << cc
|
|
@@ -1222,7 +1338,7 @@ module VoxgigStruct
|
|
|
1222
1338
|
end
|
|
1223
1339
|
tcurrent = ismap(src) ? src.values : src
|
|
1224
1340
|
|
|
1225
|
-
if size(tval)
|
|
1341
|
+
if size(tval).positive?
|
|
1226
1342
|
ckey = getelem(path, -2)
|
|
1227
1343
|
tpath = path[0...-1]
|
|
1228
1344
|
|
|
@@ -1230,19 +1346,19 @@ module VoxgigStruct
|
|
|
1230
1346
|
if srcpath.is_a?(String) && !srcpath.empty?
|
|
1231
1347
|
srcpath.split(S_DT).each { |p| dpath << p if p != S_MT }
|
|
1232
1348
|
end
|
|
1233
|
-
dpath <<
|
|
1349
|
+
dpath << "$:#{ckey}" if ckey
|
|
1234
1350
|
|
|
1235
1351
|
tcur = { ckey => tcurrent }
|
|
1236
1352
|
|
|
1237
1353
|
if size(tpath) > 1
|
|
1238
1354
|
pkey = getelem(path, -3, S_DTOP)
|
|
1239
1355
|
tcur = { pkey => tcur }
|
|
1240
|
-
dpath <<
|
|
1356
|
+
dpath << "$:#{pkey}"
|
|
1241
1357
|
end
|
|
1242
1358
|
|
|
1243
1359
|
tinj = inj.child(0, ckey ? [ckey] : [])
|
|
1244
1360
|
tinj.path = tpath
|
|
1245
|
-
tinj.nodes = nodes_.length
|
|
1361
|
+
tinj.nodes = nodes_.length.positive? ? nodes_[0...-1] : []
|
|
1246
1362
|
tinj.parent = getelem(tinj.nodes, -1)
|
|
1247
1363
|
setprop(tinj.parent, ckey, tval) if ckey && tinj.parent
|
|
1248
1364
|
tinj.val = tval
|
|
@@ -1255,7 +1371,7 @@ module VoxgigStruct
|
|
|
1255
1371
|
end
|
|
1256
1372
|
|
|
1257
1373
|
setprop(target, tkey, rval)
|
|
1258
|
-
islist(rval) && size(rval)
|
|
1374
|
+
islist(rval) && size(rval).positive? ? rval[0] : nil
|
|
1259
1375
|
end
|
|
1260
1376
|
|
|
1261
1377
|
def self.transform_PACK(inj, _val, _ref, store)
|
|
@@ -1275,12 +1391,12 @@ module VoxgigStruct
|
|
|
1275
1391
|
|
|
1276
1392
|
tkey = getelem(path, -2)
|
|
1277
1393
|
pathsize = size(path)
|
|
1278
|
-
target = getelem(nodes_, pathsize - 2,
|
|
1394
|
+
target = getelem(nodes_, pathsize - 2, -> { getelem(nodes_, pathsize - 1) })
|
|
1279
1395
|
|
|
1280
1396
|
srcstore = getprop(store, inj.base, store)
|
|
1281
1397
|
src = getpath(srcstore, srcpath, inj)
|
|
1282
1398
|
|
|
1283
|
-
|
|
1399
|
+
unless islist(src)
|
|
1284
1400
|
if ismap(src)
|
|
1285
1401
|
new_src = []
|
|
1286
1402
|
items(src).each do |item|
|
|
@@ -1306,11 +1422,11 @@ module VoxgigStruct
|
|
|
1306
1422
|
|
|
1307
1423
|
k = srckey
|
|
1308
1424
|
if keypath
|
|
1309
|
-
if keypath.is_a?(String) && keypath.start_with?(S_BT)
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1425
|
+
k = if keypath.is_a?(String) && keypath.start_with?(S_BT)
|
|
1426
|
+
inject(keypath, merge([{}, store, { S_DTOP => srcnode }], 1))
|
|
1427
|
+
else
|
|
1428
|
+
getpath(srcnode, keypath, inj)
|
|
1429
|
+
end
|
|
1314
1430
|
end
|
|
1315
1431
|
|
|
1316
1432
|
tchild = clone(child)
|
|
@@ -1326,28 +1442,28 @@ module VoxgigStruct
|
|
|
1326
1442
|
|
|
1327
1443
|
rval = {}
|
|
1328
1444
|
|
|
1329
|
-
|
|
1445
|
+
unless isempty(tval)
|
|
1330
1446
|
tsrc = {}
|
|
1331
1447
|
src.each_with_index do |n, i|
|
|
1332
|
-
if keypath.nil?
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1448
|
+
kn = if keypath.nil?
|
|
1449
|
+
i
|
|
1450
|
+
elsif keypath.is_a?(String) && keypath.start_with?(S_BT)
|
|
1451
|
+
inject(keypath, merge([{}, store, { S_DTOP => n }], 1))
|
|
1452
|
+
else
|
|
1453
|
+
getpath(n, keypath, inj)
|
|
1454
|
+
end
|
|
1339
1455
|
setprop(tsrc, kn, n)
|
|
1340
1456
|
end
|
|
1341
1457
|
|
|
1342
1458
|
tpath = slice(inj.path, -1)
|
|
1343
1459
|
ckey = getelem(inj.path, -2)
|
|
1344
|
-
dpath = flatten([S_DTOP, srcpath.to_s.split(S_DT),
|
|
1460
|
+
dpath = flatten([S_DTOP, srcpath.to_s.split(S_DT), "$:#{ckey}"])
|
|
1345
1461
|
|
|
1346
1462
|
tcur = { ckey => tsrc }
|
|
1347
1463
|
if size(tpath) > 1
|
|
1348
1464
|
pkey = getelem(inj.path, -3, S_DTOP)
|
|
1349
1465
|
tcur = { pkey => tcur }
|
|
1350
|
-
dpath <<
|
|
1466
|
+
dpath << "$:#{pkey}"
|
|
1351
1467
|
end
|
|
1352
1468
|
|
|
1353
1469
|
tinj = inj.child(0, [ckey])
|
|
@@ -1367,68 +1483,70 @@ module VoxgigStruct
|
|
|
1367
1483
|
end
|
|
1368
1484
|
|
|
1369
1485
|
def self.transform_REF(inj, _val, _ref, store)
|
|
1370
|
-
|
|
1371
|
-
return nil if S_MVAL != inj.mode
|
|
1486
|
+
return nil if inj.mode != S_MVAL
|
|
1372
1487
|
|
|
1488
|
+
# A relative path starts where this slot is, so .x is a sibling.
|
|
1373
1489
|
refpath = getprop(inj.parent, 1)
|
|
1374
1490
|
inj.keyI = size(inj.keys)
|
|
1375
1491
|
|
|
1376
1492
|
specFn = getprop(store, S_DSPEC)
|
|
1377
1493
|
spec = isfunc(specFn) ? specFn.call : nil
|
|
1378
1494
|
|
|
1379
|
-
dpath = slice(inj.path, 1)
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
'dparent' => getpath(spec, dpath),
|
|
1383
|
-
})
|
|
1384
|
-
|
|
1385
|
-
tref = clone(ref)
|
|
1386
|
-
|
|
1387
|
-
cpath = slice(inj.path, -3)
|
|
1388
|
-
tpath = slice(inj.path, -1)
|
|
1389
|
-
tcur = getpath(store, cpath)
|
|
1390
|
-
tval = getpath(store, tpath)
|
|
1391
|
-
rval = nil
|
|
1392
|
-
|
|
1393
|
-
if tval || !isnode(ref)
|
|
1394
|
-
tinj = inj.child(0, [getelem(tpath, -1)])
|
|
1395
|
-
tinj.path = tpath
|
|
1396
|
-
tinj.nodes = slice(inj.nodes, -1)
|
|
1397
|
-
tinj.parent = getelem(nodes_, -2)
|
|
1398
|
-
tinj.val = tref
|
|
1399
|
-
|
|
1400
|
-
tinj.dpath = flatten([cpath])
|
|
1401
|
-
tinj.dparent = tcur
|
|
1495
|
+
dpath = slice(inj.path, 1, -2)
|
|
1496
|
+
refinj = { 'dpath' => dpath, 'dparent' => getpath(spec, dpath) }
|
|
1497
|
+
ref = getpath(spec, refpath, refinj)
|
|
1402
1498
|
|
|
1403
|
-
|
|
1404
|
-
|
|
1499
|
+
# A chain of references that comes back to a path it has named names nothing.
|
|
1500
|
+
seen = [refpath]
|
|
1501
|
+
nxt = ref
|
|
1502
|
+
while islist(nxt) && nxt[0] == '`$REF`'
|
|
1503
|
+
if seen.include?(nxt[1])
|
|
1504
|
+
ref = nil
|
|
1505
|
+
break
|
|
1506
|
+
end
|
|
1507
|
+
seen << nxt[1]
|
|
1508
|
+
nxt = getpath(spec, nxt[1], refinj)
|
|
1405
1509
|
end
|
|
1406
1510
|
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1511
|
+
hasSubRef = false
|
|
1512
|
+
if isnode(ref)
|
|
1513
|
+
walk(ref, lambda { |_k, v, *_a|
|
|
1514
|
+
hasSubRef = true if v == '`$REF`'
|
|
1515
|
+
v
|
|
1516
|
+
})
|
|
1413
1517
|
end
|
|
1414
1518
|
|
|
1415
|
-
|
|
1416
|
-
|
|
1519
|
+
# A recursive reference stops where the data does.
|
|
1520
|
+
tval = getpath(store, slice(inj.path, -1))
|
|
1521
|
+
rval = !hasSubRef || !tval.nil? ? clone(ref) : nil
|
|
1522
|
+
|
|
1523
|
+
# The enclosing loop injects the referenced spec in this list's place, so
|
|
1524
|
+
# neither this pass nor this element leaves a value for modify to check.
|
|
1525
|
+
grandparent = inj.setval(rval, 2)
|
|
1526
|
+
|
|
1527
|
+
prior = inj.prior
|
|
1528
|
+
if prior
|
|
1529
|
+
prior.modify = nil
|
|
1530
|
+
prior.keyI -= 1 if islist(grandparent) || !rval.nil?
|
|
1417
1531
|
end
|
|
1418
1532
|
|
|
1419
|
-
|
|
1533
|
+
SKIP
|
|
1420
1534
|
end
|
|
1421
1535
|
|
|
1422
1536
|
FORMATTER = {
|
|
1423
|
-
'identity' =>
|
|
1424
|
-
'upper' =>
|
|
1425
|
-
'lower' =>
|
|
1426
|
-
'string' =>
|
|
1537
|
+
'identity' => ->(_k, v, *_a) { v },
|
|
1538
|
+
'upper' => ->(_k, v, *_a) { isnode(v) ? v : (v.nil? ? 'null' : v.to_s).upcase },
|
|
1539
|
+
'lower' => ->(_k, v, *_a) { isnode(v) ? v : (v.nil? ? 'null' : v.to_s).downcase },
|
|
1540
|
+
'string' => ->(_k, v, *_a) { isnode(v) ? v : (v.nil? ? 'null' : v.to_s) },
|
|
1427
1541
|
'number' => lambda { |_k, v, *_a|
|
|
1428
1542
|
if isnode(v)
|
|
1429
1543
|
v
|
|
1430
1544
|
else
|
|
1431
|
-
n =
|
|
1545
|
+
n = begin
|
|
1546
|
+
Float(v)
|
|
1547
|
+
rescue StandardError
|
|
1548
|
+
0
|
|
1549
|
+
end
|
|
1432
1550
|
n
|
|
1433
1551
|
end
|
|
1434
1552
|
},
|
|
@@ -1436,36 +1554,40 @@ module VoxgigStruct
|
|
|
1436
1554
|
if isnode(v)
|
|
1437
1555
|
v
|
|
1438
1556
|
else
|
|
1439
|
-
n =
|
|
1557
|
+
n = begin
|
|
1558
|
+
Integer(Float(v))
|
|
1559
|
+
rescue StandardError
|
|
1560
|
+
0
|
|
1561
|
+
end
|
|
1440
1562
|
n
|
|
1441
1563
|
end
|
|
1442
1564
|
},
|
|
1443
1565
|
'concat' => lambda { |k, v, *_a|
|
|
1444
1566
|
if k.nil? && islist(v)
|
|
1445
|
-
items(v,
|
|
1567
|
+
items(v, ->(n) { isnode(n[1]) ? '' : (n[1].nil? ? 'null' : n[1].to_s) }).join
|
|
1446
1568
|
else
|
|
1447
1569
|
v
|
|
1448
1570
|
end
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1571
|
+
}
|
|
1572
|
+
}.freeze
|
|
1451
1573
|
|
|
1452
1574
|
def self.transform_FORMAT(inj, _val, _ref, store)
|
|
1453
1575
|
slice(inj.keys, 0, 1, true)
|
|
1454
|
-
return nil if
|
|
1576
|
+
return nil if inj.mode != S_MVAL
|
|
1455
1577
|
|
|
1456
1578
|
name = getprop(inj.parent, 1)
|
|
1457
1579
|
child = getprop(inj.parent, 2)
|
|
1458
1580
|
|
|
1459
1581
|
tkey = getelem(inj.path, -2)
|
|
1460
|
-
target = getelem(inj.nodes, -2,
|
|
1582
|
+
target = getelem(inj.nodes, -2, -> { getelem(inj.nodes, -1) })
|
|
1461
1583
|
|
|
1462
1584
|
cinj = injectChild(child, store, inj)
|
|
1463
1585
|
resolved = cinj.val
|
|
1464
1586
|
|
|
1465
|
-
formatter = (
|
|
1587
|
+
formatter = T_function.anybits?(typify(name)) ? name : FORMATTER[name]
|
|
1466
1588
|
|
|
1467
1589
|
if formatter.nil?
|
|
1468
|
-
inj.errs <<
|
|
1590
|
+
inj.errs << "$FORMAT: unknown format: #{name}."
|
|
1469
1591
|
return nil
|
|
1470
1592
|
end
|
|
1471
1593
|
|
|
@@ -1482,12 +1604,12 @@ module VoxgigStruct
|
|
|
1482
1604
|
args_list = islist(args) ? args : []
|
|
1483
1605
|
err, apply, child = injectorArgs([T_function, T_any], args_list)
|
|
1484
1606
|
if err
|
|
1485
|
-
inj.errs <<
|
|
1607
|
+
inj.errs << "$#{ijname}: #{err}"
|
|
1486
1608
|
return nil
|
|
1487
1609
|
end
|
|
1488
1610
|
|
|
1489
1611
|
tkey = getelem(inj.path, -2)
|
|
1490
|
-
target = getelem(inj.nodes, -2,
|
|
1612
|
+
target = getelem(inj.nodes, -2, -> { getelem(inj.nodes, -1) })
|
|
1491
1613
|
|
|
1492
1614
|
cinj = injectChild(child, store, inj)
|
|
1493
1615
|
resolved = cinj.val
|
|
@@ -1500,16 +1622,16 @@ module VoxgigStruct
|
|
|
1500
1622
|
def self.checkPlacement(modes, ijname, parentTypes, inj)
|
|
1501
1623
|
mode_num = { S_MKEYPRE => M_KEYPRE, S_MKEYPOST => M_KEYPOST, S_MVAL => M_VAL }
|
|
1502
1624
|
mode_int = mode_num[inj.mode] || 0
|
|
1503
|
-
if
|
|
1504
|
-
|
|
1505
|
-
|
|
1625
|
+
if modes.nobits?(mode_int)
|
|
1626
|
+
expected = [M_KEYPRE, M_KEYPOST, M_VAL].reject { |m| modes.nobits?(m) }
|
|
1627
|
+
expected = expected.map { |m| PLACEMENT[m] }.join(',')
|
|
1628
|
+
inj.errs << "$#{ijname}: invalid placement as #{PLACEMENT[mode_int] || ''}, expected: #{expected}."
|
|
1506
1629
|
return false
|
|
1507
1630
|
end
|
|
1508
|
-
|
|
1631
|
+
unless isempty(parentTypes)
|
|
1509
1632
|
ptype = typify(inj.parent)
|
|
1510
|
-
if
|
|
1511
|
-
inj.errs <<
|
|
1512
|
-
', expected: ' + typename(parentTypes) + '.'
|
|
1633
|
+
if parentTypes.nobits?(ptype)
|
|
1634
|
+
inj.errs << "$#{ijname}: invalid placement in parent #{typename(ptype)}, expected: #{typename(parentTypes)}."
|
|
1513
1635
|
return false
|
|
1514
1636
|
end
|
|
1515
1637
|
end
|
|
@@ -1523,10 +1645,10 @@ module VoxgigStruct
|
|
|
1523
1645
|
(0...numargs).each do |argI|
|
|
1524
1646
|
arg = args[argI]
|
|
1525
1647
|
argType = typify(arg)
|
|
1526
|
-
if
|
|
1527
|
-
found[0] =
|
|
1528
|
-
|
|
1529
|
-
|
|
1648
|
+
if argTypes[argI].nobits?(argType)
|
|
1649
|
+
found[0] =
|
|
1650
|
+
"invalid argument: #{stringify(arg, 22)} (#{typename(argType)} at position #{1 + argI}) " \
|
|
1651
|
+
"is not of type: #{typename(argTypes[argI])}."
|
|
1530
1652
|
break
|
|
1531
1653
|
end
|
|
1532
1654
|
found[1 + argI] = arg
|
|
@@ -1575,16 +1697,16 @@ module VoxgigStruct
|
|
|
1575
1697
|
end
|
|
1576
1698
|
|
|
1577
1699
|
data_clone = merge([
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1700
|
+
isempty(extraData) ? nil : clone(extraData),
|
|
1701
|
+
clone(data)
|
|
1702
|
+
])
|
|
1581
1703
|
|
|
1582
1704
|
store = {
|
|
1583
1705
|
S_DTOP => data_clone,
|
|
1584
|
-
S_DSPEC =>
|
|
1585
|
-
'$BT' =>
|
|
1586
|
-
'$DS' =>
|
|
1587
|
-
'$WHEN' =>
|
|
1706
|
+
S_DSPEC => -> { origspec },
|
|
1707
|
+
'$BT' => ->(*_a) { S_BT },
|
|
1708
|
+
'$DS' => ->(*_a) { S_DS },
|
|
1709
|
+
'$WHEN' => ->(*_a) { Time.now.iso8601 },
|
|
1588
1710
|
'$DELETE' => method(:transform_DELETE),
|
|
1589
1711
|
'$COPY' => method(:transform_COPY),
|
|
1590
1712
|
'$KEY' => method(:transform_KEY),
|
|
@@ -1595,7 +1717,7 @@ module VoxgigStruct
|
|
|
1595
1717
|
'$PACK' => method(:transform_PACK),
|
|
1596
1718
|
'$REF' => method(:transform_REF),
|
|
1597
1719
|
'$FORMAT' => method(:transform_FORMAT),
|
|
1598
|
-
'$APPLY' => method(:transform_APPLY)
|
|
1720
|
+
'$APPLY' => method(:transform_APPLY)
|
|
1599
1721
|
}
|
|
1600
1722
|
extraTransforms.each { |k, v| store[k] = v }
|
|
1601
1723
|
store[S_DERRS] = errs
|
|
@@ -1606,9 +1728,7 @@ module VoxgigStruct
|
|
|
1606
1728
|
|
|
1607
1729
|
out = inject(spec, store, injdef)
|
|
1608
1730
|
|
|
1609
|
-
if !errs.empty? && !collect
|
|
1610
|
-
raise errs.join(' | ')
|
|
1611
|
-
end
|
|
1731
|
+
raise errs.join(' | ') if !errs.empty? && !collect
|
|
1612
1732
|
|
|
1613
1733
|
out
|
|
1614
1734
|
end
|
|
@@ -1616,61 +1736,231 @@ module VoxgigStruct
|
|
|
1616
1736
|
# --- Validators ---
|
|
1617
1737
|
|
|
1618
1738
|
def self._invalidTypeMsg(path, needtype, vt, v, _whence = nil)
|
|
1619
|
-
vs =
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1739
|
+
vs = v.nil? || v.equal?(UNDEF) ? 'no value' : stringify(v)
|
|
1740
|
+
"Expected #{if size(path) > 1
|
|
1741
|
+
"field #{pathify(path,
|
|
1742
|
+
1)} to be "
|
|
1743
|
+
end}#{needtype}, but found #{typename(vt) + S_VIZ unless v.nil? || v.equal?(UNDEF)}#{vs}."
|
|
1744
|
+
end
|
|
1745
|
+
|
|
1746
|
+
# Names a validate spec may use besides its checkers: transform's that it keeps, and $OPEN.
|
|
1747
|
+
VALIDATE_NAMES = %w[$TOP $SPEC $BT $DS $WHEN $ANNO $REF $FORMAT $APPLY $OPEN].freeze
|
|
1748
|
+
|
|
1749
|
+
# Report each checker the spec names that validate lacks, and each misplaced
|
|
1750
|
+
# $REST; $EXACT's arguments are literals. Last: spec is a list's last item.
|
|
1751
|
+
def self._checknames(spec, store, path, errs, last = false)
|
|
1752
|
+
name = _refname(spec)
|
|
1753
|
+
unless name.nil?
|
|
1754
|
+
if _unknownname(name, store)
|
|
1755
|
+
errs << "Unknown validator #{name} at field #{pathify(path)}."
|
|
1756
|
+
elsif name == '$REST'
|
|
1757
|
+
errs << _restmsg(path, ' must be the last element of an array.')
|
|
1758
|
+
end
|
|
1759
|
+
return
|
|
1760
|
+
end
|
|
1761
|
+
|
|
1762
|
+
head = islist(spec) ? _refname(spec[0]) : nil
|
|
1763
|
+
return if head == '$EXACT'
|
|
1764
|
+
|
|
1765
|
+
if head == '$REST'
|
|
1766
|
+
if last != true
|
|
1767
|
+
errs << _restmsg(path, ' must be the last element of an array.')
|
|
1768
|
+
elsif size(spec) != 2
|
|
1769
|
+
errs << _restmsg(path, ' must have exactly one spec.')
|
|
1770
|
+
end
|
|
1771
|
+
_checknames(spec[1], store, flatten([path, 1]), errs)
|
|
1772
|
+
return
|
|
1773
|
+
end
|
|
1774
|
+
|
|
1775
|
+
restkey = '`$REST`'
|
|
1776
|
+
if ismap(spec) && !_getprop(spec, restkey).equal?(UNDEF) && !_getprop(spec, '`$CHILD`').equal?(UNDEF)
|
|
1777
|
+
errs << _restmsg(path, ' cannot be used with $CHILD.')
|
|
1778
|
+
end
|
|
1779
|
+
|
|
1780
|
+
lastkey = islist(spec) ? strkey(size(spec) - 1) : nil
|
|
1781
|
+
keysof(spec).each do |key|
|
|
1782
|
+
_checknames(key, store, path, errs) if ismap(spec) && key != restkey
|
|
1783
|
+
_checknames(_getprop(spec, key), store, flatten([path, key]), errs, lastkey == key)
|
|
1784
|
+
end
|
|
1785
|
+
end
|
|
1786
|
+
|
|
1787
|
+
# The name a whole-string reference gives, when it is a checker name in any case.
|
|
1788
|
+
def self._refname(val)
|
|
1789
|
+
m = val.is_a?(String) ? R_FULL_INJECT.match(val) : nil
|
|
1790
|
+
!m.nil? && R_CHECKER_NAME.match?(m[1].upcase) ? m[1] : nil
|
|
1791
|
+
end
|
|
1792
|
+
|
|
1793
|
+
# Unknown: undefined and upper case, or a defined name in another case. Null disables a name.
|
|
1794
|
+
def self._unknownname(name, store)
|
|
1795
|
+
known = ->(n) { VALIDATE_NAMES.include?(n) || !getprop(store, n).nil? }
|
|
1796
|
+
upper = name.upcase
|
|
1797
|
+
!known.call(name) && (upper == name || known.call(upper))
|
|
1798
|
+
end
|
|
1799
|
+
|
|
1800
|
+
# The data value at a list directive's slot. The directive's own dparent was
|
|
1801
|
+
# read with getprop, which reports a stored null as absent.
|
|
1802
|
+
def self._slotval(inj)
|
|
1803
|
+
prior = inj.prior
|
|
1804
|
+
prior.nil? ? inj.dparent : _getprop(prior.dparent, prior.key)
|
|
1805
|
+
end
|
|
1806
|
+
|
|
1807
|
+
# Replace a list directive's list with the data value. setval deletes on
|
|
1808
|
+
# nil, so a null is set as itself.
|
|
1809
|
+
def self._setslot(inj, val)
|
|
1810
|
+
return inj.setval(val, 2) unless val.nil?
|
|
1811
|
+
|
|
1812
|
+
setprop(getelem(inj.nodes, -2), getelem(inj.path, -2), nil)
|
|
1813
|
+
end
|
|
1814
|
+
|
|
1815
|
+
# JSON equality: numbers by value, lists in order, maps by key in any order.
|
|
1816
|
+
def self._deepequal(a, b)
|
|
1817
|
+
return true if a.equal?(b)
|
|
1818
|
+
|
|
1819
|
+
atype = typify(a)
|
|
1820
|
+
btype = typify(b)
|
|
1821
|
+
return a == b if T_number.anybits?(atype) && T_number.anybits?(btype)
|
|
1822
|
+
return a == b if T_string.anybits?(atype) && T_string.anybits?(btype)
|
|
1823
|
+
return false if atype != btype || !isnode(a)
|
|
1824
|
+
|
|
1825
|
+
akeys = keysof(a)
|
|
1826
|
+
bkeys = keysof(b)
|
|
1827
|
+
return false if akeys.length != bkeys.length
|
|
1828
|
+
|
|
1829
|
+
akeys.each_with_index.all? do |k, kI|
|
|
1830
|
+
k == bkeys[kI] && _deepequal(_getprop(a, k), _getprop(b, k))
|
|
1831
|
+
end
|
|
1832
|
+
end
|
|
1833
|
+
|
|
1834
|
+
# Every member val has is in out, unchanged. A member only out has is a
|
|
1835
|
+
# default the spec supplied, and is ignored.
|
|
1836
|
+
def self._keeps(val, out)
|
|
1837
|
+
return true if val.equal?(UNDEF)
|
|
1838
|
+
return _deepequal(val, out) if !isnode(val) || islist(val) != islist(out) || !isnode(out)
|
|
1839
|
+
|
|
1840
|
+
keysof(val).all? { |k| _keeps(_getprop(val, k), _getprop(out, k)) }
|
|
1841
|
+
end
|
|
1842
|
+
|
|
1843
|
+
# A spec admits a value when validating the value against it finds no error
|
|
1844
|
+
# and gives back the value as it is.
|
|
1845
|
+
def self._admits(val, spec, inj, store)
|
|
1846
|
+
terrs = []
|
|
1847
|
+
|
|
1848
|
+
vstore = merge([{}, store], 1)
|
|
1849
|
+
vstore[S_DTOP] = val
|
|
1850
|
+
|
|
1851
|
+
out = validate(val, spec, {
|
|
1852
|
+
'extra' => vstore,
|
|
1853
|
+
'errs' => terrs,
|
|
1854
|
+
'meta' => inj.meta
|
|
1855
|
+
})
|
|
1856
|
+
|
|
1857
|
+
terrs.empty? && _keeps(val, out)
|
|
1858
|
+
end
|
|
1859
|
+
|
|
1860
|
+
# The bounds of a $NOF count, and the words for it, which are nil when the
|
|
1861
|
+
# count is invalid. Without a max, the bound is the number of specs.
|
|
1862
|
+
def self._nofcount(count, numtvals)
|
|
1863
|
+
isnat = ->(n) { T_integer.anybits?(typify(n)) && n >= 0 }
|
|
1864
|
+
# JavaScript has one number type, so 2.0 is the count 2.
|
|
1865
|
+
whole = ->(n) { n.is_a?(Float) && n.finite? && n == n.to_i ? n.to_i : n }
|
|
1866
|
+
|
|
1867
|
+
count = whole.call(count)
|
|
1868
|
+
return [count, count, count.zero? ? 'none' : "exactly #{count}"] if isnat.call(count)
|
|
1869
|
+
|
|
1870
|
+
min = whole.call(_getprop(count, 'min'))
|
|
1871
|
+
max = whole.call(_getprop(count, 'max'))
|
|
1872
|
+
nomin = min.equal?(UNDEF)
|
|
1873
|
+
nomax = max.equal?(UNDEF)
|
|
1874
|
+
|
|
1875
|
+
valid =
|
|
1876
|
+
ismap(count) &&
|
|
1877
|
+
size(count).positive? &&
|
|
1878
|
+
size(count) == (nomin ? 0 : 1) + (nomax ? 0 : 1) &&
|
|
1879
|
+
(nomin || isnat.call(min)) &&
|
|
1880
|
+
(nomax || isnat.call(max)) &&
|
|
1881
|
+
(nomin || nomax || min <= max)
|
|
1882
|
+
|
|
1883
|
+
return [0, 0, nil] unless valid
|
|
1884
|
+
|
|
1885
|
+
lo = nomin ? 0 : min
|
|
1886
|
+
hi = nomax ? numtvals : max
|
|
1887
|
+
|
|
1888
|
+
desc =
|
|
1889
|
+
if nomax
|
|
1890
|
+
"at least #{lo}"
|
|
1891
|
+
elsif hi.zero?
|
|
1892
|
+
'none'
|
|
1893
|
+
elsif nomin
|
|
1894
|
+
"at most #{hi}"
|
|
1895
|
+
elsif lo == hi
|
|
1896
|
+
"exactly #{lo}"
|
|
1897
|
+
else
|
|
1898
|
+
"#{lo} to #{hi}"
|
|
1899
|
+
end
|
|
1900
|
+
|
|
1901
|
+
[lo, hi, desc]
|
|
1624
1902
|
end
|
|
1625
1903
|
|
|
1626
1904
|
def self.validate_STRING(inj, _val = nil, _ref = nil, _store = nil)
|
|
1627
1905
|
out = getprop(inj.dparent, inj.key)
|
|
1628
1906
|
t = typify(out)
|
|
1629
|
-
if
|
|
1907
|
+
if T_string.nobits?(t)
|
|
1630
1908
|
inj.errs << _invalidTypeMsg(inj.path, S_string, t, out, 'V1010')
|
|
1631
|
-
return
|
|
1909
|
+
return _keepnull(inj, out)
|
|
1632
1910
|
end
|
|
1633
1911
|
if out == S_MT
|
|
1634
|
-
inj.errs <<
|
|
1635
|
-
return
|
|
1912
|
+
inj.errs << "Empty string at #{pathify(inj.path, 1)}"
|
|
1913
|
+
return out
|
|
1636
1914
|
end
|
|
1637
1915
|
out
|
|
1638
1916
|
end
|
|
1639
1917
|
|
|
1640
1918
|
TYPE_CHECKS = {
|
|
1641
|
-
S_number =>
|
|
1642
|
-
S_integer =>
|
|
1643
|
-
S_decimal =>
|
|
1644
|
-
S_boolean =>
|
|
1645
|
-
S_null => lambda
|
|
1646
|
-
S_nil =>
|
|
1647
|
-
S_map =>
|
|
1648
|
-
S_list =>
|
|
1649
|
-
S_function =>
|
|
1919
|
+
S_number => ->(v) { v.is_a?(Numeric) && ![true, false].include?(v) },
|
|
1920
|
+
S_integer => ->(v) { v.is_a?(Integer) && ![true, false].include?(v) },
|
|
1921
|
+
S_decimal => ->(v) { v.is_a?(Float) },
|
|
1922
|
+
S_boolean => ->(v) { [true, false].include?(v) },
|
|
1923
|
+
S_null => lambda(&:nil?),
|
|
1924
|
+
S_nil => ->(v) { v.nil? || v.equal?(UNDEF) },
|
|
1925
|
+
S_map => ->(v) { v.is_a?(Hash) },
|
|
1926
|
+
S_list => ->(v) { v.is_a?(Array) },
|
|
1927
|
+
S_function => ->(v) { v.respond_to?(:call) },
|
|
1650
1928
|
S_instance => lambda { |v|
|
|
1651
1929
|
!v.is_a?(Hash) && !v.is_a?(Array) && !v.is_a?(String) &&
|
|
1652
|
-
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1930
|
+
!v.is_a?(Numeric) && ![true, false].include?(v) && !v.nil? && !v.equal?(UNDEF)
|
|
1931
|
+
}
|
|
1932
|
+
}.freeze
|
|
1655
1933
|
|
|
1656
1934
|
def self.validate_TYPE(inj, _val = nil, ref = nil, _store = nil)
|
|
1657
|
-
tname =
|
|
1935
|
+
tname = ref.is_a?(String) && ref.length > 1 ? ref[1..].downcase : S_any
|
|
1658
1936
|
idx = TYPENAME.index(tname)
|
|
1659
1937
|
typev = idx ? (1 << (31 - idx)) : 0
|
|
1660
|
-
typev = typev | T_null if tname == S_nil
|
|
1661
1938
|
|
|
1662
|
-
|
|
1939
|
+
# $NIL is absent or null.
|
|
1940
|
+
typev |= T_null if tname == S_nil
|
|
1941
|
+
|
|
1942
|
+
# Read literally: a missing field, or a trial's UNDEF root, is no value, not null.
|
|
1943
|
+
out = _getprop(inj.dparent, inj.key)
|
|
1663
1944
|
t = typify(out)
|
|
1664
1945
|
|
|
1665
|
-
if
|
|
1946
|
+
if t.nobits?(typev)
|
|
1666
1947
|
inj.errs << _invalidTypeMsg(inj.path, tname, t, out, 'V1001')
|
|
1667
|
-
return
|
|
1948
|
+
return _keepnull(inj, out)
|
|
1668
1949
|
end
|
|
1669
|
-
out
|
|
1950
|
+
_keepnull(inj, out)
|
|
1670
1951
|
end
|
|
1671
1952
|
|
|
1672
1953
|
def self.validate_ANY(inj, _val = nil, _ref = nil, _store = nil)
|
|
1673
|
-
getprop(inj.dparent, inj.key)
|
|
1954
|
+
_keepnull(inj, getprop(inj.dparent, inj.key))
|
|
1955
|
+
end
|
|
1956
|
+
|
|
1957
|
+
# The value a checker read, where a null the data holds keeps its slot:
|
|
1958
|
+
# returned as nil, inject's setval would delete the slot instead.
|
|
1959
|
+
def self._keepnull(inj, out)
|
|
1960
|
+
return out unless out.nil? && inj.mode == S_MVAL && !_getprop(inj.dparent, inj.key).equal?(UNDEF)
|
|
1961
|
+
|
|
1962
|
+
setprop(inj.parent, inj.key, nil)
|
|
1963
|
+
SKIP
|
|
1674
1964
|
end
|
|
1675
1965
|
|
|
1676
1966
|
def self.validate_CHILD(inj, _val = nil, _ref = nil, _store = nil)
|
|
@@ -1680,7 +1970,7 @@ module VoxgigStruct
|
|
|
1680
1970
|
path = inj.path
|
|
1681
1971
|
keys = inj.keys
|
|
1682
1972
|
|
|
1683
|
-
if
|
|
1973
|
+
if mode == S_MKEYPRE
|
|
1684
1974
|
childtm = getprop(parent, key)
|
|
1685
1975
|
pkey = getelem(path, -2)
|
|
1686
1976
|
tval = getprop(inj.dparent, pkey)
|
|
@@ -1688,7 +1978,7 @@ module VoxgigStruct
|
|
|
1688
1978
|
if tval.nil?
|
|
1689
1979
|
tval = {}
|
|
1690
1980
|
elsif !ismap(tval)
|
|
1691
|
-
|
|
1981
|
+
# _validation reports the mismatch, once.
|
|
1692
1982
|
return nil
|
|
1693
1983
|
end
|
|
1694
1984
|
|
|
@@ -1697,12 +1987,12 @@ module VoxgigStruct
|
|
|
1697
1987
|
keys << ckey
|
|
1698
1988
|
end
|
|
1699
1989
|
|
|
1700
|
-
inj.setval(
|
|
1990
|
+
inj.setval(UNDEF)
|
|
1701
1991
|
return nil
|
|
1702
1992
|
end
|
|
1703
1993
|
|
|
1704
|
-
if
|
|
1705
|
-
|
|
1994
|
+
if mode == S_MVAL
|
|
1995
|
+
unless islist(parent)
|
|
1706
1996
|
inj.errs << 'Invalid $CHILD as value'
|
|
1707
1997
|
return nil
|
|
1708
1998
|
end
|
|
@@ -1714,8 +2004,7 @@ module VoxgigStruct
|
|
|
1714
2004
|
return nil
|
|
1715
2005
|
end
|
|
1716
2006
|
|
|
1717
|
-
|
|
1718
|
-
inj.errs << _invalidTypeMsg(path[0...-1], S_list, typify(inj.dparent), inj.dparent, 'V0230')
|
|
2007
|
+
unless islist(inj.dparent)
|
|
1719
2008
|
inj.keyI = size(parent)
|
|
1720
2009
|
return inj.dparent
|
|
1721
2010
|
end
|
|
@@ -1724,82 +2013,81 @@ module VoxgigStruct
|
|
|
1724
2013
|
setprop(parent, n[0], clone(childtm))
|
|
1725
2014
|
end
|
|
1726
2015
|
parent.slice!(inj.dparent.length..-1) if parent.length > inj.dparent.length
|
|
1727
|
-
|
|
1728
|
-
|
|
2016
|
+
|
|
2017
|
+
# NOTE: modifying inj! This extends the child value loop in inject
|
|
2018
|
+
# to cover every cloned child.
|
|
2019
|
+
(size(keys)...size(parent)).each do |ckeyI|
|
|
2020
|
+
keys << strkey(ckeyI)
|
|
2021
|
+
end
|
|
2022
|
+
|
|
2023
|
+
# Restart the child value loop at the first element (the loop
|
|
2024
|
+
# increments keyI on resume) so that the first element is also
|
|
2025
|
+
# validated against the child template.
|
|
2026
|
+
inj.keyI = -1
|
|
2027
|
+
|
|
2028
|
+
# SKIP leaves the cloned child template in place at the first
|
|
2029
|
+
# element so the resumed loop can validate it.
|
|
2030
|
+
return SKIP
|
|
1729
2031
|
end
|
|
1730
2032
|
|
|
1731
2033
|
nil
|
|
1732
2034
|
end
|
|
1733
2035
|
|
|
1734
|
-
|
|
2036
|
+
# The members a spec does not name: the map form is a key, the list form a
|
|
2037
|
+
# tuple's last item. Each places clones of its spec for the loop to check.
|
|
2038
|
+
def self.validate_REST(inj, _val = nil, _ref = nil, _store = nil)
|
|
1735
2039
|
mode = inj.mode
|
|
2040
|
+
key = inj.key
|
|
1736
2041
|
parent = inj.parent
|
|
1737
|
-
|
|
2042
|
+
keys = inj.keys
|
|
2043
|
+
path = inj.path
|
|
1738
2044
|
|
|
1739
|
-
if
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
' must be the first element of an array.')
|
|
1743
|
-
return nil
|
|
1744
|
-
end
|
|
2045
|
+
if mode == S_MKEYPRE
|
|
2046
|
+
resttm = _getprop(parent, key)
|
|
2047
|
+
tval = getprop(inj.dparent, getelem(path, -2))
|
|
1745
2048
|
|
|
1746
|
-
|
|
2049
|
+
if ismap(tval)
|
|
2050
|
+
keysof(tval).each do |ckey|
|
|
2051
|
+
next if keys.include?(ckey)
|
|
1747
2052
|
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
# setval carries a deliberate special case - "nil with ancestor: set to
|
|
1752
|
-
# nil in grandparent (preserves key for $ONE/$EXACT)" - where ts deletes
|
|
1753
|
-
# in BOTH branches. The consequence is that an OPTIONAL entry
|
|
1754
|
-
# (`['`$ONE`', <spec>, '`$NIL`']`) the caller OMITTED comes back as a
|
|
1755
|
-
# nil-valued key rather than staying absent, which is exactly what that
|
|
1756
|
-
# encoding exists to prevent. In an SDK's option spec that put an entry
|
|
1757
|
-
# in `options.feature` for every feature the model declares, and the
|
|
1758
|
-
# feature ADD ORDER is derived from those keys.
|
|
1759
|
-
#
|
|
1760
|
-
# Confined to $ONE so $EXACT keeps the behaviour the special case was
|
|
1761
|
-
# written for. ruby cannot tell an absent key from a stored nil here
|
|
1762
|
-
# (getprop answers nil for both), so a stored nil under a $ONE is
|
|
1763
|
-
# dropped too; ts would keep it. That is the narrower of the two
|
|
1764
|
-
# divergences and the one nothing in this SDK relies on.
|
|
1765
|
-
if inj.dparent.nil?
|
|
1766
|
-
delprop(getelem(inj.nodes, -2), getelem(inj.path, -2))
|
|
1767
|
-
else
|
|
1768
|
-
inj.setval(inj.dparent, 2)
|
|
2053
|
+
setprop(parent, ckey, clone(resttm))
|
|
2054
|
+
keys << ckey
|
|
2055
|
+
end
|
|
1769
2056
|
end
|
|
1770
2057
|
|
|
1771
|
-
inj.
|
|
2058
|
+
inj.setval(UNDEF)
|
|
2059
|
+
return nil
|
|
2060
|
+
end
|
|
1772
2061
|
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
end
|
|
2062
|
+
prior = inj.prior
|
|
2063
|
+
if mode != S_MVAL || prior.nil? || !islist(prior.parent) || inj.keyI != 0
|
|
2064
|
+
inj.errs << _restmsg(slice(path, 1), ' must be the last element of an array.')
|
|
2065
|
+
return nil
|
|
2066
|
+
end
|
|
1779
2067
|
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
vstore = merge([{}, store], 1)
|
|
1783
|
-
vstore[S_DTOP] = inj.dparent
|
|
2068
|
+
inj.keyI = size(keys)
|
|
2069
|
+
prior.modify = nil
|
|
1784
2070
|
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
})
|
|
2071
|
+
tuple = prior.parent
|
|
2072
|
+
slot = _listkey(prior.key)
|
|
2073
|
+
dlist = prior.dparent
|
|
2074
|
+
numitems = islist(dlist) ? size(dlist) : 0
|
|
1790
2075
|
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
2076
|
+
if numitems <= slot
|
|
2077
|
+
inj.setval(UNDEF, 2)
|
|
2078
|
+
return SKIP
|
|
2079
|
+
end
|
|
1794
2080
|
|
|
1795
|
-
|
|
1796
|
-
|
|
2081
|
+
resttm = _getprop(parent, 1)
|
|
2082
|
+
(slot...numitems).each { |i| setprop(tuple, i, clone(resttm)) }
|
|
2083
|
+
(size(prior.keys)...numitems).each { |i| prior.keys << strkey(i) }
|
|
1797
2084
|
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
2085
|
+
prior.keyI -= 1
|
|
2086
|
+
SKIP
|
|
2087
|
+
end
|
|
2088
|
+
|
|
2089
|
+
def self._restmsg(path, problem)
|
|
2090
|
+
"The $REST validator at field #{pathify(path)}#{problem}"
|
|
1803
2091
|
end
|
|
1804
2092
|
|
|
1805
2093
|
def self.validate_EXACT(inj, _val = nil, _ref = nil, _store = nil)
|
|
@@ -1808,48 +2096,292 @@ module VoxgigStruct
|
|
|
1808
2096
|
key = inj.key
|
|
1809
2097
|
keyI = inj.keyI
|
|
1810
2098
|
|
|
1811
|
-
if
|
|
1812
|
-
if !islist(parent) ||
|
|
1813
|
-
inj.errs <<
|
|
1814
|
-
' must be the first element of an array.')
|
|
2099
|
+
if mode == S_MVAL
|
|
2100
|
+
if !islist(parent) || keyI != 0
|
|
2101
|
+
inj.errs << "The $EXACT validator at field #{pathify(inj.path, 1, 1)} must be the first element of an array."
|
|
1815
2102
|
return nil
|
|
1816
2103
|
end
|
|
1817
2104
|
|
|
2105
|
+
cval = _slotval(inj)
|
|
2106
|
+
|
|
1818
2107
|
inj.keyI = size(inj.keys)
|
|
1819
|
-
|
|
2108
|
+
|
|
2109
|
+
# Replace [$EXACT, ...] with the data value; SKIP keeps inject off the detached list.
|
|
2110
|
+
_setslot(inj, cval)
|
|
2111
|
+
|
|
1820
2112
|
inj.path = inj.path[0...-1]
|
|
1821
|
-
inj.key = getelem(inj.path, -1)
|
|
1822
2113
|
|
|
1823
|
-
tvals = parent[1
|
|
1824
|
-
if size(tvals)
|
|
1825
|
-
inj.errs <<
|
|
1826
|
-
|
|
1827
|
-
return nil
|
|
2114
|
+
tvals = parent[1..]
|
|
2115
|
+
if size(tvals).zero?
|
|
2116
|
+
inj.errs << "The $EXACT validator at field #{pathify(inj.path, 1, 1)} must have at least one argument."
|
|
2117
|
+
return SKIP
|
|
1828
2118
|
end
|
|
1829
2119
|
|
|
1830
|
-
currentstr = nil
|
|
1831
2120
|
tvals.each do |tval|
|
|
1832
|
-
|
|
1833
|
-
if !exactmatch && isnode(tval)
|
|
1834
|
-
currentstr ||= stringify(inj.dparent)
|
|
1835
|
-
exactmatch = stringify(tval) == currentstr
|
|
1836
|
-
end
|
|
1837
|
-
return nil if exactmatch
|
|
2121
|
+
return SKIP if _deepequal(tval, cval)
|
|
1838
2122
|
end
|
|
1839
2123
|
|
|
1840
2124
|
valdesc = items(tvals).map { |n| stringify(n[1]) }.join(', ')
|
|
1841
|
-
valdesc = valdesc.gsub(/`\$([A-Z]+)`/) {
|
|
2125
|
+
valdesc = valdesc.gsub(/`\$([A-Z]+)`/) { ::Regexp.last_match(1).downcase }
|
|
1842
2126
|
|
|
1843
2127
|
inj.errs << _invalidTypeMsg(
|
|
1844
2128
|
inj.path,
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
2129
|
+
"#{'value ' unless size(inj.path) > 1}exactly equal to #{'one of ' unless size(tvals) == 1}#{valdesc}",
|
|
2130
|
+
typify(cval), cval, 'V0110'
|
|
2131
|
+
)
|
|
2132
|
+
|
|
2133
|
+
SKIP
|
|
1848
2134
|
else
|
|
1849
2135
|
delprop(parent, key)
|
|
1850
2136
|
end
|
|
1851
2137
|
end
|
|
1852
2138
|
|
|
2139
|
+
# Count the specs that admit the value: ['`$NOF`', count, spec, ...], where
|
|
2140
|
+
# count is an integer, or a map holding min, max or both.
|
|
2141
|
+
def self.validate_NOF(inj, _val = nil, _ref = nil, store = nil)
|
|
2142
|
+
_validatecount(inj, store, '$NOF', true)
|
|
2143
|
+
end
|
|
2144
|
+
|
|
2145
|
+
# Every spec admits the value: ['`$ALL`', spec, ...].
|
|
2146
|
+
def self.validate_ALL(inj, _val = nil, _ref = nil, store = nil)
|
|
2147
|
+
_validatecount(inj, store, '$ALL', false)
|
|
2148
|
+
end
|
|
2149
|
+
|
|
2150
|
+
# The counting list directives. Without a count, every spec has to admit.
|
|
2151
|
+
def self._validatecount(inj, store, name, counted)
|
|
2152
|
+
parent = inj.parent
|
|
2153
|
+
|
|
2154
|
+
return nil unless inj.mode == S_MVAL
|
|
2155
|
+
|
|
2156
|
+
if !islist(parent) || inj.keyI != 0
|
|
2157
|
+
inj.errs << "The #{name} validator at field #{pathify(inj.path, 1, 1)} must be the first element of an array."
|
|
2158
|
+
return nil
|
|
2159
|
+
end
|
|
2160
|
+
|
|
2161
|
+
cval = _slotval(inj)
|
|
2162
|
+
|
|
2163
|
+
inj.keyI = size(inj.keys)
|
|
2164
|
+
|
|
2165
|
+
# Replace the directive's list with the data value. Each return is SKIP, so
|
|
2166
|
+
# that inject leaves the detached list alone and validates nothing in it.
|
|
2167
|
+
_setslot(inj, cval)
|
|
2168
|
+
|
|
2169
|
+
inj.path = slice(inj.path, -1)
|
|
2170
|
+
|
|
2171
|
+
count = counted ? _getprop(parent, 1) : UNDEF
|
|
2172
|
+
tvals = slice(parent, counted ? 2 : 1)
|
|
2173
|
+
numtvals = size(tvals)
|
|
2174
|
+
field = "The #{name} validator at field #{pathify(inj.path, 1)}"
|
|
2175
|
+
|
|
2176
|
+
if numtvals.zero?
|
|
2177
|
+
inj.errs << "#{field}#{counted ? ' must have a count and' : ' must have'} at least one argument."
|
|
2178
|
+
return SKIP
|
|
2179
|
+
end
|
|
2180
|
+
|
|
2181
|
+
lo, hi, countdesc = counted ? _nofcount(count, numtvals) : [numtvals, numtvals, 'all']
|
|
2182
|
+
|
|
2183
|
+
if countdesc.nil?
|
|
2184
|
+
inj.errs << "#{field} has an invalid count: #{stringify(count)}."
|
|
2185
|
+
return SKIP
|
|
2186
|
+
end
|
|
2187
|
+
|
|
2188
|
+
admitted = 0
|
|
2189
|
+
tvals.each_with_index do |tval, tI|
|
|
2190
|
+
left = numtvals - tI
|
|
2191
|
+
|
|
2192
|
+
# Stop once the specs left cannot change the verdict.
|
|
2193
|
+
break if hi < admitted || admitted + left < lo || (lo <= admitted && admitted + left <= hi)
|
|
2194
|
+
|
|
2195
|
+
admitted += 1 if _admits(cval, tval, inj, store)
|
|
2196
|
+
end
|
|
2197
|
+
|
|
2198
|
+
if admitted < lo || hi < admitted
|
|
2199
|
+
valdesc = items(tvals).map { |n| stringify(n[1]) }.join(', ')
|
|
2200
|
+
valdesc = valdesc.gsub(/`\$([A-Z]+)`/) { ::Regexp.last_match(1).downcase }
|
|
2201
|
+
|
|
2202
|
+
inj.errs << _invalidTypeMsg(inj.path, "#{countdesc} of #{valdesc}", typify(cval), cval, 'V0310')
|
|
2203
|
+
end
|
|
2204
|
+
|
|
2205
|
+
SKIP
|
|
2206
|
+
end
|
|
2207
|
+
|
|
2208
|
+
# The value's length is within a bound: ['`$LEN`', bound, spec?], where the
|
|
2209
|
+
# bound is as for a $NOF count. A string's length is in code points.
|
|
2210
|
+
def self.validate_LEN(inj, _val = nil, _ref = nil, store = nil)
|
|
2211
|
+
_validatebound(inj, store, '$LEN')
|
|
2212
|
+
end
|
|
2213
|
+
|
|
2214
|
+
# The value is a number within a bound: ['`$RANGE`', bound, spec?], where the
|
|
2215
|
+
# bound holds min or gt, max or lt, or one of each.
|
|
2216
|
+
def self.validate_RANGE(inj, _val = nil, _ref = nil, store = nil)
|
|
2217
|
+
_validatebound(inj, store, '$RANGE')
|
|
2218
|
+
end
|
|
2219
|
+
|
|
2220
|
+
def self.validate_LIKE(inj, _val = nil, _ref = nil, store = nil)
|
|
2221
|
+
_validatebound(inj, store, '$LIKE')
|
|
2222
|
+
end
|
|
2223
|
+
|
|
2224
|
+
# The bounding list directives: a bound or pattern, then at most one spec that also admits.
|
|
2225
|
+
def self._validatebound(inj, store, name)
|
|
2226
|
+
parent = inj.parent
|
|
2227
|
+
|
|
2228
|
+
return nil unless inj.mode == S_MVAL
|
|
2229
|
+
|
|
2230
|
+
if !islist(parent) || inj.keyI != 0
|
|
2231
|
+
inj.errs << "The #{name} validator at field #{pathify(inj.path, 1, 1)} must be the first element of an array."
|
|
2232
|
+
return nil
|
|
2233
|
+
end
|
|
2234
|
+
|
|
2235
|
+
cval = _slotval(inj)
|
|
2236
|
+
|
|
2237
|
+
inj.keyI = size(inj.keys)
|
|
2238
|
+
|
|
2239
|
+
# As for the counting directives: SKIP keeps inject off the detached list.
|
|
2240
|
+
_setslot(inj, cval)
|
|
2241
|
+
|
|
2242
|
+
inj.path = slice(inj.path, -1)
|
|
2243
|
+
|
|
2244
|
+
field = "The #{name} validator at field #{pathify(inj.path, 1)}"
|
|
2245
|
+
nargs = size(parent) - 1
|
|
2246
|
+
islen = name == '$LEN'
|
|
2247
|
+
islike = name == '$LIKE'
|
|
2248
|
+
argname = islike ? 'pattern' : 'bound'
|
|
2249
|
+
|
|
2250
|
+
if nargs < 1 || nargs > 2
|
|
2251
|
+
inj.errs << "#{field} must have a #{argname} and at most one spec."
|
|
2252
|
+
return SKIP
|
|
2253
|
+
end
|
|
2254
|
+
|
|
2255
|
+
bound = _getprop(parent, 1)
|
|
2256
|
+
like = islike ? _likere(bound) : nil
|
|
2257
|
+
lo, hi, desc =
|
|
2258
|
+
if islen
|
|
2259
|
+
_lenbound(bound)
|
|
2260
|
+
elsif islike
|
|
2261
|
+
[0, 0, like.nil? ? nil : "like /#{bound}/"]
|
|
2262
|
+
else
|
|
2263
|
+
[0, 0, _rangedesc(bound)]
|
|
2264
|
+
end
|
|
2265
|
+
|
|
2266
|
+
if desc.nil?
|
|
2267
|
+
inj.errs << "#{field} has an invalid #{argname}: #{stringify(bound)}."
|
|
2268
|
+
return SKIP
|
|
2269
|
+
end
|
|
2270
|
+
|
|
2271
|
+
ctype = typify(cval)
|
|
2272
|
+
|
|
2273
|
+
if nargs == 2 && !_admits(cval, _getprop(parent, 2), inj, store)
|
|
2274
|
+
specdesc = stringify(_getprop(parent, 2)).gsub(/`\$([A-Z]+)`/) { ::Regexp.last_match(1).downcase }
|
|
2275
|
+
inj.errs << _invalidTypeMsg(inj.path, specdesc, ctype, cval, 'V0410')
|
|
2276
|
+
return SKIP
|
|
2277
|
+
end
|
|
2278
|
+
|
|
2279
|
+
if (islen ? T_string | T_list | T_map : islike ? T_string : T_number).nobits?(ctype)
|
|
2280
|
+
needtype = islen ? 'string, list or map' : islike ? S_string : S_number
|
|
2281
|
+
inj.errs << _invalidTypeMsg(inj.path, needtype, ctype, cval, 'V0420')
|
|
2282
|
+
return SKIP
|
|
2283
|
+
end
|
|
2284
|
+
|
|
2285
|
+
length = islen ? size(cval) : 0
|
|
2286
|
+
inbound =
|
|
2287
|
+
if islen
|
|
2288
|
+
lo <= length && (hi == -1 || length <= hi)
|
|
2289
|
+
elsif islike
|
|
2290
|
+
re_test(like, cval)
|
|
2291
|
+
else
|
|
2292
|
+
_inrange(bound, cval)
|
|
2293
|
+
end
|
|
2294
|
+
|
|
2295
|
+
unless inbound
|
|
2296
|
+
needtype = "#{'value ' unless size(inj.path) > 1}#{desc}"
|
|
2297
|
+
inj.errs << _invalidTypeMsg(inj.path, needtype, ctype, cval, 'V0430')
|
|
2298
|
+
end
|
|
2299
|
+
|
|
2300
|
+
SKIP
|
|
2301
|
+
end
|
|
2302
|
+
|
|
2303
|
+
# The bounds of a $LEN bound, with -1 for no maximum, and the words for it,
|
|
2304
|
+
# which are nil when the bound is invalid.
|
|
2305
|
+
def self._lenbound(bound)
|
|
2306
|
+
lo, hi, countdesc = _nofcount(bound, -1)
|
|
2307
|
+
|
|
2308
|
+
return [0, 0, nil] if countdesc.nil?
|
|
2309
|
+
|
|
2310
|
+
desc =
|
|
2311
|
+
if lo == hi
|
|
2312
|
+
lo.to_s
|
|
2313
|
+
elsif hi == -1
|
|
2314
|
+
"at least #{lo}"
|
|
2315
|
+
elsif lo.zero?
|
|
2316
|
+
"at most #{hi}"
|
|
2317
|
+
else
|
|
2318
|
+
"#{lo} to #{hi}"
|
|
2319
|
+
end
|
|
2320
|
+
|
|
2321
|
+
[lo, hi, "of length #{desc}"]
|
|
2322
|
+
end
|
|
2323
|
+
|
|
2324
|
+
# A $LIKE pattern compiled by the port's own regex engine; nil unless it compiles.
|
|
2325
|
+
def self._likere(pattern)
|
|
2326
|
+
return nil unless pattern.is_a?(String)
|
|
2327
|
+
|
|
2328
|
+
re_compile(pattern)
|
|
2329
|
+
rescue RegexpError
|
|
2330
|
+
nil
|
|
2331
|
+
end
|
|
2332
|
+
|
|
2333
|
+
# The words for a $RANGE bound, which are nil when the bound is invalid.
|
|
2334
|
+
def self._rangedesc(bound)
|
|
2335
|
+
return nil unless ismap(bound)
|
|
2336
|
+
|
|
2337
|
+
min = _getprop(bound, 'min')
|
|
2338
|
+
max = _getprop(bound, 'max')
|
|
2339
|
+
gt = _getprop(bound, 'gt')
|
|
2340
|
+
lt = _getprop(bound, 'lt')
|
|
2341
|
+
sides = [min, max, gt, lt].reject { |n| n.equal?(UNDEF) }
|
|
2342
|
+
lower = min.equal?(UNDEF) ? gt : min
|
|
2343
|
+
upper = max.equal?(UNDEF) ? lt : max
|
|
2344
|
+
|
|
2345
|
+
valid =
|
|
2346
|
+
size(bound).positive? &&
|
|
2347
|
+
size(bound) == sides.length &&
|
|
2348
|
+
(min.equal?(UNDEF) || gt.equal?(UNDEF)) &&
|
|
2349
|
+
(max.equal?(UNDEF) || lt.equal?(UNDEF)) &&
|
|
2350
|
+
sides.all? { |n| T_number.anybits?(typify(n)) } &&
|
|
2351
|
+
(lower.equal?(UNDEF) || upper.equal?(UNDEF) || lower <= upper)
|
|
2352
|
+
|
|
2353
|
+
return nil unless valid
|
|
2354
|
+
|
|
2355
|
+
parts = []
|
|
2356
|
+
|
|
2357
|
+
if !min.equal?(UNDEF)
|
|
2358
|
+
parts << "at least #{stringify(min)}"
|
|
2359
|
+
elsif !gt.equal?(UNDEF)
|
|
2360
|
+
parts << "greater than #{stringify(gt)}"
|
|
2361
|
+
end
|
|
2362
|
+
|
|
2363
|
+
if !max.equal?(UNDEF)
|
|
2364
|
+
parts << "at most #{stringify(max)}"
|
|
2365
|
+
elsif !lt.equal?(UNDEF)
|
|
2366
|
+
parts << "less than #{stringify(lt)}"
|
|
2367
|
+
end
|
|
2368
|
+
|
|
2369
|
+
parts.join(' and ')
|
|
2370
|
+
end
|
|
2371
|
+
|
|
2372
|
+
# A number within a valid $RANGE bound.
|
|
2373
|
+
def self._inrange(bound, val)
|
|
2374
|
+
min = _getprop(bound, 'min')
|
|
2375
|
+
max = _getprop(bound, 'max')
|
|
2376
|
+
gt = _getprop(bound, 'gt')
|
|
2377
|
+
lt = _getprop(bound, 'lt')
|
|
2378
|
+
|
|
2379
|
+
(min.equal?(UNDEF) || min <= val) &&
|
|
2380
|
+
(max.equal?(UNDEF) || val <= max) &&
|
|
2381
|
+
(gt.equal?(UNDEF) || gt < val) &&
|
|
2382
|
+
(lt.equal?(UNDEF) || val < lt)
|
|
2383
|
+
end
|
|
2384
|
+
|
|
1853
2385
|
# --- _validation: Modify callback for validate ---
|
|
1854
2386
|
def self._validation(pval, key, parent, inj)
|
|
1855
2387
|
return if inj.nil?
|
|
@@ -1861,7 +2393,7 @@ module VoxgigStruct
|
|
|
1861
2393
|
return if !exact && cval.nil?
|
|
1862
2394
|
|
|
1863
2395
|
ptype = typify(pval)
|
|
1864
|
-
return if
|
|
2396
|
+
return if T_string.anybits?(ptype) && pval.is_a?(String) && pval.include?(S_DS)
|
|
1865
2397
|
|
|
1866
2398
|
ctype = typify(cval)
|
|
1867
2399
|
|
|
@@ -1871,7 +2403,7 @@ module VoxgigStruct
|
|
|
1871
2403
|
end
|
|
1872
2404
|
|
|
1873
2405
|
if ismap(cval)
|
|
1874
|
-
|
|
2406
|
+
unless ismap(pval)
|
|
1875
2407
|
inj.errs << _invalidTypeMsg(inj.path, typename(ptype), ctype, cval, 'V0020')
|
|
1876
2408
|
return
|
|
1877
2409
|
end
|
|
@@ -1879,10 +2411,14 @@ module VoxgigStruct
|
|
|
1879
2411
|
ckeys = keysof(cval)
|
|
1880
2412
|
pkeys = keysof(pval)
|
|
1881
2413
|
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
2414
|
+
# Only a spec written as {} is open, even if named keys resolved away.
|
|
2415
|
+
if (pkeys.length.positive? || inj.named) && getprop(pval, '`$OPEN`') != true
|
|
2416
|
+
# Literal presence: the shape DECLARES ck even when its value is nil.
|
|
2417
|
+
# Canonical uses `NONE === _lookup`; `haskey` is Group A (value-based)
|
|
2418
|
+
# and would drop records with a nil field from an open ($AND) select.
|
|
2419
|
+
badkeys = ckeys.reject { |ck| pval.is_a?(Hash) && pval.key?(strkey(ck)) }
|
|
2420
|
+
if badkeys.length.positive?
|
|
2421
|
+
inj.errs << "Unexpected keys at field #{pathify(inj.path, 1)}#{S_VIZ}#{join(badkeys, ', ')}"
|
|
1886
2422
|
end
|
|
1887
2423
|
else
|
|
1888
2424
|
merge([pval, cval])
|
|
@@ -1892,6 +2428,15 @@ module VoxgigStruct
|
|
|
1892
2428
|
elsif islist(cval)
|
|
1893
2429
|
if !islist(pval)
|
|
1894
2430
|
inj.errs << _invalidTypeMsg(inj.path, typename(ptype), ctype, cval, 'V0030')
|
|
2431
|
+
elsif size(pval).positive?
|
|
2432
|
+
# Closed list, so reject items past the end of the shape.
|
|
2433
|
+
badkeys = (size(pval)...size(cval)).map { |i| strkey(i) }
|
|
2434
|
+
if badkeys.length.positive?
|
|
2435
|
+
inj.errs << "Unexpected keys at field #{pathify(inj.path, 1)}#{S_VIZ}#{join(badkeys, ', ')}"
|
|
2436
|
+
end
|
|
2437
|
+
else
|
|
2438
|
+
# Empty spec list [] means list can be open (any items).
|
|
2439
|
+
merge([pval, cval])
|
|
1895
2440
|
end
|
|
1896
2441
|
|
|
1897
2442
|
elsif exact
|
|
@@ -1899,11 +2444,11 @@ module VoxgigStruct
|
|
|
1899
2444
|
if cval.nil? && pval.nil?
|
|
1900
2445
|
# Both nil: only match if key actually exists in data
|
|
1901
2446
|
if ismap(inj.dparent) && !inj.dparent.key?(key.to_s)
|
|
1902
|
-
inj.errs <<
|
|
2447
|
+
inj.errs << "Value at field #{pathify(inj.path, 1)}: key not present."
|
|
1903
2448
|
end
|
|
1904
2449
|
elsif cval != pval
|
|
1905
|
-
pathmsg = size(inj.path) > 1 ?
|
|
1906
|
-
inj.errs <<
|
|
2450
|
+
pathmsg = size(inj.path) > 1 ? "at field #{pathify(inj.path, 1)}: " : ''
|
|
2451
|
+
inj.errs << "Value #{pathmsg}#{cval} should equal #{pval}."
|
|
1907
2452
|
end
|
|
1908
2453
|
|
|
1909
2454
|
else
|
|
@@ -1937,44 +2482,56 @@ module VoxgigStruct
|
|
|
1937
2482
|
errs = collect ? _injdef_prop(injdef, 'errs') : []
|
|
1938
2483
|
|
|
1939
2484
|
store = merge([
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
2485
|
+
{
|
|
2486
|
+
'$DELETE' => nil, '$COPY' => nil, '$KEY' => nil, '$META' => nil,
|
|
2487
|
+
'$MERGE' => nil, '$EACH' => nil, '$PACK' => nil,
|
|
2488
|
+
|
|
2489
|
+
'$STRING' => method(:validate_STRING),
|
|
2490
|
+
'$NUMBER' => method(:validate_TYPE),
|
|
2491
|
+
'$INTEGER' => method(:validate_TYPE),
|
|
2492
|
+
'$DECIMAL' => method(:validate_TYPE),
|
|
2493
|
+
'$BOOLEAN' => method(:validate_TYPE),
|
|
2494
|
+
'$NULL' => method(:validate_TYPE),
|
|
2495
|
+
'$NIL' => method(:validate_TYPE),
|
|
2496
|
+
'$MAP' => method(:validate_TYPE),
|
|
2497
|
+
'$LIST' => method(:validate_TYPE),
|
|
2498
|
+
'$FUNCTION' => method(:validate_TYPE),
|
|
2499
|
+
'$INSTANCE' => method(:validate_TYPE),
|
|
2500
|
+
'$ANY' => method(:validate_ANY),
|
|
2501
|
+
'$CHILD' => method(:validate_CHILD),
|
|
2502
|
+
'$EXACT' => method(:validate_EXACT),
|
|
2503
|
+
'$NOF' => method(:validate_NOF),
|
|
2504
|
+
'$ALL' => method(:validate_ALL),
|
|
2505
|
+
'$LEN' => method(:validate_LEN),
|
|
2506
|
+
'$RANGE' => method(:validate_RANGE),
|
|
2507
|
+
'$LIKE' => method(:validate_LIKE),
|
|
2508
|
+
'$REST' => method(:validate_REST)
|
|
2509
|
+
},
|
|
2510
|
+
(extra.nil? ? {} : extra),
|
|
2511
|
+
{ S_DERRS => errs }
|
|
2512
|
+
], 1)
|
|
1963
2513
|
|
|
1964
2514
|
meta = _injdef_prop(injdef, 'meta') || {}
|
|
1965
2515
|
setprop(meta, S_BEXACT, getprop(meta, S_BEXACT, false)) if ismap(meta)
|
|
1966
2516
|
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
'modify' => method(:_validation),
|
|
1971
|
-
'handler' => method(:_validatehandler),
|
|
1972
|
-
'errs' => errs,
|
|
1973
|
-
})
|
|
2517
|
+
# A spec that names an unknown checker validates nothing.
|
|
2518
|
+
numerrs = errs.length
|
|
2519
|
+
_checknames(spec, store, [], errs)
|
|
1974
2520
|
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
2521
|
+
out =
|
|
2522
|
+
if numerrs < errs.length
|
|
2523
|
+
clone(data)
|
|
2524
|
+
else
|
|
2525
|
+
transform(data, spec, {
|
|
2526
|
+
'meta' => meta,
|
|
2527
|
+
'extra' => store,
|
|
2528
|
+
'modify' => method(:_validation),
|
|
2529
|
+
'handler' => method(:_validatehandler),
|
|
2530
|
+
'errs' => errs
|
|
2531
|
+
})
|
|
2532
|
+
end
|
|
2533
|
+
|
|
2534
|
+
raise errs.join(' | ') if !errs.empty? && !collect
|
|
1978
2535
|
|
|
1979
2536
|
out
|
|
1980
2537
|
end
|
|
@@ -1982,7 +2539,7 @@ module VoxgigStruct
|
|
|
1982
2539
|
# --- Select operators ---
|
|
1983
2540
|
|
|
1984
2541
|
def self.select_AND(inj, _val, _ref, store)
|
|
1985
|
-
if
|
|
2542
|
+
if inj.mode == S_MKEYPRE
|
|
1986
2543
|
terms = getprop(inj.parent, inj.key)
|
|
1987
2544
|
ppath = slice(inj.path, -1)
|
|
1988
2545
|
point = getpath(store, ppath)
|
|
@@ -1993,14 +2550,11 @@ module VoxgigStruct
|
|
|
1993
2550
|
terms.each do |term|
|
|
1994
2551
|
terrs = []
|
|
1995
2552
|
validate(point, term, {
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
inj.errs << ('AND:' + pathify(ppath) + "\u2A2F" + stringify(point) +
|
|
2002
|
-
' fail:' + stringify(terms))
|
|
2003
|
-
end
|
|
2553
|
+
'extra' => vstore,
|
|
2554
|
+
'errs' => terrs,
|
|
2555
|
+
'meta' => inj.meta
|
|
2556
|
+
})
|
|
2557
|
+
inj.errs << "AND:#{pathify(ppath)}\u2A2F#{stringify(point)} fail:#{stringify(terms)}" unless terrs.empty?
|
|
2004
2558
|
end
|
|
2005
2559
|
|
|
2006
2560
|
gkey = getelem(inj.path, -2)
|
|
@@ -2011,7 +2565,7 @@ module VoxgigStruct
|
|
|
2011
2565
|
end
|
|
2012
2566
|
|
|
2013
2567
|
def self.select_OR(inj, _val, _ref, store)
|
|
2014
|
-
if
|
|
2568
|
+
if inj.mode == S_MKEYPRE
|
|
2015
2569
|
terms = getprop(inj.parent, inj.key)
|
|
2016
2570
|
ppath = slice(inj.path, -1)
|
|
2017
2571
|
point = getpath(store, ppath)
|
|
@@ -2022,26 +2576,25 @@ module VoxgigStruct
|
|
|
2022
2576
|
terms.each do |term|
|
|
2023
2577
|
terrs = []
|
|
2024
2578
|
validate(point, term, {
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2579
|
+
'extra' => vstore,
|
|
2580
|
+
'errs' => terrs,
|
|
2581
|
+
'meta' => inj.meta
|
|
2582
|
+
})
|
|
2583
|
+
next unless terrs.empty?
|
|
2584
|
+
|
|
2585
|
+
gkey = getelem(inj.path, -2)
|
|
2586
|
+
gp = getelem(inj.nodes, -2)
|
|
2587
|
+
setprop(gp, gkey, point)
|
|
2588
|
+
return nil
|
|
2035
2589
|
end
|
|
2036
2590
|
|
|
2037
|
-
inj.errs <<
|
|
2038
|
-
' fail:' + stringify(terms))
|
|
2591
|
+
inj.errs << "OR:#{pathify(ppath)}\u2A2F#{stringify(point)} fail:#{stringify(terms)}"
|
|
2039
2592
|
end
|
|
2040
2593
|
nil
|
|
2041
2594
|
end
|
|
2042
2595
|
|
|
2043
2596
|
def self.select_NOT(inj, _val, _ref, store)
|
|
2044
|
-
if
|
|
2597
|
+
if inj.mode == S_MKEYPRE
|
|
2045
2598
|
term = getprop(inj.parent, inj.key)
|
|
2046
2599
|
ppath = slice(inj.path, -1)
|
|
2047
2600
|
point = getpath(store, ppath)
|
|
@@ -2051,15 +2604,12 @@ module VoxgigStruct
|
|
|
2051
2604
|
|
|
2052
2605
|
terrs = []
|
|
2053
2606
|
validate(point, term, {
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2607
|
+
'extra' => vstore,
|
|
2608
|
+
'errs' => terrs,
|
|
2609
|
+
'meta' => inj.meta
|
|
2610
|
+
})
|
|
2058
2611
|
|
|
2059
|
-
if terrs.empty?
|
|
2060
|
-
inj.errs << ('NOT:' + pathify(ppath) + "\u2A2F" + stringify(point) +
|
|
2061
|
-
' fail:' + stringify(term))
|
|
2062
|
-
end
|
|
2612
|
+
inj.errs << "NOT:#{pathify(ppath)}\u2A2F#{stringify(point)} fail:#{stringify(term)}" if terrs.empty?
|
|
2063
2613
|
|
|
2064
2614
|
gkey = getelem(inj.path, -2)
|
|
2065
2615
|
gp = getelem(inj.nodes, -2)
|
|
@@ -2069,7 +2619,10 @@ module VoxgigStruct
|
|
|
2069
2619
|
end
|
|
2070
2620
|
|
|
2071
2621
|
def self.select_CMP(inj, _val, ref, store)
|
|
2072
|
-
|
|
2622
|
+
# The list form of $LIKE is validate's checker; the key form is this operator.
|
|
2623
|
+
return validate_LIKE(inj, _val, ref, store) if inj.mode == S_MVAL && ref == '$LIKE'
|
|
2624
|
+
|
|
2625
|
+
if inj.mode == S_MKEYPRE
|
|
2073
2626
|
term = getprop(inj.parent, inj.key)
|
|
2074
2627
|
gkey = getelem(inj.path, -2)
|
|
2075
2628
|
ppath = slice(inj.path, -1)
|
|
@@ -2078,26 +2631,25 @@ module VoxgigStruct
|
|
|
2078
2631
|
pass_test = false
|
|
2079
2632
|
|
|
2080
2633
|
begin
|
|
2081
|
-
if '$GT'
|
|
2634
|
+
if ref == '$GT' && point > term
|
|
2082
2635
|
pass_test = true
|
|
2083
|
-
elsif '$LT'
|
|
2636
|
+
elsif ref == '$LT' && point < term
|
|
2084
2637
|
pass_test = true
|
|
2085
|
-
elsif '$GTE'
|
|
2638
|
+
elsif ref == '$GTE' && point >= term
|
|
2086
2639
|
pass_test = true
|
|
2087
|
-
elsif '$LTE'
|
|
2640
|
+
elsif ref == '$LTE' && point <= term
|
|
2088
2641
|
pass_test = true
|
|
2089
|
-
elsif '$LIKE'
|
|
2642
|
+
elsif ref == '$LIKE'
|
|
2090
2643
|
pass_test = true if stringify(point).match?(Regexp.new(term.to_s))
|
|
2091
2644
|
end
|
|
2092
|
-
rescue
|
|
2645
|
+
rescue StandardError
|
|
2093
2646
|
end
|
|
2094
2647
|
|
|
2095
2648
|
if pass_test
|
|
2096
2649
|
gp = getelem(inj.nodes, -2)
|
|
2097
2650
|
setprop(gp, gkey, point)
|
|
2098
2651
|
else
|
|
2099
|
-
inj.errs <<
|
|
2100
|
-
' fail:' + ref.to_s + ' ' + stringify(term))
|
|
2652
|
+
inj.errs << "CMP: #{pathify(ppath)}\u2A2F#{stringify(point)} fail:#{ref} #{stringify(term)}"
|
|
2101
2653
|
end
|
|
2102
2654
|
end
|
|
2103
2655
|
nil
|
|
@@ -2107,27 +2659,23 @@ module VoxgigStruct
|
|
|
2107
2659
|
def self.select(children, query)
|
|
2108
2660
|
return [] unless isnode(children)
|
|
2109
2661
|
|
|
2110
|
-
if ismap(children)
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2662
|
+
children = if ismap(children)
|
|
2663
|
+
items(children).map do |item|
|
|
2664
|
+
v = item[1]
|
|
2665
|
+
setprop(v, '$KEY', item[0]) if ismap(v)
|
|
2666
|
+
v
|
|
2667
|
+
end
|
|
2668
|
+
else
|
|
2669
|
+
children.each_with_index.map do |n, i|
|
|
2670
|
+
setprop(n, '$KEY', i) if ismap(n)
|
|
2671
|
+
n
|
|
2672
|
+
end
|
|
2673
|
+
end
|
|
2122
2674
|
|
|
2123
2675
|
results = []
|
|
2124
2676
|
q = clone(query)
|
|
2125
2677
|
|
|
2126
|
-
|
|
2127
|
-
walk(q, lambda { |_k, v, _p, _t|
|
|
2128
|
-
setprop(v, '`$OPEN`', getprop(v, '`$OPEN`', true)) if ismap(v)
|
|
2129
|
-
v
|
|
2130
|
-
})
|
|
2678
|
+
_openquery(q)
|
|
2131
2679
|
|
|
2132
2680
|
select_extra = {
|
|
2133
2681
|
'$AND' => method(:select_AND),
|
|
@@ -2137,30 +2685,50 @@ module VoxgigStruct
|
|
|
2137
2685
|
'$LT' => method(:select_CMP),
|
|
2138
2686
|
'$GTE' => method(:select_CMP),
|
|
2139
2687
|
'$LTE' => method(:select_CMP),
|
|
2140
|
-
'$LIKE' => method(:select_CMP)
|
|
2688
|
+
'$LIKE' => method(:select_CMP)
|
|
2141
2689
|
}
|
|
2142
2690
|
|
|
2143
2691
|
children.each do |child|
|
|
2144
2692
|
terrs = []
|
|
2145
2693
|
validate(child, clone(q), {
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2694
|
+
'errs' => terrs,
|
|
2695
|
+
'meta' => { S_BEXACT => true },
|
|
2696
|
+
'extra' => select_extra
|
|
2697
|
+
})
|
|
2150
2698
|
results << child if terrs.empty?
|
|
2151
2699
|
end
|
|
2152
2700
|
|
|
2153
2701
|
results
|
|
2154
2702
|
end
|
|
2155
2703
|
|
|
2704
|
+
# Open every map in a select query, so a child may hold keys the query does
|
|
2705
|
+
# not name, but leave a directive's literals as written: what $EXACT
|
|
2706
|
+
# compares, and the count or bound of $NOF, $LEN and $RANGE.
|
|
2707
|
+
def self._openquery(q)
|
|
2708
|
+
if ismap(q)
|
|
2709
|
+
setprop(q, '`$OPEN`', getprop(q, '`$OPEN`', true))
|
|
2710
|
+
keysof(q).each { |key| _openquery(q[key]) }
|
|
2711
|
+
elsif islist(q)
|
|
2712
|
+
head = q[0]
|
|
2713
|
+
exact = head == '`$EXACT`'
|
|
2714
|
+
bounded = ['`$NOF`', '`$LEN`', '`$RANGE`'].include?(head)
|
|
2715
|
+
q.each_with_index do |item, i|
|
|
2716
|
+
_openquery(item) if i.zero? || !(exact || (bounded && i == 1))
|
|
2717
|
+
end
|
|
2718
|
+
end
|
|
2719
|
+
end
|
|
2720
|
+
|
|
2156
2721
|
# --- setpath ---
|
|
2157
2722
|
def self.setpath(store, path, val, injdef = nil)
|
|
2723
|
+
# Same contract as setprop/delprop: a condensed store is immutable.
|
|
2724
|
+
raise S_CONDENSED_IMMUTABLE if iscondensed(store)
|
|
2725
|
+
|
|
2158
2726
|
pt = typify(path)
|
|
2159
|
-
if
|
|
2727
|
+
if T_list.anybits?(pt)
|
|
2160
2728
|
parts = path
|
|
2161
|
-
elsif
|
|
2729
|
+
elsif T_string.anybits?(pt)
|
|
2162
2730
|
parts = path.split(S_DT)
|
|
2163
|
-
elsif
|
|
2731
|
+
elsif T_number.anybits?(pt)
|
|
2164
2732
|
parts = [path]
|
|
2165
2733
|
else
|
|
2166
2734
|
return nil
|
|
@@ -2170,12 +2738,12 @@ module VoxgigStruct
|
|
|
2170
2738
|
numparts = size(parts)
|
|
2171
2739
|
parent = base ? getprop(store, base, store) : store
|
|
2172
2740
|
|
|
2173
|
-
(0...numparts - 1).each do |pI|
|
|
2741
|
+
(0...(numparts - 1)).each do |pI|
|
|
2174
2742
|
part_key = getelem(parts, pI)
|
|
2175
2743
|
next_parent = getprop(parent, part_key)
|
|
2176
2744
|
unless isnode(next_parent)
|
|
2177
2745
|
next_part = getelem(parts, pI + 1)
|
|
2178
|
-
next_parent = (
|
|
2746
|
+
next_parent = T_number.anybits?(typify(next_part)) ? [] : {}
|
|
2179
2747
|
setprop(parent, part_key, next_parent)
|
|
2180
2748
|
end
|
|
2181
2749
|
parent = next_parent
|
|
@@ -2190,16 +2758,347 @@ module VoxgigStruct
|
|
|
2190
2758
|
parent
|
|
2191
2759
|
end
|
|
2192
2760
|
|
|
2761
|
+
# --- Condensed structures ---
|
|
2762
|
+
|
|
2763
|
+
CONDENSE_VERSION = 1
|
|
2764
|
+
|
|
2765
|
+
CONDENSE_MAP = 0
|
|
2766
|
+
CONDENSE_LIST = 1
|
|
2767
|
+
CONDENSE_STR = 2
|
|
2768
|
+
CONDENSE_NUM = 3
|
|
2769
|
+
CONDENSE_TRUE = 4
|
|
2770
|
+
CONDENSE_FALSE = 5
|
|
2771
|
+
CONDENSE_NULL = 6
|
|
2772
|
+
|
|
2773
|
+
S_condense = '$condense'.freeze
|
|
2774
|
+
S_condsym = 'sym'.freeze
|
|
2775
|
+
S_condnode = 'node'.freeze
|
|
2776
|
+
S_condroot = 'root'.freeze
|
|
2777
|
+
|
|
2778
|
+
S_CONDENSED_IMMUTABLE =
|
|
2779
|
+
'struct: condensed structures are immutable - expand() first, then modify the copy'.freeze
|
|
2780
|
+
|
|
2781
|
+
# The item at index i, or nil. A negative or fractional i is no item, as in JavaScript.
|
|
2782
|
+
def self._condenseat(list, i)
|
|
2783
|
+
i = i.to_i if i.is_a?(Float) && i.finite? && i == i.to_i
|
|
2784
|
+
return nil unless islist(list) && i.is_a?(Integer) && i >= 0 && i < list.length
|
|
2785
|
+
|
|
2786
|
+
list[i]
|
|
2787
|
+
end
|
|
2788
|
+
|
|
2789
|
+
# A path part's string form, as JavaScript writes it: nil is 'null', 1.0 is '1'.
|
|
2790
|
+
def self._condensestr(key)
|
|
2791
|
+
return key if key.is_a?(String)
|
|
2792
|
+
return 'null' if key.nil?
|
|
2793
|
+
return key.to_i.to_s if key.is_a?(Float) && key.finite? && key == key.to_i
|
|
2794
|
+
|
|
2795
|
+
key.to_s
|
|
2796
|
+
end
|
|
2797
|
+
|
|
2798
|
+
# Reads with fetch, which never runs a Hash default proc.
|
|
2799
|
+
def self.iscondensed(val = UNDEF)
|
|
2800
|
+
return false unless ismap(val)
|
|
2801
|
+
|
|
2802
|
+
# The version must MATCH, not merely be numeric: a future profile would
|
|
2803
|
+
# otherwise be decoded under this one's schema.
|
|
2804
|
+
version = val.fetch(S_condense, nil)
|
|
2805
|
+
version.is_a?(Numeric) && version == CONDENSE_VERSION &&
|
|
2806
|
+
islist(val.fetch(S_condsym, nil)) &&
|
|
2807
|
+
islist(val.fetch(S_condnode, nil)) &&
|
|
2808
|
+
val.fetch(S_condroot, nil).is_a?(Numeric)
|
|
2809
|
+
end
|
|
2810
|
+
|
|
2811
|
+
# Condense any JSON-shaped node. Pure: the same input always produces a
|
|
2812
|
+
# byte-identical result, on every port.
|
|
2813
|
+
def self.condense(val = UNDEF)
|
|
2814
|
+
# Pass one: every distinct map key and string value, once, sorted.
|
|
2815
|
+
symset = {}
|
|
2816
|
+
collect = lambda do |n|
|
|
2817
|
+
if ismap(n)
|
|
2818
|
+
keysof(n).each do |k|
|
|
2819
|
+
symset[k] = true
|
|
2820
|
+
collect.call(n[k])
|
|
2821
|
+
end
|
|
2822
|
+
elsif islist(n)
|
|
2823
|
+
n.each { |item| collect.call(item) }
|
|
2824
|
+
elsif n.is_a?(String)
|
|
2825
|
+
symset[n] = true
|
|
2826
|
+
end
|
|
2827
|
+
end
|
|
2828
|
+
collect.call(val)
|
|
2829
|
+
|
|
2830
|
+
# Ruby sorts strings by byte, which for UTF-8 is code point order.
|
|
2831
|
+
sym = symset.keys.sort
|
|
2832
|
+
symid = {}
|
|
2833
|
+
sym.each_with_index { |s, i| symid[s] = i }
|
|
2834
|
+
|
|
2835
|
+
# Pass two: build post-order, interning on the encoding. Because children
|
|
2836
|
+
# are built first, identical subtrees have already been interned by the
|
|
2837
|
+
# time a parent references them, so sharing costs nothing extra.
|
|
2838
|
+
node = []
|
|
2839
|
+
seen = {}
|
|
2840
|
+
intern = lambda do |enc, enckey = enc|
|
|
2841
|
+
hit = seen[enckey]
|
|
2842
|
+
return hit unless hit.nil?
|
|
2843
|
+
|
|
2844
|
+
idx = node.length
|
|
2845
|
+
node << enc
|
|
2846
|
+
seen[enckey] = idx
|
|
2847
|
+
idx
|
|
2848
|
+
end
|
|
2849
|
+
|
|
2850
|
+
build = lambda do |n|
|
|
2851
|
+
if ismap(n)
|
|
2852
|
+
enc = [CONDENSE_MAP]
|
|
2853
|
+
# keysof sorts, so the key ids ascend and lookup can bisect.
|
|
2854
|
+
keysof(n).each do |k|
|
|
2855
|
+
enc << symid[k]
|
|
2856
|
+
enc << build.call(n[k])
|
|
2857
|
+
end
|
|
2858
|
+
intern.call(enc)
|
|
2859
|
+
elsif islist(n)
|
|
2860
|
+
intern.call([CONDENSE_LIST] + n.map { |item| build.call(item) })
|
|
2861
|
+
elsif n.is_a?(String)
|
|
2862
|
+
intern.call([CONDENSE_STR, symid[n]])
|
|
2863
|
+
elsif n.is_a?(Numeric)
|
|
2864
|
+
# Keyed by value, so 1 and 1.0 are one number.
|
|
2865
|
+
numkey = n.is_a?(Float) && n.finite? && n == n.to_i ? n.to_i : n
|
|
2866
|
+
intern.call([CONDENSE_NUM, n], [CONDENSE_NUM, numkey])
|
|
2867
|
+
elsif n == true
|
|
2868
|
+
intern.call([CONDENSE_TRUE])
|
|
2869
|
+
elsif n == false
|
|
2870
|
+
intern.call([CONDENSE_FALSE])
|
|
2871
|
+
else
|
|
2872
|
+
intern.call([CONDENSE_NULL])
|
|
2873
|
+
end
|
|
2874
|
+
end
|
|
2875
|
+
|
|
2876
|
+
root = build.call(val)
|
|
2877
|
+
|
|
2878
|
+
out = {}
|
|
2879
|
+
out[S_condense] = CONDENSE_VERSION
|
|
2880
|
+
out[S_condsym] = sym
|
|
2881
|
+
out[S_condnode] = node
|
|
2882
|
+
out[S_condroot] = root
|
|
2883
|
+
out
|
|
2884
|
+
end
|
|
2885
|
+
|
|
2886
|
+
# Resolve a symbol to its id by bisecting the sorted symbol table. -1 when
|
|
2887
|
+
# the string does not occur anywhere in the structure, which is itself a fast
|
|
2888
|
+
# negative answer for a key lookup.
|
|
2889
|
+
def self.condenseSymId(cond, key)
|
|
2890
|
+
sym = _getprop(cond, S_condsym, nil)
|
|
2891
|
+
lo = 0
|
|
2892
|
+
hi = islist(sym) ? sym.length - 1 : -1
|
|
2893
|
+
while lo <= hi
|
|
2894
|
+
mid = (lo + hi) >> 1
|
|
2895
|
+
s = sym[mid]
|
|
2896
|
+
return mid if s == key
|
|
2897
|
+
|
|
2898
|
+
if s.is_a?(String) && s < key
|
|
2899
|
+
lo = mid + 1
|
|
2900
|
+
else
|
|
2901
|
+
hi = mid - 1
|
|
2902
|
+
end
|
|
2903
|
+
end
|
|
2904
|
+
-1
|
|
2905
|
+
end
|
|
2906
|
+
|
|
2907
|
+
# The node index of `key` inside node `idx`, or -1. Touches only this node.
|
|
2908
|
+
def self.condenseChild(cond, idx, key)
|
|
2909
|
+
enc = _condenseat(_getprop(cond, S_condnode, nil), idx)
|
|
2910
|
+
kind = _condenseat(enc, 0)
|
|
2911
|
+
|
|
2912
|
+
if kind == CONDENSE_MAP
|
|
2913
|
+
return -1 unless key.is_a?(String) || key.is_a?(Numeric)
|
|
2914
|
+
|
|
2915
|
+
symid = condenseSymId(cond, _condensestr(key))
|
|
2916
|
+
return -1 if symid.negative?
|
|
2917
|
+
|
|
2918
|
+
# Pairs live at [1,2], [3,4], ... with keys ascending: bisect the pairs.
|
|
2919
|
+
lo = 0
|
|
2920
|
+
hi = ((enc.length - 1) / 2) - 1
|
|
2921
|
+
while lo <= hi
|
|
2922
|
+
mid = (lo + hi) >> 1
|
|
2923
|
+
k = enc[1 + (mid * 2)]
|
|
2924
|
+
return enc[2 + (mid * 2)] if k == symid
|
|
2925
|
+
|
|
2926
|
+
if k.is_a?(Numeric) && k < symid
|
|
2927
|
+
lo = mid + 1
|
|
2928
|
+
else
|
|
2929
|
+
hi = mid - 1
|
|
2930
|
+
end
|
|
2931
|
+
end
|
|
2932
|
+
return -1
|
|
2933
|
+
end
|
|
2934
|
+
|
|
2935
|
+
if kind == CONDENSE_LIST
|
|
2936
|
+
# Read as an ordinary list is, so condensing never changes which value a path selects.
|
|
2937
|
+
i = _listindex(key, enc.length - 1)
|
|
2938
|
+
return i.negative? ? -1 : enc[1 + i]
|
|
2939
|
+
end
|
|
2940
|
+
|
|
2941
|
+
-1
|
|
2942
|
+
end
|
|
2943
|
+
|
|
2944
|
+
# Walk a path from a starting node, returning the node index or -1.
|
|
2945
|
+
def self.condenseResolve(cond, idx, path)
|
|
2946
|
+
parts =
|
|
2947
|
+
if islist(path)
|
|
2948
|
+
path
|
|
2949
|
+
elsif path.is_a?(String)
|
|
2950
|
+
path == S_MT ? [] : path.split(S_DT, -1)
|
|
2951
|
+
elsif path.nil? || path.equal?(UNDEF)
|
|
2952
|
+
[]
|
|
2953
|
+
else
|
|
2954
|
+
[_condensestr(path)]
|
|
2955
|
+
end
|
|
2956
|
+
|
|
2957
|
+
at = idx
|
|
2958
|
+
parts.each do |part|
|
|
2959
|
+
return -1 unless at.is_a?(Numeric) && !at.negative?
|
|
2960
|
+
next if part == S_MT
|
|
2961
|
+
|
|
2962
|
+
at = condenseChild(cond, at, part)
|
|
2963
|
+
end
|
|
2964
|
+
# A child index that is not a number names no node.
|
|
2965
|
+
at.is_a?(Numeric) ? at : -1
|
|
2966
|
+
end
|
|
2967
|
+
|
|
2968
|
+
# A missing node materialises as nil, so no UNDEF reaches a container.
|
|
2969
|
+
def self.condenseMaterialise(cond, idx)
|
|
2970
|
+
sym = _getprop(cond, S_condsym, nil)
|
|
2971
|
+
node = _getprop(cond, S_condnode, nil)
|
|
2972
|
+
|
|
2973
|
+
rebuild = lambda do |i|
|
|
2974
|
+
enc = _condenseat(node, i)
|
|
2975
|
+
return nil if enc.nil?
|
|
2976
|
+
|
|
2977
|
+
case _condenseat(enc, 0)
|
|
2978
|
+
when CONDENSE_MAP
|
|
2979
|
+
out = {}
|
|
2980
|
+
(1...enc.length).step(2) { |j| out[_condenseat(sym, enc[j])] = rebuild.call(_condenseat(enc, j + 1)) }
|
|
2981
|
+
out
|
|
2982
|
+
when CONDENSE_LIST
|
|
2983
|
+
(1...enc.length).map { |j| rebuild.call(enc[j]) }
|
|
2984
|
+
when CONDENSE_STR
|
|
2985
|
+
_condenseat(sym, _condenseat(enc, 1))
|
|
2986
|
+
when CONDENSE_NUM
|
|
2987
|
+
_condenseat(enc, 1)
|
|
2988
|
+
when CONDENSE_TRUE
|
|
2989
|
+
true
|
|
2990
|
+
when CONDENSE_FALSE
|
|
2991
|
+
false
|
|
2992
|
+
end
|
|
2993
|
+
end
|
|
2994
|
+
|
|
2995
|
+
rebuild.call(idx)
|
|
2996
|
+
end
|
|
2997
|
+
|
|
2998
|
+
# Fully materialise a condensed structure. The escape hatch: correct for any
|
|
2999
|
+
# caller, but it gives up every benefit of condensing, so prefer a view or a
|
|
3000
|
+
# path read.
|
|
3001
|
+
def self.expand(cond = UNDEF)
|
|
3002
|
+
return cond unless iscondensed(cond)
|
|
3003
|
+
|
|
3004
|
+
condenseMaterialise(cond, cond[S_condroot])
|
|
3005
|
+
end
|
|
3006
|
+
|
|
3007
|
+
# The keys of node `idx`, WITHOUT materialising any of its values. This is
|
|
3008
|
+
# the point of the whole exercise for enumeration: listing the names in a
|
|
3009
|
+
# large collection should cost a symbol-table read, not a full decode.
|
|
3010
|
+
def self.condenseKeys(cond, idx)
|
|
3011
|
+
enc = _condenseat(_getprop(cond, S_condnode, nil), idx)
|
|
3012
|
+
case _condenseat(enc, 0)
|
|
3013
|
+
when CONDENSE_MAP
|
|
3014
|
+
sym = _getprop(cond, S_condsym, nil)
|
|
3015
|
+
(1...enc.length).step(2).map { |j| _condenseat(sym, enc[j]) }
|
|
3016
|
+
when CONDENSE_LIST
|
|
3017
|
+
(1...enc.length).map { |j| (j - 1).to_s }
|
|
3018
|
+
else
|
|
3019
|
+
[]
|
|
3020
|
+
end
|
|
3021
|
+
end
|
|
3022
|
+
|
|
3023
|
+
# A cursor into a condensed structure. Reads resolve by integer index and
|
|
3024
|
+
# touch only the nodes on the path, so the cost of a lookup is proportional
|
|
3025
|
+
# to path depth and result size, never to total structure size.
|
|
3026
|
+
class CondenseView
|
|
3027
|
+
def initialize(cond, start, refmemo)
|
|
3028
|
+
@cond = cond
|
|
3029
|
+
@start = start
|
|
3030
|
+
# Shared materialisations, handed out ONLY by ref(). Threaded through
|
|
3031
|
+
# at() so every cursor into the same structure shares one memo.
|
|
3032
|
+
@refmemo = refmemo
|
|
3033
|
+
end
|
|
3034
|
+
|
|
3035
|
+
# The value at path, materialised. Scalars come back directly; a
|
|
3036
|
+
# container comes back as an independent copy.
|
|
3037
|
+
def get(path = nil)
|
|
3038
|
+
VoxgigStruct.condenseMaterialise(@cond, VoxgigStruct.condenseResolve(@cond, @start, path))
|
|
3039
|
+
end
|
|
3040
|
+
|
|
3041
|
+
# Key names at path, with no value decoding at all.
|
|
3042
|
+
def keys(path = nil)
|
|
3043
|
+
at = VoxgigStruct.condenseResolve(@cond, @start, path)
|
|
3044
|
+
at.negative? ? [] : VoxgigStruct.condenseKeys(@cond, at)
|
|
3045
|
+
end
|
|
3046
|
+
|
|
3047
|
+
def has(path = nil)
|
|
3048
|
+
!VoxgigStruct.condenseResolve(@cond, @start, path).negative?
|
|
3049
|
+
end
|
|
3050
|
+
|
|
3051
|
+
# Chainable cursor. Cheap: no decoding happens here.
|
|
3052
|
+
def at(path = nil)
|
|
3053
|
+
VoxgigStruct.condenseview(@cond, VoxgigStruct.condenseResolve(@cond, @start, path), @refmemo)
|
|
3054
|
+
end
|
|
3055
|
+
|
|
3056
|
+
def value
|
|
3057
|
+
VoxgigStruct.condenseMaterialise(@cond, @start)
|
|
3058
|
+
end
|
|
3059
|
+
|
|
3060
|
+
def size
|
|
3061
|
+
enc = VoxgigStruct._condenseat(VoxgigStruct._getprop(@cond, S_condnode, nil), @start)
|
|
3062
|
+
case VoxgigStruct._condenseat(enc, 0)
|
|
3063
|
+
when CONDENSE_MAP then (enc.length - 1) / 2
|
|
3064
|
+
when CONDENSE_LIST then enc.length - 1
|
|
3065
|
+
else 0
|
|
3066
|
+
end
|
|
3067
|
+
end
|
|
3068
|
+
|
|
3069
|
+
def exists
|
|
3070
|
+
!@start.negative?
|
|
3071
|
+
end
|
|
3072
|
+
|
|
3073
|
+
# DANGER, and named to say so. Returns a SHARED materialisation: the same
|
|
3074
|
+
# object for the same node, every time. Mutating it corrupts every other
|
|
3075
|
+
# reader of that node, including ones reached by a different path,
|
|
3076
|
+
# because the structure is a DAG. Use value() unless a profile says this
|
|
3077
|
+
# matters.
|
|
3078
|
+
def ref
|
|
3079
|
+
@refmemo[@start] = VoxgigStruct.condenseMaterialise(@cond, @start) unless @refmemo.key?(@start)
|
|
3080
|
+
@refmemo[@start]
|
|
3081
|
+
end
|
|
3082
|
+
end
|
|
3083
|
+
|
|
3084
|
+
private_constant :CondenseView
|
|
3085
|
+
|
|
3086
|
+
def self.condenseview(cond = UNDEF, idx = nil, memo = nil)
|
|
3087
|
+
start = idx.nil? || idx.equal?(UNDEF) ? (iscondensed(cond) ? cond[S_condroot] : -1) : idx
|
|
3088
|
+
# A start that is not a number reads as no node, as it does in JavaScript.
|
|
3089
|
+
CondenseView.new(cond, start.is_a?(Numeric) ? start : -1, memo.nil? ? {} : memo)
|
|
3090
|
+
end
|
|
2193
3091
|
|
|
2194
3092
|
# --- Injection class ---
|
|
2195
3093
|
class Injection
|
|
2196
3094
|
attr_accessor :mode, :full, :keyI, :keys, :key, :val, :parent,
|
|
2197
3095
|
:path, :nodes, :handler, :errs, :meta, :base,
|
|
2198
|
-
:modify, :extra, :prior, :dparent, :dpath, :root
|
|
3096
|
+
:modify, :extra, :prior, :dparent, :dpath, :root, :named
|
|
2199
3097
|
|
|
2200
3098
|
def initialize(val, parent)
|
|
2201
3099
|
@mode = VoxgigStruct::S_MVAL
|
|
2202
3100
|
@full = false
|
|
3101
|
+
@named = false
|
|
2203
3102
|
@keyI = 0
|
|
2204
3103
|
@keys = [VoxgigStruct::S_DTOP]
|
|
2205
3104
|
@key = VoxgigStruct::S_DTOP
|
|
@@ -2225,19 +3124,15 @@ module VoxgigStruct
|
|
|
2225
3124
|
parentkey = VoxgigStruct.getelem(@path, -2)
|
|
2226
3125
|
|
|
2227
3126
|
if @dparent.nil?
|
|
2228
|
-
if VoxgigStruct.size(@dpath) > 1
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
if parentkey
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
else
|
|
2238
|
-
@dpath = @dpath + [parentkey]
|
|
2239
|
-
end
|
|
2240
|
-
end
|
|
3127
|
+
@dpath += [parentkey] if VoxgigStruct.size(@dpath) > 1
|
|
3128
|
+
elsif parentkey
|
|
3129
|
+
@dparent = VoxgigStruct.getprop(@dparent, parentkey)
|
|
3130
|
+
lastpart = VoxgigStruct.getelem(@dpath, -1)
|
|
3131
|
+
@dpath = if lastpart == "$:#{parentkey}"
|
|
3132
|
+
VoxgigStruct.slice(@dpath, -1)
|
|
3133
|
+
else
|
|
3134
|
+
@dpath + [parentkey]
|
|
3135
|
+
end
|
|
2241
3136
|
end
|
|
2242
3137
|
|
|
2243
3138
|
@dparent
|
|
@@ -2270,33 +3165,29 @@ module VoxgigStruct
|
|
|
2270
3165
|
end
|
|
2271
3166
|
|
|
2272
3167
|
def setval(val, ancestor = nil)
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
VoxgigStruct.setprop(
|
|
2279
|
-
VoxgigStruct.getelem(@nodes, 0 - ancestor),
|
|
2280
|
-
VoxgigStruct.getelem(@path, 0 - ancestor),
|
|
2281
|
-
val
|
|
2282
|
-
)
|
|
2283
|
-
elsif ancestor.nil? || (ancestor.is_a?(Numeric) && ancestor < 2)
|
|
2284
|
-
VoxgigStruct.setprop(@parent, @key, val)
|
|
3168
|
+
# UNDEF and nil (Ruby collapses both onto one "no value") remove the slot.
|
|
3169
|
+
near = ancestor.nil? || (ancestor.is_a?(Numeric) && ancestor < 2)
|
|
3170
|
+
if near
|
|
3171
|
+
target = @parent
|
|
3172
|
+
key = @key
|
|
2285
3173
|
else
|
|
2286
|
-
VoxgigStruct.
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
3174
|
+
target = VoxgigStruct.getelem(@nodes, 0 - ancestor)
|
|
3175
|
+
key = VoxgigStruct.getelem(@path, 0 - ancestor)
|
|
3176
|
+
end
|
|
3177
|
+
|
|
3178
|
+
if !val.nil? && !val.equal?(VoxgigStruct::UNDEF)
|
|
3179
|
+
VoxgigStruct.setprop(target, key, val)
|
|
3180
|
+
elsif near && VoxgigStruct.islist(target)
|
|
3181
|
+
# A list keeps the removed slot as a hole until inject's loop ends.
|
|
3182
|
+
VoxgigStruct.setprop(target, key, VoxgigStruct::SKIP)
|
|
3183
|
+
else
|
|
3184
|
+
VoxgigStruct.delprop(target, key)
|
|
2291
3185
|
end
|
|
2292
3186
|
end
|
|
2293
3187
|
|
|
2294
3188
|
def to_s(prefix = nil)
|
|
2295
|
-
|
|
2296
|
-
VoxgigStruct
|
|
2297
|
-
(VoxgigStruct::MODENAME[VoxgigStruct::M_VAL] || '') + (@full ? '/full' : '') + ':' +
|
|
2298
|
-
'key=' + @keyI.to_s + '/' + @key.to_s
|
|
3189
|
+
"INJ#{"/#{prefix}" if prefix}:#{VoxgigStruct.pad(VoxgigStruct.pathify(@path, 1))}" \
|
|
3190
|
+
"#{VoxgigStruct::MODENAME[VoxgigStruct::M_VAL] || ''}#{'/full' if @full}:key=#{@keyI}/#{@key}"
|
|
2299
3191
|
end
|
|
2300
3192
|
end
|
|
2301
|
-
|
|
2302
3193
|
end
|