atmn 0.0.31 → 0.0.32
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/cli.cjs +4 -2
- package/dist/cli.js +4 -2
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1123,13 +1123,15 @@ async function checkForDeletables(currentFeatures, currentProducts) {
|
|
|
1123
1123
|
(feature) => feature.id === featureId && feature.archived
|
|
1124
1124
|
)
|
|
1125
1125
|
);
|
|
1126
|
-
const products = await getAllProducts();
|
|
1126
|
+
const products = await getAllProducts({ archived: true });
|
|
1127
1127
|
const productIds = products.map((product) => product.id);
|
|
1128
1128
|
const currentProductIds = currentProducts.map(
|
|
1129
1129
|
(product) => product.id
|
|
1130
1130
|
);
|
|
1131
1131
|
const productsToDelete = productIds.filter(
|
|
1132
|
-
(productId) => !currentProductIds.includes(productId)
|
|
1132
|
+
(productId) => !currentProductIds.includes(productId) && !products.some(
|
|
1133
|
+
(product) => product.id === productId && product.archived
|
|
1134
|
+
)
|
|
1133
1135
|
);
|
|
1134
1136
|
return {
|
|
1135
1137
|
allFeatures: features,
|
package/dist/cli.js
CHANGED
|
@@ -1106,13 +1106,15 @@ async function checkForDeletables(currentFeatures, currentProducts) {
|
|
|
1106
1106
|
(feature) => feature.id === featureId && feature.archived
|
|
1107
1107
|
)
|
|
1108
1108
|
);
|
|
1109
|
-
const products = await getAllProducts();
|
|
1109
|
+
const products = await getAllProducts({ archived: true });
|
|
1110
1110
|
const productIds = products.map((product) => product.id);
|
|
1111
1111
|
const currentProductIds = currentProducts.map(
|
|
1112
1112
|
(product) => product.id
|
|
1113
1113
|
);
|
|
1114
1114
|
const productsToDelete = productIds.filter(
|
|
1115
|
-
(productId) => !currentProductIds.includes(productId)
|
|
1115
|
+
(productId) => !currentProductIds.includes(productId) && !products.some(
|
|
1116
|
+
(product) => product.id === productId && product.archived
|
|
1117
|
+
)
|
|
1116
1118
|
);
|
|
1117
1119
|
return {
|
|
1118
1120
|
allFeatures: features,
|