@ductape/sdk 0.1.115 → 0.1.117
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/cloud/cloud.service.js +5 -1
- package/dist/cloud/cloud.service.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +26 -5
- package/dist/index.js.map +1 -1
- package/dist/products/services/products.service.js +14 -1
- package/dist/products/services/products.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1556,6 +1556,12 @@ class ProductsBuilderService {
|
|
|
1556
1556
|
console.log(`${logPrefix} All product environments have broker configs`);
|
|
1557
1557
|
console.log(`${logPrefix} Sending create request to API...`);
|
|
1558
1558
|
await this.productApi.updateProduct(this.product_id, Object.assign(Object.assign({}, data), { component: enums_1.ProductComponents.MESSAGEBROKER, action: enums_1.RequestAction.CREATE }), this.getUserAccess());
|
|
1559
|
+
// brokerCache may have cached a `null` (not-found) result for this tag from an
|
|
1560
|
+
// earlier lookup on this same builder instance (proxy caches builder instances
|
|
1561
|
+
// per workspace, so this instance can outlive a single request). Without this,
|
|
1562
|
+
// every subsequent fetchMessageBroker(tag) call — including events topics
|
|
1563
|
+
// list/get/create — keeps returning the stale not-found result forever.
|
|
1564
|
+
await this.refreshProductState();
|
|
1559
1565
|
console.log(`${logPrefix} Message broker ${data.tag} created successfully`);
|
|
1560
1566
|
}
|
|
1561
1567
|
else {
|
|
@@ -1664,6 +1670,10 @@ class ProductsBuilderService {
|
|
|
1664
1670
|
console.log(`${logPrefix} Final env breakdown - Unchanged: ${unchanged.length}, Overwrite: ${overwrite.length}, New: ${newEnvs.length}`);
|
|
1665
1671
|
console.log(`${logPrefix} Sending update request to API...`);
|
|
1666
1672
|
await this.productApi.updateProduct(this.product_id, Object.assign(Object.assign(Object.assign({ _id }, messageBroker), data), { component: enums_1.ProductComponents.MESSAGEBROKER, action: enums_1.RequestAction.UPDATE }), this.getUserAccess());
|
|
1673
|
+
// See the matching comment in createMessageBroker: without this, a stale cached
|
|
1674
|
+
// entry (under either the old or new tag) survives the update indefinitely on a
|
|
1675
|
+
// proxy-cached builder instance.
|
|
1676
|
+
await this.refreshProductState();
|
|
1667
1677
|
console.log(`${logPrefix} Message broker ${tag} updated successfully`);
|
|
1668
1678
|
}
|
|
1669
1679
|
catch (e) {
|
|
@@ -1715,6 +1725,9 @@ class ProductsBuilderService {
|
|
|
1715
1725
|
component: enums_1.ProductComponents.MESSAGEBROKER,
|
|
1716
1726
|
action: enums_1.RequestAction.DELETE,
|
|
1717
1727
|
}, this.getUserAccess());
|
|
1728
|
+
// See the matching comment in createMessageBroker: without this, a stale cached
|
|
1729
|
+
// "found" entry survives the delete indefinitely on a proxy-cached builder instance.
|
|
1730
|
+
await this.refreshProductState();
|
|
1718
1731
|
}
|
|
1719
1732
|
catch (e) {
|
|
1720
1733
|
throw e;
|
|
@@ -1787,7 +1800,7 @@ class ProductsBuilderService {
|
|
|
1787
1800
|
}
|
|
1788
1801
|
else {
|
|
1789
1802
|
if (throwErrorIfExists)
|
|
1790
|
-
throw new Error(`
|
|
1803
|
+
throw new Error(`Storage ${data.tag} already exists`);
|
|
1791
1804
|
}
|
|
1792
1805
|
}
|
|
1793
1806
|
async updateStorage(tag, data) {
|