From 11e7b6605c4a7e59530051e8c2335445cbfbc0e3 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 22 Jul 2024 08:38:13 +0200 Subject: [PATCH] feature: get document path (#50) This commit implements the api endpoint in web in order to fetch the document. It includes abstractions to easily develop api endpoints and removes the old api project because we don't need it now that we are not a latency-sensitive proxy anymore. --- apps/api/README.md | 29 - apps/api/build.ts | 52 -- apps/api/docker/Dockerfile | 23 - apps/api/env/development.env | 2 - apps/api/env/test.env | 3 - apps/api/eslint.config.mjs | 29 - apps/api/package.json | 58 -- apps/api/src/common/EnvVars.ts | 31 - apps/api/src/common/HttpStatusCodes.ts | 384 --------- apps/api/src/common/Paths.ts | 17 - apps/api/src/common/RouteError.ts | 17 - apps/api/src/common/errors.ts | 47 -- apps/api/src/common/misc.ts | 5 - apps/api/src/index.ts | 7 - apps/api/src/middlewares/validate.ts | 18 - apps/api/src/routes/api/index.ts | 10 - .../routes/api/v1/chat/completions.test.ts | 31 - apps/api/src/routes/api/v1/chat/index.ts | 10 - apps/api/src/routes/api/v1/chat/routes.ts | 6 - apps/api/src/routes/api/v1/index.ts | 10 - apps/api/src/routes/index.ts | 10 - apps/api/src/server.ts | 60 -- apps/api/src/services/elastic/client.ts | 10 - apps/api/test/support/Paths.ts | 8 - apps/api/test/support/apiCb.ts | 11 - apps/api/test/support/jasmine.json | 7 - apps/api/tsconfig.json | 13 - apps/api/tsconfig.prod.json | 9 - apps/api/vitest.config.ts | 13 - apps/web/package.json | 11 +- .../[...documentPath]/route.test.ts | 108 +++ .../[commitUuid]/[...documentPath]/route.ts | 29 + apps/web/src/env.ts | 2 + apps/web/src/helpers/api/errors.ts | 19 + apps/web/src/helpers/api/route.ts | 40 + apps/web/src/middleware.ts | 28 + apps/web/vitest.config.js | 24 + packages/core/src/data-access/apiKeys.ts | 11 + .../documentVersions/getDocumentById.ts | 20 + .../documentVersions/getDocumentByPath.ts | 34 + .../getDocumentsAtCommit.test.ts} | 4 +- .../getDocumentsAtCommit.ts} | 33 +- .../src/data-access/documentVersions/index.ts | 3 + packages/core/src/data-access/index.ts | 5 +- packages/core/src/services/commits/create.ts | 2 +- packages/core/src/services/commits/index.ts | 2 + packages/core/src/services/commits/merge.ts | 2 +- packages/core/src/services/index.ts | 2 + packages/core/src/services/projects/create.ts | 4 +- packages/core/src/tests/factories/commits.ts | 2 +- pnpm-lock.yaml | 731 ++---------------- 51 files changed, 405 insertions(+), 1641 deletions(-) delete mode 100644 apps/api/README.md delete mode 100644 apps/api/build.ts delete mode 100644 apps/api/docker/Dockerfile delete mode 100644 apps/api/env/development.env delete mode 100644 apps/api/env/test.env delete mode 100644 apps/api/eslint.config.mjs delete mode 100644 apps/api/package.json delete mode 100644 apps/api/src/common/EnvVars.ts delete mode 100644 apps/api/src/common/HttpStatusCodes.ts delete mode 100644 apps/api/src/common/Paths.ts delete mode 100644 apps/api/src/common/RouteError.ts delete mode 100644 apps/api/src/common/errors.ts delete mode 100644 apps/api/src/common/misc.ts delete mode 100644 apps/api/src/index.ts delete mode 100644 apps/api/src/middlewares/validate.ts delete mode 100644 apps/api/src/routes/api/index.ts delete mode 100644 apps/api/src/routes/api/v1/chat/completions.test.ts delete mode 100644 apps/api/src/routes/api/v1/chat/index.ts delete mode 100644 apps/api/src/routes/api/v1/chat/routes.ts delete mode 100644 apps/api/src/routes/api/v1/index.ts delete mode 100644 apps/api/src/routes/index.ts delete mode 100644 apps/api/src/server.ts delete mode 100644 apps/api/src/services/elastic/client.ts delete mode 100644 apps/api/test/support/Paths.ts delete mode 100644 apps/api/test/support/apiCb.ts delete mode 100644 apps/api/test/support/jasmine.json delete mode 100644 apps/api/tsconfig.json delete mode 100644 apps/api/tsconfig.prod.json delete mode 100644 apps/api/vitest.config.ts create mode 100644 apps/web/src/app/(private)/api/v1/projects/[projectId]/commits/[commitUuid]/[...documentPath]/route.test.ts create mode 100644 apps/web/src/app/(private)/api/v1/projects/[projectId]/commits/[commitUuid]/[...documentPath]/route.ts create mode 100644 apps/web/src/helpers/api/errors.ts create mode 100644 apps/web/src/helpers/api/route.ts create mode 100644 apps/web/src/middleware.ts create mode 100644 apps/web/vitest.config.js create mode 100644 packages/core/src/data-access/apiKeys.ts create mode 100644 packages/core/src/data-access/documentVersions/getDocumentById.ts create mode 100644 packages/core/src/data-access/documentVersions/getDocumentByPath.ts rename packages/core/src/data-access/{documentVersions.test.ts => documentVersions/getDocumentsAtCommit.test.ts} (97%) rename packages/core/src/data-access/{documentVersions.ts => documentVersions/getDocumentsAtCommit.ts} (75%) create mode 100644 packages/core/src/data-access/documentVersions/index.ts create mode 100644 packages/core/src/services/commits/index.ts diff --git a/apps/api/README.md b/apps/api/README.md deleted file mode 100644 index b9e147e5a..000000000 --- a/apps/api/README.md +++ /dev/null @@ -1,29 +0,0 @@ -## Available Scripts - -### `pnpm run dev` - -Run the server in development mode. - -### `pnpm test` - -Run all unit-tests with hot-reloading. - -### `pnpm run test:watch` - -Run all unit-tests without hot-reloading. - -### `pnpm run lint` - -Check for linting errors. - -### `pnpm run build` - -Build the project for production. - -### `pnpm start` - -Run the production build (Must be built first). - -## Additional Notes - -- If `pnpm run dev` gives you issues with bcrypt on MacOS you may need to run: `pnpm rebuild bcrypt --build-from-source`. diff --git a/apps/api/build.ts b/apps/api/build.ts deleted file mode 100644 index 68383f7c1..000000000 --- a/apps/api/build.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Remove old files, copy front-end ones. - */ - -import childProcess from 'child_process' - -import fs from 'fs-extra' - -/** - * Start - */ - -;(async () => { - try { - // Remove current build - await remove('./dist/') - // Copy front-end files - // Copy back-end files - await exec('tsc --build tsconfig.prod.json', './') - } catch (err) { - console.error(err) - process.exit(1) - } -})() - -/** - * Remove file - */ -function remove(loc: string): Promise { - return new Promise((res, rej) => { - return fs.remove(loc, (err) => { - return !!err ? rej(err) : res() - }) - }) -} - -/** - * Do command line command. - */ -function exec(cmd: string, loc: string): Promise { - return new Promise((res, rej) => { - return childProcess.exec(cmd, { cwd: loc }, (err, stdout, stderr) => { - if (!!stdout) { - console.log(stdout) - } - if (!!stderr) { - console.warn(stderr) - } - return !!err ? rej(err) : res() - }) - }) -} diff --git a/apps/api/docker/Dockerfile b/apps/api/docker/Dockerfile deleted file mode 100644 index 9e35c909b..000000000 --- a/apps/api/docker/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM latitudedata/base AS base - -WORKDIR /app -COPY . . - -RUN turbo prune @latitude-data/api --docker - -FROM base AS builder - -COPY .gitignore .gitignore -COPY --from=base /app/out/full . - -WORKDIR /app/apps/api - -FROM builder AS runner - -ENV NODE_ENV production - -RUN pnpm install --prod --frozen-lockfile -RUN pnpm build - -CMD pnpm start - diff --git a/apps/api/env/development.env b/apps/api/env/development.env deleted file mode 100644 index c6d496ca6..000000000 --- a/apps/api/env/development.env +++ /dev/null @@ -1,2 +0,0 @@ -PORT=3001 -HOST=localhost diff --git a/apps/api/env/test.env b/apps/api/env/test.env deleted file mode 100644 index 6680006f7..000000000 --- a/apps/api/env/test.env +++ /dev/null @@ -1,3 +0,0 @@ -## Server ## -PORT=4000 -HOST=localhost diff --git a/apps/api/eslint.config.mjs b/apps/api/eslint.config.mjs deleted file mode 100644 index f96d96b2d..000000000 --- a/apps/api/eslint.config.mjs +++ /dev/null @@ -1,29 +0,0 @@ -import path from 'node:path' -import { fileURLToPath } from 'node:url' - -import { FlatCompat } from '@eslint/eslintrc' -import js from '@eslint/js' -import globals from 'globals' - -const __filename = fileURLToPath(import.meta.url) -const __dirname = path.dirname(__filename) -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all, -}) - -export default [ - ...compat.extends('./node_modules/@latitude-data/eslint-config/library.js'), - { - languageOptions: { - globals: { - ...globals.node, - ...Object.fromEntries( - Object.entries(globals.browser).map(([key]) => [key, 'off']), - ), - console: true, - }, - }, - }, -] diff --git a/apps/api/package.json b/apps/api/package.json deleted file mode 100644 index c8e830f14..000000000 --- a/apps/api/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@latitude-data/api", - "version": "0.0.1", - "type": "module", - "scripts": { - "build": "tsc --build tsconfig.prod.json --verbose", - "dev": "tsx watch src", - "lint": "eslint src/", - "prettier": "prettier --write \"**/*.{ts,tsx,md}\"", - "start": "node -r module-alias/register ./dist --env=production", - "tc": "tsc --noEmit", - "test": "vitest --run", - "test:watch": "vitest" - }, - "packageManager": "pnpm@8.6.3", - "_moduleAliases": { - "@src": "dist" - }, - "engines": { - "node": ">=20.0.0" - }, - "dependencies": { - "@elastic/elasticsearch": "^8.14.0", - "@latitude-data/env": "workspace:^", - "dotenv": "^16.4.5", - "express": "^4.19.2", - "express-async-errors": "^3.1.1", - "helmet": "^7.1.0", - "inserturlparams": "^1.1.2", - "module-alias": "^2.2.3", - "morgan": "^1.10.0", - "ts-command-line-args": "^2.5.1", - "zod": "^3.23.8" - }, - "devDependencies": { - "@latitude-data/eslint-config": "workspace:*", - "@latitude-data/typescript-config": "workspace:*", - "@types/cookie-parser": "^1.4.7", - "@types/express": "^4.17.21", - "@types/find": "^0.2.4", - "@types/fs-extra": "^11.0.4", - "@types/jsonfile": "^6.1.4", - "@types/morgan": "^1.9.9", - "@types/node": "^20.14.10", - "@types/supertest": "^6.0.2", - "eslint-plugin-node": "^11.1.0", - "find": "^0.3.0", - "fs-extra": "^11.2.0", - "jet-paths": "^1.0.6", - "prettier": "^3.3.2", - "supertest": "^7.0.0", - "tsconfig-paths": "^4.2.0", - "tsx": "^4.16.2", - "typescript": "^5.5.3", - "vite-tsconfig-paths": "^4.3.2", - "vitest": "^1.6.0" - } -} diff --git a/apps/api/src/common/EnvVars.ts b/apps/api/src/common/EnvVars.ts deleted file mode 100644 index ee70f3990..000000000 --- a/apps/api/src/common/EnvVars.ts +++ /dev/null @@ -1,31 +0,0 @@ -import '@latitude-data/env' - -import path from 'path' -import { fileURLToPath } from 'url' - -import dotenv from 'dotenv' -import z from 'zod' - -const DIRNAME = path.dirname(fileURLToPath(import.meta.url)) - -if (process.env.NODE_ENV !== 'production') { - dotenv.config({ - path: path.join(DIRNAME, `../../env/${process.env.NODE_ENV}.env`), - }) -} - -const envvars = z.object({ - NODE_ENV: z.string(), - PORT: z.string(), - ELASTIC_USERNAME: z.string(), - ELASTIC_PASSWORD: z.string(), - ELASTIC_URL: z.string(), -}) - -export default envvars.parse(process.env) - -declare global { - namespace NodeJS { - interface ProcessEnv extends z.infer {} - } -} diff --git a/apps/api/src/common/HttpStatusCodes.ts b/apps/api/src/common/HttpStatusCodes.ts deleted file mode 100644 index 645723ad2..000000000 --- a/apps/api/src/common/HttpStatusCodes.ts +++ /dev/null @@ -1,384 +0,0 @@ -/** - * This file was copied from here: https://gist.github.com/scokmen/f813c904ef79022e84ab2409574d1b45 - */ - -/** - * Hypertext Transfer Protocol (HTTP) response status codes. - * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} - */ -enum HttpStatusCodes { - /** - * The server has received the request headers and the client should proceed to send the request body - * (in the case of a request for which a body needs to be sent; for example, a POST request). - * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient. - * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request - * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued. - */ - CONTINUE = 100, - - /** - * The requester has asked the server to switch protocols and the server has agreed to do so. - */ - SWITCHING_PROTOCOLS = 101, - - /** - * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. - * This code indicates that the server has received and is processing the request, but no response is available yet. - * This prevents the client from timing out and assuming the request was lost. - */ - PROCESSING = 102, - - /** - * Standard response for successful HTTP requests. - * The actual response will depend on the request method used. - * In a GET request, the response will contain an entity corresponding to the requested resource. - * In a POST request, the response will contain an entity describing or containing the result of the action. - */ - OK = 200, - - /** - * The request has been fulfilled, resulting in the creation of a new resource. - */ - CREATED = 201, - - /** - * The request has been accepted for processing, but the processing has not been completed. - * The request might or might not be eventually acted upon, and may be disallowed when processing occurs. - */ - ACCEPTED = 202, - - /** - * SINCE HTTP/1.1 - * The server is a transforming proxy that received a 200 OK from its origin, - * but is returning a modified version of the origin's response. - */ - NON_AUTHORITATIVE_INFORMATION = 203, - - /** - * The server successfully processed the request and is not returning any content. - */ - NO_CONTENT = 204, - - /** - * The server successfully processed the request, but is not returning any content. - * Unlike a 204 response, this response requires that the requester reset the document view. - */ - RESET_CONTENT = 205, - - /** - * The server is delivering only part of the resource (byte serving) due to a range header sent by the client. - * The range header is used by HTTP clients to enable resuming of interrupted downloads, - * or split a download into multiple simultaneous streams. - */ - PARTIAL_CONTENT = 206, - - /** - * The message body that follows is an XML message and can contain a number of separate response codes, - * depending on how many sub-requests were made. - */ - MULTI_STATUS = 207, - - /** - * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, - * and are not being included again. - */ - ALREADY_REPORTED = 208, - - /** - * The server has fulfilled a request for the resource, - * and the response is a representation of the result of one or more instance-manipulations applied to the current instance. - */ - IM_USED = 226, - - /** - * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation). - * For example, this code could be used to present multiple video format options, - * to list files with different filename extensions, or to suggest word-sense disambiguation. - */ - MULTIPLE_CHOICES = 300, - - /** - * This and all future requests should be directed to the given URI. - */ - MOVED_PERMANENTLY = 301, - - /** - * This is an example of industry practice contradicting the standard. - * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect - * (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 - * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 - * to distinguish between the two behaviours. However, some Web applications and frameworks - * use the 302 status code as if it were the 303. - */ - FOUND = 302, - - /** - * SINCE HTTP/1.1 - * The response to the request can be found under another URI using a GET method. - * When received in response to a POST (or PUT/DELETE), the client should presume that - * the server has received the data and should issue a redirect with a separate GET message. - */ - SEE_OTHER = 303, - - /** - * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match. - * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy. - */ - NOT_MODIFIED = 304, - - /** - * SINCE HTTP/1.1 - * The requested resource is available only through a proxy, the address for which is provided in the response. - * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons. - */ - USE_PROXY = 305, - - /** - * No longer used. Originally meant "Subsequent requests should use the specified proxy." - */ - SWITCH_PROXY = 306, - - /** - * SINCE HTTP/1.1 - * In this case, the request should be repeated with another URI; however, future requests should still use the original URI. - * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request. - * For example, a POST request should be repeated using another POST request. - */ - TEMPORARY_REDIRECT = 307, - - /** - * The request and all future requests should be repeated using another URI. - * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change. - * So, for example, submitting a form to a permanently redirected resource may continue smoothly. - */ - PERMANENT_REDIRECT = 308, - - /** - * The server cannot or will not process the request due to an apparent client error - * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing). - */ - BAD_REQUEST = 400, - - /** - * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet - * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the - * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means - * "unauthenticated",i.e. the user does not have the necessary credentials. - */ - UNAUTHORIZED = 401, - - /** - * Reserved for future use. The original intention was that this code might be used as part of some form of digital - * cash or micro payment scheme, but that has not happened, and this code is not usually used. - * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests. - */ - PAYMENT_REQUIRED = 402, - - /** - * The request was valid, but the server is refusing action. - * The user might not have the necessary permissions for a resource. - */ - FORBIDDEN = 403, - - /** - * The requested resource could not be found but may be available in the future. - * Subsequent requests by the client are permissible. - */ - NOT_FOUND = 404, - - /** - * A request method is not supported for the requested resource; - * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource. - */ - METHOD_NOT_ALLOWED = 405, - - /** - * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request. - */ - NOT_ACCEPTABLE = 406, - - /** - * The client must first authenticate itself with the proxy. - */ - PROXY_AUTHENTICATION_REQUIRED = 407, - - /** - * The server timed out waiting for the request. - * According to HTTP specifications: - * "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time." - */ - REQUEST_TIMEOUT = 408, - - /** - * Indicates that the request could not be processed because of conflict in the request, - * such as an edit conflict between multiple simultaneous updates. - */ - CONFLICT = 409, - - /** - * Indicates that the resource requested is no longer available and will not be available again. - * This should be used when a resource has been intentionally removed and the resource should be purged. - * Upon receiving a 410 status code, the client should not request the resource in the future. - * Clients such as search engines should remove the resource from their indices. - * Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead. - */ - GONE = 410, - - /** - * The request did not specify the length of its content, which is required by the requested resource. - */ - LENGTH_REQUIRED = 411, - - /** - * The server does not meet one of the preconditions that the requester put on the request. - */ - PRECONDITION_FAILED = 412, - - /** - * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large". - */ - PAYLOAD_TOO_LARGE = 413, - - /** - * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request, - * in which case it should be converted to a POST request. - * Called "Request-URI Too Long" previously. - */ - URI_TOO_LONG = 414, - - /** - * The request entity has a media type which the server or resource does not support. - * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format. - */ - UNSUPPORTED_MEDIA_TYPE = 415, - - /** - * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion. - * For example, if the client asked for a part of the file that lies beyond the end of the file. - * Called "Requested Range Not Satisfiable" previously. - */ - RANGE_NOT_SATISFIABLE = 416, - - /** - * The server cannot meet the requirements of the Expect request-header field. - */ - EXPECTATION_FAILED = 417, - - /** - * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, - * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by - * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com. - */ - I_AM_A_TEAPOT = 418, - - /** - * The request was directed at a server that is not able to produce a response (for example because a connection reuse). - */ - MISDIRECTED_REQUEST = 421, - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - */ - UNPROCESSABLE_ENTITY = 422, - - /** - * The resource that is being accessed is locked. - */ - LOCKED = 423, - - /** - * The request failed due to failure of a previous request (e.g., a PROPPATCH). - */ - FAILED_DEPENDENCY = 424, - - /** - * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field. - */ - UPGRADE_REQUIRED = 426, - - /** - * The origin server requires the request to be conditional. - * Intended to prevent "the 'lost update' problem, where a client - * GETs a resource's state, modifies it, and PUTs it back to the server, - * when meanwhile a third party has modified the state on the server, leading to a conflict." - */ - PRECONDITION_REQUIRED = 428, - - /** - * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes. - */ - TOO_MANY_REQUESTS = 429, - - /** - * The server is unwilling to process the request because either an individual header field, - * or all the header fields collectively, are too large. - */ - REQUEST_HEADER_FIELDS_TOO_LARGE = 431, - - /** - * A server operator has received a legal demand to deny access to a resource or to a set of resources - * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451. - */ - UNAVAILABLE_FOR_LEGAL_REASONS = 451, - - /** - * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. - */ - INTERNAL_SERVER_ERROR = 500, - - /** - * The server either does not recognize the request method, or it lacks the ability to fulfill the request. - * Usually this implies future availability (e.g., a new feature of a web-service API). - */ - NOT_IMPLEMENTED = 501, - - /** - * The server was acting as a gateway or proxy and received an invalid response from the upstream server. - */ - BAD_GATEWAY = 502, - - /** - * The server is currently unavailable (because it is overloaded or down for maintenance). - * Generally, this is a temporary state. - */ - SERVICE_UNAVAILABLE = 503, - - /** - * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server. - */ - GATEWAY_TIMEOUT = 504, - - /** - * The server does not support the HTTP protocol version used in the request - */ - HTTP_VERSION_NOT_SUPPORTED = 505, - - /** - * Transparent content negotiation for the request results in a circular reference. - */ - VARIANT_ALSO_NEGOTIATES = 506, - - /** - * The server is unable to store the representation needed to complete the request. - */ - INSUFFICIENT_STORAGE = 507, - - /** - * The server detected an infinite loop while processing the request. - */ - LOOP_DETECTED = 508, - - /** - * Further extensions to the request are required for the server to fulfill it. - */ - NOT_EXTENDED = 510, - - /** - * The client needs to authenticate to gain network access. - * Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used - * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot). - */ - NETWORK_AUTHENTICATION_REQUIRED = 511, -} - -export default HttpStatusCodes diff --git a/apps/api/src/common/Paths.ts b/apps/api/src/common/Paths.ts deleted file mode 100644 index 5d2976fe9..000000000 --- a/apps/api/src/common/Paths.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Express router paths go here. - */ - -export default { - Base: '', - Api: { - Base: '/api', - V1: { - Base: '/v1', - Chat: { - Base: '/chat', - Completions: '/completions', - }, - }, - }, -} as const diff --git a/apps/api/src/common/RouteError.ts b/apps/api/src/common/RouteError.ts deleted file mode 100644 index a9b5a8888..000000000 --- a/apps/api/src/common/RouteError.ts +++ /dev/null @@ -1,17 +0,0 @@ -import HttpStatusCodes from '@src/common/HttpStatusCodes' - -/** - * Error with status code and message - */ -class RouteError extends Error { - public status: HttpStatusCodes - - public constructor(status: HttpStatusCodes, message: string) { - super(message) - this.status = status - } -} - -// **** Export default **** // - -export default RouteError diff --git a/apps/api/src/common/errors.ts b/apps/api/src/common/errors.ts deleted file mode 100644 index 2a8e989f3..000000000 --- a/apps/api/src/common/errors.ts +++ /dev/null @@ -1,47 +0,0 @@ -import HttpStatusCodes from './HttpStatusCodes' - -type ErrorType = { - [key: string]: string[] | undefined - [key: number]: string[] | undefined - [key: symbol]: string[] | undefined -} - -export class LatitudeError extends Error { - statusCode: number = HttpStatusCodes.BAD_REQUEST - name: string = 'UnexpectedError' - - public details: ErrorType - - constructor(message: string, details: ErrorType = {}) { - super(message) - this.details = details - } -} - -export class ConflictError extends LatitudeError { - public statusCode = HttpStatusCodes.CONFLICT - public name = 'ConflictError' -} - -export class UnprocessableEntityError extends LatitudeError { - public statusCode = HttpStatusCodes.UNPROCESSABLE_ENTITY - public name = 'UnprocessableEntityError' - constructor(message: string, details: ErrorType) { - super(message, details) - } -} - -export class NotFoundError extends LatitudeError { - public statusCode = HttpStatusCodes.NOT_FOUND - public name = 'NotFoundError' -} - -export class ForbiddenError extends LatitudeError { - public statusCode = HttpStatusCodes.FORBIDDEN - public name = 'ForbiddenError' -} - -export class UnauthorizedError extends LatitudeError { - public statusCode = HttpStatusCodes.UNAUTHORIZED - public name = 'UnauthorizedError' -} diff --git a/apps/api/src/common/misc.ts b/apps/api/src/common/misc.ts deleted file mode 100644 index 8616b3224..000000000 --- a/apps/api/src/common/misc.ts +++ /dev/null @@ -1,5 +0,0 @@ -export enum NodeEnvs { - Dev = 'development', - Test = 'test', - Production = 'production', -} diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts deleted file mode 100644 index 896e196ba..000000000 --- a/apps/api/src/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import EnvVars from '@src/common/EnvVars' - -import server from './server' - -const SERVER_START_MSG = 'Express server started on port: ' + EnvVars.PORT - -server.listen(EnvVars.PORT, () => console.info(SERVER_START_MSG)) diff --git a/apps/api/src/middlewares/validate.ts b/apps/api/src/middlewares/validate.ts deleted file mode 100644 index 78030723c..000000000 --- a/apps/api/src/middlewares/validate.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Result } from '@latitude-data/core' -import { UnprocessableEntityError } from '@src/common/errors' -import { NextFunction, Request, Response } from 'express' -import { ZodError, ZodSchema } from 'zod' - -export default function validate(schema: ZodSchema) { - return (req: Request, _res: Response, next: NextFunction) => { - try { - const parsed = schema.parse(req.body) - return next(Result.ok(parsed)) - } catch (err) { - const error = err as ZodError - const errorDetails = error.flatten().fieldErrors - - throw new UnprocessableEntityError('Validation failed', errorDetails) - } - } -} diff --git a/apps/api/src/routes/api/index.ts b/apps/api/src/routes/api/index.ts deleted file mode 100644 index 548c85834..000000000 --- a/apps/api/src/routes/api/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Paths from '@src/common/Paths' -import { Router } from 'express' - -import v1Router from './v1' - -const router = Router() - -router.use(Paths.Api.V1.Base, v1Router) - -export default router diff --git a/apps/api/src/routes/api/v1/chat/completions.test.ts b/apps/api/src/routes/api/v1/chat/completions.test.ts deleted file mode 100644 index 2dc85e0de..000000000 --- a/apps/api/src/routes/api/v1/chat/completions.test.ts +++ /dev/null @@ -1,31 +0,0 @@ -import HttpStatusCodes from '@src/common/HttpStatusCodes' -import app from '@src/server' -import { Response } from 'express' -import supertest, { Test } from 'supertest' -import TestAgent from 'supertest/lib/agent' -import apiCb from 'test/support/apiCb' -import Paths from 'test/support/Paths' -import { beforeAll, describe, expect, it } from 'vitest' - -// Tests -describe('CompletionsRouter', () => { - let agent: TestAgent - - beforeAll(() => { - agent = supertest.agent(app) - }) - - describe(`"GET:${Paths.Api.V1.Chat.Completions}"`, () => { - const api = (cb: Function) => - agent.get(Paths.Api.V1.Chat.Completions).end(apiCb(cb)) - - // Success - it('should return 200', () => - new Promise((done) => { - api((res: Response) => { - expect(res.status).toBe(HttpStatusCodes.OK) - done() - }) - })) - }) -}) diff --git a/apps/api/src/routes/api/v1/chat/index.ts b/apps/api/src/routes/api/v1/chat/index.ts deleted file mode 100644 index f0a161364..000000000 --- a/apps/api/src/routes/api/v1/chat/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Paths from '@src/common/Paths' -import { Router } from 'express' - -import { completions } from './routes' - -const router = Router() - -router.use(Paths.Api.V1.Chat.Completions, completions) - -export default router diff --git a/apps/api/src/routes/api/v1/chat/routes.ts b/apps/api/src/routes/api/v1/chat/routes.ts deleted file mode 100644 index 2d481fc73..000000000 --- a/apps/api/src/routes/api/v1/chat/routes.ts +++ /dev/null @@ -1,6 +0,0 @@ -import HttpStatusCodes from '@src/common/HttpStatusCodes' -import { Request, Response } from 'express' - -export function completions(_: Request, res: Response) { - return res.status(HttpStatusCodes.OK).json() -} diff --git a/apps/api/src/routes/api/v1/index.ts b/apps/api/src/routes/api/v1/index.ts deleted file mode 100644 index d2db7c9b5..000000000 --- a/apps/api/src/routes/api/v1/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Paths from '@src/common/Paths' -import { Router } from 'express' - -import chatRouter from './chat' - -const router = Router() - -router.use(Paths.Api.V1.Chat.Base, chatRouter) - -export default router diff --git a/apps/api/src/routes/index.ts b/apps/api/src/routes/index.ts deleted file mode 100644 index 8a071e423..000000000 --- a/apps/api/src/routes/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Paths from '@src/common/Paths' -import { Router } from 'express' - -import apiRouter from './api' - -const router = Router() - -router.use(Paths.Api.Base, apiRouter) - -export default router diff --git a/apps/api/src/server.ts b/apps/api/src/server.ts deleted file mode 100644 index 1326a4529..000000000 --- a/apps/api/src/server.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Setup express server. - */ - -import express, { NextFunction, Request, Response } from 'express' -import helmet from 'helmet' -import morgan from 'morgan' - -import 'express-async-errors' - -import EnvVars from '@src/common/EnvVars' -import HttpStatusCodes from '@src/common/HttpStatusCodes' -import { NodeEnvs } from '@src/common/misc' -import BaseRouter from '@src/routes' - -import { LatitudeError, UnprocessableEntityError } from './common/errors' - -const app = express() - -app.use(express.json()) -app.use(express.urlencoded({ extended: true })) - -if (EnvVars.NODE_ENV === NodeEnvs.Dev.valueOf()) { - app.use(morgan('dev')) -} - -if (EnvVars.NODE_ENV === NodeEnvs.Production.valueOf()) { - // Apache style common logs - app.use(morgan('common')) - app.use(helmet()) -} - -// Add APIs, must be after middleware -app.use('/', BaseRouter) - -// Add error handler -app.use((err: Error, _: Request, res: Response, __: NextFunction) => { - if (EnvVars.NODE_ENV !== NodeEnvs.Test.valueOf()) { - console.error(err.message, true) - } - - if (err instanceof UnprocessableEntityError) { - return res.status(err.statusCode).json({ - name: err.name, - message: err.message, - details: err.details, - }) - } else if (err instanceof LatitudeError) { - return res.status(err.statusCode).json({ - message: err.message, - details: err.details, - }) - } else { - return res - .status(HttpStatusCodes.BAD_REQUEST) - .json({ message: err.message }) - } -}) - -export default app diff --git a/apps/api/src/services/elastic/client.ts b/apps/api/src/services/elastic/client.ts deleted file mode 100644 index 174850ace..000000000 --- a/apps/api/src/services/elastic/client.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Client } from '@elastic/elasticsearch' -import EnvVars from '@src/common/EnvVars' - -export default new Client({ - node: EnvVars.ELASTIC_URL, - auth: { - username: EnvVars.ELASTIC_USERNAME, - password: EnvVars.ELASTIC_PASSWORD, - }, -}) diff --git a/apps/api/test/support/Paths.ts b/apps/api/test/support/Paths.ts deleted file mode 100644 index 7390da496..000000000 --- a/apps/api/test/support/Paths.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Convert paths to full for testing. - */ - -import Paths from '@src/common/Paths' -import jetPaths from 'jet-paths' - -export default jetPaths(Paths) diff --git a/apps/api/test/support/apiCb.ts b/apps/api/test/support/apiCb.ts deleted file mode 100644 index 6fdfe5303..000000000 --- a/apps/api/test/support/apiCb.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CallbackHandler } from 'supertest' - -function apiCb(cb: Function, printErr?: boolean): CallbackHandler { - return (err: Error, res: unknown) => { - if (printErr) console.error(err) - - return cb(res) - } -} - -export default apiCb diff --git a/apps/api/test/support/jasmine.json b/apps/api/test/support/jasmine.json deleted file mode 100644 index 66e8bdb87..000000000 --- a/apps/api/test/support/jasmine.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "spec_dir": "test", - "spec_files": ["**/*test.ts"], - "helpers": ["helpers/**/*.js"], - "stopSpecOnExpectationFailure": false, - "random": true -} diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json deleted file mode 100644 index 435934330..000000000 --- a/apps/api/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "@latitude-data/typescript-config/base.json", - "compilerOptions": { - "outDir": "dist", - "baseUrl": "./", - "paths": { - "@src/*": ["src/*"], - "$core/*": ["../../packages/core/src/*"] - }, - "useUnknownInCatchVariables": false - }, - "include": ["src/**/*.ts", "test/**/*.ts"] -} diff --git a/apps/api/tsconfig.prod.json b/apps/api/tsconfig.prod.json deleted file mode 100644 index 5c37387e2..000000000 --- a/apps/api/tsconfig.prod.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "sourceMap": false, - "removeComments": true, - "noEmit": false - }, - "exclude": ["test", "build.ts"] -} diff --git a/apps/api/vitest.config.ts b/apps/api/vitest.config.ts deleted file mode 100644 index 414617834..000000000 --- a/apps/api/vitest.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import path from 'path' - -import dotenv from 'dotenv' -import tsconfigPaths from 'vite-tsconfig-paths' -import { defineConfig } from 'vitest/config' - -dotenv.config({ - path: path.join(__dirname, './env/test.env'), -}) - -export default defineConfig({ - plugins: [tsconfigPaths()], -}) diff --git a/apps/web/package.json b/apps/web/package.json index 0bc0d589e..21c16a5c3 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -10,7 +10,9 @@ "start": "next start", "lint": "next lint", "tc": "tsc --noEmit", - "prettier": "prettier --write \"**/*.{ts,tsx,md}\"" + "prettier": "prettier --write \"**/*.{ts,tsx,md}\"", + "test": "vitest --run", + "test:watch": "vitest" }, "dependencies": { "@elastic/elasticsearch": "^8.14.0", @@ -21,12 +23,12 @@ "@latitude-data/web-ui": "workspace:*", "@lucia-auth/adapter-drizzle": "^1.0.7", "@monaco-editor/react": "^4.6.0", - "monaco-editor": "^0.50.0", "@t3-oss/env-nextjs": "^0.10.1", "bcrypt": "^5.1.1", "bullmq": "^5.8.5", "ioredis": "^5.4.1", "lucia": "^3.2.0", + "monaco-editor": "^0.50.0", "next": "^14.3.0-canary.87", "react": "19.0.0-rc-378b305958-20240710", "react-dom": "19.0.0-rc-378b305958-20240710", @@ -46,8 +48,11 @@ "autoprefixer": "^10.4.19", "drizzle-kit": "^0.22.8", "eslint": "^8.57.0", + "node-mocks-http": "^1.15.0", "postcss": "^8.4.39", "tailwindcss": "^3.4.4", - "typescript": "^5.5.3" + "typescript": "^5.5.3", + "vite-tsconfig-paths": "^4.3.2", + "vitest": "^2.0.3" } } diff --git a/apps/web/src/app/(private)/api/v1/projects/[projectId]/commits/[commitUuid]/[...documentPath]/route.test.ts b/apps/web/src/app/(private)/api/v1/projects/[projectId]/commits/[commitUuid]/[...documentPath]/route.test.ts new file mode 100644 index 000000000..229e7da5d --- /dev/null +++ b/apps/web/src/app/(private)/api/v1/projects/[projectId]/commits/[commitUuid]/[...documentPath]/route.test.ts @@ -0,0 +1,108 @@ +import { HEAD_COMMIT, mergeCommit } from '@latitude-data/core' +import useTestDatabase from '$core/tests/useTestDatabase' +import { NextRequest } from 'next/server' +import { describe, expect, test } from 'vitest' + +import { GET } from './route' + +useTestDatabase() + +describe('GET documentVersion', () => { + test('returns the document by path', async (ctx) => { + const { project } = await ctx.factories.createProject() + const { commit } = await ctx.factories.createDraft({ project }) + const { documentVersion: doc } = await ctx.factories.createDocumentVersion({ + commit, + }) + + await mergeCommit({ commitId: commit.id }) + + const response = await GET( + new NextRequest( + 'http://localhost/api/projects/projectId/commits/commitUuid/path/to/doc', + ), + { + params: { + projectId: project.id, + commitUuid: commit.uuid, + documentPath: doc.path.split('/'), + }, + }, + ) + + expect(response.status).toBe(200) + expect((await response.json()).id).toEqual(doc.id) + }) + + test('returns the document in main branch if commitUuid is HEAD', async (ctx) => { + const { project } = await ctx.factories.createProject() + const { commit } = await ctx.factories.createDraft({ project }) + const { documentVersion: doc } = await ctx.factories.createDocumentVersion({ + commit, + }) + + await mergeCommit({ commitId: commit.id }) + + const response = await GET( + new NextRequest( + 'http://localhost/api/projects/projectId/commits/HEAD/path/to/doc', + ), + { + params: { + projectId: project.id, + commitUuid: HEAD_COMMIT, + documentPath: doc.path.split('/'), + }, + }, + ) + + expect(response.status).toBe(200) + expect((await response.json()).id).toEqual(doc.id) + }) + + test('returns 404 if document is not found', async (ctx) => { + const { project } = await ctx.factories.createProject() + const { commit } = await ctx.factories.createDraft({ project }) + + await mergeCommit({ commitId: commit.id }) + + const response = await GET( + new NextRequest( + 'http://localhost/api/projects/projectId/commits/commitUuid/path/to/doc', + ), + { + params: { + projectId: project.id, + commitUuid: commit.uuid, + documentPath: ['path', 'to', 'doc'], + }, + }, + ) + + expect(response.status).toBe(404) + }) + + test('returns the document even if commit is not merged', async (ctx) => { + const { project } = await ctx.factories.createProject() + const { commit } = await ctx.factories.createDraft({ project }) + const { documentVersion: doc } = await ctx.factories.createDocumentVersion({ + commit, + }) + + const response = await GET( + new NextRequest( + 'http://localhost/api/projects/projectId/commits/commitUuid/path/to/doc', + ), + { + params: { + projectId: project.id, + commitUuid: commit.uuid, + documentPath: doc.path.split('/'), + }, + }, + ) + + expect(response.status).toBe(200) + expect((await response.json()).id).toEqual(doc.id) + }) +}) diff --git a/apps/web/src/app/(private)/api/v1/projects/[projectId]/commits/[commitUuid]/[...documentPath]/route.ts b/apps/web/src/app/(private)/api/v1/projects/[projectId]/commits/[commitUuid]/[...documentPath]/route.ts new file mode 100644 index 000000000..bcbd259c7 --- /dev/null +++ b/apps/web/src/app/(private)/api/v1/projects/[projectId]/commits/[commitUuid]/[...documentPath]/route.ts @@ -0,0 +1,29 @@ +import { getDocumentByPath } from '@latitude-data/core' +import apiRoute from '$/helpers/api/route' +import { NextRequest } from 'next/server' + +export async function GET( + _: NextRequest, + { + params, + }: { + params: { + commitUuid: string + projectId: number + documentPath: string[] + } + }, +) { + return apiRoute(async () => { + const { projectId, commitUuid, documentPath } = params + + const result = await getDocumentByPath({ + projectId: Number(projectId), + commitUuid, + path: documentPath.join('/'), + }) + const document = result.unwrap() + + return Response.json(document) + }) +} diff --git a/apps/web/src/env.ts b/apps/web/src/env.ts index 35058a107..d8c36bbf4 100644 --- a/apps/web/src/env.ts +++ b/apps/web/src/env.ts @@ -13,6 +13,7 @@ export default createEnv({ ELASTIC_URL: z.string(), ELASTIC_USERNAME: z.string(), ELASTIC_PASSWORD: z.string(), + LATITUDE_API_KEY: z.string(), }, runtimeEnv: { DATABASE_URL: process.env.DATABASE_URL, @@ -22,5 +23,6 @@ export default createEnv({ ELASTIC_URL: process.env.ELASTIC_URL, ELASTIC_USERNAME: process.env.ELASTIC_USERNAME, ELASTIC_PASSWORD: process.env.ELASTIC_PASSWORD, + LATITUDE_API_KEY: process.env.LATITUDE_API_KEY, }, }) diff --git a/apps/web/src/helpers/api/errors.ts b/apps/web/src/helpers/api/errors.ts new file mode 100644 index 000000000..f346c2090 --- /dev/null +++ b/apps/web/src/helpers/api/errors.ts @@ -0,0 +1,19 @@ +import { NextResponse } from 'next/server' + +export function apiNotFound(msg?: string) { + return NextResponse.json( + { error: msg || 'Not Found' }, + { + status: 404, + }, + ) +} + +export function apiUnauthorized(msg?: string) { + return NextResponse.json( + { error: msg || 'Unauthorized' }, + { + status: 401, + }, + ) +} diff --git a/apps/web/src/helpers/api/route.ts b/apps/web/src/helpers/api/route.ts new file mode 100644 index 000000000..c75f4df6a --- /dev/null +++ b/apps/web/src/helpers/api/route.ts @@ -0,0 +1,40 @@ +import { LatitudeError, UnprocessableEntityError } from '@latitude-data/core' +import { NextResponse } from 'next/server' + +export default async function apiRoute(fn: () => any) { + try { + return await fn() + } catch (error) { + const err = error as Error + + if (err instanceof UnprocessableEntityError) { + return NextResponse.json( + { + name: err.name, + message: err.message, + details: err.details, + }, + { + status: err.statusCode, + }, + ) + } else if (err instanceof LatitudeError) { + return NextResponse.json( + { + message: err.message, + details: err.details, + }, + { + status: err.statusCode, + }, + ) + } else { + return NextResponse.json( + { message: err.message }, + { + status: 422, + }, + ) + } + } +} diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts new file mode 100644 index 000000000..d1a713e89 --- /dev/null +++ b/apps/web/src/middleware.ts @@ -0,0 +1,28 @@ +import { getApiKey } from '@latitude-data/core' +import { NextRequest, NextResponse } from 'next/server' + +import env from './env' +import { apiUnauthorized } from './helpers/api/errors' + +export class LatitudeRequest extends NextRequest { + workspaceId?: number +} + +export async function middleware(request: LatitudeRequest) { + const { headers } = request + const [type, token] = headers.get('Authorization')?.split(' ') ?? [] + if (type !== 'Bearer' || token !== env.LATITUDE_API_KEY) { + return apiUnauthorized() + } + + const result = await getApiKey({ uuid: token }) + if (result.error) return apiUnauthorized() + + request.workspaceId = result.value.workspaceId + + return NextResponse.next() +} + +export const config = { + matcher: '/api/v1/(.*)', +} diff --git a/apps/web/vitest.config.js b/apps/web/vitest.config.js new file mode 100644 index 000000000..a1bb1090c --- /dev/null +++ b/apps/web/vitest.config.js @@ -0,0 +1,24 @@ +/// +import { dirname } from 'path' +import { fileURLToPath } from 'url' + +import { defineConfig } from 'vitest/config' + +const filename = fileURLToPath(import.meta.url) +const root = dirname(filename) + +export default defineConfig({ + test: { + globals: true, + testTimeout: 5000, + environment: 'node', + setupFiles: ['../../packages/core/src/tests/setup.ts'], + include: ['./src/**/*.test.ts'], + }, + resolve: { + alias: { + $: `${root}/src`, + $core: `${root}/../../packages/core/src`, + }, + }, +}) diff --git a/packages/core/src/data-access/apiKeys.ts b/packages/core/src/data-access/apiKeys.ts new file mode 100644 index 000000000..54445e9d8 --- /dev/null +++ b/packages/core/src/data-access/apiKeys.ts @@ -0,0 +1,11 @@ +import { database } from '$core/client' +import { NotFoundError, Result } from '$core/lib' +import { apiKeys } from '$core/schema' +import { eq } from 'drizzle-orm' + +export async function getApiKey({ uuid }: { uuid: string }, db = database) { + const apiKey = await db.query.apiKeys.findFirst({ where: eq(apiKeys, uuid) }) + if (!apiKey) return Result.error(new NotFoundError('API key not found')) + + return Result.ok(apiKey) +} diff --git a/packages/core/src/data-access/documentVersions/getDocumentById.ts b/packages/core/src/data-access/documentVersions/getDocumentById.ts new file mode 100644 index 000000000..003bb0735 --- /dev/null +++ b/packages/core/src/data-access/documentVersions/getDocumentById.ts @@ -0,0 +1,20 @@ +import { database } from '$core/client' +import { LatitudeError, NotFoundError, Result, TypedResult } from '$core/lib' +import { documentVersions } from '$core/schema' +import { eq } from 'drizzle-orm' + +export async function getDocumentById( + { + documentId, + }: { + documentId: number + }, + db = database, +): Promise> { + const document = await db.query.documentVersions.findFirst({ + where: eq(documentVersions.id, documentId), + }) + if (!document) return Result.error(new NotFoundError('Document not found')) + + return Result.ok(document) +} diff --git a/packages/core/src/data-access/documentVersions/getDocumentByPath.ts b/packages/core/src/data-access/documentVersions/getDocumentByPath.ts new file mode 100644 index 000000000..ca48c355f --- /dev/null +++ b/packages/core/src/data-access/documentVersions/getDocumentByPath.ts @@ -0,0 +1,34 @@ +import { database } from '$core/client' +import { NotFoundError, Result } from '$core/lib' + +import { getDocumentsAtCommit } from './getDocumentsAtCommit' + +export async function getDocumentByPath( + { + projectId, + commitUuid, + path, + }: { + projectId: number + commitUuid: string + path: string + }, + db = database, +) { + try { + const result = await getDocumentsAtCommit({ projectId, commitUuid }, db) + const documents = result.unwrap() + const document = documents.find((doc) => doc.path === path) + if (!document) { + return Result.error( + new NotFoundError( + `No document with path ${path} at commit ${commitUuid}`, + ), + ) + } + + return Result.ok(document) + } catch (err) { + return Result.error(err as Error) + } +} diff --git a/packages/core/src/data-access/documentVersions.test.ts b/packages/core/src/data-access/documentVersions/getDocumentsAtCommit.test.ts similarity index 97% rename from packages/core/src/data-access/documentVersions.test.ts rename to packages/core/src/data-access/documentVersions/getDocumentsAtCommit.test.ts index 60748ff5c..54100135f 100644 --- a/packages/core/src/data-access/documentVersions.test.ts +++ b/packages/core/src/data-access/documentVersions/getDocumentsAtCommit.test.ts @@ -1,9 +1,9 @@ import { HEAD_COMMIT } from '$core/constants' -import mergeCommit from '$core/services/commits/merge' +import { mergeCommit } from '$core/services/commits/merge' import useTestDatabase from '$core/tests/useTestDatabase' import { describe, expect, it } from 'vitest' -import { getDocumentsAtCommit } from './documentVersions' +import { getDocumentsAtCommit } from './getDocumentsAtCommit' useTestDatabase() diff --git a/packages/core/src/data-access/documentVersions.ts b/packages/core/src/data-access/documentVersions/getDocumentsAtCommit.ts similarity index 75% rename from packages/core/src/data-access/documentVersions.ts rename to packages/core/src/data-access/documentVersions/getDocumentsAtCommit.ts index 02f21e416..d0e186a24 100644 --- a/packages/core/src/data-access/documentVersions.ts +++ b/packages/core/src/data-access/documentVersions/getDocumentsAtCommit.ts @@ -8,7 +8,7 @@ import { Result, TypedResult, } from '@latitude-data/core' -import { LatitudeError, NotFoundError } from '$core/lib/errors' +import { LatitudeError } from '$core/lib/errors' import { and, eq, isNotNull, lte, max } from 'drizzle-orm' export async function getDocumentsAtCommit( @@ -91,34 +91,3 @@ export async function getDocumentsAtCommit( return Result.ok(totalDocuments) } - -export async function getDocument({ - projectId, - commitUuid, - documentId, -}: { - projectId: number - commitUuid: string - documentId: number -}): Promise> { - const commitResult = await findCommit({ uuid: commitUuid, projectId }) - if (commitResult.error) return commitResult - const commit = commitResult.unwrap() - - const result = await database - .select({ content: documentVersions.content }) - .from(documentVersions) - .where( - and( - eq(documentVersions.id, documentId), - eq(documentVersions.commitId, commit.id), - ), - ) - - if (result.length === 0) { - return Result.error(new NotFoundError('Document not found')) - } - - const documentVersion = result[0]! - return Result.ok({ content: documentVersion.content ?? '' }) -} diff --git a/packages/core/src/data-access/documentVersions/index.ts b/packages/core/src/data-access/documentVersions/index.ts new file mode 100644 index 000000000..84dbd18ac --- /dev/null +++ b/packages/core/src/data-access/documentVersions/index.ts @@ -0,0 +1,3 @@ +export * from './getDocumentsAtCommit' +export * from './getDocumentByPath' +export * from './getDocumentById' diff --git a/packages/core/src/data-access/index.ts b/packages/core/src/data-access/index.ts index 49ba75f59..952fcc44a 100644 --- a/packages/core/src/data-access/index.ts +++ b/packages/core/src/data-access/index.ts @@ -1,8 +1,5 @@ -import { Database } from '@latitude-data/core' - export * from './users' export * from './projects' export * from './commits' export * from './documentVersions' - -export type AppContext = { db: Database } +export * from './apiKeys' diff --git a/packages/core/src/services/commits/create.ts b/packages/core/src/services/commits/create.ts index 712ef82d9..77d8be510 100644 --- a/packages/core/src/services/commits/create.ts +++ b/packages/core/src/services/commits/create.ts @@ -7,7 +7,7 @@ import { Transaction, } from '@latitude-data/core' -export default async function createCommit({ +export async function createCommit({ commit, db = database, }: { diff --git a/packages/core/src/services/commits/index.ts b/packages/core/src/services/commits/index.ts new file mode 100644 index 000000000..79f13e7ba --- /dev/null +++ b/packages/core/src/services/commits/index.ts @@ -0,0 +1,2 @@ +export * from './create' +export * from './merge' diff --git a/packages/core/src/services/commits/merge.ts b/packages/core/src/services/commits/merge.ts index 018b6baee..f0e049659 100644 --- a/packages/core/src/services/commits/merge.ts +++ b/packages/core/src/services/commits/merge.ts @@ -8,7 +8,7 @@ import { import { LatitudeError, NotFoundError } from '$core/lib/errors' import { and, eq } from 'drizzle-orm' -export default async function mergeCommit( +export async function mergeCommit( { commitId }: { commitId: number }, db = database, ) { diff --git a/packages/core/src/services/index.ts b/packages/core/src/services/index.ts index a76d75b1c..f6ff54c30 100644 --- a/packages/core/src/services/index.ts +++ b/packages/core/src/services/index.ts @@ -1,3 +1,5 @@ export * from './users' export * from './workspaces' export * from './documentVersions' +export * from './commits' +export * from './projects' diff --git a/packages/core/src/services/projects/create.ts b/packages/core/src/services/projects/create.ts index 15f9b8570..22dda57c0 100644 --- a/packages/core/src/services/projects/create.ts +++ b/packages/core/src/services/projects/create.ts @@ -5,8 +5,8 @@ import { Transaction, type Project, } from '@latitude-data/core' -import createCommit from '$core/services/commits/create' -import mergeCommit from '$core/services/commits/merge' +import { createCommit } from '$core/services/commits/create' +import { mergeCommit } from '$core/services/commits/merge' export async function createProject( { diff --git a/packages/core/src/tests/factories/commits.ts b/packages/core/src/tests/factories/commits.ts index f57e336e4..43d5bf416 100644 --- a/packages/core/src/tests/factories/commits.ts +++ b/packages/core/src/tests/factories/commits.ts @@ -1,6 +1,6 @@ import { hasOwnProperty } from '$core/lib' import { Project } from '$core/schema' -import createCommitFn from '$core/services/commits/create' +import { createCommit as createCommitFn } from '$core/services/commits/create' import { createProject, ICreateProject } from './projects' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe2cac6c7..b702eccec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,106 +49,6 @@ importers: specifier: ^5.5.3 version: 5.5.3 - apps/api: - dependencies: - '@elastic/elasticsearch': - specifier: ^8.14.0 - version: 8.14.0 - '@latitude-data/env': - specifier: workspace:^ - version: link:../../packages/env - dotenv: - specifier: ^16.4.5 - version: 16.4.5 - express: - specifier: ^4.19.2 - version: 4.19.2 - express-async-errors: - specifier: ^3.1.1 - version: 3.1.1(express@4.19.2) - helmet: - specifier: ^7.1.0 - version: 7.1.0 - inserturlparams: - specifier: ^1.1.2 - version: 1.1.2 - module-alias: - specifier: ^2.2.3 - version: 2.2.3 - morgan: - specifier: ^1.10.0 - version: 1.10.0 - ts-command-line-args: - specifier: ^2.5.1 - version: 2.5.1 - zod: - specifier: ^3.23.8 - version: 3.23.8 - devDependencies: - '@latitude-data/eslint-config': - specifier: workspace:* - version: link:../../tools/eslint - '@latitude-data/typescript-config': - specifier: workspace:* - version: link:../../tools/typescript - '@types/cookie-parser': - specifier: ^1.4.7 - version: 1.4.7 - '@types/express': - specifier: ^4.17.21 - version: 4.17.21 - '@types/find': - specifier: ^0.2.4 - version: 0.2.4 - '@types/fs-extra': - specifier: ^11.0.4 - version: 11.0.4 - '@types/jsonfile': - specifier: ^6.1.4 - version: 6.1.4 - '@types/morgan': - specifier: ^1.9.9 - version: 1.9.9 - '@types/node': - specifier: ^20.14.10 - version: 20.14.10 - '@types/supertest': - specifier: ^6.0.2 - version: 6.0.2 - eslint-plugin-node: - specifier: ^11.1.0 - version: 11.1.0(eslint@9.6.0) - find: - specifier: ^0.3.0 - version: 0.3.0 - fs-extra: - specifier: ^11.2.0 - version: 11.2.0 - jet-paths: - specifier: ^1.0.6 - version: 1.0.6 - prettier: - specifier: ^3.3.2 - version: 3.3.2 - supertest: - specifier: ^7.0.0 - version: 7.0.0 - tsconfig-paths: - specifier: ^4.2.0 - version: 4.2.0 - tsx: - specifier: ^4.16.2 - version: 4.16.2 - typescript: - specifier: ^5.5.3 - version: 5.5.3 - vite-tsconfig-paths: - specifier: ^4.3.2 - version: 4.3.2(typescript@5.5.3) - vitest: - specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.10) - apps/web: dependencies: '@elastic/elasticsearch': @@ -245,6 +145,9 @@ importers: eslint: specifier: ^8.57.0 version: 8.57.0 + node-mocks-http: + specifier: ^1.15.0 + version: 1.15.0 postcss: specifier: ^8.4.39 version: 8.4.39 @@ -254,6 +157,12 @@ importers: typescript: specifier: ^5.5.3 version: 5.5.3 + vite-tsconfig-paths: + specifier: ^4.3.2 + version: 4.3.2(typescript@5.5.3) + vitest: + specifier: ^2.0.3 + version: 2.0.3(@types/node@20.14.10) packages/compiler: dependencies: @@ -3380,16 +3289,6 @@ packages: '@types/node': 20.14.10 dev: true - /@types/cookie-parser@1.4.7: - resolution: {integrity: sha512-Fvuyi354Z+uayxzIGCwYTayFKocfV7TuDYZClCdIP9ckhvAu/ixDtCB6qx2TT0FKjPLf1f3P/J1rgf6lPs64mw==} - dependencies: - '@types/express': 4.17.21 - dev: true - - /@types/cookiejar@2.1.5: - resolution: {integrity: sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==} - dev: true - /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -3411,17 +3310,6 @@ packages: '@types/serve-static': 1.15.7 dev: true - /@types/find@0.2.4: - resolution: {integrity: sha512-8cw1q8jruVOJoojgx8CimvFC4SP+sevnKOifRJTKXsngeWi/md1womzXRBv/LWNCoDEh4U51zc3r8HUAH2QyEg==} - dev: true - - /@types/fs-extra@11.0.4: - resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} - dependencies: - '@types/jsonfile': 6.1.4 - '@types/node': 20.14.10 - dev: true - /@types/http-errors@2.0.4: resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} dev: true @@ -3434,12 +3322,6 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/jsonfile@6.1.4: - resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} - dependencies: - '@types/node': 20.14.10 - dev: true - /@types/lodash-es@4.17.12: resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} dependencies: @@ -3450,20 +3332,10 @@ packages: resolution: {integrity: sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA==} dev: true - /@types/methods@1.1.4: - resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==} - dev: true - /@types/mime@1.3.5: resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} dev: true - /@types/morgan@1.9.9: - resolution: {integrity: sha512-iRYSDKVaC6FkGSpEVVIvrRGw0DfJMiQzIn3qr2G5B3C//AWkulhXgaBd7tS9/J79GWSYMTHGs7PfI5b3Y8m+RQ==} - dependencies: - '@types/node': 20.14.10 - dev: true - /@types/node-fetch@2.6.11: resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} dependencies: @@ -3534,21 +3406,6 @@ packages: '@types/send': 0.17.4 dev: true - /@types/superagent@8.1.7: - resolution: {integrity: sha512-NmIsd0Yj4DDhftfWvvAku482PZum4DBW7U51OvS8gvOkDDY0WT1jsVyDV3hK+vplrsYw8oDwi9QxOM7U68iwww==} - dependencies: - '@types/cookiejar': 2.1.5 - '@types/methods': 1.1.4 - '@types/node': 20.14.10 - dev: true - - /@types/supertest@6.0.2: - resolution: {integrity: sha512-137ypx2lk/wTQbW6An6safu9hXmajAifU/s7szAHLN/FeIm5w7yR0Wkl9fdJMRSHwOn4HLAI0DaB2TOORuhPDg==} - dependencies: - '@types/methods': 1.1.4 - '@types/superagent': 8.1.7 - dev: true - /@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@9.6.0)(typescript@5.5.3): resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -4022,7 +3879,7 @@ packages: dependencies: mime-types: 2.1.35 negotiator: 0.6.3 - dev: false + dev: true /acorn-jsx@5.3.2(acorn@8.12.1): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -4091,6 +3948,7 @@ packages: engines: {node: '>=4'} dependencies: color-convert: 1.9.3 + dev: true /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} @@ -4156,16 +4014,6 @@ packages: dequal: 2.0.3 dev: true - /array-back@3.1.0: - resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} - engines: {node: '>=6'} - dev: false - - /array-back@4.0.2: - resolution: {integrity: sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==} - engines: {node: '>=8'} - dev: false - /array-buffer-byte-length@1.0.1: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} engines: {node: '>= 0.4'} @@ -4174,10 +4022,6 @@ packages: is-array-buffer: 3.0.4 dev: true - /array-flatten@1.1.1: - resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - dev: false - /array-includes@3.1.8: resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} engines: {node: '>= 0.4'} @@ -4331,13 +4175,6 @@ packages: /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - /basic-auth@2.0.1: - resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} - engines: {node: '>= 0.8'} - dependencies: - safe-buffer: 5.1.2 - dev: false - /bcrypt@5.1.1: resolution: {integrity: sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==} engines: {node: '>= 10.0.0'} @@ -4354,26 +4191,6 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} - /body-parser@1.20.2: - resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.11.0 - raw-body: 2.5.2 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - dev: false - /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -4446,11 +4263,6 @@ packages: streamsearch: 1.1.0 dev: false - /bytes@3.1.2: - resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} - engines: {node: '>= 0.8'} - dev: false - /cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -4465,6 +4277,7 @@ packages: function-bind: 1.1.2 get-intrinsic: 1.2.4 set-function-length: 1.2.2 + dev: true /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -4510,6 +4323,7 @@ packages: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 supports-color: 5.5.0 + dev: true /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} @@ -4517,6 +4331,7 @@ packages: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + dev: true /check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} @@ -4599,6 +4414,7 @@ packages: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 + dev: true /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} @@ -4608,6 +4424,7 @@ packages: /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -4643,26 +4460,6 @@ packages: delayed-stream: 1.0.0 dev: true - /command-line-args@5.2.1: - resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} - engines: {node: '>=4.0.0'} - dependencies: - array-back: 3.1.0 - find-replace: 3.0.0 - lodash.camelcase: 4.3.0 - typical: 4.0.0 - dev: false - - /command-line-usage@6.1.3: - resolution: {integrity: sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==} - engines: {node: '>=8.0.0'} - dependencies: - array-back: 4.0.2 - chalk: 2.4.2 - table-layout: 1.0.2 - typical: 5.2.0 - dev: false - /commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -4691,26 +4488,12 @@ packages: engines: {node: '>= 0.6'} dependencies: safe-buffer: 5.2.1 - dev: false - - /content-type@1.0.5: - resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} - engines: {node: '>= 0.6'} - dev: false + dev: true /convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true - /cookie-signature@1.0.6: - resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} - dev: false - - /cookie@0.6.0: - resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} - engines: {node: '>= 0.6'} - dev: false - /cookiejar@2.1.4: resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} dev: true @@ -4784,17 +4567,6 @@ packages: is-data-view: 1.0.1 dev: true - /debug@2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.0.0 - dev: false - /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -4857,11 +4629,6 @@ packages: which-typed-array: 1.1.15 dev: true - /deep-extend@0.6.0: - resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} - engines: {node: '>=4.0.0'} - dev: false - /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true @@ -4873,6 +4640,7 @@ packages: es-define-property: 1.0.0 es-errors: 1.3.0 gopd: 1.0.1 + dev: true /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} @@ -4897,21 +4665,16 @@ packages: engines: {node: '>=0.10'} dev: false - /depd@2.0.0: - resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} - engines: {node: '>= 0.8'} - dev: false + /depd@1.1.2: + resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} + engines: {node: '>= 0.6'} + dev: true /dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} dev: true - /destroy@1.2.0: - resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - dev: false - /detect-indent@7.0.1: resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==} engines: {node: '>=12.20'} @@ -5092,10 +4855,6 @@ packages: /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - /ee-first@1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - dev: false - /electron-to-chromium@1.4.820: resolution: {integrity: sha512-kK/4O/YunacfboFEk/BDf7VO1HoPmDudLTJAU9NmXIOSjsV7qVIX3OrI4REZo0VmdqhcpUcncQc6N8Q3aEXlHg==} dev: true @@ -5106,11 +4865,6 @@ packages: /emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - /encodeurl@1.0.2: - resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} - engines: {node: '>= 0.8'} - dev: false - /enhanced-resolve@5.17.0: resolution: {integrity: sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==} engines: {node: '>=10.13.0'} @@ -5187,10 +4941,12 @@ packages: engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.4 + dev: true /es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + dev: true /es-get-iterator@1.1.3: resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} @@ -5365,14 +5121,11 @@ packages: engines: {node: '>=6'} dev: true - /escape-html@1.0.3: - resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} - dev: false - /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} requiresBuild: true + dev: true /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -5506,17 +5259,6 @@ packages: eslint: 9.6.0 dev: true - /eslint-plugin-es@3.0.1(eslint@9.6.0): - resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} - engines: {node: '>=8.10.0'} - peerDependencies: - eslint: '>=4.19.1 || 9.x' - dependencies: - eslint: 9.6.0 - eslint-utils: 2.1.0 - regexpp: 3.2.0 - dev: true - /eslint-plugin-eslint-comments@3.2.0(eslint@9.6.0): resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} @@ -5609,21 +5351,6 @@ packages: string.prototype.includes: 2.0.0 dev: true - /eslint-plugin-node@11.1.0(eslint@9.6.0): - resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} - engines: {node: '>=8.10.0'} - peerDependencies: - eslint: '>=5.16.0 || 9.x' - dependencies: - eslint: 9.6.0 - eslint-plugin-es: 3.0.1(eslint@9.6.0) - eslint-utils: 2.1.0 - ignore: 5.3.1 - minimatch: 3.1.2 - resolve: 1.22.8 - semver: 6.3.1 - dev: true - /eslint-plugin-only-warn@1.1.0: resolution: {integrity: sha512-2tktqUAT+Q3hCAU0iSf4xAN1k9zOpjK5WO8104mB0rT/dGhOa09582HN5HlbxNbPRZ0THV7nLGvzugcNOSjzfA==} engines: {node: '>=6'} @@ -5755,18 +5482,6 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils@2.1.0: - resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} - engines: {node: '>=6'} - dependencies: - eslint-visitor-keys: 1.3.0 - dev: true - - /eslint-visitor-keys@1.3.0: - resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} - engines: {node: '>=4'} - dev: true - /eslint-visitor-keys@2.1.0: resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} engines: {node: '>=10'} @@ -5935,11 +5650,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /etag@1.8.1: - resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} - engines: {node: '>= 0.6'} - dev: false - /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -5960,53 +5670,6 @@ packages: strip-final-newline: 3.0.0 dev: true - /express-async-errors@3.1.1(express@4.19.2): - resolution: {integrity: sha512-h6aK1da4tpqWSbyCa3FxB/V6Ehd4EEB15zyQq9qe75OZBp0krinNKuH4rAY+S/U/2I36vdLAUFSjQJ+TFmODng==} - peerDependencies: - express: ^4.16.2 - dependencies: - express: 4.19.2 - dev: false - - /express@4.19.2: - resolution: {integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==} - engines: {node: '>= 0.10.0'} - dependencies: - accepts: 1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.2 - content-disposition: 0.5.4 - content-type: 1.0.5 - cookie: 0.6.0 - cookie-signature: 1.0.6 - debug: 2.6.9 - depd: 2.0.0 - encodeurl: 1.0.2 - escape-html: 1.0.3 - etag: 1.8.1 - finalhandler: 1.2.0 - fresh: 0.5.2 - http-errors: 2.0.0 - merge-descriptors: 1.0.1 - methods: 1.1.2 - on-finished: 2.4.1 - parseurl: 1.3.3 - path-to-regexp: 0.1.7 - proxy-addr: 2.0.7 - qs: 6.11.0 - range-parser: 1.2.1 - safe-buffer: 5.2.1 - send: 0.18.0 - serve-static: 1.15.0 - setprototypeof: 1.2.0 - statuses: 2.0.1 - type-is: 1.6.18 - utils-merge: 1.0.1 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - dev: false - /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -6058,28 +5721,6 @@ packages: dependencies: to-regex-range: 5.0.1 - /finalhandler@1.2.0: - resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} - engines: {node: '>= 0.8'} - dependencies: - debug: 2.6.9 - encodeurl: 1.0.2 - escape-html: 1.0.3 - on-finished: 2.4.1 - parseurl: 1.3.3 - statuses: 2.0.1 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color - dev: false - - /find-replace@3.0.0: - resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} - engines: {node: '>=4.0.0'} - dependencies: - array-back: 3.1.0 - dev: false - /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -6096,12 +5737,6 @@ packages: path-exists: 4.0.0 dev: true - /find@0.3.0: - resolution: {integrity: sha512-iSd+O4OEYV/I36Zl8MdYJO0xD82wH528SaCieTVHhclgiYNe9y+yPKSwK+A7/WsmHL1EZ+pYUJBXWTL5qofksw==} - dependencies: - traverse-chain: 0.1.0 - dev: true - /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -6165,11 +5800,6 @@ packages: once: 1.4.0 dev: true - /forwarded@0.2.0: - resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} - engines: {node: '>= 0.6'} - dev: false - /fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} dev: true @@ -6177,15 +5807,6 @@ packages: /fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} - dev: false - - /fs-extra@11.2.0: - resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} - engines: {node: '>=14.14'} - dependencies: - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.1 dev: true /fs-minipass@2.1.0: @@ -6262,6 +5883,7 @@ packages: has-proto: 1.0.3 has-symbols: 1.0.3 hasown: 2.0.2 + dev: true /get-nonce@1.0.1: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} @@ -6404,6 +6026,7 @@ packages: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: get-intrinsic: 1.2.4 + dev: true /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -6419,23 +6042,28 @@ packages: /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + dev: true /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + dev: true /has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: es-define-property: 1.0.0 + dev: true /has-proto@1.0.3: resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} engines: {node: '>= 0.4'} + dev: true /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + dev: true /has-tostringtag@1.0.2: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} @@ -6454,11 +6082,6 @@ packages: dependencies: function-bind: 1.1.2 - /helmet@7.1.0: - resolution: {integrity: sha512-g+HZqgfbpXdCkme/Cd/mZkV0aV3BZZZSugecH03kl38m/Kmdx8jKjBikpDj2cr+Iynv4KpYEviojNdTJActJAg==} - engines: {node: '>=16.0.0'} - dev: false - /hexoid@1.0.0: resolution: {integrity: sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==} engines: {node: '>=8'} @@ -6480,17 +6103,6 @@ packages: whatwg-encoding: 3.1.1 dev: true - /http-errors@2.0.0: - resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} - engines: {node: '>= 0.8'} - dependencies: - depd: 2.0.0 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 2.0.1 - toidentifier: 1.0.1 - dev: false - /http-proxy-agent@7.0.2: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} @@ -6532,13 +6144,6 @@ packages: ms: 2.1.3 dev: true - /iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - dependencies: - safer-buffer: 2.1.2 - dev: false - /iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -6579,10 +6184,6 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - /inserturlparams@1.1.2: - resolution: {integrity: sha512-5ZEGE0x1+jYWelXOp0euZCnWRg5rCiodRBM514LnNAETgpQ/oJV7dX5vJf9WuWsBmY/1DsuX2SYnB3C6WtVm9A==} - dev: false - /internal-slot@1.0.7: resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} engines: {node: '>= 0.4'} @@ -6615,11 +6216,6 @@ packages: - supports-color dev: false - /ipaddr.js@1.9.1: - resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} - engines: {node: '>= 0.10'} - dev: false - /is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} @@ -6869,10 +6465,6 @@ packages: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - /jet-paths@1.0.6: - resolution: {integrity: sha512-LqjN1QY4ixVaouzLt0whXPKmVQjiR0AOw0sJNEt+fO2M0b4lYI5VuMZYCS08BLEgyJIH3mBX3t8m82TwblxIhQ==} - dev: true - /jiti@1.21.6: resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true @@ -6978,14 +6570,6 @@ packages: hasBin: true dev: true - /jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - dependencies: - universalify: 2.0.1 - optionalDependencies: - graceful-fs: 4.2.11 - dev: true - /jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -7062,10 +6646,6 @@ packages: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} dev: false - /lodash.camelcase@4.3.0: - resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} - dev: false - /lodash.defaults@4.2.0: resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} dev: false @@ -7150,7 +6730,7 @@ packages: /media-typer@0.3.0: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} - dev: false + dev: true /memfs-browser@3.5.10302: resolution: {integrity: sha512-JJTc/nh3ig05O0gBBGZjTCPOyydaTxNF0uHYBrcc1gHNnO+KIHIvo0Y1FKCJsaei6FCl8C6xfQomXqu+cuzkIw==} @@ -7171,7 +6751,7 @@ packages: /merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} - dev: false + dev: true /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -7184,6 +6764,7 @@ packages: /methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} + dev: true /micromatch@4.0.7: resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} @@ -7195,18 +6776,20 @@ packages: /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} + dev: true /mime-types@2.1.35: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} dependencies: mime-db: 1.52.0 + dev: true /mime@1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} hasBin: true - dev: false + dev: true /mime@2.6.0: resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} @@ -7292,31 +6875,10 @@ packages: ufo: 1.5.3 dev: true - /module-alias@2.2.3: - resolution: {integrity: sha512-23g5BFj4zdQL/b6tor7Ji+QY4pEfNH784BMslY9Qb0UnJWRAt+lQGLYmRaM0KDBwIG23ffEBELhZDP2rhi9f/Q==} - dev: false - /monaco-editor@0.50.0: resolution: {integrity: sha512-8CclLCmrRRh+sul7C08BmPBP3P8wVWfBHomsTcndxg5NRCEPfu/mc2AGU8k37ajjDVXcXFc12ORAMUkmk+lkFA==} dev: false - /morgan@1.10.0: - resolution: {integrity: sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==} - engines: {node: '>= 0.8.0'} - dependencies: - basic-auth: 2.0.1 - debug: 2.6.9 - depd: 2.0.0 - on-finished: 2.3.0 - on-headers: 1.0.2 - transitivePeerDependencies: - - supports-color - dev: false - - /ms@2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - dev: false - /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -7364,7 +6926,7 @@ packages: /negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} - dev: false + dev: true /next@14.3.0-canary.87(react-dom@19.0.0-rc-378b305958-20240710)(react@19.0.0-rc-378b305958-20240710): resolution: {integrity: sha512-ce2cdsa7tZJ+Tv7y0zQaKXkTQSe/r6ZTXvcsSne2mfo2iE6AYKljMHFRMM/cv2qfM6QIiaANG8z4A+uxVXIevg==} @@ -7445,6 +7007,24 @@ packages: dev: false optional: true + /node-mocks-http@1.15.0: + resolution: {integrity: sha512-3orGBAxXrnwz3ixU8AZpa0x8srAvVSHvbWanAqd5F0zVCVA2QstxaVcTSarFcjz4+pFSnR1zm28MsV83s/BtmA==} + engines: {node: '>=14'} + dependencies: + '@types/express': 4.17.21 + '@types/node': 20.14.10 + accepts: 1.3.8 + content-disposition: 0.5.4 + depd: 1.1.2 + fresh: 0.5.2 + merge-descriptors: 1.0.1 + methods: 1.1.2 + mime: 1.6.0 + parseurl: 1.3.3 + range-parser: 1.2.1 + type-is: 1.6.18 + dev: true + /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true @@ -7507,6 +7087,7 @@ packages: /object-inspect@1.13.2: resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} engines: {node: '>= 0.4'} + dev: true /object-is@1.1.6: resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} @@ -7580,25 +7161,6 @@ packages: /obuf@1.1.2: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} - /on-finished@2.3.0: - resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} - engines: {node: '>= 0.8'} - dependencies: - ee-first: 1.1.1 - dev: false - - /on-finished@2.4.1: - resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} - engines: {node: '>= 0.8'} - dependencies: - ee-first: 1.1.1 - dev: false - - /on-headers@1.0.2: - resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==} - engines: {node: '>= 0.8'} - dev: false - /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: @@ -7712,7 +7274,7 @@ packages: /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} - dev: false + dev: true /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} @@ -7742,10 +7304,6 @@ packages: lru-cache: 10.4.0 minipass: 7.1.2 - /path-to-regexp@0.1.7: - resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} - dev: false - /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -8044,14 +7602,6 @@ packages: react-is: 16.13.1 dev: true - /proxy-addr@2.0.7: - resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} - engines: {node: '>= 0.10'} - dependencies: - forwarded: 0.2.0 - ipaddr.js: 1.9.1 - dev: false - /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true @@ -8061,13 +7611,6 @@ packages: engines: {node: '>=6'} dev: true - /qs@6.11.0: - resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} - engines: {node: '>=0.6'} - dependencies: - side-channel: 1.0.6 - dev: false - /qs@6.12.2: resolution: {integrity: sha512-x+NLUpx9SYrcwXtX7ob1gnkSems4i/mGZX5SlYxwIau6RrUSODO89TR/XDGGpn5RPWSYIB+aSfuSlV5+CmbTBg==} engines: {node: '>=0.6'} @@ -8085,17 +7628,7 @@ packages: /range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} - dev: false - - /raw-body@2.5.2: - resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} - engines: {node: '>= 0.8'} - dependencies: - bytes: 3.1.2 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - dev: false + dev: true /react-dom@18.3.0(react@18.3.0): resolution: {integrity: sha512-zaKdLBftQJnvb7FtDIpZtsAIb2MZU087RM8bRDZU8LVCCFYjPTsDZJNFUWPcVz3HFSN1n/caxi0ca4B/aaVQGQ==} @@ -8251,11 +7784,6 @@ packages: redis-errors: 1.2.0 dev: false - /reduce-flatten@2.0.0: - resolution: {integrity: sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==} - engines: {node: '>=6'} - dev: false - /reflect.getprototypeof@1.0.6: resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} engines: {node: '>= 0.4'} @@ -8288,11 +7816,6 @@ packages: set-function-name: 2.0.2 dev: true - /regexpp@3.2.0: - resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} - engines: {node: '>=8'} - dev: true - /regjsparser@0.10.0: resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} hasBin: true @@ -8411,13 +7934,8 @@ packages: isarray: 2.0.5 dev: true - /safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: false - /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: false /safe-regex-test@1.0.3: resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} @@ -8430,6 +7948,7 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + dev: true /saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} @@ -8465,39 +7984,6 @@ packages: engines: {node: '>=10'} hasBin: true - /send@0.18.0: - resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} - engines: {node: '>= 0.8.0'} - dependencies: - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: 1.0.2 - escape-html: 1.0.3 - etag: 1.8.1 - fresh: 0.5.2 - http-errors: 2.0.0 - mime: 1.6.0 - ms: 2.1.3 - on-finished: 2.4.1 - range-parser: 1.2.1 - statuses: 2.0.1 - transitivePeerDependencies: - - supports-color - dev: false - - /serve-static@1.15.0: - resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} - engines: {node: '>= 0.8.0'} - dependencies: - encodeurl: 1.0.2 - escape-html: 1.0.3 - parseurl: 1.3.3 - send: 0.18.0 - transitivePeerDependencies: - - supports-color - dev: false - /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: false @@ -8512,6 +7998,7 @@ packages: get-intrinsic: 1.2.4 gopd: 1.0.1 has-property-descriptors: 1.0.2 + dev: true /set-function-name@2.0.2: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} @@ -8523,10 +8010,6 @@ packages: has-property-descriptors: 1.0.2 dev: true - /setprototypeof@1.2.0: - resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - dev: false - /sharp@0.33.4: resolution: {integrity: sha512-7i/dt5kGl7qR4gwPRD2biwD2/SvBn3O04J77XKFgL2OnZtQw+AG9wnuS/csmu80nPRHLYE9E41fyEiG8nhH6/Q==} engines: {libvips: '>=8.15.2', node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -8576,6 +8059,7 @@ packages: es-errors: 1.3.0 get-intrinsic: 1.2.4 object-inspect: 1.13.2 + dev: true /siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -8679,11 +8163,6 @@ packages: resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==} dev: false - /statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} - engines: {node: '>= 0.8'} - dev: false - /std-env@3.7.0: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} dev: true @@ -8700,10 +8179,6 @@ packages: engines: {node: '>=10.0.0'} dev: false - /string-format@2.0.0: - resolution: {integrity: sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==} - dev: false - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -8880,12 +8355,14 @@ packages: engines: {node: '>=4'} dependencies: has-flag: 3.0.0 + dev: true /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} dependencies: has-flag: 4.0.0 + dev: true /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} @@ -8913,16 +8390,6 @@ packages: tslib: 2.6.3 dev: true - /table-layout@1.0.2: - resolution: {integrity: sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==} - engines: {node: '>=8.0.0'} - dependencies: - array-back: 4.0.2 - deep-extend: 0.6.0 - typical: 5.2.0 - wordwrapjs: 4.0.1 - dev: false - /tailwind-merge@2.4.0: resolution: {integrity: sha512-49AwoOQNKdqKPd9CViyH5wJoSKsCDjUlzL8DxuGp3P1FsGY36NJDAa18jLZcaHAUUuTj+JB8IAo8zWgBNvBF7A==} dev: false @@ -9037,11 +8504,6 @@ packages: dependencies: is-number: 7.0.0 - /toidentifier@1.0.1: - resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} - engines: {node: '>=0.6'} - dev: false - /tough-cookie@4.1.4: resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} engines: {node: '>=6'} @@ -9062,10 +8524,6 @@ packages: punycode: 2.3.1 dev: true - /traverse-chain@0.1.0: - resolution: {integrity: sha512-up6Yvai4PYKhpNp5PkYtx50m3KbwQrqDwbuZP/ItyL64YEWHAvH6Md83LFLV/GRSk/BoUVwwgUzX6SOQSbsfAg==} - dev: true - /ts-api-utils@1.3.0(typescript@5.5.3): resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} @@ -9075,16 +8533,6 @@ packages: typescript: 5.5.3 dev: true - /ts-command-line-args@2.5.1: - resolution: {integrity: sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==} - hasBin: true - dependencies: - chalk: 4.1.2 - command-line-args: 5.2.1 - command-line-usage: 6.1.3 - string-format: 2.0.0 - dev: false - /ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -9110,15 +8558,6 @@ packages: strip-bom: 3.0.0 dev: true - /tsconfig-paths@4.2.0: - resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} - engines: {node: '>=6'} - dependencies: - json5: 2.2.3 - minimist: 1.2.8 - strip-bom: 3.0.0 - dev: true - /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true @@ -9240,7 +8679,7 @@ packages: dependencies: media-typer: 0.3.0 mime-types: 2.1.35 - dev: false + dev: true /typed-array-buffer@1.0.2: resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} @@ -9291,16 +8730,6 @@ packages: engines: {node: '>=14.17'} hasBin: true - /typical@4.0.0: - resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} - engines: {node: '>=8'} - dev: false - - /typical@5.2.0: - resolution: {integrity: sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==} - engines: {node: '>=8'} - dev: false - /ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} dev: true @@ -9327,16 +8756,6 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /universalify@2.0.1: - resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} - engines: {node: '>= 10.0.0'} - dev: true - - /unpipe@1.0.0: - resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} - engines: {node: '>= 0.8'} - dev: false - /update-browserslist-db@1.1.0(browserslist@4.23.1): resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} hasBin: true @@ -9403,11 +8822,6 @@ packages: /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - /utils-merge@1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} - engines: {node: '>= 0.4.0'} - dev: false - /uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true @@ -9420,11 +8834,6 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vary@1.1.2: - resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} - engines: {node: '>= 0.8'} - dev: false - /vite-node@1.6.0(@types/node@20.14.10): resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -9868,14 +9277,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /wordwrapjs@4.0.1: - resolution: {integrity: sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==} - engines: {node: '>=8.0.0'} - dependencies: - reduce-flatten: 2.0.0 - typical: 5.2.0 - dev: false - /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'}