@voxgig/sdkgen 4.5.3 → 4.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.
Files changed (248) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/action/check.js +15 -0
  3. package/dist/action/check.js.map +1 -1
  4. package/dist/cmp/AgentGuide.js +1 -1
  5. package/dist/cmp/AgentGuide.js.map +1 -1
  6. package/dist/cmp/AgentGuideContent.d.ts +1 -1
  7. package/dist/cmp/AgentGuideContent.js +8 -2
  8. package/dist/cmp/AgentGuideContent.js.map +1 -1
  9. package/dist/cmp/Feature.js +22 -0
  10. package/dist/cmp/Feature.js.map +1 -1
  11. package/dist/cmp/FeatureDocs.d.ts +1 -1
  12. package/dist/cmp/FeatureDocs.js +6 -1
  13. package/dist/cmp/FeatureDocs.js.map +1 -1
  14. package/dist/cmp/ReadmeExplanation.js +3 -1
  15. package/dist/cmp/ReadmeExplanation.js.map +1 -1
  16. package/dist/cmp/ReadmeFeatures.js +1 -1
  17. package/dist/cmp/ReadmeFeatures.js.map +1 -1
  18. package/dist/cmp/ReadmeRefFeatures.js +1 -1
  19. package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
  20. package/dist/cmp/TestControl.d.ts +4 -0
  21. package/dist/cmp/TestControl.js +51 -0
  22. package/dist/cmp/TestControl.js.map +1 -0
  23. package/dist/helpers/applicability.d.ts +6 -0
  24. package/dist/helpers/applicability.js +103 -0
  25. package/dist/helpers/applicability.js.map +1 -0
  26. package/dist/helpers/collectDeps.js +4 -2
  27. package/dist/helpers/collectDeps.js.map +1 -1
  28. package/dist/helpers/featureSource.d.ts +3 -1
  29. package/dist/helpers/featureSource.js +105 -0
  30. package/dist/helpers/featureSource.js.map +1 -1
  31. package/dist/helpers/serverVars.d.ts +2 -1
  32. package/dist/helpers/serverVars.js +17 -0
  33. package/dist/helpers/serverVars.js.map +1 -1
  34. package/dist/sdkgen.d.ts +5 -3
  35. package/dist/sdkgen.js +16 -4
  36. package/dist/sdkgen.js.map +1 -1
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/dist/utility.d.ts +2 -1
  39. package/dist/utility.js +59 -1
  40. package/dist/utility.js.map +1 -1
  41. package/model/sdkgen.aon +97 -0
  42. package/package.json +1 -1
  43. package/project/.sdk/model/feature/feature-index.aon +1 -0
  44. package/project/.sdk/model/feature/secrets.aon +200 -0
  45. package/project/.sdk/model/target/ts.aon +8 -1
  46. package/project/.sdk/src/cmp/c/Config_c.ts +5 -1
  47. package/project/.sdk/src/cmp/cpp/Config_cpp.ts +5 -1
  48. package/project/.sdk/src/cmp/cpp/Main_cpp.ts +2 -1
  49. package/project/.sdk/src/cmp/cpp/Test_cpp.ts +5 -1
  50. package/project/.sdk/src/cmp/csharp/Config_csharp.ts +5 -1
  51. package/project/.sdk/src/cmp/csharp/Main_csharp.ts +2 -1
  52. package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +30 -6
  53. package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +29 -5
  54. package/project/.sdk/src/cmp/csharp/Test_csharp.ts +5 -1
  55. package/project/.sdk/src/cmp/dart/Config_dart.ts +5 -1
  56. package/project/.sdk/src/cmp/dart/Main_dart.ts +2 -1
  57. package/project/.sdk/src/cmp/dart/TestDirect_dart.ts +23 -6
  58. package/project/.sdk/src/cmp/dart/TestEntity_dart.ts +28 -7
  59. package/project/.sdk/src/cmp/dart/Test_dart.ts +5 -1
  60. package/project/.sdk/src/cmp/elixir/Config_elixir.ts +5 -1
  61. package/project/.sdk/src/cmp/elixir/Main_elixir.ts +5 -1
  62. package/project/.sdk/src/cmp/go/Config_go.ts +5 -1
  63. package/project/.sdk/src/cmp/go/Main_go.ts +8 -3
  64. package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +16 -3
  65. package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +16 -3
  66. package/project/.sdk/src/cmp/go/TestDirect_go.ts +28 -4
  67. package/project/.sdk/src/cmp/go/TestEntity_go.ts +43 -10
  68. package/project/.sdk/src/cmp/go/Test_go.ts +5 -1
  69. package/project/.sdk/src/cmp/go/fragment/Main.fragment.go +5 -5
  70. package/project/.sdk/src/cmp/java/Config_java.ts +22 -1
  71. package/project/.sdk/src/cmp/java/Main_java.ts +7 -2
  72. package/project/.sdk/src/cmp/java/ReadmeQuick_java.ts +17 -3
  73. package/project/.sdk/src/cmp/java/ReadmeTopQuick_java.ts +17 -3
  74. package/project/.sdk/src/cmp/java/TestDirect_java.ts +23 -4
  75. package/project/.sdk/src/cmp/java/TestEntity_java.ts +29 -4
  76. package/project/.sdk/src/cmp/java/Test_java.ts +5 -1
  77. package/project/.sdk/src/cmp/js/Config_js.ts +5 -1
  78. package/project/.sdk/src/cmp/js/Main_js.ts +7 -2
  79. package/project/.sdk/src/cmp/js/Package_js.ts +4 -1
  80. package/project/.sdk/src/cmp/js/TestDirect_js.ts +30 -5
  81. package/project/.sdk/src/cmp/js/TestEntity_js.ts +35 -5
  82. package/project/.sdk/src/cmp/js/Test_js.ts +5 -1
  83. package/project/.sdk/src/cmp/js/fragment/Direct.test.fragment.js +7 -1
  84. package/project/.sdk/src/cmp/js/fragment/Entity.test.fragment.js +7 -1
  85. package/project/.sdk/src/cmp/kotlin/Config_kotlin.ts +5 -1
  86. package/project/.sdk/src/cmp/kotlin/Main_kotlin.ts +2 -1
  87. package/project/.sdk/src/cmp/kotlin/Test_kotlin.ts +5 -1
  88. package/project/.sdk/src/cmp/lean/Config_lean.ts +5 -1
  89. package/project/.sdk/src/cmp/lua/Config_lua.ts +5 -1
  90. package/project/.sdk/src/cmp/lua/Main_lua.ts +7 -2
  91. package/project/.sdk/src/cmp/lua/Package_lua.ts +4 -1
  92. package/project/.sdk/src/cmp/lua/TestDirect_lua.ts +28 -4
  93. package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +24 -4
  94. package/project/.sdk/src/cmp/lua/Test_lua.ts +5 -1
  95. package/project/.sdk/src/cmp/ocaml/Config_ocaml.ts +5 -1
  96. package/project/.sdk/src/cmp/ocaml/Gitignore_ocaml.ts +1 -0
  97. package/project/.sdk/src/cmp/perl/Main_perl.ts +7 -2
  98. package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +25 -4
  99. package/project/.sdk/src/cmp/perl/TestEntity_perl.ts +24 -4
  100. package/project/.sdk/src/cmp/perl/Test_perl.ts +5 -1
  101. package/project/.sdk/src/cmp/perl/utility_perl.ts +10 -0
  102. package/project/.sdk/src/cmp/php/Config_php.ts +5 -1
  103. package/project/.sdk/src/cmp/php/Main_php.ts +7 -2
  104. package/project/.sdk/src/cmp/php/TestDirect_php.ts +24 -5
  105. package/project/.sdk/src/cmp/php/TestEntity_php.ts +28 -4
  106. package/project/.sdk/src/cmp/php/Test_php.ts +5 -1
  107. package/project/.sdk/src/cmp/py/Config_py.ts +5 -1
  108. package/project/.sdk/src/cmp/py/Main_py.ts +7 -2
  109. package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +16 -3
  110. package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +16 -3
  111. package/project/.sdk/src/cmp/py/TestDirect_py.ts +24 -5
  112. package/project/.sdk/src/cmp/py/TestEntity_py.ts +23 -3
  113. package/project/.sdk/src/cmp/py/Test_py.ts +5 -1
  114. package/project/.sdk/src/cmp/rb/Config_rb.ts +5 -1
  115. package/project/.sdk/src/cmp/rb/Main_rb.ts +7 -2
  116. package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +24 -5
  117. package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +24 -4
  118. package/project/.sdk/src/cmp/rb/Test_rb.ts +5 -1
  119. package/project/.sdk/src/cmp/rb/utility_rb.ts +3 -1
  120. package/project/.sdk/src/cmp/rust/Config_rust.ts +5 -1
  121. package/project/.sdk/src/cmp/rust/Main_rust.ts +7 -2
  122. package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +31 -4
  123. package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +37 -4
  124. package/project/.sdk/src/cmp/rust/Test_rust.ts +5 -1
  125. package/project/.sdk/src/cmp/scala/Config_scala.ts +5 -1
  126. package/project/.sdk/src/cmp/scala/Main_scala.ts +7 -2
  127. package/project/.sdk/src/cmp/scala/Test_scala.ts +5 -1
  128. package/project/.sdk/src/cmp/swift/Config_swift.ts +5 -1
  129. package/project/.sdk/src/cmp/ts/Config_ts.ts +55 -9
  130. package/project/.sdk/src/cmp/ts/Main_ts.ts +67 -3
  131. package/project/.sdk/src/cmp/ts/Package_ts.ts +4 -1
  132. package/project/.sdk/src/cmp/ts/ReadmeModel_ts.ts +15 -3
  133. package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +18 -5
  134. package/project/.sdk/src/cmp/ts/ReadmeTopQuick_ts.ts +19 -5
  135. package/project/.sdk/src/cmp/ts/TestDirect_ts.ts +75 -8
  136. package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +36 -5
  137. package/project/.sdk/src/cmp/ts/Test_ts.ts +5 -1
  138. package/project/.sdk/src/cmp/ts/fragment/Direct.test.fragment.ts +9 -2
  139. package/project/.sdk/src/cmp/ts/fragment/Entity.test.fragment.ts +9 -2
  140. package/project/.sdk/src/cmp/ts/fragment/Main.fragment.ts +7 -0
  141. package/project/.sdk/src/cmp/zig/Config_zig.ts +5 -1
  142. package/project/.sdk/tm/c/utility/make_options.c +22 -0
  143. package/project/.sdk/tm/clojure/src/sdk/core.clj +18 -1
  144. package/project/.sdk/tm/cpp/utility/pipeline.hpp +23 -0
  145. package/project/.sdk/tm/csharp/test/CustomUtilityTest.cs +15 -0
  146. package/project/.sdk/tm/csharp/test/Runner.cs +45 -0
  147. package/project/.sdk/tm/csharp/utility/MakeOptions.cs +23 -0
  148. package/project/.sdk/tm/dart/lib/utility/MakeOptionsUtility.dart +22 -0
  149. package/project/.sdk/tm/dart/test/utility.dart +39 -0
  150. package/project/.sdk/tm/elixir/lib/projectname/utility.ex +19 -0
  151. package/project/.sdk/tm/go/core/context.go +1 -1
  152. package/project/.sdk/tm/go/feature/cost_feature.go +1 -1
  153. package/project/.sdk/tm/go/feature/paging_feature.go +5 -5
  154. package/project/.sdk/tm/go/feature/test_feature.go +12 -5
  155. package/project/.sdk/tm/go/test/custom_utility_test.go +15 -0
  156. package/project/.sdk/tm/go/test/feature_corpus_test.go +7 -0
  157. package/project/.sdk/tm/go/test/runner_test.go +46 -0
  158. package/project/.sdk/tm/go/test/struct_runner_test.go +7 -7
  159. package/project/.sdk/tm/go/test/struct_utility_test.go +63 -27
  160. package/project/.sdk/tm/go/utility/fetcher.go +2 -2
  161. package/project/.sdk/tm/go/utility/make_options.go +24 -5
  162. package/project/.sdk/tm/go/utility/make_point.go +1 -1
  163. package/project/.sdk/tm/go/utility/make_spec.go +17 -1
  164. package/project/.sdk/tm/go/utility/prepare_auth.go +1 -1
  165. package/project/.sdk/tm/go/utility/struct/voxgigstruct.go +370 -307
  166. package/project/.sdk/tm/go/utility/transform_request.go +29 -1
  167. package/project/.sdk/tm/go/utility/transform_response.go +20 -1
  168. package/project/.sdk/tm/java/test/CustomUtilityTest.java +10 -0
  169. package/project/.sdk/tm/java/test/FeatureCorpusTest.java +7 -0
  170. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +6 -0
  171. package/project/.sdk/tm/java/test/RunnerSupport.java +43 -0
  172. package/project/.sdk/tm/java/utility/MakeOptions.java +84 -1
  173. package/project/.sdk/tm/js/src/utility/MakeOptionsUtility.js +24 -0
  174. package/project/.sdk/tm/js/src/utility/StructUtility.js +2076 -1837
  175. package/project/.sdk/tm/js/test/feature/Corpus.test.js +9 -0
  176. package/project/.sdk/tm/js/test/sdk-test-control.json +19 -0
  177. package/project/.sdk/tm/js/test/utility.js +91 -1
  178. package/project/.sdk/tm/kotlin/utility/MakeOptions.kt +21 -0
  179. package/project/.sdk/tm/lean/src/SdkUtility.lean +12 -1
  180. package/project/.sdk/tm/lua/test/runner.lua +40 -0
  181. package/project/.sdk/tm/ocaml/sdk_runtime.ml +11 -0
  182. package/project/.sdk/tm/ocaml/test/harness.ml +14 -4
  183. package/project/.sdk/tm/perl/t/runner.pm +30 -0
  184. package/project/.sdk/tm/perl/utility/make_options.pm +18 -0
  185. package/project/.sdk/tm/php/test/FeatureCorpusTest.php +10 -1
  186. package/project/.sdk/tm/php/test/Runner.php +36 -0
  187. package/project/.sdk/tm/php/utility/MakeOptions.php +24 -0
  188. package/project/.sdk/tm/py/pkg/utility/make_options.py +20 -0
  189. package/project/.sdk/tm/py/test/runner.py +32 -0
  190. package/project/.sdk/tm/py/test/test_feature_corpus.py +10 -1
  191. package/project/.sdk/tm/rb/test/feature_corpus_test.rb +9 -1
  192. package/project/.sdk/tm/rb/test/runner.rb +25 -0
  193. package/project/.sdk/tm/rb/utility/make_options.rb +17 -0
  194. package/project/.sdk/tm/rust/tests/common/mod.rs +32 -0
  195. package/project/.sdk/tm/rust/utility/make_options.rs +26 -1
  196. package/project/.sdk/tm/scala/utility/Make.scala +17 -0
  197. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/MakeOptions.swift +21 -0
  198. package/project/.sdk/tm/ts/src/feature/secrets/SecretsFeature.ts +419 -0
  199. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sekreto.ts +387 -0
  200. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/Sigv4.ts +175 -0
  201. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/index.ts +51 -0
  202. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/Registry.ts +90 -0
  203. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/addr.ts +48 -0
  204. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/aws.ts +219 -0
  205. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/azuresecrets.ts +144 -0
  206. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/boru.ts +113 -0
  207. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/doppler.ts +77 -0
  208. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/dotenv.ts +51 -0
  209. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/env.ts +31 -0
  210. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/file.ts +54 -0
  211. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/gcpsecrets.ts +118 -0
  212. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/hashicorp.ts +159 -0
  213. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/http.ts +66 -0
  214. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/infisical.ts +107 -0
  215. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/memory.ts +33 -0
  216. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/onepassword.ts +120 -0
  217. package/project/.sdk/tm/ts/src/feature/secrets/sekreto/provider/support.ts +176 -0
  218. package/project/.sdk/tm/ts/src/utility/MakeOptionsUtility.ts +18 -0
  219. package/project/.sdk/tm/ts/src/utility/StructUtility.ts +1321 -710
  220. package/project/.sdk/tm/ts/test/feature/Corpus.test.ts +9 -0
  221. package/project/.sdk/tm/ts/test/feature/secrets/Secrets.test.ts +764 -0
  222. package/project/.sdk/tm/ts/test/omni.test.ts +84 -0
  223. package/project/.sdk/tm/ts/test/omni.ts +86 -0
  224. package/project/.sdk/tm/ts/test/utility/PrimaryUtility.test.ts +6 -2
  225. package/project/.sdk/tm/ts/test/utility/StructUtility.test.ts +2 -2
  226. package/project/.sdk/tm/ts/test/utility.ts +122 -0
  227. package/project/.sdk/tm/ts/test/vendor/omni/Runner.ts +694 -0
  228. package/project/.sdk/tm/ts/test/vendor/omni/Util.ts +244 -0
  229. package/project/.sdk/tm/ts/test/vendor/omni/compat.ts +188 -0
  230. package/project/.sdk/tm/ts/test/vendor/omni/index.ts +38 -0
  231. package/project/.sdk/tm/zig/core/utility.zig +24 -1
  232. package/project/sdkgen-package.json +2 -1
  233. package/src/action/check.ts +18 -0
  234. package/src/cmp/AgentGuide.ts +1 -1
  235. package/src/cmp/AgentGuideContent.ts +9 -2
  236. package/src/cmp/Feature.ts +24 -0
  237. package/src/cmp/FeatureDocs.ts +7 -1
  238. package/src/cmp/ReadmeExplanation.ts +4 -1
  239. package/src/cmp/ReadmeFeatures.ts +1 -1
  240. package/src/cmp/ReadmeRefFeatures.ts +1 -1
  241. package/src/cmp/TestControl.ts +64 -0
  242. package/src/helpers/applicability.ts +123 -0
  243. package/src/helpers/collectDeps.ts +5 -1
  244. package/src/helpers/featureSource.ts +130 -0
  245. package/src/helpers/serverVars.ts +19 -0
  246. package/src/sdkgen.ts +16 -1
  247. package/src/utility.ts +71 -1
  248. package/project/.sdk/tm/ts/test/runner.ts +0 -425
package/dist/utility.js CHANGED
@@ -8,6 +8,7 @@ exports.resolvePath = resolvePath;
8
8
  exports.requirePath = requirePath;
9
9
  exports.isAuthActive = isAuthActive;
10
10
  exports.resolveAuthPrefix = resolveAuthPrefix;
11
+ exports.resolveAuthExchange = resolveAuthExchange;
11
12
  exports.isHttpBasicAuth = isHttpBasicAuth;
12
13
  exports.isConfigData = isConfigData;
13
14
  exports.configRepr = configRepr;
@@ -18,6 +19,7 @@ exports.rawStringLiteral = rawStringLiteral;
18
19
  const node_path_1 = __importDefault(require("node:path"));
19
20
  const jostraca_1 = require("jostraca");
20
21
  const apidef_1 = require("@voxgig/apidef");
22
+ const applicability_1 = require("./helpers/applicability");
21
23
  const serverVars_1 = require("./helpers/serverVars");
22
24
  const packageMeta_1 = require("./helpers/packageMeta");
23
25
  // Where a per-target component is loaded from: `<project>/.sdk/dist/<path>`.
@@ -77,6 +79,29 @@ function isHttpBasicAuth(model) {
77
79
  return null != security && 'http' === security.type &&
78
80
  'basic' === String(security.prefix || '').toLowerCase();
79
81
  }
