@coana-tech/cli 14.5.1 → 14.5.2
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/cli.js +6 -29
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -106133,8 +106133,6 @@ var init_other_modules_communicator = __esm({
|
|
|
106133
106133
|
return "Computing workspace paths";
|
|
106134
106134
|
case "prepareProjectAndGetProjectData":
|
|
106135
106135
|
return "Preparing project and computing dependency trees";
|
|
106136
|
-
case "getPackageSpecifier":
|
|
106137
|
-
return "Getting package specifier";
|
|
106138
106136
|
case "getDependencyTrees":
|
|
106139
106137
|
return "Computing dependency trees";
|
|
106140
106138
|
case "computeDirectDependenciesMap":
|
|
@@ -106315,9 +106313,6 @@ var init_other_modules_communicator = __esm({
|
|
|
106315
106313
|
async getFixingData(packageManagerName, subprojectPath, workspacePaths) {
|
|
106316
106314
|
return this.runPackageManagerCommandWithOutput("getFixingData", packageManagerName, subprojectPath, workspacePaths);
|
|
106317
106315
|
}
|
|
106318
|
-
async getPackageSpecifier(packageManagerName, subprojectPath) {
|
|
106319
|
-
return this.runPackageManagerCommandWithOutput("getPackageSpecifier", packageManagerName, subprojectPath, ["."]);
|
|
106320
|
-
}
|
|
106321
106316
|
async getDependencyTrees(packageManagerName, subprojectPath, workspacePaths) {
|
|
106322
106317
|
return this.runPackageManagerCommandWithOutput(
|
|
106323
106318
|
"getDependencyTrees",
|
|
@@ -140599,10 +140594,9 @@ var init_project_manager = __esm({
|
|
|
140599
140594
|
init_ecosystem_manager();
|
|
140600
140595
|
init_ecosystem_specs();
|
|
140601
140596
|
ProjectManager = class _ProjectManager {
|
|
140602
|
-
constructor(ecosystemToEcosystemManager, projectDir
|
|
140597
|
+
constructor(ecosystemToEcosystemManager, projectDir) {
|
|
140603
140598
|
this.ecosystemToEcosystemManager = ecosystemToEcosystemManager;
|
|
140604
140599
|
this.projectDir = projectDir;
|
|
140605
|
-
this.otherModulesCommunicator = otherModulesCommunicator;
|
|
140606
140600
|
}
|
|
140607
140601
|
static async create(projectDir, otherModulesCommunicator, ecosystems, includeDirs = [], excludeDirs = [], changedFiles) {
|
|
140608
140602
|
const discoveryConfig = {
|
|
@@ -140619,7 +140613,7 @@ var init_project_manager = __esm({
|
|
|
140619
140613
|
})
|
|
140620
140614
|
)
|
|
140621
140615
|
);
|
|
140622
|
-
return new _ProjectManager(ecosystemToEcosystemManager, projectDir
|
|
140616
|
+
return new _ProjectManager(ecosystemToEcosystemManager, projectDir);
|
|
140623
140617
|
}
|
|
140624
140618
|
getSubprojectsWithWorkspacePaths() {
|
|
140625
140619
|
const getSubprojectsForEcosystems = (ecosystems) => ecosystems.flatMap(
|
|
@@ -140631,18 +140625,6 @@ var init_project_manager = __esm({
|
|
|
140631
140625
|
noSupport: getSubprojectsForEcosystems(ECOSYSTEMS_WITH_NO_SUPPORT)
|
|
140632
140626
|
};
|
|
140633
140627
|
}
|
|
140634
|
-
async getProjectSpecifier() {
|
|
140635
|
-
const rootSubproject = Object.values(this.getSubprojectsWithWorkspacePaths()).flat().find(({ subprojectPath, workspacePaths }) => subprojectPath === this.projectDir && workspacePaths.includes("."));
|
|
140636
|
-
if (!rootSubproject) return "No root project found";
|
|
140637
|
-
try {
|
|
140638
|
-
return await this.otherModulesCommunicator.getPackageSpecifier(
|
|
140639
|
-
rootSubproject.packageManagerName,
|
|
140640
|
-
rootSubproject.subprojectPath
|
|
140641
|
-
) ?? "No project specifier found";
|
|
140642
|
-
} catch (e) {
|
|
140643
|
-
return "No project specifier found";
|
|
140644
|
-
}
|
|
140645
|
-
}
|
|
140646
140628
|
getSubproject(ecosystem, subprojectPath) {
|
|
140647
140629
|
const manager = this.ecosystemToEcosystemManager[ecosystem];
|
|
140648
140630
|
if (!manager) throw new Error(`Project manager was not created for the ${ecosystem} ecosystem`);
|
|
@@ -207934,7 +207916,7 @@ var require_version = __commonJS({
|
|
|
207934
207916
|
"use strict";
|
|
207935
207917
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
207936
207918
|
exports2.version = void 0;
|
|
207937
|
-
exports2.version = "14.5.
|
|
207919
|
+
exports2.version = "14.5.2";
|
|
207938
207920
|
}
|
|
207939
207921
|
});
|
|
207940
207922
|
|
|
@@ -208175,9 +208157,9 @@ var require_cli_core = __commonJS({
|
|
|
208175
208157
|
const allVulnerabilities = workspacesOutput.flatMap(({ vulnerabilities }) => vulnerabilities);
|
|
208176
208158
|
this.spinner.stop();
|
|
208177
208159
|
const report = {
|
|
208178
|
-
reportType: "
|
|
208160
|
+
reportType: "v8",
|
|
208179
208161
|
vulnerabilities: allVulnerabilities,
|
|
208180
|
-
...await this.createMetadataForReport(
|
|
208162
|
+
...await this.createMetadataForReport(startTime)
|
|
208181
208163
|
};
|
|
208182
208164
|
return report;
|
|
208183
208165
|
}
|
|
@@ -208217,17 +208199,12 @@ var require_cli_core = __commonJS({
|
|
|
208217
208199
|
} catch (e) {
|
|
208218
208200
|
}
|
|
208219
208201
|
}
|
|
208220
|
-
async createMetadataForReport(
|
|
208202
|
+
async createMetadataForReport(startTime) {
|
|
208221
208203
|
const metadata = {
|
|
208222
208204
|
workingDirectory: this.rootWorkingDirectory,
|
|
208223
|
-
packageSpecifier: "",
|
|
208224
208205
|
startTime,
|
|
208225
208206
|
endTime: (/* @__PURE__ */ new Date()).toISOString()
|
|
208226
208207
|
};
|
|
208227
|
-
const packageSpecifier = await manager.getProjectSpecifier();
|
|
208228
|
-
if (packageSpecifier) {
|
|
208229
|
-
metadata.packageSpecifier = packageSpecifier;
|
|
208230
|
-
}
|
|
208231
208208
|
return { ...metadata, cliExecutionTimeMS: new Date(metadata.endTime).valueOf() - new Date(startTime).valueOf() };
|
|
208232
208209
|
}
|
|
208233
208210
|
async runOnProvider(providerProject) {
|