@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
|
@@ -2,12 +2,68 @@
|
|
|
2
2
|
import * as Path from 'node:path'
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
import {
|
|
6
|
+
canonKey,
|
|
7
|
+
each,
|
|
8
|
+
} from '@voxgig/sdkgen'
|
|
9
|
+
|
|
5
10
|
import {
|
|
6
11
|
clone,
|
|
7
12
|
walk,
|
|
8
13
|
} from '@voxgig/struct'
|
|
9
14
|
|
|
10
15
|
|
|
16
|
+
// --- Model-driven example literals -----------------------------------------
|
|
17
|
+
// Doc snippets must use example values whose TYPE matches the generated
|
|
18
|
+
// types, or the snippet misrepresents the API. The id/match params of
|
|
19
|
+
// load/remove/update are the common trap: their generated
|
|
20
|
+
// `<Name><Op>Match` / `<Name><Op>Data` type is built from the op's params
|
|
21
|
+
// (see EntityTypes_js.ts), so a numeric id shown as a quoted string is
|
|
22
|
+
// wrong. These helpers derive the example literal from the SAME model
|
|
23
|
+
// source, so the docs and the generated types can never disagree.
|
|
24
|
+
|
|
25
|
+
// The declared canon-type sentinel of a named parameter of an op — looked up
|
|
26
|
+
// in the op's `points[].args.params[]` exactly as the typed-model generator
|
|
27
|
+
// does. Falls back to the entity field of the same name (used when the op
|
|
28
|
+
// has no params). Returns undefined when neither is present.
|
|
29
|
+
function paramCanonType(entity: any, op: any, paramName: string): unknown {
|
|
30
|
+
const points = op && op.points ? each(op.points) : []
|
|
31
|
+
for (const pt of points as any[]) {
|
|
32
|
+
const params = pt && pt.args && pt.args.params ? each(pt.args.params) : []
|
|
33
|
+
const found = (params as any[]).find((p: any) => p && p.name === paramName)
|
|
34
|
+
if (found) {
|
|
35
|
+
return found.type
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const field = (entity && entity.fields ? each(entity.fields) : [])
|
|
39
|
+
.find((f: any) => f && f.name === paramName) as any
|
|
40
|
+
return field && field.type
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// A type-correct example literal for a named match/data parameter of an op,
|
|
45
|
+
// derived entirely from the model. INTEGER/NUMBER render as the bare number
|
|
46
|
+
// `1`, BOOLEAN as `true`, ARRAY as the empty `[]` and OBJECT as the empty
|
|
47
|
+
// `{}`, everything else (STRING, unknown, missing) as the quoted
|
|
48
|
+
// `placeholder`.
|
|
49
|
+
function exampleValue(entity: any, op: any, paramName: string, placeholder: string): string {
|
|
50
|
+
const key = canonKey(paramCanonType(entity, op, paramName))
|
|
51
|
+
if ('INTEGER' === key || 'NUMBER' === key) {
|
|
52
|
+
return '1'
|
|
53
|
+
}
|
|
54
|
+
if ('BOOLEAN' === key) {
|
|
55
|
+
return 'true'
|
|
56
|
+
}
|
|
57
|
+
if ('ARRAY' === key) {
|
|
58
|
+
return '[]'
|
|
59
|
+
}
|
|
60
|
+
if ('OBJECT' === key) {
|
|
61
|
+
return '{}'
|
|
62
|
+
}
|
|
63
|
+
return `'${placeholder}'`
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
11
67
|
function projectPath(suffix?: string): string {
|
|
12
68
|
return Path.normalize(Path.join(__dirname, '../../..', suffix ?? ''))
|
|
13
69
|
}
|
|
@@ -61,4 +117,5 @@ export {
|
|
|
61
117
|
formatJSONSrc,
|
|
62
118
|
formatJson,
|
|
63
119
|
projectPath,
|
|
120
|
+
exampleValue,
|
|
64
121
|
}
|
|
@@ -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,113 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
// Typed-model generator (Lua target).
|
|
4
|
+
//
|
|
5
|
+
// Lua is dynamically typed, so the "types" are LuaLS annotations
|
|
6
|
+
// (---@class / ---@field) for editor/tooling DX only — no runtime effect.
|
|
7
|
+
//
|
|
8
|
+
// Reads main.<KIT>.entity.<e>.fields[] and per-op params
|
|
9
|
+
// (op.<name>.points[].args.params[]) and emits one file, <sdk>_types.lua,
|
|
10
|
+
// with a `---@class <Name>` per active entity plus a request/match ---@class
|
|
11
|
+
// per active op. Field/param sentinels ($STRING, $INTEGER, ...) are turned
|
|
12
|
+
// into LuaLS types by the shared sdkgen helper `canonToType` ('lua' column).
|
|
13
|
+
//
|
|
14
|
+
// Keeps the SAME type-name scheme as the TS reference (<Name>,
|
|
15
|
+
// <Name>LoadMatch, <Name>ListMatch, <Name>CreateData, <Name>UpdateData,
|
|
16
|
+
// <Name>RemoveMatch). The op fragments reference these class names via
|
|
17
|
+
// ---@param / ---@return.
|
|
18
|
+
|
|
19
|
+
import {
|
|
20
|
+
cmp, each,
|
|
21
|
+
File, Content,
|
|
22
|
+
} from '@voxgig/sdkgen'
|
|
23
|
+
|
|
24
|
+
import { canonToType, opTypeName, opRequestShape } from '@voxgig/sdkgen'
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
KIT,
|
|
28
|
+
getModelPath,
|
|
29
|
+
} from '@voxgig/apidef'
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
const LANG = 'lua'
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// A bare LuaLS field key, or a bracketed string literal for anything that is
|
|
36
|
+
// not a plain Lua identifier.
|
|
37
|
+
function propKey(name: string): string {
|
|
38
|
+
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(name) ? name : '[' + JSON.stringify(name) + ']'
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
const EntityTypes = cmp(function EntityTypes(props: any) {
|
|
43
|
+
const { target } = props
|
|
44
|
+
const { model } = props.ctx$
|
|
45
|
+
|
|
46
|
+
const entity = getModelPath(model, `main.${KIT}.entity`)
|
|
47
|
+
const entityList = each(entity).filter((e: any) => e.active !== false)
|
|
48
|
+
|
|
49
|
+
File({ name: model.name + '_types.' + (target.ext || LANG) }, () => {
|
|
50
|
+
|
|
51
|
+
Content(`-- Typed models for the ${model.const.Name} SDK (LuaLS annotations).
|
|
52
|
+
--
|
|
53
|
+
-- GENERATED from the API model: main.${KIT}.entity.<e>.fields[] and per-op
|
|
54
|
+
-- params (op.<name>.points[].args.params[]). Field/param types come from the
|
|
55
|
+
-- canonical type sentinels via @voxgig/sdkgen canonToType (source of truth:
|
|
56
|
+
-- @voxgig/apidef VALID_CANON). Annotations only — no runtime effect. Do not
|
|
57
|
+
-- edit by hand.
|
|
58
|
+
|
|
59
|
+
`)
|
|
60
|
+
|
|
61
|
+
entityList.forEach((ent: any) => {
|
|
62
|
+
const Name = ent.Name
|
|
63
|
+
const fields = (ent.fields ? each(ent.fields) : [])
|
|
64
|
+
.filter((f: any) => f.active !== false)
|
|
65
|
+
|
|
66
|
+
// Entity data model: one ---@field per field, `req:false` -> optional (?).
|
|
67
|
+
Content(`---@class ${Name}
|
|
68
|
+
`)
|
|
69
|
+
fields.forEach((f: any) => {
|
|
70
|
+
const opt = false === f.req ? '?' : ''
|
|
71
|
+
Content(`---@field ${propKey(f.name)}${opt} ${canonToType(f.type, LANG)}
|
|
72
|
+
`)
|
|
73
|
+
})
|
|
74
|
+
Content(`
|
|
75
|
+
`)
|
|
76
|
+
|
|
77
|
+
// Per active op: a request/match class. Members and their optionality
|
|
78
|
+
// come from the shared partiality policy (opRequestShape); this file only
|
|
79
|
+
// renders them as LuaLS ---@field lines.
|
|
80
|
+
const ops = ent.op || {}
|
|
81
|
+
;['load', 'list', 'create', 'update', 'remove'].forEach((opname: string) => {
|
|
82
|
+
if (null == ops[opname]) {
|
|
83
|
+
return
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const typeName = opTypeName(Name, opname)
|
|
87
|
+
const { items } = opRequestShape(ent, opname)
|
|
88
|
+
|
|
89
|
+
Content(`---@class ${typeName}
|
|
90
|
+
`)
|
|
91
|
+
items.forEach((it: any) => {
|
|
92
|
+
const opt = it.optional ? '?' : ''
|
|
93
|
+
Content(`---@field ${propKey(it.name)}${opt} ${canonToType(it.type, LANG)}
|
|
94
|
+
`)
|
|
95
|
+
})
|
|
96
|
+
Content(`
|
|
97
|
+
`)
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
// Make the file a require-able (empty) module. The blank line above keeps
|
|
102
|
+
// LuaLS from binding the last ---@class to this local.
|
|
103
|
+
Content(`local M = {}
|
|
104
|
+
|
|
105
|
+
return M
|
|
106
|
+
`)
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
export {
|
|
112
|
+
EntityTypes,
|
|
113
|
+
}
|
|
@@ -8,8 +8,16 @@ const MainEntity = cmp(async function MainEntity(props: any) {
|
|
|
8
8
|
const { model } = props.ctx$
|
|
9
9
|
|
|
10
10
|
Content(`
|
|
11
|
+
-- Idiomatic facade: client:${entity.Name}():list() / client:${entity.Name}():load({ id = ... })
|
|
12
|
+
-- Entity access is capitalised (PascalCase) for parity with the other SDKs.
|
|
11
13
|
function ${model.const.Name}SDK:${entity.Name}(data)
|
|
12
14
|
local EntityMod = require("entity.${entity.name}_entity")
|
|
15
|
+
if data == nil then
|
|
16
|
+
if self._${entity.name} == nil then
|
|
17
|
+
self._${entity.name} = EntityMod.new(self, nil)
|
|
18
|
+
end
|
|
19
|
+
return self._${entity.name}
|
|
20
|
+
end
|
|
13
21
|
return EntityMod.new(self, data)
|
|
14
22
|
end
|
|
15
23
|
|
|
@@ -22,6 +22,7 @@ import { Package } from './Package_lua'
|
|
|
22
22
|
import { Config } from './Config_lua'
|
|
23
23
|
import { Gitignore } from './Gitignore_lua'
|
|
24
24
|
import { MainEntity } from './MainEntity_lua'
|
|
25
|
+
import { EntityTypes } from './EntityTypes_lua'
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
const Main = cmp(async function Main(props: any) {
|
|
@@ -79,6 +80,9 @@ self._utility.feature_hook(self._rootctx, "${name}")
|
|
|
79
80
|
})
|
|
80
81
|
})
|
|
81
82
|
|
|
83
|
+
// Generate typed-model annotations (LuaLS ---@class / ---@field)
|
|
84
|
+
EntityTypes({ target })
|
|
85
|
+
|
|
82
86
|
// Generate config module
|
|
83
87
|
Folder({ name: '.' }, () => {
|
|
84
88
|
Config({ target })
|
|
@@ -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
|
|
|
@@ -24,23 +27,39 @@ const Package = cmp(async function Package(props: any) {
|
|
|
24
27
|
const ns = model.origin || 'voxgig-sdk'
|
|
25
28
|
const pkgBase = ns.endsWith('-sdk') ? model.name : `${model.name}-sdk`
|
|
26
29
|
const rockName = `${ns}-${pkgBase}`
|
|
30
|
+
const { repoUrl, issuesUrl } = repoInfo(model)
|
|
31
|
+
const labels = keywords(model).map((k) => `"${k}"`).join(', ')
|
|
32
|
+
|
|
33
|
+
// Single source for the version so the rockspec version and the source.tag
|
|
34
|
+
// (which `make publish` pushes as lua/v<rockVersion>) can never drift apart.
|
|
35
|
+
const rockVersion = '0.0.1'
|
|
27
36
|
|
|
28
37
|
File({ name: model.name + '.rockspec' }, () => {
|
|
29
38
|
Content(`package = "${rockName}"
|
|
30
|
-
version = "
|
|
39
|
+
version = "${rockVersion}-1"
|
|
31
40
|
source = {
|
|
32
|
-
|
|
41
|
+
-- git+https (GitHub dropped git:// in 2022); pin the install to the release
|
|
42
|
+
-- tag pushed by \`make publish\`, and point at the lua/ subdir of the monorepo.
|
|
43
|
+
url = "git+https://github.com/${ns}/${model.name}-sdk.git",
|
|
44
|
+
tag = "lua/v${rockVersion}",
|
|
45
|
+
dir = "${model.name}-sdk/lua"
|
|
33
46
|
}
|
|
34
47
|
description = {
|
|
35
|
-
summary = "${model
|
|
36
|
-
|
|
48
|
+
summary = "${pkgDescription(model, 'lua')}",
|
|
49
|
+
homepage = "${repoUrl}",
|
|
50
|
+
issues_url = "${issuesUrl}",
|
|
51
|
+
license = "MIT",
|
|
52
|
+
labels = { ${labels} }
|
|
37
53
|
}
|
|
38
54
|
dependencies = {
|
|
39
55
|
"lua >= 5.3",
|
|
40
56
|
"dkjson >= 2.5",
|
|
41
57
|
`)
|
|
42
58
|
|
|
59
|
+
const seen = new Set<string>(['lua', 'dkjson'])
|
|
43
60
|
for (const d of collectDeps(model, target.name, target.deps)) {
|
|
61
|
+
if (seen.has(d.name)) continue
|
|
62
|
+
seen.add(d.name)
|
|
44
63
|
const v = d.source === 'target' ? (d.version || '0.0') : d.version
|
|
45
64
|
Content(` "${d.name} >= ${v}",
|
|
46
65
|
`)
|
|
@@ -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,24 @@ import {
|
|
|
7
7
|
} from '@voxgig/apidef'
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
// A type-correct, executable Lua literal for a param: numeric/boolean/table
|
|
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 luaLit(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
|
+
// Non-identifier table keys use bracket syntax.
|
|
23
|
+
function luaKey(name: string): string {
|
|
24
|
+
return /^[A-Za-z_]\w*$/.test(name) ? name : `["${name}"]`
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
10
28
|
// Operation method spelling differs between Go and other languages — Go
|
|
11
29
|
// uses PascalCase methods with explicit ctrl arg, others use lowercase
|
|
12
30
|
// methods with optional ctrl. The op descriptions are language-agnostic.
|
|
@@ -41,6 +59,8 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
41
59
|
publishedEntities.map((entity: any) => {
|
|
42
60
|
const opnames = Object.keys(entity.op || {})
|
|
43
61
|
const fields = entity.fields || []
|
|
62
|
+
// Model-driven id key: null when this entity has no id-like field.
|
|
63
|
+
const idF = entityIdField(entity)
|
|
44
64
|
|
|
45
65
|
Content(`
|
|
46
66
|
### ${entity.Name}
|
|
@@ -53,7 +73,7 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
53
73
|
`)
|
|
54
74
|
}
|
|
55
75
|
|
|
56
|
-
Content(`Create an instance: \`
|
|
76
|
+
Content(`Create an instance: \`local ${entity.name} = client:${entity.Name}(nil)\`
|
|
57
77
|
|
|
58
78
|
`)
|
|
59
79
|
|
|
@@ -84,7 +104,7 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
84
104
|
|
|
85
105
|
each(fields, (field: any) => {
|
|
86
106
|
const desc = field.short || ''
|
|
87
|
-
Content(`| \`${field.name}\` | \`${field.type
|
|
107
|
+
Content(`| \`${field.name}\` | \`${canonToType(field.type, target.name)}\` | ${desc} |
|
|
88
108
|
`)
|
|
89
109
|
})
|
|
90
110
|
|
|
@@ -93,10 +113,22 @@ const ReadmeEntity = cmp(function ReadmeEntity(props: any) {
|
|
|
93
113
|
}
|
|
94
114
|
|
|
95
115
|
if (opnames.includes('load')) {
|
|
116
|
+
// The id key plus every REQUIRED match key (parent path params like
|
|
117
|
+
// page_id) — the same shape the runtime resolves path params from, so
|
|
118
|
+
// the example always works.
|
|
119
|
+
const loadItems = opRequestShape(entity, 'load').items
|
|
120
|
+
.filter((it: any) => !it.optional || it.name === idF)
|
|
121
|
+
.sort((a: any, b: any) =>
|
|
122
|
+
(a.name === idF ? 0 : 1) - (b.name === idF ? 0 : 1))
|
|
123
|
+
const loadArg = 0 < loadItems.length
|
|
124
|
+
? `{ ${loadItems.map((it: any) =>
|
|
125
|
+
`${luaKey(it.name)} = ${luaLit(it.type,
|
|
126
|
+
it.name === idF ? entity.name + '_id' : it.name)}`).join(', ')} }`
|
|
127
|
+
: ''
|
|
96
128
|
Content(`#### Example: Load
|
|
97
129
|
|
|
98
|
-
\`\`\`
|
|
99
|
-
|
|
130
|
+
\`\`\`lua
|
|
131
|
+
local ${entity.name}, err = client:${entity.Name}():load(${loadArg})
|
|
100
132
|
\`\`\`
|
|
101
133
|
|
|
102
134
|
`)
|
|
@@ -105,24 +137,29 @@ const ${entity.name} = await client.${entity.Name}().load({ id: '${entity.name}_
|
|
|
105
137
|
if (opnames.includes('list')) {
|
|
106
138
|
Content(`#### Example: List
|
|
107
139
|
|
|
108
|
-
\`\`\`
|
|
109
|
-
|
|
140
|
+
\`\`\`lua
|
|
141
|
+
local ${entity.name}s, err = client:${entity.Name}():list()
|
|
110
142
|
\`\`\`
|
|
111
143
|
|
|
112
144
|
`)
|
|
113
145
|
}
|
|
114
146
|
|
|
115
147
|
if (opnames.includes('create')) {
|
|
148
|
+
// Members come from the SAME shape the runtime validates
|
|
149
|
+
// (opRequestShape): every required member must appear — including a
|
|
150
|
+
// required id and parent keys like page_id — with a real, executable
|
|
151
|
+
// literal (the doc test RUNS this block, so a nil member would vanish
|
|
152
|
+
// from the table and a comment placeholder would not parse).
|
|
153
|
+
const createItems = opRequestShape(entity, 'create').items
|
|
154
|
+
.filter((it: any) => !it.optional)
|
|
116
155
|
Content(`#### Example: Create
|
|
117
156
|
|
|
118
|
-
\`\`\`
|
|
119
|
-
|
|
157
|
+
\`\`\`lua
|
|
158
|
+
local ${entity.name}, err = client:${entity.Name}():create({
|
|
120
159
|
`)
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
Content(` ${field.name}: /* ${field.type || 'value'} */,
|
|
160
|
+
createItems.map((it: any) => {
|
|
161
|
+
Content(` ${luaKey(it.name)} = ${luaLit(it.type, 'example_' + it.name)}, -- ${canonToType(it.type, target.name)}
|
|
124
162
|
`)
|
|
125
|
-
}
|
|
126
163
|
})
|
|
127
164
|
Content(`})
|
|
128
165
|
\`\`\`
|