lingo.dev 0.117.9 → 0.117.10

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/build/cli.cjs CHANGED
@@ -4150,6 +4150,9 @@ function createMjmlLoader() {
4150
4150
  return createLoader({
4151
4151
  async pull(locale, input2) {
4152
4152
  const result = {};
4153
+ if (!input2 || input2.trim() === "") {
4154
+ return result;
4155
+ }
4153
4156
  try {
4154
4157
  const parsed = await _xml2js.parseStringPromise.call(void 0, input2, {
4155
4158
  explicitArray: true,
@@ -4196,8 +4199,11 @@ function createMjmlLoader() {
4196
4199
  return result;
4197
4200
  },
4198
4201
  async push(locale, data, originalInput) {
4202
+ if (!originalInput || originalInput.trim() === "") {
4203
+ return originalInput || "";
4204
+ }
4199
4205
  try {
4200
- const parsed = await _xml2js.parseStringPromise.call(void 0, originalInput || "", {
4206
+ const parsed = await _xml2js.parseStringPromise.call(void 0, originalInput, {
4201
4207
  explicitArray: true,
4202
4208
  explicitChildren: true,
4203
4209
  preserveChildrenOrder: true,
@@ -4339,11 +4345,10 @@ function convertDomToXmlNode(domNode) {
4339
4345
  return null;
4340
4346
  }
4341
4347
  function serializeMjml(parsed) {
4342
- const xmlDec = '<?xml version="1.0" encoding="UTF-8"?>\n';
4343
4348
  const rootKey = Object.keys(parsed).find((key) => !key.startsWith("_") && !key.startsWith("$"));
4344
4349
  const rootNode = rootKey ? parsed[rootKey] : parsed;
4345
4350
  const body = serializeElement2(rootNode);
4346
- return xmlDec + body;
4351
+ return body;
4347
4352
  }
4348
4353
  function serializeElement2(node, indent2 = "") {
4349
4354
  if (!node) {
@@ -14599,7 +14604,7 @@ async function renderHero2() {
14599
14604
  // package.json
14600
14605
  var package_default = {
14601
14606
  name: "lingo.dev",
14602
- version: "0.117.9",
14607
+ version: "0.117.10",
14603
14608
  description: "Lingo.dev CLI",
14604
14609
  private: false,
14605
14610
  publishConfig: {