ses 1.7.0 → 1.8.0

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/NEWS.md CHANGED
@@ -1,5 +1,22 @@
1
1
  User-visible changes in `ses`:
2
2
 
3
+ # v1.8.0 (2024-08-27)
4
+
5
+ - New `legacyRegeneratorRuntimeTaming: 'unsafe-ignore'` lockdown option to tame
6
+ old `regenerator-runtime` (from 0.10.5 to 0.13.7).
7
+ - If lockdown's `errorTrapping: 'report'` mode is selected (possibly via the
8
+ `'platform'`, or `'exit'` or `'abort'` modes), uncaught exceptions will be
9
+ written to standard error with the new `SES_UNCAUGHT_EXCEPTION: ` prefix.
10
+ This is intended to give valuable context to users of the system, especially
11
+ when an uncaught exception is not an `Error` object, and therefore its origin
12
+ may be hard to find in source code.
13
+
14
+ This is not likely to affect most systems built with SES, as stderr is
15
+ generally reserved for user-only messages. If your SES system sends its
16
+ stderr to a program which parses it, you may need to adapt that program to be
17
+ tolerant of the `SES_UNCAUGHT_EXCEPTION: ` prefix. Even for such programs, it
18
+ is unlikely they are that sensitive to stderr formatting.
19
+
3
20
  # v1.6.0 (2024-07-30)
4
21
 
5
22
  - *NOTICE*: This version introduces multiple features to converge upon a
@@ -60,7 +77,7 @@ User-visible changes in `ses`:
60
77
  in TypeScript),
61
78
  the stacktrace line-numbers point back into the original
62
79
  source, as they do on Node without SES.
63
-
80
+
64
81
  # v1.5.0 (2024-05-06)
65
82
 
66
83
  - Adds `importNowHook` to the `Compartment` options. The compartment will invoke the hook whenever it encounters a missing dependency while running `compartmentInstance.importNow(specifier)`, which cannot use an asynchronous `importHook`.
package/dist/lockdown.cjs CHANGED
@@ -1,4 +1,4 @@
1
- // ses@1.7.0
1
+ // ses@1.8.0
2
2
  'use strict';
