@locker/cli 0.28.8 → 0.28.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.
package/dist/index.cjs.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * Copyright (C) 2026 salesforce.com, inc.
3
3
  */
4
4
  'use strict';
5
- /*! version: 0.28.8 */
5
+ /*! version: 0.28.9 */
package/dist/index.mjs.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * Copyright (C) 2026 salesforce.com, inc.
3
3
  */
4
4
 
5
- /*! version: 0.28.8 */
5
+ /*! version: 0.28.9 */
@@ -58,6 +58,14 @@
58
58
  function ObjectLookupOwnGetter$LWS$1(object$LWS, key$LWS) {
59
59
  return object$LWS === null || object$LWS === undefined || !ObjectHasOwn$LWS$1(object$LWS, key$LWS) ? undefined : ReflectApply$LWS$1(ObjectProtoLookupGetter$LWS$1, object$LWS, [key$LWS]);
60
60
  }
61
+ // Like ObjectLookupOwnGetter but without the own-property guard, so it resolves
62
+ // a getter defined anywhere on the prototype chain (__lookupGetter__ walks up).
63
+ // Use this when an accessor may live on a base interface's prototype rather than
64
+ // on `object` itself, e.g. an accessor the platform relocates between interface
65
+ // prototypes across browser versions.
66
+ function ObjectLookupGetter$LWS(object$LWS, key$LWS) {
67
+ return object$LWS === null || object$LWS === undefined ? undefined : ReflectApply$LWS$1(ObjectProtoLookupGetter$LWS$1, object$LWS, [key$LWS]);
68
+ }
61
69
  function ObjectLookupOwnSetter$LWS(object$LWS, key$LWS) {
62
70
  return object$LWS === null || object$LWS === undefined || !ObjectHasOwn$LWS$1(object$LWS, key$LWS) ? undefined : ReflectApply$LWS$1(ObjectProtoLookupSetter$LWS$1, object$LWS, [key$LWS]);
63
71
  }
@@ -1369,7 +1377,7 @@
1369
1377
  // reads identically to what isGaterEnabledFeature stores (register and
1370
1378
  // deregister also accept the short form via fullName above). Frozen so a
1371
1379
  // consumer cannot mutate the shared array.
