@postman-enricher/core 1.2.4 → 1.2.5
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 +5 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -25,10 +25,6 @@ export function enrichCollection(collection, config = {}, existingCollectionPath
|
|
|
25
25
|
// Load config from YAML file if string path provided
|
|
26
26
|
const enrichmentConfig = typeof config === 'string' ? loadConfigFromYaml(config) : config;
|
|
27
27
|
let enriched = { ...collection };
|
|
28
|
-
// 0. Preserve IDs from existing collection (if provided)
|
|
29
|
-
if (existingCollectionPath) {
|
|
30
|
-
enriched = preserveIds(enriched, existingCollectionPath);
|
|
31
|
-
}
|
|
32
28
|
// 1. Filter endpoints first (reduce what we're working with)
|
|
33
29
|
if (enrichmentConfig.filter) {
|
|
34
30
|
enriched = filterEndpoints(enriched, enrichmentConfig.filter);
|
|
@@ -57,6 +53,11 @@ export function enrichCollection(collection, config = {}, existingCollectionPath
|
|
|
57
53
|
if (enrichmentConfig.tests) {
|
|
58
54
|
enriched = addTests(enriched, enrichmentConfig.tests);
|
|
59
55
|
}
|
|
56
|
+
// 8. Preserve IDs from existing collection (if provided) - run LAST
|
|
57
|
+
// This must run after all enrichers so it can match the final folder structure
|
|
58
|
+
if (existingCollectionPath) {
|
|
59
|
+
enriched = preserveIds(enriched, existingCollectionPath);
|
|
60
|
+
}
|
|
60
61
|
return enriched;
|
|
61
62
|
}
|
|
62
63
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postman-enricher/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Core enrichment logic for Postman Enricher",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"openapi-to-postmanv2": "^5.5.0",
|
|
19
19
|
"yaml": "^2.8.1",
|
|
20
|
-
"@postman-enricher/shared": "1.2.
|
|
20
|
+
"@postman-enricher/shared": "1.2.5"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@anolilab/semantic-release-pnpm": "^3.0.0",
|