evaliphy 1.0.1-beta.0 ā 1.0.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bin.mjs +31 -31
- package/package.json +8 -3
package/README.md
CHANGED
package/dist/bin.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
-
import { program } from "commander";
|
|
4
3
|
import fs, { existsSync } from "node:fs";
|
|
5
4
|
import path, { join } from "node:path";
|
|
6
|
-
import { pathToFileURL } from "node:url";
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
7
6
|
import { pino } from "pino";
|
|
8
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
9
|
-
import
|
|
8
|
+
import { program } from "commander";
|
|
10
9
|
import path$1 from "path";
|
|
11
|
-
import {
|
|
10
|
+
import { fileURLToPath as fileURLToPath$1 } from "url";
|
|
12
11
|
import fg from "fast-glob";
|
|
12
|
+
import fs$1 from "fs";
|
|
13
13
|
import fs$2 from "node:fs/promises";
|
|
14
14
|
//#region \0rolldown/runtime.js
|
|
15
15
|
var __create = Object.create;
|
|
@@ -4005,24 +4005,26 @@ function handleFatalError(err) {
|
|
|
4005
4005
|
}
|
|
4006
4006
|
//#endregion
|
|
4007
4007
|
//#region packages/cli/src/initProject/createFolderStructure.ts
|
|
4008
|
+
const require$1 = createRequire(import.meta.url);
|
|
4008
4009
|
function createProject(projectName) {
|
|
4009
|
-
const
|
|
4010
|
-
|
|
4010
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
4011
|
+
const __dirname = path.dirname(__filename);
|
|
4012
|
+
const { version } = require$1(path.join(__dirname, "../package.json"));
|
|
4013
|
+
const rootPath = path.join(process.cwd(), projectName);
|
|
4014
|
+
if (fs.existsSync(rootPath)) {
|
|
4011
4015
|
console.error("Folder already exists.");
|
|
4012
4016
|
process.exit(1);
|
|
4013
4017
|
}
|
|
4014
|
-
fs
|
|
4018
|
+
fs.mkdirSync(rootPath, { recursive: true });
|
|
4015
4019
|
createStructure(rootPath, {
|
|
4016
|
-
evals: { "example.eval.ts": `
|
|
4017
|
-
import { evaluate } from 'evaliphy';
|
|
4020
|
+
evals: { "example.eval.ts": `import { evaluate } from 'evaliphy';
|
|
4018
4021
|
|
|
4019
4022
|
evaluate('basic test', async ({ httpClient }) => {
|
|
4020
4023
|
// add your evaluate code
|
|
4021
4024
|
});
|
|
4022
4025
|
` },
|
|
4023
4026
|
utils: {},
|
|
4024
|
-
"evaliphy.config.ts": `
|
|
4025
|
-
import { defineConfig } from 'evaliphy';
|
|
4027
|
+
"evaliphy.config.ts": `import { defineConfig } from 'evaliphy';
|
|
4026
4028
|
|
|
4027
4029
|
export default defineConfig({
|
|
4028
4030
|
baseUrl: 'http://localhost:8080',
|
|
@@ -4041,7 +4043,8 @@ export default defineConfig({
|
|
|
4041
4043
|
`,
|
|
4042
4044
|
"tsconfig.json": JSON.stringify({ compilerOptions: {
|
|
4043
4045
|
target: "ES2020",
|
|
4044
|
-
module: "
|
|
4046
|
+
module: "ESNext",
|
|
4047
|
+
moduleResolution: "bundler",
|
|
4045
4048
|
strict: true,
|
|
4046
4049
|
esModuleInterop: true,
|
|
4047
4050
|
skipLibCheck: true
|
|
@@ -4057,28 +4060,22 @@ export default defineConfig({
|
|
|
4057
4060
|
build: "tsc"
|
|
4058
4061
|
},
|
|
4059
4062
|
devDependencies: {
|
|
4060
|
-
"evaliphy":
|
|
4061
|
-
|
|
4063
|
+
"evaliphy": `^${version}`,
|
|
4064
|
+
typescript: "^5.0.0"
|
|
4062
4065
|
}
|
|
4063
4066
|
};
|
|
4064
|
-
fs
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
stdio: "inherit"
|
|
4070
|
-
});
|
|
4071
|
-
} catch (err) {
|
|
4072
|
-
console.error("Failed to install dependencies");
|
|
4073
|
-
}
|
|
4074
|
-
console.log(`\nā
Project "${projectName}" is ready!`);
|
|
4067
|
+
fs.writeFileSync(path.join(rootPath, "package.json"), JSON.stringify(pkg, null, 2));
|
|
4068
|
+
console.log(`\nProject "${projectName}" is ready!`);
|
|
4069
|
+
console.log(`\nNext steps:`);
|
|
4070
|
+
console.log(` cd ${projectName}`);
|
|
4071
|
+
console.log(` npm test`);
|
|
4075
4072
|
}
|
|
4076
4073
|
function createStructure(basePath, structure) {
|
|
4077
4074
|
for (const name in structure) {
|
|
4078
|
-
const fullPath = path
|
|
4079
|
-
if (typeof structure[name] === "string") fs
|
|
4075
|
+
const fullPath = path.join(basePath, name);
|
|
4076
|
+
if (typeof structure[name] === "string") fs.writeFileSync(fullPath, structure[name]);
|
|
4080
4077
|
else {
|
|
4081
|
-
fs
|
|
4078
|
+
fs.mkdirSync(fullPath, { recursive: true });
|
|
4082
4079
|
createStructure(fullPath, structure[name]);
|
|
4083
4080
|
}
|
|
4084
4081
|
}
|
|
@@ -5273,7 +5270,7 @@ var Doc = class {
|
|
|
5273
5270
|
};
|
|
5274
5271
|
//#endregion
|
|
5275
5272
|
//#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js
|
|
5276
|
-
const version = {
|
|
5273
|
+
const version$1 = {
|
|
5277
5274
|
major: 4,
|
|
5278
5275
|
minor: 0,
|
|
5279
5276
|
patch: 0
|
|
@@ -5285,7 +5282,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
5285
5282
|
inst ?? (inst = {});
|
|
5286
5283
|
inst._zod.def = def;
|
|
5287
5284
|
inst._zod.bag = inst._zod.bag || {};
|
|
5288
|
-
inst._zod.version = version;
|
|
5285
|
+
inst._zod.version = version$1;
|
|
5289
5286
|
const checks = [...inst._zod.def.checks ?? []];
|
|
5290
5287
|
if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
|
|
5291
5288
|
for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
|
|
@@ -32131,7 +32128,10 @@ async function runRegistry(explicitFile) {
|
|
|
32131
32128
|
}
|
|
32132
32129
|
//#endregion
|
|
32133
32130
|
//#region packages/cli/src/bin.ts
|
|
32134
|
-
|
|
32131
|
+
const __filename = fileURLToPath$1(import.meta.url);
|
|
32132
|
+
const __dirname = path$1.dirname(__filename);
|
|
32133
|
+
const { version } = __require(path$1.join(__dirname, "../package.json"));
|
|
32134
|
+
program.name("evaliphy").version(version).description("Evaliphy ā eval runner for LLM pipelines");
|
|
32135
32135
|
program.command("init <project-name>").description("Create project structure as recommended by Evaliphy.").action((projectName) => {
|
|
32136
32136
|
createProject(projectName);
|
|
32137
32137
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evaliphy",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The first QA-centric SDK for testing Retrieval-Augmented Generation (RAG).",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -13,9 +13,14 @@
|
|
|
13
13
|
"qa",
|
|
14
14
|
"testing",
|
|
15
15
|
"ai",
|
|
16
|
+
"rag-evaluation",
|
|
16
17
|
"evaluation"
|
|
17
18
|
],
|
|
18
|
-
"
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"registry": "https://registry.npmjs.org",
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://evaliphy.com",
|
|
19
24
|
"bugs": {
|
|
20
25
|
"url": "https://github.com/priyanshus/evaliphy/issues"
|
|
21
26
|
},
|
|
@@ -36,7 +41,7 @@
|
|
|
36
41
|
}
|
|
37
42
|
},
|
|
38
43
|
"bin": {
|
|
39
|
-
"evaliphy": "
|
|
44
|
+
"evaliphy": "dist/bin.mjs"
|
|
40
45
|
},
|
|
41
46
|
"files": [
|
|
42
47
|
"dist",
|