1372
- Object.freeze([`${FEATURE_NAME_PREFIX$LWS}changesSince.260`, `${FEATURE_NAME_PREFIX$LWS}changesSince.262`, `${FEATURE_NAME_PREFIX$LWS}changesSince.264`, `${FEATURE_NAME_PREFIX$LWS}htmlAnchorElementHrefValidation`, `${FEATURE_NAME_PREFIX$LWS}enableSandboxedSameOriginIframe`, `${FEATURE_NAME_PREFIX$LWS}iframeSrcSameOriginPreflightCheck`, `${FEATURE_NAME_PREFIX$LWS}xmlEntityAttackPrologScan`, `${FEATURE_NAME_PREFIX$LWS}blockWindowOpenSameOriginSameContext`]);
1380
+ Object.freeze([`${FEATURE_NAME_PREFIX$LWS}changesSince.260`, `${FEATURE_NAME_PREFIX$LWS}changesSince.262`, `${FEATURE_NAME_PREFIX$LWS}changesSince.264`, `${FEATURE_NAME_PREFIX$LWS}htmlAnchorElementHrefValidation`, `${FEATURE_NAME_PREFIX$LWS}enableSandboxedSameOriginIframe`, `${FEATURE_NAME_PREFIX$LWS}iframeSrcSameOriginPreflightCheck`, `${FEATURE_NAME_PREFIX$LWS}xmlEntityAttackPrologScan`, `${FEATURE_NAME_PREFIX$LWS}blockWindowOpenSameOriginSameContext`, `${FEATURE_NAME_PREFIX$LWS}walkRangeProtoChainForMethods`]);
1373
1381
  function registerGaterEnabledFeatures$LWS(lockerGaterEnabledFeatures$LWS) {
1374
1382
  if (ArrayIsArray$LWS$1(lockerGaterEnabledFeatures$LWS)) {
1375
1383
  lockerGaterEnabledFeatures$LWS.forEach(feature$LWS => gaterEnabledFeatures$LWS.add(fullName$LWS(feature$LWS)));
@@ -1539,7 +1547,7 @@
1539
1547
  const PromiseResolve$LWS = PromiseCtor$LWS.resolve.bind(PromiseCtor$LWS);
1540
1548
  const PromiseReject$LWS = PromiseCtor$LWS.reject.bind(PromiseCtor$LWS);
1541
1549
  toSafeSet$LWS(new SetCtor$LWS$1());
1542
- /*! version: 0.28.8 */
1550
+ /*! version: 0.28.9 */
1543
1551
 
1544
1552
  /*!
1545
1553
  * Copyright (C) 2019 salesforce.com, inc.
@@ -2655,7 +2663,7 @@
2655
2663
  const XhrProtoResponseTextGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'responseText');
2656
2664
  const XhrProtoStatusGetter$LWS = ObjectLookupOwnGetter$LWS$1(XhrProto$LWS, 'status');
2657
2665
  ObjectLookupOwnSetter$LWS(XhrProto$LWS, 'withCredentials');
2658
- /*! version: 0.28.8 */
2666
+ /*! version: 0.28.9 */
2659
2667
 
2660
2668
  /*!
2661
2669
  * Copyright (C) 2019 salesforce.com, inc.
@@ -2823,7 +2831,7 @@
2823
2831
  }
2824
2832
  return sanitized$LWS;
2825
2833
  }
2826
- /*! version: 0.28.8 */
2834
+ /*! version: 0.28.9 */
2827
2835
 
2828
2836
  /*!
2829
2837
  * Copyright (C) 2023 salesforce.com, inc.
@@ -2899,7 +2907,7 @@
2899
2907
  // swallow
2900
2908
  }
2901
2909
  const trusted = createPolicy('trusted', policyOptions);
2902
- /*! version: 0.28.8 */
2910
+ /*! version: 0.28.9 */
2903
2911
 
2904
2912
  /*!
2905
2913
  * Copyright (C) 2019 salesforce.com, inc.
@@ -3208,7 +3216,7 @@
3208
3216
  }
3209
3217
  return getSanitizerForConfig$LWS(sandboxKey$LWS, 'STRING_BLOB_HTML');
3210
3218
  }
3211
- /*! version: 0.28.8 */
3219
+ /*! version: 0.28.9 */
3212
3220
 
3213
3221
  /*!
3214
3222
  * Copyright (C) 2023 salesforce.com, inc.
@@ -3417,7 +3425,7 @@
3417
3425
  ReflectApply$LWS$1(ElementProtoSetAttributeNS$LWS, targetElement$LWS, [attributeNamespaceURI$LWS, attributeName$LWS, src$LWS]);
3418
3426
  };
3419
3427
  }
3420
- /*! version: 0.28.8 */
3428
+ /*! version: 0.28.9 */
3421
3429
 
3422
3430
  /*!
3423
3431
  * Copyright (C) 2019 salesforce.com, inc.
@@ -10322,19 +10330,32 @@
10322
10330
  function initDistortionRangeCloneContents$LWS({
10323
10331
  globalObject: {
10324
10332
  AbstractRange: AbstractRange$LWS,
10325
- Range: {
10326
- prototype: {
10327
- cloneContents: originalCloneContents$LWS
10328
- }
10329
- }
10333
+ Range: Range$LWS
10330
10334
  }
10331
10335
  }) {
10336
+ // endContainer/startContainer have migrated across the Range interface
10337
+ // hierarchy over time:
10338
+ // Chrome <= 89: defined on Range.prototype
10339
+ // Chrome 90-151: defined on AbstractRange.prototype
10340
+ // Chrome >= 152: defined on NodeRange.prototype (a new interface
10341
+ // inserted as Range -> NodeRange -> AbstractRange)
10342
+ // walkRangeProtoChainForMethods (default on) walks up from the realm's own
10343
+ // Range.prototype so the accessors resolve wherever the platform currently
10344
+ // defines them; disabling it restores the legacy own-property lookup on
10345
+ // AbstractRange.prototype (broken on Chrome >= 152).
10346
+ const walkRangeProtoChain$LWS = isGaterEnabledFeature$LWS('walkRangeProtoChainForMethods');
10347
+ const {
10348
+ prototype: RangeProto$LWS
10349
+ } = Range$LWS;
10350
+ const {
10351
+ cloneContents: originalCloneContents$LWS
10352
+ } = RangeProto$LWS;
10332
10353
  // istanbul ignore next: the null path and right side of the expression for this code is not reachable in the version of chrome used to measure coverage.
10333
10354
  const {
10334
10355
  prototype: AbstractRangeProto$LWS
10335
- } = AbstractRange$LWS != null ? AbstractRange$LWS : Range;
10336
- const originalEndContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10337
- const originalStartContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10356
+ } = AbstractRange$LWS != null ? AbstractRange$LWS : Range$LWS;
10357
+ const originalEndContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'endContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10358
+ const originalStartContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'startContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10338
10359
  const distortionEntry$LWS = [originalCloneContents$LWS, function cloneContents$LWS(...args$LWS) {
10339
10360
  if (isGaterEnabledFeature$LWS('changesSince.262')) {
10340
10361
  const containers$LWS = [ReflectApply$LWS$1(originalEndContainerGetter$LWS, this, []), ReflectApply$LWS$1(originalStartContainerGetter$LWS, this, [])];
@@ -10359,19 +10380,32 @@
10359
10380
  function initDistortionRangeCloneRange$LWS({
10360
10381
  globalObject: {
10361
10382
  AbstractRange: AbstractRange$LWS,
10362
- Range: {
10363
- prototype: {
10364
- cloneRange: originalCloneRange$LWS
10365
- }
10366
- }
10383
+ Range: Range$LWS
10367
10384
  }
10368
10385
  }) {
10386
+ // endContainer/startContainer have migrated across the Range interface
10387
+ // hierarchy over time:
10388
+ // Chrome <= 89: defined on Range.prototype
10389
+ // Chrome 90-151: defined on AbstractRange.prototype
10390
+ // Chrome >= 152: defined on NodeRange.prototype (a new interface
10391
+ // inserted as Range -> NodeRange -> AbstractRange)
10392
+ // walkRangeProtoChainForMethods (default on) walks up from the realm's own
10393
+ // Range.prototype so the accessors resolve wherever the platform currently
10394
+ // defines them; disabling it restores the legacy own-property lookup on
10395
+ // AbstractRange.prototype (broken on Chrome >= 152).
10396
+ const walkRangeProtoChain$LWS = isGaterEnabledFeature$LWS('walkRangeProtoChainForMethods');
10397
+ const {
10398
+ prototype: RangeProto$LWS
10399
+ } = Range$LWS;
10400
+ const {
10401
+ cloneRange: originalCloneRange$LWS
10402
+ } = RangeProto$LWS;
10369
10403
  // istanbul ignore next: the null path and right side of the expression for this code is not reachable in the version of chrome used to measure coverage.
10370
10404
  const {
10371
10405
  prototype: AbstractRangeProto$LWS
10372
- } = AbstractRange$LWS != null ? AbstractRange$LWS : Range;
10373
- const originalEndContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10374
- const originalStartContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10406
+ } = AbstractRange$LWS != null ? AbstractRange$LWS : Range$LWS;
10407
+ const originalEndContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'endContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10408
+ const originalStartContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'startContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10375
10409
  const distortionEntry$LWS = [originalCloneRange$LWS, function cloneRange$LWS(...args$LWS) {
10376
10410
  if (isGaterEnabledFeature$LWS('changesSince.262')) {
10377
10411
  const containers$LWS = [ReflectApply$LWS$1(originalEndContainerGetter$LWS, this, []), ReflectApply$LWS$1(originalStartContainerGetter$LWS, this, [])];
@@ -10433,24 +10467,32 @@
10433
10467
  function initDistortionRangeDeleteContents$LWS({
10434
10468
  globalObject: {
10435
10469
  AbstractRange: AbstractRange$LWS,
10436
- Range: {
10437
- prototype: {
10438
- deleteContents: originalDeleteContents$LWS
10439
- }
10440
- }
10470
+ Range: Range$LWS
10441
10471
  }
10442
10472
  }) {
10443
- // Chrome <= 89, Edge <= 89, Safari <= 14, Firefox <= 68, Mobile Safari <= 14.4:
10444
- // endContainer/startContainer are defined on Range.prototype
10445
- //
10446
- // Chrome >= 90, Edge >= 90, Safari >= 14.1, Firefox >= 69, Mobile Safari >= 14.5:
10447
- // endContainer/startContainer are defined on AbstractRange.prototype
10473
+ // endContainer/startContainer have migrated across the Range interface
10474
+ // hierarchy over time:
10475
+ // Chrome <= 89: defined on Range.prototype
10476
+ // Chrome 90-151: defined on AbstractRange.prototype
10477
+ // Chrome >= 152: defined on NodeRange.prototype (a new interface
10478
+ // inserted as Range -> NodeRange -> AbstractRange)
10479
+ // walkRangeProtoChainForMethods (default on) walks up from the realm's own
10480
+ // Range.prototype so the accessors resolve wherever the platform currently
10481
+ // defines them; disabling it restores the legacy own-property lookup on
10482
+ // AbstractRange.prototype (broken on Chrome >= 152).
10483
+ const walkRangeProtoChain$LWS = isGaterEnabledFeature$LWS('walkRangeProtoChainForMethods');
10484
+ const {
10485
+ prototype: RangeProto$LWS
10486
+ } = Range$LWS;
10487
+ const {
10488
+ deleteContents: originalDeleteContents$LWS
10489
+ } = RangeProto$LWS;
10448
10490
  // istanbul ignore next: the null path and right side of the expression for this code is not reachable in the version of chrome used to measure coverage.
10449
10491
  const {
10450
10492
  prototype: AbstractRangeProto$LWS
10451
- } = AbstractRange$LWS != null ? AbstractRange$LWS : Range;
10452
- const originalEndContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10453
- const originalStartContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10493
+ } = AbstractRange$LWS != null ? AbstractRange$LWS : Range$LWS;
10494
+ const originalEndContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'endContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10495
+ const originalStartContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'startContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10454
10496
  const distortionEntry$LWS = [originalDeleteContents$LWS, function deleteContents$LWS(...args$LWS) {
10455
10497
  const containers$LWS = [ReflectApply$LWS$1(originalEndContainerGetter$LWS, this, []), ReflectApply$LWS$1(originalStartContainerGetter$LWS, this, [])];
10456
10498
  for (let i$LWS = 0, {
@@ -10473,24 +10515,32 @@
10473
10515
  function initDistortionRangeExtractContents$LWS({
10474
10516
  globalObject: {
10475
10517
  AbstractRange: AbstractRange$LWS,
10476
- Range: {
10477
- prototype: {
10478
- extractContents: originalExtractContents$LWS
10479
- }
10480
- }
10518
+ Range: Range$LWS
10481
10519
  }
10482
10520
  }) {
10483
- // Chrome <= 89, Edge <= 89, Safari <= 14, Firefox <= 68, Mobile Safari <= 14.4:
10484
- // endContainer/startContainer are defined on Range.prototype
10485
- //
10486
- // Chrome >= 90, Edge >= 90, Safari >= 14.1, Firefox >= 69, Mobile Safari >= 14.5:
10487
- // endContainer/startContainer are defined on AbstractRange.prototype
10521
+ // endContainer/startContainer have migrated across the Range interface
10522
+ // hierarchy over time:
10523
+ // Chrome <= 89: defined on Range.prototype
10524
+ // Chrome 90-151: defined on AbstractRange.prototype
10525
+ // Chrome >= 152: defined on NodeRange.prototype (a new interface
10526
+ // inserted as Range -> NodeRange -> AbstractRange)
10527
+ // walkRangeProtoChainForMethods (default on) walks up from the realm's own
10528
+ // Range.prototype so the accessors resolve wherever the platform currently
10529
+ // defines them; disabling it restores the legacy own-property lookup on
10530
+ // AbstractRange.prototype (broken on Chrome >= 152).
10531
+ const walkRangeProtoChain$LWS = isGaterEnabledFeature$LWS('walkRangeProtoChainForMethods');
10532
+ const {
10533
+ prototype: RangeProto$LWS
10534
+ } = Range$LWS;
10535
+ const {
10536
+ extractContents: originalExtractContents$LWS
10537
+ } = RangeProto$LWS;
10488
10538
  // istanbul ignore next: the null path and right side of the expression for this code is not reachable in the version of chrome used to measure coverage.
10489
10539
  const {
10490
10540
  prototype: AbstractRangeProto$LWS
10491
- } = AbstractRange$LWS != null ? AbstractRange$LWS : Range;
10492
- const originalEndContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10493
- const originalStartContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10541
+ } = AbstractRange$LWS != null ? AbstractRange$LWS : Range$LWS;
10542
+ const originalEndContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'endContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10543
+ const originalStartContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'startContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10494
10544
  const distortionEntry$LWS = [originalExtractContents$LWS, function extractContents$LWS(...args$LWS) {
10495
10545
  const containers$LWS = [ReflectApply$LWS$1(originalEndContainerGetter$LWS, this, []), ReflectApply$LWS$1(originalStartContainerGetter$LWS, this, [])];
10496
10546
  for (let i$LWS = 0, {
@@ -10513,19 +10563,32 @@
10513
10563
  function initDistortionRangeGetBoundingClientRect$LWS({
10514
10564
  globalObject: {
10515
10565
  AbstractRange: AbstractRange$LWS,
10516
- Range: {
10517
- prototype: {
10518
- getBoundingClientRect: originalGetBoundingClientRect$LWS
10519
- }
10520
- }
10566
+ Range: Range$LWS
10521
10567
  }
10522
10568
  }) {
10569
+ // endContainer/startContainer have migrated across the Range interface
10570
+ // hierarchy over time:
10571
+ // Chrome <= 89: defined on Range.prototype
10572
+ // Chrome 90-151: defined on AbstractRange.prototype
10573
+ // Chrome >= 152: defined on NodeRange.prototype (a new interface
10574
+ // inserted as Range -> NodeRange -> AbstractRange)
10575
+ // walkRangeProtoChainForMethods (default on) walks up from the realm's own
10576
+ // Range.prototype so the accessors resolve wherever the platform currently
10577
+ // defines them; disabling it restores the legacy own-property lookup on
10578
+ // AbstractRange.prototype (broken on Chrome >= 152).
10579
+ const walkRangeProtoChain$LWS = isGaterEnabledFeature$LWS('walkRangeProtoChainForMethods');
10580
+ const {
10581
+ prototype: RangeProto$LWS
10582
+ } = Range$LWS;
10583
+ const {
10584
+ getBoundingClientRect: originalGetBoundingClientRect$LWS
10585
+ } = RangeProto$LWS;
10523
10586
  // istanbul ignore next: the null path and right side of the expression for this code is not reachable in the version of chrome used to measure coverage.
10524
10587
  const {
10525
10588
  prototype: AbstractRangeProto$LWS
10526
- } = AbstractRange$LWS != null ? AbstractRange$LWS : Range;
10527
- const originalEndContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10528
- const originalStartContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10589
+ } = AbstractRange$LWS != null ? AbstractRange$LWS : Range$LWS;
10590
+ const originalEndContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'endContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10591
+ const originalStartContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'startContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10529
10592
  const distortionEntry$LWS = [originalGetBoundingClientRect$LWS, function getBoundingClientRect$LWS(...args$LWS) {
10530
10593
  if (isGaterEnabledFeature$LWS('changesSince.262')) {
10531
10594
  const containers$LWS = [ReflectApply$LWS$1(originalEndContainerGetter$LWS, this, []), ReflectApply$LWS$1(originalStartContainerGetter$LWS, this, [])];
@@ -10629,19 +10692,32 @@
10629
10692
  function initDistortionRangeToString$LWS({
10630
10693
  globalObject: {
10631
10694
  AbstractRange: AbstractRange$LWS,
10632
- Range: {
10633
- prototype: {
10634
- toString: originalRangeToString$LWS
10635
- }
10636
- }
10695
+ Range: Range$LWS
10637
10696
  }
10638
10697
  }) {
10698
+ // endContainer/startContainer have migrated across the Range interface
10699
+ // hierarchy over time:
10700
+ // Chrome <= 89: defined on Range.prototype
10701
+ // Chrome 90-151: defined on AbstractRange.prototype
10702
+ // Chrome >= 152: defined on NodeRange.prototype (a new interface
10703
+ // inserted as Range -> NodeRange -> AbstractRange)
10704
+ // walkRangeProtoChainForMethods (default on) walks up from the realm's own
10705
+ // Range.prototype so the accessors resolve wherever the platform currently
10706
+ // defines them; disabling it restores the legacy own-property lookup on
10707
+ // AbstractRange.prototype (broken on Chrome >= 152).
10708
+ const walkRangeProtoChain$LWS = isGaterEnabledFeature$LWS('walkRangeProtoChainForMethods');
10709
+ const {
10710
+ prototype: RangeProto$LWS
10711
+ } = Range$LWS;
10712
+ const {
10713
+ toString: originalRangeToString$LWS
10714
+ } = RangeProto$LWS;
10639
10715
  // istanbul ignore next: the null path and right side of the expression for this code is not reachable in the version of chrome used to measure coverage.
10640
10716
  const {
10641
10717
  prototype: AbstractRangeProto$LWS
10642
- } = AbstractRange$LWS != null ? AbstractRange$LWS : Range;
10643
- const originalEndContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10644
- const originalStartContainerGetter$LWS = ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10718
+ } = AbstractRange$LWS != null ? AbstractRange$LWS : Range$LWS;
10719
+ const originalEndContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'endContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'endContainer');
10720
+ const originalStartContainerGetter$LWS = walkRangeProtoChain$LWS ? ObjectLookupGetter$LWS(RangeProto$LWS, 'startContainer') : ObjectLookupOwnGetter$LWS$1(AbstractRangeProto$LWS, 'startContainer');
10645
10721
  const distortionEntry$LWS = [originalRangeToString$LWS, function toString$LWS(...args$LWS) {
10646
10722
  if (isGaterEnabledFeature$LWS('changesSince.262')) {
10647
10723
  const containers$LWS = [ReflectApply$LWS$1(originalEndContainerGetter$LWS, this, []), ReflectApply$LWS$1(originalStartContainerGetter$LWS, this, [])];
@@ -12821,7 +12897,7 @@
12821
12897
  const UIEventProtoBlockedProperties$LWS = ['rangeParent'];
12822
12898
  const WindowBlockedProperties$LWS = ['find', 'requestFileSystem', 'webkitRequestFileSystem'];
12823
12899
  const XSLTProcessorProtoBlockedProperties$LWS = ['transformToDocument', 'transformToFragment'];
12824
- /*! version: 0.28.8 */
12900
+ /*! version: 0.28.9 */
12825
12901
 
12826
12902
  /*!
12827
12903
  * Copyright (C) 2021 salesforce.com, inc.
@@ -12830,7 +12906,7 @@
12830
12906
  function getPdpSchema$LWS() {
12831
12907
  return pdpSchema$LWS;
12832
12908
  }
12833
- /*! version: 0.28.8 */
12909
+ /*! version: 0.28.9 */
12834
12910
 
12835
12911
  /*!
12836
12912
  * Copyright (C) 2019 salesforce.com, inc.
@@ -14968,22 +15044,40 @@
14968
15044
  const thisArgOrNewTarget$LWS = isApplyTrap$LWS ? thisArgOrArgs$LWS : argsOrNewTarget$LWS;
14969
15045
  let combinedOffset$LWS = 2;
14970
15046
  const combinedArgs$LWS = new ArrayCtor$LWS(length$LWS + combinedOffset$LWS);
14971
- combinedArgs$LWS[0] = foreignTargetPointer$LWS;
15047
+ // Use `[[DefineOwnProperty]]` (via `ReflectDefineProperty`) rather than
15048
+ // `[[Set]]` (`combinedArgs[i] = value`) to populate the combined arguments.
15049
+ // A plain array still inherits from `Array.prototype`, so a `[[Set]]` on a
15050
+ // numeric index would invoke an inherited accessor if sandboxed code has
15051
+ // installed one (e.g. `Object.defineProperty(Array.prototype, '2', { set })`).
15052
+ // Such a setter can observe and overwrite the pointers marshalled here —
15053
+ // including `combinedArgs[0]`, the foreign target pointer — redirecting the
15054
+ // call to a different foreign callable. Defining own data properties bypasses
15055
+ // the prototype chain entirely and is immune to prototype pollution.
15056
+ ReflectDefineProperty$LWS(combinedArgs$LWS, 0, {
15057
+ __proto__: null,
15058
+ value: foreignTargetPointer$LWS
15059
+ });
14972
15060
  let pointerOrPrimitive$LWS;
14973
15061
  try {
14974
- combinedArgs$LWS[1] = typeof thisArgOrNewTarget$LWS === 'object' && thisArgOrNewTarget$LWS !== null || typeof thisArgOrNewTarget$LWS === 'function' ? getTransferablePointer$LWS(thisArgOrNewTarget$LWS) :
14975
- // Intentionally ignoring `document.all`.
14976
- // https://developer.mozilla.org/en-US/docs/Web/API/Document/all
14977
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
14978
- typeof thisArgOrNewTarget$LWS === 'undefined' ? undefined : thisArgOrNewTarget$LWS;
14979
- for (let i$LWS = 0; i$LWS < length$LWS; i$LWS += 1) {
14980
- const arg$LWS = args$LWS[i$LWS];
14981
- // Inlining `getTransferableValue()`.
14982
- combinedArgs$LWS[combinedOffset$LWS++] = typeof arg$LWS === 'object' && arg$LWS !== null || typeof arg$LWS === 'function' ? getTransferablePointer$LWS(arg$LWS) :
15062
+ ReflectDefineProperty$LWS(combinedArgs$LWS, 1, {
15063
+ __proto__: null,
15064
+ value: typeof thisArgOrNewTarget$LWS === 'object' && thisArgOrNewTarget$LWS !== null || typeof thisArgOrNewTarget$LWS === 'function' ? getTransferablePointer$LWS(thisArgOrNewTarget$LWS) :
14983
15065
  // Intentionally ignoring `document.all`.
14984
15066
  // https://developer.mozilla.org/en-US/docs/Web/API/Document/all
14985
15067
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
14986
- typeof arg$LWS === 'undefined' ? undefined : arg$LWS;
15068
+ typeof thisArgOrNewTarget$LWS === 'undefined' ? undefined : thisArgOrNewTarget$LWS
15069
+ });
15070
+ for (let i$LWS = 0; i$LWS < length$LWS; i$LWS += 1) {
15071
+ const arg$LWS = args$LWS[i$LWS];
15072
+ // Inlining `getTransferableValue()`.
15073
+ ReflectDefineProperty$LWS(combinedArgs$LWS, combinedOffset$LWS++, {
15074
+ __proto__: null,
15075
+ value: typeof arg$LWS === 'object' && arg$LWS !== null || typeof arg$LWS === 'function' ? getTransferablePointer$LWS(arg$LWS) :
15076
+ // Intentionally ignoring `document.all`.
15077
+ // https://developer.mozilla.org/en-US/docs/Web/API/Document/all
15078
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
15079
+ typeof arg$LWS === 'undefined' ? undefined : arg$LWS
15080
+ });
14987
15081
  }
14988
15082
  pointerOrPrimitive$LWS = ReflectApply$LWS(foreignCallableApplyOrConstruct$LWS, undefined, combinedArgs$LWS);
14989
15083
  } catch (error) {
@@ -15566,10 +15660,36 @@
15566
15660
  // Replace pending traps with live traps that can work with the
15567
15661
  // target without taking snapshots.
15568
15662
  this.deleteProperty = BoundaryProxyHandler$LWS.passthruDeletePropertyTrap;
15569
- this.defineProperty = BoundaryProxyHandler$LWS.passthruDefinePropertyTrap;
15570
15663
  this.preventExtensions = BoundaryProxyHandler$LWS.passthruPreventExtensionsTrap;
15571
15664
  this.set = BoundaryProxyHandler$LWS.passthruSetTrap;
15572
- this.setPrototypeOf = BoundaryProxyHandler$LWS.passthruSetPrototypeOfTrap;
15665
+ // `[[DefineOwnProperty]]` is passthru for DATA descriptors
15666
+ // (the expando capability live targets actually need) but
15667
+ // accessor descriptors are scoped to the shadow target. The
15668
+ // passthru variant calls `foreignCallableDefineProperty` on the
15669
+ // RAW foreign target; for an accessor that plants a
15670
+ // sandbox-authored getter/setter directly onto a host-shared
15671
+ // object. Because the descriptor's functions are marshalled as
15672
+ // pointers back into the sandbox, any later access from the
15673
+ // primary realm (a confused deputy reading the planted key)
15674
+ // would execute sandbox code with the RAW object as `this` and
15675
+ // read raw-global-only state through it. Data expandos carry no
15676
+ // such callback, so they remain passthru; only accessors are
15677
+ // contained. See `liveAccessorGuardedDefinePropertyTrap`.
15678
+ this.defineProperty = BoundaryProxyHandler$LWS.liveAccessorGuardedDefinePropertyTrap;
15679
+ // `[[SetPrototypeOf]]` is the one live trap we do not
15680
+ // passthru. The passthru variant calls `ReflectSetPrototypeOf`
15681
+ // on the RAW foreign target, which lets sandbox code splice a
15682
+ // foreign prototype (e.g. the primary-realm global) onto a live
15683
+ // target and then read foreign globals through inherited
15684
+ // lookups: live reads resolve against the RAW prototype chain
15685
+ // (`hybridGetTrap` -> `lookupForeignDescriptor`), never the
15686
+ // shadow target. It also lets sandbox code wipe a host-shared
15687
+ // object's prototype to `null`. Scoping the proto change to the
15688
+ // shadow target makes both observably inert while leaving
15689
+ // `set`/`deleteProperty` passthru (the capabilities live targets
15690
+ // actually need) untouched. No legitimate live target re-parents
15691
+ // itself across the membrane.
15692
+ this.setPrototypeOf = BoundaryProxyHandler$LWS.staticSetPrototypeOfTrap;
15573
15693
  } : noop$LWS;
15574
15694
  this.makeProxyStatic = IS_IN_SHADOW_REALM$LWS ? function () {
15575
15695
  // Reset all traps except apply and construct for static proxies
@@ -15921,6 +16041,25 @@
15921
16041
  if (IS_NOT_IN_SHADOW_REALM$LWS && (key$LWS === LOCKER_NEAR_MEMBRANE_SYMBOL$LWS || key$LWS === LOCKER_NEAR_MEMBRANE_SERIALIZED_VALUE_SYMBOL$LWS)) {
15922
16042
  throw new TypeErrorCtor$LWS(ERR_ILLEGAL_PROPERTY_ACCESS$LWS);
15923
16043
  }
16044
+ // `x.__proto__ = value` triggers the `Object.prototype.__proto__`
16045
+ // accessor, whose setter performs `[[SetPrototypeOf]]` on the
16046
+ // target. This is the live target's `set` trap, and its passthru
16047
+ // below would forward the write to the RAW foreign target,
16048
+ // running the raw realm's `__proto__` setter and reparenting the
16049
+ // raw object. That reintroduces the `setPrototypeOf` isolation
16050
+ // leak (W-23623814) through property-assignment syntax: a
16051
+ // subsequent inherited read would resolve foreign members
16052
+ // against the spliced prototype. Confine an own `__proto__`
16053
+ // write to the shadow target by delegating to `ReflectSet` on
16054
+ // it, exactly as static proxies do via `staticSetTrap`; the red
16055
+ // realm's own `__proto__` accessor then applies the correct
16056
+ // ordinary semantics (primitive no-op, Object/Null reparent)
16057
+ // scoped to the shadow target. A non-own write
16058
+ // (`proxy !== receiver`) targets the other receiver, not the
16059
+ // raw foreign target, so it is left to the passthru path.
16060
+ if (IS_IN_SHADOW_REALM$LWS && key$LWS === '__proto__' && proxy$LWS === receiver$LWS) {
16061
+ return ReflectSet$LWS(shadowTarget$LWS, key$LWS, value$LWS, shadowTarget$LWS);
16062
+ }
15924
16063
  const isFastPath$LWS = proxy$LWS === receiver$LWS;
15925
16064
  let result$LWS = false;
15926
16065
  try {
@@ -16155,6 +16294,76 @@
16155
16294
  }
16156
16295
  return result$LWS;
16157
16296
  } : alwaysFalse$LWS;
16297
+ // `[[DefineOwnProperty]]` trap for LIVE targets. Data descriptors are the
16298
+ // expando capability live targets rely on and stay passthru to the RAW
16299
+ // foreign target via `passthruDefinePropertyTrap`. Accessor descriptors
16300
+ // (a `get` and/or `set`), however, would install sandbox-authored
16301
+ // functions onto a host-shared object; a subsequent access from the
16302
+ // primary realm would run that sandbox code with the RAW target as
16303
+ // receiver and expose raw-global-only state. We contain accessors on the
16304
+ // inert shadow target instead. This mirrors the `staticSetPrototypeOfTrap`
16305
+ // contract: the operation is observably inert from every side. A live
16306
+ // `get` resolves against the RAW foreign target (`lookupForeignDescriptor`
16307
+ // reads the raw own descriptor and walks the RAW prototype chain; it only
16308
+ // ever writes the shadow target, never reads its own properties), so the
16309
+ // sandbox reads back `undefined` for a shadow-scoped accessor too. The
16310
+ // security-relevant guarantee is that no sandbox-authored callback ever
16311
+ // reaches the raw host-shared object.
16312
+ //
16313
+ // The shadow-scoped copy is always written with `configurable: true`,
16314
+ // regardless of what the sandbox asked for. A live proxy's `has`,
16315
+ // `ownKeys`, and `getOwnPropertyDescriptor` traps are NOT overridden by
16316
+ // `makeProxyLive()` (see `hybridHasTrap`, `passthruOwnKeysTrap`,
16317
+ // `passthruGetOwnPropertyDescriptorTrap`): they all resolve against the
16318
+ // RAW foreign target and never consult the shadow target's own
16319
+ // properties. `Object.defineProperty` defaults `configurable` to
16320
+ // `false`, so the common `{ get() {...} }` shape would otherwise leave
16321
+ // the shadow target — the proxy's actual `[[ProxyTarget]]` — holding a
16322
+ // NON-CONFIGURABLE own key that those raw-resolving traps can never
16323
+ // mirror. The engine's proxy invariants then throw on the very next
16324
+ // `has`/`ownKeys`/`getOwnPropertyDescriptor` (`in`, `Object.keys`,
16325
+ // spread, `JSON.stringify`, `Object.getOwnPropertyDescriptor`, ...)
16326
+ // because a non-configurable target key must be reported by those traps
16327
+ // and it never can be. Since the accessor is invisible through the
16328
+ // proxy either way (reads resolve against the raw target), forcing
16329
+ // `configurable: true` is not observable to the sandbox, and it keeps
16330
+ // every read-side invariant satisfiable. An explicit `configurable:
16331
+ // false` request cannot be honored while preserving that invisibility;
16332
+ // it now fails fast with a native TypeError raised by the engine's own
16333
+ // `defineProperty` trap-result invariant check (requested
16334
+ // non-configurable vs. an actually-configurable target descriptor) at
16335
+ // the `defineProperty` call site itself, rather than deferring the
16336
+ // detonation to a later, unrelated read.
16337
+ BoundaryProxyHandler$LWS.liveAccessorGuardedDefinePropertyTrap = IS_IN_SHADOW_REALM$LWS ? function (shadowTarget$LWS, key$LWS, unsafePartialDesc$LWS) {
16338
+ // A descriptor is an accessor iff it carries a `get` or `set`.
16339
+ // Read membership before detaching the prototype so a poisoned
16340
+ // `Object.prototype` getter cannot forge the answer.
16341
+ const isAccessorDescriptor$LWS = 'get' in unsafePartialDesc$LWS || 'set' in unsafePartialDesc$LWS;
16342
+ if (isAccessorDescriptor$LWS) {
16343
+ lastProxyTrapCalled$LWS = 4 /* ProxyHandlerTraps.DefineProperty */;
16344
+ // Build a fresh descriptor rather than writing the
16345
+ // sandbox's `unsafePartialDesc` object directly, and
16346
+ // force `configurable: true` on the shadow-scoped copy
16347
+ // (see the block comment above).
16348
+ const shadowDesc$LWS = {
16349
+ __proto__: null
16350
+ };
16351
+ if ('get' in unsafePartialDesc$LWS) {
16352
+ shadowDesc$LWS.get = unsafePartialDesc$LWS.get;
16353
+ }
16354
+ if ('set' in unsafePartialDesc$LWS) {
16355
+ shadowDesc$LWS.set = unsafePartialDesc$LWS.set;
16356
+ }
16357
+ if ('enumerable' in unsafePartialDesc$LWS) {
16358
+ shadowDesc$LWS.enumerable = unsafePartialDesc$LWS.enumerable;
16359
+ }
16360
+ shadowDesc$LWS.configurable = true;
16361
+ // Scope the accessor to the shadow target: observably
16362
+ // defined for the sandbox, never planted on the raw object.
16363
+ return ReflectDefineProperty$LWS(shadowTarget$LWS, key$LWS, shadowDesc$LWS);
16364
+ }
16365
+ return ReflectApply$LWS(BoundaryProxyHandler$LWS.passthruDefinePropertyTrap, this, [shadowTarget$LWS, key$LWS, unsafePartialDesc$LWS]);
16366
+ } : alwaysFalse$LWS;
16158
16367
  BoundaryProxyHandler$LWS.passthruGetTrap = IS_NOT_IN_SHADOW_REALM$LWS ? function (_shadowTarget$LWS, key$LWS, receiver$LWS) {
16159
16368
  // Only allow accessing handshake property values if the
16160
16369
  // "has" trap has been triggered immediately BEFORE and
@@ -16455,7 +16664,17 @@
16455
16664
  const pointerOrPrimitive$LWS = args$LWS[i$LWS];
16456
16665
  if (typeof pointerOrPrimitive$LWS === 'function') {
16457
16666
  pointerOrPrimitive$LWS();
16458
- args$LWS[i$LWS] = selectedTarget$LWS;
16667
+ // Use `[[DefineOwnProperty]]` rather than `[[Set]]` (`args[i] = ...`).
16668
+ // `args` is a rest-parameter array that still inherits from
16669
+ // `Array.prototype`, so a plain assignment to a numeric index would
16670
+ // invoke an inherited accessor installed by sandboxed code (e.g.
16671
+ // `Object.defineProperty(Array.prototype, '2', { set })`). Such a
16672
+ // setter could observe and overwrite the un-marshalled arguments
16673
+ // before they reach the target function. See W-23789302.
16674
+ ReflectDefineProperty$LWS(args$LWS, i$LWS, {
16675
+ __proto__: null,
16676
+ value: selectedTarget$LWS
16677
+ });
16459
16678
  selectedTarget$LWS = undefined;
16460
16679
  }
16461
16680
  }
