Skip to content

Commit

Permalink
fix for dmno resolve --format=json
Browse files Browse the repository at this point in the history
  • Loading branch information
theoephraim committed Nov 26, 2024
1 parent 1d8ff1b commit c540fc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-gifts-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"dmno": patch
---

fix dmno resolve --format=json
13 changes: 6 additions & 7 deletions packages/core/src/cli/commands/resolve.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ program.action(async (opts: {
checkForSchemaErrors(workspace);
checkForConfigErrors(service, { showAll: opts?.showAll });

async function getExposedConfigValues() {
const injectedJson = await ctx.dmnoServer.makeRequest('getInjectedJson', service.serviceName);
let exposedConfig = service.configNodes;
function getExposedConfigValues() {
const values = {} as Record<string, any>;
for (const itemKey in injectedJson) {
if (itemKey.startsWith('$')) continue;
if (injectedJson[itemKey].value && opts.public) continue;
values[itemKey] = injectedJson[itemKey].value;
for (const itemKey in service.configNodes) {
const item = service.configNodes[itemKey];
// --public option skips anything sensitive
if (item.isSensitive && opts.public) continue;
values[itemKey] = item.resolvedValue;
}
return values;
}
Expand Down

0 comments on commit c540fc1

Please sign in to comment.