diff --git a/apps/billing/package.json b/apps/billing/package.json index f351e1bc52..4717d59ac5 100644 --- a/apps/billing/package.json +++ b/apps/billing/package.json @@ -22,9 +22,10 @@ "@mendable/firecrawl-js": "^1.5.2", "@octokit/rest": "^21.0.2", "@planetscale/database": "^1.16.0", - "@trigger.dev/nextjs": "3.2.0", - "@trigger.dev/sdk": "3.2.0", - "@trigger.dev/slack": "3.2.0", + "@trigger.dev/nextjs": "3.2.1", + "@trigger.dev/sdk": "3.2.1", + "@trigger.dev/slack": "3.2.1", + "@types/js-yaml": "^4.0.9", "@unkey/billing": "workspace:^", "@unkey/clickhouse": "workspace:^", "@unkey/db": "workspace:^", diff --git a/apps/billing/src/trigger/glossary/create-pr.ts b/apps/billing/src/trigger/glossary/create-pr.ts index bdde732789..6d70790ad4 100644 --- a/apps/billing/src/trigger/glossary/create-pr.ts +++ b/apps/billing/src/trigger/glossary/create-pr.ts @@ -31,7 +31,6 @@ export const createPrTask = task({ if (existing?.githubPrUrl && onCacheHit === "stale") { return { entry: existing, - message: `Found existing PR for ${input}.mdx`, }; } @@ -76,6 +75,13 @@ export const createPrTask = task({ slug: slugger.slug(entry.inputTerm), }, { + sortKeys: (a, b) => { + // Ensure that 'question' always comes first + if (a === "question" || b === "question") { + return a === "question" ? -1 : 1; + } + return 0; + }, lineWidth: -1, noRefs: true, quotingType: '"', @@ -101,44 +107,97 @@ export const createPrTask = task({ auth: process.env.GITHUB_PERSONAL_ACCESS_TOKEN, }); - const owner = "p6l-richard"; + const owner = "unkeyed"; const repo = "unkey"; const branch = `richard/add-${input.replace(/\s+/g, "-").toLowerCase()}`; const path = `apps/www/content/glossary/${input.replace(/\s+/g, "-").toLowerCase()}.mdx`; - // Create a new branch - const mainRef = await octokit.git.getRef({ + const existingPr = await octokit.rest.pulls.list({ owner, repo, - ref: "heads/main", + base: "main", + head: `${owner}:${branch}`, + state: "open", }); - console.info(`2.1 'main' branch found. Should branch off of: ${mainRef.data.object.sha}`); + if (existingPr?.data?.length > 0) { + console.info("2.1 ⏊ī¸Ž Pending (open) PR found. Updating the content of the file directly..."); + + console.info(`this is for debugging, check if the file actually exists or not in the github ui: ${existingPr.data[0].head.ref} + URL: https://github.com/unkeyed/unkey/pull/${existingPr.data[0].number}`); + // get the blob sha of the file being replaced: + const existingFile = await octokit.repos.getContent({ + owner, + repo, + ref: existingPr.data[0].head.ref, + path, + }); + // if an open PR exists, update the content of the file directly + await octokit.repos.createOrUpdateFileContents({ + owner, + repo, + path, + message: `feat(glossary): Update ${input}.mdx`, + content: Buffer.from(await file.arrayBuffer()).toString("base64"), + branch, + committer: { + name: "Richard Poelderl", + email: "richard.poelderl@gmail.com", + }, + ...("sha" in existingFile.data && { sha: existingFile.data.sha }), + }); + + console.info("2.2 đŸ’Ŋ PR updated. Storing the URL..."); + // update the entry in the database with the PR URL + await db + .update(entries) + .set({ githubPrUrl: existingPr.data[0].html_url }) + .where(eq(entries.inputTerm, input)); + + const updated = await db.query.entries.findFirst({ + columns: { + id: true, + inputTerm: true, + githubPrUrl: true, + }, + where: eq(entries.inputTerm, input), + orderBy: (entries, { desc }) => [desc(entries.createdAt)], + }); + + console.info("2.3 🎉 PR updated. Returning the entry..."); + + return { + entry: updated, + }; + } + + // if there's no open PR, we have to handle the merged PR case: + const existingMergedPr = await octokit.rest.pulls.list({ + owner, + repo, + base: "main", + head: `${owner}:${branch}`, + state: "closed", + }); - console.info("2.2 Handling possible duplicate branches"); - const branchExists = await octokit.git - .listMatchingRefs({ + if (existingMergedPr?.data?.length > 0) { + console.info("2.1 ⚠ī¸ Merged PR found. Deleting the stale branch..."); + // if a merged PR exists, we can delete the branch to create a new one & commit the file + await octokit.git.deleteRef({ owner, repo, ref: `heads/${branch}`, - }) - .then((response) => response.data.length > 0); - - if (branchExists) { - console.info("2.2.1 ⚠ī¸ Duplicate branch found, deleting it"); - try { - await octokit.git.deleteRef({ - owner, - repo, - ref: `heads/${branch}`, - }); - console.info("2.2.2 âŒĢ Branch deleted"); - } catch (error) { - console.error(`2.2.3 ❌ Error deleting branch: ${error}`); - } + }); } - console.info("2.4 đŸ›Ŗī¸ Creating the new branch"); + console.info("2.2 đŸ›Ŗī¸ Creating the new branch"); + // create a new branch off of main + const mainRef = await octokit.git.getRef({ + owner, + repo, + ref: "heads/main", + }); + // create a new branch off of main await octokit.git.createRef({ owner, repo, @@ -147,7 +206,13 @@ export const createPrTask = task({ }); // Commit the MDX file to the new branch - console.info(`2.5 đŸ“Ļ Committing the MDX file to the new branch "${branch}"`); + console.info(`2.3 đŸ“Ļ Committing the MDX file to the new branch "${branch}"`); + // get the existing file's sha (if exists): + const existingFile = await octokit.repos.getContent({ + owner, + repo, + path, + }); await octokit.repos.createOrUpdateFileContents({ owner, repo, @@ -155,9 +220,10 @@ export const createPrTask = task({ message: `feat(glossary): Add ${input}.mdx to glossary`, content: Buffer.from(await file.arrayBuffer()).toString("base64"), branch, + ...("sha" in existingFile.data && { sha: existingFile.data.sha }), }); - console.info("2.6 📝 Creating the pull request"); + console.info("2.4 📝 Creating the pull request"); // Create a pull request const pr = await octokit.pulls.create({ owner, @@ -168,7 +234,7 @@ export const createPrTask = task({ body: `This PR adds the ${input}.mdx file to the API documentation.`, }); - console.info("2.7 đŸ’Ŋ PR created. Storing the URL..."); + console.info("2.5 đŸ’Ŋ PR created. Storing the URL..."); // Update the entry in the database with the PR URL await db .update(entries) @@ -185,9 +251,10 @@ export const createPrTask = task({ orderBy: (entries, { asc }) => [asc(entries.createdAt)], }); + console.info("2.6 🎉 PR created. Returning the entry..."); + return { entry: updated, - message: `feat(glossary): Add ${input}.mdx to glossary`, }; }, }); diff --git a/apps/billing/src/trigger/glossary/draft-sections.ts b/apps/billing/src/trigger/glossary/draft-sections.ts index 4133c9a1f4..5c4128d68f 100644 --- a/apps/billing/src/trigger/glossary/draft-sections.ts +++ b/apps/billing/src/trigger/glossary/draft-sections.ts @@ -151,6 +151,9 @@ Guidelines: 6. Keep the content concise but informative, ensure that there are no fluff phrases or statements that don't provide concrete information, context & background to the term. 7. Don't repeat content between sections, ensure that each section adds value 8. Only write the content for the section, do not provide any other context, introductions or statements regarding this task. +9. Code Snippets + - When you include code snippets in JavaScript, make sure to always use TypeScript syntax. + - Ensure that you always use ESM syntax and not CommonJS syntax (ie use import/export and not 'require'). `; const completion = await generateText({ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f7d5306e46..b23a8d4cf7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -168,14 +168,17 @@ importers: specifier: ^1.16.0 version: 1.19.0 '@trigger.dev/nextjs': - specifier: 3.2.0 - version: 3.2.0(@trigger.dev/sdk@3.2.0)(next@14.2.10) + specifier: 3.2.1 + version: 3.2.1(@trigger.dev/sdk@3.2.1)(next@14.2.10) '@trigger.dev/sdk': - specifier: 3.2.0 - version: 3.2.0 + specifier: 3.2.1 + version: 3.2.1(zod@3.23.8) '@trigger.dev/slack': - specifier: 3.2.0 - version: 3.2.0 + specifier: 3.2.1 + version: 3.2.1 + '@types/js-yaml': + specifier: ^4.0.9 + version: 4.0.9 '@unkey/billing': specifier: workspace:^ version: link:../../internal/billing @@ -1152,7 +1155,7 @@ importers: devDependencies: checkly: specifier: latest - version: 4.10.0(@types/node@20.14.9)(typescript@5.5.3) + version: 4.9.0(@types/node@20.14.9)(typescript@5.5.3) ts-node: specifier: 10.9.1 version: 10.9.1(@types/node@20.14.9)(typescript@5.5.3) @@ -3267,8 +3270,8 @@ packages: resolution: {integrity: sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==} dev: true - /@electric-sql/client@0.6.3: - resolution: {integrity: sha512-/AYkRrEASKIGcjtNp8IVJ3sAUm+IQ2l0NrGgDvvAG/n1+ifOl7kD1E4dRyg1qdY/b+HdKhGNYlNgsPuwMKO2Mg==} + /@electric-sql/client@0.7.1: + resolution: {integrity: sha512-NpKEn5hDSy+NaAdG9Ql8kIGfjrj/XfakJOOHTTutb99db3Dza0uUfnkqycFpyUAarFMQ4hYSKgx8AbOm1PCeFQ==} optionalDependencies: '@rollup/rollup-darwin-arm64': 4.27.4 dev: false @@ -7360,7 +7363,7 @@ packages: resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} engines: {node: '>=8.0.0'} dependencies: - tslib: 2.4.1 + tslib: 2.8.1 dev: false /@peculiar/webcrypto@1.4.1: @@ -7370,7 +7373,7 @@ packages: '@peculiar/asn1-schema': 2.3.13 '@peculiar/json-schema': 1.1.12 pvtsutils: 1.3.6 - tslib: 2.4.1 + tslib: 2.8.1 webcrypto-core: 1.8.1 dev: false @@ -10481,11 +10484,11 @@ packages: zod: 3.23.8 dev: false - /@trigger.dev/core@3.2.0: - resolution: {integrity: sha512-V0YpClYeYP1zgEiH6Mhz9IRN+nwhTsXqWt3b6DBsJq9OWT4zFHuOW14lmGD0jq7tdDfqWffjnE119i4NLTXZCg==} + /@trigger.dev/core@3.2.1: + resolution: {integrity: sha512-7M4QILckaCXVwLmbLiTLWjy+y812ITwbSAF/Xj/WdMBIQwMipVuPvznq9VyQt5dQzvPrOpNOiQxE94hgdCReIg==} engines: {node: '>=18.20.0'} dependencies: - '@electric-sql/client': 0.6.3 + '@electric-sql/client': 0.7.1 '@google-cloud/precise-date': 4.0.0 '@jsonhero/path': 1.0.21 '@opentelemetry/api': 1.4.1 @@ -10500,43 +10503,46 @@ packages: '@opentelemetry/sdk-trace-node': 1.13.0(@opentelemetry/api@1.4.1) '@opentelemetry/semantic-conventions': 1.13.0 dequal: 2.0.3 + eventsource-parser: 3.0.0 execa: 8.0.1 humanize-duration: 3.32.1 jose: 5.9.6 nanoid: 3.3.7 socket.io-client: 4.7.5 superjson: 2.2.1 - zod: 3.22.3 + zod: 3.23.8 zod-error: 1.5.0 - zod-validation-error: 1.5.0(zod@3.22.3) + zod-validation-error: 1.5.0(zod@3.23.8) transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: false - /@trigger.dev/nextjs@3.2.0(@trigger.dev/sdk@3.2.0)(next@14.2.10): - resolution: {integrity: sha512-bsHbG0VDCRjp9vncwMIhc2hGgY5Xz0mO3TAEhNFNUT9WQzGQkzVjex06gZlFJv5S4jQorpPvazZCSeZJrW0cyw==} + /@trigger.dev/nextjs@3.2.1(@trigger.dev/sdk@3.2.1)(next@14.2.10): + resolution: {integrity: sha512-OVwh0IiDv/ziiN5X4CxCU5QJgLg3wYMZlwLi5ZdvpqALpQX3wuPSGoSJ3qZJ9usKZ7nrc+/6EgyzEPczH59yvw==} engines: {node: '>=18.0.0'} peerDependencies: '@trigger.dev/sdk': ~2.3.0 || ^3.0.0 next: '>=12.0.0' dependencies: - '@trigger.dev/sdk': 3.2.0 + '@trigger.dev/sdk': 3.2.1(zod@3.23.8) debug: 4.3.7(supports-color@8.1.1) next: 14.2.10(@babel/core@7.26.0)(@opentelemetry/api@1.4.1)(react-dom@18.3.1)(react@18.3.1) transitivePeerDependencies: - supports-color dev: false - /@trigger.dev/sdk@3.2.0: - resolution: {integrity: sha512-gZqR88+vA04VHYruFqdRhttL7g3WKqeQk3EcAx2Q0mubDyoWCcMklBja+q1bLNi2P4/tKK4Z7WK90Y33RVVWcQ==} + /@trigger.dev/sdk@3.2.1(zod@3.22.3): + resolution: {integrity: sha512-KOHkp6M0zxWAgeRtN2/LPS64HtRTuP219ADeqkoNPRY9CgQjnXGeXT+5sEbSOU8w5+AkbRq+wTjcA9tqMTQsBQ==} engines: {node: '>=18.20.0'} + peerDependencies: + zod: ^3.0.0 dependencies: '@opentelemetry/api': 1.4.1 '@opentelemetry/api-logs': 0.52.1 '@opentelemetry/semantic-conventions': 1.13.0 - '@trigger.dev/core': 3.2.0 + '@trigger.dev/core': 3.2.1 chalk: 5.3.0 cronstrue: 2.52.0 debug: 4.3.7(supports-color@8.1.1) @@ -10553,12 +10559,38 @@ packages: - utf-8-validate dev: false - /@trigger.dev/slack@3.2.0: - resolution: {integrity: sha512-eep1YHWXulIOo2tD4nYqQbdenis2ld844yF8TuZhpzw3lvrcZ4uJWmoas9L6IHRR6XbBeKOa1bC7qHsf6uKYVw==} + /@trigger.dev/sdk@3.2.1(zod@3.23.8): + resolution: {integrity: sha512-KOHkp6M0zxWAgeRtN2/LPS64HtRTuP219ADeqkoNPRY9CgQjnXGeXT+5sEbSOU8w5+AkbRq+wTjcA9tqMTQsBQ==} + engines: {node: '>=18.20.0'} + peerDependencies: + zod: ^3.0.0 + dependencies: + '@opentelemetry/api': 1.4.1 + '@opentelemetry/api-logs': 0.52.1 + '@opentelemetry/semantic-conventions': 1.13.0 + '@trigger.dev/core': 3.2.1 + chalk: 5.3.0 + cronstrue: 2.52.0 + debug: 4.3.7(supports-color@8.1.1) + evt: 2.5.8 + slug: 6.1.0 + terminal-link: 3.0.0 + ulid: 2.3.0 + uuid: 9.0.1 + ws: 8.18.0 + zod: 3.23.8 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + + /@trigger.dev/slack@3.2.1: + resolution: {integrity: sha512-S/8qgACJUivdfCPKdfFMdvkcRyJy2aIi3kEO9P+Q1UIaKb6o3CXLuXbbCcoMi/VVwulja0lIiRq99fZ3Q2stQg==} engines: {node: '>=16.8.0'} dependencies: '@slack/web-api': 6.13.0 - '@trigger.dev/sdk': 3.2.0 + '@trigger.dev/sdk': 3.2.1(zod@3.22.3) zod: 3.22.3 transitivePeerDependencies: - bufferutil @@ -11150,13 +11182,6 @@ packages: '@types/prop-types': 15.7.13 csstype: 3.1.3 - /@types/readable-stream@4.0.18: - resolution: {integrity: sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==} - dependencies: - '@types/node': 20.14.9 - safe-buffer: 5.1.2 - dev: true - /@types/resolve@1.20.6: resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} dev: true @@ -12251,6 +12276,16 @@ packages: resolution: {integrity: sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==} dev: true + /async-mqtt@2.6.3: + resolution: {integrity: sha512-mFGTtlEpOugOoLOf9H5AJyJaZUNtOVXLGGOnPaPZDPQex6W6iIOgtV+fAgam0GQbgnLfgX+Wn/QzS6d+PYfFAQ==} + dependencies: + mqtt: 4.3.8 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: true + /async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} dev: true @@ -12468,15 +12503,6 @@ packages: readable-stream: 3.6.2 dev: true - /bl@6.0.16: - resolution: {integrity: sha512-V/kz+z2Mx5/6qDfRCilmrukUXcXuCoXKg3/3hDvzKKoSUx8CJKudfIoT29XZc3UE9xBvxs5qictiHdprwtteEg==} - dependencies: - '@types/readable-stream': 4.0.18 - buffer: 6.0.3 - inherits: 2.0.4 - readable-stream: 4.5.2 - dev: true - /blake3-wasm@2.1.5: resolution: {integrity: sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==} dev: true @@ -12790,8 +12816,8 @@ packages: get-func-name: 2.0.2 dev: true - /checkly@4.10.0(@types/node@20.14.9)(typescript@5.5.3): - resolution: {integrity: sha512-3URsPR3Jv7nm/ONBPj13aj/hFioQZz+b5Vyl8UbG4c3yP7HjJjx6/mGQyxfPNffOzrKcmbQgzZY/r6l0fN0Hzw==} + /checkly@4.9.0(@types/node@20.14.9)(typescript@5.5.3): + resolution: {integrity: sha512-LqohEntErF7dJaJPsEpjvr/O9wUfzBRac6DOXgFDMEw+dNi19oBAcspdOqVGjPjMoCZ9/s5b5tSJI1pusY4mJQ==} engines: {node: '>=16.0.0'} hasBin: true dependencies: @@ -12803,6 +12829,7 @@ packages: '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.5.3) acorn: 8.8.1 acorn-walk: 8.2.0 + async-mqtt: 2.6.3 axios: 1.7.4 chalk: 4.1.2 ci-info: 3.8.0 @@ -12815,7 +12842,6 @@ packages: jwt-decode: 3.1.2 log-symbols: 4.1.0 luxon: 3.3.0 - mqtt: 5.10.1 open: 8.4.0 p-queue: 6.6.2 prompts: 2.4.2 @@ -13203,8 +13229,11 @@ packages: engines: {node: '>= 12'} dev: true - /commist@3.2.0: - resolution: {integrity: sha512-4PIMoPniho+LqXmpS5d3NuGYncG6XWlkBSVGiWycL22dd42OYdUGil2CWuzklaJoNxyxUSpO4MKIBU94viWNAw==} + /commist@1.1.0: + resolution: {integrity: sha512-rraC8NXWOEjhADbZe9QBNzLAN5Q3fsTPQtBV+fEVj6xKIgDgNiEVE6ZNfHpZOqfQ21YUzfVNUXLOEZquYvQPPg==} + dependencies: + leven: 2.1.0 + minimist: 1.2.8 dev: true /commitizen@4.3.1(@types/node@20.14.9)(typescript@5.5.3): @@ -14184,7 +14213,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.8.1 dev: false /dot-prop@6.0.1: @@ -14639,6 +14668,15 @@ packages: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: false + /duplexify@4.1.3: + resolution: {integrity: sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==} + dependencies: + end-of-stream: 1.4.4 + inherits: 2.0.4 + readable-stream: 3.6.2 + stream-shift: 1.0.3 + dev: true + /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -15461,6 +15499,11 @@ packages: engines: {node: '>=14.18'} dev: false + /eventsource-parser@3.0.0: + resolution: {integrity: sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA==} + engines: {node: '>=18.0.0'} + dev: false + /evt@2.5.8: resolution: {integrity: sha512-wjurRtEqepH03fZSzkCUAw2tNNtEoeoEYXf7EqG8uU52wQ3D/+ctyQE8hf+YR/5DXZlwl2jNGLMm4hAd/wyD6g==} dependencies: @@ -15617,7 +15660,7 @@ packages: engines: {node: '>= 10.17.0'} hasBin: true dependencies: - debug: 4.3.4 + debug: 4.3.7(supports-color@8.1.1) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -15665,14 +15708,6 @@ packages: resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==} dev: false - /fast-unique-numbers@8.0.13: - resolution: {integrity: sha512-7OnTFAVPefgw2eBJ1xj2PGGR9FwYzSUso9decayHgCDX4sJkHLdcsYTytTg+tYv+wKF3U8gJuSBz2jJpQV4u/g==} - engines: {node: '>=16.1.0'} - dependencies: - '@babel/runtime': 7.26.0 - tslib: 2.8.1 - dev: true - /fast-uri@3.0.3: resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} dev: true @@ -17003,8 +17038,11 @@ packages: resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} dev: true - /help-me@5.0.0: - resolution: {integrity: sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg==} + /help-me@3.0.0: + resolution: {integrity: sha512-hx73jClhyk910sidBB7ERlnhMlFsJJIBqSVMFDwPN8o2v9nmp5KgLq1Xz1Bf1fCMMZ6mPrX159iG0VLy/fPMtQ==} + dependencies: + glob: 7.2.3 + readable-stream: 3.6.2 dev: true /hex-rgb@4.3.0: @@ -18053,6 +18091,11 @@ packages: resolution: {integrity: sha512-y+SqErxb8h7nE/fiEX07jsbuhrpO9lL8eca7/Y1nuWV2moNlXhyd59iDGcRf6moVyDMbmTNzL40SUyrFU/yDpg==} dev: false + /leven@2.1.0: + resolution: {integrity: sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==} + engines: {node: '>=0.10.0'} + dev: true + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -18330,7 +18373,7 @@ packages: /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.4.1 + tslib: 2.8.1 dev: false /lowercase-keys@3.0.0: @@ -18360,6 +18403,13 @@ packages: dependencies: yallist: 3.1.1 + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + /lru-cache@7.18.3: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} @@ -19736,6 +19786,7 @@ packages: /minipass@6.0.2: resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==} engines: {node: '>=16 || 14 >=14.17'} + dev: true /minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} @@ -19861,37 +19912,38 @@ packages: /module-details-from-path@1.0.3: resolution: {integrity: sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==} - /mqtt-packet@9.0.1: - resolution: {integrity: sha512-koZF1V/X2RZUI6uD9wN5OK1JxxcG1ofAR4H3LjCw1FkeKzruZQ26aAA6v2m1lZyWONZIR5wMMJFrZJDRNzbiQw==} + /mqtt-packet@6.10.0: + resolution: {integrity: sha512-ja8+mFKIHdB1Tpl6vac+sktqy3gA8t9Mduom1BA75cI+R9AHnZOiaBQwpGiWnaVJLDGRdNhQmFaAqd7tkKSMGA==} dependencies: - bl: 6.0.16 + bl: 4.1.0 debug: 4.3.7(supports-color@8.1.1) process-nextick-args: 2.0.1 transitivePeerDependencies: - supports-color dev: true - /mqtt@5.10.1: - resolution: {integrity: sha512-hXCOki8sANoQ7w+2OzJzg6qMBxTtrH9RlnVNV8panLZgnl+Gh0J/t4k6r8Az8+C7y3KAcyXtn0mmLixyUom8Sw==} - engines: {node: '>=16.0.0'} + /mqtt@4.3.8: + resolution: {integrity: sha512-2xT75uYa0kiPEF/PE0VPdavmEkoBzMT/UL9moid0rAvlCtV48qBwxD62m7Ld/4j8tSkIO1E/iqRl/S72SEOhOw==} + engines: {node: '>=10.0.0'} hasBin: true dependencies: - '@types/readable-stream': 4.0.18 - '@types/ws': 8.5.13 - commist: 3.2.0 + commist: 1.1.0 concat-stream: 2.0.0 debug: 4.3.7(supports-color@8.1.1) - help-me: 5.0.0 - lru-cache: 10.4.3 + duplexify: 4.1.3 + help-me: 3.0.0 + inherits: 2.0.4 + lru-cache: 6.0.0 minimist: 1.2.8 - mqtt-packet: 9.0.1 + mqtt-packet: 6.10.0 number-allocator: 1.0.14 - readable-stream: 4.5.2 + pump: 3.0.2 + readable-stream: 3.6.2 reinterval: 1.1.0 rfdc: 1.4.1 - split2: 4.2.0 - worker-timers: 7.1.8 - ws: 8.18.0 + split2: 3.2.2 + ws: 7.5.10 + xtend: 4.0.2 transitivePeerDependencies: - bufferutil - supports-color @@ -20159,7 +20211,7 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.4.1 + tslib: 2.8.1 dev: false /node-addon-api@7.1.1: @@ -20885,7 +20937,7 @@ packages: engines: {node: '>=16 || 14 >=14.18'} dependencies: lru-cache: 10.4.3 - minipass: 6.0.2 + minipass: 7.1.2 /path-to-regexp@0.1.10: resolution: {integrity: sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==} @@ -23025,7 +23077,7 @@ packages: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} dependencies: dot-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.8.1 dev: false /snakecase-keys@3.2.1: @@ -23253,9 +23305,10 @@ packages: resolution: {integrity: sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==} dev: true - /split2@4.2.0: - resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} - engines: {node: '>= 10.x'} + /split2@3.2.2: + resolution: {integrity: sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==} + dependencies: + readable-stream: 3.6.2 dev: true /sprintf-js@1.0.3: @@ -23332,6 +23385,10 @@ packages: engines: {node: '>=4', npm: '>=6'} dev: true + /stream-shift@1.0.3: + resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} + dev: true + /stream-transform@2.1.3: resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} dependencies: @@ -25432,31 +25489,6 @@ packages: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: true - /worker-timers-broker@6.1.8: - resolution: {integrity: sha512-FUCJu9jlK3A8WqLTKXM9E6kAmI/dR1vAJ8dHYLMisLNB/n3GuaFIjJ7pn16ZcD1zCOf7P6H62lWIEBi+yz/zQQ==} - dependencies: - '@babel/runtime': 7.26.0 - fast-unique-numbers: 8.0.13 - tslib: 2.8.1 - worker-timers-worker: 7.0.71 - dev: true - - /worker-timers-worker@7.0.71: - resolution: {integrity: sha512-ks/5YKwZsto1c2vmljroppOKCivB/ma97g9y77MAAz2TBBjPPgpoOiS1qYQKIgvGTr2QYPT3XhJWIB6Rj2MVPQ==} - dependencies: - '@babel/runtime': 7.26.0 - tslib: 2.8.1 - dev: true - - /worker-timers@7.1.8: - resolution: {integrity: sha512-R54psRKYVLuzff7c1OTFcq/4Hue5Vlz4bFtNEIarpSiCYhpifHU3aIQI29S84o1j87ePCYqbmEJPqwBTf+3sfw==} - dependencies: - '@babel/runtime': 7.26.0 - tslib: 2.8.1 - worker-timers-broker: 6.1.8 - worker-timers-worker: 7.0.71 - dev: true - /workerd@1.20240524.0: resolution: {integrity: sha512-LWLe5D8PVHBcqturmBbwgI71r7YPpIMYZoVEH6S4G35EqIJ55cb0n3FipoSyraoIfpcCxCFxX1K6WsRHbP3pFA==} engines: {node: '>=16'} @@ -25640,7 +25672,6 @@ packages: optional: true utf-8-validate: optional: true - dev: false /ws@8.13.0: resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} @@ -25704,7 +25735,6 @@ packages: /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} - dev: false /xterm-for-react@1.0.4(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-DCkLR9ZXeW907YyyaCTk/3Ol34VRHfCnf3MAPOkj3dUNA85sDqHvTXN8efw4g7bx7gWdJQRsEpGt2tJOXKG3EQ==} @@ -25906,13 +25936,13 @@ packages: dependencies: zod: 3.23.8 - /zod-validation-error@1.5.0(zod@3.22.3): + /zod-validation-error@1.5.0(zod@3.23.8): resolution: {integrity: sha512-/7eFkAI4qV0tcxMBB/3+d2c1P6jzzZYdYSlBuAklzMuCrJu5bzJfHS0yVAS87dRHVlhftd6RFJDIvv03JgkSbw==} engines: {node: '>=16.0.0'} peerDependencies: zod: ^3.18.0 dependencies: - zod: 3.22.3 + zod: 3.23.8 dev: false /zod-validation-error@3.4.0(zod@3.23.8):