harnessed 1.0.2 → 1.0.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/dist/cli.mjs +48 -25
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -670,7 +670,7 @@ var init_resume = __esm({
|
|
|
670
670
|
|
|
671
671
|
// package.json
|
|
672
672
|
var package_default = {
|
|
673
|
-
version: "1.0.
|
|
673
|
+
version: "1.0.3"};
|
|
674
674
|
|
|
675
675
|
// src/manifest/errors.ts
|
|
676
676
|
function instancePathToKeyPath(instancePath) {
|
|
@@ -4370,35 +4370,58 @@ Step A complete: ${skillsInstalled} workflow skill(s) installed to ${skillsBase}
|
|
|
4370
4370
|
fullDiff: false,
|
|
4371
4371
|
color: "auto"
|
|
4372
4372
|
};
|
|
4373
|
+
const manifestPaths = await listBaseManifests2(pkgRoot);
|
|
4374
|
+
const stepBStart = Date.now();
|
|
4375
|
+
const settled = await Promise.allSettled(
|
|
4376
|
+
manifestPaths.map(async (path) => {
|
|
4377
|
+
let yamlSrc;
|
|
4378
|
+
try {
|
|
4379
|
+
yamlSrc = await readFile(path, "utf8");
|
|
4380
|
+
} catch (e) {
|
|
4381
|
+
return {
|
|
4382
|
+
status: "failed",
|
|
4383
|
+
name: path,
|
|
4384
|
+
reason: `read: ${e.message}`
|
|
4385
|
+
};
|
|
4386
|
+
}
|
|
4387
|
+
const v = validateManifestFile(yamlSrc, path);
|
|
4388
|
+
if (!v.ok) {
|
|
4389
|
+
return {
|
|
4390
|
+
status: "failed",
|
|
4391
|
+
name: path,
|
|
4392
|
+
reason: `validate: ${v.errors[0]?.message ?? "unknown"}`
|
|
4393
|
+
};
|
|
4394
|
+
}
|
|
4395
|
+
const name = v.manifest.metadata.name;
|
|
4396
|
+
const method = v.manifest.spec.install.method;
|
|
4397
|
+
if (PHASE_212.has(method)) {
|
|
4398
|
+
return { status: "skipped", name };
|
|
4399
|
+
}
|
|
4400
|
+
const r = await runInstall(v.manifest, opts);
|
|
4401
|
+
if ("aborted" in r) return { status: "skipped", name };
|
|
4402
|
+
if (r.ok) return { status: "installed", name };
|
|
4403
|
+
return { status: "failed", name, reason: r.error.message };
|
|
4404
|
+
})
|
|
4405
|
+
);
|
|
4373
4406
|
const baseInstalled = [];
|
|
4374
4407
|
const baseSkipped = [];
|
|
4375
4408
|
const baseFailed = [];
|
|
4376
|
-
for (const
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
}
|
|
4389
|
-
const name = v.manifest.metadata.name;
|
|
4390
|
-
const method = v.manifest.spec.install.method;
|
|
4391
|
-
if (PHASE_212.has(method)) {
|
|
4392
|
-
baseSkipped.push(name);
|
|
4393
|
-
continue;
|
|
4394
|
-
}
|
|
4395
|
-
const r = await runInstall(v.manifest, opts);
|
|
4396
|
-
if ("aborted" in r) baseSkipped.push(name);
|
|
4397
|
-
else if (r.ok) baseInstalled.push(name);
|
|
4398
|
-
else baseFailed.push(`${name}: ${r.error.message}`);
|
|
4409
|
+
for (const s of settled) {
|
|
4410
|
+
const v = s.status === "fulfilled" ? s.value : {
|
|
4411
|
+
status: "failed",
|
|
4412
|
+
name: "?",
|
|
4413
|
+
reason: String(s.reason)
|
|
4414
|
+
};
|
|
4415
|
+
if (v.status === "installed") baseInstalled.push(v.name);
|
|
4416
|
+
else if (v.status === "skipped") baseSkipped.push(v.name);
|
|
4417
|
+
else
|
|
4418
|
+
baseFailed.push(
|
|
4419
|
+
`${v.name}: ${v.reason}`
|
|
4420
|
+
);
|
|
4399
4421
|
}
|
|
4422
|
+
const stepBMs = ((Date.now() - stepBStart) / 1e3).toFixed(1);
|
|
4400
4423
|
console.log(
|
|
4401
|
-
`Step B complete: ${baseInstalled.length} manifest(s) installed / ${baseSkipped.length} skipped / ${baseFailed.length} failed`
|
|
4424
|
+
`Step B complete: ${baseInstalled.length} manifest(s) installed / ${baseSkipped.length} skipped / ${baseFailed.length} failed [parallel ${stepBMs}s]`
|
|
4402
4425
|
);
|
|
4403
4426
|
for (const n of baseInstalled) console.log(` [B] installed ${n}`);
|
|
4404
4427
|
for (const n of baseSkipped) console.log(` [B] skipped ${n}`);
|