ses 1.3.0 → 1.4.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/dist/lockdown.cjs +248 -31
- package/dist/lockdown.mjs +248 -31
- package/dist/lockdown.umd.js +248 -31
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +248 -31
- package/dist/ses.mjs +248 -31
- package/dist/ses.umd.js +248 -31
- package/dist/ses.umd.min.js +1 -1
- package/index.js +1 -0
- package/package.json +8 -8
- package/src/commons.js +3 -0
- package/src/console-shim.js +50 -0
- package/src/error/README.md +9 -1
- package/src/error/console.js +146 -17
- package/src/make-eval-function.js +1 -1
- package/src/tame-regexp-constructor.js +13 -6
package/dist/lockdown.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ses@1.
|
|
1
|
+
// ses@1.4.0
|
|
2
2
|
'use strict';
|
|
3
3
|
(() => {
|
|
4
4
|
const functors = [
|
|
@@ -164,6 +164,9 @@ const arrayIncludes= uncurryThis(arrayPrototype.includes);$h_once.arr
|
|
|
164
164
|
const arrayJoin= uncurryThis(arrayPrototype.join);
|
|
165
165
|
/** @type {<T, U>(thisArg: readonly T[], callbackfn: (value: T, index: number, array: T[]) => U, cbThisArg?: any) => U[]} */$h_once.arrayJoin(arrayJoin);
|
|
166
166
|
const arrayMap= /** @type {any} */ uncurryThis(arrayPrototype.map);$h_once.arrayMap(arrayMap);
|
|
167
|
+
const arrayFlatMap= /** @type {any} */
|
|
168
|
+
uncurryThis(arrayPrototype.flatMap);$h_once.arrayFlatMap(arrayFlatMap);
|
|
169
|
+
|
|
167
170
|
const arrayPop= uncurryThis(arrayPrototype.pop);
|
|
168
171
|
/** @type {<T>(thisArg: T[], ...items: T[]) => number} */$h_once.arrayPop(arrayPop);
|
|
169
172
|
const arrayPush= uncurryThis(arrayPrototype.push);$h_once.arrayPush(arrayPush);
|
|
@@ -4683,21 +4686,28 @@ function tameRegExpConstructor(regExpTaming= 'safe') {
|
|
|
4683
4686
|
return construct(FERAL_REG_EXP, rest, new.target);
|
|
4684
4687
|
};
|
|
4685
4688
|
|
|
4686
|
-
const speciesDesc= getOwnPropertyDescriptor(FERAL_REG_EXP, speciesSymbol);
|
|
4687
|
-
if( !speciesDesc) {
|
|
4688
|
-
throw TypeError('no RegExp[Symbol.species] descriptor');
|
|
4689
|
-
}
|
|
4690
|
-
|
|
4691
4689
|
defineProperties(ResultRegExp, {
|
|
4692
4690
|
length: { value: 2},
|
|
4693
4691
|
prototype: {
|
|
4694
4692
|
value: RegExpPrototype,
|
|
4695
4693
|
writable: false,
|
|
4696
4694
|
enumerable: false,
|
|
4697
|
-
configurable: false}
|
|
4695
|
+
configurable: false}});
|
|
4696
|
+
|
|
4698
4697
|
|
|
4699
|
-
|
|
4698
|
+
// Hermes does not have `Symbol.species`. We should support such platforms.
|
|
4699
|
+
if( speciesSymbol) {
|
|
4700
|
+
const speciesDesc= getOwnPropertyDescriptor(
|
|
4701
|
+
FERAL_REG_EXP,
|
|
4702
|
+
speciesSymbol);
|
|
4700
4703
|
|
|
4704
|
+
if( !speciesDesc) {
|
|
4705
|
+
throw TypeError('no RegExp[Symbol.species] descriptor');
|
|
4706
|
+
}
|
|
4707
|
+
defineProperties(ResultRegExp, {
|
|
4708
|
+
[speciesSymbol]: speciesDesc});
|
|
4709
|
+
|
|
4710
|
+
}
|
|
4701
4711
|
return ResultRegExp;
|
|
4702
4712
|
};
|
|
4703
4713
|
|
|
@@ -5267,7 +5277,7 @@ function tameLocaleMethods(intrinsics, localeTaming= 'safe') {
|
|
|
5267
5277
|
* @param {Function} safeEvaluate
|
|
5268
5278
|
*/
|
|
5269
5279
|
const makeEvalFunction= (safeEvaluate)=>{
|
|
5270
|
-
// We use the
|
|
5280
|
+
// We use the concise method syntax to create an eval without a
|
|
5271
5281
|
// [[Construct]] behavior (such that the invocation "new eval()" throws
|
|
5272
5282
|
// TypeError: eval is not a constructor"), but which still accepts a
|
|
5273
5283
|
// 'this' binding.
|
|
@@ -6617,7 +6627,11 @@ function tameDomains(domainTaming= 'safe') {
|
|
|
6617
6627
|
})()
|
|
6618
6628
|
,
|
|
6619
6629
|
// === functors[34] ===
|
|
6620
|
-
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 'use strict'; let WeakSet,arrayFilter,arrayMap,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,weaksetAdd,weaksetHas;$h_imports([["../commons.js", [["WeakSet", [$h_a => (WeakSet = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $h_a)]],["arrayMap", [$h_a => (arrayMap = $h_a)]],["arrayPush", [$h_a => (arrayPush = $h_a)]],["defineProperty", [$h_a => (defineProperty = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["fromEntries", [$h_a => (fromEntries = $h_a)]],["isError", [$h_a => (isError = $h_a)]],["stringEndsWith", [$h_a => (stringEndsWith = $h_a)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
6630
|
+
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 'use strict'; let WeakSet,arrayFilter,arrayFlatMap,arrayMap,arrayPop,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,stringIncludes,stringSplit,weaksetAdd,weaksetHas;$h_imports([["../commons.js", [["WeakSet", [$h_a => (WeakSet = $h_a)]],["arrayFilter", [$h_a => (arrayFilter = $h_a)]],["arrayFlatMap", [$h_a => (arrayFlatMap = $h_a)]],["arrayMap", [$h_a => (arrayMap = $h_a)]],["arrayPop", [$h_a => (arrayPop = $h_a)]],["arrayPush", [$h_a => (arrayPush = $h_a)]],["defineProperty", [$h_a => (defineProperty = $h_a)]],["freeze", [$h_a => (freeze = $h_a)]],["fromEntries", [$h_a => (fromEntries = $h_a)]],["isError", [$h_a => (isError = $h_a)]],["stringEndsWith", [$h_a => (stringEndsWith = $h_a)]],["stringIncludes", [$h_a => (stringIncludes = $h_a)]],["stringSplit", [$h_a => (stringSplit = $h_a)]],["weaksetAdd", [$h_a => (weaksetAdd = $h_a)]],["weaksetHas", [$h_a => (weaksetHas = $h_a)]]]],["./types.js", []],["./internal-types.js", []]]);
|
|
6631
|
+
|
|
6632
|
+
|
|
6633
|
+
|
|
6634
|
+
|
|
6621
6635
|
|
|
6622
6636
|
|
|
6623
6637
|
|
|
@@ -6665,8 +6679,17 @@ function tameDomains(domainTaming= 'safe') {
|
|
|
6665
6679
|
|
|
6666
6680
|
/** @typedef {keyof VirtualConsole | 'profile' | 'profileEnd'} ConsoleProps */
|
|
6667
6681
|
|
|
6668
|
-
/**
|
|
6669
|
-
|
|
6682
|
+
/**
|
|
6683
|
+
* Those console methods whose actual parameters are `(fmt?, ...args)`
|
|
6684
|
+
* even if their TypeScript types claim otherwise.
|
|
6685
|
+
*
|
|
6686
|
+
* Each is paired with what we consider to be their log severity level.
|
|
6687
|
+
* This is the same as the log severity of these on other
|
|
6688
|
+
* platform console implementations when they all agree.
|
|
6689
|
+
*
|
|
6690
|
+
* @type {readonly [ConsoleProps, LogSeverity | undefined][]}
|
|
6691
|
+
*/
|
|
6692
|
+
const consoleLevelMethods= freeze([
|
|
6670
6693
|
['debug', 'debug'], // (fmt?, ...args) verbose level on Chrome
|
|
6671
6694
|
['log', 'log'], // (fmt?, ...args) info level on Chrome
|
|
6672
6695
|
['info', 'info'], // (fmt?, ...args)
|
|
@@ -6674,13 +6697,22 @@ const consoleLevelMethods= freeze([
|
|
|
6674
6697
|
['error', 'error'], // (fmt?, ...args)
|
|
6675
6698
|
|
|
6676
6699
|
['trace', 'log'], // (fmt?, ...args)
|
|
6677
|
-
['dirxml', 'log'], // (fmt?, ...args)
|
|
6678
|
-
['group', 'log'], // (fmt?, ...args)
|
|
6679
|
-
['groupCollapsed', 'log'] // (fmt?, ...args)
|
|
6700
|
+
['dirxml', 'log'], // (fmt?, ...args) but TS typed (...data)
|
|
6701
|
+
['group', 'log'], // (fmt?, ...args) but TS typed (...label)
|
|
6702
|
+
['groupCollapsed', 'log'] // (fmt?, ...args) but TS typed (...label)
|
|
6680
6703
|
]);
|
|
6681
6704
|
|
|
6682
|
-
/**
|
|
6683
|
-
|
|
6705
|
+
/**
|
|
6706
|
+
* Those console methods other than those already enumerated by
|
|
6707
|
+
* `consoleLevelMethods`.
|
|
6708
|
+
*
|
|
6709
|
+
* Each is paired with what we consider to be their log severity level.
|
|
6710
|
+
* This is the same as the log severity of these on other
|
|
6711
|
+
* platform console implementations when they all agree.
|
|
6712
|
+
*
|
|
6713
|
+
* @type {readonly [ConsoleProps, LogSeverity | undefined][]}
|
|
6714
|
+
*/$h_once.consoleLevelMethods(consoleLevelMethods);
|
|
6715
|
+
const consoleOtherMethods= freeze([
|
|
6684
6716
|
['assert', 'error'], // (value, fmt?, ...args)
|
|
6685
6717
|
['timeLog', 'log'], // (label?, ...args) no fmt string
|
|
6686
6718
|
|
|
@@ -6703,8 +6735,8 @@ const consoleOtherMethods= freeze([
|
|
|
6703
6735
|
['timeStamp', undefined] // (label?)
|
|
6704
6736
|
]);
|
|
6705
6737
|
|
|
6706
|
-
/** @type {readonly [ConsoleProps, LogSeverity | undefined][]}
|
|
6707
|
-
const
|
|
6738
|
+
/** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */$h_once.consoleOtherMethods(consoleOtherMethods);
|
|
6739
|
+
const consoleWhitelist= freeze([
|
|
6708
6740
|
...consoleLevelMethods,
|
|
6709
6741
|
...consoleOtherMethods]);
|
|
6710
6742
|
|
|
@@ -6736,10 +6768,10 @@ const consoleWhitelist= freeze([
|
|
|
6736
6768
|
* ]);
|
|
6737
6769
|
*/
|
|
6738
6770
|
|
|
6739
|
-
//
|
|
6771
|
+
// //////////////////////////// Logging Console ////////////////////////////////
|
|
6740
6772
|
|
|
6741
|
-
/** @type {MakeLoggingConsoleKit}
|
|
6742
|
-
const
|
|
6773
|
+
/** @type {MakeLoggingConsoleKit} */
|
|
6774
|
+
const makeLoggingConsoleKit= (
|
|
6743
6775
|
loggedErrorHandler,
|
|
6744
6776
|
{ shouldResetForDebugging= false}= {})=>
|
|
6745
6777
|
{
|
|
@@ -6781,10 +6813,24 @@ const makeLoggingConsoleKit= (
|
|
|
6781
6813
|
};$h_once.makeLoggingConsoleKit(makeLoggingConsoleKit);
|
|
6782
6814
|
freeze(makeLoggingConsoleKit);
|
|
6783
6815
|
|
|
6816
|
+
/**
|
|
6817
|
+
* Makes the same calls on a `baseConsole` that were made on a
|
|
6818
|
+
* `loggingConsole` to produce this `log`. In this way, a logging console
|
|
6819
|
+
* can be used as a buffer to delay the application of these calls to a
|
|
6820
|
+
* `baseConsole`.
|
|
6821
|
+
*
|
|
6822
|
+
* @param {LogRecord[]} log
|
|
6823
|
+
* @param {VirtualConsole} baseConsole
|
|
6824
|
+
*/
|
|
6825
|
+
const pumpLogToConsole= (log, baseConsole)=> {
|
|
6826
|
+
for( const [name, ...args]of log) {
|
|
6827
|
+
// eslint-disable-next-line @endo/no-polymorphic-call
|
|
6828
|
+
baseConsole[name](...args);
|
|
6829
|
+
}
|
|
6830
|
+
};
|
|
6831
|
+
// //////////////////////////// Causal Console /////////////////////////////////
|
|
6784
6832
|
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
/** @type {ErrorInfo} */
|
|
6833
|
+
/** @type {ErrorInfo} */$h_once.pumpLogToConsole(pumpLogToConsole);
|
|
6788
6834
|
const ErrorInfo= {
|
|
6789
6835
|
NOTE: 'ERROR_NOTE:',
|
|
6790
6836
|
MESSAGE: 'ERROR_MESSAGE:',
|
|
@@ -6794,7 +6840,7 @@ const ErrorInfo= {
|
|
|
6794
6840
|
freeze(ErrorInfo);
|
|
6795
6841
|
|
|
6796
6842
|
/** @type {MakeCausalConsole} */
|
|
6797
|
-
const
|
|
6843
|
+
const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
6798
6844
|
if( !baseConsole) {
|
|
6799
6845
|
return undefined;
|
|
6800
6846
|
}
|
|
@@ -6982,11 +7028,105 @@ const makeCausalConsole= (baseConsole, loggedErrorHandler)=> {
|
|
|
6982
7028
|
};$h_once.makeCausalConsole(makeCausalConsole);
|
|
6983
7029
|
freeze(makeCausalConsole);
|
|
6984
7030
|
|
|
7031
|
+
/**
|
|
7032
|
+
* @typedef {(...args: unknown[]) => void} Logger
|
|
7033
|
+
*/
|
|
6985
7034
|
|
|
6986
|
-
|
|
7035
|
+
/**
|
|
7036
|
+
* This is a rather horrible kludge to indent the output to a logger in
|
|
7037
|
+
* the case where some arguments are strings containing newlines. Part of
|
|
7038
|
+
* the problem is that console-like loggers, including the one in ava,
|
|
7039
|
+
* join the string arguments of the log message with a space.
|
|
7040
|
+
* Because of this, there's an extra space at the beginning of each of
|
|
7041
|
+
* the split lines. So this kludge compensated by putting an extra empty
|
|
7042
|
+
* string at the beginning, so that the logger will add the same extra
|
|
7043
|
+
* joiner.
|
|
7044
|
+
* TODO: Fix this horrible kludge, and indent in a sane manner.
|
|
7045
|
+
*
|
|
7046
|
+
* @param {string} str
|
|
7047
|
+
* @param {string} sep
|
|
7048
|
+
* @param {string[]} indents
|
|
7049
|
+
* @returns {string[]}
|
|
7050
|
+
*/
|
|
7051
|
+
const indentAfterAllSeps= (str, sep, indents)=> {
|
|
7052
|
+
const [firstLine, ...restLines]= stringSplit(str, sep);
|
|
7053
|
+
const indentedRest= arrayFlatMap(restLines, (line)=>[sep, ...indents, line]);
|
|
7054
|
+
return ['', firstLine, ...indentedRest];
|
|
7055
|
+
};
|
|
7056
|
+
|
|
7057
|
+
/**
|
|
7058
|
+
* @param {LoggedErrorHandler} loggedErrorHandler
|
|
7059
|
+
*/
|
|
7060
|
+
const defineCausalConsoleFromLogger= (loggedErrorHandler)=>{
|
|
7061
|
+
/**
|
|
7062
|
+
* Implement the `VirtualConsole` API badly by turning all calls into
|
|
7063
|
+
* calls on `tlogger`. We need to do this to have `console` logging
|
|
7064
|
+
* turn into calls to Ava's `t.log`, so these console log messages
|
|
7065
|
+
* are output in the right place.
|
|
7066
|
+
*
|
|
7067
|
+
* @param {Logger} tlogger
|
|
7068
|
+
* @returns {VirtualConsole}
|
|
7069
|
+
*/
|
|
7070
|
+
const makeCausalConsoleFromLogger= (tlogger)=>{
|
|
7071
|
+
const indents= [];
|
|
7072
|
+
const logWithIndent= (...args)=> {
|
|
7073
|
+
if( indents.length> 0) {
|
|
7074
|
+
args= arrayFlatMap(args, (arg)=>
|
|
7075
|
+
typeof arg=== 'string'&& stringIncludes(arg, '\n')?
|
|
7076
|
+
indentAfterAllSeps(arg, '\n', indents):
|
|
7077
|
+
[arg]);
|
|
7078
|
+
|
|
7079
|
+
args= [...indents, ...args];
|
|
7080
|
+
}
|
|
7081
|
+
return tlogger(...args);
|
|
7082
|
+
};
|
|
7083
|
+
const makeNamed= (name, fn)=>
|
|
7084
|
+
({ [name]: (...args)=> fn(...args)})[ name];
|
|
7085
|
+
|
|
7086
|
+
const baseConsole= fromEntries([
|
|
7087
|
+
...arrayMap(consoleLevelMethods, ([name])=> [
|
|
7088
|
+
name,
|
|
7089
|
+
makeNamed(name, logWithIndent)]),
|
|
7090
|
+
|
|
7091
|
+
...arrayMap(consoleOtherMethods, ([name])=> [
|
|
7092
|
+
name,
|
|
7093
|
+
makeNamed(name, (...args)=> logWithIndent(name, ...args))])]);
|
|
7094
|
+
|
|
7095
|
+
|
|
7096
|
+
// https://console.spec.whatwg.org/#grouping
|
|
7097
|
+
for( const name of ['group', 'groupCollapsed']) {
|
|
7098
|
+
if( baseConsole[name]) {
|
|
7099
|
+
baseConsole[name]= makeNamed(name, (...args)=> {
|
|
7100
|
+
if( args.length>= 1) {
|
|
7101
|
+
// Prefix the logged data with "group" or "groupCollapsed".
|
|
7102
|
+
logWithIndent(...args);
|
|
7103
|
+
}
|
|
7104
|
+
// A single space is enough;
|
|
7105
|
+
// the host console will separate them with additional spaces.
|
|
7106
|
+
arrayPush(indents, ' ');
|
|
7107
|
+
});
|
|
7108
|
+
}
|
|
7109
|
+
}
|
|
7110
|
+
if( baseConsole.groupEnd) {
|
|
7111
|
+
baseConsole.groupEnd= makeNamed('groupEnd', (...args)=> {
|
|
7112
|
+
arrayPop(indents);
|
|
7113
|
+
});
|
|
7114
|
+
}
|
|
7115
|
+
harden(baseConsole);
|
|
7116
|
+
const causalConsole= makeCausalConsole(
|
|
7117
|
+
/** @type {VirtualConsole} */ baseConsole,
|
|
7118
|
+
loggedErrorHandler);
|
|
7119
|
+
|
|
7120
|
+
return (/** @type {VirtualConsole} */ causalConsole);
|
|
7121
|
+
};
|
|
7122
|
+
return freeze(makeCausalConsoleFromLogger);
|
|
7123
|
+
};$h_once.defineCausalConsoleFromLogger(defineCausalConsoleFromLogger);
|
|
7124
|
+
freeze(defineCausalConsoleFromLogger);
|
|
7125
|
+
|
|
7126
|
+
// ///////////////////////// Filter Console ////////////////////////////////////
|
|
6987
7127
|
|
|
6988
7128
|
/** @type {FilterConsole} */
|
|
6989
|
-
const
|
|
7129
|
+
const filterConsole= (baseConsole, filter, _topic= undefined)=> {
|
|
6990
7130
|
// TODO do something with optional topic string
|
|
6991
7131
|
const whitelist= arrayFilter(
|
|
6992
7132
|
consoleWhitelist,
|
|
@@ -10550,7 +10690,60 @@ globalThis.assert= assert;
|
|
|
10550
10690
|
})()
|
|
10551
10691
|
,
|
|
10552
10692
|
// === functors[53] ===
|
|
10553
|
-
({ imports: $h_imports, liveVar: $h_live, onceVar: $h_once, importMeta: $h____meta, }) => (function () { 'use strict';
|
|
10693
|
+
({ 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)]]]]]);
|
|
10694
|
+
|
|
10695
|
+
|
|
10696
|
+
|
|
10697
|
+
// TODO possible additional exports. Some are privileged.
|
|
10698
|
+
// export { loggedErrorHandler };
|
|
10699
|
+
// export {
|
|
10700
|
+
// makeCausalConsole,
|
|
10701
|
+
// consoleLevelMethods,
|
|
10702
|
+
// consoleOtherMethods,
|
|
10703
|
+
// makeLoggingConsoleKit,
|
|
10704
|
+
// filterConsole,
|
|
10705
|
+
// pumpLogToConsole,
|
|
10706
|
+
// } from './src/error/console.js';
|
|
10707
|
+
// export { assertLogs, throwsAndLogs } from './src/error/throws-and-logs.js';
|
|
10708
|
+
|
|
10709
|
+
/**
|
|
10710
|
+
* Makes a Console like the
|
|
10711
|
+
* [SES causal `console`](https://github.com/endojs/endo/blob/master/packages/ses/src/error/README.md)
|
|
10712
|
+
* but whose output is redirected to the supplied `logger` function.
|
|
10713
|
+
*/
|
|
10714
|
+
const makeCausalConsoleFromLoggerForSesAva=
|
|
10715
|
+
defineCausalConsoleFromLogger(loggedErrorHandler);
|
|
10716
|
+
|
|
10717
|
+
/**
|
|
10718
|
+
*`makeCausalConsoleFromLoggerForSesAva` is privileged because it exposes
|
|
10719
|
+
* unredacted error info onto the `Logger` provided by the caller. It
|
|
10720
|
+
* should not be made available to non-privileged code.
|
|
10721
|
+
*
|
|
10722
|
+
* Further, we consider this particular API choice to be experimental
|
|
10723
|
+
* and may change in the future. It is currently only intended for use by
|
|
10724
|
+
* `@endo/ses-ava`, with which it will be co-maintained.
|
|
10725
|
+
*
|
|
10726
|
+
* Thus, this `console-shim.js` makes `makeCausalConsoleFromLoggerForSesAva`
|
|
10727
|
+
* available on `globalThis` which it *assumes* is the global of the start
|
|
10728
|
+
* compartment and is therefore allowed to hold powers that should not be
|
|
10729
|
+
* available in constructed compartments. It makes it available as the value of
|
|
10730
|
+
* a global property named by a registered symbol named
|
|
10731
|
+
* `MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA`.
|
|
10732
|
+
*
|
|
10733
|
+
* Anyone accessing this, including `@endo/ses-ava`, should feature test for
|
|
10734
|
+
* this and be tolerant of its absence. It may indeed disappear from later
|
|
10735
|
+
* versions of the ses-shim.
|
|
10736
|
+
*/
|
|
10737
|
+
const MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA= symbolFor(
|
|
10738
|
+
'MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA');
|
|
10739
|
+
|
|
10740
|
+
|
|
10741
|
+
globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA]=
|
|
10742
|
+
makeCausalConsoleFromLoggerForSesAva;
|
|
10743
|
+
})()
|
|
10744
|
+
,
|
|
10745
|
+
// === functors[54] ===
|
|
10746
|
+
({ 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", []]]);
|
|
10554
10747
|
})()
|
|
10555
10748
|
,
|
|
10556
10749
|
]; // functors end
|
|
@@ -10660,6 +10853,7 @@ globalThis.assert= assert;
|
|
|
10660
10853
|
arrayIncludes: cell("arrayIncludes"),
|
|
10661
10854
|
arrayJoin: cell("arrayJoin"),
|
|
10662
10855
|
arrayMap: cell("arrayMap"),
|
|
10856
|
+
arrayFlatMap: cell("arrayFlatMap"),
|
|
10663
10857
|
arrayPop: cell("arrayPop"),
|
|
10664
10858
|
arrayPush: cell("arrayPush"),
|
|
10665
10859
|
arraySlice: cell("arraySlice"),
|
|
@@ -10840,10 +11034,13 @@ globalThis.assert= assert;
|
|
|
10840
11034
|
tameDomains: cell("tameDomains"),
|
|
10841
11035
|
},
|
|
10842
11036
|
{
|
|
11037
|
+
consoleLevelMethods: cell("consoleLevelMethods"),
|
|
11038
|
+
consoleOtherMethods: cell("consoleOtherMethods"),
|
|
10843
11039
|
makeLoggingConsoleKit: cell("makeLoggingConsoleKit"),
|
|
11040
|
+
pumpLogToConsole: cell("pumpLogToConsole"),
|
|
10844
11041
|
makeCausalConsole: cell("makeCausalConsole"),
|
|
11042
|
+
defineCausalConsoleFromLogger: cell("defineCausalConsoleFromLogger"),
|
|
10845
11043
|
filterConsole: cell("filterConsole"),
|
|
10846
|
-
consoleWhitelist: cell("consoleWhitelist"),
|
|
10847
11044
|
},
|
|
10848
11045
|
{
|
|
10849
11046
|
makeRejectionHandlers: cell("makeRejectionHandlers"),
|
|
@@ -10908,6 +11105,8 @@ globalThis.assert= assert;
|
|
|
10908
11105
|
},
|
|
10909
11106
|
{
|
|
10910
11107
|
},
|
|
11108
|
+
{
|
|
11109
|
+
},
|
|
10911
11110
|
];
|
|
10912
11111
|
|
|
10913
11112
|
Object.defineProperties(cells[3], Object.getOwnPropertyDescriptors(cells[2]));
|
|
@@ -11030,6 +11229,7 @@ function observeImports(map, importName, importIndex) {
|
|
|
11030
11229
|
arrayIncludes: cells[0].arrayIncludes.set,
|
|
11031
11230
|
arrayJoin: cells[0].arrayJoin.set,
|
|
11032
11231
|
arrayMap: cells[0].arrayMap.set,
|
|
11232
|
+
arrayFlatMap: cells[0].arrayFlatMap.set,
|
|
11033
11233
|
arrayPop: cells[0].arrayPop.set,
|
|
11034
11234
|
arrayPush: cells[0].arrayPush.set,
|
|
11035
11235
|
arraySlice: cells[0].arraySlice.set,
|
|
@@ -11538,10 +11738,13 @@ function observeImports(map, importName, importIndex) {
|
|
|
11538
11738
|
liveVar: {
|
|
11539
11739
|
},
|
|
11540
11740
|
onceVar: {
|
|
11741
|
+
consoleLevelMethods: cells[34].consoleLevelMethods.set,
|
|
11742
|
+
consoleOtherMethods: cells[34].consoleOtherMethods.set,
|
|
11541
11743
|
makeLoggingConsoleKit: cells[34].makeLoggingConsoleKit.set,
|
|
11744
|
+
pumpLogToConsole: cells[34].pumpLogToConsole.set,
|
|
11542
11745
|
makeCausalConsole: cells[34].makeCausalConsole.set,
|
|
11746
|
+
defineCausalConsoleFromLogger: cells[34].defineCausalConsoleFromLogger.set,
|
|
11543
11747
|
filterConsole: cells[34].filterConsole.set,
|
|
11544
|
-
consoleWhitelist: cells[34].consoleWhitelist.set,
|
|
11545
11748
|
},
|
|
11546
11749
|
importMeta: {},
|
|
11547
11750
|
});
|
|
@@ -11824,11 +12027,25 @@ function observeImports(map, importName, importIndex) {
|
|
|
11824
12027
|
importMeta: {},
|
|
11825
12028
|
});
|
|
11826
12029
|
functors[53]({
|
|
12030
|
+
imports(entries) {
|
|
12031
|
+
const map = new Map(entries);
|
|
12032
|
+
observeImports(map, "./commons.js", 0);
|
|
12033
|
+
observeImports(map, "./error/console.js", 34);
|
|
12034
|
+
observeImports(map, "./error/assert.js", 9);
|
|
12035
|
+
},
|
|
12036
|
+
liveVar: {
|
|
12037
|
+
},
|
|
12038
|
+
onceVar: {
|
|
12039
|
+
},
|
|
12040
|
+
importMeta: {},
|
|
12041
|
+
});
|
|
12042
|
+
functors[54]({
|
|
11827
12043
|
imports(entries) {
|
|
11828
12044
|
const map = new Map(entries);
|
|
11829
12045
|
observeImports(map, "./src/lockdown-shim.js", 50);
|
|
11830
12046
|
observeImports(map, "./src/compartment-shim.js", 51);
|
|
11831
12047
|
observeImports(map, "./src/assert-shim.js", 52);
|
|
12048
|
+
observeImports(map, "./src/console-shim.js", 53);
|
|
11832
12049
|
},
|
|
11833
12050
|
liveVar: {
|
|
11834
12051
|
},
|