mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-28 20:14:14 +00:00
add test file
This commit is contained in:
parent
1d3ce203be
commit
5264aea6ca
4 changed files with 166 additions and 126 deletions
|
@ -13,9 +13,10 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@octokit/rest": "^19.0.7",
|
"@octokit/rest": "^19.0.13",
|
||||||
"minimatch": "^7.4.2",
|
"dotenv": "^16.4.5",
|
||||||
"openai": "^4.20.1",
|
"minimatch": "^7.4.6",
|
||||||
|
"openai": "^4.67.3",
|
||||||
"parse-diff": "^0.11.1",
|
"parse-diff": "^0.11.1",
|
||||||
"ts-node": "^10.9.1"
|
"ts-node": "^10.9.1"
|
||||||
},
|
},
|
||||||
|
|
110
src/main.ts
110
src/main.ts
|
@ -1,12 +1,13 @@
|
||||||
import { readFileSync } from "fs";
|
import { readFileSync } from "fs";
|
||||||
|
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import OpenAI from "openai";
|
import OpenAI from "openai";
|
||||||
import { Octokit } from "@octokit/rest";
|
import { Octokit } from "@octokit/rest";
|
||||||
import parseDiff, { Chunk, File } from "parse-diff";
|
import parseDiff, { Chunk, File } from "parse-diff";
|
||||||
import minimatch from "minimatch";
|
import minimatch from "minimatch";
|
||||||
|
|
||||||
const GITHUB_TOKEN: string = core.getInput("GITHUB_TOKEN");
|
const GITHUB_TOKEN: string = core.getInput("GITHUB_TOKEN") || process.env.GITHUB_TOKEN || "";
|
||||||
const OPENAI_API_KEY: string = core.getInput("OPENAI_API_KEY");
|
const OPENAI_API_KEY: string = core.getInput("OPENAI_API_KEY") || process.env.OPENAI_API_KEY || "";
|
||||||
const OPENAI_API_MODEL: string = core.getInput("OPENAI_API_MODEL");
|
const OPENAI_API_MODEL: string = core.getInput("OPENAI_API_MODEL");
|
||||||
|
|
||||||
const octokit = new Octokit({ auth: GITHUB_TOKEN });
|
const octokit = new Octokit({ auth: GITHUB_TOKEN });
|
||||||
|
@ -24,7 +25,7 @@ interface PRDetails {
|
||||||
}
|
}
|
||||||
|
|
||||||
const MAX_LINES_TO_REVIEW: number = 250;
|
const MAX_LINES_TO_REVIEW: number = 250;
|
||||||
const INCLUDE_PATHS: string[] = core.getInput("INCLUDE_PATHS").split(",").map(p => p.trim());
|
const INCLUDE_PATHS: string[] = (core.getInput("INCLUDE_PATHS") || process.env.INCLUDE_PATHS || "").split(",").map(p => p.trim());
|
||||||
|
|
||||||
async function getPRDetails(): Promise<PRDetails> {
|
async function getPRDetails(): Promise<PRDetails> {
|
||||||
try {
|
try {
|
||||||
|
@ -89,11 +90,11 @@ async function getPRDetails(): Promise<PRDetails> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getDiff(
|
export async function getDiff(
|
||||||
owner: string,
|
owner: string,
|
||||||
repo: string,
|
repo: string,
|
||||||
pull_number: number
|
pull_number: number
|
||||||
): Promise<string | null> {
|
): Promise<File[] | null> {
|
||||||
try {
|
try {
|
||||||
const response = await octokit.pulls.get({
|
const response = await octokit.pulls.get({
|
||||||
owner,
|
owner,
|
||||||
|
@ -102,21 +103,63 @@ async function getDiff(
|
||||||
mediaType: { format: "diff" },
|
mediaType: { format: "diff" },
|
||||||
});
|
});
|
||||||
|
|
||||||
// Check if the response is a string (diff content)
|
// Explicitly assert the type of response.data
|
||||||
if (typeof response.data === 'string') {
|
const diffContent = response.data as unknown as string;
|
||||||
const diffContent = response.data;
|
|
||||||
console.log("Raw diff content sample:", diffContent);
|
if (typeof diffContent !== 'string') {
|
||||||
return diffContent;
|
console.error("Unexpected response format. Expected string, got:", typeof diffContent);
|
||||||
} else {
|
|
||||||
console.error("Unexpected response format. Expected string, got:", typeof response.data);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("Raw diff content sample:", diffContent.substring(0, 200));
|
||||||
|
|
||||||
|
const parsedDiff = parseDiff(diffContent);
|
||||||
|
console.log("Parsed diff length:", parsedDiff.length);
|
||||||
|
|
||||||
|
// Filter the diff to only include files that match the include paths
|
||||||
|
console.log("Filtering diff based on include paths:", INCLUDE_PATHS);
|
||||||
|
const filteredDiff = parsedDiff.filter(file => {
|
||||||
|
const matchesPattern = INCLUDE_PATHS.some(pattern => minimatch(file.to || "", pattern));
|
||||||
|
console.log(`File ${file.to}: ${matchesPattern ? 'included' : 'excluded'}`);
|
||||||
|
return matchesPattern;
|
||||||
|
});
|
||||||
|
console.log("Filtered diff files:", filteredDiff.map(file => file.to));
|
||||||
|
console.log("Filtered diff length:", filteredDiff.length);
|
||||||
|
|
||||||
|
// Log the string representation of the filtered diff
|
||||||
|
console.log("Filtered diff string:\n", diffToString(filteredDiff));
|
||||||
|
|
||||||
|
return filteredDiff;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching diff:", error);
|
console.error("Error fetching diff:", error);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function diffToString(files: File[]): string {
|
||||||
|
return files.map(fileToString).join('\n\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
function fileToString(file: File): string {
|
||||||
|
const header = `diff --git a/${file.from} b/${file.to}
|
||||||
|
${file.index ? `index ${file.index}\n` : ''}${file.deleted ? '--- ' + file.from : ''}
|
||||||
|
${file.new ? '+++ ' + file.to : ''}`;
|
||||||
|
|
||||||
|
const chunks = file.chunks.map(chunkToString).join('\n');
|
||||||
|
|
||||||
|
return `${header}\n${chunks}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function chunkToString(chunk: Chunk): string {
|
||||||
|
const header = `@@ -${chunk.oldStart},${chunk.oldLines} +${chunk.newStart},${chunk.newLines} @@`;
|
||||||
|
const changes = chunk.changes.map(change => {
|
||||||
|
const prefix = change.type === 'add' ? '+' : (change.type === 'del' ? '-' : ' ');
|
||||||
|
return prefix + change.content;
|
||||||
|
}).join('\n');
|
||||||
|
|
||||||
|
return `${header}\n${changes}`;
|
||||||
|
}
|
||||||
|
|
||||||
async function analyzeEntirePR(
|
async function analyzeEntirePR(
|
||||||
files: File[],
|
files: File[],
|
||||||
prDetails: PRDetails
|
prDetails: PRDetails
|
||||||
|
@ -240,53 +283,23 @@ async function createReviewComment(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
export async function main() {
|
||||||
console.info("Starting main function");
|
console.info("Starting main function");
|
||||||
const prDetails = await getPRDetails();
|
const prDetails = await getPRDetails();
|
||||||
console.info("PR Details:", prDetails);
|
console.info("PR Details:", prDetails);
|
||||||
|
|
||||||
const diff = await getDiff(
|
const filteredDiff = await getDiff(
|
||||||
prDetails.owner,
|
prDetails.owner,
|
||||||
prDetails.repo,
|
prDetails.repo,
|
||||||
prDetails.pull_number
|
prDetails.pull_number
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!diff) {
|
if (!filteredDiff) {
|
||||||
console.log("No diff found");
|
console.log("No diff found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("Diff length:", diff.length);
|
|
||||||
|
|
||||||
const parsedDiff = parseDiff(diff);
|
|
||||||
console.log("Parsed diff length:", parsedDiff.length);
|
|
||||||
|
|
||||||
// Filter the diff to only include files that match the include paths
|
|
||||||
console.log("Filtering diff based on include paths:", INCLUDE_PATHS);
|
|
||||||
const filteredDiff = parsedDiff.filter(file => {
|
|
||||||
const matchesPattern = INCLUDE_PATHS.some(pattern => minimatch(file.to || "", pattern));
|
|
||||||
console.log(`File ${file.to}: ${matchesPattern ? 'included' : 'excluded'}`);
|
|
||||||
return matchesPattern;
|
|
||||||
});
|
|
||||||
console.log("Filtered diff files:", filteredDiff.map(file => file.to));
|
|
||||||
console.log("Filtered diff length:", filteredDiff.length);
|
console.log("Filtered diff length:", filteredDiff.length);
|
||||||
|
|
||||||
// Check if the PR is too long
|
|
||||||
const totalChangedLines = filteredDiff.reduce((total, file) => {
|
|
||||||
return total + file.additions + file.deletions;
|
|
||||||
}, 0);
|
|
||||||
|
|
||||||
if (totalChangedLines > MAX_LINES_TO_REVIEW) {
|
|
||||||
console.log("PR is too long. Adding general comment and exiting.");
|
|
||||||
await octokit.pulls.createReview({
|
|
||||||
owner: prDetails.owner,
|
|
||||||
repo: prDetails.repo,
|
|
||||||
pull_number: prDetails.pull_number,
|
|
||||||
body: `LLM reviewer will not review this as the PR is too long (${totalChangedLines} lines). Please consider splitting it up to make it more readable for humans too!`,
|
|
||||||
event: "COMMENT"
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const comments = await analyzeEntirePR(filteredDiff, prDetails);
|
const comments = await analyzeEntirePR(filteredDiff, prDetails);
|
||||||
console.log("Generated comments:", comments.length);
|
console.log("Generated comments:", comments.length);
|
||||||
|
|
||||||
|
@ -322,7 +335,10 @@ async function main() {
|
||||||
console.log("Main function completed");
|
console.log("Main function completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
main().catch((error) => {
|
// Add this condition to prevent automatic execution when imported
|
||||||
|
if (require.main === module) {
|
||||||
|
main().catch((error) => {
|
||||||
console.error("Error in main function:", error);
|
console.error("Error in main function:", error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
38
src/test.ts
Normal file
38
src/test.ts
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
import { Octokit } from "@octokit/rest";
|
||||||
|
import OpenAI from "openai";
|
||||||
|
import parseDiff, { File } from "parse-diff";
|
||||||
|
import minimatch from "minimatch";
|
||||||
|
import dotenv from "dotenv";
|
||||||
|
import { getDiff, diffToString } from "./main"; // Import the functions from main.ts
|
||||||
|
|
||||||
|
// Load environment variables
|
||||||
|
dotenv.config();
|
||||||
|
|
||||||
|
const GITHUB_TOKEN = process.env.GITHUB_TOKEN;
|
||||||
|
const OPENAI_API_KEY = process.env.OPENAI_API_KEY;
|
||||||
|
const INCLUDE_PATHS = process.env.INCLUDE_PATHS?.split(",").map(p => p.trim()) || [];
|
||||||
|
|
||||||
|
const octokit = new Octokit({ auth: GITHUB_TOKEN });
|
||||||
|
|
||||||
|
// const openai = new OpenAI({
|
||||||
|
// apiKey: OPENAI_API_KEY,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// Copy the necessary functions from your main.ts file
|
||||||
|
// Include getDiff, diffToString, fileToString, chunkToString, etc.
|
||||||
|
|
||||||
|
async function testGetDiff() {
|
||||||
|
const owner = "yousef-hindy-ai";
|
||||||
|
const repo = "diffusion_demos";
|
||||||
|
const pull_number = 5; // Replace with an actual PR number
|
||||||
|
|
||||||
|
const diff = await getDiff(owner, repo, pull_number);
|
||||||
|
if (diff) {
|
||||||
|
console.log("Filtered diff:");
|
||||||
|
console.log(diffToString(diff));
|
||||||
|
} else {
|
||||||
|
console.log("No diff found");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
testGetDiff().catch(console.error);
|
133
yarn.lock
133
yarn.lock
|
@ -49,10 +49,10 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"@octokit/types" "^9.0.0"
|
"@octokit/types" "^9.0.0"
|
||||||
|
|
||||||
"@octokit/core@^4.1.0", "@octokit/core@>=3", "@octokit/core@>=4":
|
"@octokit/core@^4.2.1", "@octokit/core@>=3", "@octokit/core@>=4":
|
||||||
"integrity" "sha512-AgvDRUg3COpR82P7PBdGZF/NNqGmtMq2NiPqeSsDIeCfYFOZ9gddqWNQHnFdEUf+YwOj4aZYmJnlPp7OXmDIDg=="
|
"integrity" "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ=="
|
||||||
"resolved" "https://registry.npmjs.org/@octokit/core/-/core-4.2.0.tgz"
|
"resolved" "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz"
|
||||||
"version" "4.2.0"
|
"version" "4.2.4"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@octokit/auth-token" "^3.0.0"
|
"@octokit/auth-token" "^3.0.0"
|
||||||
"@octokit/graphql" "^5.0.0"
|
"@octokit/graphql" "^5.0.0"
|
||||||
|
@ -85,25 +85,30 @@
|
||||||
"resolved" "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz"
|
"resolved" "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz"
|
||||||
"version" "16.0.0"
|
"version" "16.0.0"
|
||||||
|
|
||||||
"@octokit/plugin-paginate-rest@^6.0.0":
|
"@octokit/openapi-types@^18.0.0":
|
||||||
"integrity" "sha512-Sq5VU1PfT6/JyuXPyt04KZNVsFOSBaYOAq2QRZUwzVlI10KFvcbUo8lR258AAQL1Et60b0WuVik+zOWKLuDZxw=="
|
"integrity" "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw=="
|
||||||
"resolved" "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.0.0.tgz"
|
"resolved" "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz"
|
||||||
"version" "6.0.0"
|
"version" "18.1.1"
|
||||||
|
|
||||||
|
"@octokit/plugin-paginate-rest@^6.1.2":
|
||||||
|
"integrity" "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ=="
|
||||||
|
"resolved" "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz"
|
||||||
|
"version" "6.1.2"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@octokit/types" "^9.0.0"
|
"@octokit/tsconfig" "^1.0.2"
|
||||||
|
"@octokit/types" "^9.2.3"
|
||||||
|
|
||||||
"@octokit/plugin-request-log@^1.0.4":
|
"@octokit/plugin-request-log@^1.0.4":
|
||||||
"integrity" "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA=="
|
"integrity" "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA=="
|
||||||
"resolved" "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz"
|
"resolved" "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz"
|
||||||
"version" "1.0.4"
|
"version" "1.0.4"
|
||||||
|
|
||||||
"@octokit/plugin-rest-endpoint-methods@^7.0.0":
|
"@octokit/plugin-rest-endpoint-methods@^7.1.2":
|
||||||
"integrity" "sha512-pnCaLwZBudK5xCdrR823xHGNgqOzRnJ/mpC/76YPpNP7DybdsJtP7mdOwh+wYZxK5jqeQuhu59ogMI4NRlBUvA=="
|
"integrity" "sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA=="
|
||||||
"resolved" "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.0.1.tgz"
|
"resolved" "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz"
|
||||||
"version" "7.0.1"
|
"version" "7.2.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@octokit/types" "^9.0.0"
|
"@octokit/types" "^10.0.0"
|
||||||
"deprecation" "^2.3.1"
|
|
||||||
|
|
||||||
"@octokit/request-error@^3.0.0":
|
"@octokit/request-error@^3.0.0":
|
||||||
"integrity" "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ=="
|
"integrity" "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ=="
|
||||||
|
@ -126,15 +131,27 @@
|
||||||
"node-fetch" "^2.6.7"
|
"node-fetch" "^2.6.7"
|
||||||
"universal-user-agent" "^6.0.0"
|
"universal-user-agent" "^6.0.0"
|
||||||
|
|
||||||
"@octokit/rest@^19.0.7":
|
"@octokit/rest@^19.0.13":
|
||||||
"integrity" "sha512-HRtSfjrWmWVNp2uAkEpQnuGMJsu/+dBr47dRc5QVgsCbnIc1+GFEaoKBWkYG+zjrsHpSqcAElMio+n10c0b5JA=="
|
"integrity" "sha512-/EzVox5V9gYGdbAI+ovYj3nXQT1TtTHRT+0eZPcuC05UFSWO3mdO9UY1C0i2eLF9Un1ONJkAk+IEtYGAC+TahA=="
|
||||||
"resolved" "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.7.tgz"
|
"resolved" "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.13.tgz"
|
||||||
"version" "19.0.7"
|
"version" "19.0.13"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@octokit/core" "^4.1.0"
|
"@octokit/core" "^4.2.1"
|
||||||
"@octokit/plugin-paginate-rest" "^6.0.0"
|
"@octokit/plugin-paginate-rest" "^6.1.2"
|
||||||
"@octokit/plugin-request-log" "^1.0.4"
|
"@octokit/plugin-request-log" "^1.0.4"
|
||||||
"@octokit/plugin-rest-endpoint-methods" "^7.0.0"
|
"@octokit/plugin-rest-endpoint-methods" "^7.1.2"
|
||||||
|
|
||||||
|
"@octokit/tsconfig@^1.0.2":
|
||||||
|
"integrity" "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA=="
|
||||||
|
"resolved" "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz"
|
||||||
|
"version" "1.0.2"
|
||||||
|
|
||||||
|
"@octokit/types@^10.0.0":
|
||||||
|
"integrity" "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg=="
|
||||||
|
"resolved" "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz"
|
||||||
|
"version" "10.0.0"
|
||||||
|
dependencies:
|
||||||
|
"@octokit/openapi-types" "^18.0.0"
|
||||||
|
|
||||||
"@octokit/types@^9.0.0":
|
"@octokit/types@^9.0.0":
|
||||||
"integrity" "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw=="
|
"integrity" "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw=="
|
||||||
|
@ -143,6 +160,13 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"@octokit/openapi-types" "^16.0.0"
|
"@octokit/openapi-types" "^16.0.0"
|
||||||
|
|
||||||
|
"@octokit/types@^9.2.3":
|
||||||
|
"integrity" "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA=="
|
||||||
|
"resolved" "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz"
|
||||||
|
"version" "9.3.2"
|
||||||
|
dependencies:
|
||||||
|
"@octokit/openapi-types" "^18.0.0"
|
||||||
|
|
||||||
"@tsconfig/node10@^1.0.7":
|
"@tsconfig/node10@^1.0.7":
|
||||||
"integrity" "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA=="
|
"integrity" "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA=="
|
||||||
"resolved" "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz"
|
"resolved" "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz"
|
||||||
|
@ -220,11 +244,6 @@
|
||||||
"resolved" "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz"
|
"resolved" "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz"
|
||||||
"version" "1.0.2"
|
"version" "1.0.2"
|
||||||
|
|
||||||
"base-64@^0.1.0":
|
|
||||||
"integrity" "sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz"
|
|
||||||
"version" "0.1.0"
|
|
||||||
|
|
||||||
"before-after-hook@^2.2.0":
|
"before-after-hook@^2.2.0":
|
||||||
"integrity" "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
|
"integrity" "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
|
||||||
"resolved" "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz"
|
"resolved" "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz"
|
||||||
|
@ -237,11 +256,6 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"balanced-match" "^1.0.0"
|
"balanced-match" "^1.0.0"
|
||||||
|
|
||||||
"charenc@0.0.2":
|
|
||||||
"integrity" "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA=="
|
|
||||||
"resolved" "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz"
|
|
||||||
"version" "0.0.2"
|
|
||||||
|
|
||||||
"combined-stream@^1.0.8":
|
"combined-stream@^1.0.8":
|
||||||
"integrity" "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="
|
"integrity" "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="
|
||||||
"resolved" "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz"
|
"resolved" "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz"
|
||||||
|
@ -254,17 +268,12 @@
|
||||||
"resolved" "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz"
|
"resolved" "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz"
|
||||||
"version" "1.1.1"
|
"version" "1.1.1"
|
||||||
|
|
||||||
"crypt@0.0.2":
|
|
||||||
"integrity" "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow=="
|
|
||||||
"resolved" "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz"
|
|
||||||
"version" "0.0.2"
|
|
||||||
|
|
||||||
"delayed-stream@~1.0.0":
|
"delayed-stream@~1.0.0":
|
||||||
"integrity" "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
|
"integrity" "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
|
||||||
"resolved" "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
|
"resolved" "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
|
||||||
"version" "1.0.0"
|
"version" "1.0.0"
|
||||||
|
|
||||||
"deprecation@^2.0.0", "deprecation@^2.3.1":
|
"deprecation@^2.0.0":
|
||||||
"integrity" "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
"integrity" "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
||||||
"resolved" "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz"
|
"resolved" "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz"
|
||||||
"version" "2.3.1"
|
"version" "2.3.1"
|
||||||
|
@ -274,13 +283,10 @@
|
||||||
"resolved" "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz"
|
"resolved" "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz"
|
||||||
"version" "4.0.2"
|
"version" "4.0.2"
|
||||||
|
|
||||||
"digest-fetch@^1.3.0":
|
"dotenv@^16.4.5":
|
||||||
"integrity" "sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA=="
|
"integrity" "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg=="
|
||||||
"resolved" "https://registry.npmjs.org/digest-fetch/-/digest-fetch-1.3.0.tgz"
|
"resolved" "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz"
|
||||||
"version" "1.3.0"
|
"version" "16.4.5"
|
||||||
dependencies:
|
|
||||||
"base-64" "^0.1.0"
|
|
||||||
"md5" "^2.3.0"
|
|
||||||
|
|
||||||
"event-target-shim@^5.0.0":
|
"event-target-shim@^5.0.0":
|
||||||
"integrity" "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
"integrity" "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||||
|
@ -316,11 +322,6 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"ms" "^2.0.0"
|
"ms" "^2.0.0"
|
||||||
|
|
||||||
"is-buffer@~1.1.6":
|
|
||||||
"integrity" "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
|
||||||
"resolved" "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz"
|
|
||||||
"version" "1.1.6"
|
|
||||||
|
|
||||||
"is-plain-object@^5.0.0":
|
"is-plain-object@^5.0.0":
|
||||||
"integrity" "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
|
"integrity" "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
|
||||||
"resolved" "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz"
|
"resolved" "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz"
|
||||||
|
@ -331,15 +332,6 @@
|
||||||
"resolved" "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz"
|
"resolved" "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz"
|
||||||
"version" "1.3.6"
|
"version" "1.3.6"
|
||||||
|
|
||||||
"md5@^2.3.0":
|
|
||||||
"integrity" "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g=="
|
|
||||||
"resolved" "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz"
|
|
||||||
"version" "2.3.0"
|
|
||||||
dependencies:
|
|
||||||
"charenc" "0.0.2"
|
|
||||||
"crypt" "0.0.2"
|
|
||||||
"is-buffer" "~1.1.6"
|
|
||||||
|
|
||||||
"mime-db@1.52.0":
|
"mime-db@1.52.0":
|
||||||
"integrity" "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
|
"integrity" "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
|
||||||
"resolved" "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz"
|
"resolved" "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz"
|
||||||
|
@ -352,10 +344,10 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"mime-db" "1.52.0"
|
"mime-db" "1.52.0"
|
||||||
|
|
||||||
"minimatch@^7.4.2":
|
"minimatch@^7.4.6":
|
||||||
"integrity" "sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA=="
|
"integrity" "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw=="
|
||||||
"resolved" "https://registry.npmjs.org/minimatch/-/minimatch-7.4.2.tgz"
|
"resolved" "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz"
|
||||||
"version" "7.4.2"
|
"version" "7.4.6"
|
||||||
dependencies:
|
dependencies:
|
||||||
"brace-expansion" "^2.0.1"
|
"brace-expansion" "^2.0.1"
|
||||||
|
|
||||||
|
@ -383,20 +375,18 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"wrappy" "1"
|
"wrappy" "1"
|
||||||
|
|
||||||
"openai@^4.20.1":
|
"openai@^4.67.3":
|
||||||
"integrity" "sha512-Dd3q8EvINfganZFtg6V36HjrMaihqRgIcKiHua4Nq9aw/PxOP48dhbsk8x5klrxajt5Lpnc1KTOG5i1S6BKAJA=="
|
"integrity" "sha512-HT2tZgjLgRqbLQNKmYtjdF/4TQuiBvg1oGvTDhwpSEQzxo6/oM1us8VQ53vBK2BiKvCxFuq6gKGG70qfwrNhKg=="
|
||||||
"resolved" "https://registry.npmjs.org/openai/-/openai-4.20.1.tgz"
|
"resolved" "https://registry.npmjs.org/openai/-/openai-4.67.3.tgz"
|
||||||
"version" "4.20.1"
|
"version" "4.67.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "^18.11.18"
|
"@types/node" "^18.11.18"
|
||||||
"@types/node-fetch" "^2.6.4"
|
"@types/node-fetch" "^2.6.4"
|
||||||
"abort-controller" "^3.0.0"
|
"abort-controller" "^3.0.0"
|
||||||
"agentkeepalive" "^4.2.1"
|
"agentkeepalive" "^4.2.1"
|
||||||
"digest-fetch" "^1.3.0"
|
|
||||||
"form-data-encoder" "1.7.2"
|
"form-data-encoder" "1.7.2"
|
||||||
"formdata-node" "^4.3.2"
|
"formdata-node" "^4.3.2"
|
||||||
"node-fetch" "^2.6.7"
|
"node-fetch" "^2.6.7"
|
||||||
"web-streams-polyfill" "^3.2.1"
|
|
||||||
|
|
||||||
"parse-diff@^0.11.1":
|
"parse-diff@^0.11.1":
|
||||||
"integrity" "sha512-Oq4j8LAOPOcssanQkIjxosjATBIEJhCxMCxPhMu+Ci4wdNmAEdx0O+a7gzbR2PyKXgKPvRLIN5g224+dJAsKHA=="
|
"integrity" "sha512-Oq4j8LAOPOcssanQkIjxosjATBIEJhCxMCxPhMu+Ci4wdNmAEdx0O+a7gzbR2PyKXgKPvRLIN5g224+dJAsKHA=="
|
||||||
|
@ -457,11 +447,6 @@
|
||||||
"resolved" "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz"
|
"resolved" "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz"
|
||||||
"version" "3.0.1"
|
"version" "3.0.1"
|
||||||
|
|
||||||
"web-streams-polyfill@^3.2.1":
|
|
||||||
"integrity" "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q=="
|
|
||||||
"resolved" "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz"
|
|
||||||
"version" "3.2.1"
|
|
||||||
|
|
||||||
"web-streams-polyfill@4.0.0-beta.3":
|
"web-streams-polyfill@4.0.0-beta.3":
|
||||||
"integrity" "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug=="
|
"integrity" "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug=="
|
||||||
"resolved" "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz"
|
"resolved" "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue