upload to gh

This commit is contained in:
specCon18 2024-05-15 16:59:36 -04:00
parent d9d8d06b8a
commit f2407a9587
33 changed files with 941 additions and 83 deletions

1
.direnv/flake-profile Symbolic link
View file

@ -0,0 +1 @@
flake-profile-1-link

View file

@ -0,0 +1 @@
/nix/store/lwrqfng58d909d1vkpk0m14pq1qlgfr0-nix-shell-env

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

View file

@ -2,7 +2,7 @@
"clearMocks": true,
"moduleNameMapper": {
"@code/(.*)": [
"<rootDir>/src/day2/$1"
"<rootDir>/src/day1/$1"
]
},
"preset": "ts-jest"

61
flake.lock generated Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1714912032,
"narHash": "sha256-clkcOIkg8G4xuJh+1onLG4HPMpbtzdLv4rHxFzgsH9c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ee4a6e0f566fe5ec79968c57a9c2c3c25f2cf41d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

24
flake.nix Normal file
View file

@ -0,0 +1,24 @@
{
description = "A js development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [];
};
in
{
devShell = pkgs.mkShell {
buildInputs = [
pkgs.nodejs_22
pkgs.yarn
];
};
});
}

View file

@ -14,13 +14,13 @@
"typescript": "^4.7.4"
},
"scripts": {
"test": "jest PrimsList",
"test": "jest DFSOnBST LRU LinearSearchList BinarySearchList TwoCrystalBalls BubbleSort SinglyLinkedList DoublyLinkedList Queue Stack ArrayList MazeSolver QuickSort BTPreOrder BTInOrder BTPostOrder BTBFS CompareBinaryTrees DFSOnBST DFSGraphList Trie BFSGraphMatrix Map MinHeap",
"clear": "node ./scripts/clear.js",
"prettier": "prettier --write ./src",
"generate": "node ./scripts/generate.js",
"day": "echo src/day4"
"day": "echo src/day1"
},
"devDependencies": {
"@swc-node/register": "^1.6.7"
}
}
}

27
src/day1/ArrayList.ts Normal file
View file

@ -0,0 +1,27 @@
export default class ArrayList<T> {
public length: number;
constructor() {
}
prepend(item: T): void {
}
insertAt(item: T, idx: number): void {
}
append(item: T): void {
}
remove(item: T): T | undefined {
}
get(idx: number): T | undefined {
}
removeAt(idx: number): T | undefined {
}
}

View file

@ -0,0 +1,39 @@
export default function bfs(
graph: WeightedAdjacencyMatrix,
source: number,
needle: number): number[] | null {
const seen = new Array(graph.length).fill(false);
const prev = new Array(graph.length).fill(-1);
seen[source] = true;
const q:number[] = [source];
do{
const curr = q.shift() as number;
if(curr === needle){
break;
}
const adjs = graph[curr];
for(let i = 0; i < adjs.length; ++i){
if(adjs[i] === 0){
continue;
}
if(seen[i]){
continue;
}
seen[i] = true;
prev[i] = curr;
q.push(i);
}
seen[curr] = true;
} while(q.length);
//build it backwards
if(prev[needle] === -1){
return null;
}
let curr = needle;
const out: number[] = [];
while(prev[curr] !== -1){
out.push(curr);
curr = prev[curr];
}
return [source].concat(out.reverse());
}

16
src/day1/BTBFS.ts Normal file
View file

@ -0,0 +1,16 @@
export default function bfs(head: BinaryNode<number>, needle: number): boolean {
const q: (BinaryNode<number>|null)[] = [head];
while(q.length){
const curr = q.shift() as BinaryNode<number> | undefined | null;
if(!curr){
continue;
}
if (curr.value === needle){
return true;
}
q.push(curr.left);
q.push(curr.right);
}
return false;
}

16
src/day1/BTInOrder.ts Normal file
View file

@ -0,0 +1,16 @@
function walk(curr:BinaryNode<number> | null, path:number[]): number[]{
//Base Case
if(!curr){
return path;
}
//Recurse
walk(curr.left, path);
path.push(curr.value);
walk(curr.right, path);
//Post
return path;
}
export default function in_order_search(head: BinaryNode<number>): number[] {
return walk(head,[]);
}

16
src/day1/BTPostOrder.ts Normal file
View file

@ -0,0 +1,16 @@
function walk(curr:BinaryNode<number> | null, path:number[]): number[]{
//Base Case
if(!curr){
return path;
}
//Recurse
walk(curr.left, path);
walk(curr.right, path);
//Post
path.push(curr.value);
return path;
}
export default function post_order_search(head: BinaryNode<number>): number[] {
return walk(head,[]);
}

18
src/day1/BTPreOrder.ts Normal file
View file

@ -0,0 +1,18 @@
function walk(curr:BinaryNode<number> | null, path:number[]): number[]{
//Base Case
if(!curr){
return path;
}
//Pre
path.push(curr.value);
//Recurse
walk(curr.left, path);
walk(curr.right, path);
//Post
return path;
}
export default function pre_order_search(head: BinaryNode<number>): number[] {
return walk(head,[]);
}

View file

@ -0,0 +1,17 @@
export default function bs_list(haystack: number[], needle: number): boolean {
let low = 0;
let high = haystack.length;
do{
const midpoint = Math.floor(low+(high-low)/2);
const value = haystack[midpoint];
if (value === needle) {
return true;
}else if(value > needle) {
high = midpoint;
}else {
low = midpoint + 1;
};
}while(low<high);
return false;
}

11
src/day1/BubbleSort.ts Normal file
View file

@ -0,0 +1,11 @@
export default function bubble_sort(arr: number[]): void {
for(let i = 0; i< arr.length; i++){
for(let j = 0; j< arr.length - 1 - i; j++){
if(arr[j]>arr[j+1]){
const tmp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = tmp;
}
}
}
}

View file

@ -0,0 +1,12 @@
export default function compare(a: BinaryNode<number> | null, b: BinaryNode<number> | null): boolean {
if(a === null && b === null){
return true;
}
if(a === null || b === null){
return false;
}
if(a.value != b.value){
return false;
}
return compare(a.left,b.left) && compare(a.right,b.right);
}

35
src/day1/DFSGraphList.ts Normal file
View file

@ -0,0 +1,35 @@
function walk(graph: WeightedAdjacencyList, curr:number,needle:number, seen: boolean[], path: number[]):boolean{
if(seen[curr]){
return false;
}
seen[curr] = true;
//recursion time
//pre
path.push(curr);
if(curr===needle){
return true;
}
//recurse
const list = graph[curr];
for(let i = 0; i < list.length; ++i){
const edge = list[i];
if(walk(graph, edge.to, needle, seen, path )){
return true;
}
}
//post
path.pop();
return false;
}
export default function dfs(
graph: WeightedAdjacencyList,
source: number,
needle: number): number[] | null {
const seen: boolean[] = new Array(graph.length).fill(false);
const path: number[] = [];
walk(graph,source, needle, seen, path);
if (path.length === 0){
return null;
}
return path;
}

15
src/day1/DFSOnBST.ts Normal file
View file

@ -0,0 +1,15 @@
function search(curr: BinaryNode<number>|null, needle:number):boolean {
if(!curr){
return false;
}
if(curr.value === needle){
return true;
}
if(curr.value < needle){
return search(curr.right,needle);
}
return search(curr.left,needle);
}
export default function dfs(head: BinaryNode<number>, needle: number): boolean {
return search(head, needle);
}

47
src/day1/DijkstraList.ts Normal file
View file

