@shipeasy/sdk 2.1.8 → 2.1.9

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.
@@ -507,7 +507,11 @@ async function shipeasy(opts) {
507
507
  configs: bootstrap.configs,
508
508
  experiments: bootstrap.experiments,
509
509
  getBootstrapHtml() {
510
- return getBootstrapHtml(bootstrap, i18nData, { apiKey: clientKey, editLabels });
510
+ return getBootstrapHtml(bootstrap, i18nData, {
511
+ apiKey: clientKey,
512
+ editLabels,
513
+ i18nProfile: profile
514
+ });
511
515
  }
512
516
  };
513
517
  }
@@ -524,6 +528,9 @@ function getBootstrapHtml(bootstrap, i18nData, opts) {
524
528
  };
525
529
  if (i18nData) payload.i18n = i18nData;
526
530
  if (opts.editLabels) payload.editLabels = true;
531
+ parts.push(
532
+ `(function(){if(!new URLSearchParams(location.search).has('se_edit_labels'))return;var R;function P(v){if(!v||typeof v.t!=='function'||v.__sePatched)return;var O=v.t.bind(v);v.__sePatched=true;window._sei18n_t=O;v.t=function(k,vars){var r=O(k,vars);return r===k?k:'\\uFFF9'+k+'\\uFFFA'+r+'\\uFFFB';};}Object.defineProperty(window,'i18n',{configurable:true,get:function(){return R;},set:function(v){P(v);R=v;}});})();`
533
+ );
527
534
  parts.push(`window.__SE_BOOTSTRAP=${JSON.stringify(payload)};`);
528
535
  if (i18nData?.strings && Object.keys(i18nData.strings).length > 0) {
529
536
  parts.push(
@@ -464,7 +464,11 @@ async function shipeasy(opts) {
464
464
  configs: bootstrap.configs,
465
465
  experiments: bootstrap.experiments,
466
466
  getBootstrapHtml() {
467
- return getBootstrapHtml(bootstrap, i18nData, { apiKey: clientKey, editLabels });
467
+ return getBootstrapHtml(bootstrap, i18nData, {
468
+ apiKey: clientKey,
469
+ editLabels,
470
+ i18nProfile: profile
471
+ });
468
472
  }
469
473
  };
470
474
  }
@@ -481,6 +485,9 @@ function getBootstrapHtml(bootstrap, i18nData, opts) {
481
485
  };
482
486
  if (i18nData) payload.i18n = i18nData;
483
487
  if (opts.editLabels) payload.editLabels = true;
488
+ parts.push(
489
+ `(function(){if(!new URLSearchParams(location.search).has('se_edit_labels'))return;var R;function P(v){if(!v||typeof v.t!=='function'||v.__sePatched)return;var O=v.t.bind(v);v.__sePatched=true;window._sei18n_t=O;v.t=function(k,vars){var r=O(k,vars);return r===k?k:'\\uFFF9'+k+'\\uFFFA'+r+'\\uFFFB';};}Object.defineProperty(window,'i18n',{configurable:true,get:function(){return R;},set:function(v){P(v);R=v;}});})();`
490
+ );
484
491
  parts.push(`window.__SE_BOOTSTRAP=${JSON.stringify(payload)};`);
485
492
  if (i18nData?.strings && Object.keys(i18nData.strings).length > 0) {
486
493
  parts.push(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipeasy/sdk",
3
- "version": "2.1.8",
3
+ "version": "2.1.9",
4
4
  "description": "Shipeasy SDK — feature gates, runtime configs, experiments, and metrics for the Shipeasy hosted service.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://shipeasy.ai",