@przeprogramowani/10x-cli 1.15.0 → 1.16.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/dist/index.mjs +28 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10173,7 +10173,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
10173
10173
|
// package.json
|
|
10174
10174
|
var package_default = {
|
|
10175
10175
|
name: "@przeprogramowani/10x-cli",
|
|
10176
|
-
version: "1.
|
|
10176
|
+
version: "1.16.0",
|
|
10177
10177
|
description: "Open-source CLI for 10xDevs course content",
|
|
10178
10178
|
repository: {
|
|
10179
10179
|
type: "git",
|
|
@@ -11459,6 +11459,7 @@ function topDetectedProfile(signals) {
|
|
|
11459
11459
|
|
|
11460
11460
|
// src/commands/bench-kit.ts
|
|
11461
11461
|
var TEMPLATE_REPO_URL = "https://github.com/przeprogramowani/10x-bench-kit";
|
|
11462
|
+
var SHARED_ROOT_FILES = ["AGENTS.md"];
|
|
11462
11463
|
var PLACEHOLDER_BASE_REPO = "demo-app";
|
|
11463
11464
|
function registerBenchKitCommand(cli) {
|
|
11464
11465
|
if (!experimentalEnabled())
|
|
@@ -11618,11 +11619,16 @@ async function runBenchKitUpdate(ctx, dirArg, options, deps = defaultDeps) {
|
|
|
11618
11619
|
const skills = syncDir(join4(scratch, skillSource), join4(targetDir, skillRootFor(toolId)), {
|
|
11619
11620
|
overwrite: true
|
|
11620
11621
|
});
|
|
11622
|
+
const shared = { added: 0, updated: 0, unchanged: 0 };
|
|
11623
|
+
for (const file of SHARED_ROOT_FILES) {
|
|
11624
|
+
addSync(shared, syncFile(join4(scratch, file), join4(targetDir, file)));
|
|
11625
|
+
}
|
|
11621
11626
|
output(ctx, [
|
|
11622
11627
|
`Updated the benchmark instance from template ${currentVersion} to ${newVersion}.`,
|
|
11623
11628
|
" .bench-kit/ replaced wholesale (runtime zone)",
|
|
11624
11629
|
` .github/workflows/ ${describeSync(workflows)}`,
|
|
11625
11630
|
` ${`${skillRootFor(toolId)}/`.padEnd(23)}${describeSync(skills)} — proposal, review before committing`,
|
|
11631
|
+
` ${SHARED_ROOT_FILES.join(", ").padEnd(23)}${describeSync(shared)} — proposal, review before committing`,
|
|
11626
11632
|
" tasks/, evaluation-pool/, bench.config.yaml untouched (company zone)",
|
|
11627
11633
|
"Next: review 'git diff', run 'bench validate' (it flags any schema changes to fix), then commit via PR."
|
|
11628
11634
|
].join(`
|
|
@@ -11635,7 +11641,7 @@ async function runBenchKitUpdate(ctx, dirArg, options, deps = defaultDeps) {
|
|
|
11635
11641
|
templateRef: updatedManifest.templateRef,
|
|
11636
11642
|
tool: toolId,
|
|
11637
11643
|
skillRoot: skillRootFor(toolId),
|
|
11638
|
-
zones: { benchKit: "replaced", workflows, skills }
|
|
11644
|
+
zones: { benchKit: "replaced", workflows, skills, shared }
|
|
11639
11645
|
});
|
|
11640
11646
|
} finally {
|
|
11641
11647
|
rmSync3(scratch, { recursive: true, force: true });
|
|
@@ -11758,6 +11764,26 @@ function syncDir(srcDir, destDir, opts) {
|
|
|
11758
11764
|
function describeSync(counts) {
|
|
11759
11765
|
return `${counts.added} added, ${counts.updated} updated, ${counts.unchanged} unchanged`;
|
|
11760
11766
|
}
|
|
11767
|
+
function syncFile(from, to) {
|
|
11768
|
+
const counts = { added: 0, updated: 0, unchanged: 0 };
|
|
11769
|
+
if (!existsSync4(from))
|
|
11770
|
+
return counts;
|
|
11771
|
+
if (!existsSync4(to)) {
|
|
11772
|
+
cpSync(from, to);
|
|
11773
|
+
counts.added++;
|
|
11774
|
+
} else if (readFileSync3(from).equals(readFileSync3(to))) {
|
|
11775
|
+
counts.unchanged++;
|
|
11776
|
+
} else {
|
|
11777
|
+
cpSync(from, to);
|
|
11778
|
+
counts.updated++;
|
|
11779
|
+
}
|
|
11780
|
+
return counts;
|
|
11781
|
+
}
|
|
11782
|
+
function addSync(into, counts) {
|
|
11783
|
+
into.added += counts.added;
|
|
11784
|
+
into.updated += counts.updated;
|
|
11785
|
+
into.unchanged += counts.unchanged;
|
|
11786
|
+
}
|
|
11761
11787
|
function materialize(srcDir, destDir, opts) {
|
|
11762
11788
|
let copied = 0;
|
|
11763
11789
|
const walk = (rel) => {
|