trend2trial 0.1.0
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/bin/trend2trial.js +2 -0
- package/dist/commands/build.d.ts +2 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +21 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/recipe.d.ts +4 -0
- package/dist/commands/recipe.d.ts.map +1 -0
- package/dist/commands/recipe.js +57 -0
- package/dist/commands/recipe.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +110 -0
- package/dist/main.js.map +1 -0
- package/package.json +24 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAIA,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBpF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
import { loadTrendsFromFile, renderCardToMarkdown, renderCardsToList } from "trend2trial-core";
|
|
4
|
+
export async function buildCards(inputPath, outputDir) {
|
|
5
|
+
const absInput = resolve(inputPath);
|
|
6
|
+
const absOutput = resolve(outputDir);
|
|
7
|
+
console.log(`Reading trends from ${absInput}`);
|
|
8
|
+
const cards = await loadTrendsFromFile(absInput);
|
|
9
|
+
console.log(`Found ${cards.length} valid trend cards`);
|
|
10
|
+
await mkdir(absOutput, { recursive: true });
|
|
11
|
+
for (const card of cards) {
|
|
12
|
+
const filePath = join(absOutput, `${card.id}.md`);
|
|
13
|
+
await writeFile(filePath, renderCardToMarkdown(card), "utf-8");
|
|
14
|
+
console.log(` → ${filePath}`);
|
|
15
|
+
}
|
|
16
|
+
const indexPath = join(absOutput, "INDEX.md");
|
|
17
|
+
await writeFile(indexPath, renderCardsToList(cards), "utf-8");
|
|
18
|
+
console.log(` → ${indexPath}`);
|
|
19
|
+
console.log(`\nDone! Generated ${cards.length} cards + INDEX.md in ${absOutput}`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE/F,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,SAAiB,EAAE,SAAiB;IACnE,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAErC,OAAO,CAAC,GAAG,CAAC,uBAAuB,QAAQ,EAAE,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,SAAS,KAAK,CAAC,MAAM,oBAAoB,CAAC,CAAC;IAEvD,MAAM,KAAK,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;QAClD,MAAM,SAAS,CAAC,QAAQ,EAAE,oBAAoB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,OAAO,QAAQ,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC9C,MAAM,SAAS,CAAC,SAAS,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,OAAO,SAAS,EAAE,CAAC,CAAC;IAEhC,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,CAAC,MAAM,wBAAwB,SAAS,EAAE,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function recipeList(root: string | undefined): Promise<void>;
|
|
2
|
+
export declare function recipeInit(root: string | undefined, name: string, dest: string): Promise<void>;
|
|
3
|
+
export declare function recipeRun(dest: string): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=recipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/commands/recipe.ts"],"names":[],"mappings":"AAYA,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CA4BxE;AAED,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAWf;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB3D"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { writeFile } from "node:fs/promises";
|
|
3
|
+
import { copyScaffold, runRecipe, loadRecipe, generateReport, findLocalRecipesDir, resolveRecipeList, resolveRecipeDir, } from "trend2trial-core";
|
|
4
|
+
export async function recipeList(root) {
|
|
5
|
+
const localRecipesDir = findLocalRecipesDir(root);
|
|
6
|
+
const recipes = await resolveRecipeList({ localRecipesDir });
|
|
7
|
+
if (recipes.length === 0) {
|
|
8
|
+
console.log("No recipes found.");
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
console.log("");
|
|
12
|
+
console.log("Available recipes:");
|
|
13
|
+
console.log("");
|
|
14
|
+
console.log("Name".padEnd(35) +
|
|
15
|
+
"Category".padEnd(12) +
|
|
16
|
+
"Hours".padEnd(8) +
|
|
17
|
+
"Title");
|
|
18
|
+
console.log("-".repeat(80));
|
|
19
|
+
for (const r of recipes) {
|
|
20
|
+
console.log(r.name.padEnd(35) +
|
|
21
|
+
r.category.padEnd(12) +
|
|
22
|
+
r.estimated_hours.padEnd(8) +
|
|
23
|
+
r.title);
|
|
24
|
+
}
|
|
25
|
+
console.log("");
|
|
26
|
+
}
|
|
27
|
+
export async function recipeInit(root, name, dest) {
|
|
28
|
+
const localRecipesDir = findLocalRecipesDir(root);
|
|
29
|
+
const recipeDir = await resolveRecipeDir(name, { localRecipesDir });
|
|
30
|
+
const absDest = resolve(dest);
|
|
31
|
+
await copyScaffold(recipeDir, absDest);
|
|
32
|
+
console.log(`Recipe "${name}" initialized at ${absDest}`);
|
|
33
|
+
console.log("");
|
|
34
|
+
console.log("Next steps:");
|
|
35
|
+
console.log(` cd ${absDest}`);
|
|
36
|
+
console.log(` trend2trial recipe run ${absDest}`);
|
|
37
|
+
}
|
|
38
|
+
export async function recipeRun(dest) {
|
|
39
|
+
const absDest = resolve(dest);
|
|
40
|
+
console.log(`Running recipe in ${absDest}...`);
|
|
41
|
+
console.log("");
|
|
42
|
+
const result = await runRecipe(absDest);
|
|
43
|
+
for (const step of result.steps) {
|
|
44
|
+
const status = step.exitCode === 0 ? "OK" : "FAIL";
|
|
45
|
+
console.log(` [${status}] ${step.name} (${step.durationMs}ms)`);
|
|
46
|
+
if (step.exitCode !== 0 && step.stderr) {
|
|
47
|
+
console.log(` stderr: ${step.stderr.slice(0, 200)}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
console.log("");
|
|
51
|
+
const recipe = await loadRecipe(absDest);
|
|
52
|
+
const report = generateReport(recipe, result);
|
|
53
|
+
const reportPath = resolve(absDest, "REPORT.md");
|
|
54
|
+
await writeFile(reportPath, report, "utf-8");
|
|
55
|
+
console.log(`Report written to ${reportPath}`);
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../src/commands/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,SAAS,EACT,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAwB;IACvD,MAAM,eAAe,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC;IAE7D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QACjC,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CACT,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QACf,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACjB,OAAO,CACV,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,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AEhB,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC;IAExC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,MAAM,MAAM,KAAK,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,UAAU,KAAK,CAAC,CAAC;QACjE,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACvC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACjD,MAAM,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,qBAAqB,UAAU,EAAE,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":""}
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { parseArgs } from "node:util";
|
|
2
|
+
import { resolve, dirname } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
|
+
import { buildCards } from "./commands/build.js";
|
|
6
|
+
import { recipeList, recipeInit, recipeRun } from "./commands/recipe.js";
|
|
7
|
+
/**
|
|
8
|
+
* Attempt to find the monorepo root (for local dev / cloned repo).
|
|
9
|
+
* Returns undefined when running via npx (no local recipes/ dir).
|
|
10
|
+
*/
|
|
11
|
+
function findLocalRoot() {
|
|
12
|
+
// CLI dist lives at packages/cli/dist — root is three levels up
|
|
13
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
const candidate = resolve(__dirname, "../../..");
|
|
15
|
+
if (existsSync(resolve(candidate, "recipes"))) {
|
|
16
|
+
return candidate;
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
function printHelp() {
|
|
21
|
+
console.log(`
|
|
22
|
+
trend2trial — Trend Radar + Trial Playground
|
|
23
|
+
|
|
24
|
+
Usage:
|
|
25
|
+
trend2trial build [--input <path>] [--output <dir>]
|
|
26
|
+
trend2trial recipe list
|
|
27
|
+
trend2trial recipe init <name> <dest>
|
|
28
|
+
trend2trial recipe run <dest>
|
|
29
|
+
trend2trial --help
|
|
30
|
+
|
|
31
|
+
Commands:
|
|
32
|
+
build Read trends from JSON and generate Markdown cards
|
|
33
|
+
recipe list List available recipes
|
|
34
|
+
recipe init Initialize a recipe into a working directory
|
|
35
|
+
recipe run Run a recipe and generate REPORT.md
|
|
36
|
+
|
|
37
|
+
Options:
|
|
38
|
+
--input Path to trends JSON file (default: data/sample.json)
|
|
39
|
+
--output Output directory for cards (default: docs/cards)
|
|
40
|
+
--help Show this help message
|
|
41
|
+
`);
|
|
42
|
+
}
|
|
43
|
+
async function main() {
|
|
44
|
+
const root = findLocalRoot();
|
|
45
|
+
const { values, positionals } = parseArgs({
|
|
46
|
+
allowPositionals: true,
|
|
47
|
+
options: {
|
|
48
|
+
input: {
|
|
49
|
+
type: "string",
|
|
50
|
+
default: root ? resolve(root, "data/sample.json") : "data/sample.json",
|
|
51
|
+
},
|
|
52
|
+
output: {
|
|
53
|
+
type: "string",
|
|
54
|
+
default: root ? resolve(root, "docs/cards") : "docs/cards",
|
|
55
|
+
},
|
|
56
|
+
help: { type: "boolean", default: false },
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
if (values.help || positionals.length === 0) {
|
|
60
|
+
printHelp();
|
|
61
|
+
process.exit(0);
|
|
62
|
+
}
|
|
63
|
+
const command = positionals[0];
|
|
64
|
+
switch (command) {
|
|
65
|
+
case "build":
|
|
66
|
+
await buildCards(values.input, values.output);
|
|
67
|
+
break;
|
|
68
|
+
case "recipe": {
|
|
69
|
+
const sub = positionals[1];
|
|
70
|
+
switch (sub) {
|
|
71
|
+
case "list":
|
|
72
|
+
await recipeList(root);
|
|
73
|
+
break;
|
|
74
|
+
case "init": {
|
|
75
|
+
const name = positionals[2];
|
|
76
|
+
const dest = positionals[3];
|
|
77
|
+
if (!name || !dest) {
|
|
78
|
+
console.error("Usage: trend2trial recipe init <name> <dest>");
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
await recipeInit(root, name, dest);
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case "run": {
|
|
85
|
+
const runDest = positionals[2];
|
|
86
|
+
if (!runDest) {
|
|
87
|
+
console.error("Usage: trend2trial recipe run <dest>");
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
await recipeRun(runDest);
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
default:
|
|
94
|
+
console.error(`Unknown recipe subcommand: ${sub}`);
|
|
95
|
+
printHelp();
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
default:
|
|
101
|
+
console.error(`Unknown command: ${command}`);
|
|
102
|
+
printHelp();
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
main().catch((err) => {
|
|
107
|
+
console.error(err);
|
|
108
|
+
process.exit(1);
|
|
109
|
+
});
|
|
110
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEzE;;;GAGG;AACH,SAAS,aAAa;IACpB,gEAAgE;IAChE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACjD,IAAI,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;CAoBb,CAAC,CAAC;AACH,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;QACxC,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI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C,CAAC;oBACnC,MAAM;gBACR,CAAC;gBACD,KAAK,KAAK,CAAC,CAAC,CAAC;oBACX,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;oBAC/B,IAAI,CAAC,OAAO,EAAE,CAAC;wBACb,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;wBACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;oBAClB,CAAC;oBACD,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC;oBACzB,MAAM;gBACR,CAAC;gBACD;oBACE,OAAO,CAAC,KAAK,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;oBACnD,SAAS,EAAE,CAAC;oBACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,CAAC;YACD,MAAM;QACR,CAAC;QACD;YACE,OAAO,CAAC,KAAK,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;YAC7C,SAAS,EAAE,CAAC;YACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IAC5B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "trend2trial",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "AI Infra trend radar + runnable trial recipes (Serving, RAG, LLMOps)",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/MaxZhao0325/trend2trial.git",
|
|
9
|
+
"directory": "packages/cli"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["ai-infra", "serving", "rag", "llmops", "benchmark", "recipe"],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"bin": {
|
|
14
|
+
"trend2trial": "./bin/trend2trial.js"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc -p tsconfig.json",
|
|
18
|
+
"start": "node --enable-source-maps ./dist/main.js"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"trend2trial-core": "workspace:*"
|
|
22
|
+
},
|
|
23
|
+
"files": ["dist", "bin"]
|
|
24
|
+
}
|