@vibgrate/cli 1.0.72 → 1.0.74
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.
|
@@ -7249,6 +7249,16 @@ var ScanProgress = class {
|
|
|
7249
7249
|
}
|
|
7250
7250
|
this.render();
|
|
7251
7251
|
}
|
|
7252
|
+
/** Insert a new step before an existing step (used for dynamically discovered items) */
|
|
7253
|
+
insertStepBefore(beforeId, step) {
|
|
7254
|
+
const idx = this.steps.findIndex((s) => s.id === beforeId);
|
|
7255
|
+
const newStep = { ...step, status: "pending", weight: step.weight ?? 1 };
|
|
7256
|
+
if (idx >= 0) {
|
|
7257
|
+
this.steps.splice(idx, 0, newStep);
|
|
7258
|
+
} else {
|
|
7259
|
+
this.steps.push(newStep);
|
|
7260
|
+
}
|
|
7261
|
+
}
|
|
7252
7262
|
/** Mark a step as active (currently running), optionally with expected total */
|
|
7253
7263
|
startStep(id, subTotal) {
|
|
7254
7264
|
const step = this.steps.find((s) => s.id === id);
|
|
@@ -11706,21 +11716,6 @@ async function runScan(rootDir, opts) {
|
|
|
11706
11716
|
{ id: "discovery", label: "Discovering workspace", weight: 3 },
|
|
11707
11717
|
{ id: "vcs", label: "Detecting version control" },
|
|
11708
11718
|
{ id: "walk", label: "Indexing files", weight: 8 },
|
|
11709
|
-
{ id: "node", label: "Scanning Node projects", weight: 4 },
|
|
11710
|
-
{ id: "dotnet", label: "Scanning .NET projects", weight: 2 },
|
|
11711
|
-
{ id: "python", label: "Scanning Python projects", weight: 3 },
|
|
11712
|
-
{ id: "java", label: "Scanning Java projects", weight: 3 },
|
|
11713
|
-
{ id: "ruby", label: "Scanning Ruby projects", weight: 2 },
|
|
11714
|
-
{ id: "swift", label: "Scanning Swift projects", weight: 2 },
|
|
11715
|
-
{ id: "go", label: "Scanning Go projects", weight: 2 },
|
|
11716
|
-
{ id: "rust", label: "Scanning Rust projects", weight: 2 },
|
|
11717
|
-
{ id: "php", label: "Scanning PHP projects", weight: 2 },
|
|
11718
|
-
{ id: "dart", label: "Scanning Dart projects", weight: 2 },
|
|
11719
|
-
{ id: "elixir", label: "Scanning Elixir projects", weight: 2 },
|
|
11720
|
-
{ id: "docker", label: "Scanning Docker images", weight: 2 },
|
|
11721
|
-
{ id: "helm", label: "Scanning Helm charts", weight: 2 },
|
|
11722
|
-
{ id: "terraform", label: "Scanning Terraform configs", weight: 2 },
|
|
11723
|
-
{ id: "polyglot", label: "Scanning additional language projects", weight: 2 },
|
|
11724
11719
|
...scanners !== false ? [
|
|
11725
11720
|
...scannerPolicy.platformMatrix && scanners?.platformMatrix?.enabled !== false ? [{ id: "platform", label: "Platform matrix" }] : [],
|
|
11726
11721
|
...scannerPolicy.toolingInventory && scanners?.toolingInventory?.enabled !== false ? [{ id: "tooling", label: "Tooling inventory" }] : [],
|
|
@@ -11790,139 +11785,184 @@ async function runScan(rootDir, opts) {
|
|
|
11790
11785
|
progress.updateStats({ treeSummary: indexedTreeCount });
|
|
11791
11786
|
}
|
|
11792
11787
|
progress.completeStep("walk", `${treeCount.totalFiles.toLocaleString()} files indexed`);
|
|
11793
|
-
progress.startStep("node");
|
|
11794
11788
|
const nodeProjects = await scanNodeProjects(rootDir, npmCache, fileCache, projectScanTimeoutMs);
|
|
11795
|
-
|
|
11796
|
-
progress.
|
|
11797
|
-
progress.
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
|
|
11789
|
+
if (nodeProjects.length > 0) {
|
|
11790
|
+
progress.insertStepBefore("drift", { id: "node", label: "Found Node projects", weight: 4 });
|
|
11791
|
+
progress.startStep("node");
|
|
11792
|
+
for (const p of nodeProjects) {
|
|
11793
|
+
progress.addDependencies(p.dependencies.length);
|
|
11794
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11795
|
+
}
|
|
11796
|
+
filesScanned += nodeProjects.length;
|
|
11797
|
+
progress.addProjects(nodeProjects.length);
|
|
11798
|
+
progress.completeStep("node", `${nodeProjects.length} project${nodeProjects.length !== 1 ? "s" : ""}`, nodeProjects.length);
|
|
11799
|
+
}
|
|
11803
11800
|
const dotnetProjects = await scanDotnetProjects(rootDir, nugetCache, fileCache, projectScanTimeoutMs);
|
|
11804
|
-
|
|
11805
|
-
progress.
|
|
11806
|
-
progress.
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11801
|
+
if (dotnetProjects.length > 0) {
|
|
11802
|
+
progress.insertStepBefore("drift", { id: "dotnet", label: "Found .NET projects", weight: 2 });
|
|
11803
|
+
progress.startStep("dotnet");
|
|
11804
|
+
for (const p of dotnetProjects) {
|
|
11805
|
+
progress.addDependencies(p.dependencies.length);
|
|
11806
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11807
|
+
}
|
|
11808
|
+
filesScanned += dotnetProjects.length;
|
|
11809
|
+
progress.addProjects(dotnetProjects.length);
|
|
11810
|
+
progress.completeStep("dotnet", `${dotnetProjects.length} project${dotnetProjects.length !== 1 ? "s" : ""}`, dotnetProjects.length);
|
|
11811
|
+
}
|
|
11812
11812
|
const pythonProjects = await scanPythonProjects(rootDir, pypiCache, fileCache, projectScanTimeoutMs);
|
|
11813
|
-
|
|
11814
|
-
progress.
|
|
11815
|
-
progress.
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11813
|
+
if (pythonProjects.length > 0) {
|
|
11814
|
+
progress.insertStepBefore("drift", { id: "python", label: "Found Python projects", weight: 3 });
|
|
11815
|
+
progress.startStep("python");
|
|
11816
|
+
for (const p of pythonProjects) {
|
|
11817
|
+
progress.addDependencies(p.dependencies.length);
|
|
11818
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11819
|
+
}
|
|
11820
|
+
filesScanned += pythonProjects.length;
|
|
11821
|
+
progress.addProjects(pythonProjects.length);
|
|
11822
|
+
progress.completeStep("python", `${pythonProjects.length} project${pythonProjects.length !== 1 ? "s" : ""}`, pythonProjects.length);
|
|
11823
|
+
}
|
|
11821
11824
|
const javaProjects = await scanJavaProjects(rootDir, mavenCache, fileCache, projectScanTimeoutMs);
|
|
11822
|
-
|
|
11823
|
-
progress.
|
|
11824
|
-
progress.
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
|
|
11828
|
-
|
|
11829
|
-
|
|
11825
|
+
if (javaProjects.length > 0) {
|
|
11826
|
+
progress.insertStepBefore("drift", { id: "java", label: "Found Java projects", weight: 3 });
|
|
11827
|
+
progress.startStep("java");
|
|
11828
|
+
for (const p of javaProjects) {
|
|
11829
|
+
progress.addDependencies(p.dependencies.length);
|
|
11830
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11831
|
+
}
|
|
11832
|
+
filesScanned += javaProjects.length;
|
|
11833
|
+
progress.addProjects(javaProjects.length);
|
|
11834
|
+
progress.completeStep("java", `${javaProjects.length} project${javaProjects.length !== 1 ? "s" : ""}`, javaProjects.length);
|
|
11835
|
+
}
|
|
11830
11836
|
const rubyProjects = await scanRubyProjects(rootDir, rubygemsCache, fileCache, projectScanTimeoutMs);
|
|
11831
|
-
|
|
11832
|
-
progress.
|
|
11833
|
-
progress.
|
|
11834
|
-
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11837
|
+
if (rubyProjects.length > 0) {
|
|
11838
|
+
progress.insertStepBefore("drift", { id: "ruby", label: "Found Ruby projects", weight: 2 });
|
|
11839
|
+
progress.startStep("ruby");
|
|
11840
|
+
for (const p of rubyProjects) {
|
|
11841
|
+
progress.addDependencies(p.dependencies.length);
|
|
11842
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11843
|
+
}
|
|
11844
|
+
filesScanned += rubyProjects.length;
|
|
11845
|
+
progress.addProjects(rubyProjects.length);
|
|
11846
|
+
progress.completeStep("ruby", `${rubyProjects.length} project${rubyProjects.length !== 1 ? "s" : ""}`, rubyProjects.length);
|
|
11847
|
+
}
|
|
11839
11848
|
const swiftProjects = await scanSwiftProjects(rootDir, swiftCache, fileCache, projectScanTimeoutMs);
|
|
11840
|
-
|
|
11841
|
-
progress.
|
|
11842
|
-
progress.
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
|
|
11849
|
+
if (swiftProjects.length > 0) {
|
|
11850
|
+
progress.insertStepBefore("drift", { id: "swift", label: "Found Swift projects", weight: 2 });
|
|
11851
|
+
progress.startStep("swift");
|
|
11852
|
+
for (const p of swiftProjects) {
|
|
11853
|
+
progress.addDependencies(p.dependencies.length);
|
|
11854
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11855
|
+
}
|
|
11856
|
+
filesScanned += swiftProjects.length;
|
|
11857
|
+
progress.addProjects(swiftProjects.length);
|
|
11858
|
+
progress.completeStep("swift", `${swiftProjects.length} project${swiftProjects.length !== 1 ? "s" : ""}`, swiftProjects.length);
|
|
11859
|
+
}
|
|
11848
11860
|
const goProjects = await scanGoProjects(rootDir, goCache, fileCache, projectScanTimeoutMs);
|
|
11849
|
-
|
|
11850
|
-
progress.
|
|
11851
|
-
progress.
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
11856
|
-
|
|
11861
|
+
if (goProjects.length > 0) {
|
|
11862
|
+
progress.insertStepBefore("drift", { id: "go", label: "Found Go projects", weight: 2 });
|
|
11863
|
+
progress.startStep("go");
|
|
11864
|
+
for (const p of goProjects) {
|
|
11865
|
+
progress.addDependencies(p.dependencies.length);
|
|
11866
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11867
|
+
}
|
|
11868
|
+
filesScanned += goProjects.length;
|
|
11869
|
+
progress.addProjects(goProjects.length);
|
|
11870
|
+
progress.completeStep("go", `${goProjects.length} project${goProjects.length !== 1 ? "s" : ""}`, goProjects.length);
|
|
11871
|
+
}
|
|
11857
11872
|
const rustProjects = await scanRustProjects(rootDir, cargoCache, fileCache, projectScanTimeoutMs);
|
|
11858
|
-
|
|
11859
|
-
progress.
|
|
11860
|
-
progress.
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
|
|
11864
|
-
|
|
11865
|
-
|
|
11873
|
+
if (rustProjects.length > 0) {
|
|
11874
|
+
progress.insertStepBefore("drift", { id: "rust", label: "Found Rust projects", weight: 2 });
|
|
11875
|
+
progress.startStep("rust");
|
|
11876
|
+
for (const p of rustProjects) {
|
|
11877
|
+
progress.addDependencies(p.dependencies.length);
|
|
11878
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11879
|
+
}
|
|
11880
|
+
filesScanned += rustProjects.length;
|
|
11881
|
+
progress.addProjects(rustProjects.length);
|
|
11882
|
+
progress.completeStep("rust", `${rustProjects.length} project${rustProjects.length !== 1 ? "s" : ""}`, rustProjects.length);
|
|
11883
|
+
}
|
|
11866
11884
|
const phpProjects = await scanPhpProjects(rootDir, composerCache, fileCache, projectScanTimeoutMs);
|
|
11867
|
-
|
|
11868
|
-
progress.
|
|
11869
|
-
progress.
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11885
|
+
if (phpProjects.length > 0) {
|
|
11886
|
+
progress.insertStepBefore("drift", { id: "php", label: "Found PHP projects", weight: 2 });
|
|
11887
|
+
progress.startStep("php");
|
|
11888
|
+
for (const p of phpProjects) {
|
|
11889
|
+
progress.addDependencies(p.dependencies.length);
|
|
11890
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11891
|
+
}
|
|
11892
|
+
filesScanned += phpProjects.length;
|
|
11893
|
+
progress.addProjects(phpProjects.length);
|
|
11894
|
+
progress.completeStep("php", `${phpProjects.length} project${phpProjects.length !== 1 ? "s" : ""}`, phpProjects.length);
|
|
11895
|
+
}
|
|
11875
11896
|
const dartProjects = await scanDartProjects(rootDir, pubCache, fileCache, projectScanTimeoutMs);
|
|
11876
|
-
|
|
11877
|
-
progress.
|
|
11878
|
-
progress.
|
|
11879
|
-
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11897
|
+
if (dartProjects.length > 0) {
|
|
11898
|
+
progress.insertStepBefore("drift", { id: "dart", label: "Found Dart projects", weight: 2 });
|
|
11899
|
+
progress.startStep("dart");
|
|
11900
|
+
for (const p of dartProjects) {
|
|
11901
|
+
progress.addDependencies(p.dependencies.length);
|
|
11902
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11903
|
+
}
|
|
11904
|
+
filesScanned += dartProjects.length;
|
|
11905
|
+
progress.addProjects(dartProjects.length);
|
|
11906
|
+
progress.completeStep("dart", `${dartProjects.length} project${dartProjects.length !== 1 ? "s" : ""}`, dartProjects.length);
|
|
11907
|
+
}
|
|
11884
11908
|
const elixirProjects = await scanElixirProjects(rootDir, packageManifest, fileCache, projectScanTimeoutMs, offlineMode);
|
|
11885
|
-
|
|
11886
|
-
progress.
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11909
|
+
if (elixirProjects.length > 0) {
|
|
11910
|
+
progress.insertStepBefore("drift", { id: "elixir", label: "Found Elixir projects", weight: 2 });
|
|
11911
|
+
progress.startStep("elixir");
|
|
11912
|
+
for (const p of elixirProjects) {
|
|
11913
|
+
progress.addDependencies(p.dependencies.length);
|
|
11914
|
+
if (p.frameworks) progress.addFrameworks(p.frameworks.length);
|
|
11915
|
+
}
|
|
11916
|
+
filesScanned += elixirProjects.length;
|
|
11917
|
+
progress.addProjects(elixirProjects.length);
|
|
11918
|
+
progress.completeStep("elixir", `${elixirProjects.length} project${elixirProjects.length !== 1 ? "s" : ""}`, elixirProjects.length);
|
|
11919
|
+
}
|
|
11893
11920
|
const dockerProjects = await scanDockerProjects(rootDir, packageManifest, fileCache, projectScanTimeoutMs, offlineMode);
|
|
11894
|
-
|
|
11895
|
-
progress.
|
|
11921
|
+
if (dockerProjects.length > 0) {
|
|
11922
|
+
progress.insertStepBefore("drift", { id: "docker", label: "Found Docker images", weight: 2 });
|
|
11923
|
+
progress.startStep("docker");
|
|
11924
|
+
for (const p of dockerProjects) {
|
|
11925
|
+
progress.addDependencies(p.dependencies.length);
|
|
11926
|
+
}
|
|
11927
|
+
filesScanned += dockerProjects.length;
|
|
11928
|
+
progress.addProjects(dockerProjects.length);
|
|
11929
|
+
progress.completeStep("docker", `${dockerProjects.length} project${dockerProjects.length !== 1 ? "s" : ""}`, dockerProjects.length);
|
|
11896
11930
|
}
|
|
11897
|
-
filesScanned += dockerProjects.length;
|
|
11898
|
-
progress.addProjects(dockerProjects.length);
|
|
11899
|
-
progress.completeStep("docker", `${dockerProjects.length} project${dockerProjects.length !== 1 ? "s" : ""}`, dockerProjects.length);
|
|
11900
|
-
progress.startStep("helm");
|
|
11901
11931
|
const helmProjects = await scanHelmProjects(rootDir, packageManifest, fileCache, projectScanTimeoutMs, offlineMode);
|
|
11902
|
-
|
|
11903
|
-
progress.
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
|
|
11932
|
+
if (helmProjects.length > 0) {
|
|
11933
|
+
progress.insertStepBefore("drift", { id: "helm", label: "Found Helm charts", weight: 2 });
|
|
11934
|
+
progress.startStep("helm");
|
|
11935
|
+
for (const p of helmProjects) {
|
|
11936
|
+
progress.addDependencies(p.dependencies.length);
|
|
11937
|
+
if (p.frameworks) progress.addFrameworks(p.frameworks.length);
|
|
11938
|
+
}
|
|
11939
|
+
filesScanned += helmProjects.length;
|
|
11940
|
+
progress.addProjects(helmProjects.length);
|
|
11941
|
+
progress.completeStep("helm", `${helmProjects.length} project${helmProjects.length !== 1 ? "s" : ""}`, helmProjects.length);
|
|
11942
|
+
}
|
|
11910
11943
|
const terraformProjects = await scanTerraformProjects(rootDir, packageManifest, fileCache, projectScanTimeoutMs, offlineMode);
|
|
11911
|
-
|
|
11912
|
-
progress.
|
|
11944
|
+
if (terraformProjects.length > 0) {
|
|
11945
|
+
progress.insertStepBefore("drift", { id: "terraform", label: "Found Terraform configs", weight: 2 });
|
|
11946
|
+
progress.startStep("terraform");
|
|
11947
|
+
for (const p of terraformProjects) {
|
|
11948
|
+
progress.addDependencies(p.dependencies.length);
|
|
11949
|
+
}
|
|
11950
|
+
filesScanned += terraformProjects.length;
|
|
11951
|
+
progress.addProjects(terraformProjects.length);
|
|
11952
|
+
progress.completeStep("terraform", `${terraformProjects.length} project${terraformProjects.length !== 1 ? "s" : ""}`, terraformProjects.length);
|
|
11913
11953
|
}
|
|
11914
|
-
filesScanned += terraformProjects.length;
|
|
11915
|
-
progress.addProjects(terraformProjects.length);
|
|
11916
|
-
progress.completeStep("terraform", `${terraformProjects.length} project${terraformProjects.length !== 1 ? "s" : ""}`, terraformProjects.length);
|
|
11917
|
-
progress.startStep("polyglot");
|
|
11918
11954
|
const polyglotProjects = await scanPolyglotProjects(rootDir, fileCache);
|
|
11919
|
-
|
|
11920
|
-
progress.
|
|
11921
|
-
progress.
|
|
11955
|
+
if (polyglotProjects.length > 0) {
|
|
11956
|
+
progress.insertStepBefore("drift", { id: "polyglot", label: "Found additional language projects", weight: 2 });
|
|
11957
|
+
progress.startStep("polyglot");
|
|
11958
|
+
for (const p of polyglotProjects) {
|
|
11959
|
+
progress.addDependencies(p.dependencies.length);
|
|
11960
|
+
progress.addFrameworks(p.frameworks.length);
|
|
11961
|
+
}
|
|
11962
|
+
filesScanned += polyglotProjects.length;
|
|
11963
|
+
progress.addProjects(polyglotProjects.length);
|
|
11964
|
+
progress.completeStep("polyglot", `${polyglotProjects.length} project${polyglotProjects.length !== 1 ? "s" : ""}`, polyglotProjects.length);
|
|
11922
11965
|
}
|
|
11923
|
-
filesScanned += polyglotProjects.length;
|
|
11924
|
-
progress.addProjects(polyglotProjects.length);
|
|
11925
|
-
progress.completeStep("polyglot", `${polyglotProjects.length} project${polyglotProjects.length !== 1 ? "s" : ""}`, polyglotProjects.length);
|
|
11926
11966
|
const rawProjects = [...nodeProjects, ...dotnetProjects, ...pythonProjects, ...javaProjects, ...rubyProjects, ...swiftProjects, ...goProjects, ...rustProjects, ...phpProjects, ...dartProjects, ...elixirProjects, ...dockerProjects, ...helmProjects, ...terraformProjects, ...polyglotProjects];
|
|
11927
11967
|
const deduplicatedMap = /* @__PURE__ */ new Map();
|
|
11928
11968
|
for (const project of rawProjects) {
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
baselineCommand
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6X2BYLQ3.js";
|
|
5
5
|
import {
|
|
6
6
|
VERSION,
|
|
7
7
|
dsnCommand,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
pushCommand,
|
|
11
11
|
scanCommand,
|
|
12
12
|
writeDefaultConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6666OEOV.js";
|
|
14
14
|
import {
|
|
15
15
|
ensureDir,
|
|
16
16
|
pathExists,
|
|
@@ -39,7 +39,7 @@ var initCommand = new Command("init").description("Initialize vibgrate in a proj
|
|
|
39
39
|
console.log(chalk.green("\u2714") + ` Created ${chalk.bold("vibgrate.config.ts")}`);
|
|
40
40
|
}
|
|
41
41
|
if (opts.baseline) {
|
|
42
|
-
const { runBaseline } = await import("./baseline-
|
|
42
|
+
const { runBaseline } = await import("./baseline-WYKVNIRH.js");
|
|
43
43
|
await runBaseline(rootDir);
|
|
44
44
|
}
|
|
45
45
|
console.log("");
|
package/dist/index.js
CHANGED