@ -0,0 +1,47 @@
function hasUnvisited(seen:boolean[],dists:number[]): boolean{
return seen.some((s,i) => !s && dists[i] < Infinity);
}
function getLowestUnvisited(seen:boolean[],dists:number[]): number{
let idx = -1;
let lowestDistance = Infinity;
for(let i = 0; i < seen.length; ++i){
if(seen[i]){
continue;
}
if (lowestDistance > dists[i]){
lowestDistance = dists[i]
idx = i;
}
}
return idx;
}
export default function dijkstra_list(source: number, sink:number, arr:WeightedAdjacencyList):number[]{
const seen = new Array(arr.length).fill(false);
const prev = new Array(arr.length).fill(-1);
const dists = new Array(arr.length).fill(Infinity);
dists[source] = 0;
while(hasUnvisited(seen,dists)){
const curr = getLowestUnvisited(seen,dists);
seen[curr] = true;
const adjs = arr[curr];
for(let i = 0; i < adjs.length; ++i){
const edge = adjs[i];
if(seen[edge.to]){
continue;
}
const dist = dists[curr] + edge.weight;
if (dist < dists[edge.to]){
dists[edge.to] = dist;
prev[edge.to] = curr;
}
}
}
const out: number[] = [];
let curr = sink;
while(prev[curr] !== -1){
out.push(curr);
curr = prev[curr];
}
out.push(source);
return out.reverse();
}

View file

@ -0,0 +1,116 @@
type Node<T> = {
value:T,
prev?: Node<T>,
next?: Node<T>
}
export default class DoublyLinkedList<T> {
public length: number;
private head?: Node<T>;
private tail?: Node<T>;
constructor() {
this.length = 0;
this.head = undefined;
this.tail = undefined;
}
prepend(item: T): void {
const node = {value:item} as Node<T>;
this.length++;
if(!this.head){
this.head = this.tail = node;
return;
}
node.next = this.head;
this.head.prev = node;
this.head = node;
}
insertAt(item: T, idx: number): void {
if(idx > this.length){
throw new Error("Oh No Cannot insert outside of list");
}
if(idx === this.length){
this.append(item);
return;
}else if(idx === 0){
this.prepend(item);
return;
}
this.length++;
const curr = this.getAt(idx) as Node<T>;
const node = {value:item} as Node<T>;
node.next = curr;
node.prev = curr.prev;
curr.next = node;
if(node.prev){
node.prev.next = node;
}
}
append(item: T): void {
this.length++;
const node = {value:item} as Node<T>;
if(!this.tail){
this.head = this.tail = node;
return;
}
node.prev = this.tail;
this.tail.next = node;
this.tail = node;
}
// Could be improved by hash map to node values so that lookup is instant;
remove(item: T): T | undefined {
let curr = this.head;
for(let i = 0; curr && i < this.length; ++i){
//weve found the item
if(curr.value === item){
break;
}
curr = curr.next;
}
//if no curr then theres no item to remove
if(!curr){
return undefined;
}
return this.removeNode(curr);
}
get(idx: number): T | undefined {
return this.getAt(idx)?.value;
}
private getAt(idx:number): Node<T> | undefined {
let curr = this.head;
for(let i = 0; curr && i < idx; ++i){
curr = curr.next;
}
return curr;
};
private removeNode(node:Node<T>):T | undefined{
this.length--;
if(this.length === 0){
const out = this.head?.value;
this.head = this.tail = undefined;
return out;
}
if(node.prev){
node.prev.next = node.next;
}
if(node.next){
node.next.prev = node.prev;
}
if(node === this.head){
this.head = node.next;
}
if(node === this.tail){
this.tail = node.prev;
}
node.prev = node.next = undefined;
return node.value;
}
removeAt(idx: number): T | undefined {
const node = this.getAt(idx);
if(!node){
return undefined;
}
return this.removeNode(node);
}
}

91
src/day1/LRU.ts Normal file
View file

