@voxgig/sdkgen 1.2.1 → 1.3.2
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 +2 -2
- package/dist/action/action.d.ts +3 -1
- package/dist/action/action.js +26 -10
- package/dist/action/action.js.map +1 -1
- package/dist/action/feature.js +9 -8
- package/dist/action/feature.js.map +1 -1
- package/dist/action/target.d.ts +7 -1
- package/dist/action/target.js +22 -13
- package/dist/action/target.js.map +1 -1
- package/dist/cmp/Changelog.d.ts +2 -0
- package/dist/cmp/Changelog.js +30 -0
- package/dist/cmp/Changelog.js.map +1 -0
- package/dist/cmp/Deploy.d.ts +2 -0
- package/dist/cmp/Deploy.js +227 -0
- package/dist/cmp/Deploy.js.map +1 -0
- package/dist/cmp/FeatureHook.js +5 -6
- package/dist/cmp/FeatureHook.js.map +1 -1
- package/dist/cmp/License.d.ts +2 -0
- package/dist/cmp/License.js +44 -0
- package/dist/cmp/License.js.map +1 -0
- package/dist/cmp/Readme.js +2 -0
- package/dist/cmp/Readme.js.map +1 -1
- package/dist/cmp/ReadmeErrors.d.ts +2 -0
- package/dist/cmp/ReadmeErrors.js +210 -0
- package/dist/cmp/ReadmeErrors.js.map +1 -0
- package/dist/cmp/ReadmeExplanation.js +213 -223
- package/dist/cmp/ReadmeExplanation.js.map +1 -1
- package/dist/cmp/ReadmeModel.js +6 -1
- package/dist/cmp/ReadmeModel.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +389 -82
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/Security.d.ts +2 -0
- package/dist/cmp/Security.js +36 -0
- package/dist/cmp/Security.js.map +1 -0
- package/dist/helpers/canonType.d.ts +7 -0
- package/dist/helpers/canonType.js +74 -0
- package/dist/helpers/canonType.js.map +1 -0
- package/dist/helpers/collectDeps.d.ts +3 -2
- package/dist/helpers/collectDeps.js.map +1 -1
- package/dist/helpers/naming.d.ts +3 -0
- package/dist/helpers/naming.js +51 -0
- package/dist/helpers/naming.js.map +1 -0
- package/dist/helpers/opExample.d.ts +13 -0
- package/dist/helpers/opExample.js +149 -0
- package/dist/helpers/opExample.js.map +1 -0
- package/dist/helpers/opShape.d.ts +18 -0
- package/dist/helpers/opShape.js +225 -0
- package/dist/helpers/opShape.js.map +1 -0
- package/dist/helpers/packageMeta.d.ts +27 -0
- package/dist/helpers/packageMeta.js +224 -0
- package/dist/helpers/packageMeta.js.map +1 -0
- package/dist/sdkgen.d.ts +12 -2
- package/dist/sdkgen.js +60 -20
- package/dist/sdkgen.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +65 -2
- package/dist/types.js.map +1 -1
- package/dist/utility.d.ts +2 -1
- package/dist/utility.js +39 -11
- package/dist/utility.js.map +1 -1
- package/model/sdkgen.aontu +137 -0
- package/package.json +11 -5
- package/project/.sdk/model/feature/feature-index.aontu +5 -0
- package/project/.sdk/model/target/go-cli.aontu +47 -0
- package/project/.sdk/model/target/go-mcp.aontu +41 -0
- package/project/.sdk/model/target/go.aontu +28 -0
- package/project/.sdk/model/target/{js.jsonic → js.aontu} +13 -0
- package/project/.sdk/model/target/{lua.jsonic → lua.aontu} +13 -0
- package/project/.sdk/model/target/{php.jsonic → php.aontu} +13 -0
- package/project/.sdk/model/target/{py.jsonic → py.aontu} +13 -0
- package/project/.sdk/model/target/{rb.jsonic → rb.aontu} +13 -0
- package/project/.sdk/model/target/{ts.jsonic → ts.aontu} +13 -0
- package/project/.sdk/src/cmp/go/Config_go.ts +3 -2
- package/project/.sdk/src/cmp/go/EntityOperation_go.ts +1 -0
- package/project/.sdk/src/cmp/go/EntityTypes_go.ts +197 -0
- package/project/.sdk/src/cmp/go/Entity_go.ts +2 -1
- package/project/.sdk/src/cmp/go/MainEntity_go.ts +6 -0
- package/project/.sdk/src/cmp/go/Main_go.ts +23 -3
- package/project/.sdk/src/cmp/go/Package_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeEntity_go.ts +48 -10
- package/project/.sdk/src/cmp/go/ReadmeExamplesTest_go.ts +688 -0
- package/project/.sdk/src/cmp/go/ReadmeExplanation_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +52 -8
- package/project/.sdk/src/cmp/go/ReadmeInstall_go.ts +11 -6
- package/project/.sdk/src/cmp/go/ReadmeIntro_go.ts +40 -1
- package/project/.sdk/src/cmp/go/ReadmeModel_go.ts +67 -17
- package/project/.sdk/src/cmp/go/ReadmeOptions_go.ts +4 -3
- package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +146 -116
- package/project/.sdk/src/cmp/go/ReadmeRef_go.ts +87 -21
- package/project/.sdk/src/cmp/go/ReadmeTopHowto_go.ts +4 -0
- package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +75 -16
- package/project/.sdk/src/cmp/go/ReadmeTopTest_go.ts +35 -5
- package/project/.sdk/src/cmp/go/TestEntity_go.ts +1 -1
- package/project/.sdk/src/cmp/go/Test_go.ts +5 -1
- package/project/.sdk/src/cmp/go/fragment/Entity.fragment.go +21 -0
- package/project/.sdk/src/cmp/go/fragment/EntityCreateOp.fragment.go +11 -0
- package/project/.sdk/src/cmp/go/fragment/EntityListOp.fragment.go +11 -0
- package/project/.sdk/src/cmp/go/fragment/EntityLoadOp.fragment.go +11 -0
- package/project/.sdk/src/cmp/go/fragment/EntityRemoveOp.fragment.go +11 -0
- package/project/.sdk/src/cmp/go/fragment/EntityUpdateOp.fragment.go +11 -0
- package/project/.sdk/src/cmp/go/utility_go.ts +70 -0
- package/project/.sdk/src/cmp/go-cli/Main_go-cli.ts +195 -0
- package/project/.sdk/src/cmp/go-cli/fragment/main.fragment.go +106 -0
- package/project/.sdk/src/cmp/go-cli/fragment/words.fragment.go +132 -0
- package/project/.sdk/src/cmp/go-mcp/Main_go-mcp.ts +184 -0
- package/project/.sdk/src/cmp/go-mcp/fragment/main.fragment.go +68 -0
- package/project/.sdk/src/cmp/go-mcp/fragment/tools.fragment.go +114 -0
- package/project/.sdk/src/cmp/js/Config_js.ts +3 -6
- package/project/.sdk/src/cmp/js/EntityTypes_js.ts +111 -0
- package/project/.sdk/src/cmp/js/MainEntity_js.ts +1 -0
- package/project/.sdk/src/cmp/js/Main_js.ts +3 -0
- package/project/.sdk/src/cmp/js/Package_js.ts +16 -7
- package/project/.sdk/src/cmp/js/ReadmeEntity_js.ts +33 -10
- package/project/.sdk/src/cmp/js/ReadmeExplanation_js.ts +2 -2
- package/project/.sdk/src/cmp/js/ReadmeHowto_js.ts +52 -11
- package/project/.sdk/src/cmp/js/ReadmeIntro_js.ts +39 -1
- package/project/.sdk/src/cmp/js/ReadmeModel_js.ts +50 -18
- package/project/.sdk/src/cmp/js/ReadmeOptions_js.ts +4 -3
- package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +70 -20
- package/project/.sdk/src/cmp/js/ReadmeRef_js.ts +50 -16
- package/project/.sdk/src/cmp/js/ReadmeTopHowto_js.ts +3 -0
- package/project/.sdk/src/cmp/js/ReadmeTopQuick_js.ts +45 -19
- package/project/.sdk/src/cmp/js/ReadmeTopTest_js.ts +35 -3
- package/project/.sdk/src/cmp/js/fragment/EntityCreateOp.fragment.js +5 -0
- package/project/.sdk/src/cmp/js/fragment/EntityListOp.fragment.js +5 -0
- package/project/.sdk/src/cmp/js/fragment/EntityLoadOp.fragment.js +5 -0
- package/project/.sdk/src/cmp/js/fragment/EntityRemoveOp.fragment.js +5 -0
- package/project/.sdk/src/cmp/js/fragment/EntityUpdateOp.fragment.js +5 -0
- package/project/.sdk/src/cmp/js/utility_js.ts +57 -0
- package/project/.sdk/src/cmp/lua/Config_lua.ts +3 -2
- package/project/.sdk/src/cmp/lua/EntityTypes_lua.ts +113 -0
- package/project/.sdk/src/cmp/lua/MainEntity_lua.ts +8 -0
- package/project/.sdk/src/cmp/lua/Main_lua.ts +4 -0
- package/project/.sdk/src/cmp/lua/Package_lua.ts +23 -4
- package/project/.sdk/src/cmp/lua/ReadmeEntity_lua.ts +50 -13
- package/project/.sdk/src/cmp/lua/ReadmeExamplesTest_lua.ts +293 -0
- package/project/.sdk/src/cmp/lua/ReadmeHowto_lua.ts +46 -8
- package/project/.sdk/src/cmp/lua/ReadmeInstall_lua.ts +19 -3
- package/project/.sdk/src/cmp/lua/ReadmeIntro_lua.ts +38 -1
- package/project/.sdk/src/cmp/lua/ReadmeModel_lua.ts +51 -16
- package/project/.sdk/src/cmp/lua/ReadmeOptions_lua.ts +4 -3
- package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +156 -21
- package/project/.sdk/src/cmp/lua/ReadmeRef_lua.ts +71 -23
- package/project/.sdk/src/cmp/lua/ReadmeTopQuick_lua.ts +46 -9
- package/project/.sdk/src/cmp/lua/ReadmeTopTest_lua.ts +43 -5
- package/project/.sdk/src/cmp/lua/Test_lua.ts +4 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityCreateOp.fragment.lua +4 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityListOp.fragment.lua +4 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityLoadOp.fragment.lua +4 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityRemoveOp.fragment.lua +4 -0
- package/project/.sdk/src/cmp/lua/fragment/EntityUpdateOp.fragment.lua +4 -0
- package/project/.sdk/src/cmp/php/Config_php.ts +3 -2
- package/project/.sdk/src/cmp/php/EntityTypes_php.ts +142 -0
- package/project/.sdk/src/cmp/php/MainEntity_php.ts +18 -1
- package/project/.sdk/src/cmp/php/Main_php.ts +4 -0
- package/project/.sdk/src/cmp/php/Package_php.ts +18 -7
- package/project/.sdk/src/cmp/php/ReadmeEntity_php.ts +46 -14
- package/project/.sdk/src/cmp/php/ReadmeExamplesTest_php.ts +401 -0
- package/project/.sdk/src/cmp/php/ReadmeHowto_php.ts +56 -13
- package/project/.sdk/src/cmp/php/ReadmeInstall_php.ts +15 -3
- package/project/.sdk/src/cmp/php/ReadmeIntro_php.ts +40 -1
- package/project/.sdk/src/cmp/php/ReadmeModel_php.ts +26 -8
- package/project/.sdk/src/cmp/php/ReadmeOptions_php.ts +4 -3
- package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +159 -25
- package/project/.sdk/src/cmp/php/ReadmeRef_php.ts +90 -45
- package/project/.sdk/src/cmp/php/ReadmeTopHowto_php.ts +1 -1
- package/project/.sdk/src/cmp/php/ReadmeTopQuick_php.ts +43 -11
- package/project/.sdk/src/cmp/php/ReadmeTopTest_php.ts +52 -11
- package/project/.sdk/src/cmp/php/TestDirect_php.ts +9 -9
- package/project/.sdk/src/cmp/php/TestEntity_php.ts +6 -12
- package/project/.sdk/src/cmp/php/Test_php.ts +4 -0
- package/project/.sdk/src/cmp/php/fragment/Entity.fragment.php +13 -1
- package/project/.sdk/src/cmp/php/fragment/EntityCreateOp.fragment.php +10 -1
- package/project/.sdk/src/cmp/php/fragment/EntityListOp.fragment.php +10 -1
- package/project/.sdk/src/cmp/php/fragment/EntityLoadOp.fragment.php +10 -1
- package/project/.sdk/src/cmp/php/fragment/EntityRemoveOp.fragment.php +10 -1
- package/project/.sdk/src/cmp/php/fragment/EntityUpdateOp.fragment.php +10 -1
- package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +22 -14
- package/project/.sdk/src/cmp/py/Config_py.ts +3 -2
- package/project/.sdk/src/cmp/py/EntityTypes_py.ts +184 -0
- package/project/.sdk/src/cmp/py/Entity_py.ts +27 -0
- package/project/.sdk/src/cmp/py/MainEntity_py.ts +2 -1
- package/project/.sdk/src/cmp/py/Main_py.ts +35 -0
- package/project/.sdk/src/cmp/py/Package_py.ts +24 -3
- package/project/.sdk/src/cmp/py/ReadmeEntity_py.ts +48 -14
- package/project/.sdk/src/cmp/py/ReadmeExamplesTest_py.ts +626 -0
- package/project/.sdk/src/cmp/py/ReadmeHowto_py.ts +53 -14
- package/project/.sdk/src/cmp/py/ReadmeInstall_py.ts +19 -3
- package/project/.sdk/src/cmp/py/ReadmeIntro_py.ts +48 -1
- package/project/.sdk/src/cmp/py/ReadmeModel_py.ts +28 -10
- package/project/.sdk/src/cmp/py/ReadmeOptions_py.ts +4 -3
- package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +150 -27
- package/project/.sdk/src/cmp/py/ReadmeRef_py.ts +86 -40
- package/project/.sdk/src/cmp/py/ReadmeTopHowto_py.ts +1 -1
- package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +45 -11
- package/project/.sdk/src/cmp/py/ReadmeTopTest_py.ts +43 -5
- package/project/.sdk/src/cmp/py/TestDirect_py.ts +7 -9
- package/project/.sdk/src/cmp/py/TestEntity_py.ts +6 -14
- package/project/.sdk/src/cmp/py/Test_py.ts +4 -0
- package/project/.sdk/src/cmp/py/fragment/Entity.fragment.py +5 -2
- package/project/.sdk/src/cmp/py/fragment/EntityCreateOp.fragment.py +1 -1
- package/project/.sdk/src/cmp/py/fragment/EntityListOp.fragment.py +5 -1
- package/project/.sdk/src/cmp/py/fragment/EntityLoadOp.fragment.py +6 -1
- package/project/.sdk/src/cmp/py/fragment/EntityRemoveOp.fragment.py +6 -1
- package/project/.sdk/src/cmp/py/fragment/EntityUpdateOp.fragment.py +1 -1
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +17 -10
- package/project/.sdk/src/cmp/rb/Config_rb.ts +3 -2
- package/project/.sdk/src/cmp/rb/EntityTypes_rb.ts +136 -0
- package/project/.sdk/src/cmp/rb/MainEntity_rb.ts +1 -0
- package/project/.sdk/src/cmp/rb/Main_rb.ts +4 -0
- package/project/.sdk/src/cmp/rb/Package_rb.ts +34 -7
- package/project/.sdk/src/cmp/rb/ReadmeEntity_rb.ts +47 -13
- package/project/.sdk/src/cmp/rb/ReadmeExamplesTest_rb.ts +289 -0
- package/project/.sdk/src/cmp/rb/ReadmeHowto_rb.ts +72 -21
- package/project/.sdk/src/cmp/rb/ReadmeInstall_rb.ts +16 -4
- package/project/.sdk/src/cmp/rb/ReadmeIntro_rb.ts +40 -1
- package/project/.sdk/src/cmp/rb/ReadmeModel_rb.ts +29 -12
- package/project/.sdk/src/cmp/rb/ReadmeOptions_rb.ts +4 -3
- package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +163 -25
- package/project/.sdk/src/cmp/rb/ReadmeRef_rb.ts +85 -40
- package/project/.sdk/src/cmp/rb/ReadmeTopHowto_rb.ts +1 -1
- package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +45 -11
- package/project/.sdk/src/cmp/rb/ReadmeTopTest_rb.ts +54 -11
- package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +9 -9
- package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +6 -12
- package/project/.sdk/src/cmp/rb/Test_rb.ts +4 -0
- package/project/.sdk/src/cmp/rb/fragment/Entity.fragment.rb +2 -0
- package/project/.sdk/src/cmp/rb/fragment/EntityCreateOp.fragment.rb +5 -0
- package/project/.sdk/src/cmp/rb/fragment/EntityListOp.fragment.rb +20 -2
- package/project/.sdk/src/cmp/rb/fragment/EntityLoadOp.fragment.rb +8 -1
- package/project/.sdk/src/cmp/rb/fragment/EntityRemoveOp.fragment.rb +6 -1
- package/project/.sdk/src/cmp/rb/fragment/EntityUpdateOp.fragment.rb +5 -0
- package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +24 -8
- package/project/.sdk/src/cmp/ts/Config_ts.ts +3 -6
- package/project/.sdk/src/cmp/ts/EntityTypes_ts.ts +105 -0
- package/project/.sdk/src/cmp/ts/Entity_ts.ts +17 -1
- package/project/.sdk/src/cmp/ts/MainEntity_ts.ts +1 -0
- package/project/.sdk/src/cmp/ts/Main_ts.ts +6 -0
- package/project/.sdk/src/cmp/ts/Package_ts.ts +14 -7
- package/project/.sdk/src/cmp/ts/ReadmeEntity_ts.ts +32 -10
- package/project/.sdk/src/cmp/ts/ReadmeExampleTest_ts.ts +81 -0
- package/project/.sdk/src/cmp/ts/ReadmeExamplesTest_ts.ts +446 -0
- package/project/.sdk/src/cmp/ts/ReadmeExplanation_ts.ts +2 -2
- package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +57 -11
- package/project/.sdk/src/cmp/ts/ReadmeInstall_ts.ts +19 -6
- package/project/.sdk/src/cmp/ts/ReadmeIntro_ts.ts +39 -1
- package/project/.sdk/src/cmp/ts/ReadmeModel_ts.ts +50 -18
- package/project/.sdk/src/cmp/ts/ReadmeOptions_ts.ts +4 -3
- package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +141 -48
- package/project/.sdk/src/cmp/ts/ReadmeRef_ts.ts +50 -16
- package/project/.sdk/src/cmp/ts/ReadmeTopHowto_ts.ts +3 -0
- package/project/.sdk/src/cmp/ts/ReadmeTopQuick_ts.ts +58 -19
- package/project/.sdk/src/cmp/ts/ReadmeTopTest_ts.ts +35 -3
- package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +2 -2
- package/project/.sdk/src/cmp/ts/Test_ts.ts +5 -0
- package/project/.sdk/src/cmp/ts/fragment/Entity.fragment.ts +3 -1
- package/project/.sdk/src/cmp/ts/fragment/EntityBase.fragment.ts +10 -5
- package/project/.sdk/src/cmp/ts/fragment/EntityCreateOp.fragment.ts +4 -2
- package/project/.sdk/src/cmp/ts/fragment/EntityListOp.fragment.ts +4 -2
- package/project/.sdk/src/cmp/ts/fragment/EntityLoadOp.fragment.ts +4 -2
- package/project/.sdk/src/cmp/ts/fragment/EntityRemoveOp.fragment.ts +4 -2
- package/project/.sdk/src/cmp/ts/fragment/EntityUpdateOp.fragment.ts +4 -2
- package/project/.sdk/src/cmp/ts/utility_ts.ts +59 -0
- package/project/.sdk/tm/go/LICENSE +1 -1
- package/project/.sdk/tm/go/Makefile +36 -1
- package/project/.sdk/tm/go/VERSION +1 -0
- package/project/.sdk/tm/go/core/context.go +12 -7
- package/project/.sdk/tm/go-cli/src/feature/README.md +6 -0
- package/project/.sdk/tm/go-cli/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/go-cli/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/README.md +6 -0
- package/project/.sdk/tm/go-mcp/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/go-mcp/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/js/LICENSE +1 -1
- package/project/.sdk/tm/js/Makefile +41 -0
- package/project/.sdk/tm/lua/LICENSE +1 -1
- package/project/.sdk/tm/lua/Makefile +40 -1
- package/project/.sdk/tm/lua/core/context.lua +13 -8
- package/project/.sdk/tm/php/LICENSE +1 -1
- package/project/.sdk/tm/php/Makefile +31 -1
- package/project/.sdk/tm/php/VERSION +1 -0
- package/project/.sdk/tm/php/core/Context.php +12 -6
- package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +13 -4
- package/project/.sdk/tm/php/utility/Done.php +2 -2
- package/project/.sdk/tm/php/utility/MakeError.php +3 -3
- package/project/.sdk/tm/py/LICENSE +1 -1
- package/project/.sdk/tm/py/Makefile +34 -1
- package/project/.sdk/tm/py/core/context.py +12 -7
- package/project/.sdk/tm/py/test/test_primary_utility.py +15 -4
- package/project/.sdk/tm/py/test/test_struct_utility.py +1 -1
- package/project/.sdk/tm/py/utility/done.py +3 -1
- package/project/.sdk/tm/py/utility/make_error.py +2 -2
- package/project/.sdk/tm/rb/LICENSE +1 -1
- package/project/.sdk/tm/rb/Makefile +36 -2
- package/project/.sdk/tm/rb/core/context.rb +8 -3
- package/project/.sdk/tm/rb/test/primary_utility_test.rb +2 -2
- package/project/.sdk/tm/rb/utility/done.rb +3 -1
- package/project/.sdk/tm/rb/utility/make_error.rb +5 -2
- package/project/.sdk/tm/ts/LICENSE +1 -1
- package/project/.sdk/tm/ts/Makefile +42 -0
- package/project/.sdk/tm/ts/src/Context.ts +8 -3
- package/src/action/action.ts +30 -11
- package/src/action/feature.ts +12 -14
- package/src/action/target.ts +28 -17
- package/src/cmp/Changelog.ts +34 -0
- package/src/cmp/Deploy.ts +258 -0
- package/src/cmp/FeatureHook.ts +6 -8
- package/src/cmp/License.ts +49 -0
- package/src/cmp/Readme.ts +2 -0
- package/src/cmp/ReadmeErrors.ts +257 -0
- package/src/cmp/ReadmeExplanation.ts +250 -230
- package/src/cmp/ReadmeModel.ts +7 -2
- package/src/cmp/ReadmeTop.ts +411 -95
- package/src/cmp/Security.ts +41 -0
- package/src/helpers/canonType.ts +89 -0
- package/src/helpers/collectDeps.ts +5 -3
- package/src/helpers/naming.ts +59 -0
- package/src/helpers/opExample.ts +170 -0
- package/src/helpers/opShape.ts +274 -0
- package/src/helpers/packageMeta.ts +236 -0
- package/src/sdkgen.ts +91 -23
- package/src/tsconfig.json +1 -0
- package/src/types.ts +85 -2
- package/src/utility.ts +45 -11
- package/README.md +0 -2
- package/dist/action/lang.d.ts +0 -2
- package/dist/action/lang.js +0 -68
- package/dist/action/lang.js.map +0 -1
- package/dist/cmp/Hook.d.ts +0 -2
- package/dist/cmp/Hook.js +0 -10
- package/dist/cmp/Hook.js.map +0 -1
- package/dist/cmp/Top.d.ts +0 -2
- package/dist/cmp/Top.js +0 -23
- package/dist/cmp/Top.js.map +0 -1
- package/dist/prepare-openapi.d.ts +0 -2
- package/dist/prepare-openapi.js +0 -37
- package/dist/prepare-openapi.js.map +0 -1
- package/model/sdkgen.jsonic +0 -74
- package/project/.sdk/model/feature/feature-index.jsonic +0 -5
- package/project/.sdk/model/target/go.jsonic +0 -22
- package/project/.sdk/tm/go/utility/struct/go.mod +0 -3
- /package/project/.sdk/model/feature/{log.jsonic → log.aontu} +0 -0
- /package/project/.sdk/model/feature/{test.jsonic → test.aontu} +0 -0
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
cmp,
|
|
11
11
|
each,
|
|
12
12
|
isAuthActive,
|
|
13
|
+
resolveAuthPrefix,
|
|
13
14
|
} from '@voxgig/sdkgen'
|
|
14
15
|
|
|
15
16
|
|
|
@@ -39,8 +40,8 @@ const Config = cmp(async function Config(props: any) {
|
|
|
39
40
|
const headers = getModelPath(model, `main.${KIT}.config.headers`) || {}
|
|
40
41
|
|
|
41
42
|
const authActive = isAuthActive(model)
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
// config.auth.prefix override -> spec-derived info.security.prefix -> 'Bearer'
|
|
44
|
+
const authPrefix = resolveAuthPrefix(model)
|
|
44
45
|
|
|
45
46
|
let baseUrl = ''
|
|
46
47
|
try { baseUrl = getModelPath(model, `main.${KIT}.info.servers.0.url`) } catch (_e) { }
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
// Typed-model generator (PHP target).
|
|
4
|
+
//
|
|
5
|
+
// Ported from the TypeScript reference EntityTypes_ts.ts. Reads
|
|
6
|
+
// main.<KIT>.entity.<e>.fields[] and per-op params (op.<name>.points[].args.params[])
|
|
7
|
+
// and emits one file, types/<Sdk>Types.php, containing a PHP 8 class with typed
|
|
8
|
+
// properties per active entity plus a request/match class per active op. Field/param
|
|
9
|
+
// sentinels ($STRING, $INTEGER, ...) are turned into real PHP types by the shared
|
|
10
|
+
// sdkgen helper `canonToType` (source of truth: @voxgig/apidef VALID_CANON):
|
|
11
|
+
// $STRING -> string, $INTEGER -> int, $NUMBER -> float, $BOOLEAN -> bool,
|
|
12
|
+
// $OBJECT/$ARRAY -> array, unknown -> mixed.
|
|
13
|
+
//
|
|
14
|
+
// Type-name scheme (IDENTICAL to TS): data type = <Name>; per-op request
|
|
15
|
+
// <Name>LoadMatch / <Name>ListMatch / <Name>RemoveMatch (query/id ops),
|
|
16
|
+
// <Name>CreateData / <Name>UpdateData (body ops). An op WITH params -> a typed
|
|
17
|
+
// class of those params (reqd:false -> nullable, defaulted null). An op WITHOUT
|
|
18
|
+
// params -> a match class over the entity fields, all nullable/optional (the
|
|
19
|
+
// PHP stand-in for TS `Partial<Name>`; callers may also pass a plain assoc-array).
|
|
20
|
+
//
|
|
21
|
+
// PHP has no generics and no structural typing, so these classes are documentation-
|
|
22
|
+
// grade value objects: op signatures keep a permissive native type (assoc-array in,
|
|
23
|
+
// mixed out at the item-5 boundary) and surface the class names via PHPDoc. The file
|
|
24
|
+
// lands under types/ and is registered on composer's classmap autoload (see
|
|
25
|
+
// Package_php.ts) so `new <Name>()` / type references resolve globally.
|
|
26
|
+
|
|
27
|
+
import {
|
|
28
|
+
cmp, each,
|
|
29
|
+
File, Content, Folder,
|
|
30
|
+
} from '@voxgig/sdkgen'
|
|
31
|
+
|
|
32
|
+
import { canonToType, opTypeName, opRequestShape } from '@voxgig/sdkgen'
|
|
33
|
+
|
|
34
|
+
import {
|
|
35
|
+
KIT,
|
|
36
|
+
getModelPath,
|
|
37
|
+
} from '@voxgig/apidef'
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
const LANG = 'php'
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// A valid PHP property/label name (identifiers only; the corpus never carries
|
|
44
|
+
// exotic field names, but guard so a bad name can never emit invalid PHP).
|
|
45
|
+
function validName(name: string): boolean {
|
|
46
|
+
return /^[A-Za-z_\x80-\xff][A-Za-z0-9_\x80-\xff]*$/.test(name)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// Emit one typed PHP property line. `mixed` is already nullable in PHP and
|
|
51
|
+
// rejects the `?` prefix, so it is special-cased; every other optional field
|
|
52
|
+
// becomes `?type` with a `= null` default so the property is safely optional.
|
|
53
|
+
function propLine(name: string, sentinel: unknown, optional: boolean): string {
|
|
54
|
+
const type = canonToType(sentinel, LANG)
|
|
55
|
+
if ('mixed' === type) {
|
|
56
|
+
return optional
|
|
57
|
+
? ` public mixed $${name} = null;\n`
|
|
58
|
+
: ` public mixed $${name};\n`
|
|
59
|
+
}
|
|
60
|
+
return optional
|
|
61
|
+
? ` public ?${type} $${name} = null;\n`
|
|
62
|
+
: ` public ${type} $${name};\n`
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
const EntityTypes = cmp(function EntityTypes(props: any) {
|
|
67
|
+
const { model } = props.ctx$
|
|
68
|
+
|
|
69
|
+
const entity = getModelPath(model, `main.${KIT}.entity`)
|
|
70
|
+
const entityList = each(entity).filter((e: any) => e.active !== false)
|
|
71
|
+
|
|
72
|
+
Folder({ name: 'types' }, () => {
|
|
73
|
+
|
|
74
|
+
File({ name: model.const.Name + 'Types.' + LANG }, () => {
|
|
75
|
+
|
|
76
|
+
Content(`<?php
|
|
77
|
+
declare(strict_types=1);
|
|
78
|
+
|
|
79
|
+
// Typed models for the ${model.const.Name} SDK.
|
|
80
|
+
//
|
|
81
|
+
// GENERATED from the API model: main.${KIT}.entity.<e>.fields[] and per-op
|
|
82
|
+
// params (op.<name>.points[].args.params[]). Field/param types come from the
|
|
83
|
+
// canonical type sentinels via @voxgig/sdkgen canonToType (source of truth:
|
|
84
|
+
// @voxgig/apidef VALID_CANON). Do not edit by hand.
|
|
85
|
+
//
|
|
86
|
+
// These are documentation-grade value objects (PHP 8 typed properties),
|
|
87
|
+
// registered on the composer classmap autoload. The SDK boundary exchanges
|
|
88
|
+
// assoc-arrays; these classes name the shapes for tooling and typed callers.
|
|
89
|
+
|
|
90
|
+
`)
|
|
91
|
+
|
|
92
|
+
entityList.forEach((ent: any) => {
|
|
93
|
+
const Name = ent.Name
|
|
94
|
+
const fields = (ent.fields ? each(ent.fields) : [])
|
|
95
|
+
.filter((f: any) => f.active !== false && validName(f.name))
|
|
96
|
+
|
|
97
|
+
// Entity data model: one typed property per field (`req:false` -> nullable).
|
|
98
|
+
Content(`/** ${Name} entity data model. */
|
|
99
|
+
class ${Name}
|
|
100
|
+
{
|
|
101
|
+
`)
|
|
102
|
+
fields.forEach((f: any) => {
|
|
103
|
+
Content(propLine(f.name, f.type, false === f.req))
|
|
104
|
+
})
|
|
105
|
+
Content(`}
|
|
106
|
+
|
|
107
|
+
`)
|
|
108
|
+
|
|
109
|
+
// Per active op: a request/match class. Members and their optionality
|
|
110
|
+
// come from the shared partiality policy (opRequestShape); this file
|
|
111
|
+
// only renders them as a PHP value-object class.
|
|
112
|
+
const ops = ent.op || {}
|
|
113
|
+
;['load', 'list', 'create', 'update', 'remove'].forEach((opname: string) => {
|
|
114
|
+
if (null == ops[opname]) {
|
|
115
|
+
return
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const typeName = opTypeName(Name, opname)
|
|
119
|
+
const { items } = opRequestShape(ent, opname)
|
|
120
|
+
|
|
121
|
+
Content(`/** Request payload for ${Name}#${opname}. */
|
|
122
|
+
class ${typeName}
|
|
123
|
+
{
|
|
124
|
+
`)
|
|
125
|
+
items.forEach((it: any) => {
|
|
126
|
+
if (validName(it.name)) {
|
|
127
|
+
Content(propLine(it.name, it.type, it.optional))
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
Content(`}
|
|
131
|
+
|
|
132
|
+
`)
|
|
133
|
+
})
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
export {
|
|
141
|
+
EntityTypes,
|
|
142
|
+
}
|
|
@@ -13,14 +13,31 @@ const MainEntity = cmp(async function MainEntity(props: any) {
|
|
|
13
13
|
const { entity } = props
|
|
14
14
|
const { model } = props.ctx$
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// Canonical facade method name is the PascalCase entity Name
|
|
17
|
+
// (`$client->${entity.Name}()`). PHP method names are case-insensitive, so
|
|
18
|
+
// the lowercase spelling `$client->${entity.name}()` still resolves here as
|
|
19
|
+
// a convenience — we declare it ONCE under the PascalCase name. An entity
|
|
20
|
+
// literally named 'test' would collide (case-insensitively) with the static
|
|
21
|
+
// `test()` test-mode constructor, so mangle to `<Name>_` in that case.
|
|
22
|
+
const accessor = PHP_RESERVED_LOWER.has(entity.name.toLowerCase())
|
|
17
23
|
? entity.Name + '_'
|
|
18
24
|
: entity.Name
|
|
19
25
|
|
|
20
26
|
Content(`
|
|
27
|
+
private $_${entity.name} = null;
|
|
28
|
+
|
|
29
|
+
// Canonical facade: $client->${accessor}()->list() / ->load(["id" => ...]).
|
|
30
|
+
// PHP method names are case-insensitive, so lowercase $client->${entity.name}()
|
|
31
|
+
// resolves here too.
|
|
21
32
|
public function ${accessor}($data = null)
|
|
22
33
|
{
|
|
23
34
|
require_once __DIR__ . '/entity/${entity.name}_entity.php';
|
|
35
|
+
if ($data === null) {
|
|
36
|
+
if ($this->_${entity.name} === null) {
|
|
37
|
+
$this->_${entity.name} = new ${entity.Name}Entity($this, null);
|
|
38
|
+
}
|
|
39
|
+
return $this->_${entity.name};
|
|
40
|
+
}
|
|
24
41
|
return new ${entity.Name}Entity($this, $data);
|
|
25
42
|
}
|
|
26
43
|
|
|
@@ -22,6 +22,7 @@ import { Package } from './Package_php'
|
|
|
22
22
|
import { Config } from './Config_php'
|
|
23
23
|
import { Gitignore } from './Gitignore_php'
|
|
24
24
|
import { MainEntity } from './MainEntity_php'
|
|
25
|
+
import { EntityTypes } from './EntityTypes_php'
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
const Main = cmp(async function Main(props: any) {
|
|
@@ -84,6 +85,9 @@ const Main = cmp(async function Main(props: any) {
|
|
|
84
85
|
Config({ target })
|
|
85
86
|
})
|
|
86
87
|
|
|
88
|
+
// Generate typed models (types/<Sdk>Types.php) — classmap-autoloaded.
|
|
89
|
+
EntityTypes({ target })
|
|
90
|
+
|
|
87
91
|
// Generate feature factory module
|
|
88
92
|
File({ name: 'features.' + target.ext }, () => {
|
|
89
93
|
Content(`<?php
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
File,
|
|
5
5
|
cmp,
|
|
6
6
|
collectDeps,
|
|
7
|
+
pkgDescription,
|
|
8
|
+
keywords,
|
|
9
|
+
repoInfo,
|
|
7
10
|
} from '@voxgig/sdkgen'
|
|
8
11
|
|
|
9
12
|
|
|
@@ -23,14 +26,25 @@ const Package = cmp(async function Package(props: any) {
|
|
|
23
26
|
// "-sdk" (matches the TS Package generator).
|
|
24
27
|
const ns = model.origin || 'voxgig-sdk'
|
|
25
28
|
const pkgBase = ns.endsWith('-sdk') ? model.name : `${model.name}-sdk`
|
|
29
|
+
const { repoUrl, issuesUrl } = repoInfo(model)
|
|
30
|
+
const kw = keywords(model).map((k) => `"${k}"`).join(', ')
|
|
26
31
|
|
|
27
32
|
// Generate composer.json
|
|
28
33
|
File({ name: 'composer.json' }, () => {
|
|
29
34
|
Content(`{
|
|
30
35
|
"name": "${ns}/${pkgBase}",
|
|
31
|
-
"description": "${model
|
|
36
|
+
"description": "${pkgDescription(model, 'php')}",
|
|
32
37
|
"type": "library",
|
|
38
|
+
"keywords": [${kw}],
|
|
39
|
+
"homepage": "${repoUrl}",
|
|
33
40
|
"license": "MIT",
|
|
41
|
+
"authors": [
|
|
42
|
+
{ "name": "Voxgig", "homepage": "https://voxgig.com" }
|
|
43
|
+
],
|
|
44
|
+
"support": {
|
|
45
|
+
"issues": "${issuesUrl}",
|
|
46
|
+
"source": "${repoUrl}"
|
|
47
|
+
},
|
|
34
48
|
"minimum-stability": "stable",
|
|
35
49
|
"require": {
|
|
36
50
|
"php": ">=8.2"`)
|
|
@@ -47,14 +61,11 @@ const Package = cmp(async function Package(props: any) {
|
|
|
47
61
|
"phpunit/phpunit": "^11.0"
|
|
48
62
|
},
|
|
49
63
|
"autoload": {
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
}
|
|
64
|
+
"files": ["${model.const.Name.toLowerCase()}_sdk.php"],
|
|
65
|
+
"classmap": ["core/", "entity/", "feature/", "types/", "utility/", "config.php", "features.php"]
|
|
53
66
|
},
|
|
54
67
|
"autoload-dev": {
|
|
55
|
-
"
|
|
56
|
-
"${model.const.Name}\\\\Tests\\\\": "test/"
|
|
57
|
-
}
|
|
68
|
+
"classmap": ["test/"]
|
|
58
69
|
}
|
|
59
70
|
}
|
|
60
71
|
`)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, each, Content } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, each, Content, canonToType, canonKey, entityIdField, opRequestShape } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -7,6 +7,19 @@ import {
|
|
|
7
7
|
} from '@voxgig/apidef'
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
// A type-correct, executable PHP literal for a param: numeric/boolean/array
|
|
11
|
+
// params render a typed literal; strings render the quoted placeholder (the
|
|
12
|
+
// doc test EXECUTES runnable blocks, so a comment placeholder would not
|
|
13
|
+
// parse).
|
|
14
|
+
function phpLit(type: any, placeholder: string = 'example'): string {
|
|
15
|
+
const k = canonKey(type)
|
|
16
|
+
if ('INTEGER' === k || 'NUMBER' === k) return '1'
|
|
17
|
+
if ('BOOLEAN' === k) return 'true'
|
|
18
|
+
if ('ARRAY' === k || 'OBJECT' === k) return '[]'
|
|
19
|
+
return `"${placeholder}"`
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
10
23
|
// Operation method spelling differs between Go and other languages — Go
|
|
11
24
|
// uses PascalCase methods with explicit ctrl arg, others use lowercase
|
|
12
25
|
// methods with optional ctrl. The op descriptions are language-agnostic.
|
|
@@ -41,6 +54,8 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
41
54
|
publishedEntities.map((entity: any) => {
|
|
42
55
|
const opnames = Object.keys(entity.op || {})
|
|
43
56
|
const fields = entity.fields || []
|
|
57
|
+
// Model-driven id key: null when this entity has no id-like field.
|
|
58
|
+
const idF = entityIdField(entity)
|
|
44
59
|
|
|
45
60
|
Content(`
|
|
46
61
|
### ${entity.Name}
|
|
@@ -53,7 +68,7 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
53
68
|
`)
|
|
54
69
|
}
|
|
55
70
|
|
|
56
|
-
Content(`Create an instance:
|
|
71
|
+
Content(`Create an instance: \`$${entity.name} = $client->${entity.Name}();\`
|
|
57
72
|
|
|
58
73
|
`)
|
|
59
74
|
|
|
@@ -84,7 +99,7 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
84
99
|
|
|
85
100
|
each(fields, (field: any) => {
|
|
86
101
|
const desc = field.short || ''
|
|
87
|
-
Content(`| \`${field.name}\` | \`${field.type
|
|
102
|
+
Content(`| \`${field.name}\` | \`${canonToType(field.type, target.name)}\` | ${desc} |
|
|
88
103
|
`)
|
|
89
104
|
})
|
|
90
105
|
|
|
@@ -93,10 +108,23 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
93
108
|
}
|
|
94
109
|
|
|
95
110
|
if (opnames.includes('load')) {
|
|
111
|
+
// The id key plus every REQUIRED match key (parent path params like
|
|
112
|
+
// page_id) — the same shape the runtime resolves path params from, so
|
|
113
|
+
// the example always works.
|
|
114
|
+
const loadItems = opRequestShape(entity, 'load').items
|
|
115
|
+
.filter((it: any) => !it.optional || it.name === idF)
|
|
116
|
+
.sort((a: any, b: any) =>
|
|
117
|
+
(a.name === idF ? 0 : 1) - (b.name === idF ? 0 : 1))
|
|
118
|
+
const loadArg = 0 < loadItems.length
|
|
119
|
+
? `[${loadItems.map((it: any) =>
|
|
120
|
+
`"${it.name}" => ${phpLit(it.type,
|
|
121
|
+
it.name === idF ? entity.name + '_id' : it.name)}`).join(', ')}]`
|
|
122
|
+
: ''
|
|
96
123
|
Content(`#### Example: Load
|
|
97
124
|
|
|
98
|
-
\`\`\`
|
|
99
|
-
|
|
125
|
+
\`\`\`php
|
|
126
|
+
// load() returns the bare ${entity.Name} record (throws on error).
|
|
127
|
+
$${entity.name} = $client->${entity.Name}()->load(${loadArg});
|
|
100
128
|
\`\`\`
|
|
101
129
|
|
|
102
130
|
`)
|
|
@@ -105,26 +133,30 @@ const ${entity.name} = await client.${entity.Name}().load({ id: '${entity.name}_
|
|
|
105
133
|
if (opnames.includes('list')) {
|
|
106
134
|
Content(`#### Example: List
|
|
107
135
|
|
|
108
|
-
\`\`\`
|
|
109
|
-
|
|
136
|
+
\`\`\`php
|
|
137
|
+
// list() returns an array of ${entity.Name} records (throws on error).
|
|
138
|
+
$${entity.name}s = $client->${entity.Name}()->list();
|
|
110
139
|
\`\`\`
|
|
111
140
|
|
|
112
141
|
`)
|
|
113
142
|
}
|
|
114
143
|
|
|
115
144
|
if (opnames.includes('create')) {
|
|
145
|
+
// Members come from the SAME shape the runtime validates
|
|
146
|
+
// (opRequestShape): every required member must appear — including a
|
|
147
|
+
// required id and parent keys like page_id.
|
|
148
|
+
const createItems = opRequestShape(entity, 'create').items
|
|
149
|
+
.filter((it: any) => !it.optional)
|
|
116
150
|
Content(`#### Example: Create
|
|
117
151
|
|
|
118
|
-
\`\`\`
|
|
119
|
-
|
|
152
|
+
\`\`\`php
|
|
153
|
+
$${entity.name} = $client->${entity.Name}()->create([
|
|
120
154
|
`)
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
Content(` ${field.name}: /* ${field.type || 'value'} */,
|
|
155
|
+
createItems.map((it: any) => {
|
|
156
|
+
Content(` "${it.name}" => null, // ${canonToType(it.type, target.name)}
|
|
124
157
|
`)
|
|
125
|
-
}
|
|
126
158
|
})
|
|
127
|
-
Content(`
|
|
159
|
+
Content(`]);
|
|
128
160
|
\`\`\`
|
|
129
161
|
|
|
130
162
|
`)
|