82
+ // The API's ACCESS-TOKEN EXCHANGE, as apidef recorded it from the spec
83
+ // (main.kit.info.security.exchange): where the token endpoint lives, and the
84
+ // field names it sends and answers with. Null when the spec describes none,
85
+ // which is the common case.
86
+ //
87
+ // These are FACTS ABOUT THE API, so they belong in the generated config
88
+ // rather than in a project's hand-written model: an SDK whose spec says the
89
+ // exchange is at `auth/token` should not need to be told so again. A feature
90
+ // opts in to receiving them with `spec: { authexchange: '<options-key>' }`;
91
+ // configDefinition does the overlay.
92
+ //
93
+ // Deliberately NOT included: `active`. Whether a client performs the
94
+ // exchange is the project's decision (some resolve a static credential
95
+ // through the same feature on an API that also has a token endpoint), so
96
+ // apidef records only what the exchange IS, never that it should run.
97
+ function resolveAuthExchange(model) {
98
+ const security = (0, apidef_1.getModelPath)(model, `main.${apidef_1.KIT}.info.security`, { only_active: false, required: false });
99
+ const exchange = security?.exchange;
100
+ if (null == exchange || 'object' !== typeof exchange) {
101
+ return null;
102
+ }
103
+ return exchange;
104
+ }
80
105
  function requirePath(ctx$, path, flags) {
81
106
  const fullpath = resolvePath(ctx$, path);
82
107
  const ignore = null == flags?.ignore ? false : flags.ignore;
@@ -262,6 +287,13 @@ function clean(o, dropDefaults) {
262
287
  function rawStringLiteral(s) {
263
288
  return "'" + s.replace(/\\/g, '\\\\').replace(/'/g, "\\'") + "'";
264
289
  }
290
+ // The closed vocabulary of spec-derived facts a feature may ask for by
291
+ // declaring `spec: { <fact>: <options-key> }`. Closed, and resolved through
292
+ // one function each, so a feature cannot reach arbitrarily into the model
293
+ // and a fact's shape is defined in exactly one place.
294
+ const SPEC_FACTS = {
295
+ authexchange: resolveAuthExchange,
296
+ };
265
297
  // THE CANONICAL CONFIG OBJECT, and the JSON the threshold is measured on.
266
298
  //
267
299
  // Every target builds its config from this one function, so the literal a
@@ -275,7 +307,12 @@ function rawStringLiteral(s) {
275
307
  // across runs exactly like the literal it replaces.
276
308
  function configDefinition(model, targetname) {
277
309
  const entity = (0, apidef_1.getModelPath)(model, `main.${apidef_1.KIT}.entity`);
278
- const feature = (0, apidef_1.getModelPath)(model, `main.${apidef_1.KIT}.feature`);
310
+ // Gated by the target when one is named, so the embedded config cannot
311
+ // advertise a feature this target has no implementation for — the exact
312
+ // hybrid state the applicability gate exists to prevent. With no
313
+ // targetname (a caller that cannot say which target it is building) the
314
+ // helper returns every active feature, i.e. the old behaviour.
315
+ const feature = (0, applicability_1.targetFeatures)(model, targetname);
279
316
  const headers = (0, apidef_1.getModelPath)(model, `main.${apidef_1.KIT}.config.headers`) || {};
280
317
  const authActive = isAuthActive(model);
281
318
  const authPrefix = resolveAuthPrefix(model);
@@ -313,6 +350,27 @@ function configDefinition(model, targetname) {
313
350
  if (null != f.transport && '' !== f.transport) {
314
351
  fdef.transport = String(f.transport);
315
352
  }
353
+ // SPEC-DERIVED OPTIONS. A feature declares `spec: { <fact>: <options
354
+ // key> }` to receive facts apidef recorded from the OpenAPI spec — the
355
+ // same declare-never-infer rule `needs` and `transport` follow, and for
356
+ // the same reason: the alternative is this function knowing feature
357
+ // names, which is exactly the coupling the generic feature loop exists
358
+ // to avoid.
359
+ //
360
+ // The fact overlays the feature's DECLARED DEFAULTS, and rightly: a
361
+ // default like `path: 'auth/token'` is a generic guess, while the spec
362
+ // states where this API's endpoint actually is. A project that needs
363
+ // something else still overrides at runtime through `options.feature`,
364
+ // which beats the embedded config either way.
365
+ for (const factname of Object.keys(f.spec || {}).sort()) {
366
+ const optkey = f.spec[factname];
367
+ const fact = SPEC_FACTS[factname]?.(model);
368
+ if (null == fact || null == optkey || '' === optkey) {
369
+ continue;
370
+ }
371
+ fdef.options = { ...(fdef.options || {}) };
372
+ fdef.options[optkey] = { ...(fdef.options[optkey] || {}), ...fact };
373
+ }
316
374
  featureDefs[f.name] = fdef;
317
375
  });
318
376
  const options = { base: baseUrl };
@@ -1 +1 @@
1
- {"version":3,"file":"utility.js","sourceRoot":"","sources":["../src/utility.ts"],"names":[],"mappings":";;;;;;QAkHE,WAAW;QACX,WAAW;QACX,YAAY;QACZ,iBAAiB;QACjB,eAAe;QAIf,YAAY;QACZ,UAAU;QACV,iBAAiB;QACjB,gBAAgB;QAChB,KAAK;QACL,gBAAgB;AA9HlB,0DAA4B;AAE5B,u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AS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAA;IACzF,CAAC;IACD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAA;IACzB,OAAO,CAAC,MAAM,GAAG,WAAW,CAAA;IAE5B,wEAAwE;IACxE,0EAA0E;IAC1E,yEAAyE;IACzE,qEAAqE;IACrE,wEAAwE;IACxE,oEAAoE;IACpE,wEAAwE;IACxE,MAAM,IAAI,GAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;IAC5C,IAAI,IAAI,IAAI,UAAU,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,IAAA,4BAAc,EAAC,KAAK,EAAE,UAAU,CAAC,CAAA;QAChD,IAAI,CAAC,MAAM,GAAG,UAAU,CAAA;IAC1B,CAAC;IAED,MAAM,GAAG,GAAG;QACV,IAAI;QACJ,OAAO,EAAE,WAAW;QACpB,OAAO;QACP,MAAM,EAAE,UAAU;KACnB,CAAA;IAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAA;AAC3C,CAAC"}
package/model/sdkgen.aon CHANGED
@@ -172,6 +172,27 @@ main: kit: target: &: {
172
172
  ext: string
173
173
  comment: line: string
174
174
 
175
+ # APPLICABILITY (docs/design/feature-tags.md). What this target can offer
176
+ # a feature; a feature applies here when its `needs` is a subset of this.
177
+ # Empty is the default, so a target says nothing until it has a reason to.
178
+ #
179
+ # THE VOCABULARY IS CLOSED — extended by editing this comment and the
180
+ # schema, never by a package inventing a string. Two authors spelling the
181
+ # same capability differently is the whole failure mode a free-form tag
182
+ # would reintroduce.
183
+ #
184
+ # sekreto a vendored sekreto port lives in this target's feature
185
+ # container, so a feature can resolve secrets through it
186
+ #
187
+ # Tags named in the design note but not yet load-bearing
188
+ # (`per-feature-file`, `deps`, `transport-wrap`, `hooks`, `delegates`)
189
+ # are deliberately absent until a feature actually gates on one: a tag
190
+ # whose answer is currently "everyone" buys nothing and has to be kept
191
+ # true across 27 targets.
192
+ #
193
+ # A map keyed by tag, matching `needs` — see the note there.
194
+ provides: &: boolean
195
+
175
196
  base: *'' | string
176
197
  origname: *'' | string
177
198
  package: *'' | string
@@ -420,6 +441,24 @@ main: kit: feature: &: {
420
441
  # TODO: version '0.0.1' | semver # where semver is a string format type as per semver.org
421
442
  version: *'0.0.1' | string
422
443
 
444
+ # APPLICABILITY (docs/design/feature-tags.md). What this feature requires
445
+ # of a target; it applies where `needs` is a subset of the target's
446
+ # `provides`. Empty means "applies anywhere", so every feature that
447
+ # predates the gate is unaffected — the gate is additive by construction.
448
+ #
449
+ # A tag, not a target list: a list has to be edited for targets the
450
+ # feature's author has never heard of, so a published package would
451
+ # starve every target added after its release.
452
+ #
453
+ # The vocabulary is closed and lives in `main: kit: target: &: provides`.
454
+ #
455
+ # A MAP keyed by tag, not a list, for the reason `contributor` is a map:
456
+ # aontu unifies maps by key, so a package can add one tag without
457
+ # restating the others. A list here also hangs the unifier outright on a
458
+ # real project's model (a defaulted list disjunction under this spread),
459
+ # which is what settled the shape.
460
+ needs: &: boolean
461
+
423
462
  # Transport role (station design §8.4): how the feature relates to the
424
463
  # transport slot. 'base' REPLACES ctx.utility.fetcher outright (only the
425
464
  # `test` feature); 'wrap' wraps it in init() (netsim, retry, cache,
@@ -430,6 +469,64 @@ main: kit: feature: &: {
430
469
  # feature that both wraps AND dispatches hooks (station does).
431
470
  transport: *'none' | 'base' | 'wrap'
432
471
 
472
+ # SPEC-DERIVED OPTIONS. Facts apidef records from the OpenAPI spec, mapped
473
+ # onto the key in this feature's `config.options` that should carry them:
474
+ #
475
+ # spec: { authexchange: 'exchange' }
476
+ #
477
+ # configDefinition performs the overlay at generation time, so the fact
478
+ # reaches the SDK's embedded config without a project restating what its
479
+ # own spec already says. The fact name comes from a CLOSED vocabulary
480
+ # (`SPEC_FACTS` in ts/src/utility.ts); an unknown name is ignored rather
481
+ # than failing, so a project on an older sdkgen is unaffected.
482
+ #
483
+ # A map keyed by fact name, for the same reason `needs` is a map: aontu
484
+ # unifies maps by key, so a package can add one entry without restating
485
+ # the others.
486
+ spec: &: string
487
+
488
+ # PLUGINS — a feature's optional, separately-trimmed parts.
489
+ #
490
+ # A feature whose implementation is a thin layer over a library with
491
+ # OPTIONAL pieces (secrets over sekreto, whose thirteen provider kinds
492
+ # each carry their own platform cost) declares them here. Each plugin
493
+ # owns a template subfolder under the feature's own tree, and the
494
+ # feature trim removes an inactive one exactly as it removes an
495
+ # inactive feature — the same walk, one level deeper.
496
+ #
497
+ # This is what makes a generated SDK lean: a project whose chain is
498
+ # `[dotenv, env]` should not carry AWS request signing and seven HTTP
499
+ # vault clients, and before this it carried all of them because they
500
+ # were reachable from one import.
501
+ #
502
+ # `needs` is the same closed applicability vocabulary a feature uses,
503
+ # so a plugin requiring something of its target is gated the same way.
504
+ plugin: &: {
505
+ name: key()
506
+ active: *false | boolean
507
+ title: *'' | string
508
+
509
+ # What this plugin needs of the RUNTIME - 'fs', 'fetch', 'crypto'.
510
+ # Declared so a target that cannot provide it is refused at
511
+ # generation rather than at the consumer's first lookup.
512
+ needs: &: boolean
513
+
514
+ # The template paths this plugin OWNS, relative to the target
515
+ # template root, dropped when it is inactive.
516
+ #
517
+ # Declared rather than derived from a `plugin/<name>/` directory
518
+ # convention, because the files a plugin owns are frequently NOT
519
+ # free to move. sekreto's provider modules are VENDORED: the
520
+ # vendoring guard holds each file against its upstream path, and
521
+ # their relative imports (`./support`, `../Sigv4`) only resolve at
522
+ # upstream's own directory depth. Relocating them under a
523
+ # convention would break both at once.
524
+ #
525
+ # Empty means the convention — `src/feature/<feature>/plugin/<name>/`
526
+ # — which is right for a plugin whose files sdkgen owns outright.
527
+ path: *[] | [&: string]
528
+ }
529
+
433
530
  hook: &: {
434
531
  active: *false | boolean
435
532
  await: *false | boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voxgig/sdkgen",
3
- "version": "4.5.3",
3
+ "version": "4.7.0",
4
4
  "main": "dist/sdkgen.js",
5
5
  "type": "commonjs",
6
6
  "engines": {
@@ -3,6 +3,7 @@
3
3
  # Core
4
4
  @"test.aon"
5
5
  @"log.aon"
6
+ @"secrets.aon"
6
7
 
7
8
  # Enterprise capabilities
8
9
  @"retry.aon"
@@ -0,0 +1,200 @@
1
+
2
+ main: kit: feature: secrets: {
3
+
4
+ name: key()
5
+ title: "Secret access: resolve the API credential through a provider chain, and exchange a refresh token for short-lived access tokens"
6
+ version: '0.1.0'
7
+ base: 'BASE'
8
+
9
+ # `active` is deliberately NOT set here. The base schema defaults it
10
+ # (`active: *false | boolean`), and in aontu a concrete value does not
11
+ # yield to another concrete value — it CONFLICTS. Restating `active:
12
+ # false` here would make a project's `main: kit: feature: secrets:
13
+ # active: true` fail to unify, which is the same defect the publication
14
+ # keys carry a warning about in model/target/ts.aon.
15
+ #
16
+ # So the feature is OFF until a project turns it on, in its own overlay
17
+ # (model/project.aon), which `feature add` never overwrites.
18
+
19
+ # Applicability (docs/design/feature-tags.md). The feature is a thin
20
+ # layer over a VENDORED sekreto port, so it only applies to a target
21
+ # whose feature container carries one. Without this tag the feature
22
+ # would fan out to every target, and each one that generated would
23
+ # carry an import for a class it has no source for.
24
+ needs: { sekreto: true }
25
+
26
+ # SPEC-DERIVED OPTIONS. apidef recognises an API's access-token exchange
27
+ # in the spec and records it as model facts (info.security.exchange): the
28
+ # endpoint's path and method, and the field names it sends and answers
29
+ # with. This maps those facts onto `options.exchange` below, so a project
30
+ # whose spec describes an exchange does not hand-copy its own API's token
31
+ # endpoint into its model.
32
+ #
33
+ # What arrives is WHAT THE EXCHANGE IS, never that it should run:
34
+ # `exchange.active` stays the project's call, because resolving a static
35
+ # credential through this feature on an API that also has a token endpoint
36
+ # is a legitimate configuration. Turning it on remains a deliberate act.
37
+ spec: { authexchange: 'exchange' }
38
+
39
+ # PLUGINS — the provider kinds, each carrying its own platform cost.
40
+ #
41
+ # This is what keeps a generated SDK lean. sekreto's core resolves a
42
+ # chain and ships `env` and `memory`, which import nothing; every other
43
+ # kind lives in its own module and REGISTERS ITSELF at import, so a kind
44
+ # nobody imports is not in the build. These entries decide which of
45
+ # those modules are generated at all.
46
+ #
47
+ # An SDK whose chain is `[dotenv, env]` — the common case, and
48
+ # elementdemo's — needs `dotenv` alone. Before this it carried AWS
49
+ # request signing and seven HTTP vault clients as well, because one
50
+ # import reached every kind.
51
+ #
52
+ # `path` is DECLARED rather than conventional: these files are vendored
53
+ # from sekreto, and both the vendoring guard and their own relative
54
+ # imports pin them at upstream's directory depth.
55
+ #
56
+ # All inactive by default, like the feature itself. A project turns on
57
+ # what its chain actually names.
58
+ plugin: {
59
+ dotenv: {
60
+ title: 'Read secrets from a .env file or a directory of files'
61
+ needs: { fs: true }
62
+ path: [
63
+ 'src/feature/secrets/sekreto/provider/dotenv.ts'
64
+ 'src/feature/secrets/sekreto/provider/file.ts'
65
+ ]
66
+ }
67
+
68
+ vault: {
69
+ title: 'HashiCorp Vault and boru'
70
+ needs: { fs: true, fetch: true }
71
+ path: [
72
+ 'src/feature/secrets/sekreto/provider/hashicorp.ts'
73
+ 'src/feature/secrets/sekreto/provider/boru.ts'
74
+ ]
75
+ }
76
+
77
+ cloud: {
78
+ title: 'GCP Secret Manager and Azure Key Vault'
79
+ needs: { fetch: true }
80
+ path: [
81
+ 'src/feature/secrets/sekreto/provider/gcpsecrets.ts'
82
+ 'src/feature/secrets/sekreto/provider/azuresecrets.ts'
83
+ ]
84
+ }
85
+
86
+ saas: {
87
+ title: '1Password, Doppler and Infisical'
88
+ needs: { fetch: true }
89
+ path: [
90
+ 'src/feature/secrets/sekreto/provider/onepassword.ts'
91
+ 'src/feature/secrets/sekreto/provider/doppler.ts'
92
+ 'src/feature/secrets/sekreto/provider/infisical.ts'
93
+ ]
94
+ }
95
+
96
+ # The only plugin that costs node:crypto: AWS request signing.
97
+ # `Sigv4.ts` goes with it, and goes only with it.
98
+ aws: {
99
+ title: 'AWS Secrets Manager and Parameter Store (SigV4 signing)'
100
+ needs: { fetch: true, crypto: true }
101
+ path: [
102
+ 'src/feature/secrets/sekreto/provider/aws.ts'
103
+ 'src/feature/secrets/sekreto/Sigv4.ts'
104
+ ]
105
+ }
106
+ }
107
+
108
+ # Transport role (station design §8.4).
109
+ #
110
+ # 'wrap', because the access-token exchange below has to SEE the response:
111
+ # a spent token is discovered by the API answering 401, and the only place
112
+ # to notice that and try again is around the transport. It wraps only when
113
+ # `exchange.active` — with the exchange off this feature never touches the
114
+ # transport, exactly as when its role was 'none' — but the role is a
115
+ # DECLARATION of what the feature may do, not a report of what one
116
+ # configuration does, so it is declared at its widest.
117
+ transport: 'wrap'
118
+
119
+ config: {
120
+ options: {
121
+ active: false
122
+
123
+ # The sekreto provider chain, in first-hit order. Each entry is a
124
+ # sekreto ProviderSpec ({ kind, name, ... }) or a provider object.
125
+ # An explicit `apikey` option, when set, is placed AHEAD of these as
126
+ # a `memory` store named 'options', so an explicit credential still
127
+ # wins — by sekreto's own first-hit rule, not by special-casing.
128
+ providers: []
129
+
130
+ # The secret to resolve, for an API whose credential is not
131
+ # apikey-shaped. The resolved value is written to options.apikey
132
+ # regardless, because that is where prepareAuth looks.
133
+ name: 'apikey'
134
+
135
+ # sekreto caches resolved values by default. Off means every
136
+ # resolve() asks the chain again; redaction still tracks values.
137
+ cache: true
138
+
139
+ # ACCESS-TOKEN EXCHANGE (the OAuth2 refresh grant, in miniature).
140
+ #
141
+ # Some APIs do not accept a long-lived credential at all: the secret the
142
+ # chain above resolves is a REFRESH token, which buys a short-lived ACCESS
143
+ # token from a token endpoint, and that access token is what every request
144
+ # carries. The access token then expires, and the client is expected to buy
145
+ # another without human help.
146
+ #
147
+ # Off by default, and inert when off: with `exchange.active: false` this
148
+ # feature behaves exactly as it always did — resolve one secret, write it to
149
+ # options.apikey. That is what keeps the change additive for every SDK
150
+ # already using it.
151
+ #
152
+ # With it on, set `name` to the refresh secret (`name: 'refresh_token'`),
153
+ # because `name` is what the chain is asked for.
154
+ exchange: {
155
+ active: false
156
+
157
+ # The token endpoint, RELATIVE to options.base — the base already
158
+ # carries whatever account or tenant segment the server URL declares,
159
+ # so a relative path follows it without being told about it.
160
+ path: 'auth/token'
161
+ method: 'POST'
162
+
163
+ # The JSON field the refresh credential is SENT in, and the field the
164
+ # access token comes back in. Named rather than assumed: `access_token`
165
+ # and `refresh_token` are the OAuth2 spelling, and plenty of APIs use
166
+ # their own.
167
+ request: 'refresh_token'
168
+ response: 'access_token'
169
+
170
+ # An explicit refresh token, given in code. It becomes the FIRST
171
+ # provider in the chain, so it wins by sekreto's own first-hit rule —
172
+ # the same seat `options.apikey` takes when no exchange is configured.
173
+ # `options.apikey` cannot serve here: with an exchange configured it
174
+ # means "an access token I already hold", which is the opposite kind
175
+ # of credential.
176
+ refresh: ''
177
+
178
+ # Response statuses that mean "your access token is spent, buy
179
+ # another". 401 is the answer every API in this shape gives; 403 is
180
+ # listed by some, so it is configurable rather than assumed.
181
+ statuses: [401]
182
+
183
+ # How many times ONE request may buy a token and try again. One is
184
+ # right: a second refusal on a token bought moments ago is a real
185
+ # failure — a revoked refresh token, the wrong account — and retrying
186
+ # it turns that into a spin instead of an error.
187
+ retries: 1
188
+ }
189
+ }
190
+ }
191
+
192
+ # Resolution is ASYNC (a provider may do IO, and the exchange makes an
193
+ # HTTP request) but prepareAuth is sync.
194
+ # Entity ops await featureHook('PreSpec') before makeSpec, so this is
195
+ # the one seam where the lookup can happen and still land in time.
196
+ # Concurrent operations share the single in-flight promise.
197
+ hook: {
198
+ PreSpec: { active: true, await: true }
199
+ }
200
+ }
@@ -7,13 +7,20 @@ main: kit: target: ts: {
7
7
  module: name: '$$name$$'
8
8
  base: 'BASE'
9
9
 
10
+ # Applicability (docs/design/feature-tags.md). A vendored sekreto port
11
+ # lives in this target's feature container, so a feature that resolves
12
+ # secrets through sekreto can apply here.
13
+ provides: { sekreto: true }
14
+
10
15
  deps: &: {
11
16
  # TODO: fix aontu disjunctions!
12
17
  kind: *'prod' | string # 'peer' |'dev'
13
18
  }
14
19
 
15
20
  deps: {
16
- 'dotenv': { active: true, version: '^17.4.2', kind: dev }
21
+ # dotenv was dropped when the generated entity tests moved to
22
+ # `loadEnvLocal` (tm/ts/test/utility.ts) — the SDK's last non-tooling
23
+ # dependency of any kind.
17
24
  'typescript': { active: true, version: '^5.9.3', kind: dev }
18
25
  '@types/node': { active: true, version: '^25.6.0', kind: dev }
19
26
  }
@@ -9,6 +9,7 @@ import {
9
9
  isAuthActive,
10
10
  isConfigData,
11
11
  resolveAuthPrefix,
12
+ targetFeatures,
12
13
  } from '@voxgig/sdkgen'
13
14
 
14
15
 
@@ -36,7 +37,10 @@ const Config = cmp(async function Config(props: any) {
36
37
  const model: Model = ctx$.model
37
38
 
38
39
  const entity = getModelPath(model, `main.${KIT}.entity`)
39
- const feature = getModelPath(model, `main.${KIT}.feature`)
40
+ // Gated by the applicability tags, so this target never imports or
41
+ // registers a feature it has no source for. One rule, one place:
42
+ // helpers/applicability.
43
+ const feature = targetFeatures(model, target)
40
44
 
41
45
  const headers = getModelPath(model, `main.${KIT}.config.headers`) || {}
42
46
 
@@ -5,6 +5,7 @@ import {
5
5
  cmp,
6
6
  configDefinition,
7
7
  each,
8
+ targetFeatures,
8
9
  } from '@voxgig/sdkgen'
9
10
 
10
11
 
@@ -30,7 +31,10 @@ const Config = cmp(async function Config(props: any) {
30
31
 
31
32
  const model: Model = ctx$.model
32
33
 
33
- const feature = getModelPath(model, `main.${KIT}.feature`)
34
+ // Gated by the applicability tags, so this target never imports or
35
+ // registers a feature it has no source for. One rule, one place:
36
+ // helpers/applicability.
37
+ const feature = targetFeatures(model, target)
34
38
 
35
39
  // The embedded config, built by the shared helper so this target's shapes
36
40
  // and identity fields stay in step with the ts reference by construction.
@@ -4,6 +4,7 @@ import * as Path from 'node:path'
4
4
  import {
5
5
  cmp, each,
6
6
  File, Content, Copy, Folder, Fragment,
7
+ TEST_CONTROL_EXCLUDE
7
8
  } from '@voxgig/sdkgen'
8
9
 
9
10
 
@@ -41,7 +42,7 @@ const Main = cmp(async function Main(props: any) {
41
42
  // only stages the per-feature custom-source dirs (target add), so exclude it.
42
43
  Copy({
43
44
  from: 'tm/' + target.name,
44
- exclude: [/src\//],
45
+ exclude: [/src\//, TEST_CONTROL_EXCLUDE],
45
46
  replace: {
46
47
  ...props.ctx$.stdrep,
47
48
  }
@@ -3,7 +3,8 @@ import type {
3
3
  ModelEntity
4
4
  } from '@voxgig/apidef'
5
5
 
6
- import { cmp, each, Folder, entityCollection } from '@voxgig/sdkgen'
6
+ import { cmp, each, Folder, entityCollection,
7
+ TestControl } from '@voxgig/sdkgen'
7
8
 
8
9
 
9
10
  import { TestEntity } from './TestEntity_cpp'
@@ -19,6 +20,9 @@ const Test = cmp(function Test(props: any) {
19
20
  // netsim / struct corpus) ships as tm/cpp/test templates (copied verbatim).
20
21
  // Here we generate the per-entity model-driven tests into test/.
21
22
  Folder({ name: 'test' }, () => {
23
+
24
+ // Write-once: a project's edited control file survives regeneration.
25
+ TestControl({ target, dir: 'test' })
22
26
  const entity = each(entityCollection(model))
23
27
  .filter((e: any) => false !== e.active)
24
28
  each(entity, (entity: ModelEntity) => {
@@ -7,6 +7,7 @@ import {
7
7
  configReprSetting,
8
8
  each,
9
9
  isConfigData,
10
+ targetFeatures,
10
11
  } from '@voxgig/sdkgen'
11
12
 
12
13
 
@@ -33,7 +34,10 @@ const Config = cmp(async function Config(props: any) {
33
34
 
34
35
  const model: Model = ctx$.model
35
36
 
36
- const feature = getModelPath(model, `main.${KIT}.feature`)
37
+ // Gated by the applicability tags, so this target never imports or
38
+ // registers a feature it has no source for. One rule, one place:
39
+ // helpers/applicability.
40
+ const feature = targetFeatures(model, target)
37
41
 
38
42
  // The same config as an OBJECT, built by the shared helper so this target's
39
43
  // literal and the data that replaces it above the threshold are the same
@@ -4,6 +4,7 @@ import * as Path from 'node:path'
4
4
  import {
5
5
  cmp, each,
6
6
  File, Content, Copy, Folder, Fragment,
7
+ TEST_CONTROL_EXCLUDE
7
8
  } from '@voxgig/sdkgen'
8
9
 
9
10
 
@@ -42,7 +43,7 @@ const Main = cmp(async function Main(props: any) {
42
43
  // per-feature extension folders (not shipped into the SDK output).
43
44
  Copy({
44
45
  from: 'tm/' + target.name,
45
- exclude: [/src\//],
46
+ exclude: [/src\//, TEST_CONTROL_EXCLUDE],
46
47
  replace: {
47
48
  ...props.ctx$.stdrep,
48
49
  }