@ -0,0 +1,91 @@
type Node<T> = {
value:T
next?:Node<T>
prev?:Node<T>
}
function createNode<V>(value:V): Node<V>{
return {value};
}
export default class LRU<K, V> {
private length: number;
private head?: Node<V>;
private tail?: Node<V>;
private lookup: Map<K,Node<V>>;
private reverseLookup: Map<Node<V>,K>;
constructor(private capacity:number = 10) {
this.length = 0;
this.head = this.tail = undefined;
this.lookup = new Map<K, Node<V>>();
this.reverseLookup = new Map<Node<V>,K>();
}
update(key: K, value: V): void {
// Does the cache exist
let node = this.lookup.get(key);
if(!node){
node = createNode(value);
this.length++;
this.prepend(node);
this.trimCache();
this.lookup.set(key,node);
this.reverseLookup.set(node,key);
} else {
this.detach(node);
this.prepend(node);
node.value = value;
}
// if it doesn't we need to insert
// check capcacity and evict least used if over capacity
// if it does we need to update to the front of the list and update the value
}
get(key: K): V | undefined {
// Check that the cache exists
const node = this.lookup.get(key);
if(!node){
return undefined;
}
// Update the value we found and move it to the front
this.detach(node);
this.prepend(node);
// Return the value found or undefined if it doesnt exist
return node.value;
}
private detach(node: Node<V>){
if(node.prev){
node.prev.next = node.next;
}
if(node.next){
node.next.prev = node.prev;
}
//So we dont cut off our own head
if(this.head === node){
this.head = this.head.next;
}
if(this.tail === node){
this.tail = this.tail.prev;
}
node.next = undefined;
node.prev = undefined;
}
private prepend(node:Node<V>){
if(!this.head){
this.head = this.tail = node;
return;
}
node.next = this.head;
this.head.prev = node;
this.head = node;
}
private trimCache():void {
if(this.length <= this.capacity){
return;
}
const tail = this.tail as Node<V>;
this.detach(this.tail as Node<V>);
const key = this.reverseLookup.get(tail) as K;
this.lookup.delete(key);
this.reverseLookup.delete(tail);
this.length--;
}
}

View file

@ -0,0 +1,8 @@
export default function linear_search(haystack: number[], needle: number): boolean {
for (let i:number = 0; i < haystack.length; ++i){
if (haystack[i] === needle){
return true;
}
}
return false;
}

21
src/day1/Map.ts Normal file
View file

@ -0,0 +1,21 @@
export default class Map<T extends (string | number), V> {
constructor() {
}
get(key: T): V | undefined {
}
set(key: T, value: V): void {
}
delete(key: T): V | undefined {
}
size(): number {
}
}

51
src/day1/MazeSolver.ts Normal file
View file

@ -0,0 +1,51 @@
const dir = [
[-1,0],//left
[1,0],//right
[0,-1],//down
[0,1],//up
];
function walk(maze:string[], wall: string, curr: Point, end:Point, seen:boolean[][],path:Point[]):boolean{
//base case off map
if(curr.x < 0 || curr.x > maze[0].length || curr.y < 0 || curr.y >= maze.length){
return false;
};
if(maze[curr.y][curr.x] === wall){
return false;
};
if (curr.x === end.x && curr.y === end.y){
path.push(end)
return true;
};
if (seen[curr.y][curr.x]){
return false
}
//pre
seen[curr.y][curr.x] = true;
path.push(curr)
//recurse
for(let i = 0; i< dir.length; i++){
const [x,y] = dir[i]
if (walk(maze,wall,{
x: curr.x+x,
y: curr.y+y,
},end,seen,path)){
return true;
};
}
//post
path.pop()
return false;
};
export default function solve(maze: string[], wall: string, start: Point, end: Point): Point[] {
const seen:boolean[][] = [];
const path:Point[] = [];
for (let i = 0; i < maze.length; ++i){
seen.push(new Array(maze[0].length).fill(false));
}
walk(maze,wall,start,end,seen,path);
return path;
}

74
src/day1/MinHeap.ts Normal file
View file

