label-printer 0.5.2 → 0.5.4

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/dist/index.d.mts CHANGED
@@ -91,9 +91,9 @@ declare abstract class Command {
91
91
  }
92
92
 
93
93
  /**
94
- * A utility class that helps groupping commands together
95
- * Should be implemnted with a specific command type to ensure only commands for the same lagnuage are
96
- * groupped together
94
+ * A utility class that helps grouping commands together
95
+ * Should be implemented with a specific command type to ensure only commands for the same language are
96
+ * grouped together
97
97
  */
98
98
  declare abstract class CommandGroup<T extends Command> extends Command {
99
99
  private commands;
package/dist/index.d.ts CHANGED
@@ -91,9 +91,9 @@ declare abstract class Command {
91
91
  }
92
92
 
93
93
  /**
94
- * A utility class that helps groupping commands together
95
- * Should be implemnted with a specific command type to ensure only commands for the same lagnuage are
96
- * groupped together
94
+ * A utility class that helps grouping commands together
95
+ * Should be implemented with a specific command type to ensure only commands for the same language are
96
+ * grouped together
97
97
  */
98
98
  declare abstract class CommandGroup<T extends Command> extends Command {
99
99
  private commands;
package/dist/index.js CHANGED
@@ -152,7 +152,7 @@ var CommandGroup = class extends Command {
152
152
  });
153
153
  }
154
154
  get commandString() {
155
- return "";
155
+ return this.commands.map((c) => c.commandString).join("\n");
156
156
  }
157
157
  };
158
158
 
@@ -1637,7 +1637,8 @@ var Label = class extends Printable {
1637
1637
  }
1638
1638
  commandForLanguage(language, config) {
1639
1639
  return __async(this, null, function* () {
1640
- const commandList = yield Promise.all(this.fields.map((field) => field.commandForLanguage(language, config)));
1640
+ const configuration = config != null ? config : this.printConfig;
1641
+ const commandList = yield Promise.all(this.fields.map((field) => field.commandForLanguage(language, configuration)));
1641
1642
  return this.commandGeneratorFor(language).commandGroup(commandList);
1642
1643
  });
1643
1644
  }