digdesign 0.1.1 → 0.2.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 +8 -3
- package/package.json +1 -1
- package/dist/index 2.js +0 -2895
- package/dist/index 3.js +0 -2941
package/dist/index.js
CHANGED
|
@@ -158,7 +158,8 @@ function resolveUrl(nameOrUrl, registryUrl) {
|
|
|
158
158
|
async function fetchFromRegistry(url, subject) {
|
|
159
159
|
let response;
|
|
160
160
|
try {
|
|
161
|
-
|
|
161
|
+
const token = process.env.DIG_TOKEN;
|
|
162
|
+
response = token ? await fetch(url, { headers: { Authorization: `Bearer ${token}` } }) : await fetch(url);
|
|
162
163
|
} catch (cause) {
|
|
163
164
|
throw new DigError(
|
|
164
165
|
`\u0628\u0647 \u0631\u062C\u06CC\u0633\u062A\u0631\u06CC \u0648\u0635\u0644 \u0646\u0634\u062F\u0645: ${url}
|
|
@@ -1290,7 +1291,7 @@ async function scanRepositoryForComponent(params) {
|
|
|
1290
1291
|
}
|
|
1291
1292
|
|
|
1292
1293
|
// src/lib/intelligence-export.ts
|
|
1293
|
-
var INTELLIGENCE_EXPORT_SCHEMA_VERSION = "
|
|
1294
|
+
var INTELLIGENCE_EXPORT_SCHEMA_VERSION = "v3";
|
|
1294
1295
|
function buildIntelligenceExport(params) {
|
|
1295
1296
|
const { registryIndexItems, installedComponents } = params;
|
|
1296
1297
|
const healthReport = buildHealthReport({
|
|
@@ -1317,7 +1318,8 @@ function buildIntelligenceExport(params) {
|
|
|
1317
1318
|
migrationPending: governance.impact.requiredMigration,
|
|
1318
1319
|
dependencyImpact: governance.impact.affectedComponents.length,
|
|
1319
1320
|
changeType: governance.changeType,
|
|
1320
|
-
replacement: lifecycle.replacement
|
|
1321
|
+
replacement: lifecycle.replacement,
|
|
1322
|
+
affectedComponentNames: governance.impact.affectedComponents
|
|
1321
1323
|
};
|
|
1322
1324
|
});
|
|
1323
1325
|
return {
|
|
@@ -1372,6 +1374,9 @@ function validateIntelligenceExport(data) {
|
|
|
1372
1374
|
if (typeof entry.changeType !== "string") {
|
|
1373
1375
|
errors.push(`components[${index}].changeType \u0628\u0627\u06CC\u062F \u0631\u0634\u062A\u0647 \u0628\u0627\u0634\u062F.`);
|
|
1374
1376
|
}
|
|
1377
|
+
if (entry.affectedComponentNames !== void 0 && (!Array.isArray(entry.affectedComponentNames) || !entry.affectedComponentNames.every((name) => typeof name === "string"))) {
|
|
1378
|
+
errors.push(`components[${index}].affectedComponentNames \u0628\u0627\u06CC\u062F \u0622\u0631\u0627\u06CC\u0647\u200C\u0627\u06CC \u0627\u0632 \u0631\u0634\u062A\u0647 \u0628\u0627\u0634\u062F.`);
|
|
1379
|
+
}
|
|
1375
1380
|
});
|
|
1376
1381
|
}
|
|
1377
1382
|
return errors.length === 0 ? { valid: true } : { valid: false, errors };
|