busroot-sdk 0.0.8-dev.2804160550 → 0.0.8-dev.2804302832

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.
Files changed (2) hide show
  1. package/build/index.js +9 -2
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -9367,8 +9367,9 @@ var require_station_windows = __commonJS({
9367
9367
  return mod && mod.__esModule ? mod : { "default": mod };
9368
9368
  };
9369
9369
  Object.defineProperty(exports2, "__esModule", { value: true });
9370
- exports2.AggregatedProduction = void 0;
9370
+ exports2.AggregatedProduction = exports2.OPERATOR_INITIALS_SEPARATOR = void 0;
9371
9371
  exports2.generateMockStationWindows = generateMockStationWindows;
9372
+ exports2.joinOperatorInitials = joinOperatorInitials;
9372
9373
  exports2.combineStationWindows = combineStationWindows;
9373
9374
  exports2.combineStationWindowsByTime = combineStationWindowsByTime;
9374
9375
  exports2.aggregateStationWindows = aggregateStationWindows;
@@ -9417,6 +9418,12 @@ var require_station_windows = __commonJS({
9417
9418
  ...extraFields
9418
9419
  };
9419
9420
  }
9421
+ exports2.OPERATOR_INITIALS_SEPARATOR = ", ";
9422
+ function joinOperatorInitials(existing, next) {
9423
+ const values = [existing, next].flatMap((value) => (value || "").split(exports2.OPERATOR_INITIALS_SEPARATOR.trim())).map((value) => value.trim()).filter((value) => value.length > 0);
9424
+ const unique = [...new Set(values)];
9425
+ return unique.length > 0 ? unique.join(exports2.OPERATOR_INITIALS_SEPARATOR) : void 0;
9426
+ }
9420
9427
  function combineStationWindows(windows, inShiftAverages = false, skipConsecutiveCheck = false) {
9421
9428
  if (windows.length === 0) {
9422
9429
  throw new Error("Must be at least 1 window.");
@@ -9525,7 +9532,7 @@ var require_station_windows = __commonJS({
9525
9532
  a.nonProductionReasonCodesDetail = nonProductionReasonCodesDetail;
9526
9533
  }
9527
9534
  if (b.operatorInitials) {
9528
- a.operatorInitials = b.operatorInitials;
9535
+ a.operatorInitials = joinOperatorInitials(a.operatorInitials, b.operatorInitials);
9529
9536
  }
9530
9537
  a.performanceModeFrom = b.performanceModeFrom;
9531
9538
  a.performanceModeType = b.performanceModeType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "busroot-sdk",
3
- "version": "0.0.8-dev.2804160550",
3
+ "version": "0.0.8-dev.2804302832",
4
4
  "description": "An SDK for accessing Busroot from output.industries",
5
5
  "homepage": "https://www.output.industries",
6
6
  "main": "./build/index.js",