@voxgig/sdkgen 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +2 -2
- package/dist/action/action.d.ts +2 -1
- package/dist/action/action.js +15 -9
- package/dist/action/action.js.map +1 -1
- package/dist/action/feature.js +6 -3
- package/dist/action/feature.js.map +1 -1
- package/dist/action/target.d.ts +7 -1
- package/dist/action/target.js +13 -6
- 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 +193 -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 +11 -1
- package/dist/sdkgen.js +57 -18
- 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.js +20 -11
- package/dist/utility.js.map +1 -1
- package/model/sdkgen.aontu +137 -0
- package/package.json +11 -5
- package/project/.sdk/model/target/go-cli.jsonic +47 -0
- package/project/.sdk/model/target/go-mcp.jsonic +41 -0
- package/project/.sdk/model/target/go.jsonic +9 -3
- package/project/.sdk/model/target/js.jsonic +13 -0
- package/project/.sdk/model/target/lua.jsonic +13 -0
- package/project/.sdk/model/target/php.jsonic +13 -0
- package/project/.sdk/model/target/py.jsonic +13 -0
- package/project/.sdk/model/target/rb.jsonic +13 -0
- package/project/.sdk/model/target/ts.jsonic +13 -0
- 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 +18 -6
- package/project/.sdk/src/cmp/go/ReadmeExamplesTest_go.ts +684 -0
- package/project/.sdk/src/cmp/go/ReadmeExplanation_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +48 -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 +63 -17
- package/project/.sdk/src/cmp/go/ReadmeOptions_go.ts +4 -3
- package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +124 -115
- package/project/.sdk/src/cmp/go/ReadmeRef_go.ts +28 -15
- package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +33 -9
- 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-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/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 +13 -7
- 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 +45 -19
- package/project/.sdk/src/cmp/js/ReadmeRef_js.ts +24 -13
- package/project/.sdk/src/cmp/js/ReadmeTopHowto_js.ts +3 -0
- package/project/.sdk/src/cmp/js/ReadmeTopQuick_js.ts +28 -12
- package/project/.sdk/src/cmp/js/ReadmeTopTest_js.ts +23 -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/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 +12 -10
- 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 +79 -18
- package/project/.sdk/src/cmp/lua/ReadmeRef_lua.ts +25 -20
- package/project/.sdk/src/cmp/lua/ReadmeTopQuick_lua.ts +17 -9
- package/project/.sdk/src/cmp/lua/ReadmeTopTest_lua.ts +32 -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/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 +15 -11
- 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 +80 -22
- package/project/.sdk/src/cmp/php/ReadmeRef_php.ts +51 -42
- package/project/.sdk/src/cmp/php/ReadmeTopHowto_php.ts +1 -1
- package/project/.sdk/src/cmp/php/ReadmeTopQuick_php.ts +19 -11
- package/project/.sdk/src/cmp/php/ReadmeTopTest_php.ts +41 -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/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 +27 -11
- 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 +73 -24
- package/project/.sdk/src/cmp/py/ReadmeRef_py.ts +57 -37
- package/project/.sdk/src/cmp/py/ReadmeTopHowto_py.ts +1 -1
- package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +19 -11
- package/project/.sdk/src/cmp/py/ReadmeTopTest_py.ts +30 -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/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 +26 -10
- 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 +85 -22
- package/project/.sdk/src/cmp/rb/ReadmeRef_rb.ts +56 -37
- package/project/.sdk/src/cmp/rb/ReadmeTopHowto_rb.ts +1 -1
- package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +19 -11
- package/project/.sdk/src/cmp/rb/ReadmeTopTest_rb.ts +43 -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/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 +13 -7
- 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 +95 -40
- package/project/.sdk/src/cmp/ts/ReadmeRef_ts.ts +24 -13
- package/project/.sdk/src/cmp/ts/ReadmeTopHowto_ts.ts +3 -0
- package/project/.sdk/src/cmp/ts/ReadmeTopQuick_ts.ts +44 -12
- package/project/.sdk/src/cmp/ts/ReadmeTopTest_ts.ts +23 -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/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 +33 -1
- 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 +17 -10
- package/src/action/feature.ts +8 -6
- package/src/action/target.ts +17 -8
- 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 +236 -0
- package/src/helpers/packageMeta.ts +236 -0
- package/src/sdkgen.ts +87 -20
- package/src/tsconfig.json +1 -0
- package/src/types.ts +85 -2
- package/src/utility.ts +22 -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/tm/go/utility/struct/go.mod +0 -3
|
@@ -4,305 +4,295 @@ exports.ReadmeExplanation = void 0;
|
|
|
4
4
|
const jostraca_1 = require("jostraca");
|
|
5
5
|
const types_1 = require("../types");
|
|
6
6
|
const utility_1 = require("../utility");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(0
|
|
12
|
-
|
|
7
|
+
const opShape_1 = require("../helpers/opShape");
|
|
8
|
+
const opExample_1 = require("../helpers/opExample");
|
|
9
|
+
const naming_1 = require("../helpers/naming");
|
|
10
|
+
function cap(s) {
|
|
11
|
+
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
12
|
+
}
|
|
13
|
+
const DEFAULT_LANG = {
|
|
14
|
+
featureKind: `Features are the extension mechanism. A feature is an object with a
|
|
15
|
+
\`hooks\` map. Each hook key is a pipeline stage name, and the value is
|
|
16
|
+
a function that receives the context.
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
`,
|
|
19
|
+
entityState: (eName, eLower, op, arg, matchIdF, idLit) => `Entity instances are stateful. After a successful \`${op}\`, the entity
|
|
20
|
+
stores the returned data and match criteria internally. Subsequent
|
|
21
|
+
calls on the same instance can rely on this state.
|
|
15
22
|
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
\`\`\`ts
|
|
24
|
+
const ${eLower} = client.${eName}()
|
|
25
|
+
await ${eLower}.${op}(${arg})
|
|
18
26
|
|
|
27
|
+
// ${eLower}.data() now returns the ${eLower} data from the last \`${op}\`
|
|
28
|
+
${matchIdF ? `// ${eLower}.match() returns { ${matchIdF}: ${idLit} }` : `// ${eLower}.match() returns the last match criteria`}
|
|
19
29
|
\`\`\`
|
|
20
|
-
PrePoint \u2192 PreSpec \u2192 PreRequest \u2192 PreResponse \u2192 PreResult \u2192 PreDone
|
|
21
|
-
\`\`\`
|
|
22
|
-
|
|
23
|
-
- **PrePoint**: Resolves which API endpoint to call based on the
|
|
24
|
-
operation name and entity configuration.
|
|
25
|
-
- **PreSpec**: Builds the HTTP spec \u2014 URL, method, headers, body \u2014
|
|
26
|
-
from the resolved point and the caller's parameters.
|
|
27
|
-
- **PreRequest**: Sends the HTTP request. Features can intercept here
|
|
28
|
-
to replace the transport (as TestFeature does with mocks).
|
|
29
|
-
- **PreResponse**: Parses the raw HTTP response.
|
|
30
|
-
- **PreResult**: Extracts the business data from the parsed response.
|
|
31
|
-
- **PreDone**: Final stage before returning to the caller. Entity
|
|
32
|
-
state (match, data) is updated here.
|
|
33
|
-
|
|
34
|
-
`);
|
|
35
|
-
// Target-specific error description
|
|
36
|
-
if (target.name === 'py') {
|
|
37
|
-
(0, jostraca_1.Content)(`If any stage returns an error, the pipeline short-circuits and the
|
|
38
|
-
error is returned to the caller as the second element in the return tuple.
|
|
39
|
-
|
|
40
|
-
`);
|
|
41
|
-
}
|
|
42
|
-
else if (target.name === 'php') {
|
|
43
|
-
(0, jostraca_1.Content)(`If any stage returns an error, the pipeline short-circuits and the
|
|
44
|
-
error is returned to the caller as the second element in the return array.
|
|
45
30
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
else if (target.name === 'rb') {
|
|
49
|
-
(0, jostraca_1.Content)(`If any stage returns an error, the pipeline short-circuits and the
|
|
50
|
-
error is returned to the caller as a second return value.
|
|
51
|
-
|
|
52
|
-
`);
|
|
53
|
-
}
|
|
54
|
-
else if (target.name === 'lua') {
|
|
55
|
-
(0, jostraca_1.Content)(`If any stage returns an error, the pipeline short-circuits and the
|
|
56
|
-
error is returned to the caller as a second return value.
|
|
57
|
-
|
|
58
|
-
`);
|
|
59
|
-
}
|
|
60
|
-
else if (target.name === 'go') {
|
|
61
|
-
(0, jostraca_1.Content)(`If any stage returns an error, the pipeline short-circuits and the
|
|
62
|
-
error is returned to the caller. An unexpected panic triggers the
|
|
63
|
-
\`PreUnexpected\` hook.
|
|
64
|
-
|
|
65
|
-
`);
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
(0, jostraca_1.Content)(`If any stage returns an error, the pipeline short-circuits and the
|
|
69
|
-
error is returned to the caller.
|
|
70
|
-
|
|
71
|
-
An unexpected exception triggers the \`PreUnexpected\` hook before
|
|
72
|
-
propagating.
|
|
73
|
-
|
|
74
|
-
`);
|
|
75
|
-
}
|
|
76
|
-
// Features and hooks
|
|
77
|
-
(0, jostraca_1.Content)(`### Features and hooks
|
|
78
|
-
|
|
79
|
-
`);
|
|
80
|
-
if (target.name === 'py') {
|
|
81
|
-
(0, jostraca_1.Content)(`Features are the extension mechanism. A feature is a Python class
|
|
82
|
-
with hook methods named after pipeline stages (e.g. \`PrePoint\`,
|
|
83
|
-
\`PreSpec\`). Each method receives the context.
|
|
84
|
-
|
|
85
|
-
`);
|
|
86
|
-
}
|
|
87
|
-
else if (target.name === 'php') {
|
|
88
|
-
(0, jostraca_1.Content)(`Features are the extension mechanism. A feature is a PHP class
|
|
89
|
-
with hook methods named after pipeline stages (e.g. \`PrePoint\`,
|
|
90
|
-
\`PreSpec\`). Each method receives the context.
|
|
31
|
+
Call \`make()\` to create a fresh instance with the same configuration
|
|
32
|
+
but no stored state.
|
|
91
33
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
\`PreSpec\`). Each method receives the context.
|
|
34
|
+
`,
|
|
35
|
+
direct: `The \`direct\` method gives full control over the HTTP request. Use it
|
|
36
|
+
for non-standard endpoints, bulk operations, or any path not modelled
|
|
37
|
+
as an entity. The \`prepare\` method is useful for debugging — it
|
|
38
|
+
shows exactly what \`direct\` would send.
|
|
98
39
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
40
|
+
`,
|
|
41
|
+
};
|
|
42
|
+
const LANGS = {
|
|
43
|
+
py: {
|
|
44
|
+
featureKind: `Features are the extension mechanism. A feature is a Python class
|
|
103
45
|
with hook methods named after pipeline stages (e.g. \`PrePoint\`,
|
|
104
46
|
\`PreSpec\`). Each method receives the context.
|
|
105
47
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
else if (target.name === 'go') {
|
|
109
|
-
(0, jostraca_1.Content)(`Features are the extension mechanism. A feature implements the
|
|
110
|
-
\`Feature\` interface and provides hooks \u2014 functions keyed by pipeline
|
|
111
|
-
stage names.
|
|
112
|
-
|
|
113
|
-
`);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
(0, jostraca_1.Content)(`Features are the extension mechanism. A feature is an object with a
|
|
117
|
-
\`hooks\` map. Each hook key is a pipeline stage name, and the value is
|
|
118
|
-
a function that receives the context.
|
|
119
|
-
|
|
120
|
-
`);
|
|
121
|
-
}
|
|
122
|
-
(0, jostraca_1.Content)(`The SDK ships with built-in features:
|
|
123
|
-
|
|
124
|
-
`);
|
|
125
|
-
(0, jostraca_1.each)(feature, (feat) => {
|
|
126
|
-
if (!feat.active)
|
|
127
|
-
return;
|
|
128
|
-
if (!feat.Name)
|
|
129
|
-
(0, jostraca_1.names)(feat, feat.name);
|
|
130
|
-
const purpose = feat.title || feat.Name || feat.name;
|
|
131
|
-
(0, jostraca_1.Content)(`- **${feat.Name}Feature**: ${purpose}
|
|
132
|
-
`);
|
|
133
|
-
});
|
|
134
|
-
(0, jostraca_1.Content)(`
|
|
135
|
-
Features are initialized in order. Hooks fire in the order features
|
|
136
|
-
were added, so later features can override earlier ones.
|
|
137
|
-
|
|
138
|
-
`);
|
|
139
|
-
// Target-specific explanation
|
|
140
|
-
const ReadmeExplanation_sdk = (0, utility_1.requirePath)(ctx$, `./cmp/${target.name}/ReadmeExplanation_${target.name}`, { ignore: true });
|
|
141
|
-
if (ReadmeExplanation_sdk) {
|
|
142
|
-
ReadmeExplanation_sdk['ReadmeExplanation']({ target });
|
|
143
|
-
}
|
|
144
|
-
// Entity state
|
|
145
|
-
(0, jostraca_1.Content)(`### Entity state
|
|
146
|
-
|
|
147
|
-
`);
|
|
148
|
-
if (target.name === 'py') {
|
|
149
|
-
(0, jostraca_1.Content)(`Entity instances are stateful. After a successful \`load\`, the entity
|
|
48
|
+
`,
|
|
49
|
+
entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${op}\`, the entity
|
|
150
50
|
stores the returned data and match criteria internally.
|
|
151
51
|
|
|
152
52
|
\`\`\`python
|
|
153
|
-
|
|
154
|
-
|
|
53
|
+
${eLower} = client.${eName}()
|
|
54
|
+
${eLower}.${op}(${arg})
|
|
155
55
|
|
|
156
|
-
#
|
|
157
|
-
#
|
|
56
|
+
# ${eLower}.data_get() now returns the ${eLower} data from the last ${op}
|
|
57
|
+
# ${eLower}.match_get() returns the last match criteria
|
|
158
58
|
\`\`\`
|
|
159
59
|
|
|
160
60
|
Call \`make()\` to create a fresh instance with the same configuration
|
|
161
61
|
but no stored state.
|
|
162
62
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
63
|
+
`,
|
|
64
|
+
direct: `\`direct()\` gives full control over the HTTP request. Use it for
|
|
65
|
+
non-standard endpoints, bulk operations, or any path not modelled as
|
|
66
|
+
an entity. \`prepare()\` builds the request without sending it — useful
|
|
67
|
+
for debugging or custom transport.
|
|
68
|
+
|
|
69
|
+
`,
|
|
70
|
+
},
|
|
71
|
+
php: {
|
|
72
|
+
featureKind: `Features are the extension mechanism. A feature is a PHP class
|
|
73
|
+
with hook methods named after pipeline stages (e.g. \`PrePoint\`,
|
|
74
|
+
\`PreSpec\`). Each method receives the context.
|
|
75
|
+
|
|
76
|
+
`,
|
|
77
|
+
entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${op}\`, the entity
|
|
167
78
|
stores the returned data and match criteria internally.
|
|
168
79
|
|
|
169
80
|
\`\`\`php
|
|
170
|
-
|
|
171
|
-
|
|
81
|
+
$${eLower} = $client->${eName}();
|
|
82
|
+
$${eLower}->${op}(${arg});
|
|
172
83
|
|
|
173
|
-
//
|
|
174
|
-
//
|
|
84
|
+
// $${eLower}->data_get() now returns the ${eLower} data from the last ${op}
|
|
85
|
+
// $${eLower}->match_get() returns the last match criteria
|
|
175
86
|
\`\`\`
|
|
176
87
|
|
|
177
88
|
Call \`make()\` to create a fresh instance with the same configuration
|
|
178
89
|
but no stored state.
|
|
179
90
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
91
|
+
`,
|
|
92
|
+
direct: `\`direct()\` gives full control over the HTTP request. Use it for
|
|
93
|
+
non-standard endpoints, bulk operations, or any path not modelled as
|
|
94
|
+
an entity. \`prepare()\` builds the request without sending it — useful
|
|
95
|
+
for debugging or custom transport.
|
|
96
|
+
|
|
97
|
+
`,
|
|
98
|
+
},
|
|
99
|
+
rb: {
|
|
100
|
+
featureKind: `Features are the extension mechanism. A feature is a Ruby class
|
|
101
|
+
with hook methods named after pipeline stages (e.g. \`PrePoint\`,
|
|
102
|
+
\`PreSpec\`). Each method receives the context.
|
|
103
|
+
|
|
104
|
+
`,
|
|
105
|
+
entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${op}\`, the entity
|
|
184
106
|
stores the returned data and match criteria internally.
|
|
185
107
|
|
|
186
108
|
\`\`\`ruby
|
|
187
|
-
|
|
188
|
-
|
|
109
|
+
${eLower} = client.${eName}
|
|
110
|
+
${eLower}.${op}(${arg})
|
|
189
111
|
|
|
190
|
-
#
|
|
191
|
-
#
|
|
112
|
+
# ${eLower}.data_get now returns the ${eLower} data from the last ${op}
|
|
113
|
+
# ${eLower}.match_get returns the last match criteria
|
|
192
114
|
\`\`\`
|
|
193
115
|
|
|
194
116
|
Call \`make\` to create a fresh instance with the same configuration
|
|
195
117
|
but no stored state.
|
|
196
118
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
119
|
+
`,
|
|
120
|
+
direct: `\`direct\` gives full control over the HTTP request. Use it for
|
|
121
|
+
non-standard endpoints, bulk operations, or any path not modelled as
|
|
122
|
+
an entity. \`prepare\` builds the request without sending it — useful
|
|
123
|
+
for debugging or custom transport.
|
|
124
|
+
|
|
125
|
+
`,
|
|
126
|
+
},
|
|
127
|
+
lua: {
|
|
128
|
+
featureKind: `Features are the extension mechanism. A feature is a Lua table
|
|
129
|
+
with hook methods named after pipeline stages (e.g. \`PrePoint\`,
|
|
130
|
+
\`PreSpec\`). Each method receives the context.
|
|
131
|
+
|
|
132
|
+
`,
|
|
133
|
+
entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${op}\`, the entity
|
|
201
134
|
stores the returned data and match criteria internally.
|
|
202
135
|
|
|
203
136
|
\`\`\`lua
|
|
204
|
-
local
|
|
205
|
-
|
|
137
|
+
local ${eLower} = client:${eName}()
|
|
138
|
+
${eLower}:${op}(${arg})
|
|
206
139
|
|
|
207
|
-
--
|
|
208
|
-
--
|
|
140
|
+
-- ${eLower}:data_get() now returns the ${eLower} data from the last ${op}
|
|
141
|
+
-- ${eLower}:match_get() returns the last match criteria
|
|
209
142
|
\`\`\`
|
|
210
143
|
|
|
211
144
|
Call \`make()\` to create a fresh instance with the same configuration
|
|
212
145
|
but no stored state.
|
|
213
146
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
147
|
+
`,
|
|
148
|
+
direct: `\`direct()\` gives full control over the HTTP request. Use it for
|
|
149
|
+
non-standard endpoints, bulk operations, or any path not modelled as
|
|
150
|
+
an entity. \`prepare()\` builds the request without sending it — useful
|
|
151
|
+
for debugging or custom transport.
|
|
152
|
+
|
|
153
|
+
`,
|
|
154
|
+
},
|
|
155
|
+
go: {
|
|
156
|
+
featureKind: `Features are the extension mechanism. A feature implements the
|
|
157
|
+
\`Feature\` interface and provides hooks — functions keyed by pipeline
|
|
158
|
+
stage names.
|
|
159
|
+
|
|
160
|
+
`,
|
|
161
|
+
entityState: (eName, eLower, op, arg) => `Entity instances are stateful. After a successful \`${cap(op)}\`, the entity
|
|
218
162
|
stores the returned data and match criteria internally.
|
|
219
163
|
|
|
220
164
|
\`\`\`go
|
|
221
|
-
|
|
222
|
-
|
|
165
|
+
${eLower} := client.${eName}(nil)
|
|
166
|
+
${eLower}.${cap(op)}(${arg}, nil)
|
|
223
167
|
|
|
224
|
-
//
|
|
225
|
-
//
|
|
168
|
+
// ${eLower}.Data() now returns the ${eLower} data from the last ${op}
|
|
169
|
+
// ${eLower}.Match() returns the last match criteria
|
|
226
170
|
\`\`\`
|
|
227
171
|
|
|
228
172
|
Call \`Make()\` to create a fresh instance with the same configuration
|
|
229
173
|
but no stored state.
|
|
230
174
|
|
|
231
|
-
|
|
175
|
+
`,
|
|
176
|
+
direct: `\`Direct()\` gives full control over the HTTP request. Use it for
|
|
177
|
+
non-standard endpoints, bulk operations, or any path not modelled as
|
|
178
|
+
an entity. \`Prepare()\` builds the request without sending it — useful
|
|
179
|
+
for debugging or custom transport.
|
|
180
|
+
|
|
181
|
+
`,
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
const ReadmeExplanation = (0, jostraca_1.cmp)(function ReadmeExplanation(props) {
|
|
185
|
+
const { target, ctx$ } = props;
|
|
186
|
+
const { model } = ctx$;
|
|
187
|
+
const feature = (0, types_1.getModelPath)(model, `main.${types_1.KIT}.feature`);
|
|
188
|
+
const lang = LANGS[target.name] || DEFAULT_LANG;
|
|
189
|
+
// Derive a real example entity from the model (the same way the sibling
|
|
190
|
+
// Readme components do) so the entity-state example never references a
|
|
191
|
+
// phantom entity.
|
|
192
|
+
const entity = (0, types_1.getModelPath)(model, `main.${types_1.KIT}.entity`, { only_active: false, required: false });
|
|
193
|
+
const ex = Object.values(entity || {}).find((e) => e && e.active !== false);
|
|
194
|
+
const eName = ex ? (ex.Name || (ex.name[0].toUpperCase() + ex.name.slice(1))) : 'Entity';
|
|
195
|
+
// Sanitise against the target's reserved words (a `Delete` entity must not
|
|
196
|
+
// bind `const delete = ...`).
|
|
197
|
+
const eLower = (0, naming_1.safeVarName)(eName.toLowerCase(), target.name);
|
|
198
|
+
const lname = target.name;
|
|
199
|
+
// The entity's id-like key field name, or null when it has none (a
|
|
200
|
+
// response-wrapped spec can model an entity with no id). Drives whether the
|
|
201
|
+
// state example keys on an id at all.
|
|
202
|
+
const idF = (0, opShape_1.entityIdField)(ex);
|
|
203
|
+
// The entity's PRIMARY op — an op it actually exposes (never a hardcoded
|
|
204
|
+
// `load` a create-only entity lacks).
|
|
205
|
+
const primaryOp = (0, opShape_1.entityPrimaryOp)(ex) || 'load';
|
|
206
|
+
const isMatchOp = 'load' === primaryOp || 'remove' === primaryOp;
|
|
207
|
+
// Type-correct example id literal (numeric when the id param is integer-typed),
|
|
208
|
+
// derived from the OP's param type so an id carried only in the match compiles.
|
|
209
|
+
const idLit = (0, opExample_1.idLiteral)(ex, primaryOp, idF);
|
|
210
|
+
// Language-correct call argument for the primary op: a match for load/remove,
|
|
211
|
+
// a required-field body for create/update, nothing for list.
|
|
212
|
+
let stateArg;
|
|
213
|
+
if ('list' === primaryOp) {
|
|
214
|
+
stateArg = 'go' === target.name ? 'nil' : '';
|
|
215
|
+
}
|
|
216
|
+
else if (isMatchOp) {
|
|
217
|
+
stateArg = (0, opExample_1.matchArg)(lname, idF, idLit);
|
|
232
218
|
}
|
|
233
219
|
else {
|
|
234
|
-
(0,
|
|
235
|
-
|
|
236
|
-
|
|
220
|
+
stateArg = (0, opExample_1.dataArg)(lname, ex, primaryOp, idF);
|
|
221
|
+
}
|
|
222
|
+
// Only a match op keys the `.match()` comment on `{ id: ... }`.
|
|
223
|
+
const matchIdF = isMatchOp ? idF : null;
|
|
224
|
+
(0, jostraca_1.Content)(`
|
|
225
|
+
## Advanced
|
|
237
226
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
227
|
+
> The sections above cover everyday use. The material below explains the
|
|
228
|
+
> SDK's internals — useful when extending it with custom features, but not
|
|
229
|
+
> needed for normal use.
|
|
241
230
|
|
|
242
|
-
|
|
243
|
-
// moon.match() returns { planet_id: 'earth', id: 'luna' }
|
|
244
|
-
\`\`\`
|
|
231
|
+
### The operation pipeline
|
|
245
232
|
|
|
246
|
-
|
|
247
|
-
|
|
233
|
+
Every entity operation follows a six-stage pipeline. Each stage fires a
|
|
234
|
+
feature hook before executing:
|
|
248
235
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
(0, jostraca_1.Content)(`### Direct vs entity access
|
|
236
|
+
\`\`\`
|
|
237
|
+
PrePoint → PreSpec → PreRequest → PreResponse → PreResult → PreDone
|
|
238
|
+
\`\`\`
|
|
253
239
|
|
|
254
|
-
|
|
255
|
-
|
|
240
|
+
- **PrePoint**: Resolves which API endpoint to call based on the
|
|
241
|
+
operation name and entity configuration.
|
|
242
|
+
- **PreSpec**: Builds the HTTP spec — URL, method, headers, body —
|
|
243
|
+
from the resolved point and the caller's parameters.
|
|
244
|
+
- **PreRequest**: Sends the HTTP request. Features can intercept here
|
|
245
|
+
to replace the transport (as TestFeature does with mocks).
|
|
246
|
+
- **PreResponse**: Parses the raw HTTP response.
|
|
247
|
+
- **PreResult**: Extracts the business data from the parsed response.
|
|
248
|
+
- **PreDone**: Final stage before returning to the caller. Entity
|
|
249
|
+
state (match, data) is updated here.
|
|
256
250
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
non-standard endpoints, bulk operations, or any path not modelled as
|
|
261
|
-
an entity. \`prepare()\` builds the request without sending it \u2014 useful
|
|
262
|
-
for debugging or custom transport.
|
|
251
|
+
If any stage errors, the pipeline short-circuits and the error surfaces
|
|
252
|
+
to the caller — see [Error handling](#error-handling) for how that looks
|
|
253
|
+
in this language.
|
|
263
254
|
|
|
264
255
|
`);
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
(0, jostraca_1.Content)(`\`direct()\` gives full control over the HTTP request. Use it for
|
|
268
|
-
non-standard endpoints, bulk operations, or any path not modelled as
|
|
269
|
-
an entity. \`prepare()\` builds the request without sending it \u2014 useful
|
|
270
|
-
for debugging or custom transport.
|
|
256
|
+
// Features and hooks
|
|
257
|
+
(0, jostraca_1.Content)(`### Features and hooks
|
|
271
258
|
|
|
272
259
|
`);
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
(0, jostraca_1.Content)(`\`direct\` gives full control over the HTTP request. Use it for
|
|
276
|
-
non-standard endpoints, bulk operations, or any path not modelled as
|
|
277
|
-
an entity. \`prepare\` builds the request without sending it \u2014 useful
|
|
278
|
-
for debugging or custom transport.
|
|
260
|
+
(0, jostraca_1.Content)(lang.featureKind);
|
|
261
|
+
(0, jostraca_1.Content)(`The SDK ships with built-in features:
|
|
279
262
|
|
|
280
263
|
`);
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
264
|
+
(0, jostraca_1.each)(feature, (feat) => {
|
|
265
|
+
if (!feat.active)
|
|
266
|
+
return;
|
|
267
|
+
if (!feat.Name)
|
|
268
|
+
(0, jostraca_1.names)(feat, feat.name);
|
|
269
|
+
const purpose = feat.title || feat.Name || feat.name;
|
|
270
|
+
(0, jostraca_1.Content)(`- **${feat.Name}Feature**: ${purpose}
|
|
271
|
+
`);
|
|
272
|
+
});
|
|
273
|
+
(0, jostraca_1.Content)(`
|
|
274
|
+
Features are initialized in order. Hooks fire in the order features
|
|
275
|
+
were added, so later features can override earlier ones.
|
|
287
276
|
|
|
288
277
|
`);
|
|
278
|
+
// Target-specific explanation
|
|
279
|
+
const ReadmeExplanation_sdk = (0, utility_1.requirePath)(ctx$, `./cmp/${target.name}/ReadmeExplanation_${target.name}`, { ignore: true });
|
|
280
|
+
if (ReadmeExplanation_sdk) {
|
|
281
|
+
ReadmeExplanation_sdk['ReadmeExplanation']({ target });
|
|
289
282
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
non-standard endpoints, bulk operations, or any path not modelled as
|
|
293
|
-
an entity. \`Prepare()\` builds the request without sending it \u2014 useful
|
|
294
|
-
for debugging or custom transport.
|
|
283
|
+
// Entity state
|
|
284
|
+
(0, jostraca_1.Content)(`### Entity state
|
|
295
285
|
|
|
296
286
|
`);
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
287
|
+
(0, jostraca_1.Content)(lang.entityState(eName, eLower, primaryOp, stateArg, matchIdF, idLit));
|
|
288
|
+
// Direct vs entity access
|
|
289
|
+
(0, jostraca_1.Content)(`### Direct vs entity access
|
|
290
|
+
|
|
291
|
+
The entity interface handles URL construction, parameter placement,
|
|
292
|
+
and response parsing automatically. Use it for standard CRUD operations.
|
|
303
293
|
|
|
304
294
|
`);
|
|
305
|
-
|
|
295
|
+
(0, jostraca_1.Content)(lang.direct);
|
|
306
296
|
});
|
|
307
297
|
exports.ReadmeExplanation = ReadmeExplanation;
|
|
308
298
|
//# sourceMappingURL=ReadmeExplanation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadmeExplanation.js","sourceRoot":"","sources":["../../src/cmp/ReadmeExplanation.ts"],"names":[],"mappings":";;;AACA,uCAAoD;AAEpD,oCAGiB;AAEjB,wCAAwC;
|
|
1
|
+
{"version":3,"file":"ReadmeExplanation.js","sourceRoot":"","sources":["../../src/cmp/ReadmeExplanation.ts"],"names":[],"mappings":";;;AACA,uCAAoD;AAEpD,oCAGiB;AAEjB,wCAAwC;AAExC,gDAAmE;AACnE,oDAAmE;AAEnE,8CAA+C;AAG/C,SAAS,GAAG,CAAC,CAAS;IACpB,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAA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BAAqB,GACzB,IAAA,qBAAW,EAAC,IAAI,EAAE,SAAS,MAAM,CAAC,IAAI,sBAAsB,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;IAE9F,IAAI,qBAAqB,EAAE,CAAC;QAC1B,qBAAqB,CAAC,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAA;IACxD,CAAC;IAGD,eAAe;IACf,IAAA,kBAAO,EAAC;;CAET,CAAC,CAAA;IAEA,IAAA,kBAAO,EAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAA;IAG9E,0BAA0B;IAC1B,IAAA,kBAAO,EAAC;;;;;CAKT,CAAC,CAAA;IAEA,IAAA,kBAAO,EAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAEtB,CAAC,CAAC,CAAA;AAIA,8CAAiB"}
|
package/dist/cmp/ReadmeModel.js
CHANGED
|
@@ -7,6 +7,10 @@ const utility_1 = require("../utility");
|
|
|
7
7
|
const ReadmeModel = (0, jostraca_1.cmp)(function ReadmeModel(props) {
|
|
8
8
|
const { target, ctx$ } = props;
|
|
9
9
|
const { model } = ctx$;
|
|
10
|
+
// Guard the Name case variant so the reference header never renders
|
|
11
|
+
// "undefinedSDK" if apidef did not populate it.
|
|
12
|
+
if (model.name && !model.Name)
|
|
13
|
+
(0, jostraca_1.names)(model, model.name);
|
|
10
14
|
const entity = (0, types_1.getModelPath)(model, `main.${types_1.KIT}.entity`);
|
|
11
15
|
const entityList = (0, jostraca_1.each)(entity).filter((e) => e.active !== false);
|
|
12
16
|
(0, jostraca_1.Content)(`
|
|
@@ -47,7 +51,8 @@ ${apikeyRow}| \`base\` | \`string\` | Base URL of the API server. |
|
|
|
47
51
|
| --- | --- | --- |
|
|
48
52
|
`);
|
|
49
53
|
(0, jostraca_1.each)(entityList, (ent) => {
|
|
50
|
-
|
|
54
|
+
const article = /^[aeiou]/i.test(ent.Name) ? 'an' : 'a';
|
|
55
|
+
(0, jostraca_1.Content)(`| \`${ent.Name}(data?)\` | \`${ent.Name}Entity\` | Create ${article} ${ent.Name} entity instance. |
|
|
51
56
|
`);
|
|
52
57
|
});
|
|
53
58
|
(0, jostraca_1.Content)(`| \`options()\` | \`object\` | Deep copy of current SDK options. |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadmeModel.js","sourceRoot":"","sources":["../../src/cmp/ReadmeModel.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"ReadmeModel.js","sourceRoot":"","sources":["../../src/cmp/ReadmeModel.ts"],"names":[],"mappings":";;;AACA,uCAAoD;AAEpD,oCAGiB;AAEjB,wCAAsD;AAGtD,MAAM,WAAW,GAAG,IAAA,cAAG,EAAC,SAAS,WAAW,CAAC,KAAU;IACrD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IAEtB,oEAAoE;IACpE,gDAAgD;IAChD,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI;QAAE,IAAA,gBAAK,EAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAEvD,MAAM,MAAM,GAAG,IAAA,oBAAY,EAAC,KAAK,EAAE,QAAQ,WAAG,SAAS,CAAC,CAAA;IACxD,MAAM,UAAU,GAAG,IAAA,eAAI,EAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,KAAK,CAAC,CAAA;IAEtE,IAAA,kBAAO,EAAC;;;CAGT,CAAC,CAAA;IAEA,gDAAgD;IAChD,MAAM,eAAe,GACnB,IAAA,qBAAW,EAAC,IAAI,EAAE,SAAS,MAAM,CAAC,IAAI,gBAAgB,MAAM,CAA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