@braze/sanity-plugin-ai-translation 0.2.36 → 0.2.39

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.js CHANGED
@@ -2947,15 +2947,16 @@ ${protectedPhrases.join(", ")}`, buildStyleGuideSection = (globalPrompt, localeP
2947
2947
  originalStructure,
2948
2948
  registry: globalTransformRegistry,
2949
2949
  schemaType: sourceDocument._type
2950
- });
2951
- devLog.info("Before restoring excluded fields", {
2950
+ }), excludedValuesToRestore = { ...excludedValues };
2951
+ delete excludedValuesToRestore[languageFieldName], devLog.info("Before restoring excluded fields", {
2952
2952
  documentId: sourceDocument._id,
2953
2953
  excludedFieldCount: Object.keys(excludedValues).length,
2954
2954
  excludedValuesKeys: Object.keys(excludedValues),
2955
+ languageFieldExcluded: languageFieldName in excludedValues,
2955
2956
  transformedResultHasTitle: "title" in transformedResult,
2956
2957
  transformedResultTitle: transformedResult.title
2957
2958
  });
2958
- const finalDoc = restoreExcludedFields(transformedResult, excludedValues);
2959
+ const finalDoc = restoreExcludedFields(transformedResult, excludedValuesToRestore);
2959
2960
  devLog.info("After restoring excluded fields", {
2960
2961
  documentId: sourceDocument._id,
2961
2962
  finalDocHasTitle: "title" in finalDoc,
@@ -3623,7 +3624,7 @@ ${protectedPhrases.join(", ")}`, buildStyleGuideSection = (globalPrompt, localeP
3623
3624
  /* @__PURE__ */ jsxs(Code, { size: 1, children: [
3624
3625
  job._type,
3625
3626
  " \u2014 ",
3626
- job._id.slice(-6)
3627
+ job._id?.slice(-6) || "unknown"
3627
3628
  ] }),
3628
3629
  !["completed", "skipped", "error"].includes(job.status) && /* @__PURE__ */ jsx(Text, { size: 1, weight: "semibold", children: getStatusLabel(job.status) }),
3629
3630
  job.status === "completed" && job.tokensUsed ? /* @__PURE__ */ jsxs(Text, { size: 1, muted: !0, children: [