@ -0,0 +1,74 @@
export default class MinHeap {
public length: number;
private data: number[];
constructor() {
this.data = [];
this.length = 0;
}
insert(value: number): void {
this.data[this.length] = value;
this.heapifyUp(this.length);
this.length++;
}
delete(): number {
if(this.length === 0){
return -1;
}
const out = this.data[0];
this.length--;
if(this.length === 0){
this.data = [];
return out;
}
this.data[0] = this.data[this.length];
this.heapifyDown(0);
return out;
}
private heapifyDown(idx:number):void{
const lIdx = this.leftChild(idx);
const rIdx = this.rightChild(idx);
if(idx >= this.length || lIdx >= this.length){
return;
}
const lV = this.data[lIdx];
const rV = this.data[rIdx];
const v = this.data[idx];
if(lV > rV && v > rV){
this.data[idx] = rV;
this.data[rIdx] = v;
this.heapifyDown(rIdx);
} else if(rV > lV && v > lV){
this.data[idx] = lV;
this.data[lIdx] = v;
this.heapifyDown(lIdx);
}
const minValue = this
}
private heapifyUp(idx:number):void{
if(idx === 0){
return;
}
const p = this.parent(idx);
const parenV = this.data[p];
const v = this.data[idx];
if(parenV > v){
this.data[idx] = parenV;
this.data[p] = v;
this.heapifyUp(p);
}
}
private parent(idx:number):number{
return Math.floor((idx - 1)/2);
}
private leftChild(idx:number):number{
return 2*idx+1;
}
private rightChild(idx:number):number{
return 2*idx+2;
}
}

46
src/day1/Queue.ts Normal file
View file

@ -0,0 +1,46 @@
type Node<T> = {
value: T,
next?: Node<T>,
};
export default class Queue<T> {
public length: number;
private head?: Node<T>;
private tail?: Node<T>;
constructor() {
this.head = this.tail = undefined;
this.length = 0;
}
enqueue(item: T): void {
const node = {value: item} as Node<T>;
this.length++;
if(!this.tail) {
this.tail = this.head = node;
return;
};
this.tail.next = node;
this.tail = node;
}
deque(): T | undefined {
if(!this.head) {
return undefined;
}
this.length--;
const head = this.head;
this.head = this.head.next;
//free memory
head.next = undefined;
if (this.length === 0){
this.tail = undefined;
}
return head.value;
}
peek(): T | undefined {
return this.head?.value;
}
}

27
src/day1/QuickSort.ts Normal file
View file

@ -0,0 +1,27 @@
function partition(arr:number[],lo:number,high:number):number{
const pivot = arr[high];
let idx = lo-1;
for(let i = lo; i<high; ++i){
if(arr[i] <= pivot){
idx++;
const tmp = arr[i];
arr[i] = arr[idx];
arr[idx] = tmp;
};
};
idx++;
arr[high] = arr[idx];
arr[idx] = pivot;
return idx;
}
function qs(arr:number[], lo:number, high:number): void {
if(lo >= high){
return;
}
const pivotIdx = partition(arr,lo,high);
qs(arr, lo, pivotIdx - 1);
qs(arr, pivotIdx + 1, high);
}
export default function quick_sort(arr: number[]): void {
qs(arr, 0, arr.length - 1);
}

View file

@ -0,0 +1,27 @@
export default class SinglyLinkedList<T> {
public length: number;
constructor() {
}
prepend(item: T): void {
}
insertAt(item: T, idx: number): void {
}
append(item: T): void {
}
remove(item: T): T | undefined {
}
get(idx: number): T | undefined {
}
removeAt(idx: number): T | undefined {
}
}

41
src/day1/Stack.ts Normal file
View file

@ -0,0 +1,41 @@
type Node<T> = {
value: T,
prev?: Node<T>
}
export default class Stack<T> {
public length: number;
private head?: Node<T>;
constructor() {
this.head = undefined;
this.length = 0;
}
push(item: T): void {
const node = {value:item} as Node<T>
this.length++;
if (!this.head){
this.head = node;
return;
}
node.prev = this.head;
this.head = node;
}
pop(): T | undefined {
this.length = Math.max(0,this.length - 1);
if (this.length === 0){
const head = this.head;
this.head = undefined;
return head?.value;
}
const head = this.head as Node<T>;
this.head = head.prev;
return head.value;
}
peek(): T | undefined {
return this.head?.value;
}
}

18
src/day1/Trie.ts Normal file
View file

@ -0,0 +1,18 @@
export default class Trie {
constructor() {
}
insert(item: string): void {
}
delete(item: string): void {
}
find(partial: string): string[] {
}
}

View file

