@voxgig/sdkgen-langpack 0.0.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/.sdk/model/target/dart.aon +63 -0
- package/.sdk/model/target/haskell.aon +72 -0
- package/.sdk/model/target/lean.aon +91 -0
- package/.sdk/src/cmp/dart/Config_dart.ts +248 -0
- package/.sdk/src/cmp/dart/EntityBase_dart.ts +34 -0
- package/.sdk/src/cmp/dart/EntityOperation_dart.ts +43 -0
- package/.sdk/src/cmp/dart/EntityTypes_dart.ts +207 -0
- package/.sdk/src/cmp/dart/Entity_dart.ts +87 -0
- package/.sdk/src/cmp/dart/Gitignore_dart.ts +34 -0
- package/.sdk/src/cmp/dart/MainEntity_dart.ts +33 -0
- package/.sdk/src/cmp/dart/Main_dart.ts +178 -0
- package/.sdk/src/cmp/dart/Package_dart.ts +82 -0
- package/.sdk/src/cmp/dart/ReadmeEntity_dart.ts +177 -0
- package/.sdk/src/cmp/dart/ReadmeExamplesTest_dart.ts +238 -0
- package/.sdk/src/cmp/dart/ReadmeExplanation_dart.ts +53 -0
- package/.sdk/src/cmp/dart/ReadmeHowto_dart.ts +152 -0
- package/.sdk/src/cmp/dart/ReadmeInstall_dart.ts +59 -0
- package/.sdk/src/cmp/dart/ReadmeIntro_dart.ts +65 -0
- package/.sdk/src/cmp/dart/ReadmeModel_dart.ts +151 -0
- package/.sdk/src/cmp/dart/ReadmeOptions_dart.ts +63 -0
- package/.sdk/src/cmp/dart/ReadmeQuick_dart.ts +225 -0
- package/.sdk/src/cmp/dart/ReadmeRef_dart.ts +397 -0
- package/.sdk/src/cmp/dart/ReadmeTopHowto_dart.ts +24 -0
- package/.sdk/src/cmp/dart/ReadmeTopQuick_dart.ts +106 -0
- package/.sdk/src/cmp/dart/ReadmeTopTest_dart.ts +78 -0
- package/.sdk/src/cmp/dart/SdkError_dart.ts +42 -0
- package/.sdk/src/cmp/dart/TestDirect_dart.ts +516 -0
- package/.sdk/src/cmp/dart/TestEntity_dart.ts +628 -0
- package/.sdk/src/cmp/dart/Test_dart.ts +138 -0
- package/.sdk/src/cmp/dart/fragment/Config.data.fragment.dart +98 -0
- package/.sdk/src/cmp/dart/fragment/Config.fragment.dart +70 -0
- package/.sdk/src/cmp/dart/fragment/Direct.test.fragment.dart +25 -0
- package/.sdk/src/cmp/dart/fragment/Entity.fragment.dart +29 -0
- package/.sdk/src/cmp/dart/fragment/Entity.test.fragment.dart +28 -0
- package/.sdk/src/cmp/dart/fragment/EntityBase.fragment.dart +302 -0
- package/.sdk/src/cmp/dart/fragment/EntityCreateOp.fragment.dart +98 -0
- package/.sdk/src/cmp/dart/fragment/EntityListOp.fragment.dart +90 -0
- package/.sdk/src/cmp/dart/fragment/EntityLoadOp.fragment.dart +102 -0
- package/.sdk/src/cmp/dart/fragment/EntityRemoveOp.fragment.dart +108 -0
- package/.sdk/src/cmp/dart/fragment/EntityUpdateOp.fragment.dart +102 -0
- package/.sdk/src/cmp/dart/fragment/Main.fragment.dart +339 -0
- package/.sdk/src/cmp/dart/fragment/SdkError.fragment.dart +26 -0
- package/.sdk/src/cmp/dart/tsconfig.json +15 -0
- package/.sdk/src/cmp/dart/utility_dart.ts +155 -0
- package/.sdk/src/cmp/haskell/Config_haskell.ts +98 -0
- package/.sdk/src/cmp/haskell/Entity_haskell.ts +13 -0
- package/.sdk/src/cmp/haskell/Gitignore_haskell.ts +27 -0
- package/.sdk/src/cmp/haskell/Main_haskell.ts +123 -0
- package/.sdk/src/cmp/haskell/Package_haskell.ts +60 -0
- package/.sdk/src/cmp/haskell/ReadmeEntity_haskell.ts +186 -0
- package/.sdk/src/cmp/haskell/ReadmeExamplesTest_haskell.ts +135 -0
- package/.sdk/src/cmp/haskell/ReadmeExplanation_haskell.ts +48 -0
- package/.sdk/src/cmp/haskell/ReadmeHowto_haskell.ts +168 -0
- package/.sdk/src/cmp/haskell/ReadmeInstall_haskell.ts +51 -0
- package/.sdk/src/cmp/haskell/ReadmeIntro_haskell.ts +67 -0
- package/.sdk/src/cmp/haskell/ReadmeModel_haskell.ts +162 -0
- package/.sdk/src/cmp/haskell/ReadmeOptions_haskell.ts +74 -0
- package/.sdk/src/cmp/haskell/ReadmeQuick_haskell.ts +241 -0
- package/.sdk/src/cmp/haskell/ReadmeRef_haskell.ts +408 -0
- package/.sdk/src/cmp/haskell/ReadmeTopHowto_haskell.ts +31 -0
- package/.sdk/src/cmp/haskell/ReadmeTopQuick_haskell.ts +104 -0
- package/.sdk/src/cmp/haskell/ReadmeTopTest_haskell.ts +80 -0
- package/.sdk/src/cmp/haskell/Test_haskell.ts +297 -0
- package/.sdk/src/cmp/haskell/tsconfig.json +15 -0
- package/.sdk/src/cmp/haskell/utility_haskell.ts +166 -0
- package/.sdk/src/cmp/lean/Config_lean.ts +93 -0
- package/.sdk/src/cmp/lean/Entity_lean.ts +9 -0
- package/.sdk/src/cmp/lean/Gitignore_lean.ts +18 -0
- package/.sdk/src/cmp/lean/Main_lean.ts +120 -0
- package/.sdk/src/cmp/lean/Package_lean.ts +93 -0
- package/.sdk/src/cmp/lean/ReadmeEntity_lean.ts +29 -0
- package/.sdk/src/cmp/lean/ReadmeExplanation_lean.ts +19 -0
- package/.sdk/src/cmp/lean/ReadmeHowto_lean.ts +25 -0
- package/.sdk/src/cmp/lean/ReadmeInstall_lean.ts +39 -0
- package/.sdk/src/cmp/lean/ReadmeIntro_lean.ts +25 -0
- package/.sdk/src/cmp/lean/ReadmeModel_lean.ts +24 -0
- package/.sdk/src/cmp/lean/ReadmeOptions_lean.ts +22 -0
- package/.sdk/src/cmp/lean/ReadmeQuick_lean.ts +50 -0
- package/.sdk/src/cmp/lean/ReadmeRef_lean.ts +40 -0
- package/.sdk/src/cmp/lean/ReadmeTopHowto_lean.ts +16 -0
- package/.sdk/src/cmp/lean/ReadmeTopQuick_lean.ts +23 -0
- package/.sdk/src/cmp/lean/ReadmeTopTest_lean.ts +19 -0
- package/.sdk/src/cmp/lean/Test_lean.ts +261 -0
- package/.sdk/src/cmp/lean/utility_lean.ts +129 -0
- package/.sdk/tm/dart/LICENSE +22 -0
- package/.sdk/tm/dart/Makefile +50 -0
- package/.sdk/tm/dart/lib/Context.dart +150 -0
- package/.sdk/tm/dart/lib/Control.dart +15 -0
- package/.sdk/tm/dart/lib/Operation.dart +31 -0
- package/.sdk/tm/dart/lib/Point.dart +51 -0
- package/.sdk/tm/dart/lib/Response.dart +32 -0
- package/.sdk/tm/dart/lib/Result.dart +39 -0
- package/.sdk/tm/dart/lib/Spec.dart +49 -0
- package/.sdk/tm/dart/lib/feature/audit/AuditFeature.dart +103 -0
- package/.sdk/tm/dart/lib/feature/base/BaseFeature.dart +76 -0
- package/.sdk/tm/dart/lib/feature/cache/CacheFeature.dart +152 -0
- package/.sdk/tm/dart/lib/feature/clienttrack/ClienttrackFeature.dart +104 -0
- package/.sdk/tm/dart/lib/feature/cost/CostFeature.dart +446 -0
- package/.sdk/tm/dart/lib/feature/debug/DebugFeature.dart +153 -0
- package/.sdk/tm/dart/lib/feature/idempotency/IdempotencyFeature.dart +92 -0
- package/.sdk/tm/dart/lib/feature/log/LogFeature.dart +85 -0
- package/.sdk/tm/dart/lib/feature/metrics/MetricsFeature.dart +103 -0
- package/.sdk/tm/dart/lib/feature/netsim/NetsimFeature.dart +186 -0
- package/.sdk/tm/dart/lib/feature/paging/PagingFeature.dart +240 -0
- package/.sdk/tm/dart/lib/feature/proxy/ProxyFeature.dart +118 -0
- package/.sdk/tm/dart/lib/feature/ratelimit/RatelimitFeature.dart +103 -0
- package/.sdk/tm/dart/lib/feature/rbac/RbacFeature.dart +121 -0
- package/.sdk/tm/dart/lib/feature/retry/RetryFeature.dart +155 -0
- package/.sdk/tm/dart/lib/feature/secrets/SecretsFeature.dart +649 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/capability.dart +105 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/catalog.dart +46 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/config.dart +297 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/depend.dart +198 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/env.dart +144 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/export.dart +58 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/graph.dart +160 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/host.dart +1067 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/order.dart +172 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/plugin.dart +23 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/point.dart +117 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/ref.dart +105 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/resolve.dart +58 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/types.dart +201 -0
- package/.sdk/tm/dart/lib/feature/secrets/plugin/version.dart +116 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/aws.dart +285 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/azuresecrets.dart +178 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/boru.dart +145 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/crypto.dart +194 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/doppler.dart +101 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/gcpsecrets.dart +143 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/hashicorp.dart +190 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/httpjson.dart +363 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/infisical.dart +149 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/onepassword.dart +146 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/secretspec.dart +116 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/plugins/sigv4.dart +237 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/addr.dart +138 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/json.dart +276 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/provider.dart +31 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/providers.dart +243 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/sekreto.dart +730 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/spec.dart +200 -0
- package/.sdk/tm/dart/lib/feature/secrets/sekreto/src/support.dart +217 -0
- package/.sdk/tm/dart/lib/feature/streaming/StreamingFeature.dart +97 -0
- package/.sdk/tm/dart/lib/feature/telemetry/TelemetryFeature.dart +136 -0
- package/.sdk/tm/dart/lib/feature/test/TestFeature.dart +328 -0
- package/.sdk/tm/dart/lib/feature/timeout/TimeoutFeature.dart +104 -0
- package/.sdk/tm/dart/lib/utility/CleanUtility.dart +12 -0
- package/.sdk/tm/dart/lib/utility/DoneUtility.dart +18 -0
- package/.sdk/tm/dart/lib/utility/ErrUtility.dart +46 -0
- package/.sdk/tm/dart/lib/utility/FeatureAddUtility.dart +35 -0
- package/.sdk/tm/dart/lib/utility/FeatureHookUtility.dart +20 -0
- package/.sdk/tm/dart/lib/utility/FeatureInitUtility.dart +9 -0
- package/.sdk/tm/dart/lib/utility/FetcherUtility.dart +104 -0
- package/.sdk/tm/dart/lib/utility/GraphqlUtility.dart +162 -0
- package/.sdk/tm/dart/lib/utility/MakeContextUtility.dart +6 -0
- package/.sdk/tm/dart/lib/utility/MakeErrorUtility.dart +71 -0
- package/.sdk/tm/dart/lib/utility/MakeFetchDefUtility.dart +42 -0
- package/.sdk/tm/dart/lib/utility/MakeOptionsUtility.dart +233 -0
- package/.sdk/tm/dart/lib/utility/MakePointUtility.dart +130 -0
- package/.sdk/tm/dart/lib/utility/MakeRequestUtility.dart +66 -0
- package/.sdk/tm/dart/lib/utility/MakeResponseUtility.dart +59 -0
- package/.sdk/tm/dart/lib/utility/MakeResultUtility.dart +49 -0
- package/.sdk/tm/dart/lib/utility/MakeSpecUtility.dart +77 -0
- package/.sdk/tm/dart/lib/utility/MakeUrlUtility.dart +51 -0
- package/.sdk/tm/dart/lib/utility/ParamUtility.dart +56 -0
- package/.sdk/tm/dart/lib/utility/PrepareAuthUtility.dart +46 -0
- package/.sdk/tm/dart/lib/utility/PrepareBodyUtility.dart +19 -0
- package/.sdk/tm/dart/lib/utility/PrepareHeadersUtility.dart +11 -0
- package/.sdk/tm/dart/lib/utility/PrepareMethodUtility.dart +30 -0
- package/.sdk/tm/dart/lib/utility/PrepareParamsUtility.dart +23 -0
- package/.sdk/tm/dart/lib/utility/PreparePathUtility.dart +9 -0
- package/.sdk/tm/dart/lib/utility/PrepareQueryUtility.dart +18 -0
- package/.sdk/tm/dart/lib/utility/ResultBasicUtility.dart +29 -0
- package/.sdk/tm/dart/lib/utility/ResultBodyUtility.dart +15 -0
- package/.sdk/tm/dart/lib/utility/ResultHeadersUtility.dart +18 -0
- package/.sdk/tm/dart/lib/utility/StructUtility.dart +127 -0
- package/.sdk/tm/dart/lib/utility/TransformRequestUtility.dart +28 -0
- package/.sdk/tm/dart/lib/utility/TransformResponseUtility.dart +44 -0
- package/.sdk/tm/dart/lib/utility/Utility.dart +239 -0
- package/.sdk/tm/dart/lib/utility/voxgig_struct.dart +2462 -0
- package/.sdk/tm/dart/src/feature/README.md +3 -0
- package/.sdk/tm/dart/src/feature/audit/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/base/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/cache/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/clienttrack/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/cost/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/debug/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/idempotency/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/log/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/metrics/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/netsim/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/paging/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/proxy/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/ratelimit/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/rbac/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/retry/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/secrets/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/streaming/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/telemetry/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/test/.gitkeep +0 -0
- package/.sdk/tm/dart/src/feature/timeout/.gitkeep +0 -0
- package/.sdk/tm/dart/test/custom_test.dart +65 -0
- package/.sdk/tm/dart/test/exists_test.dart +12 -0
- package/.sdk/tm/dart/test/feature/harness.dart +347 -0
- package/.sdk/tm/dart/test/feature/secrets/secrets_test.dart +1107 -0
- package/.sdk/tm/dart/test/feature_test.dart +1193 -0
- package/.sdk/tm/dart/test/harness.dart +153 -0
- package/.sdk/tm/dart/test/netsim_test.dart +48 -0
- package/.sdk/tm/dart/test/omni.dart +520 -0
- package/.sdk/tm/dart/test/omni_smoke_test.dart +143 -0
- package/.sdk/tm/dart/test/pipeline_test.dart +608 -0
- package/.sdk/tm/dart/test/primary_test.dart +476 -0
- package/.sdk/tm/dart/test/sdk-test-control.json +19 -0
- package/.sdk/tm/dart/test/struct_test.dart +468 -0
- package/.sdk/tm/dart/test/utility.dart +198 -0
- package/.sdk/tm/dart/test/vendor/omni/omni.dart +7 -0
- package/.sdk/tm/dart/test/vendor/omni/runner.dart +653 -0
- package/.sdk/tm/dart/test/vendor/omni/util.dart +232 -0
- package/.sdk/tm/haskell/LICENSE +21 -0
- package/.sdk/tm/haskell/Makefile +22 -0
- package/.sdk/tm/haskell/VERSION +1 -0
- package/.sdk/tm/haskell/src/SdkFeatures.hs +1440 -0
- package/.sdk/tm/haskell/src/SdkHelpers.hs +337 -0
- package/.sdk/tm/haskell/src/SdkJson.hs +111 -0
- package/.sdk/tm/haskell/src/SdkRuntime.hs +1279 -0
- package/.sdk/tm/haskell/src/SdkTypes.hs +195 -0
- package/.sdk/tm/haskell/src/VoxgigStruct.hs +2299 -0
- package/.sdk/tm/haskell/src/Vregex.hs +237 -0
- package/.sdk/tm/haskell/src/feature/README.md +5 -0
- package/.sdk/tm/haskell/src/feature/audit/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/base/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/cache/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/clienttrack/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/debug/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/idempotency/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/log/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/metrics/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/netsim/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/paging/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/proxy/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/ratelimit/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/rbac/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/retry/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/streaming/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/telemetry/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/test/.gitkeep +0 -0
- package/.sdk/tm/haskell/src/feature/timeout/.gitkeep +0 -0
- package/.sdk/tm/haskell/test/Harness.hs +281 -0
- package/.sdk/tm/haskell/test/OmniResolver.hs +252 -0
- package/.sdk/tm/haskell/test/Runner.hs +49 -0
- package/.sdk/tm/haskell/test/StructCorpus.hs +449 -0
- package/.sdk/tm/haskell/test/TCustomUtility.hs +38 -0
- package/.sdk/tm/haskell/test/TFeature.hs +794 -0
- package/.sdk/tm/haskell/test/TNetsim.hs +50 -0
- package/.sdk/tm/haskell/test/TPipeline.hs +334 -0
- package/.sdk/tm/haskell/test/TPrimaryCorpus.hs +263 -0
- package/.sdk/tm/haskell/test/TPrimaryUtility.hs +386 -0
- package/.sdk/tm/haskell/test/Testutil.hs +59 -0
- package/.sdk/tm/haskell/test/vendor/omni/Omni.hs +1147 -0
- package/.sdk/tm/lean/LICENSE +21 -0
- package/.sdk/tm/lean/Makefile +32 -0
- package/.sdk/tm/lean/VERSION +1 -0
- package/.sdk/tm/lean/src/SdkFeature.lean +171 -0
- package/.sdk/tm/lean/src/SdkFeatures.lean +787 -0
- package/.sdk/tm/lean/src/SdkJson.lean +134 -0
- package/.sdk/tm/lean/src/SdkRuntime.lean +374 -0
- package/.sdk/tm/lean/src/SdkUtility.lean +809 -0
- package/.sdk/tm/lean/src/VoxgigStruct.lean +2880 -0
- package/.sdk/tm/lean/src/Vregex.lean +412 -0
- package/.sdk/tm/lean/src/feature/README.md +5 -0
- package/.sdk/tm/lean/src/feature/audit/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/base/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/cache/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/clienttrack/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/cost/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/debug/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/idempotency/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/log/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/metrics/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/netsim/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/paging/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/proxy/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/ratelimit/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/rbac/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/retry/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/streaming/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/telemetry/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/test/.gitkeep +0 -0
- package/.sdk/tm/lean/src/feature/timeout/.gitkeep +0 -0
- package/.sdk/tm/lean/test/OmniResolver.lean +358 -0
- package/.sdk/tm/lean/test/OmniSmoke.lean +174 -0
- package/.sdk/tm/lean/test/StructCorpus.lean +368 -0
- package/.sdk/tm/lean/test/TFeature.lean +281 -0
- package/.sdk/tm/lean/test/TPrimaryUtility.lean +227 -0
- package/.sdk/tm/lean/test/vendor/omni/Omni.lean +997 -0
- package/LICENSE +21 -0
- package/README.md +104 -0
- package/package.json +78 -0
- package/sdkgen-package.json +22 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
main: kit: target: dart: {
|
|
2
|
+
|
|
3
|
+
title: Dart
|
|
4
|
+
ext: dart
|
|
5
|
+
comment: line: "//"
|
|
6
|
+
module: name: '$$name$$'
|
|
7
|
+
base: 'BASE'
|
|
8
|
+
srcfeature: false
|
|
9
|
+
|
|
10
|
+
# Applicability (docs/design/feature-tags.md). A vendored sekreto port
|
|
11
|
+
# lives in this target's feature container (tm/dart/lib/feature/secrets/),
|
|
12
|
+
# so a feature that resolves secrets through sekreto can apply here.
|
|
13
|
+
provides: { sekreto: true }
|
|
14
|
+
|
|
15
|
+
# Files earlier toolchains generated that this target has RETIRED
|
|
16
|
+
# (vendor-tag rollout): the fused corpus runner and the second, independent
|
|
17
|
+
# struct-corpus engine, both replaced by test/omni.dart over the vendored
|
|
18
|
+
# @voxgig/omni port. `doctor` reports leftovers; `doctor prune` deletes
|
|
19
|
+
# them (jostraca only ever writes, it cannot delete).
|
|
20
|
+
superseded: [
|
|
21
|
+
'test/runner.dart'
|
|
22
|
+
'test/struct_corpus.dart'
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
deps: &: {
|
|
26
|
+
kind: *'prod' | string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# struct utility is vendored under tm/dart/lib/utility/voxgig_struct.dart -
|
|
30
|
+
# the runtime is dependency-free (dart:io HttpClient + dart:convert only).
|
|
31
|
+
deps: {}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
main: kit: feature: &: target: dart: deps: &: {
|
|
36
|
+
kind: *'prod' | string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# Publication: pub.dev registry (declared, publish pending — git-tag only).
|
|
41
|
+
#
|
|
42
|
+
# `target add <t>` OVERWRITES this file, so a project must never set its
|
|
43
|
+
# publication values here — voxgig-solardemo-sdk lost its pinned npm package
|
|
44
|
+
# name exactly that way. Set them in the project's own overlay
|
|
45
|
+
# (`model/project.aon`), which create-sdkgen creates once and never
|
|
46
|
+
# overwrites — NOT `model/sdk.aon`, which it rewrites on every scaffold.
|
|
47
|
+
#
|
|
48
|
+
# For that to work this file must LEAVE THOSE KEYS UNSET: in aontu a concrete
|
|
49
|
+
# value does not yield to another concrete value, it CONFLICTS, and two
|
|
50
|
+
# defaults conflict too. The schema (@voxgig/sdkgen/model/sdkgen.aon)
|
|
51
|
+
# already defaults `tag.active`, `registry.state`, `registry.active` and
|
|
52
|
+
# `registry.package`, so a project's concrete value wins over the default and
|
|
53
|
+
# repeating them here would only take that away.
|
|
54
|
+
#
|
|
55
|
+
# What remains below is per-target registry IDENTITY, which is not a project
|
|
56
|
+
# choice and stays concrete.
|
|
57
|
+
main: kit: target: dart: publish: {
|
|
58
|
+
registry: {
|
|
59
|
+
name: 'pub.dev'
|
|
60
|
+
url: 'https://pub.dev'
|
|
61
|
+
vault: { alias: 'pubdev', env: 'PUB_CREDENTIALS' }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
main: kit: target: haskell: {
|
|
3
|
+
|
|
4
|
+
title: Haskell
|
|
5
|
+
ext: hs
|
|
6
|
+
comment: line: "--"
|
|
7
|
+
module: name: '$$name$$'
|
|
8
|
+
base: 'BASE'
|
|
9
|
+
srcfeature: false
|
|
10
|
+
|
|
11
|
+
# Entities are generic (config-driven F.makeEntity), so no per-entity or
|
|
12
|
+
# per-feature generated modules. The readme + agentguide phases are
|
|
13
|
+
# model-driven (they read the API model directly, not per-entity generated
|
|
14
|
+
# code), so they are active and produce the docs; entity/feature generation
|
|
15
|
+
# stays off.
|
|
16
|
+
phase: {
|
|
17
|
+
entity: { active: false }
|
|
18
|
+
feature: { active: false }
|
|
19
|
+
readme: { active: true }
|
|
20
|
+
agentguide: { active: true }
|
|
21
|
+
test: { active: true }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
deps: &: {
|
|
25
|
+
kind: *'prod' | string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
# struct is vendored under src/ (VoxgigStruct.hs + Vregex.hs) — the runtime
|
|
29
|
+
# is dependency-free: it compiles with the stock ghc (base + containers, the
|
|
30
|
+
# GHC boot libraries), no cabal packages, no stack. So there are no manifest
|
|
31
|
+
# dependencies.
|
|
32
|
+
deps: {}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
main: kit: feature: &: target: haskell: deps: &: {
|
|
37
|
+
kind: *'prod' | string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# Publication: Hackage registry (declared, publish pending — git-tag only).
|
|
42
|
+
#
|
|
43
|
+
# `target add <t>` OVERWRITES this file, so a project must never set its
|
|
44
|
+
# publication values here — voxgig-solardemo-sdk lost its pinned npm package
|
|
45
|
+
# name exactly that way. Set them in the project's own model
|
|
46
|
+
# (`model/sdk.aontu`), where they survive a resync.
|
|
47
|
+
#
|
|
48
|
+
# For that to work this file must LEAVE THOSE KEYS UNSET: in aontu a concrete
|
|
49
|
+
# value does not yield to another concrete value, it CONFLICTS, and two
|
|
50
|
+
# defaults conflict too. The schema (@voxgig/sdkgen/model/sdkgen.aontu)
|
|
51
|
+
# already defaults `tag.active`, `registry.state`, `registry.active` and
|
|
52
|
+
# `registry.package`, so a project's concrete value wins over the default and
|
|
53
|
+
# repeating them here would only take that away.
|
|
54
|
+
#
|
|
55
|
+
# What remains below is per-target registry IDENTITY, which is not a project
|
|
56
|
+
# choice and stays concrete.
|
|
57
|
+
main: kit: target: haskell: publish: {
|
|
58
|
+
registry: {
|
|
59
|
+
name: 'hackage'
|
|
60
|
+
url: 'https://hackage.haskell.org'
|
|
61
|
+
vault: { alias: 'hackage', env: 'HACKAGE_TOKEN' }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# Feature source is NOT trimmed to the model's selection here: every
|
|
67
|
+
# feature lives inside a single generated module (src/SdkFeatures.hs), not
|
|
68
|
+
# in per-feature source files, so there is nothing per-feature to leave
|
|
69
|
+
# out. Trimming waits on that module becoming model-driven.
|
|
70
|
+
main: kit: target: haskell: feature: {
|
|
71
|
+
trim: false
|
|
72
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
|
|
2
|
+
main: kit: target: lean: {
|
|
3
|
+
|
|
4
|
+
title: Lean
|
|
5
|
+
ext: lean
|
|
6
|
+
comment: line: "--"
|
|
7
|
+
module: name: '$$name$$'
|
|
8
|
+
base: 'BASE'
|
|
9
|
+
srcfeature: false
|
|
10
|
+
|
|
11
|
+
# RETIREMENT. Retired by the move to the vendored @voxgig/omni corpus
|
|
12
|
+
# runner (vendor-tag rollout): NOTHING, deliberately, and the empty list
|
|
13
|
+
# says so rather than leaving the key off.
|
|
14
|
+
#
|
|
15
|
+
# Lean's corpus ENGINE was never a file of its own. It lived FUSED inside
|
|
16
|
+
# test/StructCorpus.lean (its own JSON reader, fixJson, eqv, matchval,
|
|
17
|
+
# doMatch, resolveArgs, checkResult, handleError and runSet) and again
|
|
18
|
+
# inside test/TPrimaryUtility.lean (runset, deepEq, strCheck, matchDeep).
|
|
19
|
+
# Both files were rewritten IN PLACE onto test/OmniResolver.lean, so both
|
|
20
|
+
# KEEP THEIR NAMES, the `structcorpus` and `primary` lean_exe roots are
|
|
21
|
+
# unchanged, and no emitted call site needed churn. test/TFeature.lean is a
|
|
22
|
+
# hand-written behavioural suite, not a corpus runner, and is RETAINED;
|
|
23
|
+
# test/Runner.lean (generated) is the entity/pipeline lane, likewise
|
|
24
|
+
# RETAINED despite the name. There is therefore no whole-file leftover for
|
|
25
|
+
# `doctor` to report or `doctor prune` to delete.
|
|
26
|
+
superseded: []
|
|
27
|
+
|
|
28
|
+
# Entities are generic (config-driven F.makeEntity), so no per-entity or
|
|
29
|
+
# per-feature generated modules — the same model as the Haskell target. The
|
|
30
|
+
# readme + agentguide phases read the API model directly (not per-entity
|
|
31
|
+
# generated code), so they are active; entity/feature generation stays off.
|
|
32
|
+
phase: {
|
|
33
|
+
entity: { active: false }
|
|
34
|
+
feature: { active: false }
|
|
35
|
+
readme: { active: true }
|
|
36
|
+
agentguide: { active: true }
|
|
37
|
+
test: { active: true }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
deps: &: {
|
|
41
|
+
kind: *'prod' | string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# struct is vendored under src/ (VoxgigStruct.lean + Vregex.lean) and the
|
|
45
|
+
# runtime is dependency-free: it compiles with the stock Lean 4 toolchain
|
|
46
|
+
# (only the built-in prelude + Std), no Lake package dependencies. The HTTP
|
|
47
|
+
# transport shells out to `curl` via IO.Process, so there are no manifest
|
|
48
|
+
# deps.
|
|
49
|
+
deps: {}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
main: kit: feature: &: target: lean: deps: &: {
|
|
54
|
+
kind: *'prod' | string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# Publication: Reservoir (Lean package index) — declared, publish pending
|
|
59
|
+
# (git-tag only for now).
|
|
60
|
+
#
|
|
61
|
+
# `target add <t>` OVERWRITES this file, so a project must never set its
|
|
62
|
+
# publication values here — voxgig-solardemo-sdk lost its pinned npm package
|
|
63
|
+
# name exactly that way. Set them in the project's own overlay
|
|
64
|
+
# (`model/project.aon`), which create-sdkgen creates once and never
|
|
65
|
+
# overwrites — NOT `model/sdk.aon`, which it rewrites on every scaffold.
|
|
66
|
+
#
|
|
67
|
+
# For that to work this file must LEAVE THOSE KEYS UNSET: in aontu a concrete
|
|
68
|
+
# value does not yield to another concrete value, it CONFLICTS, and two
|
|
69
|
+
# defaults conflict too. The schema (@voxgig/sdkgen/model/sdkgen.aon)
|
|
70
|
+
# already defaults `tag.active`, `registry.state`, `registry.active` and
|
|
71
|
+
# `registry.package`, so a project's concrete value wins over the default and
|
|
72
|
+
# repeating them here would only take that away.
|
|
73
|
+
#
|
|
74
|
+
# What remains below is per-target registry IDENTITY, which is not a project
|
|
75
|
+
# choice and stays concrete.
|
|
76
|
+
main: kit: target: lean: publish: {
|
|
77
|
+
registry: {
|
|
78
|
+
name: 'reservoir'
|
|
79
|
+
url: 'https://reservoir.lean-lang.org'
|
|
80
|
+
vault: { alias: 'reservoir', env: 'RESERVOIR_TOKEN' }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# Feature source is NOT trimmed to the model's selection here: every
|
|
86
|
+
# feature lives inside a single generated module (src/SdkFeatures.lean),
|
|
87
|
+
# not in per-feature source files, so there is nothing per-feature to
|
|
88
|
+
# leave out. Trimming waits on that module becoming model-driven.
|
|
89
|
+
main: kit: target: lean: feature: {
|
|
90
|
+
trim: false
|
|
91
|
+
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
|
|
2
|
+
import * as Path from 'node:path'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
File,
|
|
7
|
+
Fragment,
|
|
8
|
+
Line,
|
|
9
|
+
cmp,
|
|
10
|
+
configDefinition,
|
|
11
|
+
configReprSetting,
|
|
12
|
+
each,
|
|
13
|
+
isConfigData,
|
|
14
|
+
isAuthActive,
|
|
15
|
+
resolveAuthPrefix,
|
|
16
|
+
targetFeatures,
|
|
17
|
+
} from '@voxgig/sdkgen'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
import {
|
|
21
|
+
KIT,
|
|
22
|
+
Model,
|
|
23
|
+
getModelPath,
|
|
24
|
+
nom,
|
|
25
|
+
} from '@voxgig/apidef'
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
import {
|
|
29
|
+
dartStringLiteral,
|
|
30
|
+
dartValue,
|
|
31
|
+
} from './utility_dart'
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
const Config = cmp(async function Config(props: any) {
|
|
35
|
+
const ctx$ = props.ctx$
|
|
36
|
+
const target = props.target
|
|
37
|
+
|
|
38
|
+
const model: Model = ctx$.model
|
|
39
|
+
|
|
40
|
+
const entity = getModelPath(model, `main.${KIT}.entity`)
|
|
41
|
+
// Gated by the applicability tags, so this target never imports or
|
|
42
|
+
// registers a feature it has no source for. One rule, one place:
|
|
43
|
+
// helpers/applicability.
|
|
44
|
+
const feature = targetFeatures(model, target)
|
|
45
|
+
|
|
46
|
+
const ff = Path.normalize(__dirname + '/../../../src/cmp/dart/fragment/')
|
|
47
|
+
|
|
48
|
+
const headers = getModelPath(model, `main.${KIT}.config.headers`) || {}
|
|
49
|
+
|
|
50
|
+
const authActive = isAuthActive(model)
|
|
51
|
+
// config.auth.prefix override -> spec-derived info.security.prefix -> 'Bearer'
|
|
52
|
+
const authPrefix = resolveAuthPrefix(model)
|
|
53
|
+
const authBlock = authActive
|
|
54
|
+
? `'auth': <String, dynamic>{
|
|
55
|
+
'prefix': '${authPrefix}',
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
`
|
|
59
|
+
: ''
|
|
60
|
+
|
|
61
|
+
// Read the base URL here rather than leaving it to a `$$...$$` stdrep
|
|
62
|
+
// placeholder in the fragment. stdrep can only substitute a path the model
|
|
63
|
+
// actually has: a model with no `info.servers` left the placeholder itself in
|
|
64
|
+
// the generated source, so `options.base` came out as the literal string
|
|
65
|
+
// '$main.kit.info.servers.0.url$'. Reading it explicitly yields '' in that
|
|
66
|
+
// case, which is what every other target already emits, and is identical to
|
|
67
|
+
// the old output whenever the model does define a server. Same defect, and
|
|
68
|
+
// same fix, as ts and js.
|
|
69
|
+
let baseUrl = ''
|
|
70
|
+
try {
|
|
71
|
+
baseUrl = getModelPath(model, `main.${KIT}.info.servers.0.url`)
|
|
72
|
+
} catch (_e) { }
|
|
73
|
+
|
|
74
|
+
// The same config as an OBJECT, built by the shared helper so this target's
|
|
75
|
+
// literal and the data that replaces it above the threshold are the same
|
|
76
|
+
// config by construction. The JSON is what the threshold is measured on -
|
|
77
|
+
// emitted source size varies by language, the model does not. Passing
|
|
78
|
+
// target.name opts this target into the main slug/version/target identity
|
|
79
|
+
// fields (read by station's descriptor - see configDefinition).
|
|
80
|
+
const { def: configDef, json: configJson } = configDefinition(model, target.name)
|
|
81
|
+
const asData = isConfigData(configJson, configReprSetting(model))
|
|
82
|
+
|
|
83
|
+
File({ name: 'Config.' + target.ext }, () => {
|
|
84
|
+
|
|
85
|
+
// ABOVE THE THRESHOLD: emit the model as DATA.
|
|
86
|
+
//
|
|
87
|
+
// `jsonDecode` yields exactly what the literal declared - Map<String,
|
|
88
|
+
// dynamic> for objects, List<dynamic> for arrays, and int for a whole
|
|
89
|
+
// number where Dart source would also have written an int - so the fields
|
|
90
|
+
// keep their types and callers cannot tell the representations apart.
|
|
91
|
+
if (asData) {
|
|
92
|
+
Fragment({
|
|
93
|
+
from: ff + 'Config.data.fragment.dart',
|
|
94
|
+
|
|
95
|
+
replace: {
|
|
96
|
+
...ctx$.stdrep,
|
|
97
|
+
|
|
98
|
+
'// #ImportFeatures': () => each(feature, (f: any) => {
|
|
99
|
+
Line(`import 'feature/${f.name}/${nom(f, 'Name')}Feature.dart';`)
|
|
100
|
+
}),
|
|
101
|
+
|
|
102
|
+
'// #FeatureClasses': () => each(feature, (f: any) => {
|
|
103
|
+
Line(` '${f.name}': () => ${nom(f, 'Name')}Feature(),`)
|
|
104
|
+
}),
|
|
105
|
+
|
|
106
|
+
'// #ImportPlugins': () => pluginImports(feature),
|
|
107
|
+
|
|
108
|
+
'// #FeaturePlugins': () => pluginDefs(feature),
|
|
109
|
+
|
|
110
|
+
"'CONFIGJSON'": dartStringLiteral(configJson),
|
|
111
|
+
}
|
|
112
|
+
})
|
|
113
|
+
return
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
Fragment({
|
|
117
|
+
from: ff + 'Config.fragment.dart',
|
|
118
|
+
|
|
119
|
+
replace: {
|
|
120
|
+
|
|
121
|
+
// Config.fragment.dart carries `'name': 'ProjectName'` — without the
|
|
122
|
+
// standard replacements the generated SDK reports "ProjectName" as its
|
|
123
|
+
// own name at runtime. Every sibling dart component already spreads
|
|
124
|
+
// these; this one did not.
|
|
125
|
+
...ctx$.stdrep,
|
|
126
|
+
|
|
127
|
+
// Identity beyond the camel Name: slug/version/target (station
|
|
128
|
+
// descriptor inputs). Values from configDefinition's def, not
|
|
129
|
+
// re-derived here, so the literal rep and the data rep cannot
|
|
130
|
+
// disagree (the Config_ts #MainMeta discipline).
|
|
131
|
+
'// #MainMeta': () => {
|
|
132
|
+
Line(` 'slug': ${dartValue(configDef.main.slug)},`)
|
|
133
|
+
Line(` 'version': ${dartValue(configDef.main.version)},`)
|
|
134
|
+
Line(` 'target': ${dartValue(configDef.main.target)},`)
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
// The whole options map from the canonical definition. Assembling it
|
|
138
|
+
// slot by slot lost `options.server` entirely, so a spec with a
|
|
139
|
+
// templated server URL described a different config either side of the
|
|
140
|
+
// threshold.
|
|
141
|
+
"'OPTIONSMAP'": dartValue(configDef.options, 1),
|
|
142
|
+
|
|
143
|
+
'// #ImportFeatures': () => each(feature, (f: any) => {
|
|
144
|
+
Line(`import 'feature/${f.name}/${nom(f, 'Name')}Feature.dart';`)
|
|
145
|
+
}),
|
|
146
|
+
|
|
147
|
+
'// #FeatureClasses': () => each(feature, (f: any) => {
|
|
148
|
+
// Trailing comma: the map has one entry per feature, so entries
|
|
149
|
+
// must be comma-separated (a single feature hid this until now).
|
|
150
|
+
Line(` '${f.name}': () => ${nom(f, 'Name')}Feature(),`)
|
|
151
|
+
}),
|
|
152
|
+
|
|
153
|
+
'// #ImportPlugins': () => pluginImports(feature),
|
|
154
|
+
|
|
155
|
+
'// #FeaturePlugins': () => pluginDefs(feature),
|
|
156
|
+
|
|
157
|
+
// Rendered from configDefinition's def, not from f.config, so the
|
|
158
|
+
// literal carries the feature's `transport` role (station design
|
|
159
|
+
// §8.4) beside its options and cannot drift from the data rep.
|
|
160
|
+
'// #FeatureConfigs': () => each(feature, (f: any) => {
|
|
161
|
+
Line(` '${f.name}': ${dartValue(configDef.feature[f.name], 2)},`)
|
|
162
|
+
}),
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
'// #EntityConfigs': () => each(entity, (entity: any) => {
|
|
166
|
+
Line(` '${entity.name}': <String, dynamic>{},`)
|
|
167
|
+
}),
|
|
168
|
+
|
|
169
|
+
// configDefinition's `def.entity` verbatim, NOT rebuilt here. This
|
|
170
|
+
// reduce was a second copy of that function's entityDefs loop, and
|
|
171
|
+
// when configDefinition started reconstructing a point's `parts`
|
|
172
|
+
// from apidef's segment vector (its ADR-003), only the data
|
|
173
|
+
// representation got it — the literal one emitted empty paths. The
|
|
174
|
+
// config-repr equivalence test caught it, which is what it is for.
|
|
175
|
+
"'ENTITYMAP'": dartValue(configDef.entity, 1),
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
// PLUGIN DEFINITION IMPORTS AND THE FEATURE_PLUGINS MAP (the dart peer of
|
|
183
|
+
// Config_ts's pluginImports/pluginDefs and Config_go's featurePlugins).
|
|
184
|
+
//
|
|
185
|
+
// Upstream sekreto replaced its self-registration registry with
|
|
186
|
+
// voxgig/plugin definitions: a provider kind the caller did not pass in via
|
|
187
|
+
// `plugins: [...]` is unknown to that Sekreto. So Config imports each active
|
|
188
|
+
// plugin's exported Definition BY NAME - the model's per-target `def` map,
|
|
189
|
+
// a plain top-level `final Definition` in this port - and hands the list to
|
|
190
|
+
// the feature through FEATURE_PLUGINS.
|
|
191
|
+
//
|
|
192
|
+
// The `def` map is declared in the model rather than derived from filenames
|
|
193
|
+
// because one file may export several definitions (sekreto's aws.dart
|
|
194
|
+
// exports awssecrets AND awsparams), which is exactly why the imports are
|
|
195
|
+
// grouped by PATH here: two `show` clauses for one library would be two
|
|
196
|
+
// imports of the same file.
|
|
197
|
+
function pluginImports(feature: any) {
|
|
198
|
+
each(feature, (f: any) => {
|
|
199
|
+
// path -> [symbol, ...], so one import line serves a two-definition
|
|
200
|
+
// library.
|
|
201
|
+
const bypath: Record<string, string[]> = {}
|
|
202
|
+
|
|
203
|
+
each(f.plugin, (plugin: any) => {
|
|
204
|
+
// Filter on `active` HERE rather than trusting the feature object to
|
|
205
|
+
// arrive filtered. Whether a model path was read with `only_active`
|
|
206
|
+
// varies by call site, and getting it wrong in this direction emits
|
|
207
|
+
// an import for a file the plugin trim just deleted - which
|
|
208
|
+
// `dart analyze` fails the whole package on, not merely an SDK
|
|
209
|
+
// carrying too much. (Config_ts documents the same trap.)
|
|
210
|
+
if (false === plugin.active || null == plugin.active) return
|
|
211
|
+
|
|
212
|
+
for (const [sym, one] of Object.entries(plugin.def?.dart || {})) {
|
|
213
|
+
const path = String(one)
|
|
214
|
+
; (bypath[path] = bypath[path] || []).push(sym)
|
|
215
|
+
}
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
for (const path of Object.keys(bypath).sort()) {
|
|
219
|
+
// The model's paths are target-root-relative (`lib/feature/...`) and
|
|
220
|
+
// Config.dart is itself in `lib/`, so the import spec is that path
|
|
221
|
+
// with the leading `lib/` dropped.
|
|
222
|
+
const spec = path.replace(/^lib\//, '')
|
|
223
|
+
const syms = Array.from(new Set(bypath[path])).sort()
|
|
224
|
+
Line(`import '${spec}' show ${syms.join(', ')};`)
|
|
225
|
+
}
|
|
226
|
+
})
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
// The FEATURE_PLUGINS entries: one line per feature that has any active
|
|
231
|
+
// plugin definitions, listing the imported symbols.
|
|
232
|
+
function pluginDefs(feature: any) {
|
|
233
|
+
each(feature, (f: any) => {
|
|
234
|
+
const syms: string[] = []
|
|
235
|
+
each(f.plugin, (plugin: any) => {
|
|
236
|
+
if (false === plugin.active || null == plugin.active) return
|
|
237
|
+
syms.push(...Object.keys(plugin.def?.dart || {}))
|
|
238
|
+
})
|
|
239
|
+
if (0 < syms.length) {
|
|
240
|
+
Line(` '${f.name}': [${Array.from(new Set(syms)).sort().join(', ')}],`)
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
export {
|
|
247
|
+
Config
|
|
248
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
import * as Path from 'node:path'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
cmp,
|
|
6
|
+
File, Fragment,
|
|
7
|
+
} from '@voxgig/sdkgen'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const EntityBase = cmp(async function EntityBase(props: any) {
|
|
12
|
+
|
|
13
|
+
// Needs type: target object
|
|
14
|
+
const { target } = props
|
|
15
|
+
const { model } = props.ctx$
|
|
16
|
+
|
|
17
|
+
File({ name: model.const.Name + 'EntityBase.' + target.ext }, () => {
|
|
18
|
+
|
|
19
|
+
Fragment(
|
|
20
|
+
{
|
|
21
|
+
from:
|
|
22
|
+
Path.normalize(__dirname + '/../../../src/cmp/dart/fragment/EntityBase.fragment.dart'),
|
|
23
|
+
|
|
24
|
+
replace: {
|
|
25
|
+
...props.ctx$.stdrep,
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
EntityBase
|
|
34
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
cmp, camelify,
|
|
4
|
+
Content, Fragment
|
|
5
|
+
} from '@voxgig/sdkgen'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
const EntityOperation = cmp(function Operation(props: any) {
|
|
9
|
+
const { model } = props.ctx$
|
|
10
|
+
const { ff, opname, entity, entrep } = props
|
|
11
|
+
|
|
12
|
+
let { indent } = props
|
|
13
|
+
|
|
14
|
+
indent = indent.substring(2)
|
|
15
|
+
if ('' == indent) {
|
|
16
|
+
indent = undefined
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Fragment({
|
|
20
|
+
from: ff + '/Entity' + camelify(opname) + 'Op.fragment.dart',
|
|
21
|
+
eject: ['// EJECT-START', '// EJECT-END'],
|
|
22
|
+
indent,
|
|
23
|
+
replace: {
|
|
24
|
+
...entrep,
|
|
25
|
+
SdkName: model.const.Name,
|
|
26
|
+
EntityName: entity.Name,
|
|
27
|
+
entityname: entity.name,
|
|
28
|
+
'#Feature-Hook': ({ name, indent }: any) =>
|
|
29
|
+
Content({ indent }, `
|
|
30
|
+
fres = featureHook(ctx, '${name}');
|
|
31
|
+
if (fres is Future) {
|
|
32
|
+
await fres;
|
|
33
|
+
}
|
|
34
|
+
`)
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
EntityOperation
|
|
43
|
+
}
|