@team-supercharge/oasg 13.2.0-feature-csharp-functions-100d975c.0 → 13.2.0-feature-csharp-functions-win-83158784.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-supercharge/oasg",
3
- "version": "13.2.0-feature-csharp-functions-100d975c.0",
3
+ "version": "13.2.0-feature-csharp-functions-win-83158784.0",
4
4
  "description": "Node-based tool to lint OpenAPI documents and generate clients, servers and documentation from them",
5
5
  "author": "Supercharge",
6
6
  "license": "MIT",
package/targets/common.sh CHANGED
@@ -23,12 +23,11 @@ templateDir=$9
23
23
 
24
24
  echo -e "\n=====\n version:\t$version\n binary:\t$binary\n configFile:\t$configFile\n targetId:\t$targetId\n generatorId:\t$generatorId\n openApiFile:\t$openApiFile\n formatter:\t$formatterBinary\n preRelease:\t$preRelease\n templateDir:\t$templateDir\n ---"
25
25
 
26
- target=$(jq -r --arg targetId "$targetId" '.targets[] | select(.id==$targetId) | del(.id, .type, .source, .generator, .generatorId, .templateDir)' "$configFile")
26
+ blacklist='.id, .type, .source, .generator, .generatorId, .templateDir'
27
27
 
28
- for paramName in $(echo "$target" | jq -r 'keys | .[]'); do
29
- result=$(echo "$target" | jq -r --arg paramName "$paramName" '.[$paramName]')
30
- echo -e " $paramName:\t$result"
31
- eval $paramName="'$result'"
32
- done
28
+ params=$(jq -r ".targets[] | select(.id == \"$targetId\") | del($blacklist) | to_entries | map(\"\(.key)=\(.value | @sh);\") | .[]" $configFile)
29
+
30
+ echo "$params"
31
+ eval $params
33
32
 
34
33
  echo -e "=====\n"