From 41d91463fa911113313da68ef6e5bb7ffefd070d Mon Sep 17 00:00:00 2001 From: xiphiness Date: Thu, 16 Mar 2023 14:20:38 -0600 Subject: [PATCH 01/49] json-bgon: pull changes from urbit/urbit:#5877 --- package.json | 4 +- src/Urbit.ts | 165 ++++++---- src/index.ts | 2 + src/nockjs/TODO | 42 +++ src/nockjs/bits.js | 333 +++++++++++++++++++ src/nockjs/compiler.js | 726 +++++++++++++++++++++++++++++++++++++++++ src/nockjs/hamt.js | 137 ++++++++ src/nockjs/list.js | 40 +++ src/nockjs/noun.js | 479 +++++++++++++++++++++++++++ src/nockjs/serial.js | 167 ++++++++++ src/types.ts | 17 +- 11 files changed, 2031 insertions(+), 81 deletions(-) create mode 100644 src/nockjs/TODO create mode 100644 src/nockjs/bits.js create mode 100644 src/nockjs/compiler.js create mode 100644 src/nockjs/hamt.js create mode 100644 src/nockjs/list.js create mode 100644 src/nockjs/noun.js create mode 100644 src/nockjs/serial.js diff --git a/package.json b/package.json index 5404f32..6c8688d 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,9 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@fortaine/fetch-event-source": "^3.0.6", + "@urbit/aura": "file:../../../../aura-js", "browser-or-node": "^1.3.0", - "core-js": "^3.19.1" + "core-js": "^3.19.1", + "urbit-ob": "^5.0.1" } } diff --git a/src/Urbit.ts b/src/Urbit.ts index 020ffe8..24f9697 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -15,9 +15,15 @@ import { PokeHandlers, Message, FatalError, + NounPath, } from './types'; import { hexString } from './utils'; +import { Noun, Atom, Cell, dwim } from './nockjs/noun'; +import { jam, cue } from './nockjs/serial'; +import { patp2dec } from 'urbit-ob'; +import { parseUw, formatUw } from '@urbit/aura'; + /** * A class for interacting with an urbit ship, given its URL and code */ @@ -97,7 +103,7 @@ export class Urbit { /** This is basic interpolation to get the channel URL of an instantiated Urbit connection. */ private get channelUrl(): string { - return `${this.url}/~/channel/${this.uid}`; + return `${this.url}/~/channel-jam/${this.uid}`; } private get fetchOptions(): any { @@ -151,10 +157,11 @@ export class Urbit { airlock.verbose = verbose; airlock.ship = ship; await airlock.connect(); + //TODO can we just send an empty array? await airlock.poke({ app: 'hood', mark: 'helm-hi', - json: 'opening airlock', + noun: dwim('opening airlock'), }); await airlock.eventSource(); return airlock; @@ -201,10 +208,11 @@ export class Urbit { if (this.lastEventId === 0) { // Can't receive events until the channel is open, // so poke and open then + //TODO can we just send an empty array? await this.poke({ app: 'hood', mark: 'helm-hi', - json: 'Opening API channel', + noun: dwim('Opening API channel'), }); return; } @@ -253,54 +261,73 @@ export class Urbit { this.ack(eventId); } - if (event.data && JSON.parse(event.data)) { - const data: any = JSON.parse(event.data); + let data: any; + if (event.data) { + data = cue(Atom.fromString(parseUw(event.data).toString())); + console.log('got real data', data.toString()); + } + // [request-id channel-event] + if ( data instanceof Cell && + data.head instanceof Atom.Atom && + data.tail instanceof Cell && + data.tail.head instanceof Atom.Atom) + { + const id = data.head.valueOf(); + const tag = Atom.Atom.cordToString(data.tail.head); + const bod = data.tail.tail; + // [%poke-ack p=(unit tang)] if ( - data.response === 'poke' && - this.outstandingPokes.has(data.id) + tag === 'poke-ack' && + this.outstandingPokes.has(id) ) { - const funcs = this.outstandingPokes.get(data.id); - if (data.hasOwnProperty('ok')) { + const funcs = this.outstandingPokes.get(id); + if (bod instanceof Atom.Atom) { funcs.onSuccess(); - } else if (data.hasOwnProperty('err')) { - console.error(data.err); - funcs.onError(data.err); } else { - console.error('Invalid poke response', data); + //TODO pre-render tang? + console.error(bod.tail); + funcs.onError(bod.tail); } - this.outstandingPokes.delete(data.id); + this.outstandingPokes.delete(id); + // [%watch-ack p=(unit tang)] } else if ( - data.response === 'subscribe' && - this.outstandingSubscriptions.has(data.id) + tag === 'watch-ack' && + this.outstandingSubscriptions.has(id) ) { - const funcs = this.outstandingSubscriptions.get(data.id); - if (data.hasOwnProperty('err')) { - console.error(data.err); - funcs.err(data.err, data.id); - this.outstandingSubscriptions.delete(data.id); + const funcs = this.outstandingSubscriptions.get(id); + if (bod instanceof Cell) { + //TODO pre-render tang? + console.error(bod.tail); + funcs.err(bod.tail, id); + this.outstandingSubscriptions.delete(id); } + // [%fact =mark =noun] } else if ( - data.response === 'diff' && - this.outstandingSubscriptions.has(data.id) + tag === 'fact' && + this.outstandingSubscriptions.has(id) ) { - const funcs = this.outstandingSubscriptions.get(data.id); + const funcs = this.outstandingSubscriptions.get(id); try { - funcs.event(data.json, data.mark ?? 'json'); + //TODO support binding conversion callback? + funcs.event(Atom.Atom.cordToString(bod.head), bod.tail); } catch (e) { console.error('Failed to call subscription event callback', e); } + // [%kick ~] } else if ( - data.response === 'quit' && - this.outstandingSubscriptions.has(data.id) + tag === 'kick' && + this.outstandingSubscriptions.has(id) ) { - const funcs = this.outstandingSubscriptions.get(data.id); - funcs.quit(data); - this.outstandingSubscriptions.delete(data.id); + const funcs = this.outstandingSubscriptions.get(id); + funcs.quit(); + this.outstandingSubscriptions.delete(id); } else { console.log([...this.outstandingSubscriptions.keys()]); - console.log('Unrecognized response', data); + console.log('Unrecognized response', data, data.toString()); } + } else { + console.log('strange event noun', data.toString()); } }, onerror: (error) => { @@ -354,19 +381,17 @@ export class Urbit { */ private async ack(eventId: number): Promise { this.lastAcknowledgedEventId = eventId; - const message: Message = { - action: 'ack', - 'event-id': eventId, - }; - await this.sendJSONtoChannel(message); + // [%ack event-id=@ud] + const non = dwim(['ack', eventId], 0); + await this.sendNounToChannel(non); return eventId; } - private async sendJSONtoChannel(...json: Message[]): Promise { + private async sendNounToChannel(noun: any): Promise { const response = await fetch(this.channelUrl, { ...this.fetchOptions, method: 'PUT', - body: JSON.stringify(json), + body: formatUw(Atom.fromString(jam(noun).toString().slice(2), 16).number.toString()), }); if (!response.ok) { throw new Error('Failed to PUT channel'); @@ -385,7 +410,7 @@ export class Urbit { * * @returns The first fact on the subcription */ - async subscribeOnce(app: string, path: string, timeout?: number) { + async subscribeOnce(app: string, path: NounPath, timeout?: number) { return new Promise(async (resolve, reject) => { let done = false; let id: number | null = null; @@ -394,9 +419,9 @@ export class Urbit { reject('quit'); } }; - const event = (e: T) => { + const event = (m: string, n: T) => { if (!done) { - resolve(e); + resolve(n); //TODO revisit this.unsubscribe(id); } }; @@ -421,30 +446,26 @@ export class Urbit { * * @param app The app to poke * @param mark The mark of the data being sent - * @param json The data to send + * @param noun The data to send */ async poke(params: PokeInterface): Promise { - const { app, mark, json, ship, onSuccess, onError } = { + const { app, mark, noun, shipName, onSuccess, onError } = { onSuccess: () => {}, onError: () => {}, - ship: this.ship, + shipName: this.ship, ...params, }; - const message: Message = { - id: this.getEventId(), - action: 'poke', - ship, - app, - mark, - json, - }; + const eventId = this.getEventId(); + const ship = Atom.fromString(patp2dec('~'+shipName), 10); + // [%poke request-id=@ud ship=@p app=term mark=@tas =noun] + const non = dwim(['poke', eventId, ship, app, mark, noun], 0); const [send, result] = await Promise.all([ - this.sendJSONtoChannel(message), + this.sendNounToChannel(non), new Promise((resolve, reject) => { - this.outstandingPokes.set(message.id, { + this.outstandingPokes.set(eventId, { onSuccess: () => { onSuccess(); - resolve(message.id); + resolve(eventId); }, onError: (event) => { onError(event); @@ -473,15 +494,9 @@ export class Urbit { ...params, }; - const message: Message = { - id: this.getEventId(), - action: 'subscribe', - ship, - app, - path, - }; + const eventId = this.getEventId(); - this.outstandingSubscriptions.set(message.id, { + this.outstandingSubscriptions.set(eventId, { app, path, err, @@ -489,9 +504,18 @@ export class Urbit { quit, }); - await this.sendJSONtoChannel(message); + // [%subscribe request-id=@ud ship=@p app=term =path] + const non = dwim([ + 'subscribe', + eventId, + Atom.fromString(patp2dec('~'+ship), 10), + app, + path, + ], 0); - return message.id; + await this.sendNounToChannel(non); + + return eventId; } /** @@ -500,13 +524,10 @@ export class Urbit { * @param subscription */ async unsubscribe(subscription: number) { - return this.sendJSONtoChannel({ - id: this.getEventId(), - action: 'unsubscribe', - subscription, - }).then(() => { - this.outstandingSubscriptions.delete(subscription); - }); + // [%unsubscribe request-id=@ud subscription-id=@ud] + return this.sendNounToChannel(dwim( + ['unsubscribe', this.getEventId(), subscription], 0 + )); } /** diff --git a/src/index.ts b/src/index.ts index 5c39dfc..af59522 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ +import { enjs } from './nockjs/noun'; export * from './types'; import { Urbit } from './Urbit'; +export { enjs }; export { Urbit as default, Urbit }; diff --git a/src/nockjs/TODO b/src/nockjs/TODO new file mode 100644 index 0000000..4f4af03 --- /dev/null +++ b/src/nockjs/TODO @@ -0,0 +1,42 @@ +* a noun is an atom or a cell. DONE +* mugs. DONE +* unifying equals. DONE +* dorky embedded DSL for nouns. DONE +* some kind of real hashmap (needed for memoization at least). DONE +* nock->js compiler (THE REALLY INTERESTING PART). DONE (at least, v1) +* decrement. DONE +* port random-noun tests to tape-check. DONE +* jam/cue for pill reading (makes testing easier). DONE +* add. DONE +* jets (basic binding). DONE +* ackerman. DONE +* atom-gates.pill +* ALL jets (ref: jaque) +* boot ivory pill +^--- call urbit library functions from js! great success! +* boot fakezod (brass pill) to dojo +* prevalence (on-disk in node, IndexedDB in brower) +* expose basic vere-slave interface as a library + i.e. send me pokes, i handle all persistence and send you io +^--- candidate vere backend + urbit in the browser +* urbit over webrtc? + +At this point, we have a working vere backend, as well as a full +"urbit in the browser". Performance is unlikely to be as good as jaque, +but will likely be quite accepatable (especially for in-browser things). + +At the very least, using an ivory pill to compile and run hoon from the +browser will ease client-side programming tasks. + +--- future implementation ideas + +it would be feasible to add profiling code to the compiled javascript, +specifically in callsites (9), so that the 9 would run say 100 times and +then recompile itself with a check and a direct call to the most called +battery. this would also enable loop finding in tail position where the +most called battery is the one being compiled. (important here not to +use the 2 compiler cache, but to have a generated call site per battery) + +it would be cool to profile that single optimization, all other things +being equal. it should be the most important one. diff --git a/src/nockjs/bits.js b/src/nockjs/bits.js new file mode 100644 index 0000000..60035c0 --- /dev/null +++ b/src/nockjs/bits.js @@ -0,0 +1,333 @@ +var noun = require('./noun.js'), + BigInteger = require('jsbn').BigInteger, + zero = noun.Atom.yes, + one = noun.Atom.no; + +// a is native, returns native +function met(a, b) { + var bits = b.number.bitLength(), + full = bits >>> a, + part = (full << a) !== bits; + + return part ? full + 1 : full; +} + +function gth(a, b) { + return a.number.compareTo(b.number) > 0; +} + +function lth(a, b) { + return a.number.compareTo(b.number) < 0; +} + +function gte(a, b) { + return a.number.compareTo(b.number) >= 0; +} + +function lte(a, b) { + return a.number.compareTo(b.number) <= 0; +} + +function add(a, b) { + return new noun.Atom.Atom(a.number.add(b.number)); +} + +function dec(a) { + return sub(a, one); +} + +function bex(a) { + return new noun.Atom.Atom(BigInteger.ONE.shiftLeft(a.number.intValue())); +} + +function sub(a, b) { + var r = a.number.subtract(b.number); + if ( r.signum < 0 ) { + throw new Error("subtract underflow"); + } + else { + return new noun.Atom.Atom(r); + } +} + +function lsh(a, b, c) { + var bits = b.number.shiftLeft(a.number.intValue()).intValue(); + return new noun.Atom.Atom(c.number.shiftLeft(bits)); +} + +function rsh(a, b, c) { + var bits = b.number.shiftLeft(a.number.intValue()).intValue(); + return new noun.Atom.Atom(c.number.shiftRight(bits)); +} + +// to/from little-endian 32-bit word array, as used in vere +// TODO: efficiency is horrible here, but can be improved using internals +function bytesToWords(bytes) { + var len = bytes.length, + trim = len % 4; + var i, b, w; + + if ( trim > 0 ) { + len += (4-trim); + for ( i = 0; i < trim; ++i ) { + bytes.push(0); + } + } + + var size = len >> 2; + var words = new Array(size); + for ( i = 0, b = 0; i < size; ++i ) { + w = (bytes[b++] << 0) & 0x000000FF; + w ^= (bytes[b++] << 8) & 0x0000FF00; + w ^= (bytes[b++] << 16) & 0x00FF0000; + w ^= (bytes[b++] << 24) & 0xFF000000; + words[i] = w; + } + return words; +}; + +function wordsToBytes(words) { + var buf = []; + var w, i, b; + for ( i = 0, b = 0; i < words.length; ++i ) { + w = words[i]; + buf[b++] = 0xff & (w & 0x000000FF); + buf[b++] = 0xff & ((w & 0x0000FF00) >>> 8); + buf[b++] = 0xff & ((w & 0x00FF0000) >>> 16); + buf[b++] = 0xff & ((w & 0xFF000000) >>> 24); + } + // or here. one of the 'get rid of extra zeros' functions. + while ( buf[--b] === 0 ) { + buf.pop(); + } + return buf; +}; + +function bytesToAtom(bytes) { + var byt, parts = []; + for ( var i = bytes.length - 1; i >= 0; --i ) { + byt = bytes[i] & 0xff; + parts.push(byt < 16 ? ("0" + byt.toString(16)) : byt.toString(16)); + } + return new noun.Atom.Atom(new BigInteger(parts.join(''), 16)); +} + +function atomToBytes(atom) { + return atom.bytes(); +} + +function atomToWords(atom) { + return bytesToWords(atomToBytes(atom)); +} + +function wordsToAtom(words) { + return bytesToAtom(wordsToBytes(words)); +} + +var malt = wordsToAtom; + +// XX: INTERNAL +function slaq(bloq, len) { + return new Array(((len << bloq) + 31) >>> 5); +} + +// src is atom, all others native +function chop(met, fum, wid, tou, dst, src) { + var buf = atomToWords(src), + len = buf.length, + i, j, san, mek, baf, bat, hut, san, + wuf, wut, waf, raf, wat, rat, hop; + + if ( met < 5 ) { + san = 1 << met; + mek = ((1 << san) - 1); + baf = fum << met; + bat = tou << met; + + for ( i = 0; i < wid; ++i ) { + waf = baf >>> 5; + raf = baf & 31; + wat = bat >>> 5; + rat = bat & 31; + hop = ((waf >= len) ? 0 : buf[waf]); + hop = ((hop >>> raf) & mek); + dst[wat] ^= hop << rat; + baf += san; + bat += san; + } + } + else { + hut = met - 5; + san = 1 << hut; + + for ( i = 0; i < wid; ++i ) { + wuf = (fum + i) << hut; + wut = (tou + i) << hut; + + for ( j = 0; j < san; ++j ) { + dst[wut + j] ^= ((wuf + j) >= len) + ? 0 + : buf[wuf + j]; + } + } + } +} + +function cut(a, b, c, d) { + var ai = a.number.intValue(), + bi = b.number.intValue(), + ci = c.number.intValue(); + + var len = met(ai, d); + if ( zero.equals(c) || bi >= len ) { + return zero; + } + if ( bi + ci > len ) { + ci = len - b; + } + if ( 0 === bi && ci === len ) { + return d; + } + else { + var sal = slaq(ai, ci); + chop(ai, bi, ci, 0, sal, d); + return malt(sal); + } +} + +var maxCat = noun.Atom.fromInt(0xffffffff); +var catBits = noun.Atom.fromInt(32); + +function end(a, b, c) { + if ( gth(a, catBits) ) { + throw new Error("Fail"); + } + else if ( gth(b, maxCat) ) { + return c; + } + else { + var ai = a.number.intValue(), + bi = b.number.intValue(), + len = met(ai, c); + + if ( 0 === bi ) { + return zero; + } + else if ( bi >= len ) { + return c; + } + else { + var sal = slaq(ai, bi); + chop(ai, 0, bi, 0, sal, c); + return malt(sal); + } + } +} + +function mix(a, b) { + return new noun.Atom.Atom(a.number.xor(b.number)); +} + +function cat(a, b, c) { + if ( gth(a, catBits) ) { + throw new Error("Fail"); + } + else { + var ai = a.number.intValue(), + lew = met(ai, b), + ler = met(ai, c), + all = lew + ler; + + if ( 0 === all ) { + return zero; + } + else { + var sal = slaq(ai, all); + chop(ai, 0, lew, 0, sal, b); + chop(ai, 0, ler, lew, sal, c); + return malt(sal); + } + } +} + +function can(a, b) { + if ( gth(a, catBits) ) { + throw new Error("Fail"); + } + else { + var ai = a.number.intValue(), + tot = 0, + cab = b, + pos, i_cab, pi_cab, qi_cab; + + // measure + while ( true ) { + if ( zero.equals(cab) ) { + break; + } + if ( !cab.deep ) { + throw new Error("Fail"); + } + i_cab = cab.head; + if ( !i_cab.deep ) { + throw new Error("Fail"); + } + pi_cab = i_cab.head; + qi_cab = i_cab.tail; + if ( gth(pi_cab, maxCat) ) { + throw new Error("Fail"); + } + if ( qi_cab.deep ) { + throw new Error("Fail"); + } + if ( (tot + pi_cab) < tot ) { + throw new Error("Fail"); + } + tot += pi_cab; + cab = cab.tail; + } + if ( 0 === tot ) { + return zero; + } + var sal = slaq(ai, tot); + + // chop the list atoms in + cab = b; + pos = 0; + while ( !zero.equals(cab) ) { + i_cab = cab.head; + pi_cab = i_cab.head.number.intValue(); + qi_cab = i_cab.tail; + + chop(ai, 0, pi_cab, pos, sal, qi_cab); + pos += pi_cab; + cab = cab.tail; + } + return malt(sal); + } +} + +module.exports = { + met: met, + cut: cut, + add: add, + sub: sub, + dec: dec, + gth: gth, + lth: lth, + gte: gte, + lte: lte, + bex: bex, + lsh: lsh, + rsh: rsh, + end: end, + mix: mix, + cat: cat, + can: can, + bytesToWords: bytesToWords, + wordsToBytes: wordsToBytes, + bytesToAtom: bytesToAtom, + atomToBytes: atomToBytes, + atomToWords: atomToWords, + wordsToAtom: wordsToAtom, +}; diff --git a/src/nockjs/compiler.js b/src/nockjs/compiler.js new file mode 100644 index 0000000..7e9bd79 --- /dev/null +++ b/src/nockjs/compiler.js @@ -0,0 +1,726 @@ +var noun = require('./noun.js'), + NounMap = require('./hamt.js').NounMap, + list = require('./list.js'), + Noun = noun.Noun, + Atom = noun.Atom.Atom, + Cell = noun.Cell, + MEMO = noun.dwim("memo"), + SLOG = noun.dwim("slog"), + FAST = noun.dwim("fast"), + SPOT = noun.dwim("spot"), + MEAN = noun.dwim("mean"), + HUNK = noun.dwim("hunk"), + LOSE = noun.dwim("lose"); + +function Statement() { +} + +function Block() { + Statement.call(this); + this.statements = []; +} +Block.prototype = Object.create(Statement.prototype); +Block.prototype.constructor = Block; + +Block.prototype.append = function(st) { + this.statements.push(st); +} + +Block.prototype.toJs = function() { + var sts = this.statements; + var parts = new Array(sts.length); + for ( var i = 0; i < sts.length; ++i) { + parts[i] = sts[i].toJs(); + } + return parts.join(''); +}; + +function Assignment(name, expr) { + Statement.call(this); + this.name = name; + this.expr = expr; +} +Assignment.prototype = Object.create(Statement.prototype); +Assignment.prototype.constructor = Assignment; + +Assignment.prototype.toJs = function() { + return "var " + this.name + " = " + this.expr.toJs() + ";"; +} + +function Expression() { +} + +function Cons(head, tail) { + Expression.call(this); + this.head = head; + this.tail = tail; +} +Cons.prototype = Object.create(Expression.prototype); +Cons.prototype.constructor = Cons; + +Cons.prototype.toJs = function() { + return "context.cons(" + this.head + ", " + this.tail + ")"; +}; + +function Frag(axis, name) { + Expression.call(this); + this.axis = axis; + this.name = name; +} +Frag.prototype = Object.create(Expression.prototype); +Frag.prototype.constructor = Frag; + +Frag.prototype.toJs = function() { + var parts = [this.name]; + for ( var ax = this.axis; ax > 1; ax = ax.mas() ) { + parts.push( ( 2 === ax.cap().valueOf() ) ? "head" : "tail" ); + } + return parts.join("."); +}; + +function Bail() { + Statement.call(this); +} +Bail.prototype = Object.create(Statement.prototype); +Bail.prototype.constructor = Bail; + +Bail.prototype.toJs = function() { + return "throw new Error(\"Bail\")"; +}; + +function Identity(name) { + Expression.call(this); + this.name = name; +} +Identity.prototype = Object.create(Expression.prototype); +Identity.prototype.constructor = Identity; + +Identity.prototype.toJs = function() { + return this.name; +}; + +function Constant(index) { + Expression.call(this); + this.index = index; +} +Constant.prototype = Object.create(Expression.prototype); +Constant.prototype.constructor = Constant; + +Constant.prototype.toJs = function() { + return "constants[" + this.index + "]"; +}; + +function Nock(subject, formula, tail) { + Expression.call(this); + this.subject = subject; + this.formula = formula; + this.tail = tail; +} +Nock.prototype = Object.create(Expression.prototype); +Nock.prototype.constructor = Nock; + +Nock.prototype.toJs = function() { + var f = this.formula; + var targetCode = "(" + f + ".hasOwnProperty('target') ? " + f + + ".target : (" + f + ".target = context.compile(" + this.formula + ")))"; + return this.tail ? + "context.trampoline(" + targetCode + ", " + this.subject + ")" : + targetCode + "(" + this.subject + ")"; +}; + +function Deep(name) { + Expression.call(this); + this.name = name; +} +Deep.prototype = Object.create(Expression.prototype); +Deep.prototype.constructor = Deep; + +Deep.prototype.toJs = function() { + return this.name +".deep ? context.yes : context.no"; +}; + +function Bump(name) { + Expression.call(this); + this.name = name; +} +Bump.prototype = Object.create(Expression.prototype); +Bump.prototype.constructor = Bump; + +Bump.prototype.toJs = function() { + return this.name + ".bump()"; +}; + +function Same(one, two) { + Expression.call(this); + this.one = one; + this.two = two; +} +Same.prototype = Object.create(Expression.prototype); +Same.prototype.constructor = Same; + +Same.prototype.toJs = function() { + return "(" + this.one + ".equals(" + this.two + ")" + " ? context.yes : context.no)"; +}; + +function If(test, yes, no) { + Statement.call(this); + this.test = test; + this.yes = yes; + this.no = no; +} +If.prototype = Object.create(Statement.prototype); +If.prototype.constructor = If; + +If.prototype.toJs = function() { + return "if(" + this.test + ".loob()){" + + this.yes.toJs() + "}else{" + this.no.toJs() + "}"; +}; + +function Kick(axis, core, tail) { + Expression.call(this) + this.axis = axis; + this.core = core; + this.tail = tail; +} +Kick.prototype = Object.create(Expression.prototype); +Kick.prototype.constructor = Kick; + +Kick.prototype.toJs = function() { + var axis = this.axis.shortCode(); + + return "(function (cor) {" + + "var pro, tgt, bus, arms, bat = cor.head, has = false;" + + "if ( bat.hasOwnProperty('loc') && (tgt = bat.loc.jets[" + axis + "]) && bat.loc.fine(cor) ) {" + + "return tgt(cor);" + + "}" + + "if ( bat.hasOwnProperty('arms') ) {" + + "arms = bat.arms;" + + "has = arms.hasOwnProperty('" + axis + "');" + + "}" + + "else arms = bat.arms = {};" + + "tgt = (has ? arms['" + axis + "'] : (arms['" + axis + "'] = context.compile(" + + new Frag(this.axis, "bat").toJs() + ")));" + + "bus = cor;" + + (this.tail ? "pro = context.trampoline(tgt, bus);" : + "while (true) {" + + "pro = tgt(bus);" + + "if ( context.isTrampoline(pro) ) {" + + "tgt = pro.target;" + + "bus = pro.subject;" + + "}" + + "else break;" + + "}") + + "return pro;" + + "})(" + this.core + ")"; +}; + +function GetMemo(name) { + Expression.call(this); + this.name = name; +} +GetMemo.prototype = Object.create(Expression.prototype); +GetMemo.prototype.constructor = GetMemo; + +GetMemo.prototype.toJs = function() { + return "context.getMemo(" + this.name + ")"; +}; + +function PutMemo(key, val) { + Statement.call(this); + this.key = key; + this.val = val; +} +PutMemo.prototype = Object.create(Statement.prototype); +PutMemo.prototype.constructor = PutMemo; + +function Push(name) { + Statement.call(this); + this.name = name; +} +Push.prototype = Object.create(Statement.prototype); +Push.prototype.constructor = Push; + +Push.prototype.toJs = function() { + return "context.stackPush(" + this.name + ");"; +}; + +function Pop() { + Statement.call(this); +} +Pop.prototype = Object.create(Statement.prototype); +Pop.prototype.constructor = Pop; + +Pop.prototype.toJs = function() { + return "context.stackPop()"; +}; + +function Fast(clue, core) { + Statement.call(this); + this.clue = clue; + this.core = core; +} + +Fast.prototype.toJs = function() { + return "context.register(" + this.core + ", " + this.clue + ");"; +} + +function Slog(name) { + Statement.call(this); + this.name = name; +} + +Slog.prototype.toJs = function() { + return "context.slog(" + this.name + ")"; +}; + +function compile(formula, subject, product, fresh, constants, block, tail) { + var op, arg, one, two, odd; + if ( !(formula instanceof Cell )) { + throw new Error("invalid formula"); + } + op = formula.head; + arg = formula.tail; + if ( op instanceof Cell ) { + one = fresh(); + two = fresh(); + compile(op, subject, one, fresh, constants, block, false); + compile(arg, subject, two, fresh, constants, block, false); + block.append(new Assignment(product, new Cons(one, two))); + } + else switch ( op.valueOf() ) { + case 0: + if ( 0 === arg ) { + block.append(new Bail()); + } + else if ( 1 === arg ) { + block.append(new Identity(subject)); + } + else { + block.append(new Assignment(product, new Frag(arg, subject))); + } + break; + case 1: + constants.push(arg); + block.append(new Assignment(product, new Constant(constants.length - 1))); + break; + case 2: + one = fresh(); + two = fresh(); + compile(arg.head, subject, one, fresh, constants, block, false); + compile(arg.tail, subject, two, fresh, constants, block, false); + block.append(new Assignment(product, new Nock(one, two, tail))); + break; + case 3: + one = fresh(); + compile(arg, subject, one, fresh, constants, block, false); + block.append(new Assignment(product, new Deep(one))); + break; + case 4: + one = fresh(); + compile(arg, subject, one, fresh, constants, block, false); + block.append(new Assignment(product, new Bump(one))); + break; + case 5: + one = fresh(); + two = fresh(); + compile(arg.head, subject, one, fresh, constants, block, false); + compile(arg.tail, subject, two, fresh, constants, block, false); + block.append(new Assignment(product, new Same(one, two))); + break; + case 6: + odd = fresh(); + one = new Block(); + two = new Block(); + compile(arg.head, subject, odd, fresh, constants, block, false); + compile(arg.tail.head, subject, product, fresh, constants, one, tail); + compile(arg.tail.tail, subject, product, fresh, constants, two, tail); + block.append(new If(odd, one, two)); + break; + case 7: + one = fresh(); + compile(arg.head, subject, one, fresh, constants, block, false); + compile(arg.tail, one, product, fresh, constants, block, tail); + break; + case 8: + one = fresh(); + two = fresh(); + compile(arg.head, subject, one, fresh, constants, block, false); + block.append(new Assignment(two, new Cons(one, subject))); + compile(arg.tail, two, product, fresh, constants, block, tail); + break; + case 9: + odd = arg.head; + if ( 2 === odd.cap().valueOf() ) { + one = fresh(); + two = odd.mas(); + compile(arg.tail, subject, one, fresh, constants, block, false); + block.append(new Assignment(product, new Kick(two, one, tail))); + } + else { + compile(noun.dwim([7, arg.tail, 2, [0, 1], 0, odd]), + subject, product, fresh, constants, block, tail); + } + break; + case 10: + var hint = arg.head; + if ( !(arg.head instanceof Cell) ) { + // no recognized static hints + compile(arg.tail, subject, product, fresh, constants, block, tail); + } + else { + var zep = hint.head; + var clu = fresh(); + compile(hint.tail, subject, clu, fresh, constants, block, false); + if ( zep.equals(MEMO) ) { + var key = fresh(); + var got = fresh(); + odd = fresh(); + one = new Block(); + two = new Block(); + var konst = fresh(); + block.append(new Assignment(konst, new Constant(hint.tail))); + block.append(new Assignment(key, new Cons(subject, konst))); + block.append(new Assignment(got, new GetMemo(two))); + block.append(new Assignment(odd, new Deep(got))); + one.append(new Assignment(product, new Frag(noun.dwim(3), got))); + compile(arg.tail, subject, product, fresh, two, false); + two.append(new PutMemo(key, product)); + block.append(new If(odd, one, two)); + } + else if ( zep.equals(SLOG) ) { + block.append(new Slog(clu)); + compile(arg.tail, subject, product, fresh, constants, block, tail); + } + else if ( zep.equals(FAST) ) { + compile(arg.tail, subject, product, fresh, constants, block, false); + block.append(new Fast(clu, product)); + } + else if ( zep.equals(SPOT) || + zep.equals(MEAN) || + zep.equals(HUNK) || + zep.equals(LOSE) ) { + one = fresh(); + two = fresh(); + block.append(new Assignment(one, new Constant(zep))); + block.append(new Assignment(two, new Cons(one, clu))); + block.append(new Push(two)); + compile(arg.tail, subject, product, fresh, constants, block, false); + block.append(new Pop()); + } + else { + // unrecognized + compile(arg.tail, subject, product, fresh, constants, block, tail); + } + } + break; + case 11: + one = fresh(); + two = fresh(); + compile(arg.head, subject, one, fresh, constants, block, false); + compile(arg.tail, subject, two, fresh, constants, block, false); + block.append(new Assignment(product, new Esc(one, two))); + break; + default: + throw new Error("invalid opcode"); + } +} + +function Trampoline(target, subject) { + this.target = target; + this.subject = subject; +} + +function genFine(loc) { + var constants = [], out = [], i; + for ( i = 0; !loc.isStatic; ++i ) { + out.push("if(!constants[" + i + "].equals(a.head)){return false;}"); + constants.push(loc.noun); + out.push("a=" + new Frag(loc.axisToParent, "a").toJs() + ";"); + loc = loc.parentLoc; + } + out.push("return constants[" + i + "].equals(a);"); + constants.push(loc.noun); + var body = 'return function(a){' + out.join('') + 'return true;};'; + var builder = new Function('constants', body); + return builder(constants); +} + +var three = noun.dwim(3); +function Location(context, name, label, axisToParent, hooks, noun, parentLoc) { + this.name = name; + this.label = label; + this.parentLoc = parentLoc; + this.axisToParent = axisToParent; + this.fragToParent = Noun.fragmenter(axisToParent); + this.nameToAxis = hooks; + this.axisToName = {}; + this.isStatic = ( null === parentLoc || (three.equals(axisToParent) && parentLoc.isStatic) ); + if ( this.isStatic ) { + this.noun = noun; + } + else { + this.noun = noun.head; + this.noun.mug(); + } + for ( var k in hooks ) { + if ( hooks.hasOwnProperty(k) ) { + this.axisToName[hooks[k].shortCode()] = k; + } + } + this.jets = {}; + var drivers = context.drivers[label]; + if ( drivers && drivers.length > 0 ) { + for ( var i = 0; i < drivers.length; ++i ) { + var d = drivers[i]; + if ( d instanceof AxisArm ) { + this.jets[d.axis.mas().shortCode()] = d.fn; + } + else { + this.jets[nameToAxis[d.name].mas().shortCode()] = d.fn; + } + } + } + this.fine = genFine(this); +} + +function Clue(name, parentAxis, hooks) { + this.name = name; + this.parentAxis = parentAxis; + this.hooks = hooks; +} + +function JetDriver(label, fn) { + this.label = label; + this.fn = fn; +} + +function AxisArm(label, axis, fn) { + JetDriver.call(this, label, fn); + this.axis = axis; +} +AxisArm.prototype = Object.create(JetDriver.prototype); +AxisArm.prototype.constructor = AxisArm; + +function NamedArm(label, name, fn) { + JetDriver.call(this, label, fn); + this.name = name; +} +NamedArm.prototype = Object.create(JetDriver.prototype); +NamedArm.prototype.constructor = NamedArm; + +var two = noun.dwim(2); +function collectFromCore(prefix, spec, out) { + var name = spec[0], arms = spec[1], children = spec[2], + labl = prefix + "/" + name; + if ( arms instanceof Function ) { + out[labl] = [new AxisArm(labl, two, arms)]; + } + else { + var all = []; + for ( var k in arms ) { + if ( arms.hasOwnProperty(k) ) { + all.push(( 'number' === typeof(k) ) ? + new AxisArm(labl, noun.dwim(k), arms[k]) : + new NamedArm(labl, k, arms[k])); + } + } + out[labl] = all; + } + if ( children ) { + for ( var i = 0; i < children.length; ++i ) { + collectFromCore(labl, children[i], out); + } + } +} + +function Context(drivers) { + this.memo = new NounMap(); + this.clues = new NounMap(); + this.dash = new NounMap(); + this.tax = noun.Atom.yes; + this.drivers = {}; + if ( drivers ) { + collectFromCore('', drivers, this.drivers); + } +} + +Context.prototype.yes = noun.Atom.yes; +Context.prototype.no = noun.Atom.no; +Context.prototype.cons = function (h, t) { + return new Cell(h, t); +}; + +Context.prototype.trampoline = function(tgt, bus) { + return new Trampoline(tgt, bus); +}; + +Context.prototype.isTrampoline = function(a) { + return (a instanceof Trampoline); +}; + +Context.prototype.compile = function(cell) { + var i = 0; + var fresh = function() { + return "v" + ++i; + }; + var body = new Block(); + var constants = []; + compile(cell, "subject", "product", fresh, constants, body, true); + var text = "return function(subject){" + body.toJs() + "return product;}"; + var builder = new Function("context", "constants", text); + return cell.target = builder(this, constants); +}; + +Context.prototype.nock = function(subject, formula) { + var product, target; + if ( !formula.hasOwnProperty("target") ) { + this.compile(formula); + } + target = formula.target; + while ( true ) { + product = target(subject); + if ( product instanceof Trampoline ) { + subject = product.subject; + target = product.target; + } + else { + return product; + } + } +}; + +Context.prototype.getMemo = function(key) { + return this.memo.get(key); +} + +Context.prototype.putMemo = function(key, val) { + this.memo.insert(key, val); +}; + +Context.prototype.stackPush = function(item) { + this.tax = new Cell(item, this.tax); +}; + +Context.prototype.stackPop = function() { + this.tax = this.tax.tail; +} + +Context.prototype.slog = function(item) { + // TODO: don't rewrite ++wash again, just call the kernel + console.log(item); +}; + +function chum(n) { + if ( n.deep ) { + return Atom.cordToString(n.head) + n.tail.number.shortValue().toString(10); + } + else { + return Atom.cordToString(n); + } +} + +var ten = noun.dwim(10); +function skipHints(formula) { + while ( true ) { + if ( formula.deep ) { + if ( ten.equals(formula.head) ) { + formula = formula.tail.tail; + continue; + } + } + return formula; + } +} + +var zero = noun.dwim(0), constant_zero = noun.dwim(1,0); +function parseParentAxis(noun) { + var f = skipHints(noun); + if ( constant_zero.equals(f) ) { + return zero; + } + else if ( !zero.equals(f.head) ) { + throw new Error("weird formula head"); + } + else if ( 3 != f.tail.cap().valueOf() ) { + throw new Error("weird parent axis"); + } + return f.tail; +} + +var nine = noun.dwim(9), constant_frag = noun.dwim(0,1); +function parseHookAxis(nock) { + var f = skipHints(nock), + op = f.head; + if ( !op.deep ) { + if ( zero.equals(op) ) { + if ( !f.tail.deep ) { + return f.tail; + } + } + else if ( nine.equals(op) ) { + var rest = f.tail; + if ( !rest.head.deep && constant_frag.equals(rest.tail) ) { + return rest.head; + } + } + } + return null; +} + +function parseHooks(noun) { + var o = {}; + list.forEach(noun, function(c) { + var term = Atom.cordToString(c.head), + axis = parseHookAxis(c.tail); + if ( null != axis ) { + o[term] = axis; + } + }); + return o; +} + +Context.prototype.parseClue = function(raw) { + var clue = this.clues.get(raw); + if ( clue === undefined ) { + var name = chum(raw.head), + parentAxis = parseParentAxis(raw.tail.head), + hooks = parseHooks(raw.tail.tail); + clue = new Clue(name, parentAxis, hooks); + this.clues.insert(raw, clue); + } + return clue; +} + +Context.prototype.register = function(core, raw) { + var bat = core.head; + var loc = this.dash.get(bat); + if ( undefined === loc ) { + try { + var clue = this.parseClue(raw); + if ( zero.equals(clue.parentAxis) ) { + loc = new Location(this, clue.name, '/' + clue.name, zero, clue.hooks, core, null); + } + else { + var parentCore = core.at(clue.parentAxis), + parentBattery = parentCore.head, + parentLoc = this.dash.get(parentBattery); + if ( undefined === parentLoc ) { + console.log('register: invalid parent for ' + clue.name); + } + else { + var label = parentLoc.label + "/" + clue.name; + loc = new Location(this, clue.name, label, clue.parentAxis, clue.hooks, core, parentLoc); + } + } + bat.loc = loc; + this.dash.insert(bat, loc); + } + catch (e) { + console.log(e); + } + } +}; + +module.exports = { + Context: Context, +} diff --git a/src/nockjs/hamt.js b/src/nockjs/hamt.js new file mode 100644 index 0000000..7f543ca --- /dev/null +++ b/src/nockjs/hamt.js @@ -0,0 +1,137 @@ +/* keys can be any noun, values aren't constrained */ + +function Slot() { +} + +function Node() { + Slot.call(this); + this.slots = new Array(32); +} +Node.prototype = Object.create(Slot.prototype); +Node.prototype.constructor = Node; + +Node.prototype.insert = function(key, val, lef, rem) { + var inx; + lef -= 5; + inx = rem >>> lef; + rem &= ((1 << lef) - 1); + + this.slots[inx] = ( undefined === this.slots[inx] ) + ? new Single(key, val) + : this.slots[inx].insert(key, val, lef, rem); + return this; +}; + +Node.prototype.get = function(key, lef, rem) { + var inx, sot; + lef -= 5; + inx = rem >>> lef; + rem &= ((1 << lef) - 1); + sot = this.slots[inx]; + + return ( undefined === sot ) ? undefined : sot.get(key, lef, rem); +}; + +function Bucket() { + this.singles = []; +} +Bucket.prototype = Object.create(Slot.prototype); +Bucket.prototype.constructor = Bucket; + +Bucket.prototype.insert = function(key, val, lef, rem) { + var s, a = this.singles; + + for ( var i = 0; i < a.length; ++i ) { + s = a[i]; + if ( s.key.equals(key) ) { + s.val = val; + return this; + } + } + a.push(new Single(key, val)); + return this; +}; + +Bucket.prototype.get = function(key, lef, rem) { + var s, a = this.singles; + + for ( var i = 0; i < a.length; ++i ) { + s = a[i]; + if ( s.key.equals(key) ) { + return s.val; + } + } + + return undefined; +}; + +function Single(key, val) { + Slot.call(this); + this.key = key; + this.val = val; +} +Single.prototype = Object.create(Slot.prototype); +Single.prototype.constructor = Single; + +Single.prototype.insert = function(key, val, lef, rem) { + if ( this.key.equals(key) ) { + this.val = val; + return this; + } + else { + var n, rom = this.key.mug() & ((1 << lef) - 1); + + if ( lef > 0 ) { + n = new Node(); + } + else { + n = new Bucket(); + } + n.insert(this.key, this.val, lef, rom); + n.insert(key, val, lef, rem); + return n; + } +}; + +Single.prototype.get = function(key, lef, rem) { + if ( this.key.equals(key) ) { + return this.val; + } + else { + return undefined; + } +}; + +function NounMap() { + this.slots = new Array(64); +} + +NounMap.prototype.insert = function(key, val) { + var m = key.mug(); + var inx = m >>> 25; + var sot = this.slots; + if ( undefined === sot[inx] ) { + sot[inx] = new Single(key, val); + } + else { + var rem = m & ((1 << 25) - 1); + sot[inx] = sot[inx].insert(key, val, 25, rem); + } +}; + +NounMap.prototype.get = function(key) { + var m = key.mug(); + var inx = m >>> 25; + var sot = this.slots[inx]; + if ( undefined === sot ) { + return undefined; + } + else { + var rem = m & ((1 << 25) - 1); + return sot.get(key, 25, rem); + } +}; + +module.exports = { + NounMap: NounMap +}; diff --git a/src/nockjs/list.js b/src/nockjs/list.js new file mode 100644 index 0000000..f747623 --- /dev/null +++ b/src/nockjs/list.js @@ -0,0 +1,40 @@ +var noun = require('./noun.js'), + Cell = noun.Cell, + zero = noun.Atom.yes; + +function flop(a) { + var b = zero; + + while ( true ) { + if ( zero.equals(a) ) { + return b; + } + else if ( !a.deep ) { + throw new Error("Bail"); + } + else { + b = new Cell(a.head, b); + a = a.tail; + } + } +} + +function forEach(n, f) { + while ( true ) { + if ( zero.equals(n) ) { + return; + } + else if ( !n.deep ) { + throw new Error("Bail"); + } + else { + f(n.head); + n = n.tail; + } + } +} + +module.exports = { + flop: flop, + forEach: forEach, +}; diff --git a/src/nockjs/noun.js b/src/nockjs/noun.js new file mode 100644 index 0000000..971b03d --- /dev/null +++ b/src/nockjs/noun.js @@ -0,0 +1,479 @@ +var BigInteger = require('jsbn').BigInteger; + +function Noun() { + this._mug = 0; +} + +Noun.prototype.loob = function () { + throw new Error("Bail"); +}; + +Noun.prototype.toString = function() { + var parts = []; + this.pretty(parts, false); + return parts.join(''); +}; + +Noun.prototype.mug = function () { + if ( 0 === this._mug ) { + this._mug = this.calculateMug(); + } + return this._mug; +}; + +Noun.prototype.mugged = function () { + return 0 !== this._mug; +}; + +Noun.prototype.deep = false; +Noun.prototype.bump = function () { + throw new Error("Bail"); +} + +Noun.prototype.equals = function(o) { + if ( this === o ) { + return true; + } + + if ( this instanceof Cell ) { + if ( o instanceof Cell) { + return this.unify(o); + } + else { + return false; + } + } + else { + if ( o instanceof Cell ) { + return false; + } + else if (0 === this.number.compareTo(o.number)) { + o.number = this.number; + return true; + } + else { + return false; + } + } +}; + + +function _mug_fnv(has_w) { + return Math.imul(has_w, 16777619); +} + +function _mug_out(has_w) { + return (has_w >>> 31) ^ (has_w & 0x7fffffff); +} + +function _mug_both(lef_w, rit_w) { + var bot_w = _mug_fnv(lef_w ^ _mug_fnv(rit_w)); + var out_w = _mug_out(bot_w); + + if ( 0 != out_w ) { + return out_w; + } + else { + return _mug_both(lef_w, ++rit_w); + } +} + +function Cell(head, tail) { + Noun.call(this); + this.head = head; + this.tail = tail; +} +Cell.prototype = Object.create(Noun.prototype); +Cell.prototype.constructor = Cell; +Cell.prototype.deep = true; + +Cell.prototype.pretty = function(out, tail) { + if ( !tail ) { + out.push('['); + } + this.head.pretty(out, false); + out.push(' '); + this.tail.pretty(out, true); + if ( !tail ) { + out.push(']'); + } +}; + +Cell.prototype.calculateMug = function() { + return _mug_both(this.head.mug(), this.tail.mug()); +}; + +Cell.prototype.unify = function(o) { + if ( this === o ) { + return true; + } + + if ( o.mugged() ) { + if ( this.mugged() ) { + if ( this.mug() != o.mug() ) { + return false; + } + } + else { + return o.unify(this); + } + } + + if ( this.head.equals(o.head) ) { + o.head = this.head; + if ( this.tail.equals(o.tail) ) { + o._mug = this._mug; + o.tail = this.tail; + return true; + } + } + + return false; +}; + +function Atom(number) { + Noun.call(this); + this.number = number; +} +Atom.prototype = Object.create(Noun.prototype); +Atom.prototype.constructor = Atom; + +var small = new Array(256); +(function() { + var i, bi; + for ( i = 0; i < 256; ++i ) { + bi = new BigInteger(); + bi.fromInt(i); + small[i] = new Atom(bi); + } +})(); + +var fragCache = { + 0: function(a) { + throw new Error("Bail"); + }, + 1: function(a) { + return a; + }, +}; +var one = small[1]; +Noun.fragmenter = function(a) { + var s = a.shortCode(); + if ( fragCache.hasOwnProperty(s) ) { + return fragCache[s]; + } + else { + for ( var parts = ['a']; !one.equals(a); a = a.mas() ) { + parts.push( ( 2 === a.cap().valueOf() ) ? 'head' : 'tail' ); + } + return fragCache[s] = new Function('a', 'return ' + parts.join('.') + ';'); + } +} + +Noun.prototype.at = function(a) { + return Noun.fragmenter(a)(this); +}; + +var shortBi = new BigInteger(); +shortBi.fromInt(65536); + +Atom.prototype.bytes = function() { + var bytes = this.number.toByteArray(); + var r = []; + for ( var i = bytes.length-1; i >= 0; --i ) { + r.push(bytes[i]&0xff); + } + return r; +} + +Atom.cordToString = function(c) { + var bytes = c.bytes(), + chars = []; + + for ( var i = 0; i < bytes.length; ++i ) { + chars.push(String.fromCharCode(bytes[i])); + } + return chars.join(''); +}; + +Atom.prototype.pretty = function(out, tail) { + if ( this.number.compareTo(shortBi) < 0 ) { + return out.push(this.number.toString(10)); + } + else { + var tap = [], isTa = true, isTas = true, bytes = this.number.toByteArray(); + for ( var i = bytes.length - 1; i >= 0; --i) { + var c = bytes[i]; + if ( isTa && ((c < 32) || (c > 127)) ) { + isTa = false; + isTas = false; + break; + } + else if ( isTas && !((c > 47 && c < 58) || // digits + (c > 96 && c < 123) || // lowercase letters + c === 45) ) { // - + isTas = false; + } + tap.push(String.fromCharCode(c)); + } + if ( isTas ) { + out.push('%'); + out.push.apply(out, tap); + } + else if ( isTa ) { + out.push("'"); + out.push.apply(out, tap); + out.push("'"); + } + else { + out.push("0x"); + out.push(this.number.toString(16)); + } + } +}; + +Atom.prototype.loob = function() { + switch ( this.number.intValue() ) { + case 0: + return true; + case 1: + return false; + default: + throw new Error("Bail"); + } +}; + +Atom.prototype.bump = function() { + return new Atom(this.number.add(BigInteger.ONE)); +}; + +var ida = i(1); +var heda = i(2); +var tala = i(3); + +Atom.prototype.cap = function() { + switch (this.number.intValue()) { + case 0: + case 1: + throw new Error("Bail"); + default: + return this.number.testBit(this.number.bitLength() - 2) ? tala : heda; + } +}; + +Atom.prototype.mas = function() { + switch (this.number.intValue()) { + case 0: + case 1: + throw new Error("Bail"); + case 2: + case 3: + return ida; + default: + var n = this.number; + var l = n.bitLength() - 2; + var addTop = new BigInteger(); + addTop.fromInt(1 << l); + var mask = new BigInteger(); + mask.fromInt((1 << l)-1); + return new Atom(n.and(mask).xor(addTop)); + } +}; + +Atom.prototype.calculateMug = function() { + var a = this.number.toByteArray(); + var b, c, d, e, f, bot; + for ( e = a.length - 1, b = (2166136261|0); ; ++b ) { + c = b; + bot = ( 0 === a[0] ) ? 1 : 0; + for ( d = e; d >= bot; --d ) { + c = _mug_fnv(c ^ (0xff & a[d])); + } + f = _mug_out(c); + if ( 0 !== f ) { + return f; + } + } +}; + +Atom.prototype.shortCode = function() { + return this.number.toString(36); // max supported by BigInteger +}; + +function s(str, radix) { + return new Atom(new BigInteger(str, radix)); +} + +function i(num) { + if ( num < 256 ) { + return small[num]; + } + else { + var bi = new BigInteger(); + bi.fromInt(num); + return new Atom(bi); + } +} + +function m(str) { + var i, j, octs = new Array(str.length); + for ( i = 0, j = octs.length - 1; i < octs.length; ++i, --j ) { + octs[j] = (str.charCodeAt(i) & 0xff).toString(16); + } + return new Atom(new BigInteger(octs.join(''), 16)) +} + +function dwim(a) { + var n = (arguments.length === 1 ? a : Array.apply(null, arguments)); + if ( n instanceof Noun ) { + return n; + } + if ( typeof n === "number" ) { + return i(n); + } + else if ( Array.isArray(n) ) { + var cel = new Cell(dwim(n[n.length-2]), dwim(n[n.length-1])); + for ( var j = n.length-3; j >= 0; --j ) { + cel = new Cell(dwim(n[j]), cel); + } + return cel; + } + else if ( typeof n === "string" ) { + return m(n); + } + console.log('what do you mean??', typeof n, n instanceof Noun, n.toString(), n); +} + +Atom.prototype.valueOf = function() { + return this.number.bitLength() <= 32 + ? this.number.intValue() + : this.number.toString(); +}; + +//TODO consider doing the dynamic args thing dwim does +const frond = function(opts) { // {tag: string, get: function(noun)}[] + return function(noun) { + if (!(noun instanceof Cell && noun.head instanceof Atom)) { + throw new Error('frond: noun not cell'); + } + const tag = Atom.cordToString(noun.head); + for (let i = 0; i < opts.length; i++) { + if (tag === opts[i].tag) { + return { [tag]: opts[i].get(noun.tail) }; + } + } + throw new Error('frond: unknown tag', tag); + }; +} + +const pairs = function(cels) { // {nom: string, get: function(noun)}[] + return function(noun) { + let i = 0; + let o = {}; + while(i < cels.length-1) { + if (!(noun instanceof Cell)) { + throw new Error('pairs: noun too shallow'); + } + o[cels[i].nom] = cels[i].get(noun.head); + noun = noun.tail; + i++; + } + o[cels[i].nom] = cels[i].get(noun); + return o; + }; +} + +const pair = function(na, ga, nb, gb) { + return pairs([{nom: na, get: ga}, {nom: nb, get: gb}]); +} + +const bucwut = function(opts) { // function(noun)[] + return function(noun) { + for (let i = 0; i < opts.length; i++) { + try { + const res = opts[i](noun); + return res; + } catch(e) { + continue; + } + } + throw new Error('bucwut: no matches'); + } +} + +const array = function(item) { // function(noun) + return function(noun) { + let a = []; + while (noun instanceof Cell) { + a.push(item(noun.head)); + noun = noun.tail; + } + return a; + } +} + +const tree = function(item) { // function(noun) + return function(noun) { + let a = []; + if (noun instanceof Cell) { + if (!(noun.tail instanceof Cell)) { + throw new Error('tree: malformed'); + } + a = [ + ...a, + item(noun.head), + ...tree(item)(noun.tail.head), + ...tree(item)(noun.tail.tail), + ]; + } + return a; + } +} + +const cord = function(noun) { + if (!(noun instanceof Atom)) { + throw new Error('cord: noun not atom'); + } + return Atom.cordToString(noun); +} + +const numb = function(noun) { + if (!(noun instanceof Atom)) { + throw new Error('numb: noun not atom'); + } + return noun.valueOf(); +} + +const loob = function(noun) { + return noun.loob(); +} + +const nill = function(noun) { + if (!(noun instanceof Atom && noun.number.intValue() === 0)) { + throw new Error('nill: not null'); + } + return null; +} + +const path = array(cord); + +module.exports = { + dwim: dwim, + Noun: Noun, + Cell: Cell, + Atom: { + Atom: Atom, + yes: i(0), + no: i(1), + fromMote: m, + fromInt: i, + fromString: s, + }, + enjs: { + //TODO ship, tape, tank, time, unit + frond, pairs, array, cord, numb, path, pair, bucwut, nill, tree, loob + }, + dejs: { + //TODO dwim, list, ship, tape, time + } +}; diff --git a/src/nockjs/serial.js b/src/nockjs/serial.js new file mode 100644 index 0000000..7f0cda8 --- /dev/null +++ b/src/nockjs/serial.js @@ -0,0 +1,167 @@ +var noun = require('./noun.js'), + list = require('./list.js'), + Cell = noun.Cell, + bits = require('./bits.js'), + zero = noun.Atom.yes, + one = noun.Atom.no, + i = noun.Atom.fromInt, + two = i(2), + three = i(3), + NounMap = require('./hamt.js').NounMap; + +function rub(a, b) { + var c, d, e, w, x, y, z, p, q, m; + + m = bits.add(a, i(bits.met(0, b))); + x = a; + + while ( zero.equals(bits.cut(zero, x, one, b)) ) { + y = bits.add(one, x); + + // Sanity check: crash if decoding more bits than available + if ( bits.gth(x, m) ) { + throw new Error("Bail"); + } + + x = y; + } + + if ( a.equals(x) ) { + return new Cell(one, zero); + } + + c = bits.sub(x, a); + d = bits.add(x, one); + + x = bits.dec(c); + y = bits.bex(x); + z = bits.cut(zero, d, x, b); + + e = bits.add(y, z); + w = bits.add(c, c); + y = bits.add(w, e); + z = bits.add(d, x); + + p = bits.add(w, e); + q = bits.cut(zero, z, e, b); + + return new Cell(p, q); +} + +function cue_in(m, a, b) { + var x,c,p,q,l,u,v,w,y,p,q,d,x; + + if ( zero.equals(bits.cut(zero, b, one, a)) ) { + x = bits.add(b, one); + c = rub(x, a); + p = bits.add(c.head, one); + q = c.tail; + m.insert(b, q); + } + else { + c = bits.add(two, b); + l = bits.add(one, b); + + if ( zero.equals(bits.cut(zero, l, one, a)) ) { + u = cue_in(m, a, c); + x = bits.add(u.head, c); + v = cue_in(m, a, x); + w = new Cell(u.tail.head, v.tail.head); + y = bits.add(u.head, v.head); + p = bits.add(two, y); + q = w; + m.insert(b, q); + } + else { + d = rub(c, a); + x = m.get(d.tail); + + if ( undefined === x ) { + throw new Error("Bail"); + } + + p = bits.add(two, d.head); + q = x; + } + } + return new Cell(p, new Cell(q, zero)); +} + +function cue(a) { + return cue_in(new NounMap(), a, zero).tail.head; +} + +function mat(a) { + if ( zero.equals(a) ) { + return noun.dwim(1, 1); + } + else { + var b = noun.dwim(bits.met(0, a)), + c = noun.dwim(bits.met(0, b)), + u = bits.dec(c), + v = bits.add(c, c), + x = bits.end(zero, u, b), + w = bits.bex(c), + y = bits.lsh(zero, u, a), + z = bits.mix(x, y), + p = bits.add(v, b), + q = bits.cat(zero, w, z); + return noun.dwim(p, q); + } +} + +function _jam_in_pair(m, h_a, t_a, b, l) { + var w = noun.dwim([2, 1], l), + x = bits.add(two, b), + d = _jam_in(m, h_a, x, w), + y = bits.add(x, d.head), + e = _jam_in(m, t_a, y, d.tail.head), + z = bits.add(d.head, e.head); + + return noun.dwim(bits.add(two, z), e.tail.head, zero); +} + +function _jam_in_ptr(m, u_c, l) { + var d = mat(u_c), + x = bits.lsh(zero, two, d.tail), + y = bits.add(two, d.head); + + return noun.dwim(y, [[y, bits.mix(three, x)], l], zero); +} + +function _jam_in_flat(m, a, l) { + var d = mat(a), + x = bits.add(one, d.head); + + return noun.dwim(x, [[x, bits.lsh(zero, one, d.tail)], l], zero); +} + +function _jam_in(m, a, b, l) { + var x, c = m.get(a); + + if ( undefined == c ) { + m.insert(a, b); + return a.deep ? + _jam_in_pair(m, a.head, a.tail, b, l) : + _jam_in_flat(m, a, l); + } + else if ( !a.deep && bits.met(0, a) <= bits.met(0, c) ) { + return _jam_in_flat(m, a, l); + } + else { + return _jam_in_ptr(m, c, l); + } +} + +function jam(n) { + var x = _jam_in(new NounMap(), n, zero, zero), + q = list.flop(x.tail.head); + + return bits.can(zero, q); +} + +module.exports = { + cue: cue, + mat: mat, + jam: jam +}; diff --git a/src/types.ts b/src/types.ts index 173a1a8..dce7883 100644 --- a/src/types.ts +++ b/src/types.ts @@ -4,6 +4,7 @@ * `"/updates"` */ export type Path = string; +export type NounPath = [string]; /** * @p including leading sig, rendered as a string @@ -67,14 +68,13 @@ export interface Poke { */ app: GallAgent; /** - * Mark of the cage to be poked - * + * Mark of the noun to poke with */ mark: Mark; /** - * Vase of the cage of to be poked, as JSON + * Noun to poke with */ - json: Action; + noun: any; //TODO revisit } /** @@ -144,15 +144,16 @@ export interface SubscriptionInterface { /** * Handle negative %watch-ack */ + //TODO id here is a string, but is number in most other places... err?(error: any, id: string): void; /** * Handle %fact */ - event?(data: any, mark: string): void; + event?(mark: string, data: any): void; /** * Handle %kick */ - quit?(data: any): void; + quit?(): void; } export type OnceSubscriptionErr = 'quit' | 'nack' | 'timeout'; @@ -167,9 +168,9 @@ export interface SubscriptionRequestInterface extends SubscriptionInterface { /** * The path to which to subscribe * @example - * `"/keys"` + * `['keys', 0]` */ - path: Path; + path: NounPath; } export interface headers { From 821dc91e5e8cfcb5a12d699c8d62a042ac6a780e Mon Sep 17 00:00:00 2001 From: xiphiness Date: Sat, 18 Mar 2023 14:45:02 -0400 Subject: [PATCH 02/49] scry w different marks --- src/Urbit.ts | 5 +++-- src/types.ts | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 24f9697..b8dd154 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -571,9 +571,10 @@ export class Urbit { * @returns The scry result */ async scry(params: Scry): Promise { - const { app, path } = params; + const { app, path, mark } = params; + console.log('scry', params) const response = await fetch( - `${this.url}/~/scry/${app}${path}.json`, + `${this.url}/~/scry/${app}${path}.${ mark || 'json' }`, this.fetchOptions ); diff --git a/src/types.ts b/src/types.ts index dce7883..f96b799 100644 --- a/src/types.ts +++ b/src/types.ts @@ -85,6 +85,7 @@ export interface Scry { app: GallAgent; /** {@inheritDoc Path} */ path: Path; + mark?: Mark; } /** From c5253b86a062551d6ba64c05554451587031c386 Mon Sep 17 00:00:00 2001 From: fang Date: Mon, 11 Sep 2023 18:13:08 +0200 Subject: [PATCH 03/49] npm: import urbit-aura correctly --- package-lock.json | 37 +++++++++++++++++++++++++++++++++++++ package.json | 5 ++--- src/Urbit.ts | 3 +-- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 308c07b..82b33d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@fortaine/fetch-event-source": "^3.0.6", + "@urbit/aura": "^1.0.0", "browser-or-node": "^1.3.0", "core-js": "^3.19.1" }, @@ -41,6 +42,9 @@ "yet-another-abortcontroller-polyfill": "0.0.4" } }, + "../../../../aura-js": { + "extraneous": true + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -3047,6 +3051,18 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@urbit/aura": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@urbit/aura/-/aura-1.0.0.tgz", + "integrity": "sha512-IeP3uoDzZ0Rpn345auXK0y/BCcXTmpgAlOPbgf7n4eD35h56OnSoit1kuXKA21sWE19gFjK/wqZcz5ULjz2ADg==", + "engines": { + "node": ">=16", + "npm": ">=8" + }, + "peerDependencies": { + "big-integer": "^1.6.51" + } + }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -3435,6 +3451,15 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "peer": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -11621,6 +11646,12 @@ "eslint-visitor-keys": "^2.0.0" } }, + "@urbit/aura": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@urbit/aura/-/aura-1.0.0.tgz", + "integrity": "sha512-IeP3uoDzZ0Rpn345auXK0y/BCcXTmpgAlOPbgf7n4eD35h56OnSoit1kuXKA21sWE19gFjK/wqZcz5ULjz2ADg==", + "requires": {} + }, "abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -11912,6 +11943,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "peer": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", diff --git a/package.json b/package.json index 6c8688d..35e053d 100644 --- a/package.json +++ b/package.json @@ -64,9 +64,8 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@fortaine/fetch-event-source": "^3.0.6", - "@urbit/aura": "file:../../../../aura-js", + "@urbit/aura": "^1.0.0", "browser-or-node": "^1.3.0", - "core-js": "^3.19.1", - "urbit-ob": "^5.0.1" + "core-js": "^3.19.1" } } diff --git a/src/Urbit.ts b/src/Urbit.ts index b8dd154..5ec79a3 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -21,8 +21,7 @@ import { hexString } from './utils'; import { Noun, Atom, Cell, dwim } from './nockjs/noun'; import { jam, cue } from './nockjs/serial'; -import { patp2dec } from 'urbit-ob'; -import { parseUw, formatUw } from '@urbit/aura'; +import { parseUw, formatUw, patp2dec } from '@urbit/aura'; /** * A class for interacting with an urbit ship, given its URL and code From b89ef8fc6fa8e39c8950819bebbeddadc0c5091f Mon Sep 17 00:00:00 2001 From: fang Date: Mon, 11 Sep 2023 19:15:19 +0200 Subject: [PATCH 04/49] lib: use nockjs from npm instead of local files Since the nockjs api has changed lightly since the code herein was written, we have to make some small adjustments. Note that this also changes the interface for the .err() subscription interface callback, to bring it in line with the changed to the .event() interface we introduced during earlier cleanup. --- package-lock.json | 21 +- package.json | 1 + src/Urbit.ts | 18 +- src/index.ts | 2 +- src/nockjs/TODO | 42 --- src/nockjs/bits.js | 333 ------------------- src/nockjs/compiler.js | 726 ----------------------------------------- src/nockjs/hamt.js | 137 -------- src/nockjs/list.js | 40 --- src/nockjs/noun.js | 479 --------------------------- src/nockjs/serial.js | 167 ---------- src/types.ts | 2 +- 12 files changed, 31 insertions(+), 1937 deletions(-) delete mode 100644 src/nockjs/TODO delete mode 100644 src/nockjs/bits.js delete mode 100644 src/nockjs/compiler.js delete mode 100644 src/nockjs/hamt.js delete mode 100644 src/nockjs/list.js delete mode 100644 src/nockjs/noun.js delete mode 100644 src/nockjs/serial.js diff --git a/package-lock.json b/package-lock.json index 4a41b8f..56906ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@urbit/aura": "^1.0.0", + "@urbit/nockjs": "^1.1.0", "browser-or-node": "^1.3.0", "core-js": "^3.19.1" }, @@ -2829,7 +2830,8 @@ }, "node_modules/@urbit/aura": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@urbit/aura/-/aura-1.0.0.tgz", + "integrity": "sha512-IeP3uoDzZ0Rpn345auXK0y/BCcXTmpgAlOPbgf7n4eD35h56OnSoit1kuXKA21sWE19gFjK/wqZcz5ULjz2ADg==", "engines": { "node": ">=16", "npm": ">=8" @@ -2838,6 +2840,11 @@ "big-integer": "^1.6.51" } }, + "node_modules/@urbit/nockjs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@urbit/nockjs/-/nockjs-1.1.0.tgz", + "integrity": "sha512-tx+Nd3w4mKQD1updXLJe71aWn4Kt8FzTtypASi1FF9JelbhW+fHwlP7yQ8tTm6JqNHkhZ9B+4RO/M8hjjsbgvA==" + }, "node_modules/abab": { "version": "2.0.6", "dev": true, @@ -3196,7 +3203,8 @@ }, "node_modules/big-integer": { "version": "1.6.51", - "license": "Unlicense", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", "peer": true, "engines": { "node": ">=0.6" @@ -10444,8 +10452,15 @@ }, "@urbit/aura": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@urbit/aura/-/aura-1.0.0.tgz", + "integrity": "sha512-IeP3uoDzZ0Rpn345auXK0y/BCcXTmpgAlOPbgf7n4eD35h56OnSoit1kuXKA21sWE19gFjK/wqZcz5ULjz2ADg==", "requires": {} }, + "@urbit/nockjs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@urbit/nockjs/-/nockjs-1.1.0.tgz", + "integrity": "sha512-tx+Nd3w4mKQD1updXLJe71aWn4Kt8FzTtypASi1FF9JelbhW+fHwlP7yQ8tTm6JqNHkhZ9B+4RO/M8hjjsbgvA==" + }, "abab": { "version": "2.0.6", "dev": true @@ -10675,6 +10690,8 @@ }, "big-integer": { "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", "peer": true }, "brace-expansion": { diff --git a/package.json b/package.json index ca0f1d5..bf49a46 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@urbit/aura": "^1.0.0", + "@urbit/nockjs": "^1.1.0", "browser-or-node": "^1.3.0", "core-js": "^3.19.1" } diff --git a/src/Urbit.ts b/src/Urbit.ts index 824cc31..41bf01b 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -18,8 +18,7 @@ import { } from './types'; import EventEmitter, { hexString } from './utils'; -import { Noun, Atom, Cell, dwim } from './nockjs/noun'; -import { jam, cue } from './nockjs/serial'; +import { Noun, Atom, Cell, dwim, jam, cue } from '@urbit/nockjs'; import { parseUw, formatUw, patp2dec } from '@urbit/aura'; /** @@ -362,12 +361,13 @@ export class Urbit { // [request-id channel-event] if ( data instanceof Cell && - data.head instanceof Atom.Atom && + data.head instanceof Atom && data.tail instanceof Cell && - data.tail.head instanceof Atom.Atom) + data.tail.head instanceof Atom) { - const id = data.head.valueOf(); - const tag = Atom.Atom.cordToString(data.tail.head); + //NOTE id could be string if id > 2^32, not expected in practice + const id = data.head.valueOf() as number; + const tag = Atom.cordToString(data.tail.head); const bod = data.tail.tail; // [%poke-ack p=(unit tang)] if ( @@ -375,7 +375,7 @@ export class Urbit { this.outstandingPokes.has(id) ) { const funcs = this.outstandingPokes.get(id); - if (bod instanceof Atom.Atom) { + if (bod instanceof Atom) { funcs.onSuccess(); } else { //TODO pre-render tang? @@ -392,7 +392,7 @@ export class Urbit { if (bod instanceof Cell) { //TODO pre-render tang? console.error(bod.tail); - funcs.err(bod.tail, id); + funcs.err(id, bod.tail); this.outstandingSubscriptions.delete(id); } // [%fact =mark =noun] @@ -403,7 +403,7 @@ export class Urbit { const funcs = this.outstandingSubscriptions.get(id); try { //TODO support binding conversion callback? - funcs.event(id, Atom.Atom.cordToString(bod.head), bod.tail); + funcs.event(id, Atom.cordToString(bod.head), bod.tail); } catch (e) { console.error('Failed to call subscription event callback', e); } diff --git a/src/index.ts b/src/index.ts index cd0ae9a..a81b4ea 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import { enjs } from './nockjs/noun'; +import { enjs } from '@urbit/nockjs'; export * from './types'; export * from './events'; import { Urbit } from './Urbit'; diff --git a/src/nockjs/TODO b/src/nockjs/TODO deleted file mode 100644 index 4f4af03..0000000 --- a/src/nockjs/TODO +++ /dev/null @@ -1,42 +0,0 @@ -* a noun is an atom or a cell. DONE -* mugs. DONE -* unifying equals. DONE -* dorky embedded DSL for nouns. DONE -* some kind of real hashmap (needed for memoization at least). DONE -* nock->js compiler (THE REALLY INTERESTING PART). DONE (at least, v1) -* decrement. DONE -* port random-noun tests to tape-check. DONE -* jam/cue for pill reading (makes testing easier). DONE -* add. DONE -* jets (basic binding). DONE -* ackerman. DONE -* atom-gates.pill -* ALL jets (ref: jaque) -* boot ivory pill -^--- call urbit library functions from js! great success! -* boot fakezod (brass pill) to dojo -* prevalence (on-disk in node, IndexedDB in brower) -* expose basic vere-slave interface as a library - i.e. send me pokes, i handle all persistence and send you io -^--- candidate vere backend - urbit in the browser -* urbit over webrtc? - -At this point, we have a working vere backend, as well as a full -"urbit in the browser". Performance is unlikely to be as good as jaque, -but will likely be quite accepatable (especially for in-browser things). - -At the very least, using an ivory pill to compile and run hoon from the -browser will ease client-side programming tasks. - ---- future implementation ideas - -it would be feasible to add profiling code to the compiled javascript, -specifically in callsites (9), so that the 9 would run say 100 times and -then recompile itself with a check and a direct call to the most called -battery. this would also enable loop finding in tail position where the -most called battery is the one being compiled. (important here not to -use the 2 compiler cache, but to have a generated call site per battery) - -it would be cool to profile that single optimization, all other things -being equal. it should be the most important one. diff --git a/src/nockjs/bits.js b/src/nockjs/bits.js deleted file mode 100644 index 60035c0..0000000 --- a/src/nockjs/bits.js +++ /dev/null @@ -1,333 +0,0 @@ -var noun = require('./noun.js'), - BigInteger = require('jsbn').BigInteger, - zero = noun.Atom.yes, - one = noun.Atom.no; - -// a is native, returns native -function met(a, b) { - var bits = b.number.bitLength(), - full = bits >>> a, - part = (full << a) !== bits; - - return part ? full + 1 : full; -} - -function gth(a, b) { - return a.number.compareTo(b.number) > 0; -} - -function lth(a, b) { - return a.number.compareTo(b.number) < 0; -} - -function gte(a, b) { - return a.number.compareTo(b.number) >= 0; -} - -function lte(a, b) { - return a.number.compareTo(b.number) <= 0; -} - -function add(a, b) { - return new noun.Atom.Atom(a.number.add(b.number)); -} - -function dec(a) { - return sub(a, one); -} - -function bex(a) { - return new noun.Atom.Atom(BigInteger.ONE.shiftLeft(a.number.intValue())); -} - -function sub(a, b) { - var r = a.number.subtract(b.number); - if ( r.signum < 0 ) { - throw new Error("subtract underflow"); - } - else { - return new noun.Atom.Atom(r); - } -} - -function lsh(a, b, c) { - var bits = b.number.shiftLeft(a.number.intValue()).intValue(); - return new noun.Atom.Atom(c.number.shiftLeft(bits)); -} - -function rsh(a, b, c) { - var bits = b.number.shiftLeft(a.number.intValue()).intValue(); - return new noun.Atom.Atom(c.number.shiftRight(bits)); -} - -// to/from little-endian 32-bit word array, as used in vere -// TODO: efficiency is horrible here, but can be improved using internals -function bytesToWords(bytes) { - var len = bytes.length, - trim = len % 4; - var i, b, w; - - if ( trim > 0 ) { - len += (4-trim); - for ( i = 0; i < trim; ++i ) { - bytes.push(0); - } - } - - var size = len >> 2; - var words = new Array(size); - for ( i = 0, b = 0; i < size; ++i ) { - w = (bytes[b++] << 0) & 0x000000FF; - w ^= (bytes[b++] << 8) & 0x0000FF00; - w ^= (bytes[b++] << 16) & 0x00FF0000; - w ^= (bytes[b++] << 24) & 0xFF000000; - words[i] = w; - } - return words; -}; - -function wordsToBytes(words) { - var buf = []; - var w, i, b; - for ( i = 0, b = 0; i < words.length; ++i ) { - w = words[i]; - buf[b++] = 0xff & (w & 0x000000FF); - buf[b++] = 0xff & ((w & 0x0000FF00) >>> 8); - buf[b++] = 0xff & ((w & 0x00FF0000) >>> 16); - buf[b++] = 0xff & ((w & 0xFF000000) >>> 24); - } - // or here. one of the 'get rid of extra zeros' functions. - while ( buf[--b] === 0 ) { - buf.pop(); - } - return buf; -}; - -function bytesToAtom(bytes) { - var byt, parts = []; - for ( var i = bytes.length - 1; i >= 0; --i ) { - byt = bytes[i] & 0xff; - parts.push(byt < 16 ? ("0" + byt.toString(16)) : byt.toString(16)); - } - return new noun.Atom.Atom(new BigInteger(parts.join(''), 16)); -} - -function atomToBytes(atom) { - return atom.bytes(); -} - -function atomToWords(atom) { - return bytesToWords(atomToBytes(atom)); -} - -function wordsToAtom(words) { - return bytesToAtom(wordsToBytes(words)); -} - -var malt = wordsToAtom; - -// XX: INTERNAL -function slaq(bloq, len) { - return new Array(((len << bloq) + 31) >>> 5); -} - -// src is atom, all others native -function chop(met, fum, wid, tou, dst, src) { - var buf = atomToWords(src), - len = buf.length, - i, j, san, mek, baf, bat, hut, san, - wuf, wut, waf, raf, wat, rat, hop; - - if ( met < 5 ) { - san = 1 << met; - mek = ((1 << san) - 1); - baf = fum << met; - bat = tou << met; - - for ( i = 0; i < wid; ++i ) { - waf = baf >>> 5; - raf = baf & 31; - wat = bat >>> 5; - rat = bat & 31; - hop = ((waf >= len) ? 0 : buf[waf]); - hop = ((hop >>> raf) & mek); - dst[wat] ^= hop << rat; - baf += san; - bat += san; - } - } - else { - hut = met - 5; - san = 1 << hut; - - for ( i = 0; i < wid; ++i ) { - wuf = (fum + i) << hut; - wut = (tou + i) << hut; - - for ( j = 0; j < san; ++j ) { - dst[wut + j] ^= ((wuf + j) >= len) - ? 0 - : buf[wuf + j]; - } - } - } -} - -function cut(a, b, c, d) { - var ai = a.number.intValue(), - bi = b.number.intValue(), - ci = c.number.intValue(); - - var len = met(ai, d); - if ( zero.equals(c) || bi >= len ) { - return zero; - } - if ( bi + ci > len ) { - ci = len - b; - } - if ( 0 === bi && ci === len ) { - return d; - } - else { - var sal = slaq(ai, ci); - chop(ai, bi, ci, 0, sal, d); - return malt(sal); - } -} - -var maxCat = noun.Atom.fromInt(0xffffffff); -var catBits = noun.Atom.fromInt(32); - -function end(a, b, c) { - if ( gth(a, catBits) ) { - throw new Error("Fail"); - } - else if ( gth(b, maxCat) ) { - return c; - } - else { - var ai = a.number.intValue(), - bi = b.number.intValue(), - len = met(ai, c); - - if ( 0 === bi ) { - return zero; - } - else if ( bi >= len ) { - return c; - } - else { - var sal = slaq(ai, bi); - chop(ai, 0, bi, 0, sal, c); - return malt(sal); - } - } -} - -function mix(a, b) { - return new noun.Atom.Atom(a.number.xor(b.number)); -} - -function cat(a, b, c) { - if ( gth(a, catBits) ) { - throw new Error("Fail"); - } - else { - var ai = a.number.intValue(), - lew = met(ai, b), - ler = met(ai, c), - all = lew + ler; - - if ( 0 === all ) { - return zero; - } - else { - var sal = slaq(ai, all); - chop(ai, 0, lew, 0, sal, b); - chop(ai, 0, ler, lew, sal, c); - return malt(sal); - } - } -} - -function can(a, b) { - if ( gth(a, catBits) ) { - throw new Error("Fail"); - } - else { - var ai = a.number.intValue(), - tot = 0, - cab = b, - pos, i_cab, pi_cab, qi_cab; - - // measure - while ( true ) { - if ( zero.equals(cab) ) { - break; - } - if ( !cab.deep ) { - throw new Error("Fail"); - } - i_cab = cab.head; - if ( !i_cab.deep ) { - throw new Error("Fail"); - } - pi_cab = i_cab.head; - qi_cab = i_cab.tail; - if ( gth(pi_cab, maxCat) ) { - throw new Error("Fail"); - } - if ( qi_cab.deep ) { - throw new Error("Fail"); - } - if ( (tot + pi_cab) < tot ) { - throw new Error("Fail"); - } - tot += pi_cab; - cab = cab.tail; - } - if ( 0 === tot ) { - return zero; - } - var sal = slaq(ai, tot); - - // chop the list atoms in - cab = b; - pos = 0; - while ( !zero.equals(cab) ) { - i_cab = cab.head; - pi_cab = i_cab.head.number.intValue(); - qi_cab = i_cab.tail; - - chop(ai, 0, pi_cab, pos, sal, qi_cab); - pos += pi_cab; - cab = cab.tail; - } - return malt(sal); - } -} - -module.exports = { - met: met, - cut: cut, - add: add, - sub: sub, - dec: dec, - gth: gth, - lth: lth, - gte: gte, - lte: lte, - bex: bex, - lsh: lsh, - rsh: rsh, - end: end, - mix: mix, - cat: cat, - can: can, - bytesToWords: bytesToWords, - wordsToBytes: wordsToBytes, - bytesToAtom: bytesToAtom, - atomToBytes: atomToBytes, - atomToWords: atomToWords, - wordsToAtom: wordsToAtom, -}; diff --git a/src/nockjs/compiler.js b/src/nockjs/compiler.js deleted file mode 100644 index 7e9bd79..0000000 --- a/src/nockjs/compiler.js +++ /dev/null @@ -1,726 +0,0 @@ -var noun = require('./noun.js'), - NounMap = require('./hamt.js').NounMap, - list = require('./list.js'), - Noun = noun.Noun, - Atom = noun.Atom.Atom, - Cell = noun.Cell, - MEMO = noun.dwim("memo"), - SLOG = noun.dwim("slog"), - FAST = noun.dwim("fast"), - SPOT = noun.dwim("spot"), - MEAN = noun.dwim("mean"), - HUNK = noun.dwim("hunk"), - LOSE = noun.dwim("lose"); - -function Statement() { -} - -function Block() { - Statement.call(this); - this.statements = []; -} -Block.prototype = Object.create(Statement.prototype); -Block.prototype.constructor = Block; - -Block.prototype.append = function(st) { - this.statements.push(st); -} - -Block.prototype.toJs = function() { - var sts = this.statements; - var parts = new Array(sts.length); - for ( var i = 0; i < sts.length; ++i) { - parts[i] = sts[i].toJs(); - } - return parts.join(''); -}; - -function Assignment(name, expr) { - Statement.call(this); - this.name = name; - this.expr = expr; -} -Assignment.prototype = Object.create(Statement.prototype); -Assignment.prototype.constructor = Assignment; - -Assignment.prototype.toJs = function() { - return "var " + this.name + " = " + this.expr.toJs() + ";"; -} - -function Expression() { -} - -function Cons(head, tail) { - Expression.call(this); - this.head = head; - this.tail = tail; -} -Cons.prototype = Object.create(Expression.prototype); -Cons.prototype.constructor = Cons; - -Cons.prototype.toJs = function() { - return "context.cons(" + this.head + ", " + this.tail + ")"; -}; - -function Frag(axis, name) { - Expression.call(this); - this.axis = axis; - this.name = name; -} -Frag.prototype = Object.create(Expression.prototype); -Frag.prototype.constructor = Frag; - -Frag.prototype.toJs = function() { - var parts = [this.name]; - for ( var ax = this.axis; ax > 1; ax = ax.mas() ) { - parts.push( ( 2 === ax.cap().valueOf() ) ? "head" : "tail" ); - } - return parts.join("."); -}; - -function Bail() { - Statement.call(this); -} -Bail.prototype = Object.create(Statement.prototype); -Bail.prototype.constructor = Bail; - -Bail.prototype.toJs = function() { - return "throw new Error(\"Bail\")"; -}; - -function Identity(name) { - Expression.call(this); - this.name = name; -} -Identity.prototype = Object.create(Expression.prototype); -Identity.prototype.constructor = Identity; - -Identity.prototype.toJs = function() { - return this.name; -}; - -function Constant(index) { - Expression.call(this); - this.index = index; -} -Constant.prototype = Object.create(Expression.prototype); -Constant.prototype.constructor = Constant; - -Constant.prototype.toJs = function() { - return "constants[" + this.index + "]"; -}; - -function Nock(subject, formula, tail) { - Expression.call(this); - this.subject = subject; - this.formula = formula; - this.tail = tail; -} -Nock.prototype = Object.create(Expression.prototype); -Nock.prototype.constructor = Nock; - -Nock.prototype.toJs = function() { - var f = this.formula; - var targetCode = "(" + f + ".hasOwnProperty('target') ? " + f + - ".target : (" + f + ".target = context.compile(" + this.formula + ")))"; - return this.tail ? - "context.trampoline(" + targetCode + ", " + this.subject + ")" : - targetCode + "(" + this.subject + ")"; -}; - -function Deep(name) { - Expression.call(this); - this.name = name; -} -Deep.prototype = Object.create(Expression.prototype); -Deep.prototype.constructor = Deep; - -Deep.prototype.toJs = function() { - return this.name +".deep ? context.yes : context.no"; -}; - -function Bump(name) { - Expression.call(this); - this.name = name; -} -Bump.prototype = Object.create(Expression.prototype); -Bump.prototype.constructor = Bump; - -Bump.prototype.toJs = function() { - return this.name + ".bump()"; -}; - -function Same(one, two) { - Expression.call(this); - this.one = one; - this.two = two; -} -Same.prototype = Object.create(Expression.prototype); -Same.prototype.constructor = Same; - -Same.prototype.toJs = function() { - return "(" + this.one + ".equals(" + this.two + ")" + " ? context.yes : context.no)"; -}; - -function If(test, yes, no) { - Statement.call(this); - this.test = test; - this.yes = yes; - this.no = no; -} -If.prototype = Object.create(Statement.prototype); -If.prototype.constructor = If; - -If.prototype.toJs = function() { - return "if(" + this.test + ".loob()){" + - this.yes.toJs() + "}else{" + this.no.toJs() + "}"; -}; - -function Kick(axis, core, tail) { - Expression.call(this) - this.axis = axis; - this.core = core; - this.tail = tail; -} -Kick.prototype = Object.create(Expression.prototype); -Kick.prototype.constructor = Kick; - -Kick.prototype.toJs = function() { - var axis = this.axis.shortCode(); - - return "(function (cor) {" + - "var pro, tgt, bus, arms, bat = cor.head, has = false;" + - "if ( bat.hasOwnProperty('loc') && (tgt = bat.loc.jets[" + axis + "]) && bat.loc.fine(cor) ) {" + - "return tgt(cor);" + - "}" + - "if ( bat.hasOwnProperty('arms') ) {" + - "arms = bat.arms;" + - "has = arms.hasOwnProperty('" + axis + "');" + - "}" + - "else arms = bat.arms = {};" + - "tgt = (has ? arms['" + axis + "'] : (arms['" + axis + "'] = context.compile(" + - new Frag(this.axis, "bat").toJs() + ")));" + - "bus = cor;" + - (this.tail ? "pro = context.trampoline(tgt, bus);" : - "while (true) {" + - "pro = tgt(bus);" + - "if ( context.isTrampoline(pro) ) {" + - "tgt = pro.target;" + - "bus = pro.subject;" + - "}" + - "else break;" + - "}") + - "return pro;" + - "})(" + this.core + ")"; -}; - -function GetMemo(name) { - Expression.call(this); - this.name = name; -} -GetMemo.prototype = Object.create(Expression.prototype); -GetMemo.prototype.constructor = GetMemo; - -GetMemo.prototype.toJs = function() { - return "context.getMemo(" + this.name + ")"; -}; - -function PutMemo(key, val) { - Statement.call(this); - this.key = key; - this.val = val; -} -PutMemo.prototype = Object.create(Statement.prototype); -PutMemo.prototype.constructor = PutMemo; - -function Push(name) { - Statement.call(this); - this.name = name; -} -Push.prototype = Object.create(Statement.prototype); -Push.prototype.constructor = Push; - -Push.prototype.toJs = function() { - return "context.stackPush(" + this.name + ");"; -}; - -function Pop() { - Statement.call(this); -} -Pop.prototype = Object.create(Statement.prototype); -Pop.prototype.constructor = Pop; - -Pop.prototype.toJs = function() { - return "context.stackPop()"; -}; - -function Fast(clue, core) { - Statement.call(this); - this.clue = clue; - this.core = core; -} - -Fast.prototype.toJs = function() { - return "context.register(" + this.core + ", " + this.clue + ");"; -} - -function Slog(name) { - Statement.call(this); - this.name = name; -} - -Slog.prototype.toJs = function() { - return "context.slog(" + this.name + ")"; -}; - -function compile(formula, subject, product, fresh, constants, block, tail) { - var op, arg, one, two, odd; - if ( !(formula instanceof Cell )) { - throw new Error("invalid formula"); - } - op = formula.head; - arg = formula.tail; - if ( op instanceof Cell ) { - one = fresh(); - two = fresh(); - compile(op, subject, one, fresh, constants, block, false); - compile(arg, subject, two, fresh, constants, block, false); - block.append(new Assignment(product, new Cons(one, two))); - } - else switch ( op.valueOf() ) { - case 0: - if ( 0 === arg ) { - block.append(new Bail()); - } - else if ( 1 === arg ) { - block.append(new Identity(subject)); - } - else { - block.append(new Assignment(product, new Frag(arg, subject))); - } - break; - case 1: - constants.push(arg); - block.append(new Assignment(product, new Constant(constants.length - 1))); - break; - case 2: - one = fresh(); - two = fresh(); - compile(arg.head, subject, one, fresh, constants, block, false); - compile(arg.tail, subject, two, fresh, constants, block, false); - block.append(new Assignment(product, new Nock(one, two, tail))); - break; - case 3: - one = fresh(); - compile(arg, subject, one, fresh, constants, block, false); - block.append(new Assignment(product, new Deep(one))); - break; - case 4: - one = fresh(); - compile(arg, subject, one, fresh, constants, block, false); - block.append(new Assignment(product, new Bump(one))); - break; - case 5: - one = fresh(); - two = fresh(); - compile(arg.head, subject, one, fresh, constants, block, false); - compile(arg.tail, subject, two, fresh, constants, block, false); - block.append(new Assignment(product, new Same(one, two))); - break; - case 6: - odd = fresh(); - one = new Block(); - two = new Block(); - compile(arg.head, subject, odd, fresh, constants, block, false); - compile(arg.tail.head, subject, product, fresh, constants, one, tail); - compile(arg.tail.tail, subject, product, fresh, constants, two, tail); - block.append(new If(odd, one, two)); - break; - case 7: - one = fresh(); - compile(arg.head, subject, one, fresh, constants, block, false); - compile(arg.tail, one, product, fresh, constants, block, tail); - break; - case 8: - one = fresh(); - two = fresh(); - compile(arg.head, subject, one, fresh, constants, block, false); - block.append(new Assignment(two, new Cons(one, subject))); - compile(arg.tail, two, product, fresh, constants, block, tail); - break; - case 9: - odd = arg.head; - if ( 2 === odd.cap().valueOf() ) { - one = fresh(); - two = odd.mas(); - compile(arg.tail, subject, one, fresh, constants, block, false); - block.append(new Assignment(product, new Kick(two, one, tail))); - } - else { - compile(noun.dwim([7, arg.tail, 2, [0, 1], 0, odd]), - subject, product, fresh, constants, block, tail); - } - break; - case 10: - var hint = arg.head; - if ( !(arg.head instanceof Cell) ) { - // no recognized static hints - compile(arg.tail, subject, product, fresh, constants, block, tail); - } - else { - var zep = hint.head; - var clu = fresh(); - compile(hint.tail, subject, clu, fresh, constants, block, false); - if ( zep.equals(MEMO) ) { - var key = fresh(); - var got = fresh(); - odd = fresh(); - one = new Block(); - two = new Block(); - var konst = fresh(); - block.append(new Assignment(konst, new Constant(hint.tail))); - block.append(new Assignment(key, new Cons(subject, konst))); - block.append(new Assignment(got, new GetMemo(two))); - block.append(new Assignment(odd, new Deep(got))); - one.append(new Assignment(product, new Frag(noun.dwim(3), got))); - compile(arg.tail, subject, product, fresh, two, false); - two.append(new PutMemo(key, product)); - block.append(new If(odd, one, two)); - } - else if ( zep.equals(SLOG) ) { - block.append(new Slog(clu)); - compile(arg.tail, subject, product, fresh, constants, block, tail); - } - else if ( zep.equals(FAST) ) { - compile(arg.tail, subject, product, fresh, constants, block, false); - block.append(new Fast(clu, product)); - } - else if ( zep.equals(SPOT) || - zep.equals(MEAN) || - zep.equals(HUNK) || - zep.equals(LOSE) ) { - one = fresh(); - two = fresh(); - block.append(new Assignment(one, new Constant(zep))); - block.append(new Assignment(two, new Cons(one, clu))); - block.append(new Push(two)); - compile(arg.tail, subject, product, fresh, constants, block, false); - block.append(new Pop()); - } - else { - // unrecognized - compile(arg.tail, subject, product, fresh, constants, block, tail); - } - } - break; - case 11: - one = fresh(); - two = fresh(); - compile(arg.head, subject, one, fresh, constants, block, false); - compile(arg.tail, subject, two, fresh, constants, block, false); - block.append(new Assignment(product, new Esc(one, two))); - break; - default: - throw new Error("invalid opcode"); - } -} - -function Trampoline(target, subject) { - this.target = target; - this.subject = subject; -} - -function genFine(loc) { - var constants = [], out = [], i; - for ( i = 0; !loc.isStatic; ++i ) { - out.push("if(!constants[" + i + "].equals(a.head)){return false;}"); - constants.push(loc.noun); - out.push("a=" + new Frag(loc.axisToParent, "a").toJs() + ";"); - loc = loc.parentLoc; - } - out.push("return constants[" + i + "].equals(a);"); - constants.push(loc.noun); - var body = 'return function(a){' + out.join('') + 'return true;};'; - var builder = new Function('constants', body); - return builder(constants); -} - -var three = noun.dwim(3); -function Location(context, name, label, axisToParent, hooks, noun, parentLoc) { - this.name = name; - this.label = label; - this.parentLoc = parentLoc; - this.axisToParent = axisToParent; - this.fragToParent = Noun.fragmenter(axisToParent); - this.nameToAxis = hooks; - this.axisToName = {}; - this.isStatic = ( null === parentLoc || (three.equals(axisToParent) && parentLoc.isStatic) ); - if ( this.isStatic ) { - this.noun = noun; - } - else { - this.noun = noun.head; - this.noun.mug(); - } - for ( var k in hooks ) { - if ( hooks.hasOwnProperty(k) ) { - this.axisToName[hooks[k].shortCode()] = k; - } - } - this.jets = {}; - var drivers = context.drivers[label]; - if ( drivers && drivers.length > 0 ) { - for ( var i = 0; i < drivers.length; ++i ) { - var d = drivers[i]; - if ( d instanceof AxisArm ) { - this.jets[d.axis.mas().shortCode()] = d.fn; - } - else { - this.jets[nameToAxis[d.name].mas().shortCode()] = d.fn; - } - } - } - this.fine = genFine(this); -} - -function Clue(name, parentAxis, hooks) { - this.name = name; - this.parentAxis = parentAxis; - this.hooks = hooks; -} - -function JetDriver(label, fn) { - this.label = label; - this.fn = fn; -} - -function AxisArm(label, axis, fn) { - JetDriver.call(this, label, fn); - this.axis = axis; -} -AxisArm.prototype = Object.create(JetDriver.prototype); -AxisArm.prototype.constructor = AxisArm; - -function NamedArm(label, name, fn) { - JetDriver.call(this, label, fn); - this.name = name; -} -NamedArm.prototype = Object.create(JetDriver.prototype); -NamedArm.prototype.constructor = NamedArm; - -var two = noun.dwim(2); -function collectFromCore(prefix, spec, out) { - var name = spec[0], arms = spec[1], children = spec[2], - labl = prefix + "/" + name; - if ( arms instanceof Function ) { - out[labl] = [new AxisArm(labl, two, arms)]; - } - else { - var all = []; - for ( var k in arms ) { - if ( arms.hasOwnProperty(k) ) { - all.push(( 'number' === typeof(k) ) ? - new AxisArm(labl, noun.dwim(k), arms[k]) : - new NamedArm(labl, k, arms[k])); - } - } - out[labl] = all; - } - if ( children ) { - for ( var i = 0; i < children.length; ++i ) { - collectFromCore(labl, children[i], out); - } - } -} - -function Context(drivers) { - this.memo = new NounMap(); - this.clues = new NounMap(); - this.dash = new NounMap(); - this.tax = noun.Atom.yes; - this.drivers = {}; - if ( drivers ) { - collectFromCore('', drivers, this.drivers); - } -} - -Context.prototype.yes = noun.Atom.yes; -Context.prototype.no = noun.Atom.no; -Context.prototype.cons = function (h, t) { - return new Cell(h, t); -}; - -Context.prototype.trampoline = function(tgt, bus) { - return new Trampoline(tgt, bus); -}; - -Context.prototype.isTrampoline = function(a) { - return (a instanceof Trampoline); -}; - -Context.prototype.compile = function(cell) { - var i = 0; - var fresh = function() { - return "v" + ++i; - }; - var body = new Block(); - var constants = []; - compile(cell, "subject", "product", fresh, constants, body, true); - var text = "return function(subject){" + body.toJs() + "return product;}"; - var builder = new Function("context", "constants", text); - return cell.target = builder(this, constants); -}; - -Context.prototype.nock = function(subject, formula) { - var product, target; - if ( !formula.hasOwnProperty("target") ) { - this.compile(formula); - } - target = formula.target; - while ( true ) { - product = target(subject); - if ( product instanceof Trampoline ) { - subject = product.subject; - target = product.target; - } - else { - return product; - } - } -}; - -Context.prototype.getMemo = function(key) { - return this.memo.get(key); -} - -Context.prototype.putMemo = function(key, val) { - this.memo.insert(key, val); -}; - -Context.prototype.stackPush = function(item) { - this.tax = new Cell(item, this.tax); -}; - -Context.prototype.stackPop = function() { - this.tax = this.tax.tail; -} - -Context.prototype.slog = function(item) { - // TODO: don't rewrite ++wash again, just call the kernel - console.log(item); -}; - -function chum(n) { - if ( n.deep ) { - return Atom.cordToString(n.head) + n.tail.number.shortValue().toString(10); - } - else { - return Atom.cordToString(n); - } -} - -var ten = noun.dwim(10); -function skipHints(formula) { - while ( true ) { - if ( formula.deep ) { - if ( ten.equals(formula.head) ) { - formula = formula.tail.tail; - continue; - } - } - return formula; - } -} - -var zero = noun.dwim(0), constant_zero = noun.dwim(1,0); -function parseParentAxis(noun) { - var f = skipHints(noun); - if ( constant_zero.equals(f) ) { - return zero; - } - else if ( !zero.equals(f.head) ) { - throw new Error("weird formula head"); - } - else if ( 3 != f.tail.cap().valueOf() ) { - throw new Error("weird parent axis"); - } - return f.tail; -} - -var nine = noun.dwim(9), constant_frag = noun.dwim(0,1); -function parseHookAxis(nock) { - var f = skipHints(nock), - op = f.head; - if ( !op.deep ) { - if ( zero.equals(op) ) { - if ( !f.tail.deep ) { - return f.tail; - } - } - else if ( nine.equals(op) ) { - var rest = f.tail; - if ( !rest.head.deep && constant_frag.equals(rest.tail) ) { - return rest.head; - } - } - } - return null; -} - -function parseHooks(noun) { - var o = {}; - list.forEach(noun, function(c) { - var term = Atom.cordToString(c.head), - axis = parseHookAxis(c.tail); - if ( null != axis ) { - o[term] = axis; - } - }); - return o; -} - -Context.prototype.parseClue = function(raw) { - var clue = this.clues.get(raw); - if ( clue === undefined ) { - var name = chum(raw.head), - parentAxis = parseParentAxis(raw.tail.head), - hooks = parseHooks(raw.tail.tail); - clue = new Clue(name, parentAxis, hooks); - this.clues.insert(raw, clue); - } - return clue; -} - -Context.prototype.register = function(core, raw) { - var bat = core.head; - var loc = this.dash.get(bat); - if ( undefined === loc ) { - try { - var clue = this.parseClue(raw); - if ( zero.equals(clue.parentAxis) ) { - loc = new Location(this, clue.name, '/' + clue.name, zero, clue.hooks, core, null); - } - else { - var parentCore = core.at(clue.parentAxis), - parentBattery = parentCore.head, - parentLoc = this.dash.get(parentBattery); - if ( undefined === parentLoc ) { - console.log('register: invalid parent for ' + clue.name); - } - else { - var label = parentLoc.label + "/" + clue.name; - loc = new Location(this, clue.name, label, clue.parentAxis, clue.hooks, core, parentLoc); - } - } - bat.loc = loc; - this.dash.insert(bat, loc); - } - catch (e) { - console.log(e); - } - } -}; - -module.exports = { - Context: Context, -} diff --git a/src/nockjs/hamt.js b/src/nockjs/hamt.js deleted file mode 100644 index 7f543ca..0000000 --- a/src/nockjs/hamt.js +++ /dev/null @@ -1,137 +0,0 @@ -/* keys can be any noun, values aren't constrained */ - -function Slot() { -} - -function Node() { - Slot.call(this); - this.slots = new Array(32); -} -Node.prototype = Object.create(Slot.prototype); -Node.prototype.constructor = Node; - -Node.prototype.insert = function(key, val, lef, rem) { - var inx; - lef -= 5; - inx = rem >>> lef; - rem &= ((1 << lef) - 1); - - this.slots[inx] = ( undefined === this.slots[inx] ) - ? new Single(key, val) - : this.slots[inx].insert(key, val, lef, rem); - return this; -}; - -Node.prototype.get = function(key, lef, rem) { - var inx, sot; - lef -= 5; - inx = rem >>> lef; - rem &= ((1 << lef) - 1); - sot = this.slots[inx]; - - return ( undefined === sot ) ? undefined : sot.get(key, lef, rem); -}; - -function Bucket() { - this.singles = []; -} -Bucket.prototype = Object.create(Slot.prototype); -Bucket.prototype.constructor = Bucket; - -Bucket.prototype.insert = function(key, val, lef, rem) { - var s, a = this.singles; - - for ( var i = 0; i < a.length; ++i ) { - s = a[i]; - if ( s.key.equals(key) ) { - s.val = val; - return this; - } - } - a.push(new Single(key, val)); - return this; -}; - -Bucket.prototype.get = function(key, lef, rem) { - var s, a = this.singles; - - for ( var i = 0; i < a.length; ++i ) { - s = a[i]; - if ( s.key.equals(key) ) { - return s.val; - } - } - - return undefined; -}; - -function Single(key, val) { - Slot.call(this); - this.key = key; - this.val = val; -} -Single.prototype = Object.create(Slot.prototype); -Single.prototype.constructor = Single; - -Single.prototype.insert = function(key, val, lef, rem) { - if ( this.key.equals(key) ) { - this.val = val; - return this; - } - else { - var n, rom = this.key.mug() & ((1 << lef) - 1); - - if ( lef > 0 ) { - n = new Node(); - } - else { - n = new Bucket(); - } - n.insert(this.key, this.val, lef, rom); - n.insert(key, val, lef, rem); - return n; - } -}; - -Single.prototype.get = function(key, lef, rem) { - if ( this.key.equals(key) ) { - return this.val; - } - else { - return undefined; - } -}; - -function NounMap() { - this.slots = new Array(64); -} - -NounMap.prototype.insert = function(key, val) { - var m = key.mug(); - var inx = m >>> 25; - var sot = this.slots; - if ( undefined === sot[inx] ) { - sot[inx] = new Single(key, val); - } - else { - var rem = m & ((1 << 25) - 1); - sot[inx] = sot[inx].insert(key, val, 25, rem); - } -}; - -NounMap.prototype.get = function(key) { - var m = key.mug(); - var inx = m >>> 25; - var sot = this.slots[inx]; - if ( undefined === sot ) { - return undefined; - } - else { - var rem = m & ((1 << 25) - 1); - return sot.get(key, 25, rem); - } -}; - -module.exports = { - NounMap: NounMap -}; diff --git a/src/nockjs/list.js b/src/nockjs/list.js deleted file mode 100644 index f747623..0000000 --- a/src/nockjs/list.js +++ /dev/null @@ -1,40 +0,0 @@ -var noun = require('./noun.js'), - Cell = noun.Cell, - zero = noun.Atom.yes; - -function flop(a) { - var b = zero; - - while ( true ) { - if ( zero.equals(a) ) { - return b; - } - else if ( !a.deep ) { - throw new Error("Bail"); - } - else { - b = new Cell(a.head, b); - a = a.tail; - } - } -} - -function forEach(n, f) { - while ( true ) { - if ( zero.equals(n) ) { - return; - } - else if ( !n.deep ) { - throw new Error("Bail"); - } - else { - f(n.head); - n = n.tail; - } - } -} - -module.exports = { - flop: flop, - forEach: forEach, -}; diff --git a/src/nockjs/noun.js b/src/nockjs/noun.js deleted file mode 100644 index 971b03d..0000000 --- a/src/nockjs/noun.js +++ /dev/null @@ -1,479 +0,0 @@ -var BigInteger = require('jsbn').BigInteger; - -function Noun() { - this._mug = 0; -} - -Noun.prototype.loob = function () { - throw new Error("Bail"); -}; - -Noun.prototype.toString = function() { - var parts = []; - this.pretty(parts, false); - return parts.join(''); -}; - -Noun.prototype.mug = function () { - if ( 0 === this._mug ) { - this._mug = this.calculateMug(); - } - return this._mug; -}; - -Noun.prototype.mugged = function () { - return 0 !== this._mug; -}; - -Noun.prototype.deep = false; -Noun.prototype.bump = function () { - throw new Error("Bail"); -} - -Noun.prototype.equals = function(o) { - if ( this === o ) { - return true; - } - - if ( this instanceof Cell ) { - if ( o instanceof Cell) { - return this.unify(o); - } - else { - return false; - } - } - else { - if ( o instanceof Cell ) { - return false; - } - else if (0 === this.number.compareTo(o.number)) { - o.number = this.number; - return true; - } - else { - return false; - } - } -}; - - -function _mug_fnv(has_w) { - return Math.imul(has_w, 16777619); -} - -function _mug_out(has_w) { - return (has_w >>> 31) ^ (has_w & 0x7fffffff); -} - -function _mug_both(lef_w, rit_w) { - var bot_w = _mug_fnv(lef_w ^ _mug_fnv(rit_w)); - var out_w = _mug_out(bot_w); - - if ( 0 != out_w ) { - return out_w; - } - else { - return _mug_both(lef_w, ++rit_w); - } -} - -function Cell(head, tail) { - Noun.call(this); - this.head = head; - this.tail = tail; -} -Cell.prototype = Object.create(Noun.prototype); -Cell.prototype.constructor = Cell; -Cell.prototype.deep = true; - -Cell.prototype.pretty = function(out, tail) { - if ( !tail ) { - out.push('['); - } - this.head.pretty(out, false); - out.push(' '); - this.tail.pretty(out, true); - if ( !tail ) { - out.push(']'); - } -}; - -Cell.prototype.calculateMug = function() { - return _mug_both(this.head.mug(), this.tail.mug()); -}; - -Cell.prototype.unify = function(o) { - if ( this === o ) { - return true; - } - - if ( o.mugged() ) { - if ( this.mugged() ) { - if ( this.mug() != o.mug() ) { - return false; - } - } - else { - return o.unify(this); - } - } - - if ( this.head.equals(o.head) ) { - o.head = this.head; - if ( this.tail.equals(o.tail) ) { - o._mug = this._mug; - o.tail = this.tail; - return true; - } - } - - return false; -}; - -function Atom(number) { - Noun.call(this); - this.number = number; -} -Atom.prototype = Object.create(Noun.prototype); -Atom.prototype.constructor = Atom; - -var small = new Array(256); -(function() { - var i, bi; - for ( i = 0; i < 256; ++i ) { - bi = new BigInteger(); - bi.fromInt(i); - small[i] = new Atom(bi); - } -})(); - -var fragCache = { - 0: function(a) { - throw new Error("Bail"); - }, - 1: function(a) { - return a; - }, -}; -var one = small[1]; -Noun.fragmenter = function(a) { - var s = a.shortCode(); - if ( fragCache.hasOwnProperty(s) ) { - return fragCache[s]; - } - else { - for ( var parts = ['a']; !one.equals(a); a = a.mas() ) { - parts.push( ( 2 === a.cap().valueOf() ) ? 'head' : 'tail' ); - } - return fragCache[s] = new Function('a', 'return ' + parts.join('.') + ';'); - } -} - -Noun.prototype.at = function(a) { - return Noun.fragmenter(a)(this); -}; - -var shortBi = new BigInteger(); -shortBi.fromInt(65536); - -Atom.prototype.bytes = function() { - var bytes = this.number.toByteArray(); - var r = []; - for ( var i = bytes.length-1; i >= 0; --i ) { - r.push(bytes[i]&0xff); - } - return r; -} - -Atom.cordToString = function(c) { - var bytes = c.bytes(), - chars = []; - - for ( var i = 0; i < bytes.length; ++i ) { - chars.push(String.fromCharCode(bytes[i])); - } - return chars.join(''); -}; - -Atom.prototype.pretty = function(out, tail) { - if ( this.number.compareTo(shortBi) < 0 ) { - return out.push(this.number.toString(10)); - } - else { - var tap = [], isTa = true, isTas = true, bytes = this.number.toByteArray(); - for ( var i = bytes.length - 1; i >= 0; --i) { - var c = bytes[i]; - if ( isTa && ((c < 32) || (c > 127)) ) { - isTa = false; - isTas = false; - break; - } - else if ( isTas && !((c > 47 && c < 58) || // digits - (c > 96 && c < 123) || // lowercase letters - c === 45) ) { // - - isTas = false; - } - tap.push(String.fromCharCode(c)); - } - if ( isTas ) { - out.push('%'); - out.push.apply(out, tap); - } - else if ( isTa ) { - out.push("'"); - out.push.apply(out, tap); - out.push("'"); - } - else { - out.push("0x"); - out.push(this.number.toString(16)); - } - } -}; - -Atom.prototype.loob = function() { - switch ( this.number.intValue() ) { - case 0: - return true; - case 1: - return false; - default: - throw new Error("Bail"); - } -}; - -Atom.prototype.bump = function() { - return new Atom(this.number.add(BigInteger.ONE)); -}; - -var ida = i(1); -var heda = i(2); -var tala = i(3); - -Atom.prototype.cap = function() { - switch (this.number.intValue()) { - case 0: - case 1: - throw new Error("Bail"); - default: - return this.number.testBit(this.number.bitLength() - 2) ? tala : heda; - } -}; - -Atom.prototype.mas = function() { - switch (this.number.intValue()) { - case 0: - case 1: - throw new Error("Bail"); - case 2: - case 3: - return ida; - default: - var n = this.number; - var l = n.bitLength() - 2; - var addTop = new BigInteger(); - addTop.fromInt(1 << l); - var mask = new BigInteger(); - mask.fromInt((1 << l)-1); - return new Atom(n.and(mask).xor(addTop)); - } -}; - -Atom.prototype.calculateMug = function() { - var a = this.number.toByteArray(); - var b, c, d, e, f, bot; - for ( e = a.length - 1, b = (2166136261|0); ; ++b ) { - c = b; - bot = ( 0 === a[0] ) ? 1 : 0; - for ( d = e; d >= bot; --d ) { - c = _mug_fnv(c ^ (0xff & a[d])); - } - f = _mug_out(c); - if ( 0 !== f ) { - return f; - } - } -}; - -Atom.prototype.shortCode = function() { - return this.number.toString(36); // max supported by BigInteger -}; - -function s(str, radix) { - return new Atom(new BigInteger(str, radix)); -} - -function i(num) { - if ( num < 256 ) { - return small[num]; - } - else { - var bi = new BigInteger(); - bi.fromInt(num); - return new Atom(bi); - } -} - -function m(str) { - var i, j, octs = new Array(str.length); - for ( i = 0, j = octs.length - 1; i < octs.length; ++i, --j ) { - octs[j] = (str.charCodeAt(i) & 0xff).toString(16); - } - return new Atom(new BigInteger(octs.join(''), 16)) -} - -function dwim(a) { - var n = (arguments.length === 1 ? a : Array.apply(null, arguments)); - if ( n instanceof Noun ) { - return n; - } - if ( typeof n === "number" ) { - return i(n); - } - else if ( Array.isArray(n) ) { - var cel = new Cell(dwim(n[n.length-2]), dwim(n[n.length-1])); - for ( var j = n.length-3; j >= 0; --j ) { - cel = new Cell(dwim(n[j]), cel); - } - return cel; - } - else if ( typeof n === "string" ) { - return m(n); - } - console.log('what do you mean??', typeof n, n instanceof Noun, n.toString(), n); -} - -Atom.prototype.valueOf = function() { - return this.number.bitLength() <= 32 - ? this.number.intValue() - : this.number.toString(); -}; - -//TODO consider doing the dynamic args thing dwim does -const frond = function(opts) { // {tag: string, get: function(noun)}[] - return function(noun) { - if (!(noun instanceof Cell && noun.head instanceof Atom)) { - throw new Error('frond: noun not cell'); - } - const tag = Atom.cordToString(noun.head); - for (let i = 0; i < opts.length; i++) { - if (tag === opts[i].tag) { - return { [tag]: opts[i].get(noun.tail) }; - } - } - throw new Error('frond: unknown tag', tag); - }; -} - -const pairs = function(cels) { // {nom: string, get: function(noun)}[] - return function(noun) { - let i = 0; - let o = {}; - while(i < cels.length-1) { - if (!(noun instanceof Cell)) { - throw new Error('pairs: noun too shallow'); - } - o[cels[i].nom] = cels[i].get(noun.head); - noun = noun.tail; - i++; - } - o[cels[i].nom] = cels[i].get(noun); - return o; - }; -} - -const pair = function(na, ga, nb, gb) { - return pairs([{nom: na, get: ga}, {nom: nb, get: gb}]); -} - -const bucwut = function(opts) { // function(noun)[] - return function(noun) { - for (let i = 0; i < opts.length; i++) { - try { - const res = opts[i](noun); - return res; - } catch(e) { - continue; - } - } - throw new Error('bucwut: no matches'); - } -} - -const array = function(item) { // function(noun) - return function(noun) { - let a = []; - while (noun instanceof Cell) { - a.push(item(noun.head)); - noun = noun.tail; - } - return a; - } -} - -const tree = function(item) { // function(noun) - return function(noun) { - let a = []; - if (noun instanceof Cell) { - if (!(noun.tail instanceof Cell)) { - throw new Error('tree: malformed'); - } - a = [ - ...a, - item(noun.head), - ...tree(item)(noun.tail.head), - ...tree(item)(noun.tail.tail), - ]; - } - return a; - } -} - -const cord = function(noun) { - if (!(noun instanceof Atom)) { - throw new Error('cord: noun not atom'); - } - return Atom.cordToString(noun); -} - -const numb = function(noun) { - if (!(noun instanceof Atom)) { - throw new Error('numb: noun not atom'); - } - return noun.valueOf(); -} - -const loob = function(noun) { - return noun.loob(); -} - -const nill = function(noun) { - if (!(noun instanceof Atom && noun.number.intValue() === 0)) { - throw new Error('nill: not null'); - } - return null; -} - -const path = array(cord); - -module.exports = { - dwim: dwim, - Noun: Noun, - Cell: Cell, - Atom: { - Atom: Atom, - yes: i(0), - no: i(1), - fromMote: m, - fromInt: i, - fromString: s, - }, - enjs: { - //TODO ship, tape, tank, time, unit - frond, pairs, array, cord, numb, path, pair, bucwut, nill, tree, loob - }, - dejs: { - //TODO dwim, list, ship, tape, time - } -}; diff --git a/src/nockjs/serial.js b/src/nockjs/serial.js deleted file mode 100644 index 7f0cda8..0000000 --- a/src/nockjs/serial.js +++ /dev/null @@ -1,167 +0,0 @@ -var noun = require('./noun.js'), - list = require('./list.js'), - Cell = noun.Cell, - bits = require('./bits.js'), - zero = noun.Atom.yes, - one = noun.Atom.no, - i = noun.Atom.fromInt, - two = i(2), - three = i(3), - NounMap = require('./hamt.js').NounMap; - -function rub(a, b) { - var c, d, e, w, x, y, z, p, q, m; - - m = bits.add(a, i(bits.met(0, b))); - x = a; - - while ( zero.equals(bits.cut(zero, x, one, b)) ) { - y = bits.add(one, x); - - // Sanity check: crash if decoding more bits than available - if ( bits.gth(x, m) ) { - throw new Error("Bail"); - } - - x = y; - } - - if ( a.equals(x) ) { - return new Cell(one, zero); - } - - c = bits.sub(x, a); - d = bits.add(x, one); - - x = bits.dec(c); - y = bits.bex(x); - z = bits.cut(zero, d, x, b); - - e = bits.add(y, z); - w = bits.add(c, c); - y = bits.add(w, e); - z = bits.add(d, x); - - p = bits.add(w, e); - q = bits.cut(zero, z, e, b); - - return new Cell(p, q); -} - -function cue_in(m, a, b) { - var x,c,p,q,l,u,v,w,y,p,q,d,x; - - if ( zero.equals(bits.cut(zero, b, one, a)) ) { - x = bits.add(b, one); - c = rub(x, a); - p = bits.add(c.head, one); - q = c.tail; - m.insert(b, q); - } - else { - c = bits.add(two, b); - l = bits.add(one, b); - - if ( zero.equals(bits.cut(zero, l, one, a)) ) { - u = cue_in(m, a, c); - x = bits.add(u.head, c); - v = cue_in(m, a, x); - w = new Cell(u.tail.head, v.tail.head); - y = bits.add(u.head, v.head); - p = bits.add(two, y); - q = w; - m.insert(b, q); - } - else { - d = rub(c, a); - x = m.get(d.tail); - - if ( undefined === x ) { - throw new Error("Bail"); - } - - p = bits.add(two, d.head); - q = x; - } - } - return new Cell(p, new Cell(q, zero)); -} - -function cue(a) { - return cue_in(new NounMap(), a, zero).tail.head; -} - -function mat(a) { - if ( zero.equals(a) ) { - return noun.dwim(1, 1); - } - else { - var b = noun.dwim(bits.met(0, a)), - c = noun.dwim(bits.met(0, b)), - u = bits.dec(c), - v = bits.add(c, c), - x = bits.end(zero, u, b), - w = bits.bex(c), - y = bits.lsh(zero, u, a), - z = bits.mix(x, y), - p = bits.add(v, b), - q = bits.cat(zero, w, z); - return noun.dwim(p, q); - } -} - -function _jam_in_pair(m, h_a, t_a, b, l) { - var w = noun.dwim([2, 1], l), - x = bits.add(two, b), - d = _jam_in(m, h_a, x, w), - y = bits.add(x, d.head), - e = _jam_in(m, t_a, y, d.tail.head), - z = bits.add(d.head, e.head); - - return noun.dwim(bits.add(two, z), e.tail.head, zero); -} - -function _jam_in_ptr(m, u_c, l) { - var d = mat(u_c), - x = bits.lsh(zero, two, d.tail), - y = bits.add(two, d.head); - - return noun.dwim(y, [[y, bits.mix(three, x)], l], zero); -} - -function _jam_in_flat(m, a, l) { - var d = mat(a), - x = bits.add(one, d.head); - - return noun.dwim(x, [[x, bits.lsh(zero, one, d.tail)], l], zero); -} - -function _jam_in(m, a, b, l) { - var x, c = m.get(a); - - if ( undefined == c ) { - m.insert(a, b); - return a.deep ? - _jam_in_pair(m, a.head, a.tail, b, l) : - _jam_in_flat(m, a, l); - } - else if ( !a.deep && bits.met(0, a) <= bits.met(0, c) ) { - return _jam_in_flat(m, a, l); - } - else { - return _jam_in_ptr(m, c, l); - } -} - -function jam(n) { - var x = _jam_in(new NounMap(), n, zero, zero), - q = list.flop(x.tail.head); - - return bits.can(zero, q); -} - -module.exports = { - cue: cue, - mat: mat, - jam: jam -}; diff --git a/src/types.ts b/src/types.ts index 97c7822..eec12ea 100644 --- a/src/types.ts +++ b/src/types.ts @@ -146,7 +146,7 @@ export interface SubscriptionInterface { * Handle negative %watch-ack */ //TODO id here is a string, but is number in most other places... - err?(error: any, id: string): void; + err?(id: number, error: any): void; /** * Handle %fact */ From 095ec78a425f97759128ca98f3be2bf9b2ef12cf Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Mon, 11 Sep 2023 12:42:40 -0500 Subject: [PATCH 05/49] npm: restoring updated typescript PR changes --- package-lock.json | 13 ++++++++----- package.json | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 56906ab..8733782 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "rollup": "^2.59.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.34.1", - "typescript": "^3.9.7", + "typescript": "^5.2.2", "util": "^0.12.3", "web-streams-polyfill": "^3.0.3", "yet-another-abortcontroller-polyfill": "0.0.4" @@ -8312,15 +8312,16 @@ } }, "node_modules/typescript": { - "version": "3.9.10", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, - "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/unicode-canonical-property-names-ecmascript": { @@ -13937,7 +13938,9 @@ } }, "typescript": { - "version": "3.9.10", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true }, "unicode-canonical-property-names-ecmascript": { diff --git a/package.json b/package.json index bf49a46..5f52772 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "rollup": "^2.59.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.34.1", - "typescript": "^3.9.7", + "typescript": "^5.2.2", "util": "^0.12.3", "web-streams-polyfill": "^3.0.3", "yet-another-abortcontroller-polyfill": "0.0.4" From 679279696fa58509b0cc4dc997b86f9bb06f33fa Mon Sep 17 00:00:00 2001 From: fang Date: Mon, 11 Sep 2023 20:06:05 +0200 Subject: [PATCH 06/49] lib: update for eyre jam-channels api changes We no longer use a special path (/~/channel-jam), but instead make use of request headers to indicate what mode to open a channel in, and how to interpret a channel event. This required loosening up the headers type a little bit, making changes to the fetchOptions, making them dynamic rather than static. --- src/Urbit.ts | 29 ++++++++++++++++++----------- src/types.ts | 2 +- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 41bf01b..e73fcea 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -112,12 +112,18 @@ export class Urbit { /** This is basic interpolation to get the channel URL of an instantiated Urbit connection. */ private get channelUrl(): string { - return `${this.url}/~/channel-jam/${this.uid}`; + return `${this.url}/~/channel/${this.uid}`; } - private get fetchOptions(): any { - const headers: headers = { - 'Content-Type': 'application/json', + private fetchOptions( + method: ('PUT' | 'GET') = 'PUT', + mode: ('jam' | 'json') = 'jam') + : any { + const type = (mode === 'jam') ? 'application/x-urb-jam' : 'application/json'; + let headers: headers = {}; + switch (method) { + case 'PUT': headers['Content-Type'] = type; break; + case 'GET': headers['X-Channel-Format'] = type; break; }; if (!isBrowser) { headers.Cookie = this.cookie; @@ -304,7 +310,7 @@ export class Urbit { sseOptions.headers.Cookie = this.cookie; } fetchEventSource(this.channelUrl, { - ...this.fetchOptions, + ...this.fetchOptions('GET'), openWhenHidden: true, responseTimeout: 25000, onopen: async (response, isReconnect) => { @@ -520,7 +526,7 @@ export class Urbit { private async sendNounToChannel(noun: any): Promise { const response = await fetch(this.channelUrl, { - ...this.fetchOptions, + ...this.fetchOptions('PUT'), method: 'PUT', body: formatUw(Atom.fromString(jam(noun).toString().slice(2), 16).number.toString()), }); @@ -688,6 +694,7 @@ export class Urbit { /** * Deletes the connection to a channel. */ + //TODO noun-ify async delete() { const body = JSON.stringify([ { @@ -699,7 +706,7 @@ export class Urbit { navigator.sendBeacon(this.channelUrl, body); } else { const response = await fetch(this.channelUrl, { - ...this.fetchOptions, + ...this.fetchOptions('PUT', 'json'), method: 'POST', body: body, }); @@ -729,8 +736,8 @@ export class Urbit { const { app, path, mark } = params; console.log('scry', params) const response = await fetch( - `${this.url}/~/scry/${app}${path}.${ mark || 'json' }`, - this.fetchOptions + `${this.url}/~/scry/${app}${path}.${ mark || 'json' }`, //TODO jam by default + this.fetchOptions('GET') //NOTE mode doesn't matter, not opening channel ); if (!response.ok) { @@ -743,13 +750,13 @@ export class Urbit { /** * Run a thread * - * * @param inputMark The mark of the data being sent * @param outputMark The mark of the data being returned * @param threadName The thread to run * @param body The data to send to the thread * @returns The return value of the thread */ + //TODO noun-ify once spider is compatible async thread(params: Thread): Promise { const { inputMark, @@ -764,7 +771,7 @@ export class Urbit { const res = await fetch( `${this.url}/spider/${desk}/${inputMark}/${threadName}/${outputMark}.json`, { - ...this.fetchOptions, + ...this.fetchOptions('PUT', 'json'), method: 'POST', body: JSON.stringify(body), } diff --git a/src/types.ts b/src/types.ts index eec12ea..28f0339 100644 --- a/src/types.ts +++ b/src/types.ts @@ -176,8 +176,8 @@ export interface SubscriptionRequestInterface extends SubscriptionInterface { } export interface headers { - 'Content-Type': string; Cookie?: string; + [headerName: string]: string; } export interface CustomEventHandler { From a338b7eec20bc1d1939d2570cd43700c57b5d6ec Mon Sep 17 00:00:00 2001 From: fang Date: Wed, 13 Sep 2023 18:45:53 +0200 Subject: [PATCH 07/49] meta: write down to-do's --- src/Urbit.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Urbit.ts b/src/Urbit.ts index 74e6b0e..5288952 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -149,6 +149,9 @@ export class Urbit { * then opens the channel via EventSource. * */ + //TODO rename this to connect() and only do constructor & event source setup. + // that way it can be used with the assumption that you're already + // authenticated. static async authenticate({ ship, url, @@ -237,6 +240,7 @@ export class Urbit { * TODO as of urbit/urbit#6561, this is no longer true, and we are able * to interact with the ship using a guest identity. */ + //TODO rename to authenticate() and call connect() at the end async connect(): Promise { if (this.verbose) { console.log( From 3cc3732e2973976882c2f042039142c11af7664f Mon Sep 17 00:00:00 2001 From: fang Date: Wed, 13 Sep 2023 19:43:35 +0200 Subject: [PATCH 08/49] lib: resolve poke() calls eagerly, never throw Previously, the poke() function was asynchronous on _both_ its PUT request _and_ the poke-n/ack. In the nack case, it would *reject* the latter promise instead of resolving it, causing the whole to throw an error. Due to implementation mishap, this would always throw undefined. Here, we update this behavior, so that it's asynchronous on _only_ the PUT request, and returns the event id as soon as that resolves. The callbacks passed as arguments still get called as normal. This misbehavior was discovered while finishing the implementation of the "handle poke nack" test, whose final form has been included. Note that this is a subtle breaking change. Clients who were awaiting on their poke() call will now see different/faster behavior, and no longer need to fold it into a catch block. --- src/Urbit.ts | 22 ++++++---------------- test/default.test.ts | 23 ++++++++--------------- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 5288952..0cf0b51 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -586,22 +586,12 @@ export class Urbit { mark, json, }; - const [send, result] = await Promise.all([ - this.sendJSONtoChannel(message), - new Promise((resolve, reject) => { - this.outstandingPokes.set(message.id, { - onSuccess: () => { - onSuccess(); - resolve(message.id); - }, - onError: (event) => { - onError(event); - reject(event.err); - }, - }); - }), - ]); - return result; + this.outstandingPokes.set(message.id, { + onSuccess: () => { onSuccess(); }, + onError: (err) => { onError(err); }, + }); + await this.sendJSONtoChannel(message); + return message.id; } /** diff --git a/test/default.test.ts b/test/default.test.ts index 2b4383b..586fc89 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -141,7 +141,7 @@ describe('subscription', () => { expect(params.event).toHaveBeenNthCalledWith(1, firstEv, 'json', 1); expect(params.event).toHaveBeenNthCalledWith(2, secondEv, 'json', 1); }, 800); - it('should poke', async () => { + it('should handle poke acks', async () => { fetchSpy = jest.spyOn(window, 'fetch'); airlock = newUrbit(); airlock.onOpen = jest.fn(); @@ -158,17 +158,13 @@ describe('subscription', () => { expect(params.onSuccess).toHaveBeenCalled(); }, 800); - it('should nack poke', async () => { + it('should handle poke nacks', async () => { fetchSpy = jest.spyOn(window, 'fetch'); airlock = newUrbit(); airlock.onOpen = jest.fn(); fetchSpy - .mockImplementationOnce(() => - Promise.resolve({ ok: true, body: fakeSSE() }) - ) - .mockImplementationOnce(() => - Promise.resolve({ ok: false, body: fakeSSE([ack(1, true)]) }) - ); + .mockImplementationOnce(fakeFetch(() => fakeSSE())) + .mockImplementationOnce(fakeFetch(() => fakeSSE([ack(1, true)]))); const params = { app: 'app', @@ -177,11 +173,8 @@ describe('subscription', () => { onSuccess: jest.fn(), onError: jest.fn(), }; - try { - await airlock.poke(params); - await wait(300); - } catch (e) { - expect(true).toBe(true); - } - }); + await airlock.poke(params); + await wait(300); + expect(params.onError).toHaveBeenCalled(); + }, 800); }); From c0ab9a149f41e30a6e85689b3398ae3800f8cb2b Mon Sep 17 00:00:00 2001 From: fang Date: Wed, 27 Sep 2023 18:26:31 +0200 Subject: [PATCH 09/49] lib: account for desk in facts per new eyre api It includes the desk, so that mark files can be picked from the correct desk by eyre internally. This implementation detail ends up leaking into its interface right now, so we must account for it when unpacking the fact. --- src/Urbit.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 4b9b127..26db330 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -405,7 +405,7 @@ export class Urbit { funcs.err(id, bod.tail); this.outstandingSubscriptions.delete(id); } - // [%fact =mark =noun] + // [%fact =desk =mark =noun] } else if ( tag === 'fact' && this.outstandingSubscriptions.has(id) @@ -413,7 +413,9 @@ export class Urbit { const funcs = this.outstandingSubscriptions.get(id); try { //TODO support binding conversion callback? - funcs.event(id, Atom.cordToString(bod.head), bod.tail); + const mark = Atom.cordToString(bod.tail.head); + //NOTE we don't pass the desk. it's a leak-y eyre impl detail + funcs.event(id, mark, bod.tail.tail); } catch (e) { console.error('Failed to call subscription event callback', e); } From 764fe09f5b92cdf2e4d7a316f82488141cae877e Mon Sep 17 00:00:00 2001 From: fang Date: Wed, 27 Sep 2023 18:27:53 +0200 Subject: [PATCH 10/49] lib: simplify jammed noun generation We were going out of and back into Atom shape, but we can just toString it in-place. --- src/Urbit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 26db330..d6b77be 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -534,7 +534,7 @@ export class Urbit { const response = await fetch(this.channelUrl, { ...this.fetchOptions('PUT'), method: 'PUT', - body: formatUw(Atom.fromString(jam(noun).toString().slice(2), 16).number.toString()), + body: formatUw(jam(noun).number.toString()), }); if (!response.ok) { throw new Error('Failed to PUT channel'); From f9f23dfb5e079213be044c695bba76e2c3604bab Mon Sep 17 00:00:00 2001 From: fang Date: Wed, 27 Sep 2023 18:32:11 +0200 Subject: [PATCH 11/49] tests: update tests for noun channels Replace json with nouns, make sure to test nouns for equality properly. --- src/types.ts | 2 +- test/default.test.ts | 53 ++++++++++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/src/types.ts b/src/types.ts index 28f0339..5fddd93 100644 --- a/src/types.ts +++ b/src/types.ts @@ -4,7 +4,7 @@ * `"/updates"` */ export type Path = string; -export type NounPath = [string]; +export type NounPath = string[]; //NOTE must contain trailing ~ /** * @p including leading sig, rendered as a string diff --git a/test/default.test.ts b/test/default.test.ts index 586fc89..14e9cdb 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -1,6 +1,24 @@ -import Urbit from '../src'; +import Urbit, { NounPath } from '../src'; +import { Noun, Atom, Cell, jam, dwim } from '@urbit/nockjs'; +import { formatUw } from '@urbit/aura'; import 'jest'; +function areNounsEqual(a: unknown, b: unknown): boolean | undefined { + const isANoun = a instanceof Atom || a instanceof Cell; + const isBNoun = b instanceof Atom || b instanceof Cell; + + if (isANoun && isBNoun) { + return a.equals(b); + } else if (isANoun === isBNoun) { + return undefined; + } else { + return false; + } +} + +//NOTE for some reason, this function isn't in the ts defs yet +(expect as any).addEqualityTesters([areNounsEqual]); + function fakeSSE(messages: any[] = [], timeout = 0) { const ourMessages = [...messages]; const enc = new TextEncoder(); @@ -35,21 +53,18 @@ function newUrbit(): Urbit { } let eventId = 0; -function event(data: any) { - return `id:${eventId++}\ndata:${JSON.stringify(data)}\n\n`; +function event(data: Noun) { + //TODO bigint and BigInteger not compatible ): + return `id:${eventId++}\ndata:${formatUw(jam(data).number.toString())}\n\n`; } -function fact(id: number, data: any) { - return event({ - response: 'diff', - id, - json: data, - }); +function fact(id: number, desk: string, mark: string, noun: Noun) { + return event(dwim(id, 'fact', desk, mark, noun)); } function ack(id: number, err = false) { - const res = err ? { err: 'Error' } : { ok: true }; - return event({ id, response: 'poke', ...res }); + const res: Noun = err ? dwim(0, 'my-cool-tang', 0) : dwim(0); + return event(dwim(id, 'poke-ack', res)); } const fakeFetch = (body: Function) => () => Promise.resolve({ @@ -124,22 +139,22 @@ describe('subscription', () => { airlock.onOpen = jest.fn(); const params = { app: 'app', - path: '/path', + path: ['path', 0] as NounPath, err: jest.fn(), event: jest.fn(), quit: jest.fn(), }; - const firstEv = 'one'; - const secondEv = 'two'; - const events = (id: number) => [fact(id, firstEv), fact(id, secondEv)]; + const firstEv = dwim('one'); + const secondEv = dwim('two'); + const events = (id: number) => [fact(id, 'desk', 'mark', firstEv), fact(id, 'desk', 'mark', secondEv)]; fetchSpy.mockImplementation(fakeFetch(() => fakeSSE(events(1)))); await airlock.subscribe(params); await wait(600); expect(airlock.onOpen).toBeCalled(); - expect(params.event).toHaveBeenNthCalledWith(1, firstEv, 'json', 1); - expect(params.event).toHaveBeenNthCalledWith(2, secondEv, 'json', 1); + expect(params.event).toHaveBeenNthCalledWith(1, 1, 'mark', firstEv); + expect(params.event).toHaveBeenNthCalledWith(2, 1, 'mark', secondEv); }, 800); it('should handle poke acks', async () => { fetchSpy = jest.spyOn(window, 'fetch'); @@ -149,7 +164,7 @@ describe('subscription', () => { const params = { app: 'app', mark: 'mark', - json: { poke: 1 }, + noun: dwim(1), onSuccess: jest.fn(), onError: jest.fn(), }; @@ -169,7 +184,7 @@ describe('subscription', () => { const params = { app: 'app', mark: 'mark', - json: { poke: 1 }, + noun: dwim(1), onSuccess: jest.fn(), onError: jest.fn(), }; From 017ed7100141e974538d081a311ddfdcaced0675 Mon Sep 17 00:00:00 2001 From: fang Date: Fri, 19 Jan 2024 22:17:16 +0100 Subject: [PATCH 12/49] lib: start restructuring connection logic There were shenanigans aronud .eventSource getting recursively called into by .sendNounToChannel. This whole structure was unnecessarily recursive and hard to follow. Here we flatten it out a little bit, making .eventSource responsible for continuing after an initialization poke, in the "not yet initialized" case. This means that developers using this library need to explicitly call .eventSource() in order to establish a connection. This probably makes for a better API, although we should add a success/failure return value to it in the near future. --- src/Urbit.ts | 38 ++++++-------------------------------- test/default.test.ts | 12 +++++++++--- 2 files changed, 15 insertions(+), 35 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index d6b77be..bfc45d8 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -176,11 +176,6 @@ export class Urbit { airlock.ship = ship; await airlock.connect(); //TODO can we just send an empty array? - await airlock.poke({ - app: 'hood', - mark: 'helm-hi', - noun: dwim('opening airlock'), - }); await airlock.eventSource(); return airlock; } @@ -291,29 +286,15 @@ export class Urbit { if (this.sseClientInitialized) { return Promise.resolve(); } - if (this.lastEventId === 0) { - this.emit('status-update', { status: 'opening' }); - // Can't receive events until the channel is open, - // so poke and open then - //TODO can we just send an empty array? - await this.poke({ - app: 'hood', - mark: 'helm-hi', - noun: dwim('Opening API channel'), - }); - return; - } + this.emit('status-update', { status: 'opening' }); + // Can't receive events until the channel is open, + // so send an empty list of commands to open it. + await this.sendNounToChannel(null); //tmp api change soon this.sseClientInitialized = true; return new Promise((resolve, reject) => { - const sseOptions: SSEOptions = { - headers: {}, - }; - if (isBrowser) { - sseOptions.withCredentials = true; - } else if (isNode) { - sseOptions.headers.Cookie = this.cookie; - } fetchEventSource(this.channelUrl, { + //TODO manually inject headers = { 'last-event-id': lastHeardEventId } + // if needed ...this.fetchOptions('GET'), openWhenHidden: true, responseTimeout: 25000, @@ -366,7 +347,6 @@ export class Urbit { let data: any; if (event.data) { data = cue(Atom.fromString(parseUw(event.data).toString())); - console.log('got real data', data.toString()); } // [request-id channel-event] @@ -539,12 +519,6 @@ export class Urbit { if (!response.ok) { throw new Error('Failed to PUT channel'); } - if (!this.sseClientInitialized) { - if (this.verbose) { - console.log('initializing event source'); - } - await this.eventSource(); - } } /** diff --git a/test/default.test.ts b/test/default.test.ts index 14e9cdb..922b1a0 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -92,10 +92,10 @@ describe('Initialisation', () => { fetchSpy = jest.spyOn(window, 'fetch'); fetchSpy .mockImplementationOnce(() => - Promise.resolve({ ok: true, body: fakeSSE() } as Response) + Promise.resolve({ ok: true, body: null } as Response) ) .mockImplementationOnce(() => - Promise.resolve({ ok: true, body: fakeSSE([ack(1)]) } as Response) + Promise.resolve({ ok: true, body: fakeSSE() } as Response) ); await airlock.eventSource(); @@ -147,8 +147,10 @@ describe('subscription', () => { const firstEv = dwim('one'); const secondEv = dwim('two'); const events = (id: number) => [fact(id, 'desk', 'mark', firstEv), fact(id, 'desk', 'mark', secondEv)]; - fetchSpy.mockImplementation(fakeFetch(() => fakeSSE(events(1)))); + fetchSpy + .mockImplementation(fakeFetch(() => fakeSSE(events(1)))); + await airlock.eventSource(); await airlock.subscribe(params); await wait(600); @@ -168,6 +170,7 @@ describe('subscription', () => { onSuccess: jest.fn(), onError: jest.fn(), }; + await airlock.eventSource(); await airlock.poke(params); await wait(300); expect(params.onSuccess).toHaveBeenCalled(); @@ -177,8 +180,10 @@ describe('subscription', () => { fetchSpy = jest.spyOn(window, 'fetch'); airlock = newUrbit(); airlock.onOpen = jest.fn(); + //TODO response mocking should be more accurate/narrow fetchSpy .mockImplementationOnce(fakeFetch(() => fakeSSE())) + .mockImplementationOnce(fakeFetch(() => fakeSSE([ack(1, true)]))) .mockImplementationOnce(fakeFetch(() => fakeSSE([ack(1, true)]))); const params = { @@ -188,6 +193,7 @@ describe('subscription', () => { onSuccess: jest.fn(), onError: jest.fn(), }; + await airlock.eventSource(); await airlock.poke(params); await wait(300); expect(params.onError).toHaveBeenCalled(); From f4447da5bef1812e68d9b3d770d3d997a752d226 Mon Sep 17 00:00:00 2001 From: fang Date: Fri, 19 Jan 2024 22:34:39 +0100 Subject: [PATCH 13/49] lib: make sendNounsToChannel() match eyre's api Eyre takes a list of commands for each incoming PUT. Here, we update sendNounToChannel() into sendNounsToChannel(), taking a variable number of arguments, which get converted into "real" Nouns inside of the function, using nockjs's dwim logic. (Of course, this means callers are still free to pass pre-built Nouns also.) This way, we don't end up with Noun construction boilerplate all over the place, and this lets us send the list of empty commands, which we want to use for channel initialization. --- src/Urbit.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index bfc45d8..e3b2d70 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -18,7 +18,7 @@ import { } from './types'; import EventEmitter, { hexString } from './utils'; -import { Noun, Atom, Cell, dwim, jam, cue } from '@urbit/nockjs'; +import { Noun, Atom, Cell, dwim, dejs, jam, cue } from '@urbit/nockjs'; import { parseUw, formatUw, patp2dec } from '@urbit/aura'; /** @@ -175,7 +175,6 @@ export class Urbit { airlock.verbose = verbose; airlock.ship = ship; await airlock.connect(); - //TODO can we just send an empty array? await airlock.eventSource(); return airlock; } @@ -289,7 +288,7 @@ export class Urbit { this.emit('status-update', { status: 'opening' }); // Can't receive events until the channel is open, // so send an empty list of commands to open it. - await this.sendNounToChannel(null); //tmp api change soon + await this.sendNounsToChannel(); this.sseClientInitialized = true; return new Promise((resolve, reject) => { fetchEventSource(this.channelUrl, { @@ -505,16 +504,17 @@ export class Urbit { private async ack(eventId: number): Promise { this.lastAcknowledgedEventId = eventId; // [%ack event-id=@ud] - const non = dwim(['ack', eventId], 0); - await this.sendNounToChannel(non); + await this.sendNounsToChannel(['ack', eventId]); return eventId; } - private async sendNounToChannel(noun: any): Promise { + //NOTE every arg is interpreted (through nockjs.dwim) as a noun, which + // should result in a noun nesting inside of the xx $eyre-command type + private async sendNounsToChannel(...args: any[]): Promise { const response = await fetch(this.channelUrl, { ...this.fetchOptions('PUT'), method: 'PUT', - body: formatUw(jam(noun).number.toString()), + body: formatUw(jam(dejs.list(args)).number.toString()), }); if (!response.ok) { throw new Error('Failed to PUT channel'); @@ -584,12 +584,12 @@ export class Urbit { const eventId = this.getEventId(); const ship = Atom.fromString(patp2dec('~' + shipName), 10); // [%poke request-id=@ud ship=@p app=term mark=@tas =noun] - const non = dwim(['poke', eventId, ship, app, mark, noun], 0); + const non = ['poke', eventId, ship, app, mark, noun]; this.outstandingPokes.set(eventId, { onSuccess: () => { onSuccess(); }, onError: (err) => { onError(err); }, }); - await this.sendNounToChannel(non); + await this.sendNounsToChannel(non); return eventId; } @@ -631,14 +631,14 @@ export class Urbit { }); // [%subscribe request-id=@ud ship=@p app=term =path] - const non = dwim([ + const non = [ 'subscribe', eventId, Atom.fromString(patp2dec('~' + ship), 10), app, path, - ], 0); - await this.sendNounToChannel(non); + ]; + await this.sendNounsToChannel(non); return eventId; } @@ -650,9 +650,9 @@ export class Urbit { */ async unsubscribe(subscription: number) { // [%unsubscribe request-id=@ud subscription-id=@ud] - return this.sendNounToChannel(dwim( - ['unsubscribe', this.getEventId(), subscription], 0 - )).then(() => { + return this.sendNounsToChannel( + ['unsubscribe', this.getEventId(), subscription] + ).then(() => { this.emit('subscription', { id: subscription, status: 'close', From dde870d0fe0dc11ef09638b2375f7d751c40fb0c Mon Sep 17 00:00:00 2001 From: fang Date: Fri, 19 Jan 2024 22:39:13 +0100 Subject: [PATCH 14/49] deps: update jest --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb48b8c..06fe013 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@rollup/plugin-node-resolve": "^13.0.6", "@types/browser-or-node": "^1.2.0", "@types/eventsource": "^1.1.5", - "@types/jest": "^26.0.24", + "@types/jest": "^29.5.5", "@types/react": "^16.9.56", "@typescript-eslint/eslint-plugin": "^4.7.0", "@typescript-eslint/parser": "^4.7.0", From 21f3546eeeec860605f6d01ef34fa0f7251b4cbf Mon Sep 17 00:00:00 2001 From: fang Date: Fri, 19 Jan 2024 22:39:29 +0100 Subject: [PATCH 15/49] tmp: various todo's and notes --- src/Urbit.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Urbit.ts b/src/Urbit.ts index e3b2d70..bdf403b 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -281,6 +281,19 @@ export class Urbit { /** * Initializes the SSE pipe for the appropriate channel. */ + //TODO rename to connect() maybe, if we figure out the other ones lol + //TODO follow this pseudocode structure, it's Correctâ„¢ + // if (weAreConnected) { + // return; + // } + // else { + // // create the channel if we have never heard from it before + // if (wasNeverOpen) // aka lastEventId === 0 + // await this.sendNounsToChannel(); + // // the channel has been (or already was) created, (re)connect to it + // connectionLogicBelow(lastEventId); + // } + //TODO explicit success/failure return? async eventSource(): Promise { if (this.sseClientInitialized) { return Promise.resolve(); From 3a5c11a1faab1159bcf36efb444f0fc57d90e4ff Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 23 Jan 2024 12:16:27 -0600 Subject: [PATCH 16/49] lib: restructure setup and its components - renamed eventSource to connect - renamed authenticate to setupChannel - renamed connect to authenticate - no longer accept ship in the constructor - refactored constructor to take object instead of individual arguments - consistently follow patp syntax for ship and our - removed desk as a parameter and now require for thread - onReconnect removed in favor of onOpen, reconnect still signalled with param - various comment fixes and formatting --- src/Urbit.ts | 211 +++++++++++++++++++++---------------------- src/types.ts | 48 ++++++++-- test/default.test.ts | 22 +++-- 3 files changed, 151 insertions(+), 130 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index bdf403b..7fce3ff 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -1,24 +1,22 @@ -import { isBrowser, isNode } from 'browser-or-node'; +import { isBrowser } from 'browser-or-node'; import { UrbitHttpApiEvent, UrbitHttpApiEventType } from './events'; import { fetchEventSource, EventSourceMessage } from './fetch-event-source'; import { Scry, Thread, - AuthenticationInterface, PokeInterface, SubscriptionRequestInterface, headers, - SSEOptions, PokeHandlers, - Message, FatalError, NounPath, ReapError, + UrbitParams, } from './types'; import EventEmitter, { hexString } from './utils'; -import { Noun, Atom, Cell, dwim, dejs, jam, cue } from '@urbit/nockjs'; +import { Atom, Cell, dejs, jam, cue, Noun } from '@urbit/nockjs'; import { parseUw, formatUw, patp2dec } from '@urbit/aura'; /** @@ -82,11 +80,21 @@ export class Urbit { */ private abort = new AbortController(); + /** + * The URL of the ship we're connected to + */ + url: string; + /** * Identity of the ship we're connected to */ ship?: string | null; + /** + * Our access code + */ + code?: string; + /** * Our identity, with which we are authenticated into the ship */ @@ -101,14 +109,22 @@ export class Urbit { * number of consecutive errors in connecting to the eventsource */ private errorCount = 0; - - onError?: (error: any) => void = null; - + /** + * Called when the connection is established. Probably don't use this + * as a trigger for refetching data. + * + * @param reconnect - true if this is a reconnection + */ + onOpen?: (reconnect: boolean) => void = null; + /** + * Called on every attempt to reconnect to the ship. Followed by onOpen + * or onError depending on whether the connection succeeds. + */ onRetry?: () => void = null; - - onOpen?: () => void = null; - - onReconnect?: () => void = null; + /** + * Called when the connection fails irrecoverably + */ + onError?: (error: any) => void = null; /** This is basic interpolation to get the channel URL of an instantiated Urbit connection. */ private get channelUrl(): string { @@ -116,15 +132,19 @@ export class Urbit { } private fetchOptions( - method: ('PUT' | 'GET') = 'PUT', - mode: ('jam' | 'json') = 'jam') - : any { - const type = (mode === 'jam') ? 'application/x-urb-jam' : 'application/json'; + method: 'PUT' | 'GET' = 'PUT', + mode: 'jam' | 'json' = 'jam' + ): any { + const type = mode === 'jam' ? 'application/x-urb-jam' : 'application/json'; let headers: headers = {}; switch (method) { - case 'PUT': headers['Content-Type'] = type; break; - case 'GET': headers['X-Channel-Format'] = type; break; - }; + case 'PUT': + headers['Content-Type'] = type; + break; + case 'GET': + headers['X-Channel-Format'] = type; + break; + } if (!isBrowser) { headers.Cookie = this.cookie; } @@ -137,14 +157,17 @@ export class Urbit { } /** - * Constructs a new Urbit connection. - * - * @param url The URL (with protocol and port) of the ship to be accessed. If - * the airlock is running in a webpage served by the ship, this should just - * be the empty string. - * @param code The access code for the ship at that address + * Constructs a new Urbit instance. + * @param params The configuration for connecting to an Urbit ship. */ - constructor(public url: string, public code?: string, public desk?: string) { + constructor(params: UrbitParams) { + this.url = params.url; + this.code = params.code; + this.verbose = params.verbose || false; + this.onError = params.onError; + this.onRetry = params.onRetry; + this.onOpen = params.onOpen; + if (isBrowser) { window.addEventListener('beforeunload', this.delete); } @@ -155,27 +178,25 @@ export class Urbit { * All-in-one hook-me-up. * * Given a ship, url, and code, this returns an airlock connection - * that is ready to go. It `|hi`s itself to create the channel, - * then opens the channel via EventSource. - * + * that is ready to go. It creates a channel and connects to it. */ - //TODO rename this to connect() and only do constructor & event source setup. - // that way it can be used with the assumption that you're already - // authenticated. - static async authenticate({ - ship, - url, - code, - verbose = false, - }: AuthenticationInterface) { - const airlock = new Urbit( - url.startsWith('http') ? url : `http://${url}`, - code - ); - airlock.verbose = verbose; - airlock.ship = ship; + static async setupChannel({ url, code, ...params }: UrbitParams) { + const airlock = new Urbit({ + url: url.startsWith('http') ? url : `http://${url}`, + code, + ...params, + }); + + // Learn where we are aka what ship we're connecting to + airlock.getShipName(); + + if (code) { + await airlock.authenticate(); + } + // Learn who we are aka what patp + airlock.getOurName(); + await airlock.connect(); - await airlock.eventSource(); return airlock; } @@ -219,7 +240,7 @@ export class Urbit { credentials: 'include', }); const name = await nameResp.text(); - this.ship = name.substring(1); + this.ship = name; } /** @@ -236,17 +257,16 @@ export class Urbit { credentials: 'include', }); const name = await nameResp.text(); - this.our = name.substring(1); + this.our = name; } /** * Connects to the Urbit ship. Nothing can be done until this is called. - * That's why we roll it into this.authenticate + * That's why we roll it into this.setupChannel. * TODO as of urbit/urbit#6561, this is no longer true, and we are able * to interact with the ship using a guest identity. */ - //TODO rename to authenticate() and call connect() at the end - async connect(): Promise { + async authenticate(): Promise { if (this.verbose) { console.log( `password=${this.code} `, @@ -259,7 +279,7 @@ export class Urbit { method: 'post', body: `password=${this.code}`, credentials: 'include', - }).then(async response => { + }).then(async (response) => { if (this.verbose) { console.log('Received authentication response', response); } @@ -273,28 +293,14 @@ export class Urbit { if (!isBrowser) { this.cookie = cookie; } - this.getShipName(); - this.getOurName(); }); } /** * Initializes the SSE pipe for the appropriate channel. */ - //TODO rename to connect() maybe, if we figure out the other ones lol - //TODO follow this pseudocode structure, it's Correctâ„¢ - // if (weAreConnected) { - // return; - // } - // else { - // // create the channel if we have never heard from it before - // if (wasNeverOpen) // aka lastEventId === 0 - // await this.sendNounsToChannel(); - // // the channel has been (or already was) created, (re)connect to it - // connectionLogicBelow(lastEventId); - // } //TODO explicit success/failure return? - async eventSource(): Promise { + async connect(): Promise { if (this.sseClientInitialized) { return Promise.resolve(); } @@ -314,12 +320,9 @@ export class Urbit { if (this.verbose) { console.log('Opened eventsource', response); } - if (isReconnect) { - this.onReconnect && this.onReconnect(); - } if (response.ok) { this.errorCount = 0; - this.onOpen && this.onOpen(); + this.onOpen && this.onOpen(isReconnect); this.emit('status-update', { status: isReconnect ? 'reconnected' : 'active', }); @@ -362,20 +365,18 @@ export class Urbit { } // [request-id channel-event] - if ( data instanceof Cell && - data.head instanceof Atom && - data.tail instanceof Cell && - data.tail.head instanceof Atom) - { + if ( + data instanceof Cell && + data.head instanceof Atom && + data.tail instanceof Cell && + data.tail.head instanceof Atom + ) { //NOTE id could be string if id > 2^32, not expected in practice const id = data.head.valueOf() as number; const tag = Atom.cordToString(data.tail.head); const bod = data.tail.tail; // [%poke-ack p=(unit tang)] - if ( - tag === 'poke-ack' && - this.outstandingPokes.has(id) - ) { + if (tag === 'poke-ack' && this.outstandingPokes.has(id)) { const funcs = this.outstandingPokes.get(id); if (bod instanceof Atom) { funcs.onSuccess(); @@ -385,7 +386,7 @@ export class Urbit { funcs.onError(bod.tail); } this.outstandingPokes.delete(id); - // [%watch-ack p=(unit tang)] + // [%watch-ack p=(unit tang)] } else if ( tag === 'watch-ack' && this.outstandingSubscriptions.has(id) @@ -397,7 +398,7 @@ export class Urbit { funcs.err(id, bod.tail); this.outstandingSubscriptions.delete(id); } - // [%fact =desk =mark =noun] + // [%fact =desk =mark =noun] } else if ( tag === 'fact' && this.outstandingSubscriptions.has(id) @@ -411,7 +412,7 @@ export class Urbit { } catch (e) { console.error('Failed to call subscription event callback', e); } - // [%kick ~] + // [%kick ~] } else if ( tag === 'kick' && this.outstandingSubscriptions.has(id) @@ -523,7 +524,7 @@ export class Urbit { //NOTE every arg is interpreted (through nockjs.dwim) as a noun, which // should result in a noun nesting inside of the xx $eyre-command type - private async sendNounsToChannel(...args: any[]): Promise { + private async sendNounsToChannel(...args: (Noun | any)[]): Promise { const response = await fetch(this.channelUrl, { ...this.fetchOptions('PUT'), method: 'PUT', @@ -555,7 +556,7 @@ export class Urbit { }; const event = (id: number, m: string, n: T) => { if (!done) { - resolve(n); //TODO revisit + resolve(n); //TODO revisit this.unsubscribe(id); } }; @@ -599,8 +600,12 @@ export class Urbit { // [%poke request-id=@ud ship=@p app=term mark=@tas =noun] const non = ['poke', eventId, ship, app, mark, noun]; this.outstandingPokes.set(eventId, { - onSuccess: () => { onSuccess(); }, - onError: (err) => { onError(err); }, + onSuccess: () => { + onSuccess(); + }, + onError: (err) => { + onError(err); + }, }); await this.sendNounsToChannel(non); return eventId; @@ -663,9 +668,11 @@ export class Urbit { */ async unsubscribe(subscription: number) { // [%unsubscribe request-id=@ud subscription-id=@ud] - return this.sendNounsToChannel( - ['unsubscribe', this.getEventId(), subscription] - ).then(() => { + return this.sendNounsToChannel([ + 'unsubscribe', + this.getEventId(), + subscription, + ]).then(() => { this.emit('subscription', { id: subscription, status: 'close', @@ -717,10 +724,10 @@ export class Urbit { */ async scry(params: Scry): Promise { const { app, path, mark } = params; - console.log('scry', params) + console.log('scry', params); const response = await fetch( - `${this.url}/~/scry/${app}${path}.${ mark || 'json' }`, //TODO jam by default - this.fetchOptions('GET') //NOTE mode doesn't matter, not opening channel + `${this.url}/~/scry/${app}${path}.${mark || 'json'}`, //TODO jam by default + this.fetchOptions('GET') //NOTE mode doesn't matter, not opening channel ); if (!response.ok) { @@ -737,17 +744,12 @@ export class Urbit { * @param outputMark The mark of the data being returned * @param threadName The thread to run * @param body The data to send to the thread + * @param desk The desk to run the thread from * @returns The return value of the thread */ //TODO noun-ify once spider is compatible async thread(params: Thread): Promise { - const { - inputMark, - outputMark, - threadName, - body, - desk = this.desk, - } = params; + const { inputMark, outputMark, threadName, body, desk } = params; if (!desk) { throw new Error('Must supply desk to run thread from'); } @@ -762,17 +764,6 @@ export class Urbit { return res.json(); } - - /** - * Utility function to connect to a ship that has its *.arvo.network domain configured. - * - * @param name Name of the ship e.g. zod - * @param code Code to log in - */ - static async onArvoNetwork(ship: string, code: string): Promise { - const url = `https://${ship}.arvo.network`; - return await Urbit.authenticate({ ship, url, code }); - } } export default Urbit; diff --git a/src/types.ts b/src/types.ts index 5fddd93..70e8db2 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,10 +1,45 @@ +/** + * The configuration for connecting to an Urbit ship. + */ +export interface UrbitParams { + /** The URL (with protocol and port) of the ship to be accessed. If + * the airlock is running in a webpage served by the ship, this should just + * be the empty string. + */ + url: string; + /** + * The access code for the ship at that address + */ + code?: string; + /** + * Enables verbose logging + */ + verbose?: boolean; + /** + * Called when the connection is established. Probably don't use this + * as a trigger for refetching data. + * + * @param reconnect - true if this is a reconnection + */ + onOpen?: (reconnect?: boolean) => void; + /** + * Called on every attempt to reconnect to the ship. Followed by onOpen + * or onError depending on whether the connection succeeds. + */ + onRetry?: () => void; + /** + * Called when the connection fails irrecoverably + */ + onError?: (error: any) => void; +} + /** * An urbit style path, rendered as a Javascript string * @example * `"/updates"` */ export type Path = string; -export type NounPath = string[]; //NOTE must contain trailing ~ +export type NounPath = string[]; //NOTE must contain trailing ~ /** * @p including leading sig, rendered as a string @@ -74,7 +109,7 @@ export interface Poke { /** * Noun to poke with */ - noun: any; //TODO revisit + noun: any; //TODO revisit } /** @@ -114,7 +149,7 @@ export interface Thread { /** * Desk of thread */ - desk?: string; + desk: string; /** * Data of the input vase */ @@ -130,13 +165,6 @@ export interface PokeHandlers { export type PokeInterface = PokeHandlers & Poke; -export interface AuthenticationInterface { - ship: string; - url: string; - code: string; - verbose?: boolean; -} - /** * Subscription event handlers * diff --git a/test/default.test.ts b/test/default.test.ts index 922b1a0..c0f4de3 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -46,9 +46,9 @@ function fakeSSE(messages: any[] = [], timeout = 0) { const ship = '~sampel-palnet'; function newUrbit(): Urbit { - let airlock = new Urbit('', '+code'); + let airlock = new Urbit({ url: '' }); //NOTE in a real environment, these get populated at the end of connect() - airlock.ship = airlock.our = ship.substring(1); + airlock.ship = airlock.our = ship; return airlock; } @@ -97,7 +97,7 @@ describe('Initialisation', () => { .mockImplementationOnce(() => Promise.resolve({ ok: true, body: fakeSSE() } as Response) ); - await airlock.eventSource(); + await airlock.connect(); expect(airlock.onOpen).toHaveBeenCalled(); }, 500); @@ -115,7 +115,7 @@ describe('Initialisation', () => { airlock.onError = jest.fn(); try { - airlock.eventSource(); + airlock.connect(); await wait(200); } catch (e) { expect(airlock.onRetry).toHaveBeenCalled(); @@ -146,11 +146,13 @@ describe('subscription', () => { }; const firstEv = dwim('one'); const secondEv = dwim('two'); - const events = (id: number) => [fact(id, 'desk', 'mark', firstEv), fact(id, 'desk', 'mark', secondEv)]; - fetchSpy - .mockImplementation(fakeFetch(() => fakeSSE(events(1)))); + const events = (id: number) => [ + fact(id, 'desk', 'mark', firstEv), + fact(id, 'desk', 'mark', secondEv), + ]; + fetchSpy.mockImplementation(fakeFetch(() => fakeSSE(events(1)))); - await airlock.eventSource(); + await airlock.connect(); await airlock.subscribe(params); await wait(600); @@ -170,7 +172,7 @@ describe('subscription', () => { onSuccess: jest.fn(), onError: jest.fn(), }; - await airlock.eventSource(); + await airlock.connect(); await airlock.poke(params); await wait(300); expect(params.onSuccess).toHaveBeenCalled(); @@ -193,7 +195,7 @@ describe('subscription', () => { onSuccess: jest.fn(), onError: jest.fn(), }; - await airlock.eventSource(); + await airlock.connect(); await airlock.poke(params); await wait(300); expect(params.onError).toHaveBeenCalled(); From 7369c01a736c192b6e22f1faaaefdb8231b26783 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 6 Feb 2024 17:33:23 +0100 Subject: [PATCH 17/49] lib: write status code conditional correctly Mea culpa. --- src/Urbit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 7fce3ff..be885d1 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -283,7 +283,7 @@ export class Urbit { if (this.verbose) { console.log('Received authentication response', response); } - if (response.status >= 200 && response.status < 300) { + if (response.status < 200 && response.status >= 300) { throw new Error('Login failed with status ' + response.status); } const cookie = response.headers.get('set-cookie'); From 478f47a5f3cba9ccdc2409abe73d66a2c6caaf74 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 6 Feb 2024 18:28:32 +0100 Subject: [PATCH 18/49] lib: use Noun type where appropriate Instead of any, we can use Noun in many places. We also don't want/need to parameterize types as often as we used to. Also throws away unused types from types.ts. --- src/Urbit.ts | 26 +++++++++++++++----------- src/types.ts | 36 +++++++++--------------------------- 2 files changed, 24 insertions(+), 38 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index be885d1..fea34c7 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -16,7 +16,7 @@ import { } from './types'; import EventEmitter, { hexString } from './utils'; -import { Atom, Cell, dejs, jam, cue, Noun } from '@urbit/nockjs'; +import { Noun, Atom, Cell, dejs, jam, cue } from '@urbit/nockjs'; import { parseUw, formatUw, patp2dec } from '@urbit/aura'; /** @@ -359,7 +359,7 @@ export class Urbit { this.ack(eventId); } - let data: any; + let data: Noun; if (event.data) { data = cue(Atom.fromString(parseUw(event.data).toString())); } @@ -386,7 +386,7 @@ export class Urbit { funcs.onError(bod.tail); } this.outstandingPokes.delete(id); - // [%watch-ack p=(unit tang)] + // [%watch-ack p=(unit tang)] } else if ( tag === 'watch-ack' && this.outstandingSubscriptions.has(id) @@ -398,7 +398,7 @@ export class Urbit { funcs.err(id, bod.tail); this.outstandingSubscriptions.delete(id); } - // [%fact =desk =mark =noun] + // [%fact =desk =mark =noun] } else if ( tag === 'fact' && this.outstandingSubscriptions.has(id) @@ -406,13 +406,18 @@ export class Urbit { const funcs = this.outstandingSubscriptions.get(id); try { //TODO support binding conversion callback? + if (!( (bod instanceof Cell) && + (bod.tail instanceof Cell) && + (bod.tail.head instanceof Atom) )) { + throw 'malformed %fact'; + } const mark = Atom.cordToString(bod.tail.head); //NOTE we don't pass the desk. it's a leak-y eyre impl detail funcs.event(id, mark, bod.tail.tail); } catch (e) { console.error('Failed to call subscription event callback', e); } - // [%kick ~] + // [%kick ~] } else if ( tag === 'kick' && this.outstandingSubscriptions.has(id) @@ -496,7 +501,7 @@ export class Urbit { this.outstandingSubscriptions = new Map(); this.outstandingPokes.forEach((poke, id) => { - poke.onError('Channel was reaped'); + poke.onError(Atom.fromString('Channel was reaped')); }); this.outstandingPokes = new Map(); } @@ -544,9 +549,8 @@ export class Urbit { * * @returns The first fact on the subcription */ - //TODO T is always Noun now, so don't strictly need to parameterize - async subscribeOnce(app: string, path: NounPath, timeout?: number) { - return new Promise(async (resolve, reject) => { + async subscribeOnce(app: string, path: NounPath, timeout?: number) { + return new Promise(async (resolve, reject) => { let done = false; let id: number | null = null; const quit = () => { @@ -554,7 +558,7 @@ export class Urbit { reject('quit'); } }; - const event = (id: number, m: string, n: T) => { + const event = (id: number, m: string, n: Noun) => { if (!done) { resolve(n); //TODO revisit this.unsubscribe(id); @@ -583,7 +587,7 @@ export class Urbit { * @param mark The mark of the data being sent * @param noun The data to send */ - async poke(params: PokeInterface): Promise { + async poke(params: PokeInterface): Promise { const { app, mark, noun, shipName, onSuccess, onError } = { onSuccess: () => {}, onError: () => {}, diff --git a/src/types.ts b/src/types.ts index 70e8db2..4a2701a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,3 +1,5 @@ +import { Noun } from '@urbit/nockjs'; + /** * The configuration for connecting to an Urbit ship. */ @@ -86,10 +88,8 @@ export type GallAgent = string; /** * Description of an outgoing poke - * - * @typeParam Action - Typescript type of the data being poked */ -export interface Poke { +export interface Poke { /** * Ship to poke. If left empty, the api lib will populate it with the ship that it is connected to. * @@ -109,7 +109,7 @@ export interface Poke { /** * Noun to poke with */ - noun: any; //TODO revisit + noun: Noun; } /** @@ -160,10 +160,10 @@ export type Action = 'poke' | 'subscribe' | 'ack' | 'unsubscribe' | 'delete'; export interface PokeHandlers { onSuccess?: () => void; - onError?: (e: any) => void; + onError?: (e: Noun) => void; // given a $tang } -export type PokeInterface = PokeHandlers & Poke; +export type PokeInterface = PokeHandlers & Poke; /** * Subscription event handlers @@ -174,12 +174,12 @@ export interface SubscriptionInterface { * Handle negative %watch-ack */ //TODO id here is a string, but is number in most other places... - err?(id: number, error: any): void; + //NOTE error is a $tang + err?(id: number, error: Noun): void; /** * Handle %fact */ - //TODO give data Noun type? - event?(id: number, mark: string, data: any): void; + event?(id: number, mark: string, data: Noun): void; /** * Handle %kick */ @@ -208,24 +208,6 @@ export interface headers { [headerName: string]: string; } -export interface CustomEventHandler { - (data: any, response: string): void; -} - -export interface SSEOptions { - headers?: { - Cookie?: string; - }; - withCredentials?: boolean; -} - -export interface Message extends Record { - action: Action; - id?: number; -} - -export class ResumableError extends Error {} - export class FatalError extends Error {} export class ReapError extends Error {} From c4b081dbaf5ae81a368bd29a877194ffe3426090 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 6 Feb 2024 18:29:38 +0100 Subject: [PATCH 19/49] lib: remove stale/concluded comments --- src/Urbit.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index fea34c7..1ac61f2 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -19,6 +19,11 @@ import EventEmitter, { hexString } from './utils'; import { Noun, Atom, Cell, dejs, jam, cue } from '@urbit/nockjs'; import { parseUw, formatUw, patp2dec } from '@urbit/aura'; +//TODO dan needed changes to the fetch stuff for react native, +// native fetch (polyfill?) does xhr instead? +// https://github.com/facebook/react-native/issues/27741#issuecomment-1802548394 +// https://github.com/react-native-community/fetch + /** * A class for interacting with an urbit ship, given its URL and code */ @@ -311,8 +316,6 @@ export class Urbit { this.sseClientInitialized = true; return new Promise((resolve, reject) => { fetchEventSource(this.channelUrl, { - //TODO manually inject headers = { 'last-event-id': lastHeardEventId } - // if needed ...this.fetchOptions('GET'), openWhenHidden: true, responseTimeout: 25000, @@ -405,7 +408,6 @@ export class Urbit { ) { const funcs = this.outstandingSubscriptions.get(id); try { - //TODO support binding conversion callback? if (!( (bod instanceof Cell) && (bod.tail instanceof Cell) && (bod.tail.head instanceof Atom) )) { From 7fbae3df4080ed4c3ba16ba6a78fb991b86b16c2 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 6 Feb 2024 18:38:25 +0100 Subject: [PATCH 20/49] lib: nounify delete() --- src/Urbit.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 1ac61f2..20e5f5e 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -690,20 +690,17 @@ export class Urbit { /** * Deletes the connection to a channel. */ - //TODO noun-ify async delete() { - const body = JSON.stringify([ - { - id: this.getEventId(), - action: 'delete', - }, - ]); + //NOTE we do this inline, instead of calling sendNounsToChannel, + // because navigator.sendBeacon is more reliable in a "user just + // closed the tab" scenario + const body = formatUw(jam(dejs.list([['delete', 0]])).number.toString()); if (isBrowser) { navigator.sendBeacon(this.channelUrl, body); } else { const response = await fetch(this.channelUrl, { - ...this.fetchOptions('PUT', 'json'), - method: 'POST', + ...this.fetchOptions('PUT'), + method: 'PUT', body: body, }); if (!response.ok) { From 27a662f0c3f0fa26826c926ebcfdb9c5c0113908 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 6 Feb 2024 20:05:04 +0100 Subject: [PATCH 21/49] lib: scry out nouns, not json, by default Necessarily includes logic for turning the jambuffer in the response, into a proper Noun object. Only somewhat surprisingly, we need to reverse the byte order in the response, even though to accurately mock it, we don't need to reverse the bytes from the jam generated by nockjs. It would be most prudent to manually test this in the browser, to make sure we didn't trip ourselves up over endianness shenanigans here. --- src/Urbit.ts | 16 ++++++++++++---- test/default.test.ts | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 20e5f5e..1f04c1a 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -725,11 +725,10 @@ export class Urbit { * @param params The scry request * @returns The scry result */ - async scry(params: Scry): Promise { + async scry(params: Scry): Promise> { const { app, path, mark } = params; - console.log('scry', params); const response = await fetch( - `${this.url}/~/scry/${app}${path}.${mark || 'json'}`, //TODO jam by default + `${this.url}/~/scry/${app}${path}.${mark || 'noun'}`, this.fetchOptions('GET') //NOTE mode doesn't matter, not opening channel ); @@ -737,7 +736,16 @@ export class Urbit { return Promise.reject(response); } - return await response.json(); + if ((mark || 'noun') !== 'noun') { + return response.body; + } + + // extract the atom (jam buffer) from the response's bytes and cue it + const hex = [...new Uint8Array(await response.arrayBuffer())] + .reverse() // jammed bytestream is reverse endian + .map(x => x.toString(16).padStart(2, '0')) + .join(''); + return cue(Atom.fromString(hex, 16)); } /** diff --git a/test/default.test.ts b/test/default.test.ts index c0f4de3..436b842 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -200,4 +200,25 @@ describe('subscription', () => { await wait(300); expect(params.onError).toHaveBeenCalled(); }, 800); + + //TODO test this in the browser, manually, just once, + // to make sure the byte ordering detail is correct + it('should scry for Noun objects', async () => { + airlock = newUrbit(); + fetchSpy = jest.spyOn(window, 'fetch'); + const testNoun = dwim([123, 456], 'some big noun', 'with many atoms', 'inside'); + fetchSpy.mockImplementationOnce(() => { + return Promise.resolve({ + ok: true, + arrayBuffer: () => { + return Promise.resolve(new Uint8Array(jam(testNoun).bytes())) + }, + }) + }); + const res = await airlock.scry({ app: 'agent', path: '/whatever' }); + if (!(res instanceof Atom) && !(res instanceof Cell)) { + expect(false); //TODO force failure properly + } + expect(res).toEqual(testNoun); + }); }); From 70f96f71999e4dae0b30a8b00363b41250c93a45 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 6 Feb 2024 20:08:49 +0100 Subject: [PATCH 22/49] lib: comments, todos, touch-ups --- src/Urbit.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 1f04c1a..a62890e 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -364,6 +364,7 @@ export class Urbit { let data: Noun; if (event.data) { + //TODO use the same bignum type everywhere data = cue(Atom.fromString(parseUw(event.data).toString())); } @@ -562,7 +563,7 @@ export class Urbit { }; const event = (id: number, m: string, n: Noun) => { if (!done) { - resolve(n); //TODO revisit + resolve(n); this.unsubscribe(id); } }; From 5610390e2e604e8a09e082e46f9c4ea4a6563d17 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 13 Feb 2024 12:17:48 -0600 Subject: [PATCH 23/49] fetch: add support for custom fetch This adds a `fetch` option to the `Urbit` class, which allows you to pass in the local fetch implementation that works for you. Notably we did this to support React Native, which needs special fetch parameters. We also removed todos that were no longer relevant. --- src/Urbit.ts | 54 +++++++++++++++++++++++++------------------- src/types.ts | 7 +++++- test/default.test.ts | 17 ++++++++------ 3 files changed, 47 insertions(+), 31 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index a62890e..b188854 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -110,6 +110,12 @@ export class Urbit { */ verbose?: boolean; + /** + * The fetch function to use. Defaults to window.fetch. Typically used + * to pass in locally supported fetch implementation. + */ + fetch: typeof fetch; + /** * number of consecutive errors in connecting to the eventsource */ @@ -169,6 +175,7 @@ export class Urbit { this.url = params.url; this.code = params.code; this.verbose = params.verbose || false; + this.fetch = params.fetch || fetch; this.onError = params.onError; this.onRetry = params.onRetry; this.onOpen = params.onOpen; @@ -240,7 +247,7 @@ export class Urbit { return Promise.resolve(); } - const nameResp = await fetch(`${this.url}/~/host`, { + const nameResp = await this.fetch(`${this.url}/~/host`, { method: 'get', credentials: 'include', }); @@ -257,7 +264,7 @@ export class Urbit { return Promise.resolve(); } - const nameResp = await fetch(`${this.url}/~/name`, { + const nameResp = await this.fetch(`${this.url}/~/name`, { method: 'get', credentials: 'include', }); @@ -268,8 +275,6 @@ export class Urbit { /** * Connects to the Urbit ship. Nothing can be done until this is called. * That's why we roll it into this.setupChannel. - * TODO as of urbit/urbit#6561, this is no longer true, and we are able - * to interact with the ship using a guest identity. */ async authenticate(): Promise { if (this.verbose) { @@ -280,7 +285,7 @@ export class Urbit { : 'Connecting from node context' ); } - return fetch(`${this.url}/~/login`, { + return this.fetch(`${this.url}/~/login`, { method: 'post', body: `password=${this.code}`, credentials: 'include', @@ -304,7 +309,6 @@ export class Urbit { /** * Initializes the SSE pipe for the appropriate channel. */ - //TODO explicit success/failure return? async connect(): Promise { if (this.sseClientInitialized) { return Promise.resolve(); @@ -317,6 +321,7 @@ export class Urbit { return new Promise((resolve, reject) => { fetchEventSource(this.channelUrl, { ...this.fetchOptions('GET'), + fetch: this.fetch, openWhenHidden: true, responseTimeout: 25000, onopen: async (response, isReconnect) => { @@ -329,8 +334,7 @@ export class Urbit { this.emit('status-update', { status: isReconnect ? 'reconnected' : 'active', }); - resolve(); - return; // everything's good + resolve(); // everything's good } else { const err = new Error('failed to open eventsource'); reject(err); @@ -385,33 +389,37 @@ export class Urbit { if (bod instanceof Atom) { funcs.onSuccess(); } else { - //TODO pre-render tang? + //TODO pre-render tang after porting tang utils console.error(bod.tail); funcs.onError(bod.tail); } this.outstandingPokes.delete(id); - // [%watch-ack p=(unit tang)] + // [%watch-ack p=(unit tang)] } else if ( tag === 'watch-ack' && this.outstandingSubscriptions.has(id) ) { const funcs = this.outstandingSubscriptions.get(id); if (bod instanceof Cell) { - //TODO pre-render tang? + //TODO pre-render tang after porting tang utils console.error(bod.tail); funcs.err(id, bod.tail); this.outstandingSubscriptions.delete(id); } - // [%fact =desk =mark =noun] + // [%fact =desk =mark =noun] } else if ( tag === 'fact' && this.outstandingSubscriptions.has(id) ) { const funcs = this.outstandingSubscriptions.get(id); try { - if (!( (bod instanceof Cell) && - (bod.tail instanceof Cell) && - (bod.tail.head instanceof Atom) )) { + if ( + !( + bod instanceof Cell && + bod.tail instanceof Cell && + bod.tail.head instanceof Atom + ) + ) { throw 'malformed %fact'; } const mark = Atom.cordToString(bod.tail.head); @@ -420,7 +428,7 @@ export class Urbit { } catch (e) { console.error('Failed to call subscription event callback', e); } - // [%kick ~] + // [%kick ~] } else if ( tag === 'kick' && this.outstandingSubscriptions.has(id) @@ -533,7 +541,7 @@ export class Urbit { //NOTE every arg is interpreted (through nockjs.dwim) as a noun, which // should result in a noun nesting inside of the xx $eyre-command type private async sendNounsToChannel(...args: (Noun | any)[]): Promise { - const response = await fetch(this.channelUrl, { + const response = await this.fetch(this.channelUrl, { ...this.fetchOptions('PUT'), method: 'PUT', body: formatUw(jam(dejs.list(args)).number.toString()), @@ -699,7 +707,7 @@ export class Urbit { if (isBrowser) { navigator.sendBeacon(this.channelUrl, body); } else { - const response = await fetch(this.channelUrl, { + const response = await this.fetch(this.channelUrl, { ...this.fetchOptions('PUT'), method: 'PUT', body: body, @@ -728,7 +736,7 @@ export class Urbit { */ async scry(params: Scry): Promise> { const { app, path, mark } = params; - const response = await fetch( + const response = await this.fetch( `${this.url}/~/scry/${app}${path}.${mark || 'noun'}`, this.fetchOptions('GET') //NOTE mode doesn't matter, not opening channel ); @@ -743,9 +751,9 @@ export class Urbit { // extract the atom (jam buffer) from the response's bytes and cue it const hex = [...new Uint8Array(await response.arrayBuffer())] - .reverse() // jammed bytestream is reverse endian - .map(x => x.toString(16).padStart(2, '0')) - .join(''); + .reverse() // jammed bytestream is reverse endian + .map((x) => x.toString(16).padStart(2, '0')) + .join(''); return cue(Atom.fromString(hex, 16)); } @@ -765,7 +773,7 @@ export class Urbit { if (!desk) { throw new Error('Must supply desk to run thread from'); } - const res = await fetch( + const res = await this.fetch( `${this.url}/spider/${desk}/${inputMark}/${threadName}/${outputMark}.json`, { ...this.fetchOptions('PUT', 'json'), diff --git a/src/types.ts b/src/types.ts index 4a2701a..0cd15e4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -17,6 +17,11 @@ export interface UrbitParams { * Enables verbose logging */ verbose?: boolean; + /** + * The fetch function to use. Defaults to window.fetch. Typically used + * to pass in locally supported fetch implementation. + */ + fetch?: typeof fetch; /** * Called when the connection is established. Probably don't use this * as a trigger for refetching data. @@ -160,7 +165,7 @@ export type Action = 'poke' | 'subscribe' | 'ack' | 'unsubscribe' | 'delete'; export interface PokeHandlers { onSuccess?: () => void; - onError?: (e: Noun) => void; // given a $tang + onError?: (e: Noun) => void; // given a $tang } export type PokeInterface = PokeHandlers & Poke; diff --git a/test/default.test.ts b/test/default.test.ts index 436b842..0b58131 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -82,6 +82,7 @@ describe('Initialisation', () => { let airlock: Urbit; let fetchSpy: ReturnType; beforeEach(() => { + fetchSpy = jest.spyOn(window, 'fetch'); airlock = newUrbit(); }); afterEach(() => { @@ -89,7 +90,6 @@ describe('Initialisation', () => { }); it('should poke & connect upon a 200', async () => { airlock.onOpen = jest.fn(); - fetchSpy = jest.spyOn(window, 'fetch'); fetchSpy .mockImplementationOnce(() => Promise.resolve({ ok: true, body: null } as Response) @@ -102,7 +102,6 @@ describe('Initialisation', () => { expect(airlock.onOpen).toHaveBeenCalled(); }, 500); it('should handle failures', async () => { - fetchSpy = jest.spyOn(window, 'fetch'); airlock.onRetry = jest.fn(); airlock.onOpen = jest.fn(); fetchSpy @@ -128,13 +127,13 @@ describe('subscription', () => { let fetchSpy: jest.SpyInstance; beforeEach(() => { eventId = 1; + fetchSpy = jest.spyOn(window, 'fetch'); }); afterEach(() => { fetchSpy.mockReset(); }); it('should subscribe', async () => { - fetchSpy = jest.spyOn(window, 'fetch'); airlock = newUrbit(); airlock.onOpen = jest.fn(); const params = { @@ -161,7 +160,6 @@ describe('subscription', () => { expect(params.event).toHaveBeenNthCalledWith(2, 1, 'mark', secondEv); }, 800); it('should handle poke acks', async () => { - fetchSpy = jest.spyOn(window, 'fetch'); airlock = newUrbit(); airlock.onOpen = jest.fn(); fetchSpy.mockImplementation(fakeFetch(() => fakeSSE([ack(1)]))); @@ -206,14 +204,19 @@ describe('subscription', () => { it('should scry for Noun objects', async () => { airlock = newUrbit(); fetchSpy = jest.spyOn(window, 'fetch'); - const testNoun = dwim([123, 456], 'some big noun', 'with many atoms', 'inside'); + const testNoun = dwim( + [123, 456], + 'some big noun', + 'with many atoms', + 'inside' + ); fetchSpy.mockImplementationOnce(() => { return Promise.resolve({ ok: true, arrayBuffer: () => { - return Promise.resolve(new Uint8Array(jam(testNoun).bytes())) + return Promise.resolve(new Uint8Array(jam(testNoun).bytes())); }, - }) + }); }); const res = await airlock.scry({ app: 'agent', path: '/whatever' }); if (!(res instanceof Atom) && !(res instanceof Cell)) { From 5701c7f121875fb401ff9f5f1dc41ee1d6b2529a Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 13 Feb 2024 20:44:16 +0100 Subject: [PATCH 24/49] lib: remove mention of different modes As currently written, the library really only supports the one mode. This is probably the way forward, too. So here we remove vestigial references to mode switching within the library. --- src/Urbit.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index b188854..ee302b7 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -144,9 +144,8 @@ export class Urbit { private fetchOptions( method: 'PUT' | 'GET' = 'PUT', - mode: 'jam' | 'json' = 'jam' ): any { - const type = mode === 'jam' ? 'application/x-urb-jam' : 'application/json'; + const type = 'application/x-urb-jam'; let headers: headers = {}; switch (method) { case 'PUT': @@ -738,7 +737,7 @@ export class Urbit { const { app, path, mark } = params; const response = await this.fetch( `${this.url}/~/scry/${app}${path}.${mark || 'noun'}`, - this.fetchOptions('GET') //NOTE mode doesn't matter, not opening channel + this.fetchOptions('GET') ); if (!response.ok) { From c5840eae9fdb1b0303c3f39b71a9975b4c888568 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 20 Feb 2024 12:33:53 -0600 Subject: [PATCH 25/49] api: cleaned up setup and exports This makes sure we re-export important functions from @urbit/nockjs. We also removed the URL prefixing which was causing issues with passing empty string as the URL. Finally, we reconfigured the setup so that the Urbit instance returned is immediately available and all interactions wait for the connection to be established. --- src/Urbit.ts | 37 +++++++++++++++++++++++++------------ src/index.ts | 5 ++--- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index b188854..fce495b 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -116,6 +116,8 @@ export class Urbit { */ fetch: typeof fetch; + public ready: Promise = Promise.resolve(); + /** * number of consecutive errors in connecting to the eventsource */ @@ -175,7 +177,7 @@ export class Urbit { this.url = params.url; this.code = params.code; this.verbose = params.verbose || false; - this.fetch = params.fetch || fetch; + this.fetch = params.fetch || ((...args) => fetch(...args)); this.onError = params.onError; this.onRetry = params.onRetry; this.onOpen = params.onOpen; @@ -192,23 +194,28 @@ export class Urbit { * Given a ship, url, and code, this returns an airlock connection * that is ready to go. It creates a channel and connects to it. */ - static async setupChannel({ url, code, ...params }: UrbitParams) { + static setupChannel({ url, code, ...params }: UrbitParams) { const airlock = new Urbit({ - url: url.startsWith('http') ? url : `http://${url}`, + url, code, ...params, }); - // Learn where we are aka what ship we're connecting to - airlock.getShipName(); + airlock.ready = new Promise(async (resolve) => { + // Learn where we are aka what ship we're connecting to + await airlock.getShipName(); - if (code) { - await airlock.authenticate(); - } - // Learn who we are aka what patp - airlock.getOurName(); + if (code) { + await airlock.authenticate(); + } + // Learn who we are aka what patp + await airlock.getOurName(); + + await airlock.connect(); + + resolve(); + }); - await airlock.connect(); return airlock; } @@ -380,7 +387,7 @@ export class Urbit { data.tail.head instanceof Atom ) { //NOTE id could be string if id > 2^32, not expected in practice - const id = data.head.valueOf() as number; + const id = Number(data.head.number); const tag = Atom.cordToString(data.tail.head); const bod = data.tail.tail; // [%poke-ack p=(unit tang)] @@ -561,6 +568,7 @@ export class Urbit { * @returns The first fact on the subcription */ async subscribeOnce(app: string, path: NounPath, timeout?: number) { + await this.ready; return new Promise(async (resolve, reject) => { let done = false; let id: number | null = null; @@ -599,6 +607,7 @@ export class Urbit { * @param noun The data to send */ async poke(params: PokeInterface): Promise { + await this.ready; const { app, mark, noun, shipName, onSuccess, onError } = { onSuccess: () => {}, onError: () => {}, @@ -635,6 +644,7 @@ export class Urbit { * @param handlers Handlers to deal with various events of the subscription */ async subscribe(params: SubscriptionRequestInterface): Promise { + await this.ready; const { app, path, ship, err, event, quit } = { err: () => {}, event: () => {}, @@ -682,6 +692,7 @@ export class Urbit { * @param subscription */ async unsubscribe(subscription: number) { + await this.ready; // [%unsubscribe request-id=@ud subscription-id=@ud] return this.sendNounsToChannel([ 'unsubscribe', @@ -735,6 +746,7 @@ export class Urbit { * @returns The scry result */ async scry(params: Scry): Promise> { + await this.ready; const { app, path, mark } = params; const response = await this.fetch( `${this.url}/~/scry/${app}${path}.${mark || 'noun'}`, @@ -769,6 +781,7 @@ export class Urbit { */ //TODO noun-ify once spider is compatible async thread(params: Thread): Promise { + await this.ready; const { inputMark, outputMark, threadName, body, desk } = params; if (!desk) { throw new Error('Must supply desk to run thread from'); diff --git a/src/index.ts b/src/index.ts index a81b4ea..b4d3a6b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,5 @@ -import { enjs } from '@urbit/nockjs'; +import { enjs, dejs, dwim } from '@urbit/nockjs'; export * from './types'; export * from './events'; import { Urbit } from './Urbit'; -export { enjs }; -export { Urbit as default, Urbit }; +export { Urbit as default, Urbit, enjs, dejs, dwim }; From 396a617204c9a785776529c48fdcf646d691481e Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 5 Mar 2024 12:36:31 -0600 Subject: [PATCH 26/49] api: fixing erroneous fetchoptions call, renaming 'fact' --- src/Urbit.ts | 8 +++----- src/events.ts | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 9dc4df2..858d4cc 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -144,9 +144,7 @@ export class Urbit { return `${this.url}/~/channel/${this.uid}`; } - private fetchOptions( - method: 'PUT' | 'GET' = 'PUT', - ): any { + private fetchOptions(method: 'PUT' | 'GET' = 'PUT'): any { const type = 'application/x-urb-jam'; let headers: headers = {}; switch (method) { @@ -352,7 +350,7 @@ export class Urbit { } if (!event.id) return; const eventId = parseInt(event.id, 10); - this.emit('fact', { + this.emit('event', { id: eventId, data: event.data, time: Date.now(), @@ -788,7 +786,7 @@ export class Urbit { const res = await this.fetch( `${this.url}/spider/${desk}/${inputMark}/${threadName}/${outputMark}.json`, { - ...this.fetchOptions('PUT', 'json'), + ...this.fetchOptions('PUT'), method: 'POST', body: JSON.stringify(body), } diff --git a/src/events.ts b/src/events.ts index 8109e31..af60d39 100644 --- a/src/events.ts +++ b/src/events.ts @@ -10,7 +10,7 @@ export interface StatusUpdateEvent { status: ChannelStatus; } -export interface FactEvent { +export interface EyreEvent { id: number; time: number; data: any; @@ -46,7 +46,7 @@ export type UrbitHttpApiEvent = { subscription: SubscriptionEvent; 'status-update': StatusUpdateEvent; 'id-update': IdUpdateEvent; - fact: FactEvent; + event: EyreEvent; error: ErrorEvent; reset: ResetEvent; 'seamless-reset': ResetEvent; @@ -57,7 +57,7 @@ export type UrbitHttpApiEventType = | 'subscription' | 'status-update' | 'id-update' - | 'fact' + | 'event' | 'error' | 'reset' | 'seamless-reset' From 27448f6bd24432e13d13b85266c17d3a45eec455 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 5 Mar 2024 12:37:19 -0600 Subject: [PATCH 27/49] fetch-event-source: correcting potential parsing bug --- src/fetch-event-source/parse.ts | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/fetch-event-source/parse.ts b/src/fetch-event-source/parse.ts index ab90cdf..0bfbe1f 100644 --- a/src/fetch-event-source/parse.ts +++ b/src/fetch-event-source/parse.ts @@ -41,7 +41,11 @@ export async function getBytes( }), ]); - onChunk(result.value); + try { + onChunk(result.value); + } catch (err) { + console.error('Error processing chunk:', err); + } } } @@ -65,6 +69,7 @@ export function getLines( let position: number; // current read position let fieldLength: number; // length of the `field` portion of the line let discardTrailingNewline = false; + let lineStart = 0; // index where the current line starts // return a function that can process each incoming byte chunk: return function onChunk(arr: Uint8Array) { @@ -78,7 +83,6 @@ export function getLines( } const bufLength = buffer.length; - let lineStart = 0; // index where the current line starts while (position < bufLength) { if (discardTrailingNewline) { if (buffer[position] === ControlChars.NewLine) { @@ -114,6 +118,14 @@ export function getLines( } // we've reached the line end, send it out: + console.log('processing line', { + position, + lineStart, + lineEnd, + fieldLength, + bufLength, + line: new TextDecoder().decode(buffer.subarray(lineStart, lineEnd)), + }); onLine(buffer.subarray(lineStart, lineEnd), fieldLength); lineStart = position; // we're now on the next line fieldLength = -1; @@ -121,12 +133,23 @@ export function getLines( if (lineStart === bufLength) { buffer = undefined; // we've finished reading it + lineStart = 0; } else if (lineStart !== 0) { // Create a new view into buffer beginning at lineStart so we don't // need to copy over the previous lines when we get the new arr: buffer = buffer.subarray(lineStart); position -= lineStart; + lineStart = 0; } + + console.log( + 'position:', + position, + 'lineStart:', + lineStart, + 'buffer:', + buffer + ); }; } @@ -155,11 +178,12 @@ export function getMessages( // exclude comments and lines with no values // line is of format ":" or ": " // https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation - const field = decoder.decode(line.subarray(0, fieldLength)); + const field = decoder.decode(line.subarray(0, fieldLength)).trim(); const valueOffset = fieldLength + (line[fieldLength + 1] === ControlChars.Space ? 2 : 1); const value = decoder.decode(line.subarray(valueOffset)); + console.log('field:', field, 'value:', value); switch (field) { case 'data': // if this message already has data, append the new value to the old. @@ -170,6 +194,7 @@ export function getMessages( message.event = value; break; case 'id': + message = newMessage(); onId?.((message.id = value)); break; case 'retry': From f3bd8da7cafbdde9f7d10b782069d5a3cae22e35 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 5 Mar 2024 12:51:58 -0600 Subject: [PATCH 28/49] fetch-event-source: added warning --- src/fetch-event-source/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/fetch-event-source/README.md diff --git a/src/fetch-event-source/README.md b/src/fetch-event-source/README.md new file mode 100644 index 0000000..78adee5 --- /dev/null +++ b/src/fetch-event-source/README.md @@ -0,0 +1,9 @@ +# fetch-event-source + +This is pulled from https://github.com/gfortaine/fetch-event-source which +is a fork of https://github.com/Azure/fetch-event-source. We have since +modified it to include %eyre channel specific handling. In addition, the +way which this parses SSE events may be non-standard, but handles all +cases that this library cares about. + +**Don't use generically!** From 9706fe0f68ca21bc17814e71d06b1fcab2b6fd2c Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 19 Mar 2024 17:09:25 +0100 Subject: [PATCH 29/49] lib: provide scryForJson utility Which just does a scry() call, but enforces a json mark, and handles the parsing of the ReadableStream for you. --- src/Urbit.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Urbit.ts b/src/Urbit.ts index 858d4cc..93409ed 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -766,6 +766,15 @@ export class Urbit { return cue(Atom.fromString(hex, 16)); } + async scryForJson(params: Scry): Promise { + if (params.mark !== 'json') { + console.log('scryForJson forcing %json mark'); + } + params.mark = 'json'; + const response = await this.scry(params); + return new Response(response as ReadableStream).json(); + } + /** * Run a thread * From c7f3d7653c5ecec7b2c95cac4379e2ff8933ebad Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 19 Mar 2024 17:11:34 +0100 Subject: [PATCH 30/49] lib: clean up stale TODOs --- src/Urbit.ts | 5 ----- src/types.ts | 1 - test/default.test.ts | 2 -- 3 files changed, 8 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 93409ed..d4270f7 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -19,11 +19,6 @@ import EventEmitter, { hexString } from './utils'; import { Noun, Atom, Cell, dejs, jam, cue } from '@urbit/nockjs'; import { parseUw, formatUw, patp2dec } from '@urbit/aura'; -//TODO dan needed changes to the fetch stuff for react native, -// native fetch (polyfill?) does xhr instead? -// https://github.com/facebook/react-native/issues/27741#issuecomment-1802548394 -// https://github.com/react-native-community/fetch - /** * A class for interacting with an urbit ship, given its URL and code */ diff --git a/src/types.ts b/src/types.ts index 0cd15e4..c757e1f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -178,7 +178,6 @@ export interface SubscriptionInterface { /** * Handle negative %watch-ack */ - //TODO id here is a string, but is number in most other places... //NOTE error is a $tang err?(id: number, error: Noun): void; /** diff --git a/test/default.test.ts b/test/default.test.ts index 0b58131..efddf78 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -199,8 +199,6 @@ describe('subscription', () => { expect(params.onError).toHaveBeenCalled(); }, 800); - //TODO test this in the browser, manually, just once, - // to make sure the byte ordering detail is correct it('should scry for Noun objects', async () => { airlock = newUrbit(); fetchSpy = jest.spyOn(window, 'fetch'); From 3b4714ef29a24875f2daa849eca38436f42cd3e6 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 19 Mar 2024 17:43:00 +0100 Subject: [PATCH 31/49] todo: document remaining work for v1 noun channels --- TODO.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 TODO.md diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..2ccf550 --- /dev/null +++ b/TODO.md @@ -0,0 +1,20 @@ +remaining work: + +- bignum consistency (aka make aura-js use system bigint) + - bigint is the system type + - BigInt in the constructor for that system type + - aurajs uses bigInt/BigInteger, which is an imported dependency, + and not a system-level affordance + - everything should just use the system-level afforance, + and in contexts where it's not available, they can pull in a polyfill themselves + - to do this, just remove the dependency/import and start using system stuff + - everything should be hit by tests, so easy to verify things still are correct +- make spider compatible + - do the todos in /app/spider + - respect content-type header on PUT request, + - determine whether to sound noun or json result somehow + - make thread() nounified + - supply a threadWithJson() or w/e, similar to scryForJson() +- go over all the types, clean up unused ones +- do pre-release +- do webterm migration stream/recording From e40eea1e7ee48e0663cbbbaed86e936d71df712d Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 19 Mar 2024 18:12:27 +0100 Subject: [PATCH 32/49] lib: broader Path type acceptancy Accept it as either pre-interpolated string, array of segments, or directly as a Noun. The conversion logic in subscribe() should maybe be factored out. --- src/Urbit.ts | 25 ++++++++++++++++++++----- src/types.ts | 14 +++++++------- test/default.test.ts | 4 ++-- 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index d4270f7..0757a55 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -10,13 +10,13 @@ import { headers, PokeHandlers, FatalError, - NounPath, + Path, ReapError, UrbitParams, } from './types'; import EventEmitter, { hexString } from './utils'; -import { Noun, Atom, Cell, dejs, jam, cue } from '@urbit/nockjs'; +import { Noun, Atom, Cell, enjs, dejs, jam, cue } from '@urbit/nockjs'; import { parseUw, formatUw, patp2dec } from '@urbit/aura'; /** @@ -559,7 +559,7 @@ export class Urbit { * * @returns The first fact on the subcription */ - async subscribeOnce(app: string, path: NounPath, timeout?: number) { + async subscribeOnce(app: string, path: Path, timeout?: number) { await this.ready; return new Promise(async (resolve, reject) => { let done = false; @@ -658,10 +658,25 @@ export class Urbit { quit, }); + let pathAsString: string; + let pathAsNoun: Noun; + if (typeof path === 'string') { + pathAsString = path; + pathAsNoun = dejs.list(path.split('/')); + } else + if (Array.isArray(path)) { + pathAsString = path.join('/'); + pathAsNoun = dejs.list(path); + } else + if (path instanceof Atom || path instanceof Cell) { + pathAsString = enjs.array(enjs.cord)(path).join('/'); + pathAsNoun = path; + } + this.emit('subscription', { id: eventId, app, - path: path.join('/'), + path: pathAsString, status: 'open', }); @@ -671,7 +686,7 @@ export class Urbit { eventId, Atom.fromString(patp2dec('~' + ship), 10), app, - path, + pathAsNoun, ]; await this.sendNounsToChannel(non); diff --git a/src/types.ts b/src/types.ts index c757e1f..57f26dc 100644 --- a/src/types.ts +++ b/src/types.ts @@ -41,12 +41,12 @@ export interface UrbitParams { } /** - * An urbit style path, rendered as a Javascript string + * A path in either string, string-array or Noun format * @example - * `"/updates"` + * `'/updates'` + * `['updates', 0]` */ -export type Path = string; -export type NounPath = string[]; //NOTE must contain trailing ~ +export type Path = string | string[] | Noun; /** * @p including leading sig, rendered as a string @@ -124,7 +124,7 @@ export interface Scry { /** {@inheritDoc GallAgent} */ app: GallAgent; /** {@inheritDoc Path} */ - path: Path; + path: string; //REVIEW make Path again? mark?: Mark; } @@ -202,9 +202,9 @@ export interface SubscriptionRequestInterface extends SubscriptionInterface { /** * The path to which to subscribe * @example - * `['keys', 0]` + * `['keys']` */ - path: NounPath; + path: Path; } export interface headers { diff --git a/test/default.test.ts b/test/default.test.ts index efddf78..64da31c 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -1,4 +1,4 @@ -import Urbit, { NounPath } from '../src'; +import Urbit, { Path } from '../src'; import { Noun, Atom, Cell, jam, dwim } from '@urbit/nockjs'; import { formatUw } from '@urbit/aura'; import 'jest'; @@ -138,7 +138,7 @@ describe('subscription', () => { airlock.onOpen = jest.fn(); const params = { app: 'app', - path: ['path', 0] as NounPath, + path: ['path'] as Path, err: jest.fn(), event: jest.fn(), quit: jest.fn(), From 62e1e3ec62c9e20b7d46b7a938fef785e12c37d8 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 19 Mar 2024 18:13:38 +0100 Subject: [PATCH 33/49] lib: minor clean-up --- src/Urbit.ts | 7 +++---- src/types.ts | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 0757a55..a53b252 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -170,9 +170,9 @@ export class Urbit { this.code = params.code; this.verbose = params.verbose || false; this.fetch = params.fetch || ((...args) => fetch(...args)); - this.onError = params.onError; - this.onRetry = params.onRetry; this.onOpen = params.onOpen; + this.onRetry = params.onRetry; + this.onError = params.onError; if (isBrowser) { window.addEventListener('beforeunload', this.delete); @@ -186,9 +186,8 @@ export class Urbit { * Given a ship, url, and code, this returns an airlock connection * that is ready to go. It creates a channel and connects to it. */ - static setupChannel({ url, code, ...params }: UrbitParams) { + static setupChannel({ code, ...params }: UrbitParams) { const airlock = new Urbit({ - url, code, ...params, }); diff --git a/src/types.ts b/src/types.ts index 57f26dc..243be4f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -158,7 +158,7 @@ export interface Thread { /** * Data of the input vase */ - body: Action; + body: any; } export type Action = 'poke' | 'subscribe' | 'ack' | 'unsubscribe' | 'delete'; From 5bcdee715e4dd7ac084b28b49ea5c45d6762a3b6 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 26 Mar 2024 22:46:56 +0100 Subject: [PATCH 34/49] lib: nounify spider threads Now defaults to speaking raw nouns with spider, as supported through urbit/urbit#6943. Provides a jsonThread() fallback for speaking json. Doesn't yet support the "json one way, nouns the other" case. Factors out noun<->bytebuffer conversions into utility functions. --- TODO.md | 16 ++---------- src/Urbit.ts | 70 +++++++++++++++++++++++++++++++++------------------- src/types.ts | 10 +++++++- src/utils.ts | 14 +++++++++++ 4 files changed, 70 insertions(+), 40 deletions(-) diff --git a/TODO.md b/TODO.md index 2ccf550..6bf2e62 100644 --- a/TODO.md +++ b/TODO.md @@ -1,20 +1,8 @@ remaining work: -- bignum consistency (aka make aura-js use system bigint) - - bigint is the system type - - BigInt in the constructor for that system type - - aurajs uses bigInt/BigInteger, which is an imported dependency, - and not a system-level affordance - - everything should just use the system-level afforance, - and in contexts where it's not available, they can pull in a polyfill themselves - - to do this, just remove the dependency/import and start using system stuff - - everything should be hit by tests, so easy to verify things still are correct +- update to use new aura-js version (with native bigints) - make spider compatible - - do the todos in /app/spider - - respect content-type header on PUT request, - - determine whether to sound noun or json result somehow - - make thread() nounified - - supply a threadWithJson() or w/e, similar to scryForJson() + - test new thread() and jsonThread() against a real spider - go over all the types, clean up unused ones - do pre-release - do webterm migration stream/recording diff --git a/src/Urbit.ts b/src/Urbit.ts index a53b252..c7f7c70 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -5,6 +5,8 @@ import { fetchEventSource, EventSourceMessage } from './fetch-event-source'; import { Scry, Thread, + NounThread, + JsonThread, PokeInterface, SubscriptionRequestInterface, headers, @@ -14,7 +16,7 @@ import { ReapError, UrbitParams, } from './types'; -import EventEmitter, { hexString } from './utils'; +import EventEmitter, { hexString, unpackJamBytes, packJamBytes } from './utils'; import { Noun, Atom, Cell, enjs, dejs, jam, cue } from '@urbit/nockjs'; import { parseUw, formatUw, patp2dec } from '@urbit/aura'; @@ -139,12 +141,18 @@ export class Urbit { return `${this.url}/~/channel/${this.uid}`; } - private fetchOptions(method: 'PUT' | 'GET' = 'PUT'): any { - const type = 'application/x-urb-jam'; + private fetchOptions(method: 'PUT' | 'GET' = 'PUT', + mode: 'noun' | 'json' = 'noun'): any { + let type; + switch (mode) { + case 'noun': type = 'application/x-urb-jam'; break; + case 'json': type = 'application/json'; break; + } let headers: headers = {}; switch (method) { case 'PUT': headers['Content-Type'] = type; + headers['Accept'] = type; break; case 'GET': headers['X-Channel-Format'] = type; @@ -767,12 +775,7 @@ export class Urbit { return response.body; } - // extract the atom (jam buffer) from the response's bytes and cue it - const hex = [...new Uint8Array(await response.arrayBuffer())] - .reverse() // jammed bytestream is reverse endian - .map((x) => x.toString(16).padStart(2, '0')) - .join(''); - return cue(Atom.fromString(hex, 16)); + return unpackJamBytes(await response.arrayBuffer()); } async scryForJson(params: Scry): Promise { @@ -784,6 +787,25 @@ export class Urbit { return new Response(response as ReadableStream).json(); } + private async callThread(params: Thread, + body: BodyInit, + mode: 'noun' | 'json' = 'noun'): Promise { + await this.ready; + const { inputMark, outputMark, threadName, desk } = params; + if (!desk) { + throw new Error('Must supply desk to run thread from'); + } + + return this.fetch( + `${this.url}/spider/${desk}/${inputMark}/${threadName}/${outputMark}`, + { + ...this.fetchOptions('PUT', mode), + method: 'POST', + body: body + } + ); + } + /** * Run a thread * @@ -794,23 +816,21 @@ export class Urbit { * @param desk The desk to run the thread from * @returns The return value of the thread */ - //TODO noun-ify once spider is compatible - async thread(params: Thread): Promise { - await this.ready; - const { inputMark, outputMark, threadName, body, desk } = params; - if (!desk) { - throw new Error('Must supply desk to run thread from'); - } - const res = await this.fetch( - `${this.url}/spider/${desk}/${inputMark}/${threadName}/${outputMark}.json`, - { - ...this.fetchOptions('PUT'), - method: 'POST', - body: JSON.stringify(body), - } - ); + //TODO test + async thread(params: NounThread): Promise { + const body = packJamBytes(params.body); + const response = await this.callThread(params, body, 'noun'); + return unpackJamBytes(await response.arrayBuffer()); + } - return res.json(); + /** + * Run a thread, but json + */ + //TODO test + async jsonThread(params: JsonThread): Promise { + const body = JSON.stringify(params.body); + const response = await this.callThread(params, body, 'json'); + return response.json(); } } diff --git a/src/types.ts b/src/types.ts index 243be4f..b9b76ce 100644 --- a/src/types.ts +++ b/src/types.ts @@ -133,7 +133,7 @@ export interface Scry { * * @typeParam Action - Typescript type of the data being poked */ -export interface Thread { +export interface Thread { /** * The mark of the input vase */ @@ -155,6 +155,14 @@ export interface Thread { * Desk of thread */ desk: string; +} +export interface NounThread extends Thread { + /** + * Data of the input vase + */ + body: Noun; +} +export interface JsonThread extends Thread { /** * Data of the input vase */ diff --git a/src/utils.ts b/src/utils.ts index d8c1425..22b446d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,3 +1,5 @@ +import { Noun, Atom, jam, cue } from "@urbit/nockjs"; + export function camelize(str: string) { return str .replace(/\s(.)/g, function ($1: string) { @@ -17,6 +19,18 @@ export function uncamelize(str: string, separator = '-') { return str.replace(new RegExp('^' + separator), ''); } +export async function unpackJamBytes(buf: ArrayBufferLike): Promise { + const hex = [...new Uint8Array(buf)] + .reverse() // endianness shenanigans + .map((x) => x.toString(16).padStart(2, '0')) + .join(''); + return cue(Atom.fromString(hex, 16)); +} + +export function packJamBytes(non: Noun): BodyInit { + return new Uint8Array(jam(non).bytes()); +} + /** * Returns a hex string of given length. * From 5ac7b8862431dfdd800acdb4973454e49023ea15 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 16 Apr 2024 18:10:28 +0200 Subject: [PATCH 35/49] fetch: remove console logs in parsing code --- src/fetch-event-source/parse.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/fetch-event-source/parse.ts b/src/fetch-event-source/parse.ts index 0bfbe1f..9187d8b 100644 --- a/src/fetch-event-source/parse.ts +++ b/src/fetch-event-source/parse.ts @@ -118,14 +118,6 @@ export function getLines( } // we've reached the line end, send it out: - console.log('processing line', { - position, - lineStart, - lineEnd, - fieldLength, - bufLength, - line: new TextDecoder().decode(buffer.subarray(lineStart, lineEnd)), - }); onLine(buffer.subarray(lineStart, lineEnd), fieldLength); lineStart = position; // we're now on the next line fieldLength = -1; @@ -141,15 +133,6 @@ export function getLines( position -= lineStart; lineStart = 0; } - - console.log( - 'position:', - position, - 'lineStart:', - lineStart, - 'buffer:', - buffer - ); }; } From 0b2fac425faaf1e1720ee205756e83675a2af3ab Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 16 Apr 2024 18:22:15 +0200 Subject: [PATCH 36/49] lib: tested new spider functions --- src/Urbit.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index c7f7c70..efb91ee 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -816,7 +816,6 @@ export class Urbit { * @param desk The desk to run the thread from * @returns The return value of the thread */ - //TODO test async thread(params: NounThread): Promise { const body = packJamBytes(params.body); const response = await this.callThread(params, body, 'noun'); @@ -826,7 +825,6 @@ export class Urbit { /** * Run a thread, but json */ - //TODO test async jsonThread(params: JsonThread): Promise { const body = JSON.stringify(params.body); const response = await this.callThread(params, body, 'json'); From 4413da2256e4083061243c190ac7dd58e5c85c36 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 16 Apr 2024 19:19:27 +0200 Subject: [PATCH 37/49] lib: makes types self-consistent, rename callbacks Make sure we use Path instead of flat strings where appropriate. Rename subscription callbacks, and unify callbacks into their "interface" types. Store those interface types, even if we strictly only need the callbacks themselves, it's useful data to keep around. We do remove the eventId from the callback interfaces though, you can't know them ahead of time, and client software is generally better off rolling their own identifiers if they really don't want to do anonymous callback function or similar. Updates tests to match. --- src/Urbit.ts | 85 ++++++++++++++++++++++++-------------------- src/types.ts | 51 ++++++++++++-------------- test/default.test.ts | 10 +++--- 3 files changed, 74 insertions(+), 72 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index efb91ee..c5711d3 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -7,14 +7,14 @@ import { Thread, NounThread, JsonThread, - PokeInterface, - SubscriptionRequestInterface, + Poke, + Subscription, headers, - PokeHandlers, FatalError, Path, ReapError, UrbitParams, + OnceSubscriptionErr, } from './types'; import EventEmitter, { hexString, unpackJamBytes, packJamBytes } from './utils'; @@ -63,7 +63,7 @@ export class Urbit { * removed after calling the success or failure function. */ - private outstandingPokes: Map = new Map(); + private outstandingPokes: Map = new Map(); /** * A registry of requestId to subscription functions. @@ -74,7 +74,7 @@ export class Urbit { * subscription is available, which may be 0, 1, or many times. The * disconnect function may be called exactly once. */ - private outstandingSubscriptions: Map = + private outstandingSubscriptions: Map = new Map(); /** @@ -227,6 +227,7 @@ export class Urbit { } } + //NOTE debugging use only! on( event: T, callback: (data: UrbitHttpApiEvent[T]) => void @@ -409,7 +410,7 @@ export class Urbit { if (bod instanceof Cell) { //TODO pre-render tang after porting tang utils console.error(bod.tail); - funcs.err(id, bod.tail); + funcs.onNack(bod.tail); this.outstandingSubscriptions.delete(id); } // [%fact =desk =mark =noun] @@ -430,7 +431,7 @@ export class Urbit { } const mark = Atom.cordToString(bod.tail.head); //NOTE we don't pass the desk. it's a leak-y eyre impl detail - funcs.event(id, mark, bod.tail.tail); + funcs.onFact(mark, bod.tail.tail); } catch (e) { console.error('Failed to call subscription event callback', e); } @@ -440,7 +441,7 @@ export class Urbit { this.outstandingSubscriptions.has(id) ) { const funcs = this.outstandingSubscriptions.get(id); - funcs.quit(); + funcs.onKick(); this.outstandingSubscriptions.delete(id); this.emit('subscription', { id: id, @@ -509,7 +510,7 @@ export class Urbit { this.lastHeardEventId = -1; this.lastAcknowledgedEventId = -1; this.outstandingSubscriptions.forEach((sub, id) => { - sub.quit(); + sub.onKick(); this.emit('subscription', { id, status: 'close', @@ -537,11 +538,10 @@ export class Urbit { * * @param eventId The event to acknowledge. */ - private async ack(eventId: number): Promise { + private async ack(eventId: number): Promise { this.lastAcknowledgedEventId = eventId; // [%ack event-id=@ud] - await this.sendNounsToChannel(['ack', eventId]); - return eventId; + return this.sendNounsToChannel(['ack', eventId]); } //NOTE every arg is interpreted (through nockjs.dwim) as a noun, which @@ -566,23 +566,27 @@ export class Urbit { * * @returns The first fact on the subcription */ - async subscribeOnce(app: string, path: Path, timeout?: number) { + async subscribeOnce(app: string, path: Path, timeout?: number): + Promise { await this.ready; return new Promise(async (resolve, reject) => { let done = false; let id: number | null = null; - const quit = () => { + const onKick = () => { if (!done) { - reject('quit'); + reject('onKick'); } }; - const event = (id: number, m: string, n: Noun) => { + const onFact = (m: string, n: Noun) => { if (!done) { resolve(n); this.unsubscribe(id); } }; - const request = { app, path, event, err: reject, quit }; + const onNack = (n: Noun) => { + reject('onNack'); + } + const request = { app, path, onFact, onNack, onKick }; id = await this.subscribe(request); @@ -605,11 +609,11 @@ export class Urbit { * @param mark The mark of the data being sent * @param noun The data to send */ - async poke(params: PokeInterface): Promise { + async poke(params: Poke): Promise { await this.ready; - const { app, mark, noun, shipName, onSuccess, onError } = { - onSuccess: () => {}, - onError: () => {}, + params.onSuccess = params.onSuccess || (()=>{}); + params.onError = params.onError || (()=>{}); + const { app, mark, noun, shipName } = { shipName: this.ship, ...params, }; @@ -622,14 +626,7 @@ export class Urbit { const ship = Atom.fromString(patp2dec('~' + shipName), 10); // [%poke request-id=@ud ship=@p app=term mark=@tas =noun] const non = ['poke', eventId, ship, app, mark, noun]; - this.outstandingPokes.set(eventId, { - onSuccess: () => { - onSuccess(); - }, - onError: (err) => { - onError(err); - }, - }); + this.outstandingPokes.set(eventId, params); await this.sendNounsToChannel(non); return eventId; } @@ -642,12 +639,12 @@ export class Urbit { * @param path The path to which to subscribe * @param handlers Handlers to deal with various events of the subscription */ - async subscribe(params: SubscriptionRequestInterface): Promise { + async subscribe(params: Subscription): Promise { await this.ready; - const { app, path, ship, err, event, quit } = { - err: () => {}, - event: () => {}, - quit: () => {}, + const { app, path, ship, onNack, onFact, onKick } = { + onNack: () => {}, + onFact: () => {}, + onKick: () => {}, ship: this.ship, ...params, }; @@ -660,9 +657,9 @@ export class Urbit { this.outstandingSubscriptions.set(eventId, { app, path, - err, - event, - quit, + onNack, + onFact, + onKick, }); let pathAsString: string; @@ -762,8 +759,20 @@ export class Urbit { async scry(params: Scry): Promise> { await this.ready; const { app, path, mark } = params; + + let pathAsString: string; + if (typeof path === 'string') { + pathAsString = path; + } else + if (Array.isArray(path)) { + pathAsString = path.join('/'); + } else + if (path instanceof Atom || path instanceof Cell) { + pathAsString = enjs.array(enjs.cord)(path).join('/'); + } + const response = await this.fetch( - `${this.url}/~/scry/${app}${path}.${mark || 'noun'}`, + `${this.url}/~/scry/${app}${pathAsString}.${mark || 'noun'}`, this.fetchOptions('GET') ); diff --git a/src/types.ts b/src/types.ts index b9b76ce..1404dfe 100644 --- a/src/types.ts +++ b/src/types.ts @@ -115,6 +115,11 @@ export interface Poke { * Noun to poke with */ noun: Noun; + /** + * result handlers + */ + onSuccess?: () => void; + onError?: (e: Noun) => void; // given a $tang } /** @@ -124,7 +129,7 @@ export interface Scry { /** {@inheritDoc GallAgent} */ app: GallAgent; /** {@inheritDoc Path} */ - path: string; //REVIEW make Path again? + path: Path; mark?: Mark; } @@ -169,38 +174,11 @@ export interface JsonThread extends Thread { body: any; } -export type Action = 'poke' | 'subscribe' | 'ack' | 'unsubscribe' | 'delete'; - -export interface PokeHandlers { - onSuccess?: () => void; - onError?: (e: Noun) => void; // given a $tang -} - -export type PokeInterface = PokeHandlers & Poke; - /** * Subscription event handlers * */ -export interface SubscriptionInterface { - /** - * Handle negative %watch-ack - */ - //NOTE error is a $tang - err?(id: number, error: Noun): void; - /** - * Handle %fact - */ - event?(id: number, mark: string, data: Noun): void; - /** - * Handle %kick - */ - quit?(): void; -} - -export type OnceSubscriptionErr = 'quit' | 'nack' | 'timeout'; - -export interface SubscriptionRequestInterface extends SubscriptionInterface { +export interface Subscription { /** * The app to subscribe to * @example @@ -213,8 +191,23 @@ export interface SubscriptionRequestInterface extends SubscriptionInterface { * `['keys']` */ path: Path; + /** + * Handle negative %watch-ack + */ + //NOTE error is a $tang + onNack?(error: Noun): void; + /** + * Handle %fact + */ + onFact?(mark: string, data: Noun): void; + /** + * Handle %kick + */ + onKick?(): void; } +export type OnceSubscriptionErr = 'onKick' | 'onNack' | 'timeout'; + export interface headers { Cookie?: string; [headerName: string]: string; diff --git a/test/default.test.ts b/test/default.test.ts index 64da31c..5c4b355 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -139,9 +139,9 @@ describe('subscription', () => { const params = { app: 'app', path: ['path'] as Path, - err: jest.fn(), - event: jest.fn(), - quit: jest.fn(), + onNack: jest.fn(), + onFact: jest.fn(), + onKick: jest.fn(), }; const firstEv = dwim('one'); const secondEv = dwim('two'); @@ -156,8 +156,8 @@ describe('subscription', () => { await wait(600); expect(airlock.onOpen).toBeCalled(); - expect(params.event).toHaveBeenNthCalledWith(1, 1, 'mark', firstEv); - expect(params.event).toHaveBeenNthCalledWith(2, 1, 'mark', secondEv); + expect(params.onFact).toHaveBeenNthCalledWith(1, 'mark', firstEv); + expect(params.onFact).toHaveBeenNthCalledWith(2, 'mark', secondEv); }, 800); it('should handle poke acks', async () => { airlock = newUrbit(); From 296eb996dd95dcc19fff5178c89b40a4d7356691 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 16 Apr 2024 19:27:58 +0200 Subject: [PATCH 38/49] lib: never ever accept ship without leading sig Canonical aura formatting or bust. --- src/Urbit.ts | 4 ++-- src/types.ts | 14 +------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index c5711d3..3faf8bc 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -623,7 +623,7 @@ export class Urbit { } const eventId = this.getEventId(); - const ship = Atom.fromString(patp2dec('~' + shipName), 10); + const ship = Atom.fromString(patp2dec(shipName), 10); // [%poke request-id=@ud ship=@p app=term mark=@tas =noun] const non = ['poke', eventId, ship, app, mark, noun]; this.outstandingPokes.set(eventId, params); @@ -688,7 +688,7 @@ export class Urbit { const non = [ 'subscribe', eventId, - Atom.fromString(patp2dec('~' + ship), 10), + Atom.fromString(patp2dec(ship), 10), app, pathAsNoun, ]; diff --git a/src/types.ts b/src/types.ts index 1404dfe..47b7598 100644 --- a/src/types.ts +++ b/src/types.ts @@ -55,21 +55,9 @@ export type Path = string | string[] | Noun; * ```typescript * "~sampel-palnet" * ``` - * */ export type Patp = string; -/** - * @p not including leading sig, rendered as a string - * - * @example - * ```typescript - * "sampel-palnet" - * ``` - * - */ -export type PatpNoSig = string; - /** * The name of a clay mark, as a string * @@ -103,7 +91,7 @@ export interface Poke { * This should always be the ship that you are connected to * */ - ship?: PatpNoSig; + ship?: Patp; /** */ app: GallAgent; From 8e7f4c0f8ff9fa9138b3c937c050fb87ba9dcdfc Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 16 Apr 2024 19:28:38 +0200 Subject: [PATCH 39/49] fetch: remove last console.log --- src/fetch-event-source/parse.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/fetch-event-source/parse.ts b/src/fetch-event-source/parse.ts index 9187d8b..0c10ef7 100644 --- a/src/fetch-event-source/parse.ts +++ b/src/fetch-event-source/parse.ts @@ -166,7 +166,6 @@ export function getMessages( fieldLength + (line[fieldLength + 1] === ControlChars.Space ? 2 : 1); const value = decoder.decode(line.subarray(valueOffset)); - console.log('field:', field, 'value:', value); switch (field) { case 'data': // if this message already has data, append the new value to the old. From cb33812e7908d2979b49195d8c791ff47b6c7755 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 16 Apr 2024 19:33:32 +0200 Subject: [PATCH 40/49] lib: use alias types consistently --- src/Urbit.ts | 11 +++++++---- src/types.ts | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 3faf8bc..a0de6ef 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -15,6 +15,9 @@ import { ReapError, UrbitParams, OnceSubscriptionErr, + Patp, + GallAgent, + Mark, } from './types'; import EventEmitter, { hexString, unpackJamBytes, packJamBytes } from './utils'; @@ -90,7 +93,7 @@ export class Urbit { /** * Identity of the ship we're connected to */ - ship?: string | null; + ship?: Patp | null; /** * Our access code @@ -100,7 +103,7 @@ export class Urbit { /** * Our identity, with which we are authenticated into the ship */ - our?: string | null; + our?: Patp | null; /** * If verbose, logs output eagerly. @@ -566,7 +569,7 @@ export class Urbit { * * @returns The first fact on the subcription */ - async subscribeOnce(app: string, path: Path, timeout?: number): + async subscribeOnce(app: GallAgent, path: Path, timeout?: number): Promise { await this.ready; return new Promise(async (resolve, reject) => { @@ -577,7 +580,7 @@ export class Urbit { reject('onKick'); } }; - const onFact = (m: string, n: Noun) => { + const onFact = (m: Mark, n: Noun) => { if (!done) { resolve(n); this.unsubscribe(id); diff --git a/src/types.ts b/src/types.ts index 47b7598..a54f33d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -187,7 +187,7 @@ export interface Subscription { /** * Handle %fact */ - onFact?(mark: string, data: Noun): void; + onFact?(mark: Mark, data: Noun): void; /** * Handle %kick */ From 5deb5cd796f72ea0f32b62418d6d9a2e10ad74bc Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 16 Apr 2024 19:49:13 +0200 Subject: [PATCH 41/49] lib: use latest aura-js This has the same kind of bignums that nockjs uses, letting us skip a double-conversion. --- package.json | 2 +- src/Urbit.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 06fe013..4bb31da 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ }, "dependencies": { "@babel/runtime": "^7.12.5", - "@urbit/aura": "^1.0.0", + "@urbit/aura": "^2.0.0", "@urbit/nockjs": "^1.1.0", "browser-or-node": "^1.3.0", "core-js": "^3.19.1" diff --git a/src/Urbit.ts b/src/Urbit.ts index a0de6ef..3baaf1f 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -378,8 +378,7 @@ export class Urbit { let data: Noun; if (event.data) { - //TODO use the same bignum type everywhere - data = cue(Atom.fromString(parseUw(event.data).toString())); + data = cue(new Atom(parseUw(event.data))); } // [request-id channel-event] From e68168fdc9139186e51f5e450b03c917cb72ffa3 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 16 Apr 2024 19:49:49 +0200 Subject: [PATCH 42/49] doc: update todo list --- TODO.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/TODO.md b/TODO.md index 6bf2e62..29bfa95 100644 --- a/TODO.md +++ b/TODO.md @@ -1,8 +1,3 @@ remaining work: - -- update to use new aura-js version (with native bigints) -- make spider compatible - - test new thread() and jsonThread() against a real spider -- go over all the types, clean up unused ones - do pre-release - do webterm migration stream/recording From 99da5739a3c8e3dace9b9a48e5b7c7e622a3c07e Mon Sep 17 00:00:00 2001 From: fang Date: Wed, 18 Sep 2024 17:56:58 +0200 Subject: [PATCH 43/49] lib: support json channels again When initializing a channel connection, you may now optionally specify the channel mode, either 'noun' (default) or 'json'. This mode determines the shape of the responses that come back out of the library into your callbacks. Sending pokes may be done with either nouns or js data. Scries and threads retain their separate functions depending on what kind of response you want. --- src/Urbit.ts | 251 +++++++++++++++++++++++++++++-------------- src/events.ts | 4 +- src/types.ts | 90 ++++++++++++---- test/default.test.ts | 10 +- 4 files changed, 246 insertions(+), 109 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 3baaf1f..c731f88 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -18,12 +18,18 @@ import { Patp, GallAgent, Mark, + EyreEvent, } from './types'; import EventEmitter, { hexString, unpackJamBytes, packJamBytes } from './utils'; import { Noun, Atom, Cell, enjs, dejs, jam, cue } from '@urbit/nockjs'; import { parseUw, formatUw, patp2dec } from '@urbit/aura'; +//TODO move into nockjs utils +function isNoun(a: any): a is Noun { + return (a instanceof Atom) || (a instanceof Cell); +} + /** * A class for interacting with an urbit ship, given its URL and code */ @@ -90,6 +96,11 @@ export class Urbit { */ url: string; + /** + * The "mode" the channel is being operated in + */ + mode: 'noun' | 'json'; + /** * Identity of the ship we're connected to */ @@ -178,6 +189,7 @@ export class Urbit { */ constructor(params: UrbitParams) { this.url = params.url; + this.mode = params.mode || 'noun'; this.code = params.code; this.verbose = params.verbose || false; this.fetch = params.fetch || ((...args) => fetch(...args)); @@ -376,85 +388,66 @@ export class Urbit { this.ack(eventId); } - let data: Noun; - if (event.data) { - data = cue(new Atom(parseUw(event.data))); - } + const eev: EyreEvent = this.unpackSSEvent(event.data); - // [request-id channel-event] if ( - data instanceof Cell && - data.head instanceof Atom && - data.tail instanceof Cell && - data.tail.head instanceof Atom + eev.tag === 'poke-ack' && + this.outstandingPokes.has(eev.id) ) { - //NOTE id could be string if id > 2^32, not expected in practice - const id = Number(data.head.number); - const tag = Atom.cordToString(data.tail.head); - const bod = data.tail.tail; - // [%poke-ack p=(unit tang)] - if (tag === 'poke-ack' && this.outstandingPokes.has(id)) { - const funcs = this.outstandingPokes.get(id); - if (bod instanceof Atom) { - funcs.onSuccess(); - } else { - //TODO pre-render tang after porting tang utils - console.error(bod.tail); - funcs.onError(bod.tail); - } - this.outstandingPokes.delete(id); - // [%watch-ack p=(unit tang)] - } else if ( - tag === 'watch-ack' && - this.outstandingSubscriptions.has(id) - ) { - const funcs = this.outstandingSubscriptions.get(id); - if (bod instanceof Cell) { - //TODO pre-render tang after porting tang utils - console.error(bod.tail); - funcs.onNack(bod.tail); - this.outstandingSubscriptions.delete(id); - } - // [%fact =desk =mark =noun] - } else if ( - tag === 'fact' && - this.outstandingSubscriptions.has(id) - ) { - const funcs = this.outstandingSubscriptions.get(id); - try { - if ( - !( - bod instanceof Cell && - bod.tail instanceof Cell && - bod.tail.head instanceof Atom - ) - ) { - throw 'malformed %fact'; - } - const mark = Atom.cordToString(bod.tail.head); + const funcs = this.outstandingPokes.get(eev.id); + if (!eev.err) { + funcs.onSuccess(); + } else { + //TODO pre-render tang after porting tang utils, + // because json also has its tang pre-rendered into string + console.error(eev.err); + // @ts-ignore because function type signature shenanigans + funcs.onError?.(eev.err); + } + this.outstandingPokes.delete(eev.id); + // + } else if ( + eev.tag === 'watch-ack' && + this.outstandingSubscriptions.has(eev.id) + ) { + const funcs = this.outstandingSubscriptions.get(eev.id); + if (eev.err) { + //TODO pre-render tang after porting tang utils, + // because json also has its tang pre-rendered into string + console.error(eev.err); + // @ts-ignore because function type signature shenanigans + funcs.onNack?.(eev.err); + this.outstandingSubscriptions.delete(eev.id); + } + // + } else if ( + eev.tag === 'fact' && + this.outstandingSubscriptions.has(eev.id) + ) { + const funcs: Subscription = this.outstandingSubscriptions.get(eev.id); + try { + if (funcs.onFact) { //NOTE we don't pass the desk. it's a leak-y eyre impl detail - funcs.onFact(mark, bod.tail.tail); - } catch (e) { - console.error('Failed to call subscription event callback', e); + funcs.onFact?.(eev.mark, eev.data); } - // [%kick ~] - } else if ( - tag === 'kick' && - this.outstandingSubscriptions.has(id) - ) { - const funcs = this.outstandingSubscriptions.get(id); - funcs.onKick(); - this.outstandingSubscriptions.delete(id); - this.emit('subscription', { - id: id, - status: 'close', - }); - } else if (this.verbose) { - console.log([...this.outstandingSubscriptions.keys()]); - console.log('Unrecognized response', data, data.toString()); + } catch (e) { + console.error('Failed to call subscription event callback', e); } - } else { - console.log('strange event noun', data.toString()); + // + } else if ( + eev.tag === 'kick' && + this.outstandingSubscriptions.has(eev.id) + ) { + const funcs = this.outstandingSubscriptions.get(eev.id); + funcs.onKick(); + this.outstandingSubscriptions.delete(eev.id); + this.emit('subscription', { + id: eev.id, + status: 'close', + }); + } else if (this.verbose) { + console.log([...this.outstandingSubscriptions.keys()]); + console.log('Unrecognized unpacked event', eev); } }, onerror: (error) => { @@ -550,12 +543,97 @@ export class Urbit { // should result in a noun nesting inside of the xx $eyre-command type private async sendNounsToChannel(...args: (Noun | any)[]): Promise { const response = await this.fetch(this.channelUrl, { - ...this.fetchOptions('PUT'), + ...this.fetchOptions('PUT', 'noun'), method: 'PUT', body: formatUw(jam(dejs.list(args)).number.toString()), }); if (!response.ok) { - throw new Error('Failed to PUT channel'); + throw new Error('Failed to PUT channel command(s)'); + } + } + + //NOTE every arg should be an eyre command object + //TODO make a type for that + private async sendJsonsToChannel(...args: any[]): Promise { + const response = await this.fetch(this.channelUrl, { + ...this.fetchOptions('PUT', 'json'), + method: 'PUT', + body: JSON.stringify(args), + }); + if (!response.ok) { + throw new Error('Failed to PUT channel command(s)'); + } + } + + private unpackSSEvent(eventString: string): EyreEvent { + if (this.mode === 'noun') { + const data: Noun = cue(new Atom(parseUw(eventString))); + // [request-id channel-event] + if ( + data instanceof Cell && + data.head instanceof Atom && + data.tail instanceof Cell && + data.tail.head instanceof Atom + ) { + //NOTE id could be string if id > 2^32, not expected in practice + const id = Number(data.head.number); + const tag = Atom.cordToString(data.tail.head); + const bod = data.tail.tail; + // [%poke-ack p=(unit tang)] + if (tag === 'poke-ack') { + if (bod instanceof Atom) { + return { tag: 'poke-ack', id: id }; + } else { + return { tag: 'poke-ack', id: id, err: bod.tail }; + } + // [%watch-ack p=(unit tang)] + } else if (tag === 'watch-ack') { + if (bod instanceof Atom) { + return { tag: 'watch-ack', id: id }; + } else { + return { tag: 'watch-ack', id: id, err: bod.tail }; + } + // [%fact =desk =mark =noun] + } else if (tag === 'fact') { + if ( + !( + bod instanceof Cell && + bod.tail instanceof Cell && + bod.tail.head instanceof Atom + ) + ) { + throw new Error('malformed %fact: ' + bod.toString()); + } + const mark = Atom.cordToString(bod.tail.head); + //NOTE we don't extract the desk. it's a leak-y eyre impl detail + return { tag: 'fact', id: id, mark: mark, data: bod.tail.tail }; + // [%kick ~] + } else if (tag === 'kick') { + return { tag: 'kick', id: id }; + } else if (this.verbose) { + console.log('Unrecognized response', data, data.toString()); + } + } else { + console.log('strange event noun', data.toString()); + } + // + } else if (this.mode === 'json') { + const data: any = JSON.parse(eventString); + switch (data.response) { + case 'poke': + return { tag: 'poke-ack', id: data.id, err: data.err }; + case 'subscribe': + return { tag: 'watch-ack', id: data.id, err: data.err }; + case 'quit': + return { tag: 'kick', id: data.id }; + case 'diff': + return { tag: 'fact', id: data.id, mark: data.mark, data: data.json }; + default: + throw new Error('strange event json ' + eventString); + } + // + } else { + throw new Error('strange mode ' + this.mode); } } @@ -615,8 +693,8 @@ export class Urbit { await this.ready; params.onSuccess = params.onSuccess || (()=>{}); params.onError = params.onError || (()=>{}); - const { app, mark, noun, shipName } = { - shipName: this.ship, + const { app, mark, data, ship } = { + ship: this.ship, ...params, }; @@ -625,17 +703,24 @@ export class Urbit { } const eventId = this.getEventId(); - const ship = Atom.fromString(patp2dec(shipName), 10); - // [%poke request-id=@ud ship=@p app=term mark=@tas =noun] - const non = ['poke', eventId, ship, app, mark, noun]; this.outstandingPokes.set(eventId, params); - await this.sendNounsToChannel(non); + + if (isNoun(data)) { + const shipAtom = Atom.fromString(patp2dec(ship), 10); + // [%poke request-id=@ud ship=@p app=term mark=@tas =noun] + const non = ['poke', eventId, shipAtom, app, mark, data]; + await this.sendNounsToChannel(non); + } else { + const poke = { + id: eventId, action: 'poke', ship, app, mark, data, + }; + await this.sendJsonsToChannel(poke); + } return eventId; } /** - * Subscribes to a path on an app on a ship. - * + * Subscribes to a path on an app on a ship, handling noun results * * @param app The app to subsribe to * @param path The path to which to subscribe diff --git a/src/events.ts b/src/events.ts index af60d39..ee712ef 100644 --- a/src/events.ts +++ b/src/events.ts @@ -10,7 +10,7 @@ export interface StatusUpdateEvent { status: ChannelStatus; } -export interface EyreEvent { +export interface ServerEvent { id: number; time: number; data: any; @@ -46,7 +46,7 @@ export type UrbitHttpApiEvent = { subscription: SubscriptionEvent; 'status-update': StatusUpdateEvent; 'id-update': IdUpdateEvent; - event: EyreEvent; + event: ServerEvent; error: ErrorEvent; reset: ResetEvent; 'seamless-reset': ResetEvent; diff --git a/src/types.ts b/src/types.ts index a54f33d..a8a8061 100644 --- a/src/types.ts +++ b/src/types.ts @@ -9,6 +9,12 @@ export interface UrbitParams { * be the empty string. */ url: string; + /** + * The "mode" to operate the channel in, determining whether to receive + * javascript objects or proper Nouns in responses from the channel. + * Defaults to 'noun'. + */ + mode?: 'noun' | 'json'; /** * The access code for the ship at that address */ @@ -41,7 +47,7 @@ export interface UrbitParams { } /** - * A path in either string, string-array or Noun format + * A path in either string, string-array (with trailing nil), or Noun format * @example * `'/updates'` * `['updates', 0]` @@ -82,14 +88,9 @@ export type GallAgent = string; /** * Description of an outgoing poke */ -export interface Poke { +interface PokeBase { /** - * Ship to poke. If left empty, the api lib will populate it with the ship that it is connected to. - * - * @remarks - * - * This should always be the ship that you are connected to - * + * Ship to poke (defaults to the host ship) */ ship?: Patp; /** @@ -99,16 +100,26 @@ export interface Poke { * Mark of the noun to poke with */ mark: Mark; - /** - * Noun to poke with - */ - noun: Noun; /** * result handlers */ onSuccess?: () => void; +} +interface PokeNoun extends PokeBase { + /** + * Data to poke with: noun sent as-is or value sent as json + */ + data: Noun; onError?: (e: Noun) => void; // given a $tang } +interface PokeJson extends PokeBase { + /** + * Data to poke with: noun sent as-is or value sent as json + */ + data: any; + onError?: (e: string) => void; +} +export type Poke = PokeNoun | PokeJson; /** * Description of a scry request @@ -166,19 +177,27 @@ export interface JsonThread extends Thread { * Subscription event handlers * */ -export interface Subscription { +interface SubscriptionBase { /** - * The app to subscribe to + * The ship to subscribe to (defaults to the host ship) + */ + ship?: Patp; + /** + * The agent to subscribe to * @example * `"graph-store"` */ app: GallAgent; /** * The path to which to subscribe - * @example - * `['keys']` */ path: Path; + /** + * Handle %kick + */ + onKick?(): void; +} +export interface SubscriptionNoun extends SubscriptionBase { /** * Handle negative %watch-ack */ @@ -187,12 +206,19 @@ export interface Subscription { /** * Handle %fact */ - onFact?(mark: Mark, data: Noun): void; + onFact?: (mark: Mark, data: Noun) => void; +} +export interface SubscriptionJson extends SubscriptionBase { /** - * Handle %kick + * Handle negative %watch-ack */ - onKick?(): void; + onNack?(error: string): void; + /** + * Handle %fact + */ + onFact?: (mark: Mark, data: any) => void; } +export type Subscription = SubscriptionJson | SubscriptionNoun; export type OnceSubscriptionErr = 'onKick' | 'onNack' | 'timeout'; @@ -204,3 +230,29 @@ export interface headers { export class FatalError extends Error {} export class ReapError extends Error {} + +export type EyreEvent = EyreEventPokeAck + | EyreEventWatchAck + | EyreEventKick + | EyreEventFact; + +type EyreEventPokeAck = { + tag: 'poke-ack'; + id: number; + err?: Noun | string; +}; +type EyreEventWatchAck = { + tag: 'watch-ack'; + id: number; + err?: Noun | string; +} +type EyreEventKick = { + tag: 'kick'; + id: number; +} +type EyreEventFact = { + tag: 'fact'; + id: number; + mark: Mark; + data: Noun | any; +} diff --git a/test/default.test.ts b/test/default.test.ts index 5c4b355..9609c67 100644 --- a/test/default.test.ts +++ b/test/default.test.ts @@ -1,4 +1,4 @@ -import Urbit, { Path } from '../src'; +import Urbit, { Path, Poke } from '../src'; import { Noun, Atom, Cell, jam, dwim } from '@urbit/nockjs'; import { formatUw } from '@urbit/aura'; import 'jest'; @@ -163,10 +163,10 @@ describe('subscription', () => { airlock = newUrbit(); airlock.onOpen = jest.fn(); fetchSpy.mockImplementation(fakeFetch(() => fakeSSE([ack(1)]))); - const params = { + const params: Poke = { app: 'app', mark: 'mark', - noun: dwim(1), + data: dwim(1), onSuccess: jest.fn(), onError: jest.fn(), }; @@ -186,10 +186,10 @@ describe('subscription', () => { .mockImplementationOnce(fakeFetch(() => fakeSSE([ack(1, true)]))) .mockImplementationOnce(fakeFetch(() => fakeSSE([ack(1, true)]))); - const params = { + const params: Poke = { app: 'app', mark: 'mark', - noun: dwim(1), + data: dwim(1), onSuccess: jest.fn(), onError: jest.fn(), }; From 67ca5844bb2bd428bfa9cad6cc54755d76df9267 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 15 Oct 2024 17:34:44 +0200 Subject: [PATCH 44/49] lib: @ts-ignore function type signature complexity Typescript can't check these correctly, but we do want to give either a Noun or js-object depending on the channel mode. The function signatures should've been checked when they were first provided by the client. --- src/Urbit.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index c731f88..470ed70 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -514,7 +514,13 @@ export class Urbit { this.outstandingSubscriptions = new Map(); this.outstandingPokes.forEach((poke, id) => { - poke.onError(Atom.fromString('Channel was reaped')); + if (this.mode === 'noun') { + // @ts-ignore because function type signature shenanigans + poke.onError(dwim(Atom.fromString('Channel was reaped'), 0)); + } else { + // @ts-ignore because function type signature shenanigans + poke.onError('Channel was reaped'); + } }); this.outstandingPokes = new Map(); } @@ -741,6 +747,7 @@ export class Urbit { } const eventId = this.getEventId(); + // @ts-ignore because function type signature shenanigans this.outstandingSubscriptions.set(eventId, { app, path, From e3725614803d24637b08a31c1f9246963f0d2d1f Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 15 Oct 2024 17:35:57 +0200 Subject: [PATCH 45/49] doc: update todo's --- TODO.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/TODO.md b/TODO.md index 29bfa95..d4b0385 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,12 @@ remaining work: +- support json and noun modes side-by-side + - should add tests for json mode, mixing mode in subscriptions vs scry, etc +- detect & handle 401 response for expired cookie +- consider .onConnectionStatusChange callback (so lazy devs don't have to listen to the event emitter thing) +- optional channel id param + - so we can re-use the same channel for a client - do pre-release + - move client to use new version of the library in json mode + - use noun scry/poke for new things + - upgrade existing scries to get nouns, port conversions to js - do webterm migration stream/recording From b940c821b9fa8594d954fb3230893f53e584a108 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 22 Oct 2024 11:05:04 -0500 Subject: [PATCH 46/49] ops: enabling strict TS and fixing errors --- package-lock.json | 5912 ++++++++++++++++++------------- package.json | 2 +- src/Urbit.ts | 208 +- src/fetch-event-source/parse.ts | 9 +- src/types.ts | 17 +- src/utils.ts | 14 +- tsconfig.json | 2 +- 7 files changed, 3599 insertions(+), 2565 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8733782..f962cd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,8 @@ "license": "MIT", "dependencies": { "@babel/runtime": "^7.12.5", - "@urbit/aura": "^1.0.0", - "@urbit/nockjs": "^1.1.0", + "@urbit/aura": "^2.0.0", + "@urbit/nockjs": "^1.4.0-dev2", "browser-or-node": "^1.3.0", "core-js": "^3.19.1" }, @@ -19,23 +19,26 @@ "@babel/core": "^7.15.8", "@babel/preset-env": "^7.15.8", "@babel/preset-typescript": "^7.16.0", + "@jest/globals": "^29.7.0", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-node-resolve": "^13.0.6", "@types/browser-or-node": "^1.2.0", "@types/eventsource": "^1.1.5", - "@types/jest": "^26.0.24", + "@types/jest": "^29.5.5", "@types/react": "^16.9.56", "@typescript-eslint/eslint-plugin": "^4.7.0", "@typescript-eslint/parser": "^4.7.0", - "babel-jest": "^27.0.6", + "babel-jest": "^29.7.0", "cross-fetch": "^3.1.4", "event-target-polyfill": "0.0.3", "fast-text-encoding": "^1.0.3", - "jest": "^27.0.6", + "jest": "^29.7.0", + "jest-environment-jsdom": "^29.7.0", "rollup": "^2.59.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.34.1", + "ts-jest": "^29.1.1", "typescript": "^5.2.2", "util": "^0.12.3", "web-streams-polyfill": "^3.0.3", @@ -55,44 +58,48 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", + "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.25.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.21.0", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.8.tgz", + "integrity": "sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.21.0", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.8.tgz", + "integrity": "sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==", "dev": true, - "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.0", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.21.0", - "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.0", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0", - "convert-source-map": "^1.7.0", + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/helper-compilation-targets": "^7.25.7", + "@babel/helper-module-transforms": "^7.25.7", + "@babel/helpers": "^7.25.7", + "@babel/parser": "^7.25.8", + "@babel/template": "^7.25.7", + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.8", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -102,28 +109,39 @@ "url": "https://opencollective.com/babel" } }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/generator": { - "version": "7.21.1", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", + "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.21.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/types": "^7.25.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -153,21 +171,28 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", + "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", + "@babel/compat-data": "^7.25.7", + "@babel/helper-validator-option": "^7.25.7", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, "node_modules/@babel/helper-create-class-features-plugin": { @@ -276,32 +301,34 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", + "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.21.2", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", + "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.2", - "@babel/types": "^7.21.2" + "@babel/helper-module-imports": "^7.25.7", + "@babel/helper-simple-access": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", + "@babel/traverse": "^7.25.7" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-optimise-call-expression": { @@ -316,9 +343,10 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.20.2", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", + "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -357,11 +385,13 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.20.2", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", + "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.20.2" + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" @@ -390,25 +420,28 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", + "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", + "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.21.0", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", + "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -428,35 +461,41 @@ } }, "node_modules/@babel/helpers": { - "version": "7.21.0", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", + "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0" + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", + "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.25.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.21.2", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", + "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", "dev": true, - "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.8" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -741,8 +780,9 @@ }, "node_modules/@babel/plugin-syntax-bigint": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -811,10 +851,26 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.7.tgz", + "integrity": "sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" }, @@ -833,6 +889,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.7.tgz", + "integrity": "sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "dev": true, @@ -1567,32 +1638,31 @@ } }, "node_modules/@babel/template": { - "version": "7.20.7", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", + "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/types": "^7.25.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.21.2", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", + "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.1", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.2", - "@babel/types": "^7.21.2", - "debug": "^4.1.0", + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -1600,12 +1670,13 @@ } }, "node_modules/@babel/types": { - "version": "7.21.2", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", + "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1614,8 +1685,9 @@ }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true }, "node_modules/@eslint/eslintrc": { "version": "0.4.3", @@ -1717,25 +1789,27 @@ } }, "node_modules/@jest/console": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/console/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -1748,8 +1822,9 @@ }, "node_modules/@jest/console/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1763,8 +1838,9 @@ }, "node_modules/@jest/console/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -1774,21 +1850,24 @@ }, "node_modules/@jest/console/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/@jest/console/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/console/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -1797,41 +1876,42 @@ } }, "node_modules/@jest/core": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.8.1", + "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "rimraf": "^3.0.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1844,8 +1924,9 @@ }, "node_modules/@jest/core/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -1858,8 +1939,9 @@ }, "node_modules/@jest/core/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1873,8 +1955,9 @@ }, "node_modules/@jest/core/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -1884,21 +1967,24 @@ }, "node_modules/@jest/core/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/@jest/core/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/core/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -1907,81 +1993,110 @@ } }, "node_modules/@jest/environment": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^27.5.1" + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, - "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "glob": "^7.1.2", + "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", - "source-map": "^0.6.0", "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1994,8 +2109,9 @@ }, "node_modules/@jest/reporters/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2008,8 +2124,9 @@ }, "node_modules/@jest/reporters/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2023,8 +2140,9 @@ }, "node_modules/@jest/reporters/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2034,21 +2152,52 @@ }, "node_modules/@jest/reporters/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/@jest/reporters/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@jest/reporters/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2056,76 +2205,93 @@ "node": ">=8" } }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/source-map": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, - "license": "MIT", "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" + "graceful-fs": "^4.2.9" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/test-result": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/test-sequencer": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/test-result": "^27.5.1", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/transform": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "write-file-atomic": "^4.0.2" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/transform/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2138,8 +2304,9 @@ }, "node_modules/@jest/transform/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2153,8 +2320,9 @@ }, "node_modules/@jest/transform/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2164,21 +2332,24 @@ }, "node_modules/@jest/transform/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/@jest/transform/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/transform/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2187,24 +2358,27 @@ } }, "node_modules/@jest/types": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, - "license": "MIT", "dependencies": { + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^16.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -2217,8 +2391,9 @@ }, "node_modules/@jest/types/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -2232,8 +2407,9 @@ }, "node_modules/@jest/types/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -2243,21 +2419,24 @@ }, "node_modules/@jest/types/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/@jest/types/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/@jest/types/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2286,9 +2465,10 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -2321,12 +2501,13 @@ "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@nodelib/fs.scandir": { @@ -2443,28 +2624,37 @@ "dev": true, "license": "MIT" }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, "node_modules/@sinonjs/commons": { - "version": "1.8.6", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@tootallnate/once": { - "version": "1.1.2", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, - "license": "MIT", "engines": { - "node": ">= 6" + "node": ">= 10" } }, "node_modules/@types/babel__core": { @@ -2520,41 +2710,57 @@ "license": "MIT" }, "node_modules/@types/graceful-fs": { - "version": "4.1.6", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "dev": true, - "license": "MIT" + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true }, "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { - "version": "3.0.1", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/istanbul-lib-report": "*" } }, "node_modules/@types/jest": { - "version": "26.0.24", + "version": "29.5.13", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.13.tgz", + "integrity": "sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==", + "dev": true, + "dependencies": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "node_modules/@types/jsdom": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", + "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", "dev": true, - "license": "MIT", "dependencies": { - "jest-diff": "^26.0.0", - "pretty-format": "^26.0.0" + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" } }, "node_modules/@types/json-schema": { @@ -2567,11 +2773,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/prettier": { - "version": "2.7.2", - "dev": true, - "license": "MIT" - }, "node_modules/@types/prop-types": { "version": "15.7.5", "dev": true, @@ -2601,22 +2802,31 @@ "license": "MIT" }, "node_modules/@types/stack-utils": { - "version": "2.0.1", - "dev": true, - "license": "MIT" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "dev": true }, "node_modules/@types/yargs": { - "version": "16.0.5", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, - "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "dev": true, - "license": "MIT" + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "4.33.0", @@ -2829,31 +3039,31 @@ } }, "node_modules/@urbit/aura": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@urbit/aura/-/aura-1.0.0.tgz", - "integrity": "sha512-IeP3uoDzZ0Rpn345auXK0y/BCcXTmpgAlOPbgf7n4eD35h56OnSoit1kuXKA21sWE19gFjK/wqZcz5ULjz2ADg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@urbit/aura/-/aura-2.0.1.tgz", + "integrity": "sha512-B1ZTwsEVqi/iybxjHlY3gBz7r4Xd7n9pwi9NY6V+7r4DksqBYBpfzdqWGUXgZ0x67IW8AOGjC73tkTOclNMhUg==", "engines": { "node": ">=16", "npm": ">=8" - }, - "peerDependencies": { - "big-integer": "^1.6.51" } }, "node_modules/@urbit/nockjs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@urbit/nockjs/-/nockjs-1.1.0.tgz", - "integrity": "sha512-tx+Nd3w4mKQD1updXLJe71aWn4Kt8FzTtypASi1FF9JelbhW+fHwlP7yQ8tTm6JqNHkhZ9B+4RO/M8hjjsbgvA==" + "version": "1.4.0-dev2", + "resolved": "https://registry.npmjs.org/@urbit/nockjs/-/nockjs-1.4.0-dev2.tgz", + "integrity": "sha512-/QjriD33bkp88Z5TEXPNeoZL+Oc6FbFVe4zphvyBdsURtNpcCO27qavqyEb1ywuAT5czH9uByzwo2NXCzGoS6g==" }, "node_modules/abab": { "version": "2.0.6", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "deprecated": "Use your platform's native atob() and btoa() methods instead", + "dev": true }, "node_modules/acorn": { "version": "7.4.1", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2862,15 +3072,28 @@ } }, "node_modules/acorn-globals": { - "version": "6.0.0", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", + "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", "dev": true, - "license": "MIT", "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" + "acorn": "^8.1.0", + "acorn-walk": "^8.0.2" } }, - "node_modules/acorn-jsx": { + "node_modules/acorn-globals/node_modules/acorn": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { "version": "5.3.2", "dev": true, "license": "MIT", @@ -2880,17 +3103,34 @@ } }, "node_modules/acorn-walk": { - "version": "7.2.0", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, - "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk/node_modules/acorn": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, "engines": { "node": ">=0.4.0" } }, "node_modules/agent-base": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, - "license": "MIT", "dependencies": { "debug": "4" }, @@ -2925,8 +3165,9 @@ }, "node_modules/ansi-escapes": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, @@ -2958,8 +3199,9 @@ }, "node_modules/anymatch": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -2993,10 +3235,17 @@ "node": ">=8" } }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true + }, "node_modules/asynckit": { "version": "0.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true }, "node_modules/available-typed-arrays": { "version": "1.0.5", @@ -3010,21 +3259,21 @@ } }, "node_modules/babel-jest": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.5.1", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": "^7.8.0" @@ -3110,17 +3359,18 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", + "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/babel-plugin-polyfill-corejs2": { @@ -3160,37 +3410,42 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "node_modules/babel-preset-jest": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, - "license": "MIT", "dependencies": { - "babel-plugin-jest-hoist": "^27.5.1", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -3201,15 +3456,6 @@ "dev": true, "license": "MIT" }, - "node_modules/big-integer": { - "version": "1.6.51", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", - "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", - "peer": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "dev": true, @@ -3234,13 +3480,10 @@ "version": "1.3.0", "license": "MIT" }, - "node_modules/browser-process-hrtime": { - "version": "1.0.0", - "dev": true, - "license": "BSD-2-Clause" - }, "node_modules/browserslist": { - "version": "4.21.5", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, "funding": [ { @@ -3250,14 +3493,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -3266,10 +3512,23 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "dependencies": { + "fast-json-stable-stringify": "2.x" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bser": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "node-int64": "^0.4.0" } @@ -3319,7 +3578,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001458", + "version": "1.0.30001669", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", + "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", "dev": true, "funding": [ { @@ -3329,9 +3590,12 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } - ], - "license": "CC-BY-4.0" + ] }, "node_modules/chalk": { "version": "2.4.2", @@ -3348,14 +3612,17 @@ }, "node_modules/char-regex": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } }, "node_modules/ci-info": { - "version": "3.8.0", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true, "funding": [ { @@ -3363,39 +3630,45 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "dev": true, - "license": "MIT" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", + "dev": true }, "node_modules/cliui": { - "version": "7.0.4", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "ISC", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/co": { "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, - "license": "MIT", "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" } }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "dev": true, - "license": "MIT" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true }, "node_modules/color-convert": { "version": "1.9.3", @@ -3412,8 +3685,9 @@ }, "node_modules/combined-stream": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, - "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -3437,9 +3711,10 @@ "license": "MIT" }, "node_modules/convert-source-map": { - "version": "1.9.0", - "dev": true, - "license": "MIT" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true }, "node_modules/core-js": { "version": "3.28.0", @@ -3462,6 +3737,97 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/create-jest/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/create-jest/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/create-jest/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/create-jest/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/create-jest/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/create-jest/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cross-fetch": { "version": "3.1.5", "dev": true, @@ -3484,14 +3850,16 @@ } }, "node_modules/cssom": { - "version": "0.4.4", - "dev": true, - "license": "MIT" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", + "dev": true }, "node_modules/cssstyle": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, - "license": "MIT", "dependencies": { "cssom": "~0.3.6" }, @@ -3501,8 +3869,9 @@ }, "node_modules/cssstyle/node_modules/cssom": { "version": "0.3.8", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true }, "node_modules/csstype": { "version": "3.1.1", @@ -3510,16 +3879,17 @@ "license": "MIT" }, "node_modules/data-urls": { - "version": "2.0.0", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dev": true, - "license": "MIT", "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/debug": { @@ -3540,18 +3910,29 @@ }, "node_modules/decimal.js": { "version": "10.4.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true }, "node_modules/dedent": { - "version": "0.7.0", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", "dev": true, - "license": "MIT" + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deep-is": { "version": "0.1.4", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/deepmerge": { "version": "4.3.0", @@ -3563,26 +3944,29 @@ }, "node_modules/delayed-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/detect-newline": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/diff-sequences": { - "version": "26.6.2", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, - "license": "MIT", "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/dir-glob": { @@ -3609,35 +3993,46 @@ } }, "node_modules/domexception": { - "version": "2.0.1", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", + "deprecated": "Use your platform's native DOMException instead", "dev": true, - "license": "MIT", "dependencies": { - "webidl-conversions": "^5.0.0" + "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dev": true, - "license": "BSD-2-Clause", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/electron-to-chromium": { - "version": "1.4.311", - "dev": true, - "license": "ISC" + "version": "1.5.42", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.42.tgz", + "integrity": "sha512-gIfKavKDw1mhvic9nbzA5lZw8QSHpdMwLwXc0cWidQz9B15pDoDdDH4boIatuFfeoCatb3a/NGL6CYRVFxGZ9g==", + "dev": true }, "node_modules/emittery": { - "version": "0.8.1", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, - "license": "MIT", "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" @@ -3660,18 +4055,32 @@ "node": ">=8.6" } }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/error-ex": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, - "license": "MIT", "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/escalade": { - "version": "3.1.1", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -3685,14 +4094,14 @@ } }, "node_modules/escodegen": { - "version": "2.0.0", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" + "esutils": "^2.0.2" }, "bin": { "escodegen": "bin/escodegen.js", @@ -3707,58 +4116,13 @@ }, "node_modules/escodegen/node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/eslint": { "version": "7.32.0", "dev": true, @@ -4140,8 +4504,9 @@ }, "node_modules/execa": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -4162,23 +4527,27 @@ }, "node_modules/exit": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" } }, "node_modules/expect": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/fast-deep-equal": { @@ -4210,7 +4579,8 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/fast-text-encoding": { "version": "1.0.6", @@ -4227,8 +4597,9 @@ }, "node_modules/fb-watchman": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, - "license": "Apache-2.0", "dependencies": { "bser": "2.1.1" } @@ -4245,8 +4616,38 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/fill-range": { - "version": "7.0.1", + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", "dev": true, "license": "MIT", "dependencies": { @@ -4312,9 +4713,10 @@ } }, "node_modules/form-data": { - "version": "3.0.1", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dev": true, - "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -4342,6 +4744,20 @@ "dev": true, "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.1", "dev": true, @@ -4362,8 +4778,9 @@ }, "node_modules/get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -4391,8 +4808,9 @@ }, "node_modules/get-stream": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -4518,27 +4936,30 @@ } }, "node_modules/html-encoding-sniffer": { - "version": "2.0.1", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", "dev": true, - "license": "MIT", "dependencies": { - "whatwg-encoding": "^1.0.5" + "whatwg-encoding": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/html-escaper": { "version": "2.0.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true }, "node_modules/http-proxy-agent": { - "version": "4.0.1", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, - "license": "MIT", "dependencies": { - "@tootallnate/once": "1", + "@tootallnate/once": "2", "agent-base": "6", "debug": "4" }, @@ -4548,8 +4969,9 @@ }, "node_modules/https-proxy-agent": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, - "license": "MIT", "dependencies": { "agent-base": "6", "debug": "4" @@ -4560,18 +4982,20 @@ }, "node_modules/human-signals": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, - "license": "Apache-2.0", "engines": { "node": ">=10.17.0" } }, "node_modules/iconv-lite": { - "version": "0.4.24", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, - "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" @@ -4611,9 +5035,10 @@ } }, "node_modules/import-local": { - "version": "3.1.0", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, - "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -4667,8 +5092,9 @@ }, "node_modules/is-arrayish": { "version": "0.2.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true }, "node_modules/is-builtin-module": { "version": "3.2.1", @@ -4724,8 +5150,9 @@ }, "node_modules/is-generator-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -4770,8 +5197,9 @@ }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true }, "node_modules/is-reference": { "version": "1.2.1", @@ -4783,8 +5211,9 @@ }, "node_modules/is-stream": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -4810,11 +5239,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/isexe": { "version": "2.0.0", "dev": true, @@ -4844,30 +5268,60 @@ } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-report/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/istanbul-lib-report/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -4877,8 +5331,9 @@ }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", @@ -4889,9 +5344,10 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.5", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" @@ -4900,20 +5356,110 @@ "node": ">=8" } }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jake/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jake/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jake/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/jake/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jake/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/jest": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/core": "^27.5.1", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^27.5.1" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -4925,51 +5471,70 @@ } }, "node_modules/jest-changed-files": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", "execa": "^5.0.0", - "throat": "^6.0.1" + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-changed-files/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/jest-circus": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.5.1", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" + "stack-utils": "^2.0.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-circus/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -4982,8 +5547,9 @@ }, "node_modules/jest-circus/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -4997,8 +5563,9 @@ }, "node_modules/jest-circus/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5008,45 +5575,39 @@ }, "node_modules/jest-circus/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-circus/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/jest-circus/node_modules/pretty-format": { - "version": "27.5.1", + "node_modules/jest-circus/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "yocto-queue": "^0.1.0" }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-circus/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/jest-circus/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5055,28 +5616,28 @@ } }, "node_modules/jest-cli": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/core": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "prompts": "^2.0.1", - "yargs": "^16.2.0" + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -5089,8 +5650,9 @@ }, "node_modules/jest-cli/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5103,8 +5665,9 @@ }, "node_modules/jest-cli/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5118,8 +5681,9 @@ }, "node_modules/jest-cli/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5129,21 +5693,24 @@ }, "node_modules/jest-cli/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-cli/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-cli/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5152,42 +5719,45 @@ } }, "node_modules/jest-config": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.5.1", - "@jest/types": "^27.5.1", - "babel-jest": "^27.5.1", + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", - "glob": "^7.1.1", + "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-jasmine2": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^27.5.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { + "@types/node": "*", "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, "ts-node": { "optional": true } @@ -5195,8 +5765,9 @@ }, "node_modules/jest-config/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5209,8 +5780,9 @@ }, "node_modules/jest-config/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5224,8 +5796,9 @@ }, "node_modules/jest-config/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5235,45 +5808,24 @@ }, "node_modules/jest-config/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-config/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/jest-config/node_modules/pretty-format": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-config/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-config/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5282,23 +5834,25 @@ } }, "node_modules/jest-diff": { - "version": "26.6.2", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-diff/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5311,8 +5865,9 @@ }, "node_modules/jest-diff/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5326,8 +5881,9 @@ }, "node_modules/jest-diff/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5337,29 +5893,24 @@ }, "node_modules/jest-diff/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-diff/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/jest-diff/node_modules/jest-get-type": { - "version": "26.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.14.2" - } - }, "node_modules/jest-diff/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5368,35 +5919,38 @@ } }, "node_modules/jest-docblock": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, - "license": "MIT", "dependencies": { "detect-newline": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-each": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-each/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5409,8 +5963,9 @@ }, "node_modules/jest-each/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5424,8 +5979,9 @@ }, "node_modules/jest-each/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5435,287 +5991,142 @@ }, "node_modules/jest-each/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-each/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/jest-each/node_modules/pretty-format": { - "version": "27.5.1", + "node_modules/jest-each/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "has-flag": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=8" } }, - "node_modules/jest-each/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", + "node_modules/jest-environment-jsdom": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", + "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-each/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-environment-jsdom": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1", - "jsdom": "^16.6.0" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0", + "jsdom": "^20.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } } }, "node_modules/jest-environment-node": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "license": "MIT", "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", - "@types/graceful-fs": "^4.1.2", + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^27.5.1", - "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", - "walker": "^1.0.7" + "walker": "^1.0.8" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "optionalDependencies": { "fsevents": "^2.3.2" } }, - "node_modules/jest-jasmine2": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-jasmine2/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-jasmine2/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jest-jasmine2/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-jasmine2/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-jasmine2/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-jasmine2/node_modules/pretty-format": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-jasmine2/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-jasmine2/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-leak-detector": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-leak-detector/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-leak-detector/node_modules/pretty-format": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, - "license": "MIT", "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5728,8 +6139,9 @@ }, "node_modules/jest-matcher-utils/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5743,8 +6155,9 @@ }, "node_modules/jest-matcher-utils/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5754,67 +6167,24 @@ }, "node_modules/jest-matcher-utils/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-matcher-utils/node_modules/diff-sequences": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-matcher-utils/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/jest-matcher-utils/node_modules/jest-diff": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/pretty-format": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-matcher-utils/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5823,28 +6193,30 @@ } }, "node_modules/jest-message-util": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -5857,8 +6229,9 @@ }, "node_modules/jest-message-util/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -5872,8 +6245,9 @@ }, "node_modules/jest-message-util/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -5883,45 +6257,24 @@ }, "node_modules/jest-message-util/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-message-util/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/jest-message-util/node_modules/pretty-format": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-message-util/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-message-util/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5930,21 +6283,24 @@ } }, "node_modules/jest-mock": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*" + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-pnp-resolver": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -5958,50 +6314,52 @@ } }, "node_modules/jest-regex-util": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, - "license": "MIT", "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve-dependencies": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-snapshot": "^27.5.1" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6014,8 +6372,9 @@ }, "node_modules/jest-resolve/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6029,8 +6388,9 @@ }, "node_modules/jest-resolve/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6040,21 +6400,24 @@ }, "node_modules/jest-resolve/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-resolve/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-resolve/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6063,40 +6426,42 @@ } }, "node_modules/jest-runner": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/console": "^27.5.1", - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.8.1", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-leak-detector": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6109,8 +6474,9 @@ }, "node_modules/jest-runner/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6124,8 +6490,9 @@ }, "node_modules/jest-runner/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6135,21 +6502,49 @@ }, "node_modules/jest-runner/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-runner/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/jest-runner/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/jest-runner/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6158,41 +6553,43 @@ } }, "node_modules/jest-runtime": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/globals": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runtime/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6205,8 +6602,9 @@ }, "node_modules/jest-runtime/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6220,8 +6618,9 @@ }, "node_modules/jest-runtime/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6231,21 +6630,24 @@ }, "node_modules/jest-runtime/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-runtime/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-runtime/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6253,54 +6655,42 @@ "node": ">=8" } }, - "node_modules/jest-serializer": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, "node_modules/jest-snapshot": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/core": "^7.7.2", + "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.5.1", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^27.5.1", - "semver": "^7.3.2" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-snapshot/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6313,8 +6703,9 @@ }, "node_modules/jest-snapshot/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6328,8 +6719,9 @@ }, "node_modules/jest-snapshot/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6339,81 +6731,24 @@ }, "node_modules/jest-snapshot/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/jest-snapshot/node_modules/diff-sequences": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-snapshot/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/jest-snapshot/node_modules/jest-diff": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/lru-cache": { - "version": "6.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-snapshot/node_modules/pretty-format": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.3.8", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -6423,8 +6758,9 @@ }, "node_modules/jest-snapshot/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6432,17 +6768,13 @@ "node": ">=8" } }, - "node_modules/jest-snapshot/node_modules/yallist": { - "version": "4.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/jest-util": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -6450,13 +6782,14 @@ "picomatch": "^2.2.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-util/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6469,8 +6802,9 @@ }, "node_modules/jest-util/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6484,8 +6818,9 @@ }, "node_modules/jest-util/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6495,21 +6830,24 @@ }, "node_modules/jest-util/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-util/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-util/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6518,25 +6856,27 @@ } }, "node_modules/jest-validate": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^27.5.1" + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-validate/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6549,8 +6889,9 @@ }, "node_modules/jest-validate/node_modules/camelcase": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -6560,8 +6901,9 @@ }, "node_modules/jest-validate/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6575,8 +6917,9 @@ }, "node_modules/jest-validate/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6586,45 +6929,24 @@ }, "node_modules/jest-validate/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-validate/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/jest-validate/node_modules/pretty-format": { - "version": "27.5.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-validate/node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-validate/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6633,26 +6955,29 @@ } }, "node_modules/jest-watcher": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, - "license": "MIT", "dependencies": { - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.5.1", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-watcher/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -6665,8 +6990,9 @@ }, "node_modules/jest-watcher/node_modules/chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6680,8 +7006,9 @@ }, "node_modules/jest-watcher/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -6691,21 +7018,24 @@ }, "node_modules/jest-watcher/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/jest-watcher/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-watcher/node_modules/supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6714,30 +7044,34 @@ } }, "node_modules/jest-worker": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker/node_modules/has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -6766,40 +7100,40 @@ } }, "node_modules/jsdom": { - "version": "16.7.0", + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", + "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", "dev": true, - "license": "MIT", "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", + "abab": "^2.0.6", + "acorn": "^8.8.1", + "acorn-globals": "^7.0.0", + "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", + "data-urls": "^3.0.2", + "decimal.js": "^10.4.2", + "domexception": "^4.0.0", "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", + "nwsapi": "^2.2.2", + "parse5": "^7.1.1", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" + "tough-cookie": "^4.1.2", + "w3c-xmlserializer": "^4.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0", + "ws": "^8.11.0", + "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" }, "peerDependencies": { "canvas": "^2.5.0" @@ -6811,9 +7145,10 @@ } }, "node_modules/jsdom/node_modules/acorn": { - "version": "8.8.2", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -6822,20 +7157,22 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", "dev": true, - "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -6873,16 +7210,18 @@ }, "node_modules/kleur": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/leven": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -6902,8 +7241,9 @@ }, "node_modules/lines-and-columns": { "version": "1.2.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true }, "node_modules/locate-path": { "version": "5.0.0", @@ -6916,16 +7256,17 @@ "node": ">=8" } }, - "node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.debounce": { "version": "4.0.8", "dev": true, "license": "MIT" }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "dev": true, @@ -6968,10 +7309,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "node_modules/makeerror": { "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "tmpl": "1.0.5" } @@ -7003,16 +7351,18 @@ }, "node_modules/mime-db": { "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, - "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -7022,8 +7372,9 @@ }, "node_modules/mimic-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -7089,26 +7440,30 @@ }, "node_modules/node-int64": { "version": "0.4.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true }, "node_modules/node-releases": { - "version": "2.0.10", - "dev": true, - "license": "MIT" + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true }, "node_modules/normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/npm-run-path": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, @@ -7117,9 +7472,10 @@ } }, "node_modules/nwsapi": { - "version": "2.2.2", - "dev": true, - "license": "MIT" + "version": "2.2.13", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.13.tgz", + "integrity": "sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==", + "dev": true }, "node_modules/once": { "version": "1.4.0", @@ -7131,8 +7487,9 @@ }, "node_modules/onetime": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, - "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, @@ -7207,8 +7564,9 @@ }, "node_modules/parse-json": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -7223,9 +7581,16 @@ } }, "node_modules/parse5": { - "version": "6.0.1", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", + "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", "dev": true, - "license": "MIT" + "dependencies": { + "entities": "^4.5.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } }, "node_modules/path-exists": { "version": "4.0.0", @@ -7265,9 +7630,10 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "dev": true, - "license": "ISC" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", @@ -7281,9 +7647,10 @@ } }, "node_modules/pirates": { - "version": "4.0.5", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 6" } @@ -7309,104 +7676,29 @@ } }, "node_modules/pretty-format": { - "version": "26.6.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/pretty-format/node_modules/@jest/types": { - "version": "26.6.2", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, - "license": "MIT", "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/pretty-format/node_modules/@types/yargs": { - "version": "15.0.15", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/pretty-format/node_modules/chalk": { - "version": "4.1.2", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/pretty-format/node_modules/color-convert": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/pretty-format/node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/pretty-format/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-format/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/progress": { @@ -7420,8 +7712,9 @@ }, "node_modules/prompts": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, - "license": "MIT", "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" @@ -7432,8 +7725,9 @@ }, "node_modules/psl": { "version": "1.9.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true }, "node_modules/punycode": { "version": "2.3.0", @@ -7443,10 +7737,27 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/querystringify": { "version": "2.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -7476,9 +7787,10 @@ } }, "node_modules/react-is": { - "version": "17.0.2", - "dev": true, - "license": "MIT" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true }, "node_modules/regenerate": { "version": "1.4.2", @@ -7555,8 +7867,9 @@ }, "node_modules/require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -7572,8 +7885,9 @@ }, "node_modules/requires-port": { "version": "1.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true }, "node_modules/resolve": { "version": "1.22.1", @@ -7593,8 +7907,9 @@ }, "node_modules/resolve-cwd": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, - "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -7611,9 +7926,10 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.1", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } @@ -7631,6 +7947,7 @@ "version": "3.0.2", "dev": true, "license": "ISC", + "peer": true, "dependencies": { "glob": "^7.1.3" }, @@ -7802,18 +8119,20 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "node_modules/saxes": { - "version": "5.0.1", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, - "license": "ISC", "dependencies": { "xmlchars": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=v12.22.7" } }, "node_modules/semver": { @@ -7853,13 +8172,15 @@ }, "node_modules/signal-exit": { "version": "3.0.7", - "dev": true, - "license": "ISC" + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/sisteransi": { "version": "1.0.5", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true }, "node_modules/slash": { "version": "3.0.0", @@ -7948,8 +8269,9 @@ }, "node_modules/stack-utils": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, - "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -7959,16 +8281,18 @@ }, "node_modules/stack-utils/node_modules/escape-string-regexp": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/string-length": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, - "license": "MIT", "dependencies": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" @@ -8003,16 +8327,18 @@ }, "node_modules/strip-bom": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/strip-final-newline": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -8039,37 +8365,6 @@ "node": ">=4" } }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "dev": true, @@ -8083,8 +8378,9 @@ }, "node_modules/symbol-tree": { "version": "3.2.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true }, "node_modules/table": { "version": "6.8.1", @@ -8124,21 +8420,6 @@ "license": "MIT", "peer": true }, - "node_modules/terminal-link": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/terser": { "version": "5.16.5", "dev": true, @@ -8186,15 +8467,11 @@ "license": "MIT", "peer": true }, - "node_modules/throat": { - "version": "6.0.2", - "dev": true, - "license": "MIT" - }, "node_modules/tmpl": { "version": "1.0.5", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true }, "node_modules/to-fast-properties": { "version": "2.0.0", @@ -8216,9 +8493,10 @@ } }, "node_modules/tough-cookie": { - "version": "4.1.2", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -8231,21 +8509,83 @@ }, "node_modules/tough-cookie/node_modules/universalify": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4.0.0" } }, "node_modules/tr46": { - "version": "2.1.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, - "license": "MIT", "dependencies": { "punycode": "^2.1.1" }, "engines": { - "node": ">=8" + "node": ">=12" + } + }, + "node_modules/ts-jest": { + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", + "dev": true, + "dependencies": { + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "bin": { + "ts-jest": "cli.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/tslib": { @@ -8286,16 +8626,18 @@ }, "node_modules/type-detect": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/type-fest": { "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -8303,14 +8645,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", @@ -8369,7 +8703,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.10", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dev": true, "funding": [ { @@ -8379,15 +8715,18 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -8404,8 +8743,9 @@ }, "node_modules/url-parse": { "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, - "license": "MIT", "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -8420,59 +8760,46 @@ "is-arguments": "^1.0.4", "is-generator-function": "^1.0.7", "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/v8-to-istanbul": { - "version": "8.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/v8-to-istanbul/node_modules/source-map": { - "version": "0.7.4", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">= 8" + "which-typed-array": "^1.1.2" } }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", + "node_modules/v8-compile-cache": { + "version": "2.3.0", "dev": true, "license": "MIT", + "peer": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, "dependencies": { - "browser-process-hrtime": "^1.0.0" + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" } }, "node_modules/w3c-xmlserializer": { - "version": "2.0.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", "dev": true, - "license": "MIT", "dependencies": { - "xml-name-validator": "^3.0.0" + "xml-name-validator": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=14" } }, "node_modules/walker": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, - "license": "Apache-2.0", "dependencies": { "makeerror": "1.0.12" } @@ -8486,37 +8813,46 @@ } }, "node_modules/webidl-conversions": { - "version": "6.1.0", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true, - "license": "BSD-2-Clause", "engines": { - "node": ">=10.4" + "node": ">=12" } }, "node_modules/whatwg-encoding": { - "version": "1.0.5", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dev": true, - "license": "MIT", "dependencies": { - "iconv-lite": "0.4.24" + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" } }, "node_modules/whatwg-mimetype": { - "version": "2.3.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=12" + } }, "node_modules/whatwg-url": { - "version": "8.7.0", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, - "license": "MIT", "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/which": { @@ -8556,14 +8892,16 @@ "version": "1.2.3", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } }, "node_modules/wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -8578,8 +8916,9 @@ }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -8592,8 +8931,9 @@ }, "node_modules/wrap-ansi/node_modules/color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -8603,8 +8943,9 @@ }, "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/wrappy": { "version": "1.0.2", @@ -8612,26 +8953,29 @@ "license": "ISC" }, "node_modules/write-file-atomic": { - "version": "3.0.3", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, - "license": "ISC", "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/ws": { - "version": "7.5.9", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, - "license": "MIT", "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -8643,19 +8987,25 @@ } }, "node_modules/xml-name-validator": { - "version": "3.0.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true, - "license": "Apache-2.0" + "engines": { + "node": ">=12" + } }, "node_modules/xmlchars": { "version": "2.2.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true }, "node_modules/y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } @@ -8666,34 +9016,48 @@ "license": "ISC" }, "node_modules/yargs": { - "version": "16.2.0", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "license": "MIT", "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.9", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "ISC", "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yet-another-abortcontroller-polyfill": { "version": "0.0.4", "dev": true, "license": "MIT" + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { @@ -8706,54 +9070,73 @@ } }, "@babel/code-frame": { - "version": "7.18.6", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", + "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", "dev": true, "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.25.7", + "picocolors": "^1.0.0" } }, "@babel/compat-data": { - "version": "7.21.0", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.8.tgz", + "integrity": "sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==", "dev": true }, "@babel/core": { - "version": "7.21.0", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.8.tgz", + "integrity": "sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==", "dev": true, "requires": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.0", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.21.0", - "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.0", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0", - "convert-source-map": "^1.7.0", + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/helper-compilation-targets": "^7.25.7", + "@babel/helper-module-transforms": "^7.25.7", + "@babel/helpers": "^7.25.7", + "@babel/parser": "^7.25.8", + "@babel/template": "^7.25.7", + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.8", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } } }, "@babel/generator": { - "version": "7.21.1", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", + "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", "dev": true, "requires": { - "@babel/types": "^7.21.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/types": "^7.25.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" }, "dependencies": { "@jridgewell/gen-mapping": { - "version": "0.3.2", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" } } } @@ -8774,14 +9157,24 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.20.7", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", + "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", "dev": true, "requires": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", + "@babel/compat-data": "^7.25.7", + "@babel/helper-validator-option": "^7.25.7", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "semver": "^6.3.1" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } } }, "@babel/helper-create-class-features-plugin": { @@ -8852,24 +9245,25 @@ } }, "@babel/helper-module-imports": { - "version": "7.18.6", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", + "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" } }, "@babel/helper-module-transforms": { - "version": "7.21.2", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", + "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.2", - "@babel/types": "^7.21.2" + "@babel/helper-module-imports": "^7.25.7", + "@babel/helper-simple-access": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", + "@babel/traverse": "^7.25.7" } }, "@babel/helper-optimise-call-expression": { @@ -8880,7 +9274,9 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.20.2", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", + "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", "dev": true }, "@babel/helper-remap-async-to-generator": { @@ -8906,10 +9302,13 @@ } }, "@babel/helper-simple-access": { - "version": "7.20.2", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", + "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", "dev": true, "requires": { - "@babel/types": "^7.20.2" + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" } }, "@babel/helper-skip-transparent-expression-wrappers": { @@ -8927,15 +9326,21 @@ } }, "@babel/helper-string-parser": { - "version": "7.19.4", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", + "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.19.1", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", + "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.21.0", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", + "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", "dev": true }, "@babel/helper-wrap-function": { @@ -8949,26 +9354,35 @@ } }, "@babel/helpers": { - "version": "7.21.0", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", + "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", "dev": true, "requires": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0" + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7" } }, "@babel/highlight": { - "version": "7.18.6", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", + "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.25.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" } }, "@babel/parser": { - "version": "7.21.2", - "dev": true + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", + "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", + "dev": true, + "requires": { + "@babel/types": "^7.25.8" + } }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", @@ -9124,6 +9538,8 @@ }, "@babel/plugin-syntax-bigint": { "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" @@ -9164,8 +9580,19 @@ "@babel/helper-plugin-utils": "^7.19.0" } }, + "@babel/plugin-syntax-import-attributes": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.7.tgz", + "integrity": "sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.25.7" + } + }, "@babel/plugin-syntax-import-meta": { "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" @@ -9178,6 +9605,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-jsx": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.7.tgz", + "integrity": "sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.25.7" + } + }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "dev": true, @@ -9613,41 +10049,46 @@ } }, "@babel/template": { - "version": "7.20.7", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", + "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/types": "^7.25.7" } }, "@babel/traverse": { - "version": "7.21.2", + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", + "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.1", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.2", - "@babel/types": "^7.21.2", - "debug": "^4.1.0", + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7", + "debug": "^4.3.1", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.21.2", + "version": "7.25.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", + "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", "to-fast-properties": "^2.0.0" } }, "@bcoe/v8-coverage": { "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, "@eslint/eslintrc": { @@ -9717,19 +10158,23 @@ "dev": true }, "@jest/console": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "requires": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -9737,6 +10182,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -9745,6 +10192,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -9752,14 +10201,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -9768,41 +10223,45 @@ } }, "@jest/core": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "requires": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.8.1", + "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "rimraf": "^3.0.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -9810,6 +10269,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -9818,6 +10279,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -9825,14 +10288,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -9841,69 +10310,98 @@ } }, "@jest/environment": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "requires": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^27.5.1" + "jest-mock": "^29.7.0" + } + }, + "@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "requires": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + } + }, + "@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "requires": { + "jest-get-type": "^29.6.3" } }, "@jest/fake-timers": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "requires": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "@jest/globals": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "requires": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" } }, "@jest/reporters": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "glob": "^7.1.2", + "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", - "source-map": "^0.6.0", "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -9911,6 +10409,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -9919,6 +10419,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -9926,14 +10428,39 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "requires": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + } + }, + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -9941,58 +10468,77 @@ } } }, + "@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.27.8" + } + }, "@jest/source-map": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "requires": { + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" + "graceful-fs": "^4.2.9" } }, "@jest/test-result": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "requires": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "requires": { - "@jest/test-result": "^27.5.1", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" } }, "@jest/transform": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "write-file-atomic": "^4.0.2" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -10000,6 +10546,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -10008,6 +10556,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -10015,14 +10565,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -10031,18 +10587,23 @@ } }, "@jest/types": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "requires": { + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^16.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -10050,6 +10611,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -10058,6 +10621,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -10065,14 +10630,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -10093,7 +10664,9 @@ "dev": true }, "@jridgewell/set-array": { - "version": "1.1.2", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true }, "@jridgewell/source-map": { @@ -10120,11 +10693,13 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.17", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@nodelib/fs.scandir": { @@ -10195,22 +10770,34 @@ } } }, + "@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, "@sinonjs/commons": { - "version": "1.8.6", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/fake-timers": { - "version": "8.1.0", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "@tootallnate/once": { - "version": "1.1.2", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true }, "@types/babel__core": { @@ -10259,36 +10846,57 @@ "dev": true }, "@types/graceful-fs": { - "version": "4.1.6", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "requires": { "@types/node": "*" } }, "@types/istanbul-lib-coverage": { - "version": "2.0.4", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "@types/istanbul-lib-report": { - "version": "3.0.0", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "*" } }, "@types/istanbul-reports": { - "version": "3.0.1", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "requires": { "@types/istanbul-lib-report": "*" } }, "@types/jest": { - "version": "26.0.24", + "version": "29.5.13", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.13.tgz", + "integrity": "sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==", + "dev": true, + "requires": { + "expect": "^29.0.0", + "pretty-format": "^29.0.0" + } + }, + "@types/jsdom": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", + "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", "dev": true, "requires": { - "jest-diff": "^26.0.0", - "pretty-format": "^26.0.0" + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" } }, "@types/json-schema": { @@ -10299,10 +10907,6 @@ "version": "18.14.1", "dev": true }, - "@types/prettier": { - "version": "2.7.2", - "dev": true - }, "@types/prop-types": { "version": "15.7.5", "dev": true @@ -10328,18 +10932,30 @@ "dev": true }, "@types/stack-utils": { - "version": "2.0.1", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", "dev": true }, "@types/yargs": { - "version": "16.0.5", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, "requires": { "@types/yargs-parser": "*" } }, "@types/yargs-parser": { - "version": "21.0.0", + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, "@typescript-eslint/eslint-plugin": { @@ -10452,30 +11068,42 @@ } }, "@urbit/aura": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@urbit/aura/-/aura-1.0.0.tgz", - "integrity": "sha512-IeP3uoDzZ0Rpn345auXK0y/BCcXTmpgAlOPbgf7n4eD35h56OnSoit1kuXKA21sWE19gFjK/wqZcz5ULjz2ADg==", - "requires": {} + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@urbit/aura/-/aura-2.0.1.tgz", + "integrity": "sha512-B1ZTwsEVqi/iybxjHlY3gBz7r4Xd7n9pwi9NY6V+7r4DksqBYBpfzdqWGUXgZ0x67IW8AOGjC73tkTOclNMhUg==" }, "@urbit/nockjs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@urbit/nockjs/-/nockjs-1.1.0.tgz", - "integrity": "sha512-tx+Nd3w4mKQD1updXLJe71aWn4Kt8FzTtypASi1FF9JelbhW+fHwlP7yQ8tTm6JqNHkhZ9B+4RO/M8hjjsbgvA==" + "version": "1.4.0-dev2", + "resolved": "https://registry.npmjs.org/@urbit/nockjs/-/nockjs-1.4.0-dev2.tgz", + "integrity": "sha512-/QjriD33bkp88Z5TEXPNeoZL+Oc6FbFVe4zphvyBdsURtNpcCO27qavqyEb1ywuAT5czH9uByzwo2NXCzGoS6g==" }, "abab": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "dev": true }, "acorn": { "version": "7.4.1", - "dev": true + "dev": true, + "peer": true }, "acorn-globals": { - "version": "6.0.0", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-7.0.1.tgz", + "integrity": "sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" + "acorn": "^8.1.0", + "acorn-walk": "^8.0.2" + }, + "dependencies": { + "acorn": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", + "dev": true + } } }, "acorn-jsx": { @@ -10485,11 +11113,26 @@ "requires": {} }, "acorn-walk": { - "version": "7.2.0", - "dev": true + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "requires": { + "acorn": "^8.11.0" + }, + "dependencies": { + "acorn": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", + "dev": true + } + } }, "agent-base": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "requires": { "debug": "4" @@ -10513,6 +11156,8 @@ }, "ansi-escapes": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "requires": { "type-fest": "^0.21.3" @@ -10531,6 +11176,8 @@ }, "anymatch": { "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -10553,8 +11200,16 @@ "dev": true, "peer": true }, + "async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true + }, "asynckit": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, "available-typed-arrays": { @@ -10562,14 +11217,15 @@ "dev": true }, "babel-jest": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "requires": { - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.5.1", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" @@ -10626,12 +11282,14 @@ } }, "babel-plugin-jest-hoist": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "requires": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", + "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" } }, @@ -10660,28 +11318,35 @@ } }, "babel-preset-current-node-syntax": { - "version": "1.0.1", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, "requires": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" } }, "babel-preset-jest": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^27.5.1", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -10689,12 +11354,6 @@ "version": "1.0.2", "dev": true }, - "big-integer": { - "version": "1.6.51", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", - "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", - "peer": true - }, "brace-expansion": { "version": "1.1.11", "dev": true, @@ -10713,22 +11372,31 @@ "browser-or-node": { "version": "1.3.0" }, - "browser-process-hrtime": { - "version": "1.0.0", - "dev": true - }, "browserslist": { - "version": "4.21.5", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.1" + } + }, + "bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" + "fast-json-stable-stringify": "2.x" } }, "bser": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, "requires": { "node-int64": "^0.4.0" @@ -10759,7 +11427,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001458", + "version": "1.0.30001669", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", + "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", "dev": true }, "chalk": { @@ -10773,31 +11443,43 @@ }, "char-regex": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, "ci-info": { - "version": "3.8.0", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true }, "cjs-module-lexer": { - "version": "1.2.2", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", "dev": true }, "cliui": { - "version": "7.0.4", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "co": { "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true }, "collect-v8-coverage": { - "version": "1.0.1", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "color-convert": { @@ -10813,6 +11495,8 @@ }, "combined-stream": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { "delayed-stream": "~1.0.0" @@ -10831,7 +11515,9 @@ "dev": true }, "convert-source-map": { - "version": "1.9.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, "core-js": { @@ -10844,6 +11530,72 @@ "browserslist": "^4.21.5" } }, + "create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "cross-fetch": { "version": "3.1.5", "dev": true, @@ -10861,11 +11613,15 @@ } }, "cssom": { - "version": "0.4.4", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.5.0.tgz", + "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==", "dev": true }, "cssstyle": { "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, "requires": { "cssom": "~0.3.6" @@ -10873,6 +11629,8 @@ "dependencies": { "cssom": { "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true } } @@ -10882,12 +11640,14 @@ "dev": true }, "data-urls": { - "version": "2.0.0", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", + "integrity": "sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==", "dev": true, "requires": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" + "abab": "^2.0.6", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0" } }, "debug": { @@ -10899,15 +11659,21 @@ }, "decimal.js": { "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", "dev": true }, "dedent": { - "version": "0.7.0", - "dev": true + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "requires": {} }, "deep-is": { "version": "0.1.4", - "dev": true + "dev": true, + "peer": true }, "deepmerge": { "version": "4.3.0", @@ -10915,14 +11681,20 @@ }, "delayed-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, "detect-newline": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, "diff-sequences": { - "version": "26.6.2", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true }, "dir-glob": { @@ -10941,24 +11713,33 @@ } }, "domexception": { - "version": "2.0.1", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", + "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", "dev": true, "requires": { - "webidl-conversions": "^5.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "5.0.0", - "dev": true - } + "webidl-conversions": "^7.0.0" + } + }, + "ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "requires": { + "jake": "^10.8.5" } }, "electron-to-chromium": { - "version": "1.4.311", + "version": "1.5.42", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.42.tgz", + "integrity": "sha512-gIfKavKDw1mhvic9nbzA5lZw8QSHpdMwLwXc0cWidQz9B15pDoDdDH4boIatuFfeoCatb3a/NGL6CYRVFxGZ9g==", "dev": true }, "emittery": { - "version": "0.8.1", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true }, "emoji-regex": { @@ -10973,15 +11754,25 @@ "ansi-colors": "^4.1.1" } }, + "entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true + }, "error-ex": { "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { "is-arrayish": "^0.2.1" } }, "escalade": { - "version": "3.1.1", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true }, "escape-string-regexp": { @@ -10989,50 +11780,22 @@ "dev": true }, "escodegen": { - "version": "2.0.0", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dev": true, "requires": { "esprima": "^4.0.1", "estraverse": "^5.2.0", "esutils": "^2.0.2", - "optionator": "^0.8.1", "source-map": "~0.6.1" }, "dependencies": { "estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true - }, - "levn": { - "version": "0.3.0", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } } } }, @@ -11281,6 +12044,8 @@ }, "execa": { "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "requires": { "cross-spawn": "^7.0.3", @@ -11296,16 +12061,21 @@ }, "exit": { "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true }, "expect": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "requires": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" } }, "fast-deep-equal": { @@ -11330,7 +12100,8 @@ }, "fast-levenshtein": { "version": "2.0.6", - "dev": true + "dev": true, + "peer": true }, "fast-text-encoding": { "version": "1.0.6", @@ -11345,6 +12116,8 @@ }, "fb-watchman": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, "requires": { "bser": "2.1.1" @@ -11358,6 +12131,35 @@ "flat-cache": "^3.0.4" } }, + "filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "requires": { + "minimatch": "^5.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "fill-range": { "version": "7.0.1", "dev": true, @@ -11404,7 +12206,9 @@ } }, "form-data": { - "version": "3.0.1", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dev": true, "requires": { "asynckit": "^0.4.0", @@ -11425,6 +12229,13 @@ "version": "1.0.0", "dev": true }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "dev": true @@ -11439,6 +12250,8 @@ }, "get-caller-file": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-intrinsic": { @@ -11456,6 +12269,8 @@ }, "get-stream": { "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true }, "glob": { @@ -11527,27 +12342,35 @@ } }, "html-encoding-sniffer": { - "version": "2.0.1", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", + "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", "dev": true, "requires": { - "whatwg-encoding": "^1.0.5" + "whatwg-encoding": "^2.0.0" } }, "html-escaper": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, "http-proxy-agent": { - "version": "4.0.1", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, "requires": { - "@tootallnate/once": "1", + "@tootallnate/once": "2", "agent-base": "6", "debug": "4" } }, "https-proxy-agent": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "requires": { "agent-base": "6", @@ -11556,13 +12379,17 @@ }, "human-signals": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, "iconv-lite": { - "version": "0.4.24", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "ignore": { @@ -11586,7 +12413,9 @@ } }, "import-local": { - "version": "3.1.0", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "requires": { "pkg-dir": "^4.2.0", @@ -11619,6 +12448,8 @@ }, "is-arrayish": { "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, "is-builtin-module": { @@ -11649,6 +12480,8 @@ }, "is-generator-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true }, "is-generator-function": { @@ -11675,6 +12508,8 @@ }, "is-potential-custom-element-name": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true }, "is-reference": { @@ -11686,6 +12521,8 @@ }, "is-stream": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, "is-typed-array": { @@ -11699,10 +12536,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-typedarray": { - "version": "1.0.0", - "dev": true - }, "isexe": { "version": "2.0.0", "dev": true @@ -11723,20 +12556,41 @@ } }, "istanbul-lib-report": { - "version": "3.0.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "dependencies": { "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "requires": { + "semver": "^7.5.3" + } + }, + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -11746,6 +12600,8 @@ }, "istanbul-lib-source-maps": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, "requires": { "debug": "^4.1.1", @@ -11754,58 +12610,144 @@ } }, "istanbul-reports": { - "version": "3.1.5", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "requires": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" } }, + "jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "requires": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "jest": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "requires": { - "@jest/core": "^27.5.1", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^27.5.1" + "jest-cli": "^29.7.0" } }, "jest-changed-files": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "requires": { - "@jest/types": "^27.5.1", "execa": "^5.0.0", - "throat": "^6.0.1" + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + } } }, "jest-circus": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "requires": { - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.5.1", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" + "stack-utils": "^2.0.3" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -11813,6 +12755,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -11821,6 +12765,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -11828,29 +12774,29 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "pretty-format": { - "version": "27.5.1", + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } + "yocto-queue": "^0.1.0" } }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -11859,25 +12805,28 @@ } }, "jest-cli": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "requires": { - "@jest/core": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "prompts": "^2.0.1", - "yargs": "^16.2.0" + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -11885,6 +12834,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -11893,6 +12844,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -11900,14 +12853,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -11916,37 +12875,39 @@ } }, "jest-config": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "requires": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.5.1", - "@jest/types": "^27.5.1", - "babel-jest": "^27.5.1", + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", - "glob": "^7.1.1", + "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-jasmine2": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^27.5.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -11954,6 +12915,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -11962,6 +12925,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -11969,29 +12934,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "pretty-format": { - "version": "27.5.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } - } - }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12000,17 +12956,21 @@ } }, "jest-diff": { - "version": "26.6.2", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12018,6 +12978,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12026,6 +12988,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12033,18 +12997,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", - "dev": true - }, - "jest-get-type": { - "version": "26.3.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12053,25 +13019,31 @@ } }, "jest-docblock": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "requires": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12079,6 +13051,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12087,6 +13061,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12094,29 +13070,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "pretty-format": { - "version": "27.5.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } - } - }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12125,165 +13092,87 @@ } }, "jest-environment-jsdom": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", + "integrity": "sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==", "dev": true, "requires": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/jsdom": "^20.0.0", "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1", - "jsdom": "^16.6.0" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0", + "jsdom": "^20.0.0" } }, "jest-environment-node": { - "version": "27.5.1", - "dev": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" - } - }, - "jest-get-type": { - "version": "27.5.1", - "dev": true - }, - "jest-haste-map": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "requires": { - "@jest/types": "^27.5.1", - "@types/graceful-fs": "^4.1.2", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^27.5.1", - "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "micromatch": "^4.0.4", - "walker": "^1.0.7" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } - }, - "jest-jasmine2": { - "version": "27.5.1", - "dev": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "throat": "^6.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "dev": true - }, - "pretty-format": { - "version": "27.5.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } - } - }, - "supports-color": { - "version": "7.2.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + }, + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + }, + "jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" } }, "jest-leak-detector": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "requires": { - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - }, - "pretty-format": { - "version": "27.5.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - } - } + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-matcher-utils": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12291,6 +13180,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12299,6 +13190,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12306,43 +13199,20 @@ }, "color-name": { "version": "1.1.4", - "dev": true - }, - "diff-sequences": { - "version": "27.5.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-diff": { - "version": "27.5.1", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - } - }, - "pretty-format": { - "version": "27.5.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } - } - }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12351,22 +13221,26 @@ } }, "jest-message-util": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "requires": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12374,6 +13248,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12382,6 +13258,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12389,29 +13267,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "pretty-format": { - "version": "27.5.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } - } - }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12420,40 +13289,50 @@ } }, "jest-mock": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "requires": { - "@jest/types": "^27.5.1", - "@types/node": "*" + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" } }, "jest-pnp-resolver": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "requires": {} }, "jest-regex-util": { - "version": "27.5.1", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true }, "jest-resolve": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "requires": { - "@jest/types": "^27.5.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12461,6 +13340,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12469,6 +13350,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12476,14 +13359,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12492,43 +13381,48 @@ } }, "jest-resolve-dependencies": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "requires": { - "@jest/types": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-snapshot": "^27.5.1" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" } }, "jest-runner": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "requires": { - "@jest/console": "^27.5.1", - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.8.1", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-leak-detector": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12536,6 +13430,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12544,6 +13440,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12551,14 +13449,39 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12567,35 +13490,39 @@ } }, "jest-runtime": { - "version": "27.5.1", - "dev": true, - "requires": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/globals": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12603,6 +13530,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12611,6 +13540,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12618,14 +13549,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12633,44 +13570,38 @@ } } }, - "jest-serializer": { - "version": "27.5.1", - "dev": true, - "requires": { - "@types/node": "*", - "graceful-fs": "^4.2.9" - } - }, "jest-snapshot": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "requires": { - "@babel/core": "^7.7.2", + "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.5.1", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^27.5.1", - "semver": "^7.3.2" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12678,6 +13609,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12686,6 +13619,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12693,73 +13628,40 @@ }, "color-name": { "version": "1.1.4", - "dev": true - }, - "diff-sequences": { - "version": "27.5.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "jest-diff": { - "version": "27.5.1", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" - } - }, - "lru-cache": { - "version": "6.0.0", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "pretty-format": { - "version": "27.5.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } - } - }, "semver": { - "version": "7.3.8", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" } - }, - "yallist": { - "version": "4.0.0", - "dev": true } } }, "jest-util": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "requires": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -12769,6 +13671,8 @@ "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12776,6 +13680,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12784,6 +13690,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12791,14 +13699,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12807,19 +13721,23 @@ } }, "jest-validate": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "requires": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^27.5.1" + "pretty-format": "^29.7.0" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12827,10 +13745,14 @@ }, "camelcase": { "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12839,6 +13761,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12846,29 +13770,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "pretty-format": { - "version": "27.5.1", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "dev": true - } - } - }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12877,20 +13792,25 @@ } }, "jest-watcher": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "requires": { - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.5.1", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -12898,6 +13818,8 @@ }, "chalk": { "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -12906,6 +13828,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -12913,14 +13837,20 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12929,20 +13859,27 @@ } }, "jest-worker": { - "version": "27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "requires": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, "dependencies": { "has-flag": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -12963,50 +13900,57 @@ } }, "jsdom": { - "version": "16.7.0", + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-20.0.3.tgz", + "integrity": "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==", "dev": true, "requires": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", + "abab": "^2.0.6", + "acorn": "^8.8.1", + "acorn-globals": "^7.0.0", + "cssom": "^0.5.0", "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", + "data-urls": "^3.0.2", + "decimal.js": "^10.4.2", + "domexception": "^4.0.0", "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", + "form-data": "^4.0.0", + "html-encoding-sniffer": "^3.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", + "nwsapi": "^2.2.2", + "parse5": "^7.1.1", + "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" + "tough-cookie": "^4.1.2", + "w3c-xmlserializer": "^4.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^2.0.0", + "whatwg-mimetype": "^3.0.0", + "whatwg-url": "^11.0.0", + "ws": "^8.11.0", + "xml-name-validator": "^4.0.0" }, "dependencies": { "acorn": { - "version": "8.8.2", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", "dev": true } } }, "jsesc": { - "version": "2.5.2", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", "dev": true }, "json-parse-even-better-errors": { "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "json-schema-traverse": { @@ -13033,10 +13977,14 @@ }, "kleur": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, "leven": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true }, "levn": { @@ -13050,6 +13998,8 @@ }, "lines-and-columns": { "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, "locate-path": { @@ -13059,14 +14009,16 @@ "p-locate": "^4.1.0" } }, - "lodash": { - "version": "4.17.21", - "dev": true - }, "lodash.debounce": { "version": "4.0.8", "dev": true }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "lodash.merge": { "version": "4.6.2", "dev": true, @@ -13098,8 +14050,16 @@ "semver": "^6.0.0" } }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "makeerror": { "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, "requires": { "tmpl": "1.0.5" @@ -13123,10 +14083,14 @@ }, "mime-db": { "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true }, "mime-types": { "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { "mime-db": "1.52.0" @@ -13134,6 +14098,8 @@ }, "mimic-fn": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimatch": { @@ -13178,25 +14144,35 @@ }, "node-int64": { "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, "node-releases": { - "version": "2.0.10", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "normalize-path": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "npm-run-path": { "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { "path-key": "^3.0.0" } }, "nwsapi": { - "version": "2.2.2", + "version": "2.2.13", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.13.tgz", + "integrity": "sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==", "dev": true }, "once": { @@ -13208,6 +14184,8 @@ }, "onetime": { "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { "mimic-fn": "^2.1.0" @@ -13254,6 +14232,8 @@ }, "parse-json": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -13263,8 +14243,13 @@ } }, "parse5": { - "version": "6.0.1", - "dev": true + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", + "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", + "dev": true, + "requires": { + "entities": "^4.5.0" + } }, "path-exists": { "version": "4.0.0", @@ -13287,7 +14272,9 @@ "dev": true }, "picocolors": { - "version": "1.0.0", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "picomatch": { @@ -13295,7 +14282,9 @@ "dev": true }, "pirates": { - "version": "4.0.5", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true }, "pkg-dir": { @@ -13311,69 +14300,21 @@ "peer": true }, "pretty-format": { - "version": "26.6.2", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "dependencies": { - "@jest/types": { - "version": "26.6.2", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "15.0.15", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, "ansi-styles": { - "version": "4.3.0", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "dev": true - }, - "has-flag": { - "version": "4.0.0", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true - }, - "supports-color": { - "version": "7.2.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } } } }, @@ -13384,6 +14325,8 @@ }, "prompts": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, "requires": { "kleur": "^3.0.3", @@ -13392,14 +14335,24 @@ }, "psl": { "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, "punycode": { "version": "2.3.0", "dev": true }, + "pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true + }, "querystringify": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, "queue-microtask": { @@ -13414,7 +14367,9 @@ } }, "react-is": { - "version": "17.0.2", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "regenerate": { @@ -13469,6 +14424,8 @@ }, "require-directory": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, "require-from-string": { @@ -13478,6 +14435,8 @@ }, "requires-port": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", "dev": true }, "resolve": { @@ -13491,6 +14450,8 @@ }, "resolve-cwd": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "requires": { "resolve-from": "^5.0.0" @@ -13501,7 +14462,9 @@ "dev": true }, "resolve.exports": { - "version": "1.1.1", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true }, "reusify": { @@ -13511,6 +14474,7 @@ "rimraf": { "version": "3.0.2", "dev": true, + "peer": true, "requires": { "glob": "^7.1.3" } @@ -13606,10 +14570,14 @@ }, "safer-buffer": { "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "saxes": { - "version": "5.0.1", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "requires": { "xmlchars": "^2.2.0" @@ -13639,10 +14607,14 @@ }, "signal-exit": { "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "sisteransi": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "dev": true }, "slash": { @@ -13704,6 +14676,8 @@ }, "stack-utils": { "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "requires": { "escape-string-regexp": "^2.0.0" @@ -13711,12 +14685,16 @@ "dependencies": { "escape-string-regexp": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true } } }, "string-length": { "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", "dev": true, "requires": { "char-regex": "^1.0.2", @@ -13741,10 +14719,14 @@ }, "strip-bom": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true }, "strip-final-newline": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, "strip-json-comments": { @@ -13758,33 +14740,14 @@ "has-flag": "^3.0.0" } }, - "supports-hyperlinks": { - "version": "2.3.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "dev": true }, "symbol-tree": { "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, "table": { @@ -13817,14 +14780,6 @@ } } }, - "terminal-link": { - "version": "2.1.1", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } - }, "terser": { "version": "5.16.5", "dev": true, @@ -13855,12 +14810,10 @@ "dev": true, "peer": true }, - "throat": { - "version": "6.0.2", - "dev": true - }, "tmpl": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, "to-fast-properties": { @@ -13875,7 +14828,9 @@ } }, "tough-cookie": { - "version": "4.1.2", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "requires": { "psl": "^1.1.33", @@ -13886,17 +14841,46 @@ "dependencies": { "universalify": { "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", "dev": true } } }, "tr46": { - "version": "2.1.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, "requires": { "punycode": "^2.1.1" } }, + "ts-jest": { + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", + "dev": true, + "requires": { + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" + }, + "dependencies": { + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true + } + } + }, "tslib": { "version": "2.5.0", "dev": true @@ -13924,19 +14908,16 @@ }, "type-detect": { "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, "type-fest": { "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true }, - "typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, "typescript": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", @@ -13968,11 +14949,13 @@ "dev": true }, "update-browserslist-db": { - "version": "1.0.10", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dev": true, "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" } }, "uri-js": { @@ -13985,6 +14968,8 @@ }, "url-parse": { "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, "requires": { "querystringify": "^2.1.1", @@ -14008,36 +14993,29 @@ "peer": true }, "v8-to-istanbul": { - "version": "8.1.1", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "requires": { + "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.4", - "dev": true - } - } - }, - "w3c-hr-time": { - "version": "1.0.2", - "dev": true, - "requires": { - "browser-process-hrtime": "^1.0.0" + "convert-source-map": "^2.0.0" } }, "w3c-xmlserializer": { - "version": "2.0.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", + "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", "dev": true, "requires": { - "xml-name-validator": "^3.0.0" + "xml-name-validator": "^4.0.0" } }, "walker": { "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, "requires": { "makeerror": "1.0.12" @@ -14048,27 +15026,34 @@ "dev": true }, "webidl-conversions": { - "version": "6.1.0", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true }, "whatwg-encoding": { - "version": "1.0.5", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", "dev": true, "requires": { - "iconv-lite": "0.4.24" + "iconv-lite": "0.6.3" } }, "whatwg-mimetype": { - "version": "2.3.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", "dev": true }, "whatwg-url": { - "version": "8.7.0", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, "requires": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" } }, "which": { @@ -14092,10 +15077,13 @@ }, "word-wrap": { "version": "1.2.3", - "dev": true + "dev": true, + "peer": true }, "wrap-ansi": { "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "requires": { "ansi-styles": "^4.0.0", @@ -14105,6 +15093,8 @@ "dependencies": { "ansi-styles": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { "color-convert": "^2.0.1" @@ -14112,6 +15102,8 @@ }, "color-convert": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { "color-name": "~1.1.4" @@ -14119,6 +15111,8 @@ }, "color-name": { "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true } } @@ -14128,30 +15122,38 @@ "dev": true }, "write-file-atomic": { - "version": "3.0.3", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, "requires": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^3.0.7" } }, "ws": { - "version": "7.5.9", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, "requires": {} }, "xml-name-validator": { - "version": "3.0.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", + "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", "dev": true }, "xmlchars": { "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, "y18n": { "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, "yallist": { @@ -14159,25 +15161,35 @@ "dev": true }, "yargs": { - "version": "16.2.0", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "requires": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" } }, "yargs-parser": { - "version": "20.2.9", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true }, "yet-another-abortcontroller-polyfill": { "version": "0.0.4", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 4bb31da..6536327 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@urbit/aura": "^2.0.0", - "@urbit/nockjs": "^1.1.0", + "@urbit/nockjs": "^1.4.0-dev2", "browser-or-node": "^1.3.0", "core-js": "^3.19.1" } diff --git a/src/Urbit.ts b/src/Urbit.ts index 470ed70..195cdeb 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -1,33 +1,32 @@ +import { formatUw, parseUw, patp2dec } from '@urbit/aura'; +import { Atom, Cell, Noun, cue, dejs, enjs, jam } from '@urbit/nockjs'; import { isBrowser } from 'browser-or-node'; -import { UrbitHttpApiEvent, UrbitHttpApiEventType } from './events'; -import { fetchEventSource, EventSourceMessage } from './fetch-event-source'; +import { UrbitHttpApiEvent, UrbitHttpApiEventType } from './events'; +import { EventSourceMessage, fetchEventSource } from './fetch-event-source'; import { - Scry, - Thread, - NounThread, - JsonThread, - Poke, - Subscription, - headers, + EyreEvent, FatalError, + GallAgent, + JsonThread, + Mark, + NounThread, + OnceSubscriptionErr, Path, + Patp, + Poke, ReapError, + Scry, + Subscription, + Thread, UrbitParams, - OnceSubscriptionErr, - Patp, - GallAgent, - Mark, - EyreEvent, + headers, } from './types'; -import EventEmitter, { hexString, unpackJamBytes, packJamBytes } from './utils'; - -import { Noun, Atom, Cell, enjs, dejs, jam, cue } from '@urbit/nockjs'; -import { parseUw, formatUw, patp2dec } from '@urbit/aura'; +import EventEmitter, { hexString, packJamBytes, unpackJamBytes } from './utils'; //TODO move into nockjs utils function isNoun(a: any): a is Noun { - return (a instanceof Atom) || (a instanceof Cell); + return a instanceof Atom || a instanceof Cell; } /** @@ -83,8 +82,7 @@ export class Urbit { * subscription is available, which may be 0, 1, or many times. The * disconnect function may be called exactly once. */ - private outstandingSubscriptions: Map = - new Map(); + private outstandingSubscriptions: Map = new Map(); /** * Our abort controller, used to close the connection @@ -139,30 +137,36 @@ export class Urbit { * * @param reconnect - true if this is a reconnection */ - onOpen?: (reconnect: boolean) => void = null; + onOpen?: (reconnect: boolean) => void = undefined; /** * Called on every attempt to reconnect to the ship. Followed by onOpen * or onError depending on whether the connection succeeds. */ - onRetry?: () => void = null; + onRetry?: () => void = undefined; /** * Called when the connection fails irrecoverably */ - onError?: (error: any) => void = null; + onError?: (error: any) => void = undefined; /** This is basic interpolation to get the channel URL of an instantiated Urbit connection. */ private get channelUrl(): string { return `${this.url}/~/channel/${this.uid}`; } - private fetchOptions(method: 'PUT' | 'GET' = 'PUT', - mode: 'noun' | 'json' = 'noun'): any { + private fetchOptions( + method: 'PUT' | 'GET' = 'PUT', + mode: 'noun' | 'json' = 'noun' + ): any { let type; switch (mode) { - case 'noun': type = 'application/x-urb-jam'; break; - case 'json': type = 'application/json'; break; + case 'noun': + type = 'application/x-urb-jam'; + break; + case 'json': + type = 'application/json'; + break; } - let headers: headers = {}; + const headers: headers = {}; switch (method) { case 'PUT': headers['Content-Type'] = type; @@ -215,7 +219,7 @@ export class Urbit { ...params, }); - airlock.ready = new Promise(async (resolve) => { + airlock.ready = (async () => { // Learn where we are aka what ship we're connecting to await airlock.getShipName(); @@ -226,9 +230,8 @@ export class Urbit { await airlock.getOurName(); await airlock.connect(); - - resolve(); - }); + return; + })(); return airlock; } @@ -320,10 +323,10 @@ export class Urbit { } const cookie = response.headers.get('set-cookie'); if (!this.ship && cookie) { - this.ship = new RegExp(/urbauth-~([\w-]+)/).exec(cookie)[1]; + this.ship = new RegExp(/urbauth-~([\w-]+)/).exec(cookie)?.[1]; } if (!isBrowser) { - this.cookie = cookie; + this.cookie = cookie ?? undefined; } }); } @@ -388,24 +391,25 @@ export class Urbit { this.ack(eventId); } - const eev: EyreEvent = this.unpackSSEvent(event.data); + const eev: EyreEvent | null = this.unpackSSEvent(event.data); - if ( - eev.tag === 'poke-ack' && - this.outstandingPokes.has(eev.id) - ) { + if (!eev) { + return; + } + + if (eev.tag === 'poke-ack' && this.outstandingPokes.has(eev.id)) { const funcs = this.outstandingPokes.get(eev.id); if (!eev.err) { - funcs.onSuccess(); + funcs?.onSuccess?.(); } else { //TODO pre-render tang after porting tang utils, // because json also has its tang pre-rendered into string console.error(eev.err); - // @ts-ignore because function type signature shenanigans - funcs.onError?.(eev.err); + // @ts-expect-error because function type signature shenanigans + funcs?.onError?.(eev.err); } this.outstandingPokes.delete(eev.id); - // + // } else if ( eev.tag === 'watch-ack' && this.outstandingSubscriptions.has(eev.id) @@ -415,31 +419,31 @@ export class Urbit { //TODO pre-render tang after porting tang utils, // because json also has its tang pre-rendered into string console.error(eev.err); - // @ts-ignore because function type signature shenanigans - funcs.onNack?.(eev.err); + // @ts-expect-error because function type signature shenanigans + funcs?.onNack?.(eev.err); this.outstandingSubscriptions.delete(eev.id); } - // + // } else if ( eev.tag === 'fact' && this.outstandingSubscriptions.has(eev.id) ) { - const funcs: Subscription = this.outstandingSubscriptions.get(eev.id); + const funcs = this.outstandingSubscriptions.get(eev.id); try { - if (funcs.onFact) { + if (funcs?.onFact) { //NOTE we don't pass the desk. it's a leak-y eyre impl detail funcs.onFact?.(eev.mark, eev.data); } } catch (e) { console.error('Failed to call subscription event callback', e); } - // + // } else if ( eev.tag === 'kick' && this.outstandingSubscriptions.has(eev.id) ) { const funcs = this.outstandingSubscriptions.get(eev.id); - funcs.onKick(); + funcs?.onKick?.(); this.outstandingSubscriptions.delete(eev.id); this.emit('subscription', { id: eev.id, @@ -505,7 +509,7 @@ export class Urbit { this.lastHeardEventId = -1; this.lastAcknowledgedEventId = -1; this.outstandingSubscriptions.forEach((sub, id) => { - sub.onKick(); + sub.onKick?.(); this.emit('subscription', { id, status: 'close', @@ -515,10 +519,10 @@ export class Urbit { this.outstandingPokes.forEach((poke, id) => { if (this.mode === 'noun') { - // @ts-ignore because function type signature shenanigans + // @ts-expect-error because function type signature shenanigans poke.onError(dwim(Atom.fromString('Channel was reaped'), 0)); } else { - // @ts-ignore because function type signature shenanigans + // @ts-expect-error because function type signature shenanigans poke.onError('Channel was reaped'); } }); @@ -571,7 +575,7 @@ export class Urbit { } } - private unpackSSEvent(eventString: string): EyreEvent { + private unpackSSEvent(eventString: string): EyreEvent | null { if (this.mode === 'noun') { const data: Noun = cue(new Atom(parseUw(eventString))); // [request-id channel-event] @@ -592,14 +596,14 @@ export class Urbit { } else { return { tag: 'poke-ack', id: id, err: bod.tail }; } - // [%watch-ack p=(unit tang)] + // [%watch-ack p=(unit tang)] } else if (tag === 'watch-ack') { if (bod instanceof Atom) { return { tag: 'watch-ack', id: id }; } else { return { tag: 'watch-ack', id: id, err: bod.tail }; } - // [%fact =desk =mark =noun] + // [%fact =desk =mark =noun] } else if (tag === 'fact') { if ( !( @@ -613,7 +617,7 @@ export class Urbit { const mark = Atom.cordToString(bod.tail.head); //NOTE we don't extract the desk. it's a leak-y eyre impl detail return { tag: 'fact', id: id, mark: mark, data: bod.tail.tail }; - // [%kick ~] + // [%kick ~] } else if (tag === 'kick') { return { tag: 'kick', id: id }; } else if (this.verbose) { @@ -622,7 +626,7 @@ export class Urbit { } else { console.log('strange event noun', data.toString()); } - // + // } else if (this.mode === 'json') { const data: any = JSON.parse(eventString); switch (data.response) { @@ -637,10 +641,12 @@ export class Urbit { default: throw new Error('strange event json ' + eventString); } - // + // } else { throw new Error('strange mode ' + this.mode); } + + return null; } /** @@ -652,10 +658,13 @@ export class Urbit { * * @returns The first fact on the subcription */ - async subscribeOnce(app: GallAgent, path: Path, timeout?: number): - Promise { + async subscribeOnce( + app: GallAgent, + path: Path, + timeout?: number + ): Promise { await this.ready; - return new Promise(async (resolve, reject) => { + return new Promise((resolve, reject) => { let done = false; let id: number | null = null; const onKick = () => { @@ -664,27 +673,29 @@ export class Urbit { } }; const onFact = (m: Mark, n: Noun) => { - if (!done) { + if (!done && id) { resolve(n); this.unsubscribe(id); } }; const onNack = (n: Noun) => { reject('onNack'); - } + }; const request = { app, path, onFact, onNack, onKick }; - id = await this.subscribe(request); + this.subscribe(request).then((subId) => { + id = subId; - if (timeout) { - setTimeout(() => { - if (!done) { - done = true; - reject('timeout'); - this.unsubscribe(id); - } - }, timeout); - } + if (timeout) { + setTimeout(() => { + if (!done && id) { + done = true; + reject('timeout'); + this.unsubscribe(id); + } + }, timeout); + } + }); }); } @@ -697,8 +708,8 @@ export class Urbit { */ async poke(params: Poke): Promise { await this.ready; - params.onSuccess = params.onSuccess || (()=>{}); - params.onError = params.onError || (()=>{}); + params.onSuccess = params.onSuccess || (() => {}); + params.onError = params.onError || (() => {}); const { app, mark, data, ship } = { ship: this.ship, ...params, @@ -712,13 +723,18 @@ export class Urbit { this.outstandingPokes.set(eventId, params); if (isNoun(data)) { - const shipAtom = Atom.fromString(patp2dec(ship), 10); + const shipAtom = Atom.fromString(patp2dec(ship as string), 10); // [%poke request-id=@ud ship=@p app=term mark=@tas =noun] const non = ['poke', eventId, shipAtom, app, mark, data]; await this.sendNounsToChannel(non); } else { const poke = { - id: eventId, action: 'poke', ship, app, mark, data, + id: eventId, + action: 'poke', + ship, + app, + mark, + data, }; await this.sendJsonsToChannel(poke); } @@ -747,7 +763,7 @@ export class Urbit { } const eventId = this.getEventId(); - // @ts-ignore because function type signature shenanigans + // @ts-expect-error because function type signature shenanigans this.outstandingSubscriptions.set(eventId, { app, path, @@ -756,17 +772,15 @@ export class Urbit { onKick, }); - let pathAsString: string; - let pathAsNoun: Noun; + let pathAsString: string = ''; + let pathAsNoun: Noun = Atom.zero; if (typeof path === 'string') { pathAsString = path; pathAsNoun = dejs.list(path.split('/')); - } else - if (Array.isArray(path)) { + } else if (Array.isArray(path)) { pathAsString = path.join('/'); pathAsNoun = dejs.list(path); - } else - if (path instanceof Atom || path instanceof Cell) { + } else if (path instanceof Atom || path instanceof Cell) { pathAsString = enjs.array(enjs.cord)(path).join('/'); pathAsNoun = path; } @@ -782,7 +796,7 @@ export class Urbit { const non = [ 'subscribe', eventId, - Atom.fromString(patp2dec(ship), 10), + Atom.fromString(patp2dec(ship as string), 10), app, pathAsNoun, ]; @@ -854,14 +868,12 @@ export class Urbit { await this.ready; const { app, path, mark } = params; - let pathAsString: string; + let pathAsString: string = ''; if (typeof path === 'string') { pathAsString = path; - } else - if (Array.isArray(path)) { + } else if (Array.isArray(path)) { pathAsString = path.join('/'); - } else - if (path instanceof Atom || path instanceof Cell) { + } else if (path instanceof Atom || path instanceof Cell) { pathAsString = enjs.array(enjs.cord)(path).join('/'); } @@ -870,7 +882,7 @@ export class Urbit { this.fetchOptions('GET') ); - if (!response.ok) { + if (!response.ok || !response.body) { return Promise.reject(response); } @@ -890,9 +902,11 @@ export class Urbit { return new Response(response as ReadableStream).json(); } - private async callThread(params: Thread, - body: BodyInit, - mode: 'noun' | 'json' = 'noun'): Promise { + private async callThread( + params: Thread, + body: BodyInit, + mode: 'noun' | 'json' = 'noun' + ): Promise { await this.ready; const { inputMark, outputMark, threadName, desk } = params; if (!desk) { @@ -904,7 +918,7 @@ export class Urbit { { ...this.fetchOptions('PUT', mode), method: 'POST', - body: body + body: body, } ); } diff --git a/src/fetch-event-source/parse.ts b/src/fetch-event-source/parse.ts index 0c10ef7..eab0c4f 100644 --- a/src/fetch-event-source/parse.ts +++ b/src/fetch-event-source/parse.ts @@ -41,6 +41,12 @@ export async function getBytes( }), ]); + if (!result.value) { + // empty chunk, skip it + console.warn('Empty chunk received from server'); + continue; + } + try { onChunk(result.value); } catch (err) { @@ -102,9 +108,9 @@ export function getLines( fieldLength = position - lineStart; } break; - // @ts-ignore:7029 \r case below should fallthrough to \n: case ControlChars.CarriageReturn: discardTrailingNewline = true; + // eslint-disable-next-line no-fallthrough case ControlChars.NewLine: lineEnd = position; break; @@ -180,6 +186,7 @@ export function getMessages( onId?.((message.id = value)); break; case 'retry': + // eslint-disable-next-line no-case-declarations const retry = parseInt(value, 10); if (!isNaN(retry)) { // per spec, ignore non-integers diff --git a/src/types.ts b/src/types.ts index a8a8061..0ff5ca0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -224,17 +224,18 @@ export type OnceSubscriptionErr = 'onKick' | 'onNack' | 'timeout'; export interface headers { Cookie?: string; - [headerName: string]: string; + [headerName: string]: string | undefined; } export class FatalError extends Error {} export class ReapError extends Error {} -export type EyreEvent = EyreEventPokeAck - | EyreEventWatchAck - | EyreEventKick - | EyreEventFact; +export type EyreEvent = + | EyreEventPokeAck + | EyreEventWatchAck + | EyreEventKick + | EyreEventFact; type EyreEventPokeAck = { tag: 'poke-ack'; @@ -245,14 +246,14 @@ type EyreEventWatchAck = { tag: 'watch-ack'; id: number; err?: Noun | string; -} +}; type EyreEventKick = { tag: 'kick'; id: number; -} +}; type EyreEventFact = { tag: 'fact'; id: number; mark: Mark; data: Noun | any; -} +}; diff --git a/src/utils.ts b/src/utils.ts index 22b446d..47d75cd 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,4 @@ -import { Noun, Atom, jam, cue } from "@urbit/nockjs"; +import { Atom, Noun, cue, jam } from '@urbit/nockjs'; export function camelize(str: string) { return str @@ -13,10 +13,10 @@ export function camelize(str: string) { export function uncamelize(str: string, separator = '-') { // Replace all capital letters by separator followed by lowercase one - var str = str.replace(/[A-Z]/g, function (letter: string) { + const string = str.replace(/[A-Z]/g, function (letter: string) { return separator + letter.toLowerCase(); }); - return str.replace(new RegExp('^' + separator), ''); + return string.replace(new RegExp('^' + separator), ''); } export async function unpackJamBytes(buf: ArrayBufferLike): Promise { @@ -67,10 +67,10 @@ export function uid(): string { } export default class EventEmitter { - private listeners: Record = {}; + private listeners: Record void)[]> = {}; - on(event: string, callback: Function) { - if (!this.listeners.hasOwnProperty(event)) { + on(event: string, callback: (...args: any[]) => void) { + if (!(event in this.listeners)) { this.listeners[event] = []; } @@ -80,7 +80,7 @@ export default class EventEmitter { } emit(event: string, ...data: any): any { - if (!this.listeners.hasOwnProperty(event)) { + if (!(event in this.listeners)) { return null; } diff --git a/tsconfig.json b/tsconfig.json index 988b0cb..33bd0ee 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "allowSyntheticDefaultImports": true, "declaration": true, "sourceMap": true, - "strict": false, + "strict": true, "pretty": true, "noImplicitAny": true, "noErrorTruncation": true, From 677c3d8c6680971f87a424de47f395c88f07b505 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 22 Oct 2024 15:55:18 -0500 Subject: [PATCH 47/49] lib: dual mode fixes --- src/Urbit.ts | 106 +++++++++++++++++++++++++++++---------------------- src/types.ts | 2 + 2 files changed, 63 insertions(+), 45 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 195cdeb..11e009a 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -220,17 +220,21 @@ export class Urbit { }); airlock.ready = (async () => { - // Learn where we are aka what ship we're connecting to - await airlock.getShipName(); + try { + // Learn where we are aka what ship we're connecting to + await airlock.getShipName(); - if (code) { - await airlock.authenticate(); - } - // Learn who we are aka what patp - await airlock.getOurName(); + if (code) { + await airlock.authenticate(); + } + // Learn who we are aka what patp + await airlock.getOurName(); - await airlock.connect(); - return; + await airlock.connect(); + return; + } catch (e) { + throw new Error('Failed to setup channel: ' + e); + } })(); return airlock; @@ -341,11 +345,15 @@ export class Urbit { this.emit('status-update', { status: 'opening' }); // Can't receive events until the channel is open, // so send an empty list of commands to open it. - await this.sendNounsToChannel(); this.sseClientInitialized = true; + if (this.mode === 'noun') { + await this.sendNounsToChannel(); + } else { + await this.sendJsonsToChannel(); + } return new Promise((resolve, reject) => { fetchEventSource(this.channelUrl, { - ...this.fetchOptions('GET'), + ...this.fetchOptions('GET', this.mode), fetch: this.fetch, openWhenHidden: true, responseTimeout: 25000, @@ -552,12 +560,15 @@ export class Urbit { //NOTE every arg is interpreted (through nockjs.dwim) as a noun, which // should result in a noun nesting inside of the xx $eyre-command type private async sendNounsToChannel(...args: (Noun | any)[]): Promise { + const options = this.fetchOptions('PUT', 'noun'); + const body = formatUw(jam(dejs.list(args)).number.toString()); const response = await this.fetch(this.channelUrl, { - ...this.fetchOptions('PUT', 'noun'), + ...options, method: 'PUT', - body: formatUw(jam(dejs.list(args)).number.toString()), + body, }); if (!response.ok) { + console.log(response.status, response.statusText, await response.text()); throw new Error('Failed to PUT channel command(s)'); } } @@ -565,12 +576,15 @@ export class Urbit { //NOTE every arg should be an eyre command object //TODO make a type for that private async sendJsonsToChannel(...args: any[]): Promise { + const options = this.fetchOptions('PUT', 'json'); + const body = JSON.stringify(args); const response = await this.fetch(this.channelUrl, { - ...this.fetchOptions('PUT', 'json'), + ...options, method: 'PUT', - body: JSON.stringify(args), + body, }); if (!response.ok) { + console.log(response.status, response.statusText, await response.text()); throw new Error('Failed to PUT channel command(s)'); } } @@ -658,11 +672,11 @@ export class Urbit { * * @returns The first fact on the subcription */ - async subscribeOnce( + async subscribeOnce( app: GallAgent, path: Path, timeout?: number - ): Promise { + ): Promise { await this.ready; return new Promise((resolve, reject) => { let done = false; @@ -672,13 +686,13 @@ export class Urbit { reject('onKick'); } }; - const onFact = (m: Mark, n: Noun) => { + const onFact = (m: Mark, n: any) => { if (!done && id) { resolve(n); this.unsubscribe(id); } }; - const onNack = (n: Noun) => { + const onNack = (n: Noun | 'string') => { reject('onNack'); }; const request = { app, path, onFact, onNack, onKick }; @@ -711,18 +725,14 @@ export class Urbit { params.onSuccess = params.onSuccess || (() => {}); params.onError = params.onError || (() => {}); const { app, mark, data, ship } = { - ship: this.ship, + ship: this.ship?.replace('~', '') || '', ...params, }; - if (this.lastEventId === 0) { - this.emit('status-update', { status: 'opening' }); - } - const eventId = this.getEventId(); this.outstandingPokes.set(eventId, params); - if (isNoun(data)) { + if (isNoun(data) && this.mode === 'noun') { const shipAtom = Atom.fromString(patp2dec(ship as string), 10); // [%poke request-id=@ud ship=@p app=term mark=@tas =noun] const non = ['poke', eventId, shipAtom, app, mark, data]; @@ -734,7 +744,7 @@ export class Urbit { ship, app, mark, - data, + json: data, }; await this.sendJsonsToChannel(poke); } @@ -754,14 +764,10 @@ export class Urbit { onNack: () => {}, onFact: () => {}, onKick: () => {}, - ship: this.ship, + ship: this.ship?.replace('~', '') || '', ...params, }; - if (this.lastEventId === 0) { - this.emit('status-update', { status: 'opening' }); - } - const eventId = this.getEventId(); // @ts-expect-error because function type signature shenanigans this.outstandingSubscriptions.set(eventId, { @@ -792,15 +798,26 @@ export class Urbit { status: 'open', }); - // [%subscribe request-id=@ud ship=@p app=term =path] - const non = [ - 'subscribe', - eventId, - Atom.fromString(patp2dec(ship as string), 10), - app, - pathAsNoun, - ]; - await this.sendNounsToChannel(non); + if (this.mode === 'noun') { + // [%subscribe request-id=@ud ship=@p app=term =path] + const non = [ + 'subscribe', + eventId, + Atom.fromString(patp2dec(ship as string), 10), + app, + pathAsNoun, + ]; + await this.sendNounsToChannel(non); + } else { + const sub = { + id: eventId, + action: 'subscribe', + ship, + app, + path: pathAsString, + }; + await this.sendJsonsToChannel(sub); + } return eventId; } @@ -887,19 +904,18 @@ export class Urbit { } if ((mark || 'noun') !== 'noun') { - return response.body; + return response.json(); } return unpackJamBytes(await response.arrayBuffer()); } - async scryForJson(params: Scry): Promise { - if (params.mark !== 'json') { + async scryForJson(params: Scry): Promise { + if (params.mark !== 'json' && this.verbose) { console.log('scryForJson forcing %json mark'); } params.mark = 'json'; - const response = await this.scry(params); - return new Response(response as ReadableStream).json(); + return (await this.scry(params)) as T; } private async callThread( diff --git a/src/types.ts b/src/types.ts index 0ff5ca0..eb56e51 100644 --- a/src/types.ts +++ b/src/types.ts @@ -231,6 +231,8 @@ export class FatalError extends Error {} export class ReapError extends Error {} +export class AuthError extends Error {} + export type EyreEvent = | EyreEventPokeAck | EyreEventWatchAck From f4f2be437402ef8f9232f7fce71111b94ca6b5f1 Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Tue, 29 Oct 2024 10:59:23 -0500 Subject: [PATCH 48/49] lib: fixing seamless reset and removing ready promise --- src/Urbit.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index 11e009a..d6c9be6 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -5,6 +5,7 @@ import { isBrowser } from 'browser-or-node'; import { UrbitHttpApiEvent, UrbitHttpApiEventType } from './events'; import { EventSourceMessage, fetchEventSource } from './fetch-event-source'; import { + AuthError, EyreEvent, FatalError, GallAgent, @@ -125,8 +126,6 @@ export class Urbit { */ fetch: typeof fetch; - public ready: Promise = Promise.resolve(); - /** * number of consecutive errors in connecting to the eventsource */ @@ -219,7 +218,7 @@ export class Urbit { ...params, }); - airlock.ready = (async () => { + (async () => { try { // Learn where we are aka what ship we're connecting to await airlock.getShipName(); @@ -516,6 +515,8 @@ export class Urbit { this.lastEventId = 0; this.lastHeardEventId = -1; this.lastAcknowledgedEventId = -1; + + this.connect(); this.outstandingSubscriptions.forEach((sub, id) => { sub.onKick?.(); this.emit('subscription', { @@ -677,7 +678,6 @@ export class Urbit { path: Path, timeout?: number ): Promise { - await this.ready; return new Promise((resolve, reject) => { let done = false; let id: number | null = null; @@ -721,7 +721,6 @@ export class Urbit { * @param noun The data to send */ async poke(params: Poke): Promise { - await this.ready; params.onSuccess = params.onSuccess || (() => {}); params.onError = params.onError || (() => {}); const { app, mark, data, ship } = { @@ -759,7 +758,6 @@ export class Urbit { * @param handlers Handlers to deal with various events of the subscription */ async subscribe(params: Subscription): Promise { - await this.ready; const { app, path, ship, onNack, onFact, onKick } = { onNack: () => {}, onFact: () => {}, @@ -828,7 +826,6 @@ export class Urbit { * @param subscription */ async unsubscribe(subscription: number) { - await this.ready; // [%unsubscribe request-id=@ud subscription-id=@ud] return this.sendNounsToChannel([ 'unsubscribe', @@ -882,7 +879,6 @@ export class Urbit { * @returns The scry result */ async scry(params: Scry): Promise> { - await this.ready; const { app, path, mark } = params; let pathAsString: string = ''; @@ -923,7 +919,6 @@ export class Urbit { body: BodyInit, mode: 'noun' | 'json' = 'noun' ): Promise { - await this.ready; const { inputMark, outputMark, threadName, desk } = params; if (!desk) { throw new Error('Must supply desk to run thread from'); From 9f41b14a672ce02a7a2a132ec5af9234f03729f6 Mon Sep 17 00:00:00 2001 From: fang Date: Tue, 10 Jun 2025 18:13:14 +0200 Subject: [PATCH 49/49] lib: increase sse response timeout The ship sends a heartbeat, but may be slow to do so due to other work. Here, we bump the timeout to be even longer, so that we are less likely to erroneously detect disconnects. --- src/Urbit.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Urbit.ts b/src/Urbit.ts index d6c9be6..bde05bf 100644 --- a/src/Urbit.ts +++ b/src/Urbit.ts @@ -355,7 +355,11 @@ export class Urbit { ...this.fetchOptions('GET', this.mode), fetch: this.fetch, openWhenHidden: true, - responseTimeout: 25000, + //NOTE 30s somewhat arbitrary, but importantly longer than eyre's + // 20s heartbeat timer. this lets us stay connected even if the + // ship is "10s worth of busy". probably don't want to tune this + // to be longer than a minute, to avoid proxy timeouts etc. + responseTimeout: 30000, onopen: async (response, isReconnect) => { if (this.verbose) { console.log('Opened eventsource', response);