3
3
  (functors => {
4
4
 
@@ -100,6 +100,7 @@
100
100
  functionPrototype: cell("functionPrototype"),
101
101
  promisePrototype: cell("promisePrototype"),
102
102
  generatorPrototype: cell("generatorPrototype"),
103
+ iteratorPrototype: cell("iteratorPrototype"),
103
104
  typedArrayPrototype: cell("typedArrayPrototype"),
104
105
  uncurryThis: cell("uncurryThis"),
105
106
  objectHasOwnProperty: cell("objectHasOwnProperty"),
@@ -362,6 +363,9 @@
362
363
  tameFauxDataProperty: cell("tameFauxDataProperty"),
363
364
  tameFauxDataProperties: cell("tameFauxDataProperties"),
364
365
  },
366
+ {
367
+ tameRegeneratorRuntime: cell("tameRegeneratorRuntime"),
368
+ },
365
369
  {
366
370
  repairIntrinsics: cell("repairIntrinsics"),
367
371
  },
@@ -490,6 +494,7 @@ function observeImports(map, importName, importIndex) {
490
494
  functionPrototype: cells[0].functionPrototype.set,
491
495
  promisePrototype: cells[0].promisePrototype.set,
492
496
  generatorPrototype: cells[0].generatorPrototype.set,
497
+ iteratorPrototype: cells[0].iteratorPrototype.set,
493
498
  typedArrayPrototype: cells[0].typedArrayPrototype.set,
494
499
  uncurryThis: cells[0].uncurryThis.set,
495
500
  objectHasOwnProperty: cells[0].objectHasOwnProperty.set,
@@ -1236,6 +1241,18 @@ function observeImports(map, importName, importIndex) {
1236
1241
  importMeta: {},
1237
1242
  });
1238
1243
  functors[49]({
1244
+ imports(entries) {
1245
+ const map = new Map(entries);
1246
+ observeImports(map, "./commons.js", 0);
1247
+ },
1248
+ liveVar: {
1249
+ },
1250
+ onceVar: {
1251
+ tameRegeneratorRuntime: cells[49].tameRegeneratorRuntime.set,
1252
+ },
1253
+ importMeta: {},
1254
+ });
1255
+ functors[50]({
1239
1256
  imports(entries) {
1240
1257
  const map = new Map(entries);
1241
1258
  observeImports(map, "@endo/env-options", 3);
@@ -1262,20 +1279,21 @@ function observeImports(map, importName, importIndex) {
1262
1279
  observeImports(map, "./tame-harden.js", 46);
1263
1280
  observeImports(map, "./tame-symbol-constructor.js", 47);
1264
1281
  observeImports(map, "./tame-faux-data-properties.js", 48);
1282
+ observeImports(map, "./tame-regenerator-runtime.js", 49);
1265
1283
  },
1266
1284
  liveVar: {
1267
1285
  },
1268
1286
  onceVar: {
1269
- repairIntrinsics: cells[49].repairIntrinsics.set,
1287
+ repairIntrinsics: cells[50].repairIntrinsics.set,
1270
1288
  },
1271
1289
  importMeta: {},
1272
1290
  });
1273
- functors[50]({
1291
+ functors[51]({
1274
1292
  imports(entries) {
1275
1293
  const map = new Map(entries);
1276
1294
  observeImports(map, "./assert-sloppy-mode.js", 1);
1277
1295
  observeImports(map, "./commons.js", 0);
1278
- observeImports(map, "./lockdown.js", 49);
1296
+ observeImports(map, "./lockdown.js", 50);
1279
1297
  },
1280
1298
  liveVar: {
1281
1299
  },
@@ -1283,7 +1301,7 @@ function observeImports(map, importName, importIndex) {
1283
1301
  },
1284
1302
  importMeta: {},
1285
1303
  });
1286
- functors[51]({
1304
+ functors[52]({
1287
1305
  imports(entries) {
1288
1306
  const map = new Map(entries);
1289
1307
  observeImports(map, "./commons.js", 0);
@@ -1297,7 +1315,7 @@ function observeImports(map, importName, importIndex) {
1297
1315
  },
1298
1316
  importMeta: {},
1299
1317
  });
1300
- functors[52]({
1318
+ functors[53]({
1301
1319
  imports(entries) {
1302
1320
  const map = new Map(entries);
1303
1321
  observeImports(map, "./commons.js", 0);
@@ -1309,7 +1327,7 @@ function observeImports(map, importName, importIndex) {
1309
1327
  },
1310
1328
  importMeta: {},
1311
1329
  });
1312
- functors[53]({
1330
+ functors[54]({
1313
1331
  imports(entries) {
1314
1332
  const map = new Map(entries);
1315
1333
  observeImports(map, "./commons.js", 0);
@@ -1322,13 +1340,13 @@ function observeImports(map, importName, importIndex) {
1322
1340
  },
1323
1341
  importMeta: {},
1324
1342
  });
1325
- functors[54]({
1343
+ functors[55]({
1326
1344
  imports(entries) {
1327
1345
  const map = new Map(entries);
1328
- observeImports(map, "./src/lockdown-shim.js", 50);
1329
- observeImports(map, "./src/compartment-shim.js", 51);
1330
- observeImports(map, "./src/assert-shim.js", 52);
1331
- observeImports(map, "./src/console-shim.js", 53);
1346
+ observeImports(map, "./src/lockdown-shim.js", 51);
1347
+ observeImports(map, "./src/compartment-shim.js", 52);
1348
+ observeImports(map, "./src/assert-shim.js", 53);
1349
+ observeImports(map, "./src/console-shim.js", 54);
1332
1350
  },
1333
1351
  liveVar: {
1334
1352
  },
@@ -1478,6 +1496,10 @@ const { prototype: generatorPrototype}= getPrototypeOf(
1478
1496
  // eslint-disable-next-line no-empty-function, func-names
1479
1497
  function*() { });$h‍_once.generatorPrototype(generatorPrototype);
1480
1498
 
1499
+ const iteratorPrototype= getPrototypeOf(
1500
+ // eslint-disable-next-line @endo/no-polymorphic-call
1501
+ getPrototypeOf(arrayPrototype.values()));$h‍_once.iteratorPrototype(iteratorPrototype);
1502
+
1481
1503
 
1482
1504
  const typedArrayPrototype= getPrototypeOf(Uint8Array.prototype);$h‍_once.typedArrayPrototype(typedArrayPrototype);
1483
1505
 
@@ -1549,9 +1571,11 @@ const stringReplace= /** @type {any} */
1549
1571
  uncurryThis(stringPrototype.replace);$h‍_once.stringReplace(stringReplace);
1550
1572
 
1551
1573
  const stringSearch= uncurryThis(stringPrototype.search);$h‍_once.stringSearch(stringSearch);
1552
- const stringSlice= uncurryThis(stringPrototype.slice);
1553
- /** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */$h‍_once.stringSlice(stringSlice);
1554
- const stringSplit= uncurryThis(stringPrototype.split);$h‍_once.stringSplit(stringSplit);
1574
+ const stringSlice= uncurryThis(stringPrototype.slice);$h‍_once.stringSlice(stringSlice);
1575
+ const stringSplit=
1576
+ /** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */
1577
+ uncurryThis(stringPrototype.split);$h‍_once.stringSplit(stringSplit);
1578
+
1555
1579
  const stringStartsWith= uncurryThis(stringPrototype.startsWith);$h‍_once.stringStartsWith(stringStartsWith);
1556
1580
  const iterateString= uncurryThis(stringPrototype[iteratorSymbol]);
1557
1581
  //
@@ -8566,8 +8590,8 @@ const tameConsole= (
8566
8590
  }
8567
8591
 
8568
8592
  globalProcess.on('uncaughtException', (error)=>{
8569
- // causalConsole is born frozen so not vulnerable to method tampering.
8570
- ourConsole.error(error);
8593
+ // See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNCAUGHT_EXCEPTION.md
8594
+ ourConsole.error('SES_UNCAUGHT_EXCEPTION:', error);
8571
8595
  if( terminate) {
8572
8596
  terminate();
8573
8597
  }
@@ -8579,8 +8603,9 @@ const tameConsole= (
8579
8603
  typeof globalProcess.on=== 'function')
8580
8604
  {
8581
8605
  const handleRejection= (reason)=>{
8582
- // 'platform' and 'report' just log the reason.
8606
+ // See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNHANDLED_REJECTION.md
8583
8607
  ourConsole.error('SES_UNHANDLED_REJECTION:', reason);
8608
+ // 'platform' and 'report' just log the reason.
8584
8609
  };
8585
8610
  // Maybe track unhandled promise rejections.
8586
8611
  const h= makeRejectionHandlers(handleRejection);
@@ -8601,8 +8626,9 @@ const tameConsole= (
8601
8626
  {
8602
8627
  globalWindow.addEventListener('error', (event)=>{
8603
8628
  event.preventDefault();
8629
+ // See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNCAUGHT_EXCEPTION.md
8630
+ ourConsole.error('SES_UNCAUGHT_EXCEPTION:', event.error);
8604
8631
  // 'platform' and 'report' just log the reason.
8605
- ourConsole.error(event.error);
8606
8632
  if( errorTrapping=== 'exit'|| errorTrapping=== 'abort') {
8607
8633
  globalWindow.location.href= `about:blank`;
8608
8634
  }
@@ -8614,6 +8640,7 @@ const tameConsole= (
8614
8640
  typeof globalWindow.addEventListener=== 'function')
8615
8641
  {
8616
8642
  const handleRejection= (reason)=>{
8643
+ // See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNHANDLED_REJECTION.md
8617
8644
  ourConsole.error('SES_UNHANDLED_REJECTION:', reason);
8618
8645
  };
8619
8646
 
@@ -11359,7 +11386,11 @@ const getAnonymousIntrinsics= ()=> {
11359
11386
 
11360
11387
  intrinsics['%WrapForValidIteratorPrototype%']= getPrototypeOf(
11361
11388
  // eslint-disable-next-line @endo/no-polymorphic-call
11362
- globalThis.Iterator.from({ next() { }}));
11389
+ globalThis.Iterator.from({
11390
+ next() {
11391
+ return { value: undefined};
11392
+ }}));
11393
+
11363
11394
 
11364
11395
  }
11365
11396
 
@@ -11382,6 +11413,9 @@ const getAnonymousIntrinsics= ()=> {
11382
11413
  ({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => (function () { 'use strict'; let TypeError,freeze;$h‍_imports([["./commons.js", [["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["freeze", [$h‍_a => (freeze = $h‍_a)]]]]]);
11383
11414
 
11384
11415
 
11416
+ /** @import {Harden} from '../types.js'; */
11417
+
11418
+ /** @type {(safeHarden: Harden, hardenTaming: 'safe' | 'unsafe') => Harden} */
11385
11419
  const tameHarden= (safeHarden, hardenTaming)=> {
11386
11420
  if( hardenTaming!== 'safe'&& hardenTaming!== 'unsafe') {
11387
11421
  throw TypeError( `unrecognized fakeHardenOption ${hardenTaming}`);
@@ -11397,6 +11431,7 @@ const tameHarden= (safeHarden, hardenTaming)=> {
11397
11431
  Object.isSealed= ()=> true;
11398
11432
  Reflect.isExtensible= ()=> false;
11399
11433
 
11434
+ // @ts-expect-error secret property
11400
11435
  if( safeHarden.isFake) {
11401
11436
  // The "safe" hardener is already a fake hardener.
11402
11437
  // Just use it.
@@ -11691,7 +11726,40 @@ const tameFauxDataProperties= (intrinsics)=>{
11691
11726
  })()
11692
11727
  ,
11693
11728
  // === functors[49] ===
11694
- ({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => (function () { 'use strict'; let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties;$h‍_imports([["@endo/env-options", [["getEnvironmentOption", [$h‍_a => (getenv = $h‍_a)]]]],["./commons.js", [["FERAL_FUNCTION", [$h‍_a => (FERAL_FUNCTION = $h‍_a)]],["FERAL_EVAL", [$h‍_a => (FERAL_EVAL = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["arrayFilter", [$h‍_a => (arrayFilter = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["ownKeys", [$h‍_a => (ownKeys = $h‍_a)]],["stringSplit", [$h‍_a => (stringSplit = $h‍_a)]],["noEvalEvaluate", [$h‍_a => (noEvalEvaluate = $h‍_a)]],["getOwnPropertyNames", [$h‍_a => (getOwnPropertyNames = $h‍_a)]],["getPrototypeOf", [$h‍_a => (getPrototypeOf = $h‍_a)]]]],["./make-hardener.js", [["makeHardener", [$h‍_a => (makeHardener = $h‍_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h‍_a => (makeIntrinsicsCollector = $h‍_a)]]]],["./permits-intrinsics.js", [["default", [$h‍_a => (whitelistIntrinsics = $h‍_a)]]]],["./tame-function-constructors.js", [["default", [$h‍_a => (tameFunctionConstructors = $h‍_a)]]]],["./tame-date-constructor.js", [["default", [$h‍_a => (tameDateConstructor = $h‍_a)]]]],["./tame-math-object.js", [["default", [$h‍_a => (tameMathObject = $h‍_a)]]]],["./tame-regexp-constructor.js", [["default", [$h‍_a => (tameRegExpConstructor = $h‍_a)]]]],["./enable-property-overrides.js", [["default", [$h‍_a => (enablePropertyOverrides = $h‍_a)]]]],["./tame-locale-methods.js", [["default", [$h‍_a => (tameLocaleMethods = $h‍_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h‍_a => (setGlobalObjectConstantProperties = $h‍_a)]],["setGlobalObjectMutableProperties", [$h‍_a => (setGlobalObjectMutableProperties = $h‍_a)]],["setGlobalObjectEvaluators", [$h‍_a => (setGlobalObjectEvaluators = $h‍_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h‍_a => (makeSafeEvaluator = $h‍_a)]]]],["./permits.js", [["initialGlobalPropertyNames", [$h‍_a => (initialGlobalPropertyNames = $h‍_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h‍_a => (tameFunctionToString = $h‍_a)]]]],["./tame-domains.js", [["tameDomains", [$h‍_a => (tameDomains = $h‍_a)]]]],["./error/tame-console.js", [["tameConsole", [$h‍_a => (tameConsole = $h‍_a)]]]],["./error/tame-error-constructor.js", [["default", [$h‍_a => (tameErrorConstructor = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]],["makeAssert", [$h‍_a => (makeAssert = $h‍_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h‍_a => (getAnonymousIntrinsics = $h‍_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h‍_a => (makeCompartmentConstructor = $h‍_a)]]]],["./tame-harden.js", [["tameHarden", [$h‍_a => (tameHarden = $h‍_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor", [$h‍_a => (tameSymbolConstructor = $h‍_a)]]]],["./tame-faux-data-properties.js", [["tameFauxDataProperties", [$h‍_a => (tameFauxDataProperties = $h‍_a)]]]]]);
11729
+ ({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => (function () { 'use strict'; let defineProperty,iteratorPrototype,iteratorSymbol,objectHasOwnProperty;$h‍_imports([["./commons.js", [["defineProperty", [$h‍_a => (defineProperty = $h‍_a)]],["iteratorPrototype", [$h‍_a => (iteratorPrototype = $h‍_a)]],["iteratorSymbol", [$h‍_a => (iteratorSymbol = $h‍_a)]],["objectHasOwnProperty", [$h‍_a => (objectHasOwnProperty = $h‍_a)]]]]]);
11730
+
11731
+
11732
+
11733
+
11734
+
11735
+
11736
+ const tameRegeneratorRuntime= ()=> {
11737
+ const iter= iteratorPrototype[iteratorSymbol];
11738
+ defineProperty(iteratorPrototype, iteratorSymbol, {
11739
+ configurable: true,
11740
+ get() {
11741
+ return iter;
11742
+ },
11743
+ set(value) {
11744
+ // ignore the assignment on IteratorPrototype
11745
+ if( this=== iteratorPrototype) return;
11746
+ if( objectHasOwnProperty(this, iteratorSymbol)) {
11747
+ this[iteratorSymbol]= value;
11748
+ }
11749
+ defineProperty(this, iteratorSymbol, {
11750
+ value,
11751
+ writable: true,
11752
+ enumerable: true,
11753
+ configurable: true});
11754
+
11755
+ }});
11756
+
11757
+ };$h‍_once.tameRegeneratorRuntime(tameRegeneratorRuntime);
11758
+ })()
11759
+ ,
11760
+ // === functors[50] ===
11761
+ ({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => (function () { 'use strict'; let getenv,FERAL_FUNCTION,FERAL_EVAL,TypeError,arrayFilter,globalThis,is,ownKeys,stringSplit,noEvalEvaluate,getOwnPropertyNames,getPrototypeOf,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,setGlobalObjectEvaluators,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameConsole,tameErrorConstructor,assert,makeAssert,getAnonymousIntrinsics,makeCompartmentConstructor,tameHarden,tameSymbolConstructor,tameFauxDataProperties,tameRegeneratorRuntime;$h‍_imports([["@endo/env-options", [["getEnvironmentOption", [$h‍_a => (getenv = $h‍_a)]]]],["./commons.js", [["FERAL_FUNCTION", [$h‍_a => (FERAL_FUNCTION = $h‍_a)]],["FERAL_EVAL", [$h‍_a => (FERAL_EVAL = $h‍_a)]],["TypeError", [$h‍_a => (TypeError = $h‍_a)]],["arrayFilter", [$h‍_a => (arrayFilter = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]],["is", [$h‍_a => (is = $h‍_a)]],["ownKeys", [$h‍_a => (ownKeys = $h‍_a)]],["stringSplit", [$h‍_a => (stringSplit = $h‍_a)]],["noEvalEvaluate", [$h‍_a => (noEvalEvaluate = $h‍_a)]],["getOwnPropertyNames", [$h‍_a => (getOwnPropertyNames = $h‍_a)]],["getPrototypeOf", [$h‍_a => (getPrototypeOf = $h‍_a)]]]],["./make-hardener.js", [["makeHardener", [$h‍_a => (makeHardener = $h‍_a)]]]],["./intrinsics.js", [["makeIntrinsicsCollector", [$h‍_a => (makeIntrinsicsCollector = $h‍_a)]]]],["./permits-intrinsics.js", [["default", [$h‍_a => (whitelistIntrinsics = $h‍_a)]]]],["./tame-function-constructors.js", [["default", [$h‍_a => (tameFunctionConstructors = $h‍_a)]]]],["./tame-date-constructor.js", [["default", [$h‍_a => (tameDateConstructor = $h‍_a)]]]],["./tame-math-object.js", [["default", [$h‍_a => (tameMathObject = $h‍_a)]]]],["./tame-regexp-constructor.js", [["default", [$h‍_a => (tameRegExpConstructor = $h‍_a)]]]],["./enable-property-overrides.js", [["default", [$h‍_a => (enablePropertyOverrides = $h‍_a)]]]],["./tame-locale-methods.js", [["default", [$h‍_a => (tameLocaleMethods = $h‍_a)]]]],["./global-object.js", [["setGlobalObjectConstantProperties", [$h‍_a => (setGlobalObjectConstantProperties = $h‍_a)]],["setGlobalObjectMutableProperties", [$h‍_a => (setGlobalObjectMutableProperties = $h‍_a)]],["setGlobalObjectEvaluators", [$h‍_a => (setGlobalObjectEvaluators = $h‍_a)]]]],["./make-safe-evaluator.js", [["makeSafeEvaluator", [$h‍_a => (makeSafeEvaluator = $h‍_a)]]]],["./permits.js", [["initialGlobalPropertyNames", [$h‍_a => (initialGlobalPropertyNames = $h‍_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h‍_a => (tameFunctionToString = $h‍_a)]]]],["./tame-domains.js", [["tameDomains", [$h‍_a => (tameDomains = $h‍_a)]]]],["./error/tame-console.js", [["tameConsole", [$h‍_a => (tameConsole = $h‍_a)]]]],["./error/tame-error-constructor.js", [["default", [$h‍_a => (tameErrorConstructor = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]],["makeAssert", [$h‍_a => (makeAssert = $h‍_a)]]]],["./get-anonymous-intrinsics.js", [["getAnonymousIntrinsics", [$h‍_a => (getAnonymousIntrinsics = $h‍_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h‍_a => (makeCompartmentConstructor = $h‍_a)]]]],["./tame-harden.js", [["tameHarden", [$h‍_a => (tameHarden = $h‍_a)]]]],["./tame-symbol-constructor.js", [["tameSymbolConstructor", [$h‍_a => (tameSymbolConstructor = $h‍_a)]]]],["./tame-faux-data-properties.js", [["tameFauxDataProperties", [$h‍_a => (tameFauxDataProperties = $h‍_a)]]]],["./tame-regenerator-runtime.js", [["tameRegeneratorRuntime", [$h‍_a => (tameRegeneratorRuntime = $h‍_a)]]]]]);
11762
+
11695
11763
 
11696
11764
 
11697
11765
 
@@ -11873,12 +11941,20 @@ const repairIntrinsics= (options= {})=> {
11873
11941
  /** @param {string} debugName */
11874
11942
  (debugName)=>debugName!== ''),
11875
11943
 
11944
+ legacyRegeneratorRuntimeTaming= getenv(
11945
+ 'LOCKDOWN_LEGACY_REGENERATOR_RUNTIME_TAMING',
11946
+ 'safe'),
11947
+
11876
11948
  __hardenTaming__= getenv('LOCKDOWN_HARDEN_TAMING', 'safe'),
11877
11949
  dateTaming= 'safe', // deprecated
11878
11950
  mathTaming= 'safe', // deprecated
11879
11951
  ...extraOptions}=
11880
11952
  options;
11881
11953
 
11954
+ legacyRegeneratorRuntimeTaming=== 'safe'||
11955
+ legacyRegeneratorRuntimeTaming=== 'unsafe-ignore'||
11956
+ Fail `lockdown(): non supported option legacyRegeneratorRuntimeTaming: ${q(legacyRegeneratorRuntimeTaming)}`;
11957
+
11882
11958
  evalTaming=== 'unsafeEval'||
11883
11959
  evalTaming=== 'safeEval'||
11884
11960
  evalTaming=== 'noEval'||
@@ -11957,6 +12033,7 @@ const repairIntrinsics= (options= {})=> {
11957
12033
  const { addIntrinsics, completePrototypes, finalIntrinsics}=
11958
12034
  makeIntrinsicsCollector();
11959
12035
 
12036
+ // @ts-expect-error __hardenTaming__ could be any string
11960
12037
  const tamedHarden= tameHarden(safeHarden, __hardenTaming__);
11961
12038
  addIntrinsics({ harden: tamedHarden});
11962
12039
 
@@ -12105,6 +12182,9 @@ const repairIntrinsics= (options= {})=> {
12105
12182
  // clear yet which is better.
12106
12183
  // @ts-ignore enablePropertyOverrides does its own input validation
12107
12184
  enablePropertyOverrides(intrinsics, overrideTaming, overrideDebug);
12185
+ if( legacyRegeneratorRuntimeTaming=== 'unsafe-ignore') {
12186
+ tameRegeneratorRuntime();
12187
+ }
12108
12188
 
12109
12189
  // Finally register and optionally freeze all the intrinsics. This
12110
12190
  // must be the operation that modifies the intrinsics.
@@ -12137,7 +12217,7 @@ const repairIntrinsics= (options= {})=> {
12137
12217
  };$h‍_once.repairIntrinsics(repairIntrinsics);
12138
12218
  })()
12139
12219
  ,
12140
- // === functors[50] ===
12220
+ // === functors[51] ===
12141
12221
  ({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => (function () { 'use strict'; let globalThis,repairIntrinsics;$h‍_imports([["./assert-sloppy-mode.js", []],["./commons.js", [["globalThis", [$h‍_a => (globalThis = $h‍_a)]]]],["./lockdown.js", [["repairIntrinsics", [$h‍_a => (repairIntrinsics = $h‍_a)]]]]]);
12142
12222
 
12143
12223
 
@@ -12150,7 +12230,7 @@ const repairIntrinsics= (options= {})=> {
12150
12230
  /** @import {LockdownOptions} from '../types.js' */
12151
12231
 
12152
12232
  /**
12153
- * @param {LockdownOptions} options
12233
+ * @param {LockdownOptions} [options]
12154
12234
  */
12155
12235
  globalThis.lockdown= (options)=>{
12156
12236
  const hardenIntrinsics= repairIntrinsics(options);
@@ -12158,7 +12238,7 @@ globalThis.lockdown= (options)=>{
12158
12238
  };
12159
12239
 
12160
12240
  /**
12161
- * @param {LockdownOptions} options
12241
+ * @param {LockdownOptions} [options]
12162
12242
  */
12163
12243
  globalThis.repairIntrinsics= (options)=>{
12164
12244
  const hardenIntrinsics= repairIntrinsics(options);
@@ -12177,7 +12257,7 @@ globalThis.repairIntrinsics= (options)=>{
12177
12257
  };
12178
12258
  })()
12179
12259
  ,
12180
- // === functors[51] ===
12260
+ // === functors[52] ===
12181
12261
  ({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => (function () { 'use strict'; let globalThis,makeCompartmentConstructor,tameFunctionToString,getGlobalIntrinsics;$h‍_imports([["./commons.js", [["globalThis", [$h‍_a => (globalThis = $h‍_a)]]]],["./compartment.js", [["makeCompartmentConstructor", [$h‍_a => (makeCompartmentConstructor = $h‍_a)]]]],["./tame-function-tostring.js", [["tameFunctionToString", [$h‍_a => (tameFunctionToString = $h‍_a)]]]],["./intrinsics.js", [["getGlobalIntrinsics", [$h‍_a => (getGlobalIntrinsics = $h‍_a)]]]]]);
12182
12262
 
12183
12263
 
@@ -12194,14 +12274,14 @@ globalThis.Compartment= makeCompartmentConstructor(
12194
12274
  markVirtualizedNativeFunction);
12195
12275
  })()
12196
12276
  ,
12197
- // === functors[52] ===
12277
+ // === functors[53] ===
12198
12278
  ({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => (function () { 'use strict'; let globalThis,assert;$h‍_imports([["./commons.js", [["globalThis", [$h‍_a => (globalThis = $h‍_a)]]]],["./error/assert.js", [["assert", [$h‍_a => (assert = $h‍_a)]]]]]);
12199
12279
 
12200
12280
 
12201
12281
  globalThis.assert= assert;
12202
12282
  })()
12203
12283
  ,
12204
- // === functors[53] ===
12284
+ // === functors[54] ===
12205
12285
  ({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => (function () { 'use strict'; let symbolFor,globalThis,defineCausalConsoleFromLogger,loggedErrorHandler;$h‍_imports([["./commons.js", [["symbolFor", [$h‍_a => (symbolFor = $h‍_a)]],["globalThis", [$h‍_a => (globalThis = $h‍_a)]]]],["./error/console.js", [["defineCausalConsoleFromLogger", [$h‍_a => (defineCausalConsoleFromLogger = $h‍_a)]]]],["./error/assert.js", [["loggedErrorHandler", [$h‍_a => (loggedErrorHandler = $h‍_a)]]]]]);
12206
12286
 
12207
12287
 
@@ -12254,7 +12334,7 @@ globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA]=
12254
12334
  makeCausalConsoleFromLoggerForSesAva;
12255
12335
  })()
12256
12336
  ,
12257
- // === functors[54] ===
12337
+ // === functors[55] ===
12258
12338
  ({ imports: $h‍_imports, liveVar: $h‍_live, onceVar: $h‍_once, importMeta: $h‍____meta, }) => (function () { 'use strict'; $h‍_imports([["./src/lockdown-shim.js", []],["./src/compartment-shim.js", []],["./src/assert-shim.js", []],["./src/console-shim.js", []]]);
12259
12339
  })()
12260
12340
  ,