@ -0,0 +1,16 @@
export default function two_crystal_balls(breaks: boolean[]): number {
const jump_amount = Math.floor(Math.sqrt(breaks.length));
let i = jump_amount;
for (; i<breaks.length; i+=jump_amount){
if(breaks[i]) {
break;
}
}
i -= jump_amount;
for (let j = 0; j<=jump_amount && i < breaks.length; ++j,++i) {
if(breaks[i]){
return i;
}
}
return - 1;
}

View file

@ -12,7 +12,7 @@
"baseUrl": "src",
"paths": {
"@code/*": [
"day4/*"
"day1/*"
]
}
},
@ -22,4 +22,4 @@
"exclude": [
"node_modules"
]
}
}

119
yarn.lock
View file

@ -22,7 +22,7 @@
resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.5.tgz"
integrity sha512-BxhE40PVCBxVEJsSBhB6UWyAuqJRxGsAw8BdHMJ3AKGydcwuWW4kOO3HmqBQAdcq/OP+/DlTVxLvsCzRTnZuGg==
"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.8.0", "@babel/core@>=7.0.0-beta.0 <8":
"@babel/core@^7.11.6", "@babel/core@^7.12.3":
version "7.18.5"
resolved "https://registry.npmjs.org/@babel/core/-/core-7.18.5.tgz"
integrity sha512-MGY8vg3DxMnctw0LdvSEojOsumc70g0t18gNyUdAZqB1Rpd1Bqo/svHGvt+UJ6JcGX+DIekGFDxxIWofBxLCnQ==
@ -532,14 +532,6 @@
resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz"
integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==
"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9":
version "0.3.13"
resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz"
integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==
dependencies:
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping@0.3.9":
version "0.3.9"
resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz"
@ -548,6 +540,14 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9":
version "0.3.13"
resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz"
integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==
dependencies:
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@sinclair/typebox@^0.23.3":
version "0.23.5"
resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.23.5.tgz"
@ -592,39 +592,6 @@
source-map-support "^0.5.21"
tslib "^2.5.0"
"@swc/core-linux-x64-gnu@1.3.80":
version "1.3.80"
resolved "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.80.tgz"
integrity sha512-+2e5oni1vOrLIjM5Q2/GIzK/uS2YEtuJqnjPvCK8SciRJsSl8OgVsRvyCDbmKeZNtJ2Q+o/O2AQ2w1qpAJG6jg==
"@swc/core-linux-x64-musl@1.3.80":
version "1.3.80"
resolved "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.80.tgz"
integrity sha512-8OK9IlI1zpWOm7vIp1iXmZSEzLAwFpqhsGSEhxPavpOx2m54kLFdPcw/Uv3n461f6TCtszIxkGq1kSqBUdfUBA==
"@swc/core@>= 1.3", "@swc/core@>=1.2.50":
version "1.3.80"
resolved "https://registry.npmjs.org/@swc/core/-/core-1.3.80.tgz"
integrity sha512-yX2xV5I/lYswHHR+44TPvzBgq3/Y8N1YWpTQADYuvSiX3Jxyvemk5Jpx3rRtigYb8WBkWAAf2i5d5ZJ2M7hhgw==
dependencies:
"@swc/types" "^0.1.3"
optionalDependencies:
"@swc/core-darwin-arm64" "1.3.80"
"@swc/core-darwin-x64" "1.3.80"
"@swc/core-linux-arm-gnueabihf" "1.3.80"
"@swc/core-linux-arm64-gnu" "1.3.80"
"@swc/core-linux-arm64-musl" "1.3.80"
"@swc/core-linux-x64-gnu" "1.3.80"
"@swc/core-linux-x64-musl" "1.3.80"
"@swc/core-win32-arm64-msvc" "1.3.80"
"@swc/core-win32-ia32-msvc" "1.3.80"
"@swc/core-win32-x64-msvc" "1.3.80"
"@swc/types@^0.1.3":
version "0.1.4"
resolved "https://registry.npmjs.org/@swc/types/-/types-0.1.4.tgz"
integrity sha512-z/G02d+59gyyUb7KYhKi9jOhicek6QD2oMaotUyG+lUkybpXoV49dY9bj7Ah5Q+y7knK2jU67UTX9FyfGzaxQg==
"@tsconfig/node10@^1.0.7":
version "1.0.9"
resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz"
@ -800,7 +767,7 @@ argparse@^1.0.7:
dependencies:
sprintf-js "~1.0.2"
babel-jest@^28.0.0, babel-jest@^28.1.1:
babel-jest@^28.1.1:
version "28.1.1"
resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-28.1.1.tgz"
integrity sha512-MEt0263viUdAkTq5D7upHPNxvt4n9uLUGa6pPz3WviNBMtOmStb1lIXS3QobnoqM+qnH+vr4EKlvhe8QcmxIYw==
@ -880,7 +847,7 @@ braces@^3.0.2:
dependencies:
fill-range "^7.0.1"
browserslist@^4.20.2, "browserslist@>= 4.21.0":
browserslist@^4.20.2:
version "4.21.0"
resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.0.tgz"
integrity sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA==
@ -994,16 +961,16 @@ color-convert@^2.0.1:
dependencies:
color-name "~1.1.4"
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
colorette@^2.0.19:
version "2.0.20"
resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz"
@ -1140,7 +1107,7 @@ expect@^28.1.1:
jest-message-util "^28.1.1"
jest-util "^28.1.1"
fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@2.x:
fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
@ -1172,6 +1139,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
fsevents@^2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
@ -1553,7 +1525,7 @@ jest-resolve-dependencies@^28.1.1:
jest-regex-util "^28.0.2"
jest-snapshot "^28.1.1"
jest-resolve@*, jest-resolve@^28.1.1:
jest-resolve@^28.1.1:
version "28.1.1"
resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-28.1.1.tgz"
integrity sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA==
@ -1699,7 +1671,7 @@ jest-worker@^28.1.1:
merge-stream "^2.0.0"
supports-color "^8.0.0"
jest@^28.0.0, jest@^28.1.1:
jest@^28.1.1:
version "28.1.1"
resolved "https://registry.npmjs.org/jest/-/jest-28.1.1.tgz"
integrity sha512-qw9YHBnjt6TCbIDMPMpJZqf9E12rh6869iZaN08/vpOGgHJSAaLLUn6H8W3IAEuy34Ls3rct064mZLETkxJ2XA==
@ -1778,7 +1750,7 @@ make-dir@^3.0.0:
dependencies:
semver "^6.0.0"
make-error@^1.1.1, make-error@1.x:
make-error@1.x, make-error@^1.1.1:
version "1.3.6"
resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz"
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
@ -2008,25 +1980,18 @@ safe-buffer@~5.1.1:
resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
semver@7.x, semver@^7.3.5:
version "7.3.7"
resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz"
integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
dependencies:
lru-cache "^6.0.0"
semver@^6.0.0, semver@^6.3.0:
version "6.3.0"
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
semver@^7.3.5:
version "7.3.7"
resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz"
integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
dependencies:
lru-cache "^6.0.0"
semver@7.x:
version "7.3.7"
resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz"
integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
dependencies:
lru-cache "^6.0.0"
shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz"
@ -2054,14 +2019,6 @@ slash@^3.0.0:
resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
source-map-support@^0.5.21:
version "0.5.21"
resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz"
integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map-support@0.5.13:
version "0.5.13"
resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz"
@ -2070,6 +2027,14 @@ source-map-support@0.5.13:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map-support@^0.5.21:
version "0.5.21"
resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz"
integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map@^0.6.0, source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
@ -2218,7 +2183,7 @@ ts-jest@^28.0.5:
semver "7.x"
yargs-parser "^21.0.1"
ts-node@^10.8.1, ts-node@>=9.0.0:
ts-node@^10.8.1:
version "10.8.1"
resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.8.1.tgz"
integrity sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g==
@ -2266,7 +2231,7 @@ type-fest@^0.21.3:
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz"
integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==
typescript@^4.7.4, "typescript@>= 4.3", typescript@>=2.7, typescript@>=4.3:
typescript@^4.7.4:
version "4.7.4"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==