@firestartr/cli 1.59.0-snapshot-6 → 1.59.0-snapshot-7
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/build/index.js +8 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -367344,6 +367344,7 @@ async function reimportGithubGitopsRepository(org, crsPath, configPath, generate
|
|
|
367344
367344
|
const reImportAnnotation = catalog_common.generic.getFirestartrAnnotation('needs-re-import');
|
|
367345
367345
|
// we need to perform a search in all the crsPath
|
|
367346
367346
|
await searchCRs(crsPath, async (cr, filePath) => {
|
|
367347
|
+
importer_src_logger.debug(`${JSON.stringify(cr)}`);
|
|
367347
367348
|
// lets filter the cr with the generated filters, if it passes we annotate it with needs-re-import
|
|
367348
367349
|
if (await collection.isCrIncluded(cr, generatedFilters)) {
|
|
367349
367350
|
importer_src_logger.info(`Annotating ${cr.kind}/${cr.metadata.name} with ${reImportAnnotation} and ${importAnnotation}`);
|
|
@@ -367363,10 +367364,16 @@ async function searchCRs(dirname, functionToApply) {
|
|
|
367363
367364
|
const files = await promises_default().readdir(dirname);
|
|
367364
367365
|
for (const file of files) {
|
|
367365
367366
|
if (file.endsWith('.yaml') || file.endsWith('.yml')) {
|
|
367367
|
+
importer_src_logger.debug(`Processing file: ${file}`);
|
|
367366
367368
|
const filePath = external_path_default().join(dirname, file);
|
|
367367
367369
|
const content = await promises_default().readFile(filePath, 'utf-8');
|
|
367368
367370
|
// let's use the catalog_common yaml loader
|
|
367369
367371
|
const cr = catalog_common.io.fromYaml(content);
|
|
367372
|
+
// let's check if the file is a valid file (i.e a CR)
|
|
367373
|
+
if (!('kind' in cr) || !('metadata' in cr) || !('name' in cr.metadata)) {
|
|
367374
|
+
importer_src_logger.debug(`File ${filePath} is not a valid CR, skipping...`);
|
|
367375
|
+
continue;
|
|
367376
|
+
}
|
|
367370
367377
|
await functionToApply(cr, filePath);
|
|
367371
367378
|
}
|
|
367372
367379
|
else if (await reimporter_isDirectory(external_path_default().join(dirname, file))) {
|
|
@@ -378464,7 +378471,7 @@ const crs_analyzerSubcommand = {
|
|
|
378464
378471
|
};
|
|
378465
378472
|
|
|
378466
378473
|
;// CONCATENATED MODULE: ./package.json
|
|
378467
|
-
const package_namespaceObject = JSON.parse('{"i8":"1.59.0-snapshot-
|
|
378474
|
+
const package_namespaceObject = JSON.parse('{"i8":"1.59.0-snapshot-7"}');
|
|
378468
378475
|
;// CONCATENATED MODULE: ../../package.json
|
|
378469
378476
|
const package_namespaceObject_1 = {"i8":"1.58.0"};
|
|
378470
378477
|
;// CONCATENATED MODULE: ./src/subcommands/index.ts
|