diff --git a/.changeset/calm-gifts-laugh.md b/.changeset/calm-gifts-laugh.md new file mode 100644 index 00000000..3ec1f052 --- /dev/null +++ b/.changeset/calm-gifts-laugh.md @@ -0,0 +1,5 @@ +--- +"dmno": patch +--- + +fix dmno resolve --format=json diff --git a/packages/core/src/cli/commands/resolve.command.ts b/packages/core/src/cli/commands/resolve.command.ts index f0ed5623..8d2e5483 100644 --- a/packages/core/src/cli/commands/resolve.command.ts +++ b/packages/core/src/cli/commands/resolve.command.ts @@ -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; - 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; }