@biffo/cli 0.320.0 → 0.321.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.js +36 -35
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8651,11 +8651,13 @@ function validateManifest(raw) {
|
|
|
8651
8651
|
|
|
8652
8652
|
// src/lib/plugin-scaffold.ts
|
|
8653
8653
|
import {
|
|
8654
|
+
chmodSync as chmodSync2,
|
|
8654
8655
|
copyFileSync,
|
|
8655
8656
|
existsSync as existsSync26,
|
|
8656
8657
|
mkdirSync as mkdirSync8,
|
|
8657
8658
|
readFileSync as readFileSync19,
|
|
8658
8659
|
readdirSync as readdirSync11,
|
|
8660
|
+
statSync as statSync7,
|
|
8659
8661
|
writeFileSync as writeFileSync8
|
|
8660
8662
|
} from "fs";
|
|
8661
8663
|
import { dirname as dirname7, join as join26 } from "path";
|
|
@@ -8740,13 +8742,12 @@ function scaffoldPlugin(skeletonRoot, destDir, names, options = {}) {
|
|
|
8740
8742
|
const destRel = applySubstitutions(relPath, names);
|
|
8741
8743
|
const destPath = join26(destDir, destRel);
|
|
8742
8744
|
mkdirSync8(dirname7(destPath), { recursive: true });
|
|
8745
|
+
const srcPath = join26(skeletonRoot, relPath);
|
|
8743
8746
|
if (BINARY_EXTENSIONS.test(entry.name)) {
|
|
8744
|
-
copyFileSync(
|
|
8747
|
+
copyFileSync(srcPath, destPath);
|
|
8745
8748
|
} else {
|
|
8746
|
-
writeFileSync8(
|
|
8747
|
-
|
|
8748
|
-
applySubstitutions(readFileSync19(join26(skeletonRoot, relPath), "utf8"), names)
|
|
8749
|
-
);
|
|
8749
|
+
writeFileSync8(destPath, applySubstitutions(readFileSync19(srcPath, "utf8"), names));
|
|
8750
|
+
chmodSync2(destPath, statSync7(srcPath).mode);
|
|
8750
8751
|
}
|
|
8751
8752
|
files.push(destRel);
|
|
8752
8753
|
}
|
|
@@ -9328,7 +9329,7 @@ function printScopeSeamEntitlement(name) {
|
|
|
9328
9329
|
}
|
|
9329
9330
|
|
|
9330
9331
|
// src/commands/plugin-install.ts
|
|
9331
|
-
import { cpSync as cpSync5, existsSync as existsSync32, mkdirSync as mkdirSync11, readFileSync as readFileSync24, statSync as
|
|
9332
|
+
import { cpSync as cpSync5, existsSync as existsSync32, mkdirSync as mkdirSync11, readFileSync as readFileSync24, statSync as statSync8, writeFileSync as writeFileSync13 } from "fs";
|
|
9332
9333
|
import { join as join34, relative as relative4, resolve as resolve12 } from "path";
|
|
9333
9334
|
import chalk15 from "chalk";
|
|
9334
9335
|
import { Command as Command15 } from "commander";
|
|
@@ -9871,7 +9872,7 @@ function resolveLocalPlugin(localPath) {
|
|
|
9871
9872
|
if (!existsSync32(localPath)) {
|
|
9872
9873
|
throw new Error(`--local path does not exist: ${localPath}`);
|
|
9873
9874
|
}
|
|
9874
|
-
if (!
|
|
9875
|
+
if (!statSync8(localPath).isDirectory()) {
|
|
9875
9876
|
throw new Error(`--local path is not a directory: ${localPath}`);
|
|
9876
9877
|
}
|
|
9877
9878
|
const manifestPath = join34(localPath, "biffo.plugin.json");
|
|
@@ -10281,7 +10282,7 @@ import { resolve as resolve14 } from "path";
|
|
|
10281
10282
|
import { Command as Command17 } from "commander";
|
|
10282
10283
|
|
|
10283
10284
|
// src/lib/plugin-staleness.ts
|
|
10284
|
-
import { existsSync as existsSync34, readFileSync as readFileSync26, readdirSync as readdirSync14, statSync as
|
|
10285
|
+
import { existsSync as existsSync34, readFileSync as readFileSync26, readdirSync as readdirSync14, statSync as statSync9 } from "fs";
|
|
10285
10286
|
import { join as join36, relative as relative5 } from "path";
|
|
10286
10287
|
function discoverVendoredPlugins(servicesDir) {
|
|
10287
10288
|
if (!existsSync34(servicesDir)) return [];
|
|
@@ -10510,7 +10511,7 @@ function walkExcluding(root, dir, excludes) {
|
|
|
10510
10511
|
const full = join36(dir, entry);
|
|
10511
10512
|
let stat;
|
|
10512
10513
|
try {
|
|
10513
|
-
stat =
|
|
10514
|
+
stat = statSync9(full);
|
|
10514
10515
|
} catch {
|
|
10515
10516
|
continue;
|
|
10516
10517
|
}
|
|
@@ -11791,7 +11792,7 @@ Already accepted? List it in docs/ADR/${ALLOWLIST_FILENAME} instead of leaving t
|
|
|
11791
11792
|
}
|
|
11792
11793
|
|
|
11793
11794
|
// src/lib/api-gateway-integration-guard.ts
|
|
11794
|
-
import { readFileSync as readFileSync31, readdirSync as readdirSync16, statSync as
|
|
11795
|
+
import { readFileSync as readFileSync31, readdirSync as readdirSync16, statSync as statSync10 } from "fs";
|
|
11795
11796
|
import { join as join43 } from "path";
|
|
11796
11797
|
var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", ".terraform", ".worktrees", "dist"]);
|
|
11797
11798
|
var MODULE_TYPE = "module";
|
|
@@ -11877,7 +11878,7 @@ function walkTerraformFiles(root) {
|
|
|
11877
11878
|
const p = join43(dir, entry);
|
|
11878
11879
|
let st;
|
|
11879
11880
|
try {
|
|
11880
|
-
st =
|
|
11881
|
+
st = statSync10(p);
|
|
11881
11882
|
} catch {
|
|
11882
11883
|
continue;
|
|
11883
11884
|
}
|
|
@@ -12437,7 +12438,7 @@ import { existsSync as existsSync43 } from "fs";
|
|
|
12437
12438
|
import { join as join46, relative as relative8 } from "path";
|
|
12438
12439
|
|
|
12439
12440
|
// src/lib/codeql-suppression-guard.ts
|
|
12440
|
-
import { readdirSync as readdirSync18, readFileSync as readFileSync33, statSync as
|
|
12441
|
+
import { readdirSync as readdirSync18, readFileSync as readFileSync33, statSync as statSync11 } from "fs";
|
|
12441
12442
|
import { join as join45 } from "path";
|
|
12442
12443
|
var SKIP_DIRS2 = /* @__PURE__ */ new Set([
|
|
12443
12444
|
".git",
|
|
@@ -12472,7 +12473,7 @@ function walkSourceFiles(root) {
|
|
|
12472
12473
|
const p = join45(dir, entry);
|
|
12473
12474
|
let st;
|
|
12474
12475
|
try {
|
|
12475
|
-
st =
|
|
12476
|
+
st = statSync11(p);
|
|
12476
12477
|
} catch {
|
|
12477
12478
|
continue;
|
|
12478
12479
|
}
|
|
@@ -12535,7 +12536,7 @@ import { existsSync as existsSync44 } from "fs";
|
|
|
12535
12536
|
import { join as join48 } from "path";
|
|
12536
12537
|
|
|
12537
12538
|
// src/lib/cognito-invite-template-guard.ts
|
|
12538
|
-
import { readdirSync as readdirSync19, readFileSync as readFileSync34, statSync as
|
|
12539
|
+
import { readdirSync as readdirSync19, readFileSync as readFileSync34, statSync as statSync12 } from "fs";
|
|
12539
12540
|
import { join as join47 } from "path";
|
|
12540
12541
|
var REQUIRED_INVITE_MEMBERS = ["email_subject", "email_message", "sms_message"];
|
|
12541
12542
|
var REQUIRED_INVITE_PLACEHOLDERS = ["{username}", "{####}"];
|
|
@@ -12624,7 +12625,7 @@ function findModuleTerraformFiles(repoRoot) {
|
|
|
12624
12625
|
const rel = `${relative11}/${entry}`;
|
|
12625
12626
|
let isDir;
|
|
12626
12627
|
try {
|
|
12627
|
-
isDir =
|
|
12628
|
+
isDir = statSync12(full).isDirectory();
|
|
12628
12629
|
} catch {
|
|
12629
12630
|
continue;
|
|
12630
12631
|
}
|
|
@@ -12677,7 +12678,7 @@ async function runCognitoInviteTemplateCheck() {
|
|
|
12677
12678
|
import { join as join50 } from "path";
|
|
12678
12679
|
|
|
12679
12680
|
// src/lib/core-direct-paths-audit.ts
|
|
12680
|
-
import { existsSync as existsSync45, readFileSync as readFileSync35, readdirSync as readdirSync20, statSync as
|
|
12681
|
+
import { existsSync as existsSync45, readFileSync as readFileSync35, readdirSync as readdirSync20, statSync as statSync13 } from "fs";
|
|
12681
12682
|
import { join as join49 } from "path";
|
|
12682
12683
|
var EXTERNAL_BASE_IDENTIFIERS = ["CORE_API_URL"];
|
|
12683
12684
|
var API_ROUTE_PREFIX = "/api/v1";
|
|
@@ -12845,7 +12846,7 @@ function walkFiles(root, accept, skipDir) {
|
|
|
12845
12846
|
const p = join49(dir, entry);
|
|
12846
12847
|
let st;
|
|
12847
12848
|
try {
|
|
12848
|
-
st =
|
|
12849
|
+
st = statSync13(p);
|
|
12849
12850
|
} catch {
|
|
12850
12851
|
continue;
|
|
12851
12852
|
}
|
|
@@ -13541,7 +13542,7 @@ ${assertion.ref}`;
|
|
|
13541
13542
|
}
|
|
13542
13543
|
|
|
13543
13544
|
// src/lib/eventbridge-log-permission-guard.ts
|
|
13544
|
-
import { readFileSync as readFileSync37, readdirSync as readdirSync21, statSync as
|
|
13545
|
+
import { readFileSync as readFileSync37, readdirSync as readdirSync21, statSync as statSync14 } from "fs";
|
|
13545
13546
|
import { join as join54 } from "path";
|
|
13546
13547
|
var SKIP_DIRS3 = /* @__PURE__ */ new Set(["node_modules", ".git", ".terraform", ".worktrees", "dist"]);
|
|
13547
13548
|
var EVENT_TARGET_TYPE = "aws_cloudwatch_event_target";
|
|
@@ -13622,7 +13623,7 @@ function walkTerraformFiles2(root) {
|
|
|
13622
13623
|
const p = join54(dir, entry);
|
|
13623
13624
|
let st;
|
|
13624
13625
|
try {
|
|
13625
|
-
st =
|
|
13626
|
+
st = statSync14(p);
|
|
13626
13627
|
} catch {
|
|
13627
13628
|
continue;
|
|
13628
13629
|
}
|
|
@@ -13802,7 +13803,7 @@ import { readFileSync as readFileSync39 } from "fs";
|
|
|
13802
13803
|
import { join as join57 } from "path";
|
|
13803
13804
|
|
|
13804
13805
|
// src/lib/terraform-input-guard.ts
|
|
13805
|
-
import { existsSync as existsSync49, readdirSync as readdirSync22, readFileSync as readFileSync38, statSync as
|
|
13806
|
+
import { existsSync as existsSync49, readdirSync as readdirSync22, readFileSync as readFileSync38, statSync as statSync15 } from "fs";
|
|
13806
13807
|
import { join as join56 } from "path";
|
|
13807
13808
|
var GUARDED_SUBCOMMANDS = [
|
|
13808
13809
|
"init",
|
|
@@ -13827,7 +13828,7 @@ function vendoredPluginServiceDirs(repoRoot) {
|
|
|
13827
13828
|
}
|
|
13828
13829
|
for (const entry of entries) {
|
|
13829
13830
|
const full = join56(servicesDir, entry);
|
|
13830
|
-
if (!existsSync49(full) || !
|
|
13831
|
+
if (!existsSync49(full) || !statSync15(full).isDirectory()) continue;
|
|
13831
13832
|
if (existsSync49(join56(full, "biffo.plugin.json"))) {
|
|
13832
13833
|
result.add(entry);
|
|
13833
13834
|
}
|
|
@@ -13854,7 +13855,7 @@ function findWorkflowFiles(repoRoot) {
|
|
|
13854
13855
|
const rel = relative11 ? `${relative11}/${entry}` : entry;
|
|
13855
13856
|
let isDir;
|
|
13856
13857
|
try {
|
|
13857
|
-
isDir =
|
|
13858
|
+
isDir = statSync15(full).isDirectory();
|
|
13858
13859
|
} catch {
|
|
13859
13860
|
continue;
|
|
13860
13861
|
}
|
|
@@ -14815,7 +14816,7 @@ import { existsSync as existsSync53 } from "fs";
|
|
|
14815
14816
|
import { join as join64 } from "path";
|
|
14816
14817
|
|
|
14817
14818
|
// src/lib/plugin-collision-guard.ts
|
|
14818
|
-
import { existsSync as existsSync52, readdirSync as readdirSync24, statSync as
|
|
14819
|
+
import { existsSync as existsSync52, readdirSync as readdirSync24, statSync as statSync16 } from "fs";
|
|
14819
14820
|
import { join as join63 } from "path";
|
|
14820
14821
|
var PYTEST_SPECIAL = /* @__PURE__ */ new Set(["conftest.py"]);
|
|
14821
14822
|
var IGNORED_DIRS = /* @__PURE__ */ new Set([".venv", "node_modules", "__pycache__", ".git", "dist", "build"]);
|
|
@@ -14824,7 +14825,7 @@ function subdirectories(dir) {
|
|
|
14824
14825
|
return readdirSync24(dir).filter((entry) => {
|
|
14825
14826
|
if (IGNORED_DIRS.has(entry) || entry.startsWith(".")) return false;
|
|
14826
14827
|
try {
|
|
14827
|
-
return
|
|
14828
|
+
return statSync16(join63(dir, entry)).isDirectory();
|
|
14828
14829
|
} catch {
|
|
14829
14830
|
return false;
|
|
14830
14831
|
}
|
|
@@ -14986,7 +14987,7 @@ import { existsSync as existsSync56 } from "fs";
|
|
|
14986
14987
|
import { join as join67 } from "path";
|
|
14987
14988
|
|
|
14988
14989
|
// src/lib/plugin-tool-supply-audit.ts
|
|
14989
|
-
import { existsSync as existsSync55, readFileSync as readFileSync44, readdirSync as readdirSync26, statSync as
|
|
14990
|
+
import { existsSync as existsSync55, readFileSync as readFileSync44, readdirSync as readdirSync26, statSync as statSync17 } from "fs";
|
|
14990
14991
|
import { join as join66 } from "path";
|
|
14991
14992
|
|
|
14992
14993
|
// src/lib/openrouter-model-snapshot.ts
|
|
@@ -15404,7 +15405,7 @@ function listDirs(root) {
|
|
|
15404
15405
|
}
|
|
15405
15406
|
return entries.filter((e) => {
|
|
15406
15407
|
try {
|
|
15407
|
-
return
|
|
15408
|
+
return statSync17(join66(root, e)).isDirectory();
|
|
15408
15409
|
} catch {
|
|
15409
15410
|
return false;
|
|
15410
15411
|
}
|
|
@@ -15423,7 +15424,7 @@ function walkFiles2(root, accept, skipDir) {
|
|
|
15423
15424
|
const p = join66(dir, entry);
|
|
15424
15425
|
let st;
|
|
15425
15426
|
try {
|
|
15426
|
-
st =
|
|
15427
|
+
st = statSync17(p);
|
|
15427
15428
|
} catch {
|
|
15428
15429
|
continue;
|
|
15429
15430
|
}
|
|
@@ -15792,7 +15793,7 @@ function auditDeclaredModelIds(repoRoot, options = {}) {
|
|
|
15792
15793
|
function discoverPluginDirs(pluginsRoot) {
|
|
15793
15794
|
return listDirs(pluginsRoot).filter((name) => {
|
|
15794
15795
|
try {
|
|
15795
|
-
return
|
|
15796
|
+
return statSync17(join66(pluginsRoot, name, "biffo.plugin.json")).isFile();
|
|
15796
15797
|
} catch {
|
|
15797
15798
|
return false;
|
|
15798
15799
|
}
|
|
@@ -16357,7 +16358,7 @@ import { existsSync as existsSync57, readdirSync as readdirSync28 } from "fs";
|
|
|
16357
16358
|
import { join as join69 } from "path";
|
|
16358
16359
|
|
|
16359
16360
|
// src/lib/skeleton-drift-guard.ts
|
|
16360
|
-
import { readFileSync as readFileSync47, readdirSync as readdirSync27, statSync as
|
|
16361
|
+
import { readFileSync as readFileSync47, readdirSync as readdirSync27, statSync as statSync18 } from "fs";
|
|
16361
16362
|
import { join as join68 } from "path";
|
|
16362
16363
|
var isWorkflow = (rel) => rel.startsWith(".github/workflows/") && (rel.endsWith(".yml") || rel.endsWith(".yaml"));
|
|
16363
16364
|
var isRootLayout = (rel) => rel.endsWith("src/app/layout.tsx");
|
|
@@ -16425,7 +16426,7 @@ function walk(dir, base = dir) {
|
|
|
16425
16426
|
const abs = join68(dir, entry);
|
|
16426
16427
|
let isDir;
|
|
16427
16428
|
try {
|
|
16428
|
-
isDir =
|
|
16429
|
+
isDir = statSync18(abs).isDirectory();
|
|
16429
16430
|
} catch {
|
|
16430
16431
|
continue;
|
|
16431
16432
|
}
|
|
@@ -17051,12 +17052,12 @@ async function reapAllBareBranches(cwd, branches, worktrees, currentBranch, deps
|
|
|
17051
17052
|
}
|
|
17052
17053
|
|
|
17053
17054
|
// src/lib/scratch-clone-scan.ts
|
|
17054
|
-
import { readdirSync as readdirSync29, statSync as
|
|
17055
|
+
import { readdirSync as readdirSync29, statSync as statSync19 } from "fs";
|
|
17055
17056
|
import { join as join70 } from "path";
|
|
17056
17057
|
var INTEGRATION_BRANCH = "dev";
|
|
17057
17058
|
function isPlainCloneDir(path) {
|
|
17058
17059
|
try {
|
|
17059
|
-
return
|
|
17060
|
+
return statSync19(join70(path, ".git")).isDirectory();
|
|
17060
17061
|
} catch {
|
|
17061
17062
|
return false;
|
|
17062
17063
|
}
|
|
@@ -17809,14 +17810,14 @@ function resolveGithubToken4() {
|
|
|
17809
17810
|
|
|
17810
17811
|
// src/lib/packaged-script-command.ts
|
|
17811
17812
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
17812
|
-
import { chmodSync as
|
|
17813
|
+
import { chmodSync as chmodSync3, statSync as statSync20 } from "fs";
|
|
17813
17814
|
import { dirname as dirname13 } from "path";
|
|
17814
17815
|
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
17815
17816
|
import { Command as Command28 } from "commander";
|
|
17816
17817
|
function ensureExecutable(script) {
|
|
17817
17818
|
try {
|
|
17818
|
-
const { mode } =
|
|
17819
|
-
if ((mode & 73) === 0)
|
|
17819
|
+
const { mode } = statSync20(script);
|
|
17820
|
+
if ((mode & 73) === 0) chmodSync3(script, mode | 493);
|
|
17820
17821
|
} catch {
|
|
17821
17822
|
}
|
|
17822
17823
|
}
|