@voxgig/sdkgen 3.5.1 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/cmp/AgentGuideTop.js +17 -0
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/ExternalTarget.js +1 -1
- package/dist/cmp/ExternalTarget.js.map +1 -1
- package/dist/cmp/Readme.js +2 -0
- package/dist/cmp/Readme.js.map +1 -1
- package/dist/cmp/ReadmeStation.d.ts +2 -0
- package/dist/cmp/ReadmeStation.js +57 -0
- package/dist/cmp/ReadmeStation.js.map +1 -0
- package/dist/helpers/naming.d.ts +6 -1
- package/dist/helpers/naming.js +156 -5
- package/dist/helpers/naming.js.map +1 -1
- package/dist/helpers/opShape.js +72 -0
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/packageMeta.d.ts +2 -1
- package/dist/helpers/packageMeta.js +57 -20
- package/dist/helpers/packageMeta.js.map +1 -1
- package/dist/sdkgen.d.ts +3 -3
- package/dist/sdkgen.js +63 -18
- package/dist/sdkgen.js.map +1 -1
- package/dist/testkit.d.ts +39 -0
- package/dist/testkit.js +663 -0
- package/dist/testkit.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utility.d.ts +1 -1
- package/dist/utility.js +16 -2
- package/dist/utility.js.map +1 -1
- package/package.json +32 -8
- package/project/.sdk/src/cmp/c/Config_c.ts +34 -13
- package/project/.sdk/src/cmp/c/Test_c.ts +5 -7
- package/project/.sdk/src/cmp/clojure/Test_clojure.ts +3 -7
- package/project/.sdk/src/cmp/cpp/Config_cpp.ts +9 -46
- package/project/.sdk/src/cmp/cpp/Test_cpp.ts +4 -7
- package/project/.sdk/src/cmp/csharp/Config_csharp.ts +7 -1
- package/project/.sdk/src/cmp/csharp/Package_csharp.ts +1 -1
- package/project/.sdk/src/cmp/csharp/Test_csharp.ts +5 -7
- package/project/.sdk/src/cmp/dart/Config_dart.ts +14 -2
- package/project/.sdk/src/cmp/dart/Test_dart.ts +3 -4
- package/project/.sdk/src/cmp/dart/fragment/Config.data.fragment.dart +5 -0
- package/project/.sdk/src/cmp/dart/fragment/Config.fragment.dart +6 -0
- package/project/.sdk/src/cmp/dart/fragment/Main.fragment.dart +13 -4
- package/project/.sdk/src/cmp/elixir/Config_elixir.ts +12 -2
- package/project/.sdk/src/cmp/elixir/Package_elixir.ts +42 -3
- package/project/.sdk/src/cmp/elixir/Test_elixir.ts +5 -6
- package/project/.sdk/src/cmp/go/Config_go.ts +8 -1
- package/project/.sdk/src/cmp/go/EntityTypes_go.ts +1 -1
- package/project/.sdk/src/cmp/go/Entity_go.ts +1 -1
- package/project/.sdk/src/cmp/go/Gitignore_go.ts +6 -0
- package/project/.sdk/src/cmp/go/Main_go.ts +2 -2
- package/project/.sdk/src/cmp/go/Package_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeExamplesTest_go.ts +59 -6
- package/project/.sdk/src/cmp/go/ReadmeExplanation_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeInstall_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeModel_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +1 -1
- package/project/.sdk/src/cmp/go/ReadmeTopTest_go.ts +1 -1
- package/project/.sdk/src/cmp/go/Test_go.ts +6 -8
- package/project/.sdk/src/cmp/go-cli/Main_go-cli.ts +6 -2
- package/project/.sdk/src/cmp/go-mcp/Main_go-mcp.ts +6 -2
- package/project/.sdk/src/cmp/java/Config_java.ts +8 -1
- package/project/.sdk/src/cmp/java/Test_java.ts +4 -7
- package/project/.sdk/src/cmp/js/Config_js.ts +9 -1
- package/project/.sdk/src/cmp/js/Package_js.ts +1 -1
- package/project/.sdk/src/cmp/js/Test_js.ts +4 -7
- package/project/.sdk/src/cmp/js/fragment/Config.data.fragment.js +7 -0
- package/project/.sdk/src/cmp/js/fragment/Config.fragment.js +8 -0
- package/project/.sdk/src/cmp/js/fragment/Main.fragment.js +33 -5
- package/project/.sdk/src/cmp/kotlin/Config_kotlin.ts +8 -1
- package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +4 -7
- package/project/.sdk/src/cmp/lean/Test_lean.ts +3 -3
- package/project/.sdk/src/cmp/lua/Config_lua.ts +11 -2
- package/project/.sdk/src/cmp/lua/Package_lua.ts +26 -3
- package/project/.sdk/src/cmp/lua/Test_lua.ts +5 -7
- package/project/.sdk/src/cmp/ocaml/Test_ocaml.ts +3 -7
- package/project/.sdk/src/cmp/perl/Config_perl.ts +8 -60
- package/project/.sdk/src/cmp/perl/Package_perl.ts +1 -1
- package/project/.sdk/src/cmp/perl/Test_perl.ts +5 -7
- package/project/.sdk/src/cmp/php/Config_php.ts +11 -2
- package/project/.sdk/src/cmp/php/EntityTypes_php.ts +13 -2
- package/project/.sdk/src/cmp/php/Main_php.ts +25 -0
- package/project/.sdk/src/cmp/php/Package_php.ts +2 -2
- package/project/.sdk/src/cmp/php/Test_php.ts +5 -7
- package/project/.sdk/src/cmp/php/fragment/Main.fragment.php +23 -6
- package/project/.sdk/src/cmp/py/Config_py.ts +11 -2
- package/project/.sdk/src/cmp/py/Main_py.ts +17 -7
- package/project/.sdk/src/cmp/py/Package_py.ts +2 -2
- package/project/.sdk/src/cmp/py/Test_py.ts +5 -7
- package/project/.sdk/src/cmp/py/fragment/Main.fragment.py +23 -6
- package/project/.sdk/src/cmp/py-data/Main_py-data.ts +14 -19
- package/project/.sdk/src/cmp/rb/Config_rb.ts +7 -1
- package/project/.sdk/src/cmp/rb/Package_rb.ts +3 -3
- package/project/.sdk/src/cmp/rb/ReadmeInstall_rb.ts +1 -1
- package/project/.sdk/src/cmp/rb/Test_rb.ts +5 -7
- package/project/.sdk/src/cmp/rust/Config_rust.ts +5 -2
- package/project/.sdk/src/cmp/rust/Test_rust.ts +5 -7
- package/project/.sdk/src/cmp/scala/Test_scala.ts +5 -2
- package/project/.sdk/src/cmp/seneca-provider/Gitignore_seneca-provider.ts +161 -0
- package/project/.sdk/src/cmp/seneca-provider/Main_seneca-provider.ts +20 -11
- package/project/.sdk/src/cmp/swift/Config_swift.ts +8 -54
- package/project/.sdk/src/cmp/swift/Package_swift.ts +52 -10
- package/project/.sdk/src/cmp/swift/Test_swift.ts +5 -7
- package/project/.sdk/src/cmp/ts/Config_ts.ts +9 -1
- package/project/.sdk/src/cmp/ts/EntityTypes_ts.ts +5 -2
- package/project/.sdk/src/cmp/ts/Entity_ts.ts +8 -2
- package/project/.sdk/src/cmp/ts/Package_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/Test_ts.ts +8 -7
- package/project/.sdk/src/cmp/ts/fragment/Config.data.fragment.ts +7 -0
- package/project/.sdk/src/cmp/ts/fragment/Config.fragment.ts +8 -0
- package/project/.sdk/src/cmp/ts/fragment/Entity.fragment.ts +1 -1
- package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +12 -4
- package/project/.sdk/src/cmp/zig/Test_zig.ts +3 -7
- package/project/.sdk/tm/c/Makefile +6 -1
- package/project/.sdk/tm/c/utility/make_options.c +12 -1
- package/project/.sdk/tm/c/utility/make_point.c +64 -3
- package/project/.sdk/tm/clojure/src/sdk/core.clj +49 -14
- package/project/.sdk/tm/cpp/utility/pipeline.hpp +64 -4
- package/project/.sdk/tm/csharp/feature/TestFeature.cs +36 -2
- package/project/.sdk/tm/csharp/utility/Fetcher.cs +23 -5
- package/project/.sdk/tm/csharp/utility/MakeOptions.cs +13 -0
- package/project/.sdk/tm/csharp/utility/MakePoint.cs +65 -2
- package/project/.sdk/tm/dart/lib/feature/test/TestFeature.dart +34 -4
- package/project/.sdk/tm/dart/lib/utility/FetcherUtility.dart +9 -0
- package/project/.sdk/tm/dart/lib/utility/MakeOptionsUtility.dart +17 -0
- package/project/.sdk/tm/dart/lib/utility/MakePointUtility.dart +48 -2
- package/project/.sdk/tm/elixir/lib/projectname/utility.ex +109 -13
- package/project/.sdk/tm/elixir/test/feature_test.exs +19 -0
- package/project/.sdk/tm/elixir/test/primary_utility_test.exs +72 -0
- package/project/.sdk/tm/go/feature/test_feature.go +34 -2
- package/project/.sdk/tm/go/test/primary_utility_test.go +42 -20
- package/project/.sdk/tm/go/test/runner_test.go +1 -1
- package/project/.sdk/tm/go/utility/fetcher.go +14 -0
- package/project/.sdk/tm/go/utility/make_options.go +31 -4
- package/project/.sdk/tm/go/utility/make_point.go +66 -2
- package/project/.sdk/tm/java/feature/TestFeature.java +42 -2
- package/project/.sdk/tm/java/utility/Fetcher.java +11 -1
- package/project/.sdk/tm/java/utility/MakeOptions.java +11 -0
- package/project/.sdk/tm/java/utility/MakePoint.java +61 -2
- package/project/.sdk/tm/js/src/feature/test/TestFeature.js +22 -3
- package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +20 -2
- package/project/.sdk/tm/js/src/utility/MakePointUtility.js +72 -2
- package/project/.sdk/tm/kotlin/feature/TestFeature.kt +31 -2
- package/project/.sdk/tm/kotlin/utility/Fetcher.kt +10 -1
- package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +11 -0
- package/project/.sdk/tm/kotlin/utility/MakePoint.kt +58 -2
- package/project/.sdk/tm/lean/src/SdkUtility.lean +28 -0
- package/project/.sdk/tm/lean/test/TPrimaryUtility.lean +13 -2
- package/project/.sdk/tm/lua/utility/make_options.lua +44 -0
- package/project/.sdk/tm/lua/utility/make_point.lua +65 -2
- package/project/.sdk/tm/ocaml/sdk_runtime.ml +40 -2
- package/project/.sdk/tm/perl/utility/fetcher.pm +10 -1
- package/project/.sdk/tm/perl/utility/make_options.pm +36 -0
- package/project/.sdk/tm/perl/utility/make_point.pm +55 -2
- package/project/.sdk/tm/php/feature/TestFeature.php +30 -1
- package/project/.sdk/tm/php/test/PipelineTest.php +20 -0
- package/project/.sdk/tm/php/utility/Fetcher.php +12 -1
- package/project/.sdk/tm/php/utility/MakeOptions.php +58 -0
- package/project/.sdk/tm/php/utility/MakePoint.php +49 -1
- package/project/.sdk/tm/py/pkg/utility/fetcher.py +13 -1
- package/project/.sdk/tm/py/pkg/utility/make_options.py +23 -0
- package/project/.sdk/tm/py/pkg/utility/make_point.py +56 -2
- package/project/.sdk/tm/rb/utility/make_options.rb +18 -0
- package/project/.sdk/tm/rb/utility/make_point.rb +42 -2
- package/project/.sdk/tm/rust/tests/common/mod.rs +1 -1
- package/project/.sdk/tm/rust/tests/feature_test.rs +27 -0
- package/project/.sdk/tm/rust/utility/fetcher.rs +8 -0
- package/project/.sdk/tm/rust/utility/make_options.rs +15 -0
- package/project/.sdk/tm/rust/utility/make_point.rs +69 -2
- package/project/.sdk/tm/scala/feature/TestFeature.scala +36 -1
- package/project/.sdk/tm/scala/utility/Make.scala +57 -3
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/feature/TestFeature.swift +29 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Fetcher.swift +24 -1
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Make.swift +51 -2
- package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +12 -0
- package/project/.sdk/tm/ts/src/feature/test/TestFeature.ts +22 -3
- package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +20 -2
- package/project/.sdk/tm/ts/src/utility/MakePointUtility.ts +72 -2
- package/project/.sdk/tm/ts/test/utility/Corpus.test.ts +85 -0
- package/project/.sdk/tm/ts/test/utility/PrimaryUtility.test.ts +10 -17
- package/project/.sdk/tm/zig/core/utility.zig +66 -3
- package/project/sdkgen-package.json +1 -2
- package/src/cmp/AgentGuideTop.ts +18 -0
- package/src/cmp/ExternalTarget.ts +1 -1
- package/src/cmp/Readme.ts +2 -0
- package/src/cmp/ReadmeStation.ts +69 -0
- package/src/helpers/naming.ts +172 -5
- package/src/helpers/opShape.ts +85 -0
- package/src/helpers/packageMeta.ts +59 -20
- package/src/sdkgen.ts +70 -20
- package/src/testkit.ts +863 -0
- package/src/utility.ts +17 -2
- package/testkit.d.ts +3 -0
- package/testkit.js +12 -0
- package/project/.sdk/model/target/haskell.aontu +0 -72
- package/project/.sdk/src/cmp/haskell/Config_haskell.ts +0 -98
- package/project/.sdk/src/cmp/haskell/Entity_haskell.ts +0 -13
- package/project/.sdk/src/cmp/haskell/Gitignore_haskell.ts +0 -27
- package/project/.sdk/src/cmp/haskell/Main_haskell.ts +0 -123
- package/project/.sdk/src/cmp/haskell/Package_haskell.ts +0 -60
- package/project/.sdk/src/cmp/haskell/ReadmeEntity_haskell.ts +0 -186
- package/project/.sdk/src/cmp/haskell/ReadmeExamplesTest_haskell.ts +0 -135
- package/project/.sdk/src/cmp/haskell/ReadmeExplanation_haskell.ts +0 -48
- package/project/.sdk/src/cmp/haskell/ReadmeHowto_haskell.ts +0 -168
- package/project/.sdk/src/cmp/haskell/ReadmeInstall_haskell.ts +0 -51
- package/project/.sdk/src/cmp/haskell/ReadmeIntro_haskell.ts +0 -67
- package/project/.sdk/src/cmp/haskell/ReadmeModel_haskell.ts +0 -162
- package/project/.sdk/src/cmp/haskell/ReadmeOptions_haskell.ts +0 -74
- package/project/.sdk/src/cmp/haskell/ReadmeQuick_haskell.ts +0 -241
- package/project/.sdk/src/cmp/haskell/ReadmeRef_haskell.ts +0 -408
- package/project/.sdk/src/cmp/haskell/ReadmeTopHowto_haskell.ts +0 -31
- package/project/.sdk/src/cmp/haskell/ReadmeTopQuick_haskell.ts +0 -104
- package/project/.sdk/src/cmp/haskell/ReadmeTopTest_haskell.ts +0 -80
- package/project/.sdk/src/cmp/haskell/Test_haskell.ts +0 -300
- package/project/.sdk/src/cmp/haskell/tsconfig.json +0 -15
- package/project/.sdk/src/cmp/haskell/utility_haskell.ts +0 -166
- package/project/.sdk/tm/haskell/LICENSE +0 -21
- package/project/.sdk/tm/haskell/Makefile +0 -22
- package/project/.sdk/tm/haskell/VERSION +0 -1
- package/project/.sdk/tm/haskell/src/SdkFeatures.hs +0 -1440
- package/project/.sdk/tm/haskell/src/SdkHelpers.hs +0 -337
- package/project/.sdk/tm/haskell/src/SdkJson.hs +0 -111
- package/project/.sdk/tm/haskell/src/SdkRuntime.hs +0 -1219
- package/project/.sdk/tm/haskell/src/SdkTypes.hs +0 -195
- package/project/.sdk/tm/haskell/src/VoxgigStruct.hs +0 -2299
- package/project/.sdk/tm/haskell/src/Vregex.hs +0 -237
- package/project/.sdk/tm/haskell/src/feature/README.md +0 -5
- package/project/.sdk/tm/haskell/src/feature/audit/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/base/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/cache/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/clienttrack/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/debug/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/idempotency/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/log/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/metrics/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/netsim/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/paging/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/proxy/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/ratelimit/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/rbac/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/retry/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/streaming/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/telemetry/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/test/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/src/feature/timeout/.gitkeep +0 -0
- package/project/.sdk/tm/haskell/test/Harness.hs +0 -281
- package/project/.sdk/tm/haskell/test/Runner.hs +0 -47
- package/project/.sdk/tm/haskell/test/StructCorpus.hs +0 -449
- package/project/.sdk/tm/haskell/test/TCustomUtility.hs +0 -38
- package/project/.sdk/tm/haskell/test/TFeature.hs +0 -794
- package/project/.sdk/tm/haskell/test/TNetsim.hs +0 -50
- package/project/.sdk/tm/haskell/test/TPipeline.hs +0 -334
- package/project/.sdk/tm/haskell/test/TPrimaryUtility.hs +0 -386
- package/project/.sdk/tm/haskell/test/Testutil.hs +0 -59
package/dist/utility.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../src/utility.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../src/utility.ts"],"names":[],"mappings":";;;;;;QAgGE,WAAW;QACX,WAAW;QACX,YAAY;QACZ,iBAAiB;QAIjB,YAAY;QACZ,UAAU;QACV,iBAAiB;QACjB,gBAAgB;QAChB,KAAK;QACL,gBAAgB;AA3GlB,0DAA4B;AAE5B,uCAA+C;AAE/C,2CAAkD;AAElD,qDAAsD;AACtD,uDAAsD;AAGtD,6EAA6E;AAC7E,EAAE;AACF,yEAAyE;AACzE,0EAA0E;AAC1E,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,oEAAoE;AACpE,SAAS,WAAW,CAAC,IAAS,EAAE,IAAY;IAC1C,MAAM,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAA;IAClE,MAAM,QAAQ,GAAG,mBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACtD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAGD,sEAAsE;AACtE,uEAAuE;AACvE,mDAAmD;AACnD,6EAA6E;AAC7E,0CAA0C;AAC1C,SAAS,YAAY,CAAC,KAAU;IAC9B,MAAM,I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,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAA;AAC3C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voxgig/sdkgen",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"main": "dist/sdkgen.js",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24"
|
|
8
8
|
},
|
|
9
9
|
"types": "dist/sdkgen.d.ts",
|
|
10
|
+
"_no_exports_comment": [
|
|
11
|
+
"THERE IS DELIBERATELY NO `exports` MAP, and adding one is not a tidy-up.",
|
|
12
|
+
"",
|
|
13
|
+
"`@voxgig/sdkgen/testkit` is served by the stub `testkit.js` beside this",
|
|
14
|
+
"file, resolved by ordinary CommonJS probing — the way subpath entry",
|
|
15
|
+
"points worked before `exports` existed.",
|
|
16
|
+
"",
|
|
17
|
+
"The obvious alternative, an `exports` map naming './testkit', REPLACES",
|
|
18
|
+
"the deep-import freedom a package has without one. Consumers depend on",
|
|
19
|
+
"that freedom in places nothing here would notice: every generated model",
|
|
20
|
+
"file includes '@voxgig/sdkgen/model/sdkgen.aontu', and the scaffold is",
|
|
21
|
+
"reached as '@voxgig/sdkgen/project/<lang>'.",
|
|
22
|
+
"",
|
|
23
|
+
"A './*' catch-all looks like it restores that, and does not: exports",
|
|
24
|
+
"resolution never falls back to CommonJS extension probing, so",
|
|
25
|
+
"require('@voxgig/sdkgen/dist/helpers/manifest') maps to an",
|
|
26
|
+
"extensionless path that does not exist and fails with MODULE_NOT_FOUND.",
|
|
27
|
+
"An array of probes ('./*', './*.js', ...) does not fix it either —",
|
|
28
|
+
"measured, not assumed. test/packaging.test.ts resolves the real",
|
|
29
|
+
"subpaths through a real node_modules to keep this honest."
|
|
30
|
+
],
|
|
10
31
|
"description": "Voxgig SDK Generator.",
|
|
11
32
|
"homepage": "https://github.com/voxgig/voxgig-sdkgen",
|
|
12
33
|
"keywords": [
|
|
@@ -26,7 +47,7 @@
|
|
|
26
47
|
"test-some": "node --enable-source-maps --test-name-pattern=\"$npm_config_pattern\" --test dist-test/**/*.test.js",
|
|
27
48
|
"golden": "npm run build && SDKGEN_GOLDEN_UPDATE=1 node --test dist-test/characterize.test.js",
|
|
28
49
|
"watch": "tsc --build src test -w",
|
|
29
|
-
"build": "tsc --build src test && npm run check-scaffold && npm run stage-scaffold",
|
|
50
|
+
"build": "tsc --build src test && npm run check-scaffold && npm run check-fixture && npm run stage-scaffold",
|
|
30
51
|
"clean": "rm -rf dist dist-test node_modules yarn.lock package-lock.json",
|
|
31
52
|
"reset": "npm run clean && npm i && npm run build && npm test",
|
|
32
53
|
"embed-version": "node build/version.js",
|
|
@@ -40,6 +61,7 @@
|
|
|
40
61
|
"repo-release": "npm run repo-publish && npm run repo-tag",
|
|
41
62
|
"repo-release-dry": "npm run repo-publish-quick-dry && npm run repo-tag-dry",
|
|
42
63
|
"check-scaffold": "tsc -p tsconfig.scaffold.json",
|
|
64
|
+
"check-fixture": "tsc -p tsconfig.fixture.json",
|
|
43
65
|
"stage-scaffold": "node build/scaffold-stage.js && tsc -p tsconfig.scaffold-emit.json"
|
|
44
66
|
},
|
|
45
67
|
"license": "MIT",
|
|
@@ -49,6 +71,8 @@
|
|
|
49
71
|
"model",
|
|
50
72
|
"src",
|
|
51
73
|
"dist",
|
|
74
|
+
"testkit.js",
|
|
75
|
+
"testkit.d.ts",
|
|
52
76
|
"LICENSE"
|
|
53
77
|
],
|
|
54
78
|
"devDependencies": {
|
|
@@ -64,11 +88,11 @@
|
|
|
64
88
|
"peerDependencies": {
|
|
65
89
|
"@tabnas/jsonic": "0.6.0",
|
|
66
90
|
"@tabnas/parser": "0.8.0",
|
|
67
|
-
"@voxgig/apidef": ">=
|
|
68
|
-
"@voxgig/struct": ">=0",
|
|
69
|
-
"@voxgig/util": ">=0",
|
|
70
|
-
"aontu": ">=0",
|
|
71
|
-
"jostraca": "
|
|
72
|
-
"shape": ">=
|
|
91
|
+
"@voxgig/apidef": ">=7.1",
|
|
92
|
+
"@voxgig/struct": ">=0.2",
|
|
93
|
+
"@voxgig/util": ">=0.5",
|
|
94
|
+
"aontu": ">=0.52",
|
|
95
|
+
"jostraca": "^0.33.1",
|
|
96
|
+
"shape": ">=10"
|
|
73
97
|
}
|
|
74
98
|
}
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
// instantiate features named in the options (mirrors Config_rust).
|
|
32
32
|
const Config = cmp(async function Config(props: any) {
|
|
33
33
|
const ctx$ = props.ctx$
|
|
34
|
+
const target = props.target
|
|
34
35
|
|
|
35
36
|
const model: Model = ctx$.model
|
|
36
37
|
|
|
@@ -72,20 +73,25 @@ const Config = cmp(async function Config(props: any) {
|
|
|
72
73
|
relations: n.relations,
|
|
73
74
|
}, true), a), {})
|
|
74
75
|
|
|
76
|
+
// The same config as an OBJECT, built by the shared helper so this target's
|
|
77
|
+
// literal and the data that replaces it above the threshold are the same
|
|
78
|
+
// config by construction. The JSON is what the threshold is measured on -
|
|
79
|
+
// emitted source size varies by language, the model does not. Passing
|
|
80
|
+
// target.name opts this target into the main slug/version/target identity
|
|
81
|
+
// fields (read by station's descriptor - see configDefinition).
|
|
82
|
+
const { def: configDef, json: configJson } = configDefinition(model, target.name)
|
|
83
|
+
const asData = isConfigData(configJson, configReprSetting(model))
|
|
84
|
+
|
|
75
85
|
const config = {
|
|
76
|
-
main
|
|
86
|
+
// main from configDefinition's def, not re-derived here, so the literal
|
|
87
|
+
// rep and the data rep cannot disagree on identity (the Config_ts
|
|
88
|
+
// #MainMeta discipline): name plus slug/version/target.
|
|
89
|
+
main: configDef.main,
|
|
77
90
|
feature: featureConfig,
|
|
78
91
|
options,
|
|
79
92
|
entity: entityConfig,
|
|
80
93
|
}
|
|
81
94
|
|
|
82
|
-
// The same config as an OBJECT, built by the shared helper so this target's
|
|
83
|
-
// literal and the data that replaces it above the threshold are the same
|
|
84
|
-
// config by construction. The JSON is what the threshold is measured on -
|
|
85
|
-
// emitted source size varies by language, the model does not.
|
|
86
|
-
const { json: configJson } = configDefinition(model)
|
|
87
|
-
const asData = isConfigData(configJson, configReprSetting(model))
|
|
88
|
-
|
|
89
95
|
File({ name: 'config.c' }, () => {
|
|
90
96
|
|
|
91
97
|
// ABOVE THE THRESHOLD: emit the model as DATA.
|
|
@@ -137,8 +143,6 @@ voxgig_value* shared_config(void) {
|
|
|
137
143
|
}
|
|
138
144
|
return shared_config_val;
|
|
139
145
|
}
|
|
140
|
-
|
|
141
|
-
Feature* make_feature(const char* name) {
|
|
142
146
|
`)
|
|
143
147
|
}
|
|
144
148
|
else {
|
|
@@ -174,8 +178,6 @@ voxgig_value* shared_config(void) {
|
|
|
174
178
|
}
|
|
175
179
|
return shared_config_val;
|
|
176
180
|
}
|
|
177
|
-
|
|
178
|
-
Feature* make_feature(const char* name) {
|
|
179
181
|
`)
|
|
180
182
|
}
|
|
181
183
|
|
|
@@ -192,7 +194,26 @@ Feature* make_feature(const char* name) {
|
|
|
192
194
|
each(feature, (f: any) => {
|
|
193
195
|
if (f.name && f.name !== 'base') featureNames.add(f.name)
|
|
194
196
|
})
|
|
195
|
-
|
|
197
|
+
const sortedNames = Array.from(featureNames).sort()
|
|
198
|
+
|
|
199
|
+
// Constructor prototypes for every declared feature. sdk.h declares the
|
|
200
|
+
// BUNDLED set, but an externally-installed feature (e.g. station, whose
|
|
201
|
+
// source arrives by package overlay) is not in sdk.h — and without a
|
|
202
|
+
// prototype its make_feature arm is an implicit int-returning
|
|
203
|
+
// declaration: a warning that happens to link on gcc 13, a hard error on
|
|
204
|
+
// gcc 14+/clang 15+. Redeclaring the bundled ones is identical-prototype
|
|
205
|
+
// C, which is legal and keeps this a single sorted list.
|
|
206
|
+
Content(`
|
|
207
|
+
`)
|
|
208
|
+
for (const fname of sortedNames) {
|
|
209
|
+
Content(`Feature* feature_${fname}_new(void);
|
|
210
|
+
`)
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
Content(`
|
|
214
|
+
Feature* make_feature(const char* name) {
|
|
215
|
+
`)
|
|
216
|
+
for (const fname of sortedNames) {
|
|
196
217
|
Content(` if (strcmp(name, "${fname}") == 0) return feature_${fname}_new();
|
|
197
218
|
`)
|
|
198
219
|
}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
KIT,
|
|
4
|
-
getModelPath
|
|
5
|
-
} from '@voxgig/apidef'
|
|
6
|
-
|
|
7
2
|
import type {
|
|
8
3
|
ModelEntity
|
|
9
4
|
} from '@voxgig/apidef'
|
|
10
5
|
|
|
11
|
-
import { cmp, each, Folder, File, Content } from '@voxgig/sdkgen'
|
|
6
|
+
import { cmp, each, Folder, File, Content, entityCollection } from '@voxgig/sdkgen'
|
|
12
7
|
|
|
13
8
|
|
|
14
9
|
import { TestEntity } from './TestEntity_c'
|
|
@@ -39,7 +34,10 @@ int main(void) {
|
|
|
39
34
|
`)
|
|
40
35
|
})
|
|
41
36
|
|
|
42
|
-
each(model
|
|
37
|
+
const entity = each(entityCollection(model))
|
|
38
|
+
.filter((e: any) => false !== e.active)
|
|
39
|
+
|
|
40
|
+
each(entity, (entity: ModelEntity) => {
|
|
43
41
|
TestEntity({ target, entity })
|
|
44
42
|
TestDirect({ target, entity })
|
|
45
43
|
})
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
KIT,
|
|
4
|
-
getModelPath
|
|
5
|
-
} from '@voxgig/apidef'
|
|
6
|
-
|
|
7
2
|
import type {
|
|
8
3
|
ModelEntity
|
|
9
4
|
} from '@voxgig/apidef'
|
|
10
5
|
|
|
11
|
-
import { cmp, each, File, Content, Folder } from '@voxgig/sdkgen'
|
|
6
|
+
import { cmp, each, File, Content, Folder, entityCollection } from '@voxgig/sdkgen'
|
|
12
7
|
|
|
13
8
|
import { TestEntity } from './TestEntity_clojure'
|
|
14
9
|
import { TestDirect } from './TestDirect_clojure'
|
|
@@ -27,7 +22,8 @@ const Test = cmp(function Test(props: any) {
|
|
|
27
22
|
const { model } = props.ctx$
|
|
28
23
|
const { target } = props
|
|
29
24
|
|
|
30
|
-
const entity: ModelEntity =
|
|
25
|
+
const entity: ModelEntity[] = each(entityCollection(model))
|
|
26
|
+
.filter((e: any) => false !== e.active)
|
|
31
27
|
|
|
32
28
|
Folder({ name: 'test' }, () => {
|
|
33
29
|
Folder({ name: 'sdk' }, () => {
|
|
@@ -3,9 +3,8 @@ import {
|
|
|
3
3
|
Content,
|
|
4
4
|
File,
|
|
5
5
|
cmp,
|
|
6
|
+
configDefinition,
|
|
6
7
|
each,
|
|
7
|
-
isAuthActive,
|
|
8
|
-
resolveAuthPrefix,
|
|
9
8
|
} from '@voxgig/sdkgen'
|
|
10
9
|
|
|
11
10
|
|
|
@@ -17,7 +16,6 @@ import {
|
|
|
17
16
|
|
|
18
17
|
|
|
19
18
|
import {
|
|
20
|
-
cleanModel,
|
|
21
19
|
cppConfigLiterals,
|
|
22
20
|
} from './utility_cpp'
|
|
23
21
|
|
|
@@ -32,50 +30,15 @@ const Config = cmp(async function Config(props: any) {
|
|
|
32
30
|
|
|
33
31
|
const model: Model = ctx$.model
|
|
34
32
|
|
|
35
|
-
const entity = getModelPath(model, `main.${KIT}.entity`)
|
|
36
33
|
const feature = getModelPath(model, `main.${KIT}.feature`)
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const featureConfig: Record<string, any> = {}
|
|
47
|
-
each(feature, (f: any) => {
|
|
48
|
-
featureConfig[f.name] = cleanModel(f.config || {})
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
const optionsEntity: Record<string, any> = {}
|
|
52
|
-
each(entity, (ent: any) => {
|
|
53
|
-
optionsEntity[ent.name] = {}
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
const options: Record<string, any> = {
|
|
57
|
-
base: baseUrl,
|
|
58
|
-
}
|
|
59
|
-
if (authActive) {
|
|
60
|
-
options.auth = { prefix: authPrefix }
|
|
61
|
-
}
|
|
62
|
-
options.headers = headers
|
|
63
|
-
options.entity = optionsEntity
|
|
64
|
-
|
|
65
|
-
const entityConfig = Object.values(entity || {}).reduce((a: any, n: any) => (
|
|
66
|
-
a[n.name] = cleanModel({
|
|
67
|
-
fields: n.fields,
|
|
68
|
-
name: n.name,
|
|
69
|
-
op: n.op,
|
|
70
|
-
relations: n.relations,
|
|
71
|
-
}, true), a), {})
|
|
72
|
-
|
|
73
|
-
const config = {
|
|
74
|
-
main: { name: model.const.Name },
|
|
75
|
-
feature: featureConfig,
|
|
76
|
-
options,
|
|
77
|
-
entity: entityConfig,
|
|
78
|
-
}
|
|
35
|
+
// The embedded config, built by the shared helper so this target's shapes
|
|
36
|
+
// and identity fields stay in step with the ts reference by construction.
|
|
37
|
+
// Passing target.name opts cpp into main.slug/version/target (the station
|
|
38
|
+
// descriptor identity, ts/src/utility.ts configDefinition) - cpp has only
|
|
39
|
+
// the data rep (one chunked JSON literal), so this is the whole #MainMeta
|
|
40
|
+
// story for this target.
|
|
41
|
+
const { def: configDef } = configDefinition(model, target.name)
|
|
79
42
|
|
|
80
43
|
File({ name: 'config.' + target.ext }, () => {
|
|
81
44
|
|
|
@@ -104,7 +67,7 @@ namespace sdk {
|
|
|
104
67
|
|
|
105
68
|
inline const char* config_json() {
|
|
106
69
|
return
|
|
107
|
-
${cppConfigLiterals(
|
|
70
|
+
${cppConfigLiterals(configDef)};
|
|
108
71
|
}
|
|
109
72
|
|
|
110
73
|
inline Value makeConfig() { return vs::parse_json(config_json()); }
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
KIT,
|
|
4
|
-
getModelPath
|
|
5
|
-
} from '@voxgig/apidef'
|
|
6
|
-
|
|
7
2
|
import type {
|
|
8
3
|
ModelEntity
|
|
9
4
|
} from '@voxgig/apidef'
|
|
10
5
|
|
|
11
|
-
import { cmp, each, Folder } from '@voxgig/sdkgen'
|
|
6
|
+
import { cmp, each, Folder, entityCollection } from '@voxgig/sdkgen'
|
|
12
7
|
|
|
13
8
|
|
|
14
9
|
import { TestEntity } from './TestEntity_cpp'
|
|
@@ -24,7 +19,9 @@ const Test = cmp(function Test(props: any) {
|
|
|
24
19
|
// netsim / struct corpus) ships as tm/cpp/test templates (copied verbatim).
|
|
25
20
|
// Here we generate the per-entity model-driven tests into test/.
|
|
26
21
|
Folder({ name: 'test' }, () => {
|
|
27
|
-
each(model
|
|
22
|
+
const entity = each(entityCollection(model))
|
|
23
|
+
.filter((e: any) => false !== e.active)
|
|
24
|
+
each(entity, (entity: ModelEntity) => {
|
|
28
25
|
TestEntity({ target, entity })
|
|
29
26
|
TestDirect({ target, entity })
|
|
30
27
|
})
|
|
@@ -39,7 +39,13 @@ const Config = cmp(async function Config(props: any) {
|
|
|
39
39
|
// literal and the data that replaces it above the threshold are the same
|
|
40
40
|
// config by construction. The JSON is what the threshold is measured on -
|
|
41
41
|
// emitted source size varies by language, the model does not.
|
|
42
|
-
|
|
42
|
+
//
|
|
43
|
+
// Passing target.name opts this target into main.slug / main.version /
|
|
44
|
+
// main.target (the three station descriptor fields, station design §4):
|
|
45
|
+
// both reps flow from this one call - the literal via formatCsMap(configDef)
|
|
46
|
+
// and the data rep via csStringLiteral(configJson) - so they cannot
|
|
47
|
+
// disagree on identity (mirrors Config_ts's #MainMeta block).
|
|
48
|
+
const { def: configDef, json: configJson } = configDefinition(model, target.name)
|
|
43
49
|
const asData = isConfigData(configJson, configReprSetting(model))
|
|
44
50
|
|
|
45
51
|
File({ name: 'Config.' + target.ext }, () => {
|
|
@@ -60,7 +60,7 @@ const Package = cmp(async function Package(props: any) {
|
|
|
60
60
|
<Version>${packageVersion(model, target.name)}</Version>
|
|
61
61
|
<PackageId>${Name}.Sdk</PackageId>
|
|
62
62
|
<Authors>Voxgig</Authors>
|
|
63
|
-
<Description>${pkgDescription(model,
|
|
63
|
+
<Description>${pkgDescription(model, target.name)}</Description>
|
|
64
64
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
|
65
65
|
<RepositoryUrl>${repoUrl}</RepositoryUrl>
|
|
66
66
|
</PropertyGroup>
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
KIT,
|
|
4
|
-
getModelPath
|
|
5
|
-
} from '@voxgig/apidef'
|
|
6
|
-
|
|
7
2
|
import type {
|
|
8
3
|
ModelEntity
|
|
9
4
|
} from '@voxgig/apidef'
|
|
10
5
|
|
|
11
|
-
import { cmp, each, Folder } from '@voxgig/sdkgen'
|
|
6
|
+
import { cmp, each, Folder, entityCollection } from '@voxgig/sdkgen'
|
|
12
7
|
|
|
13
8
|
|
|
14
9
|
import { TestEntity } from './TestEntity_csharp'
|
|
@@ -26,7 +21,10 @@ const Test = cmp(function Test(props: any) {
|
|
|
26
21
|
// tests are generated here.
|
|
27
22
|
Folder({ name: 'test' }, () => {
|
|
28
23
|
|
|
29
|
-
each(model
|
|
24
|
+
const entity = each(entityCollection(model))
|
|
25
|
+
.filter((e: any) => false !== e.active)
|
|
26
|
+
|
|
27
|
+
each(entity, (entity: ModelEntity) => {
|
|
30
28
|
TestEntity({ target, entity })
|
|
31
29
|
TestDirect({ target, entity })
|
|
32
30
|
})
|
|
@@ -71,8 +71,10 @@ const Config = cmp(async function Config(props: any) {
|
|
|
71
71
|
// The same config as an OBJECT, built by the shared helper so this target's
|
|
72
72
|
// literal and the data that replaces it above the threshold are the same
|
|
73
73
|
// config by construction. The JSON is what the threshold is measured on -
|
|
74
|
-
// emitted source size varies by language, the model does not.
|
|
75
|
-
|
|
74
|
+
// emitted source size varies by language, the model does not. Passing
|
|
75
|
+
// target.name opts this target into the main slug/version/target identity
|
|
76
|
+
// fields (read by station's descriptor - see configDefinition).
|
|
77
|
+
const { def: configDef, json: configJson } = configDefinition(model, target.name)
|
|
76
78
|
const asData = isConfigData(configJson, configReprSetting(model))
|
|
77
79
|
|
|
78
80
|
File({ name: 'Config.' + target.ext }, () => {
|
|
@@ -115,6 +117,16 @@ const Config = cmp(async function Config(props: any) {
|
|
|
115
117
|
// these; this one did not.
|
|
116
118
|
...ctx$.stdrep,
|
|
117
119
|
|
|
120
|
+
// Identity beyond the camel Name: slug/version/target (station
|
|
121
|
+
// descriptor inputs). Values from configDefinition's def, not
|
|
122
|
+
// re-derived here, so the literal rep and the data rep cannot
|
|
123
|
+
// disagree (the Config_ts #MainMeta discipline).
|
|
124
|
+
'// #MainMeta': () => {
|
|
125
|
+
Line(` 'slug': ${dartValue(configDef.main.slug)},`)
|
|
126
|
+
Line(` 'version': ${dartValue(configDef.main.version)},`)
|
|
127
|
+
Line(` 'target': ${dartValue(configDef.main.target)},`)
|
|
128
|
+
},
|
|
129
|
+
|
|
118
130
|
// The whole options map from the canonical definition. Assembling it
|
|
119
131
|
// slot by slot lost `options.server` entirely, so a spec with a
|
|
120
132
|
// templated server URL described a different config either side of the
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
import {
|
|
3
|
-
KIT,
|
|
4
|
-
getModelPath,
|
|
5
3
|
nom,
|
|
6
4
|
} from '@voxgig/apidef'
|
|
7
5
|
|
|
@@ -9,7 +7,7 @@ import type {
|
|
|
9
7
|
ModelEntity
|
|
10
8
|
} from '@voxgig/apidef'
|
|
11
9
|
|
|
12
|
-
import { cmp, each, snakify, Folder, File, Content } from '@voxgig/sdkgen'
|
|
10
|
+
import { cmp, each, snakify, Folder, File, Content, entityCollection } from '@voxgig/sdkgen'
|
|
13
11
|
|
|
14
12
|
|
|
15
13
|
import { TestDirect } from './TestDirect_dart'
|
|
@@ -21,7 +19,8 @@ const Test = cmp(function Test(props: any) {
|
|
|
21
19
|
const { model } = props.ctx$
|
|
22
20
|
const { target } = props
|
|
23
21
|
|
|
24
|
-
const entity =
|
|
22
|
+
const entity = each(entityCollection(model))
|
|
23
|
+
.filter((e: any) => false !== e.active)
|
|
25
24
|
|
|
26
25
|
Folder({ name: 'test' }, () => {
|
|
27
26
|
|
|
@@ -52,6 +52,11 @@ class Config {
|
|
|
52
52
|
return fc();
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
// False for a feature added at runtime via options.extend (station's
|
|
56
|
+
// adopt path) - the constructor uses this to skip makeFeature for names
|
|
57
|
+
// no generated class backs.
|
|
58
|
+
bool hasFeature(String fn) => null != FEATURE_CLASS[fn];
|
|
59
|
+
|
|
55
60
|
// The same fields the literal declares - same names, same types, same
|
|
56
61
|
// finalness - so callers cannot tell which representation they were given.
|
|
57
62
|
final Map<String, dynamic> main;
|
|
@@ -16,8 +16,14 @@ class Config {
|
|
|
16
16
|
return fc();
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
// False for a feature added at runtime via options.extend (station's
|
|
20
|
+
// adopt path) - the constructor uses this to skip makeFeature for names
|
|
21
|
+
// no generated class backs.
|
|
22
|
+
bool hasFeature(String fn) => null != FEATURE_CLASS[fn];
|
|
23
|
+
|
|
19
24
|
final Map<String, dynamic> main = <String, dynamic>{
|
|
20
25
|
'name': 'ProjectName',
|
|
26
|
+
// #MainMeta
|
|
21
27
|
};
|
|
22
28
|
|
|
23
29
|
final Map<String, dynamic> feature = <String, dynamic>{
|
|
@@ -69,19 +69,28 @@ class ProjectNameSDK {
|
|
|
69
69
|
// `test` feature installs the base mock transport and the transport
|
|
70
70
|
// features (retry/cache/netsim/proxy/ratelimit) wrap whatever is current,
|
|
71
71
|
// so `test` must be added before them to sit at the base of the chain.
|
|
72
|
+
final List extendList =
|
|
73
|
+
_options['extend'] is List ? _options['extend'] : [];
|
|
74
|
+
|
|
72
75
|
final featureorder =
|
|
73
76
|
struct.getpath(_options, '__derived__.featureorder') ?? [];
|
|
74
77
|
for (final fname in featureorder) {
|
|
75
78
|
final fopts = _options['feature'][fname];
|
|
76
79
|
if (fopts is Map && true == fopts['active']) {
|
|
80
|
+
// An active name with no generated class is legal when an
|
|
81
|
+
// extend-supplied instance carries that name (station's adopt
|
|
82
|
+
// path): the instance is added below, positioned by its own
|
|
83
|
+
// __after__ entry, so skip it here rather than fail construction.
|
|
84
|
+
if (!config.hasFeature(fname.toString()) &&
|
|
85
|
+
extendList.any((f) => fname.toString() == f.name.toString())) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
77
88
|
featureAdd(rootctx, config.makeFeature(fname.toString()));
|
|
78
89
|
}
|
|
79
90
|
}
|
|
80
91
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
featureAdd(rootctx, f);
|
|
84
|
-
}
|
|
92
|
+
for (final f in extendList) {
|
|
93
|
+
featureAdd(rootctx, f);
|
|
85
94
|
}
|
|
86
95
|
|
|
87
96
|
for (final f in features) {
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
|
|
30
30
|
const Config = cmp(async function Config(props: any) {
|
|
31
31
|
const ctx$ = props.ctx$
|
|
32
|
+
const target = props.target
|
|
32
33
|
const model: Model = ctx$.model
|
|
33
34
|
|
|
34
35
|
const Name = model.const.Name
|
|
@@ -60,7 +61,11 @@ const Config = cmp(async function Config(props: any) {
|
|
|
60
61
|
// target's literal and the data that replaces it above the threshold are
|
|
61
62
|
// the same config by construction. The JSON is what the threshold is
|
|
62
63
|
// measured on - emitted source size varies by language, the model does not.
|
|
63
|
-
|
|
64
|
+
// Passing target.name opts in to the main slug/version/target identity
|
|
65
|
+
// fields (station descriptor input, mirrors Config_ts) - both reps below
|
|
66
|
+
// render from this same def, so the data and literal branches pick the
|
|
67
|
+
// fields up together.
|
|
68
|
+
const { def: configDef, json: configJson } = configDefinition(model, target.name)
|
|
64
69
|
const asData = isConfigData(configJson, configReprSetting(model))
|
|
65
70
|
|
|
66
71
|
File({ name: 'config.ex' }, () => {
|
|
@@ -159,7 +164,12 @@ end
|
|
|
159
164
|
defmodule ${Name}.Config do
|
|
160
165
|
def make_config do
|
|
161
166
|
${Name}.Helpers.deep(%{
|
|
162
|
-
"main" => %{
|
|
167
|
+
"main" => %{
|
|
168
|
+
"name" => ${elixirString(Name)},
|
|
169
|
+
"slug" => ${elixirString(String(configDef.main.slug))},
|
|
170
|
+
"version" => ${elixirString(String(configDef.main.version))},
|
|
171
|
+
"target" => ${elixirString(String(configDef.main.target))}
|
|
172
|
+
},
|
|
163
173
|
"feature" => %{
|
|
164
174
|
`)
|
|
165
175
|
|