From d0ea9cf12e4d98a2850793a7cb7f839a4db1cdea Mon Sep 17 00:00:00 2001 From: Christian Clausen Date: Thu, 19 Dec 2024 16:50:23 +0100 Subject: [PATCH] Publish --- CHANGELOG.md | 7 + Execute.js | 165 ++-- Execute.ts | 186 +++-- executors.js | 15 - executors.ts | 19 +- newCommands/build.js | 6 +- newCommands/build.ts | 6 +- newCommands/deploy.js | 51 +- newCommands/deploy.ts | 53 +- newCommands/index.js | 14 +- newCommands/index.ts | 14 +- newCommands/repo.js | 36 +- newCommands/repo.ts | 58 +- package-lock.json | 1799 ++++++----------------------------------- package.json | 3 +- simulator.js | 395 --------- simulator.ts | 524 ------------ templates.ts | 4 +- utils.js | 15 + utils.ts | 13 + 20 files changed, 580 insertions(+), 2803 deletions(-) delete mode 100644 simulator.js delete mode 100644 simulator.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 52edc76..bcdc783 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ ## Fixes and improvements - +# 4.5.1 +## Fixes and improvements +- CORS in `sim` to allow setting content-type +- `delete` service group now works +- `deploy` targets the remote's HEAD branch instead of always `main` +- `build` skips npm install more often + # 4.5.0 ## Added features - `repo` option to `duplicate` an existing repo diff --git a/Execute.js b/Execute.js index 64d3fd2..b8346dc 100644 --- a/Execute.js +++ b/Execute.js @@ -1,4 +1,4 @@ -import { detectProjectType, RUN_COMMAND } from "@merrymake/detect-project-type"; +import { detectProjectType, ProjectTypes, } from "@merrymake/detect-project-type"; import { spawn, } from "child_process"; import cookieParser from "cookie-parser"; import express from "express"; @@ -13,22 +13,27 @@ function timedOutput(str, prefix) { printWithPrefix(str, prefix); spacerTimer = setTimeout(() => console.log(""), 10000); } -function prep(folder, runCommand, env, displayFolder) { - const runCmd = runCommand(folder.toString()); - const [cmd, ...args] = runCmd.split(" "); - const options = { - cwd: folder.toString(), - env, - shell: "sh", - }; - const p = spawn(cmd, args, options); - p.stdout.on("data", (data) => { - timedOutput(`${data.toString()}`, `${GRAY}${displayFolder}: ${NORMAL_COLOR}`); - }); - p.stderr.on("data", (data) => { - timedOutput(`${data.toString()}${NORMAL_COLOR}`, `${GRAY}${displayFolder}: ${RED}`); - }); - return p; +async function prep(folder, runCommand, env, displayFolder) { + try { + const runCmd = await runCommand(folder.toString()); + const [cmd, ...args] = runCmd.split(" "); + const options = { + cwd: folder.toString(), + env, + shell: "sh", + }; + const p = spawn(cmd, args, options); + p.stdout.on("data", (data) => { + timedOutput(`${data.toString()}`, `${GRAY}${displayFolder}: ${NORMAL_COLOR}`); + }); + p.stderr.on("data", (data) => { + timedOutput(`${data.toString()}${NORMAL_COLOR}`, `${GRAY}${displayFolder}: ${RED}`); + }); + return p; + } + catch (e) { + throw e; + } } function run(p, action, envelope, payload) { return new Promise((resolve) => { @@ -50,68 +55,72 @@ function pack(...buffers) { buffers.forEach((x) => result.push(numberToBuffer(x.length), x)); return Buffer.concat(result); } -function execute(handle, pathToRoot, group, repo, action, envelope, payload) { - const server = net.createServer((socket) => { - socket.on("end", () => { - socket.end(); - }); - socket.on("close", () => { - server.close(); - }); - let missing = 0; - const parsed = []; - let buffer = Buffer.alloc(0); - socket.on("data", (buf) => { - buffer = Buffer.concat([buffer, buf]); - while (true) { - if (missing === 0) { - if (buffer.length < 3) { - return; +async function execute(handle, pathToRoot, group, repo, action, envelope, payload) { + try { + const server = net.createServer((socket) => { + socket.on("end", () => { + socket.end(); + }); + socket.on("close", () => { + server.close(); + }); + let missing = 0; + const parsed = []; + let buffer = Buffer.alloc(0); + socket.on("data", (buf) => { + buffer = Buffer.concat([buffer, buf]); + while (true) { + if (missing === 0) { + if (buffer.length < 3) { + return; + } + missing = bufferToNumber(buffer); + buffer = buffer.subarray(3); } - missing = bufferToNumber(buffer); - buffer = buffer.subarray(3); - } - if (missing === 0) { - parsed.push(Buffer.alloc(0)); - if (parsed.length === 2) { - const [event, payload] = parsed.splice(0, 2); - handle(event.toString(), payload); + if (missing === 0) { + parsed.push(Buffer.alloc(0)); + if (parsed.length === 2) { + const [event, payload] = parsed.splice(0, 2); + handle(event.toString(), payload); + } + continue; } - continue; - } - if (buffer.length >= missing) { - parsed.push(buffer.subarray(0, missing)); - buffer = buffer.subarray(missing); - missing = 0; - if (parsed.length === 2) { - const [event, payload] = parsed.splice(0, 2); - handle(event.toString(), payload); + if (buffer.length >= missing) { + parsed.push(buffer.subarray(0, missing)); + buffer = buffer.subarray(missing); + missing = 0; + if (parsed.length === 2) { + const [event, payload] = parsed.splice(0, 2); + handle(event.toString(), payload); + } + } + else { + return; } } - else { - return; - } - } - }); - }); - server.listen(() => { }); - const env = process.env || {}; - env.RAPIDS = `localhost:${server.address().port}`; - if (fs.existsSync(pathToRoot.with(group).with("env.kv").toString())) { - fs.readFileSync(pathToRoot.with(group).with("env.kv").toString(), "utf-8") - .split(/\r?\n/) - .forEach((x) => { - if (!x.includes("=")) - return; - const b = x.split("="); - env[b[0]] = b[1]; + }); }); + server.listen(() => { }); + const env = process.env || {}; + env.RAPIDS = `localhost:${server.address().port}`; + if (fs.existsSync(pathToRoot.with(group).with("env.kv").toString())) { + fs.readFileSync(pathToRoot.with(group).with("env.kv").toString(), "utf-8") + .split(/\r?\n/) + .forEach((x) => { + if (!x.includes("=")) + return; + const b = x.split("="); + env[b[0]] = b[1]; + }); + } + const folder = pathToRoot.with(group).with(repo); + const pType = await detectProjectType(folder.toString()); + const p = await prep(folder, (folder) => ProjectTypes[pType].runCommand(folder), env, `${envelope.traceId}:${group}/${repo}`); + return run(p, action, envelope, payload); + } + catch (e) { + throw e; } - const folder = pathToRoot.with(group).with(repo); - const type = detectProjectType(folder.toString()); - const runCommand = RUN_COMMAND[type]; - const p = prep(folder, runCommand, env, `${envelope.traceId}:${group}/${repo}`); - return run(p, action, envelope, payload); } function parseMerrymakeJson(folder, event) { if (!fs.existsSync(folder.with("merrymake.json").toString())) @@ -251,6 +260,7 @@ class Simulator { start() { return new Promise((resolve) => { const app = express(); + const withSession = cookieParser(); app.use((req, res, next) => { if (req.is("multipart/form-data") || req.is("application/x-www-form-urlencoded")) { @@ -260,7 +270,13 @@ class Simulator { express.raw({ type: "*/*", limit: "10mb" })(req, res, next); } }); - const withSession = cookieParser(); + // CORS + app.options("/:event", withSession, async (req, res) => { + res.set("Access-Control-Allow-Origin", "*"); + res.set("Access-Control-Allow-Headers", "Content-Type"); + res.send("Ok"); + }); + // NORMAL EVENTS app.get("/:event", withSession, (req, res) => { let event = req.params.event; let payload = Buffer.from(JSON.stringify(req.query)); @@ -360,6 +376,7 @@ ${NORMAL_COLOR}`); } async handleEndpoint(req, resp, event, payload) { resp.set("Access-Control-Allow-Origin", "*"); + resp.set("Access-Control-Allow-Headers", "Content-Type"); const headers = (() => { const filtered = Object.keys(req.headersDistinct).filter((k) => !USUAL_HEADERS.has(k)); if (filtered.length === 0) diff --git a/Execute.ts b/Execute.ts index 2cbe4bd..7995303 100644 --- a/Execute.ts +++ b/Execute.ts @@ -1,4 +1,7 @@ -import { detectProjectType, RUN_COMMAND } from "@merrymake/detect-project-type"; +import { + detectProjectType, + ProjectTypes, +} from "@merrymake/detect-project-type"; import { ChildProcessWithoutNullStreams, ExecOptions, @@ -50,33 +53,37 @@ function timedOutput(str: string, prefix?: string) { spacerTimer = setTimeout(() => console.log(""), 10000); } -function prep( +async function prep( folder: PathToRepository, - runCommand: (folder: string) => string, + runCommand: (folder: string) => Promise, env: NodeJS.ProcessEnv, displayFolder: string ) { - const runCmd = runCommand(folder.toString()); - const [cmd, ...args] = runCmd.split(" "); - const options: ExecOptions = { - cwd: folder.toString(), - env, - shell: "sh", - }; - const p = spawn(cmd, args, options); - p.stdout.on("data", (data: Buffer) => { - timedOutput( - `${data.toString()}`, - `${GRAY}${displayFolder}: ${NORMAL_COLOR}` - ); - }); - p.stderr.on("data", (data: Buffer) => { - timedOutput( - `${data.toString()}${NORMAL_COLOR}`, - `${GRAY}${displayFolder}: ${RED}` - ); - }); - return p; + try { + const runCmd = await runCommand(folder.toString()); + const [cmd, ...args] = runCmd.split(" "); + const options: ExecOptions = { + cwd: folder.toString(), + env, + shell: "sh", + }; + const p = spawn(cmd, args, options); + p.stdout.on("data", (data: Buffer) => { + timedOutput( + `${data.toString()}`, + `${GRAY}${displayFolder}: ${NORMAL_COLOR}` + ); + }); + p.stderr.on("data", (data: Buffer) => { + timedOutput( + `${data.toString()}${NORMAL_COLOR}`, + `${GRAY}${displayFolder}: ${RED}` + ); + }); + return p; + } catch (e) { + throw e; + } } function run( @@ -108,7 +115,7 @@ function pack(...buffers: Buffer[]) { return Buffer.concat(result); } -function execute( +async function execute( handle: (event: string, payload: Buffer) => void, pathToRoot: PathToOrganization, group: string, @@ -117,70 +124,73 @@ function execute( envelope: Envelope, payload: Buffer ) { - const server = net.createServer((socket: net.Socket) => { - socket.on("end", () => { - socket.end(); - }); - socket.on("close", () => { - server.close(); - }); - let missing = 0; - const parsed: Buffer[] = []; - let buffer = Buffer.alloc(0); - socket.on("data", (buf: Buffer) => { - buffer = Buffer.concat([buffer, buf]); - while (true) { - if (missing === 0) { - if (buffer.length < 3) { - return; + try { + const server = net.createServer((socket: net.Socket) => { + socket.on("end", () => { + socket.end(); + }); + socket.on("close", () => { + server.close(); + }); + let missing = 0; + const parsed: Buffer[] = []; + let buffer = Buffer.alloc(0); + socket.on("data", (buf: Buffer) => { + buffer = Buffer.concat([buffer, buf]); + while (true) { + if (missing === 0) { + if (buffer.length < 3) { + return; + } + missing = bufferToNumber(buffer); + buffer = buffer.subarray(3); } - missing = bufferToNumber(buffer); - buffer = buffer.subarray(3); - } - if (missing === 0) { - parsed.push(Buffer.alloc(0)); - if (parsed.length === 2) { - const [event, payload] = parsed.splice(0, 2); - handle(event.toString(), payload); + if (missing === 0) { + parsed.push(Buffer.alloc(0)); + if (parsed.length === 2) { + const [event, payload] = parsed.splice(0, 2); + handle(event.toString(), payload); + } + continue; } - continue; - } - if (buffer.length >= missing) { - parsed.push(buffer.subarray(0, missing)); - buffer = buffer.subarray(missing); - missing = 0; - if (parsed.length === 2) { - const [event, payload] = parsed.splice(0, 2); - handle(event.toString(), payload); + if (buffer.length >= missing) { + parsed.push(buffer.subarray(0, missing)); + buffer = buffer.subarray(missing); + missing = 0; + if (parsed.length === 2) { + const [event, payload] = parsed.splice(0, 2); + handle(event.toString(), payload); + } + } else { + return; } - } else { - return; } - } - }); - }); - server.listen(() => {}); - const env = process.env || {}; - env.RAPIDS = `localhost:${(server.address() as net.AddressInfo).port}`; - if (fs.existsSync(pathToRoot.with(group).with("env.kv").toString())) { - fs.readFileSync(pathToRoot.with(group).with("env.kv").toString(), "utf-8") - .split(/\r?\n/) - .forEach((x) => { - if (!x.includes("=")) return; - const b = x.split("="); - env[b[0]] = b[1]; }); + }); + server.listen(() => {}); + const env = process.env || {}; + env.RAPIDS = `localhost:${(server.address() as net.AddressInfo).port}`; + if (fs.existsSync(pathToRoot.with(group).with("env.kv").toString())) { + fs.readFileSync(pathToRoot.with(group).with("env.kv").toString(), "utf-8") + .split(/\r?\n/) + .forEach((x) => { + if (!x.includes("=")) return; + const b = x.split("="); + env[b[0]] = b[1]; + }); + } + const folder = pathToRoot.with(group).with(repo); + const pType = await detectProjectType(folder.toString()); + const p = await prep( + folder, + (folder) => ProjectTypes[pType].runCommand(folder), + env, + `${envelope.traceId}:${group}/${repo}` + ); + return run(p, action, envelope, payload); + } catch (e) { + throw e; } - const folder = pathToRoot.with(group).with(repo); - const type = detectProjectType(folder.toString()); - const runCommand = RUN_COMMAND[type]; - const p = prep( - folder, - runCommand, - env, - `${envelope.traceId}:${group}/${repo}` - ); - return run(p, action, envelope, payload); } function parseMerrymakeJson(folder: PathTo, event: string) { @@ -339,6 +349,7 @@ class Simulator { start() { return new Promise((resolve) => { const app = express(); + const withSession: RequestHandler<{ event: string }> = cookieParser(); app.use((req, res, next) => { if ( req.is("multipart/form-data") || @@ -349,7 +360,13 @@ class Simulator { express.raw({ type: "*/*", limit: "10mb" })(req, res, next); } }); - const withSession: RequestHandler<{ event: string }> = cookieParser(); + // CORS + app.options("/:event", withSession, async (req, res) => { + res.set("Access-Control-Allow-Origin", "*"); + res.set("Access-Control-Allow-Headers", "Content-Type"); + res.send("Ok"); + }); + // NORMAL EVENTS app.get("/:event", withSession, (req, res) => { let event = req.params.event; let payload: Buffer = Buffer.from(JSON.stringify(req.query)); @@ -475,6 +492,7 @@ ${NORMAL_COLOR}`); payload: Buffer ) { resp.set("Access-Control-Allow-Origin", "*"); + resp.set("Access-Control-Allow-Headers", "Content-Type"); const headers = (() => { const filtered = Object.keys(req.headersDistinct).filter( (k) => !USUAL_HEADERS.has(k) diff --git a/executors.js b/executors.js index 6236848..4db4532 100644 --- a/executors.js +++ b/executors.js @@ -1,4 +1,3 @@ -import { BUILD_SCRIPT_MAKERS, detectProjectType, } from "@merrymake/detect-project-type"; import { spawn } from "child_process"; import fs from "fs"; import { stdout } from "process"; @@ -26,20 +25,6 @@ function spawnPromise(str) { }); }); } -export async function do_build() { - try { - const projectType = detectProjectType("."); - outputGit(`Building ${projectType} project...`); - const buildCommands = BUILD_SCRIPT_MAKERS[projectType]("."); - for (let i = 0; i < buildCommands.length; i++) { - const x = buildCommands[i]; - await spawnPromise(x); - } - } - catch (e) { - throw e; - } -} export function alignRight(str, width) { return str.length > width ? str.substring(0, width - 3) + "..." diff --git a/executors.ts b/executors.ts index cf85f23..4cbf665 100644 --- a/executors.ts +++ b/executors.ts @@ -1,7 +1,4 @@ -import { - BUILD_SCRIPT_MAKERS, - detectProjectType, -} from "@merrymake/detect-project-type"; +import { detectProjectType } from "@merrymake/detect-project-type"; import { ExecOptions, spawn } from "child_process"; import fs from "fs"; import { stdout } from "process"; @@ -29,20 +26,6 @@ function spawnPromise(str: string) { }); } -export async function do_build() { - try { - const projectType = detectProjectType("."); - outputGit(`Building ${projectType} project...`); - const buildCommands = BUILD_SCRIPT_MAKERS[projectType]("."); - for (let i = 0; i < buildCommands.length; i++) { - const x = buildCommands[i]; - await spawnPromise(x); - } - } catch (e) { - throw e; - } -} - export function alignRight(str: string, width: number) { return str.length > width ? str.substring(0, width - 3) + "..." diff --git a/newCommands/build.js b/newCommands/build.js index dda7aaf..53cda44 100644 --- a/newCommands/build.js +++ b/newCommands/build.js @@ -1,10 +1,10 @@ -import { BUILD_SCRIPT_MAKERS, detectProjectType, } from "@merrymake/detect-project-type"; +import { detectProjectType, ProjectTypes, } from "@merrymake/detect-project-type"; import { addToExecuteQueue, finish, outputGit, spawnPromise, } from "../utils.js"; export async function do_build() { try { - const projectType = detectProjectType("."); + const projectType = await detectProjectType("."); outputGit(`Building ${projectType} project...`); - const buildCommands = BUILD_SCRIPT_MAKERS[projectType]("."); + const buildCommands = await ProjectTypes[projectType].build("."); for (let i = 0; i < buildCommands.length; i++) { const x = buildCommands[i]; await spawnPromise(x); diff --git a/newCommands/build.ts b/newCommands/build.ts index 29a0520..1db39d3 100644 --- a/newCommands/build.ts +++ b/newCommands/build.ts @@ -1,6 +1,6 @@ import { - BUILD_SCRIPT_MAKERS, detectProjectType, + ProjectTypes, } from "@merrymake/detect-project-type"; import { addToExecuteQueue, @@ -11,9 +11,9 @@ import { export async function do_build() { try { - const projectType = detectProjectType("."); + const projectType = await detectProjectType("."); outputGit(`Building ${projectType} project...`); - const buildCommands = BUILD_SCRIPT_MAKERS[projectType]("."); + const buildCommands = await ProjectTypes[projectType].build("."); for (let i = 0; i < buildCommands.length; i++) { const x = buildCommands[i]; await spawnPromise(x); diff --git a/newCommands/deploy.js b/newCommands/deploy.js index 64e88d4..844d613 100644 --- a/newCommands/deploy.js +++ b/newCommands/deploy.js @@ -1,5 +1,5 @@ import { choice, Formatting, output, shortText } from "../prompt.js"; -import { addToExecuteQueue, execStreamPromise, finish, outputGit, spawnPromise, } from "../utils.js"; +import { addToExecuteQueue, execStreamPromise, execute, finish, outputGit, spawnPromise, } from "../utils.js"; /* [remove .gitignored files] [clean workspace] @@ -31,20 +31,6 @@ async function do_deploy_internal(commit) { throw e; } } -async function executeAndPrint(command) { - try { - const result = []; - const onData = (s) => { - result.push(s); - outputGit(s); - }; - await execStreamPromise(command, onData); - return result.join(""); - } - catch (e) { - throw e; - } -} export async function do_deploy(pathToService) { try { const before = process.cwd(); @@ -64,10 +50,14 @@ function redeploy() { addToExecuteQueue(() => do_redeploy()); return finish(); } -async function rebaseOntoMain() { +async function rebaseOntoMain(monorepo) { try { - const output = await executeAndPrint(`git fetch && ({ ! git ls-remote --exit-code origin main; } || git rebase origin/main) && git push origin HEAD:main 2>&1`); - if (output.trimEnd().endsWith("Everything up-to-date")) + const remoteHead = ((a) => { + const mat = a.match(/ref: refs\/heads\/(.+)\t/); + return mat === null ? undefined : mat[1]; + })(await execute(`git ls-remote --symref origin HEAD 2>&1`)); + const output = await execute(`git fetch && ({ ! git ls-remote --exit-code origin ${remoteHead} >/dev/null; } || git rebase origin/${remoteHead}) && git push origin HEAD:${remoteHead} 2>&1`, true); + if (output.trimEnd().endsWith("Everything up-to-date") && !monorepo) { return choice("Would you like to redeploy?", [ { long: "again", @@ -75,27 +65,28 @@ async function rebaseOntoMain() { action: () => redeploy(), }, ], { disableAutoPick: true }); + } return finish(); } catch (e) { throw e; } } -async function getMessage() { +async function getMessage(monorepo) { try { - output("Describe your changes (optional):\n"); + output("Describe your changes (optional):"); const message = await shortText("This commit will ", "Write in future tense 'refactor module X'", null, { formatting: Formatting.Minimal }); const msg = message.length === 0 ? "[No message]" : message[0].toUpperCase() + message.substring(1); await spawnPromise(`git commit -m "${msg}"`); - return rebaseOntoMain(); + return rebaseOntoMain(monorepo); } catch (e) { throw e; } } -export async function deploy() { +export async function deploy(monorepo) { try { const dirty = await (async () => { try { @@ -106,21 +97,7 @@ export async function deploy() { return true; } })(); - return dirty ? getMessage() : rebaseOntoMain(); - // const didDeploy = await do_deploy(new PathToRepository(".")); - // if (didDeploy) return finish(); - // else - // return choice( - // "Would you like to redeploy?", - // [ - // { - // long: "again", - // text: "deploy again", - // action: () => redeploy(), - // }, - // ], - // { disableAutoPick: true } - // ); + return dirty ? getMessage(monorepo) : rebaseOntoMain(monorepo); } catch (e) { throw e; diff --git a/newCommands/deploy.ts b/newCommands/deploy.ts index 0d0702a..0adea4f 100644 --- a/newCommands/deploy.ts +++ b/newCommands/deploy.ts @@ -1,8 +1,10 @@ +import { existsSync } from "node:fs"; import { choice, Formatting, output, shortText } from "../prompt.js"; import { PathToRepository } from "../types.js"; import { addToExecuteQueue, execStreamPromise, + execute, finish, outputGit, spawnPromise, @@ -43,19 +45,6 @@ async function do_deploy_internal(commit: string) { throw e; } } -async function executeAndPrint(command: string) { - try { - const result: string[] = []; - const onData = (s: string) => { - result.push(s); - outputGit(s); - }; - await execStreamPromise(command, onData); - return result.join(""); - } catch (e) { - throw e; - } -} export async function do_deploy(pathToService: PathToRepository) { try { @@ -81,12 +70,17 @@ function redeploy() { return finish(); } -async function rebaseOntoMain() { +async function rebaseOntoMain(monorepo: boolean) { try { - const output = await executeAndPrint( - `git fetch && ({ ! git ls-remote --exit-code origin main; } || git rebase origin/main) && git push origin HEAD:main 2>&1` + const remoteHead = ((a) => { + const mat = a.match(/ref: refs\/heads\/(.+)\t/); + return mat === null ? undefined : mat[1]; + })(await execute(`git ls-remote --symref origin HEAD 2>&1`)); + const output = await execute( + `git fetch && ({ ! git ls-remote --exit-code origin ${remoteHead} >/dev/null; } || git rebase origin/${remoteHead}) && git push origin HEAD:${remoteHead} 2>&1`, + true ); - if (output.trimEnd().endsWith("Everything up-to-date")) + if (output.trimEnd().endsWith("Everything up-to-date") && !monorepo) { return choice( "Would you like to redeploy?", [ @@ -98,15 +92,16 @@ async function rebaseOntoMain() { ], { disableAutoPick: true } ); + } return finish(); } catch (e) { throw e; } } -async function getMessage() { +async function getMessage(monorepo: boolean) { try { - output("Describe your changes (optional):\n"); + output("Describe your changes (optional):"); const message = await shortText( "This commit will ", "Write in future tense 'refactor module X'", @@ -118,13 +113,13 @@ async function getMessage() { ? "[No message]" : message[0].toUpperCase() + message.substring(1); await spawnPromise(`git commit -m "${msg}"`); - return rebaseOntoMain(); + return rebaseOntoMain(monorepo); } catch (e) { throw e; } } -export async function deploy() { +export async function deploy(monorepo: boolean) { try { const dirty = await (async () => { try { @@ -136,21 +131,7 @@ export async function deploy() { return true; } })(); - return dirty ? getMessage() : rebaseOntoMain(); - // const didDeploy = await do_deploy(new PathToRepository(".")); - // if (didDeploy) return finish(); - // else - // return choice( - // "Would you like to redeploy?", - // [ - // { - // long: "again", - // text: "deploy again", - // action: () => redeploy(), - // }, - // ], - // { disableAutoPick: true } - // ); + return dirty ? getMessage(monorepo) : rebaseOntoMain(monorepo); } catch (e) { throw e; } diff --git a/newCommands/index.js b/newCommands/index.js index 6bce702..86dc735 100644 --- a/newCommands/index.js +++ b/newCommands/index.js @@ -10,7 +10,7 @@ import { deploy } from "./deploy.js"; import { envvar } from "./envvar.js"; import { event } from "./event.js"; import { fetch } from "./fetch.js"; -import { group } from "./group.js"; +import { deleteServiceGroup, group } from "./group.js"; import { BITBUCKET_FILE, hosting } from "./hosting.js"; import { orgAction, rename } from "./org.js"; import { queue } from "./queue.js"; @@ -41,7 +41,6 @@ async function getContext() { pathTo: new PathToRepository(out), }; } - // TODO bitbucket } else if (fs.existsSync(path.join(out, ".group-id"))) { serviceGroup = { @@ -55,7 +54,8 @@ async function getContext() { id: new OrganizationId(orgFile.organizationId), pathTo: new PathToOrganization(out), }; - return { repository, serviceGroup, organization, inGit }; + const monorepo = fs.existsSync(path.join(out, ".git")); + return { repository, serviceGroup, organization, inGit, monorepo }; } out = path.join(out, ".."); } @@ -63,19 +63,21 @@ async function getContext() { repository, serviceGroup, organization, + inGit, + monorepo: false, }; } export async function index() { try { const options = []; - const { repository, serviceGroup, organization, inGit } = await getContext(); + const { repository, serviceGroup, organization, inGit, monorepo } = await getContext(); if (inGit) { options.push({ long: "deploy", short: "d", text: "deploy service with git", weight: 900, - action: () => deploy(), + action: () => deploy(monorepo), }); } if (repository !== undefined) { @@ -127,7 +129,7 @@ export async function index() { short: "d", text: "delete a service group", weight: 100, - action: () => hosting(organization), + action: () => deleteServiceGroup(organization.id), }, { long: "group", short: "g", diff --git a/newCommands/index.ts b/newCommands/index.ts index 6dc7819..a64f249 100644 --- a/newCommands/index.ts +++ b/newCommands/index.ts @@ -21,7 +21,7 @@ import { deploy } from "./deploy.js"; import { envvar } from "./envvar.js"; import { event } from "./event.js"; import { fetch } from "./fetch.js"; -import { group } from "./group.js"; +import { deleteServiceGroup, group } from "./group.js"; import { BITBUCKET_FILE, hosting } from "./hosting.js"; import { orgAction, rename } from "./org.js"; import { queue } from "./queue.js"; @@ -53,7 +53,6 @@ async function getContext() { pathTo: new PathToRepository(out), }; } - // TODO bitbucket } else if (fs.existsSync(path.join(out, ".group-id"))) { serviceGroup = { id: new ServiceGroupId( @@ -69,7 +68,8 @@ async function getContext() { id: new OrganizationId(orgFile.organizationId), pathTo: new PathToOrganization(out), }; - return { repository, serviceGroup, organization, inGit }; + const monorepo = fs.existsSync(path.join(out, ".git")); + return { repository, serviceGroup, organization, inGit, monorepo }; } out = path.join(out, ".."); } @@ -77,13 +77,15 @@ async function getContext() { repository, serviceGroup, organization, + inGit, + monorepo: false, }; } export async function index() { try { const options: (Option & { weight: number })[] = []; - const { repository, serviceGroup, organization, inGit } = + const { repository, serviceGroup, organization, inGit, monorepo } = await getContext(); if (inGit) { options.push({ @@ -91,7 +93,7 @@ export async function index() { short: "d", text: "deploy service with git", weight: 900, - action: () => deploy(), + action: () => deploy(monorepo), }); } if (repository !== undefined) { @@ -150,7 +152,7 @@ export async function index() { short: "d", text: "delete a service group", weight: 100, - action: () => hosting(organization), + action: () => deleteServiceGroup(organization.id), }, { long: "group", diff --git a/newCommands/repo.js b/newCommands/repo.js index 53cf597..4b069ca 100644 --- a/newCommands/repo.js +++ b/newCommands/repo.js @@ -1,4 +1,4 @@ -import { VERSION_CMD } from "@merrymake/detect-project-type"; +import { ProjectTypes } from "@merrymake/detect-project-type"; import fs from "fs"; import { GIT_HOST } from "../config.js"; import { choice, shortText } from "../prompt.js"; @@ -75,12 +75,17 @@ export async function do_createService(organization, serviceGroup, folderName, d } export async function service_template(pathToService, organizationId, template) { try { - const langs = await Promise.all(templates[template].languages.map((x, i) => (async () => ({ - ...languages[x], - weight: (await Promise.all(Object.keys(VERSION_CMD[languages[x].projectType]).map((k) => execPromise(VERSION_CMD[languages[x].projectType][k]) - .then((r) => 1) - .catch((e) => -1)))).reduce((a, x) => a * x, i), - }))())); + const langs = await Promise.all(templates[template].languages.map((x, i) => (async () => { + const versionCommands = ProjectTypes[languages[x].projectType].versionCommands(); + return { + ...languages[x], + weight: (await Promise.all(Object.keys(versionCommands).map((k) => versionCommands[k] === undefined + ? 1 + : execPromise(versionCommands[k]) + .then((r) => 1) + .catch((e) => 0)))).reduce((a, x) => a * x, i), + }; + })())); langs.sort((a, b) => b.weight - a.weight); return await choice("Which programming language would you like to use?", langs.map((x) => ({ long: x.long, @@ -178,12 +183,17 @@ export async function repo_create(organization, serviceGroup) { action: () => duplicate(pathToRepository, organization.id, serviceGroup.id), }); } - const langs = await Promise.all(templates.basic.languages.map((x, i) => (async () => ({ - ...languages[x], - weight: (await Promise.all(Object.keys(VERSION_CMD[languages[x].projectType]).map((k) => execPromise(VERSION_CMD[languages[x].projectType][k]) - .then((r) => 1) - .catch((e) => -1)))).reduce((a, x) => a * x, i), - }))())); + const langs = await Promise.all(templates.basic.languages.map((x, i) => (async () => { + const versionCommands = ProjectTypes[languages[x].projectType].versionCommands(); + return { + ...languages[x], + weight: (await Promise.all(Object.keys(versionCommands).map((k) => versionCommands[k] === undefined + ? 1 + : execPromise(versionCommands[k]) + .then((r) => 1) + .catch((e) => 0)))).reduce((a, x) => a * x, i), + }; + })())); langs.sort((a, b) => b.weight - a.weight); langs.forEach((x) => options.push({ long: x.long, diff --git a/newCommands/repo.ts b/newCommands/repo.ts index 0ecc9ed..7a22ad0 100644 --- a/newCommands/repo.ts +++ b/newCommands/repo.ts @@ -1,4 +1,4 @@ -import { VERSION_CMD } from "@merrymake/detect-project-type"; +import { ProjectTypes } from "@merrymake/detect-project-type"; import fs from "fs"; import { GIT_HOST } from "../config.js"; import { Option, choice, shortText } from "../prompt.js"; @@ -139,18 +139,24 @@ export async function service_template( try { const langs = await Promise.all( templates[template].languages.map((x, i) => - (async () => ({ - ...languages[x], - weight: ( - await Promise.all( - Object.keys(VERSION_CMD[languages[x].projectType]).map((k) => - execPromise(VERSION_CMD[languages[x].projectType][k]) - .then((r) => 1) - .catch((e) => -1) + (async () => { + const versionCommands = + ProjectTypes[languages[x].projectType].versionCommands(); + return { + ...languages[x], + weight: ( + await Promise.all( + Object.keys(versionCommands).map((k) => + versionCommands[k] === undefined + ? 1 + : execPromise(versionCommands[k]) + .then((r) => 1) + .catch((e) => 0) + ) ) - ) - ).reduce((a, x) => a * x, i), - }))() + ).reduce((a, x) => a * x, i), + }; + })() ) ); langs.sort((a, b) => b.weight - a.weight); @@ -312,18 +318,24 @@ export async function repo_create( } const langs = await Promise.all( templates.basic.languages.map((x, i) => - (async () => ({ - ...languages[x], - weight: ( - await Promise.all( - Object.keys(VERSION_CMD[languages[x].projectType]).map((k) => - execPromise(VERSION_CMD[languages[x].projectType][k]) - .then((r) => 1) - .catch((e) => -1) + (async () => { + const versionCommands = + ProjectTypes[languages[x].projectType].versionCommands(); + return { + ...languages[x], + weight: ( + await Promise.all( + Object.keys(versionCommands).map((k) => + versionCommands[k] === undefined + ? 1 + : execPromise(versionCommands[k]) + .then((r) => 1) + .catch((e) => 0) + ) ) - ) - ).reduce((a, x) => a * x, i), - }))() + ).reduce((a, x) => a * x, i), + }; + })() ) ); langs.sort((a, b) => b.weight - a.weight); diff --git a/package-lock.json b/package-lock.json index 7b11e2d..76eba00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@merrymake/cli", - "version": "4.3.1", + "version": "4.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@merrymake/cli", - "version": "4.3.1", + "version": "4.5.0", "license": "ISC", "dependencies": { "@merrymake/detect-project-type": "latest", @@ -23,180 +23,53 @@ "@tsconfig/node-lts": "latest", "@types/cookie-parser": "latest", "@types/express": "latest", - "@types/node": "latest", - "pkg": "latest" - } - }, - "node_modules/@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.19.0.tgz", - "integrity": "sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "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, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "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, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "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, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@types/node": "latest" } }, "node_modules/@merrymake/detect-project-type": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@merrymake/detect-project-type/-/detect-project-type-2.0.2.tgz", - "integrity": "sha512-YD8c2kKMOrjNm6u5rtIAs3kmvFG/RwY8h89etmWyiAR2OUM7wFWW8XYTLtER9EMD505haR6ggjcr5VPIkRUygw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@merrymake/detect-project-type/-/detect-project-type-4.0.0.tgz", + "integrity": "sha512-uCQTlagN530iJi9zrBfkpsPYO08nXqTM6rFj3cFBAu0iCXl91KVNKUWXKb/N7PWdVDVHdFVqmgrhLMPULjuy7A==", + "license": "ISC", "dependencies": { - "strip-json-comments": "^5.0.1" + "@merrymake/utils": "^1.0.0", + "strip-json-comments": "latest" } }, "node_modules/@merrymake/ext2mime": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@merrymake/ext2mime/-/ext2mime-1.0.3.tgz", - "integrity": "sha512-9RXGj3oIS6qybUvln4EkROWIdx9+yitKcdCUCtIJysyIKUnRh6mEtEjMqKn7ARCasC9O0p8TdcYzQqSADN7AQg==" + "integrity": "sha512-9RXGj3oIS6qybUvln4EkROWIdx9+yitKcdCUCtIJysyIKUnRh6mEtEjMqKn7ARCasC9O0p8TdcYzQqSADN7AQg==", + "license": "ISC" }, "node_modules/@merrymake/secret-lib": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@merrymake/secret-lib/-/secret-lib-1.0.0.tgz", - "integrity": "sha512-AVAoE+scMb0fveYzpjD+mGwaGgGG673JJaJlUS5PNJFSyKge7os3gTn0eQLXEw9werow2av3Hcy6zYSbuGvSIw==" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } + "integrity": "sha512-AVAoE+scMb0fveYzpjD+mGwaGgGG673JJaJlUS5PNJFSyKge7os3gTn0eQLXEw9werow2av3Hcy6zYSbuGvSIw==", + "license": "ISC" }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, + "node_modules/@merrymake/utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@merrymake/utils/-/utils-1.0.0.tgz", + "integrity": "sha512-L3kyyWvkgswKh97eRpWhFqWrV3X6//c8e2/GdtfUSgVqxCL1J8VdtbJDBnfuN3pBEjYob7nzoGX04ACEzU3K1A==", + "license": "ISC", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" + "@tsconfig/node-lts": "latest", + "@types/node": "latest" } }, "node_modules/@tsconfig/node-lts": { "version": "22.0.1", "resolved": "https://registry.npmjs.org/@tsconfig/node-lts/-/node-lts-22.0.1.tgz", "integrity": "sha512-BwlbLiYurZKrj+Pa6etSE1jXmr3VEDdgJto1jEYKcpBVwZZSWVkCPyFEFYbHdIOaFMlSTtV206DYPlT109aqug==", - "dev": true + "license": "MIT" }, "node_modules/@types/body-parser": { "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dev": true, + "license": "MIT", "dependencies": { "@types/connect": "*", "@types/node": "*" @@ -207,6 +80,7 @@ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -216,6 +90,7 @@ "resolved": "https://registry.npmjs.org/@types/cookie-parser/-/cookie-parser-1.4.8.tgz", "integrity": "sha512-l37JqFrOJ9yQfRQkljb41l0xVphc7kg5JTjjr+pLRZ0IyZ49V4BQ8vbF4Ut2C2e+WH4al3xD3ZwYwIUfnbT4NQ==", "dev": true, + "license": "MIT", "peerDependencies": { "@types/express": "*" } @@ -225,6 +100,7 @@ "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.0.tgz", "integrity": "sha512-DvZriSMehGHL1ZNLzi6MidnsDhUZM/x2pRdDIKdwbUNqqwHxMlRdkxtn6/EPKyqKpHqTl/4nRZsRNLpZxZRpPQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^5.0.0", @@ -237,6 +113,7 @@ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.2.tgz", "integrity": "sha512-vluaspfvWEtE4vcSDlKRNer52DvOGrB2xv6diXy6UKyKW0lqZiWHGNApSyxOv+8DE5Z27IzVvE7hNkxg7EXIcg==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -248,19 +125,21 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/mime": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { - "version": "22.10.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", - "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", - "dev": true, + "version": "22.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "license": "MIT", "dependencies": { "undici-types": "~6.20.0" } @@ -269,19 +148,22 @@ "version": "6.9.17", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz", "integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/send": { "version": "0.17.4", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", "dev": true, + "license": "MIT", "dependencies": { "@types/mime": "^1", "@types/node": "*" @@ -292,6 +174,7 @@ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dev": true, + "license": "MIT", "dependencies": { "@types/http-errors": "*", "@types/node": "*", @@ -302,6 +185,7 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -310,137 +194,17 @@ "node": ">= 0.6" } }, - "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, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/agent-base/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/agent-base/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" }, "node_modules/body-parser": { "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -460,123 +224,49 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, - "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, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "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" + "url": "https://github.com/sponsors/ljharb" } }, - "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/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" }, @@ -588,6 +278,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -596,6 +287,7 @@ "version": "0.7.2", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -604,6 +296,7 @@ "version": "1.4.7", "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.7.tgz", "integrity": "sha512-nGUvgXnotP3BsjiLX2ypbQnWoGUPIIfHQNZkkC668ntrzGWEZVW70HDEB1qnNGMicPje6EttlIgzo51YSwNQGw==", + "license": "MIT", "dependencies": { "cookie": "0.7.2", "cookie-signature": "1.0.6" @@ -615,66 +308,23 @@ "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "license": "MIT" }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -683,67 +333,46 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", "dependencies": { - "path-type": "^4.0.0" + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" }, "engines": { - "node": ">=8" + "node": ">= 0.4" } }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -752,45 +381,43 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", "engines": { "node": ">= 0.4" } }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, "engines": { - "node": ">=6" + "node": ">= 0.4" } }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/express": { - "version": "4.21.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", - "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -811,7 +438,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -826,57 +453,26 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/cookie": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/finalhandler": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "encodeurl": "~2.0.0", @@ -894,6 +490,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -902,68 +499,36 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.0" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "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, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dependencies": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", + "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -972,94 +537,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "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/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -1068,9 +550,10 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -1082,6 +565,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -1093,6 +577,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -1104,46 +589,11 @@ "node": ">= 0.8" } }, - "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, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/https-proxy-agent/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -1151,155 +601,35 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/into-stream": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", - "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", - "dev": true, - "dependencies": { - "from2": "^2.3.0", - "p-is-promise": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", "engines": { "node": ">= 0.10" } }, - "node_modules/is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "node": ">= 0.4" } }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1308,44 +638,25 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -1357,6 +668,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1365,6 +677,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -1372,126 +685,26 @@ "node": ">= 0.6" } }, - "node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/multistream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/multistream/-/multistream-4.1.0.tgz", - "integrity": "sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "once": "^1.4.0", - "readable-stream": "^3.6.0" - } - }, - "node_modules/multistream/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, - "node_modules/node-abi": { - "version": "3.71.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz", - "integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==", - "dev": true, - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/object-inspect": { "version": "1.13.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -1503,6 +716,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", "dependencies": { "ee-first": "1.1.1" }, @@ -1510,183 +724,39 @@ "node": ">= 0.8" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-is-promise": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", - "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/pkg/-/pkg-5.8.1.tgz", - "integrity": "sha512-CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA==", - "dev": true, - "dependencies": { - "@babel/generator": "7.18.2", - "@babel/parser": "7.18.4", - "@babel/types": "7.19.0", - "chalk": "^4.1.2", - "fs-extra": "^9.1.0", - "globby": "^11.1.0", - "into-stream": "^6.0.0", - "is-core-module": "2.9.0", - "minimist": "^1.2.6", - "multistream": "^4.1.0", - "pkg-fetch": "3.4.2", - "prebuild-install": "7.1.1", - "resolve": "^1.22.0", - "stream-meter": "^1.0.4" - }, - "bin": { - "pkg": "lib-es5/bin.js" - }, - "peerDependencies": { - "node-notifier": ">=9.0.1" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/pkg-fetch": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/pkg-fetch/-/pkg-fetch-3.4.2.tgz", - "integrity": "sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA==", - "dev": true, - "dependencies": { - "chalk": "^4.1.2", - "fs-extra": "^9.1.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.6", - "progress": "^2.0.3", - "semver": "^7.3.5", - "tar-fs": "^2.1.1", - "yargs": "^16.2.0" - }, - "bin": { - "pkg-fetch": "lib-es5/bin.js" - } - }, - "node_modules/prebuild-install": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", - "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", - "dev": true, - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/pump": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", - "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "engines": { + "node": ">= 0.10" } }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.6" }, @@ -1697,30 +767,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1729,6 +780,7 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "license": "MIT", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -1739,125 +791,6 @@ "node": ">= 0.8" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "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, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve/node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", - "dev": true, - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1875,29 +808,20 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "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" - } + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/send": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -1921,6 +845,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -1928,12 +853,14 @@ "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/serve-static": { "version": "1.16.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "license": "MIT", "dependencies": { "encodeurl": "~2.0.0", "escape-html": "~1.0.3", @@ -1944,36 +871,23 @@ "node": ">= 0.8.0" } }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -1982,146 +896,33 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/stream-meter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/stream-meter/-/stream-meter-1.0.4.tgz", - "integrity": "sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ==", - "dev": true, - "dependencies": { - "readable-stream": "^2.1.4" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" }, "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.1.tgz", - "integrity": "sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==", - "engines": { - "node": ">=14.16" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "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, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -2129,99 +930,60 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { - "node": ">=6" - } - }, - "node_modules/tar-stream/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "node": ">= 0.4" }, - "engines": { - "node": ">= 6" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", "engines": { - "node": ">=4" + "node": ">= 0.8" } }, - "node_modules/to-regex-range": { + "node_modules/strip-json-comments": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.1.tgz", + "integrity": "sha512-0fk9zBqO67Nq5M/m45qHCJxylV/DhBlIOVExqgOMiCCrzrhU6tCibRXNqE3jwJLftzE9SNuZtYbpzcO+i9FiKw==", + "license": "MIT", "engines": { - "node": ">=8.0" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", "engines": { "node": ">=0.6" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -2234,35 +996,22 @@ "version": "6.20.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "dev": true - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } + "license": "MIT" }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", "engines": { "node": ">= 0.8" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", "engines": { "node": ">= 0.4.0" } @@ -2271,84 +1020,10 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", "engines": { "node": ">= 0.8" } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.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, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "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, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } } } } diff --git a/package.json b/package.json index 312b54d..4dd8bc1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@merrymake/cli", - "version": "4.5.0", + "version": "4.5.1", "description": "", "main": "index.js", "type": "module", @@ -34,7 +34,6 @@ "@types/cookie-parser": "latest", "@types/express": "latest", "@types/node": "latest", - "pkg": "latest", "@tsconfig/node-lts": "latest" } } diff --git a/simulator.js b/simulator.js deleted file mode 100644 index 4d36c8a..0000000 --- a/simulator.js +++ /dev/null @@ -1,395 +0,0 @@ -import { detectProjectType, RUN_COMMAND, } from "@merrymake/detect-project-type"; -import { spawn } from "child_process"; -import cookieParser from "cookie-parser"; -import express from "express"; -import fs from "fs"; -import http from "http"; -import { NORMAL_COLOR, YELLOW } from "./prompt.js"; -import { directoryNames, fetchOrg, outputGit, Path } from "./utils.js"; -const MILLISECONDS = 1; -const SECONDS = 1000 * MILLISECONDS; -const MINUTES = 60 * SECONDS; -const HOURS = 60 * MINUTES; -const DEFAULT_TIMEOUT = 5 * MINUTES; -export class Run { - port; - hooks; - pathToRoot; - constructor(port) { - this.port = port; - const { pathToRoot } = fetchOrg(); - this.pathToRoot = pathToRoot; - } - execute() { - return new Promise((resolve) => { - const app = express(); - const server = http.createServer(app); - const withSession = cookieParser(); - app.use((req, res, next) => { - if (req.is("multipart/form-data") || - req.is("application/x-www-form-urlencoded")) { - express.urlencoded({ extended: true, limit: "10mb" })(req, res, next); - } - else { - express.raw({ type: "*/*", limit: "10mb" })(req, res, next); - } - }); - app.post("/trace/:sessionId/:traceId/:event", async (req, res) => { - try { - const traceId = req.params.traceId; - const sessionId = req.params.sessionId; - const event = req.params.event; - const payload = req.body; - this.runService(this.pathToRoot, this.port, event, payload, traceId, sessionId, this.hooks, req.headers["content-type"]); - res.send("Done"); - } - catch (e) { - if (e.data !== undefined) - console.log("" + e.data); - else - throw e; - } - }); - app.get("/rapids/:event", withSession, async (req, res) => { - try { - const payload = Buffer.from(JSON.stringify(req.query)); - await this.processEvent(req, res, payload); - } - catch (e) { - if (e.data !== undefined) - reply(res, e, undefined); - else - throw e; - } - }); - app.all("/rapids/:event", withSession, async (req, res) => { - try { - const payload = !Buffer.isBuffer(req.body) - ? typeof req.body === "object" - ? Buffer.from(JSON.stringify(req.body)) - : Buffer.from(req.body) - : req.body; - await this.processEvent(req, res, payload); - } - catch (e) { - if (e.data !== undefined) - reply(res, e, undefined); - else - throw e; - } - }); - app.get("/rapids", (req, res) => { - res.send("Ready."); - }); - server.listen(this.port, () => { - outputGit(""); - outputGit(`88. .88 88 `); - outputGit(`888. .888 88 `); - outputGit(`88Y8. .8P88 88 `); - outputGit(`88 Y8o8P 88 .88. 88.d8 88.d8 Yb dP 8888bd88b .88.8 88 .8P .88. `); - outputGit(`88 Y8P 88 d" "b 88" 88" Yb dP 88 '88 '8b d" "8 88 .8P d" "b`); - outputGit(`88 " 88 888888 88 88 Yb dP 88 88 88 8 8 88d8P 888888`); - outputGit(`88 88 Y. 88 88 Y8P 88 88 88 Y. .8 88" 8b Y. `); - outputGit(`88 88 "88P 88 88 dP 88 88 88 "88"8 88 "8b "88P `); - outputGit(` dP `); - outputGit(""); - outputGit(`Running local Rapids on ${YELLOW}http://localhost:${this.port}/rapids${NORMAL_COLOR}`); - outputGit(`To exit, press ctrl+c`); - outputGit(""); - }); - }); - } - async processEvent(req, res, payload) { - try { - let sessionId = req.cookies.sessionId; - if (!sessionId) { - sessionId = "s" + Math.random(); - res.cookie("sessionId", sessionId); - } - res.set("Access-Control-Allow-Origin", "*"); - const event = req.params.event; - this.hooks = new PublicHooks(this.pathToRoot); - const conf = this.hooks.getApiConfig(event); - const traceId = "t" + Math.random(); - pendingReplies[traceId] = { - resp: res, - channels: new Set(), - }; - if (conf !== undefined && conf.streaming === true) { - req.on("close", () => { - const rep = pendingReplies[traceId]; - rep.channels.forEach((c) => { - channels[c].delete(rep.resp); - if (channels[c].size === 0) { - delete channels[c]; - } - }); - }); - res.set("Content-Type", "text/event-stream"); - res.set("Cache-Control", "no-cache"); - res.set("Connection", "keep-alive"); - res.flushHeaders(); - } - const teams = directoryNames(new Path(this.pathToRoot), [ - "event-catalogue", - ]).map((x) => x.name); - processFolders(this.pathToRoot, this.pathToRoot, null, teams, this.hooks); - loadLocalEnvvars(this.pathToRoot); - const response = await this.runWithReply(this.pathToRoot, this.port, res, event, payload, traceId, sessionId, this.hooks, req.headers["content-type"]); - } - catch (e) { - throw e; - } - } - runService(pathToRoot, port, event, payload, traceId, sessionId, hooks, contentType) { - if (event === "$reply") { - const rs = pendingReplies[traceId]; - if (rs !== undefined) { - delete pendingReplies[traceId]; - reply(rs.resp, HTTP.SUCCESS.SINGLE_REPLY(payload), contentType); - } - } - else if (event === "$join") { - const to = payload.toString(); - const rs = pendingReplies[traceId]; - if (rs !== undefined) { - if (channels[to] === undefined) - channels[to] = new Set(); - channels[to].add(rs.resp); - rs.channels.add(to); - } - } - else if (event === "$broadcast") { - const p = JSON.parse(payload.toString()); - const cs = channels[p.to] || []; - cs.forEach((c) => { - c.write(`event: ${p.event}\n`); - p.payload.split("\n").forEach((x) => c.write(`data: ${x}\n`)); - c.write(`\n`); - }); - } - const rivers = hooks.riversFor(event)?.hooks; - if (rivers === undefined) - return; - const messageId = "m" + Math.random(); - const envelope = JSON.stringify({ - messageId, - traceId, - sessionId, - }); - Object.keys(rivers).forEach((river) => { - const services = rivers[river]; - const service = services[~~(Math.random() * services.length)]; - const [cmd, ...rest] = service.cmd.split(" "); - const args = [...rest, `'${service.action}'`, `'${envelope}'`]; - const options = { - cwd: service.dir, - env: { - ...process.env, - ...(envvars[service.group] || {}), - RAPIDS: `http://localhost:${port}/trace/${sessionId}/${traceId}`, - }, - shell: "sh", - }; - if (process.env["DEBUG"]) - console.log(cmd, args); - const ls = spawn(cmd, args, options); - ls.stdin.write(payload); - ls.stdin.end(); - ls.stdout.on("data", (data) => { - timedOutput(service.dir.substring(pathToRoot.length) + (": " + data).trimEnd()); - }); - ls.stderr.on("data", (data) => { - timedOutput(FgRed + - service.dir.substring(pathToRoot.length) + - (": " + data).trimEnd() + - Reset); - }); - // ls.on("exit", () => { - // const streaming = pendingReplies[traceId].streaming; - // if (streaming !== undefined) { - // streaming.running--; - // if (streaming.running === 0) { - // pendingReplies[traceId].resp.end(); - // delete pendingReplies[traceId]; - // } - // } - // }); - }); - } - async runWithReply(pathToRoot, port, resp, event, payload, traceId, sessionId, hooks, contentType) { - try { - const rivers = hooks.riversFor(event); - if (rivers === undefined) - return reply(resp, HTTP.CLIENT_ERROR.NO_HOOKS, "text/plain"); - const conf = hooks.getApiConfig(event); - this.runService(pathToRoot, port, event, payload, traceId, sessionId, hooks, contentType); - if (conf === undefined || conf.streaming !== true) { - await sleep(conf?.waitFor || MAX_WAIT); - const pending = pendingReplies[traceId]; - if (pending !== undefined) { - delete pendingReplies[traceId]; - reply(resp, HTTP.SUCCESS.QUEUE_JOB, "text/plain"); - } - } - } - catch (e) { - throw e; - } - } -} -const MAX_WAIT = 5000; -const Reset = "\x1b[0m"; -const FgRed = "\x1b[31m"; -let envvars = {}; -let pendingReplies = {}; -let channels = {}; -class PublicHooks { - publicEvents; - hooks = {}; - constructor(pathToRoot) { - this.publicEvents = JSON.parse("" + fs.readFileSync(`${pathToRoot}/event-catalogue/api.json`)); - } - getApiConfig(event) { - return this.publicEvents[event]; - } - register(event, river, hook) { - const evt = this.hooks[event] || - (this.hooks[event] = { - waitFor: this.publicEvents[event]?.waitFor, - hooks: {}, - }); - const rvr = evt.hooks[river] || (evt.hooks[river] = []); - rvr.push(hook); - } - riversFor(event) { - return this.hooks[event]; - } -} -function isDirectory(folder) { - try { - return fs.lstatSync(folder).isDirectory(); - } - catch (e) { - return false; - } -} -function processFolder(pathToRoot, group, folder, hooks) { - if (fs.existsSync(`${folder}/merrymake.json`)) { - let projectType; - let cmd; - const dir = folder.replace(/\/\//g, "/"); - try { - projectType = detectProjectType(folder); - cmd = RUN_COMMAND[projectType](folder); - } - catch (e) { - timedOutput(FgRed + - `${dir.substring(pathToRoot.length)}: Please build or rebuild the service with '${process.env["COMMAND"]} build'` + - Reset); - return; - } - const config = JSON.parse("" + fs.readFileSync(`${folder}/merrymake.json`)); - Object.keys(config.hooks).forEach((k) => { - const [river, event] = k.split("/"); - const hook = config.hooks[k]; - let action, timeout_milliseconds; - if (typeof hook === "object") { - action = hook.action; - timeout_milliseconds = hook.timeout || DEFAULT_TIMEOUT; - } - else { - action = hook; - timeout_milliseconds = DEFAULT_TIMEOUT; - } - hooks.register(event, river, { - action, - dir, - group, - cmd, - }); - }); - } - else if (isDirectory(folder)) { - processFolders(pathToRoot, folder, group, fs.readdirSync(folder), hooks); - } -} -function processFolders(pathToRoot, prefix, group, folders, hooks) { - folders - .filter((x) => !x.startsWith("(deleted) ")) - .forEach((folder) => processFolder(pathToRoot, group || folder, prefix + folder + "/", hooks)); -} -function loadLocalEnvvars(pathToRoot) { - fs.readdirSync(pathToRoot) - .filter((x) => !x.startsWith("(deleted) ") && !x.endsWith(".DS_Store")) - .forEach((group) => { - if (fs.existsSync(pathToRoot + "/" + group + "/env.kv")) { - envvars[group] = {}; - fs.readFileSync(pathToRoot + "/" + group + "/env.kv") - .toString() - .split(/\r?\n/) - .forEach((x) => { - if (!x.includes("=")) - return; - const b = x.split("="); - envvars[group][b[0]] = b[1]; - }); - } - }); -} -let spacerTimer; -function timedOutput(str) { - if (spacerTimer !== undefined) - clearTimeout(spacerTimer); - outputGit(str); - spacerTimer = setTimeout(() => outputGit(""), 10000); -} -var HTTP; -(function (HTTP) { - let SUCCESS; - (function (SUCCESS) { - SUCCESS.SINGLE_REPLY = (data) => ({ code: 200, data }); - SUCCESS.QUEUE_JOB = { code: 200, data: Buffer.from("Queued job.") }; - })(SUCCESS = HTTP.SUCCESS || (HTTP.SUCCESS = {})); - let CLIENT_ERROR; - (function (CLIENT_ERROR) { - CLIENT_ERROR.TIMEOUT_JOB = { - code: 400, - data: Buffer.from("Job timed out."), - }; - CLIENT_ERROR.NO_HOOKS = { - code: 400, - data: Buffer.from("Event has no hooks."), - }; - CLIENT_ERROR.TOO_MANY_FILES = (x) => ({ - code: 400, - data: Buffer.from(`No more than ${x} files allowed.`), - }); - CLIENT_ERROR.TOO_FEW_FILES = (x) => ({ - code: 400, - data: Buffer.from(`At least ${x} files required.`), - }); - CLIENT_ERROR.TOO_LARGE_FILES = (x, s) => ({ - code: 400, - data: Buffer.from(`Files exceed size limit of ${x}: ${s}`), - }); - CLIENT_ERROR.ILLEGAL_TYPE = (s) => ({ - code: 400, - data: Buffer.from(`Illegal mime types: ${s}`), - }); - CLIENT_ERROR.FILE_NOT_FOUND = (s) => ({ - code: 404, - data: Buffer.from(`File not found: ${s}`), - }); - })(CLIENT_ERROR = HTTP.CLIENT_ERROR || (HTTP.CLIENT_ERROR = {})); -})(HTTP || (HTTP = {})); -function sleep(duration) { - return new Promise((resolve, reject) => { - setTimeout(resolve, duration); - }); -} -function reply(res, response, contentType) { - if (contentType !== undefined) - res.contentType(contentType); - res.status(response.code).send(response.data); -} diff --git a/simulator.ts b/simulator.ts deleted file mode 100644 index f37c169..0000000 --- a/simulator.ts +++ /dev/null @@ -1,524 +0,0 @@ -import { - detectProjectType, - ProjectType, - RUN_COMMAND, -} from "@merrymake/detect-project-type"; -import { ExecOptions, spawn } from "child_process"; -import cookieParser from "cookie-parser"; -import express, { Request, RequestHandler, Response } from "express"; -import fs from "fs"; -import http from "http"; -import { NORMAL_COLOR, YELLOW } from "./prompt.js"; -import { directoryNames, fetchOrg, outputGit, Path } from "./utils.js"; - -const MILLISECONDS = 1; -const SECONDS = 1000 * MILLISECONDS; -const MINUTES = 60 * SECONDS; -const HOURS = 60 * MINUTES; -const DEFAULT_TIMEOUT = 5 * MINUTES; - -export class Run { - private hooks: PublicHooks | undefined; - private pathToRoot: string; - constructor(private port: number) { - const { pathToRoot } = fetchOrg(); - this.pathToRoot = pathToRoot; - } - execute() { - return new Promise((resolve) => { - const app = express(); - const server = http.createServer(app); - const withSession: RequestHandler<{ event: string }> = cookieParser(); - - app.use((req, res, next) => { - if ( - req.is("multipart/form-data") || - req.is("application/x-www-form-urlencoded") - ) { - express.urlencoded({ extended: true, limit: "10mb" })(req, res, next); - } else { - express.raw({ type: "*/*", limit: "10mb" })(req, res, next); - } - }); - - app.post("/trace/:sessionId/:traceId/:event", async (req, res) => { - try { - const traceId = req.params.traceId; - const sessionId = req.params.sessionId; - const event = req.params.event; - const payload: Buffer = req.body; - this.runService( - this.pathToRoot, - this.port, - event, - payload, - traceId, - sessionId, - this.hooks!, - req.headers["content-type"] - ); - res.send("Done"); - } catch (e: any) { - if (e.data !== undefined) console.log("" + e.data); - else throw e; - } - }); - - app.get("/rapids/:event", withSession, async (req, res) => { - try { - const payload: Buffer = Buffer.from(JSON.stringify(req.query)); - await this.processEvent(req, res, payload); - } catch (e: any) { - if (e.data !== undefined) reply(res, e, undefined); - else throw e; - } - }); - - app.all("/rapids/:event", withSession, async (req, res) => { - try { - const payload: Buffer = !Buffer.isBuffer(req.body) - ? typeof req.body === "object" - ? Buffer.from(JSON.stringify(req.body)) - : Buffer.from(req.body) - : req.body; - await this.processEvent(req, res, payload); - } catch (e: any) { - if (e.data !== undefined) reply(res, e, undefined); - else throw e; - } - }); - - app.get("/rapids", (req, res) => { - res.send("Ready."); - }); - - server.listen(this.port, () => { - outputGit(""); - outputGit( - `88. .88 88 ` - ); - outputGit( - `888. .888 88 ` - ); - outputGit( - `88Y8. .8P88 88 ` - ); - outputGit( - `88 Y8o8P 88 .88. 88.d8 88.d8 Yb dP 8888bd88b .88.8 88 .8P .88. ` - ); - outputGit( - `88 Y8P 88 d" "b 88" 88" Yb dP 88 '88 '8b d" "8 88 .8P d" "b` - ); - outputGit( - `88 " 88 888888 88 88 Yb dP 88 88 88 8 8 88d8P 888888` - ); - outputGit( - `88 88 Y. 88 88 Y8P 88 88 88 Y. .8 88" 8b Y. ` - ); - outputGit( - `88 88 "88P 88 88 dP 88 88 88 "88"8 88 "8b "88P ` - ); - outputGit( - ` dP ` - ); - outputGit(""); - outputGit( - `Running local Rapids on ${YELLOW}http://localhost:${this.port}/rapids${NORMAL_COLOR}` - ); - outputGit(`To exit, press ctrl+c`); - outputGit(""); - }); - }); - } - - async processEvent( - req: Request<{ event: string }, any, any, unknown, Record>, - res: Response, - payload: Buffer - ) { - try { - let sessionId = req.cookies.sessionId; - if (!sessionId) { - sessionId = "s" + Math.random(); - res.cookie("sessionId", sessionId); - } - res.set("Access-Control-Allow-Origin", "*"); - const event = req.params.event; - this.hooks = new PublicHooks(this.pathToRoot); - const conf = this.hooks.getApiConfig(event); - const traceId = "t" + Math.random(); - pendingReplies[traceId] = { - resp: res, - channels: new Set(), - }; - if (conf !== undefined && conf.streaming === true) { - req.on("close", () => { - const rep = pendingReplies[traceId]; - rep.channels.forEach((c) => { - channels[c].delete(rep.resp); - if (channels[c].size === 0) { - delete channels[c]; - } - }); - }); - res.set("Content-Type", "text/event-stream"); - res.set("Cache-Control", "no-cache"); - res.set("Connection", "keep-alive"); - res.flushHeaders(); - } - const teams = directoryNames(new Path(this.pathToRoot), [ - "event-catalogue", - ]).map((x) => x.name); - processFolders(this.pathToRoot, this.pathToRoot, null, teams, this.hooks); - loadLocalEnvvars(this.pathToRoot); - const response = await this.runWithReply( - this.pathToRoot, - this.port, - res, - event, - payload, - traceId, - sessionId, - this.hooks, - req.headers["content-type"] - ); - } catch (e) { - throw e; - } - } - - runService( - pathToRoot: string, - port: number, - event: string, - payload: Buffer, - traceId: string, - sessionId: string, - hooks: PublicHooks, - contentType: string | undefined - ) { - if (event === "$reply") { - const rs = pendingReplies[traceId]; - if (rs !== undefined) { - delete pendingReplies[traceId]; - reply(rs.resp, HTTP.SUCCESS.SINGLE_REPLY(payload), contentType); - } - } else if (event === "$join") { - const to = payload.toString(); - const rs = pendingReplies[traceId]; - if (rs !== undefined) { - if (channels[to] === undefined) channels[to] = new Set(); - channels[to].add(rs.resp); - rs.channels.add(to); - } - } else if (event === "$broadcast") { - const p: { event: string; to: string; payload: string } = JSON.parse( - payload.toString() - ); - const cs = channels[p.to] || []; - cs.forEach((c) => { - c.write(`event: ${p.event}\n`); - p.payload.split("\n").forEach((x) => c.write(`data: ${x}\n`)); - c.write(`\n`); - }); - } - const rivers = hooks.riversFor(event)?.hooks; - if (rivers === undefined) return; - const messageId = "m" + Math.random(); - const envelope = JSON.stringify({ - messageId, - traceId, - sessionId, - }); - Object.keys(rivers).forEach((river) => { - const services = rivers[river]; - const service = services[~~(Math.random() * services.length)]; - const [cmd, ...rest] = service.cmd.split(" "); - const args = [...rest, `'${service.action}'`, `'${envelope}'`]; - const options: ExecOptions = { - cwd: service.dir, - env: { - ...process.env, - ...(envvars[service.group] || {}), - RAPIDS: `http://localhost:${port}/trace/${sessionId}/${traceId}`, - }, - shell: "sh", - }; - if (process.env["DEBUG"]) console.log(cmd, args); - const ls = spawn(cmd, args, options); - ls.stdin.write(payload); - ls.stdin.end(); - ls.stdout.on("data", (data) => { - timedOutput( - service.dir.substring(pathToRoot.length) + (": " + data).trimEnd() - ); - }); - ls.stderr.on("data", (data) => { - timedOutput( - FgRed + - service.dir.substring(pathToRoot.length) + - (": " + data).trimEnd() + - Reset - ); - }); - // ls.on("exit", () => { - // const streaming = pendingReplies[traceId].streaming; - // if (streaming !== undefined) { - // streaming.running--; - // if (streaming.running === 0) { - // pendingReplies[traceId].resp.end(); - // delete pendingReplies[traceId]; - // } - // } - // }); - }); - } - - async runWithReply( - pathToRoot: string, - port: number, - resp: Response, - event: string, - payload: Buffer, - traceId: string, - sessionId: string, - hooks: PublicHooks, - contentType: string | undefined - ) { - try { - const rivers = hooks.riversFor(event); - if (rivers === undefined) - return reply(resp, HTTP.CLIENT_ERROR.NO_HOOKS, "text/plain"); - const conf = hooks.getApiConfig(event); - this.runService( - pathToRoot, - port, - event, - payload, - traceId, - sessionId, - hooks, - contentType - ); - if (conf === undefined || conf.streaming !== true) { - await sleep(conf?.waitFor || MAX_WAIT); - const pending = pendingReplies[traceId]; - if (pending !== undefined) { - delete pendingReplies[traceId]; - reply(resp, HTTP.SUCCESS.QUEUE_JOB, "text/plain"); - } - } - } catch (e) { - throw e; - } - } -} - -const MAX_WAIT = 5000; -const Reset = "\x1b[0m"; -const FgRed = "\x1b[31m"; - -let envvars: { [group: string]: { [key: string]: string } } = {}; - -interface Hook { - group: string; - dir: string; - cmd: string; - action: string; -} -let pendingReplies: { - [traceId: string]: { resp: Response; channels: Set }; -} = {}; -let channels: { [channel: string]: Set } = {}; - -class PublicHooks { - private publicEvents: { - [event: string]: { - waitFor?: number; - streaming?: boolean; - }; - }; - private hooks: { - [event: string]: { - waitFor?: number; - hooks: { [river: string]: Hook[] }; - }; - } = {}; - constructor(pathToRoot: string) { - this.publicEvents = JSON.parse( - "" + fs.readFileSync(`${pathToRoot}/event-catalogue/api.json`) - ); - } - - getApiConfig(event: string) { - return this.publicEvents[event]; - } - - register(event: string, river: string, hook: Hook) { - const evt = - this.hooks[event] || - (this.hooks[event] = { - waitFor: this.publicEvents[event]?.waitFor, - hooks: {}, - }); - const rvr = evt.hooks[river] || (evt.hooks[river] = []); - rvr.push(hook); - } - - riversFor(event: string) { - return this.hooks[event]; - } -} - -function isDirectory(folder: string) { - try { - return fs.lstatSync(folder).isDirectory(); - } catch (e) { - return false; - } -} - -function processFolder( - pathToRoot: string, - group: string, - folder: string, - hooks: PublicHooks -) { - if (fs.existsSync(`${folder}/merrymake.json`)) { - let projectType: ProjectType; - let cmd: string; - const dir = folder.replace(/\/\//g, "/"); - try { - projectType = detectProjectType(folder); - cmd = RUN_COMMAND[projectType](folder); - } catch (e) { - timedOutput( - FgRed + - `${dir.substring( - pathToRoot.length - )}: Please build or rebuild the service with '${ - process.env["COMMAND"] - } build'` + - Reset - ); - return; - } - const config: { - hooks: { [key: string]: string | { action: string; timeout?: number } }; - } = JSON.parse("" + fs.readFileSync(`${folder}/merrymake.json`)); - Object.keys(config.hooks).forEach((k) => { - const [river, event] = k.split("/"); - const hook = config.hooks[k]; - let action: string, timeout_milliseconds: number; - if (typeof hook === "object") { - action = hook.action; - timeout_milliseconds = hook.timeout || DEFAULT_TIMEOUT; - } else { - action = hook; - timeout_milliseconds = DEFAULT_TIMEOUT; - } - hooks.register(event, river, { - action, - dir, - group, - cmd, - }); - }); - } else if (isDirectory(folder)) { - processFolders(pathToRoot, folder, group, fs.readdirSync(folder), hooks); - } -} - -function processFolders( - pathToRoot: string, - prefix: string, - group: string | null, - folders: string[], - hooks: PublicHooks -) { - folders - .filter((x) => !x.startsWith("(deleted) ")) - .forEach((folder) => - processFolder(pathToRoot, group || folder, prefix + folder + "/", hooks) - ); -} - -function loadLocalEnvvars(pathToRoot: string) { - fs.readdirSync(pathToRoot) - .filter((x) => !x.startsWith("(deleted) ") && !x.endsWith(".DS_Store")) - .forEach((group) => { - if (fs.existsSync(pathToRoot + "/" + group + "/env.kv")) { - envvars[group] = {}; - fs.readFileSync(pathToRoot + "/" + group + "/env.kv") - .toString() - .split(/\r?\n/) - .forEach((x) => { - if (!x.includes("=")) return; - const b = x.split("="); - envvars[group][b[0]] = b[1]; - }); - } - }); -} - -let spacerTimer: undefined | NodeJS.Timeout; -function timedOutput(str: string) { - if (spacerTimer !== undefined) clearTimeout(spacerTimer); - outputGit(str); - spacerTimer = setTimeout(() => outputGit(""), 10000); -} - -module HTTP { - export module SUCCESS { - export const SINGLE_REPLY = (data: Buffer) => ({ code: 200, data }); - export const QUEUE_JOB = { code: 200, data: Buffer.from("Queued job.") }; - } - export module CLIENT_ERROR { - export const TIMEOUT_JOB = { - code: 400, - data: Buffer.from("Job timed out."), - }; - export const NO_HOOKS = { - code: 400, - data: Buffer.from("Event has no hooks."), - }; - export const TOO_MANY_FILES = (x: number) => ({ - code: 400, - data: Buffer.from(`No more than ${x} files allowed.`), - }); - export const TOO_FEW_FILES = (x: number) => ({ - code: 400, - data: Buffer.from(`At least ${x} files required.`), - }); - export const TOO_LARGE_FILES = (x: string, s: string) => ({ - code: 400, - data: Buffer.from(`Files exceed size limit of ${x}: ${s}`), - }); - export const ILLEGAL_TYPE = (s: string) => ({ - code: 400, - data: Buffer.from(`Illegal mime types: ${s}`), - }); - export const FILE_NOT_FOUND = (s: string) => ({ - code: 404, - data: Buffer.from(`File not found: ${s}`), - }); - } -} - -function sleep(duration: number) { - return new Promise((resolve, reject) => { - setTimeout(resolve, duration); - }); -} - -function reply( - res: Response, - response: { - code: number; - data: Buffer; - }, - contentType: string | undefined -) { - if (contentType !== undefined) res.contentType(contentType); - res.status(response.code).send(response.data); -} diff --git a/templates.ts b/templates.ts index 5578da4..782a9a9 100644 --- a/templates.ts +++ b/templates.ts @@ -1,10 +1,10 @@ -import { ProjectType } from "@merrymake/detect-project-type"; +import { ProjectTypes } from "@merrymake/detect-project-type"; export type Languages = { [key: string]: { long: string; short: string; - projectType: ProjectType; + projectType: keyof typeof ProjectTypes; }; }; export const languages: Languages = { diff --git a/utils.js b/utils.js index 547ac43..aa22b51 100644 --- a/utils.js +++ b/utils.js @@ -250,6 +250,21 @@ export function execStreamPromise(full, onData, cwd) { }); }); } +export async function execute(command, alsoPrint = false) { + try { + const result = []; + const onData = (s) => { + result.push(s); + if (alsoPrint) + outputGit(s); + }; + await execStreamPromise(command, onData); + return result.join(""); + } + catch (e) { + throw e; + } +} export function spawnPromise(str) { return new Promise((resolve, reject) => { const [cmd, ...args] = str.split(" "); diff --git a/utils.ts b/utils.ts index f1a8f45..e0df747 100644 --- a/utils.ts +++ b/utils.ts @@ -302,6 +302,19 @@ export function execStreamPromise( }); }); } +export async function execute(command: string, alsoPrint = false) { + try { + const result: string[] = []; + const onData = (s: string) => { + result.push(s); + if (alsoPrint) outputGit(s); + }; + await execStreamPromise(command, onData); + return result.join(""); + } catch (e) { + throw e; + } +} export function spawnPromise(str: string) { return new Promise((resolve, reject) => {