@@ -18222,7 +18441,7 @@
18222
18441
  // tools from mistaking the regexp or the replacement string for an
18223
18442
  // actual source mapping URL.
18224
18443
  /\/\/# sandbox(?=MappingURL=.*?\s*$)/, '//# source']);
18225
- sourceText$LWS = `\n//# LWS Version = "0.28.8"\n${sourceText$LWS}`;
18444
+ sourceText$LWS = `\n//# LWS Version = "0.28.9"\n${sourceText$LWS}`;
18226
18445
  return sourceType$LWS === 1 /* SourceType.Module */ && indexOfPragma$LWS(sourceText$LWS, 'use strict') === -1 ?
18227
18446
  // Append "'use strict'" to the extracted function body so it is
18228
18447
  // evaluated in strict mode.
@@ -18902,7 +19121,7 @@
18902
19121
  }
18903
19122
  toSafeMap$LWS$1(new MapCtor$LWS$1());
18904
19123
  toSafeSet$LWS(new SetCtor$LWS$1(['lightning/platformResourceLoader', 'lightning:platformResourceLoader', 'lightningmobileruntime/platformResourceLoader', 'lightningmobileruntime:platformResourceLoader']));
18905
- /*! version: 0.28.8 */
19124
+ /*! version: 0.28.9 */
18906
19125
 
18907
19126
  // Expose evaluateInSandbox on the window global so the browser harness page
18908
19127
  // (eval.html / component.html) can invoke it against source delivered by the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@locker/cli",
3
- "version": "0.28.8",
3
+ "version": "0.28.9",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "author": "Salesforce UI Security Team",
6
6
  "description": "Lightning Web Security CLI",
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@babel/parser": "7.28.0",
30
- "@locker/rollup-plugin": "0.28.8",
31
- "@locker/sandbox": "0.28.8",
32
- "@locker/shared": "0.28.8",
30
+ "@locker/rollup-plugin": "0.28.9",
31
+ "@locker/sandbox": "0.28.9",
32
+ "@locker/shared": "0.28.9",
33
33
  "@lwc/engine-dom": "8.21.1",
34
34
  "@lwc/rollup-plugin": "8.21.1",
35
35
  "@rollup/plugin-commonjs": "21.1.0",
@@ -43,5 +43,5 @@
43
43
  "rollup-plugin-ts": "3.4.5",
44
44
  "yargs": "17.7.2"
45
45
  },
46
- "gitHead": "59e9a7dd6e507da1b9728504e5ac10d170f131fc"
46
+ "gitHead": "095edff28376a4ba18a23403eb66515fab860328"
47
47
  }