atmn 0.0.30 → 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 CHANGED
@@ -28,7 +28,7 @@ var prettier__default = /*#__PURE__*/_interopDefault(prettier);
28
28
  var path__default = /*#__PURE__*/_interopDefault(path);
29
29
  var createJiti__default = /*#__PURE__*/_interopDefault(createJiti);
30
30
 
31
- // ../node_modules/.pnpm/tsup@8.5.0_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_typescript@5.9.2_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js
31
+ // ../node_modules/.pnpm/tsup@8.5.0_@swc+core@1.15.5_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_typescript@5.9.2_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js
32
32
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
33
33
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
34
34
  var notNullish = (value) => value !== null && value !== void 0;
@@ -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,
@@ -1181,7 +1183,7 @@ async function checkProductForConfirmation({
1181
1183
  };
1182
1184
  }
1183
1185
  const res1 = await externalRequest({
1184
- method: "GET",
1186
+ method: "POST",
1185
1187
  path: `/products/${product.id}/has_customers`,
1186
1188
  data: product
1187
1189
  });
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,
@@ -1164,7 +1166,7 @@ async function checkProductForConfirmation({
1164
1166
  };
1165
1167
  }
1166
1168
  const res1 = await externalRequest({
1167
- method: "GET",
1169
+ method: "POST",
1168
1170
  path: `/products/${product.id}/has_customers`,
1169
1171
  data: product
1170
1172
  });