@thatopen/services 0.34.3 → 0.34.4

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.js CHANGED
@@ -9164,7 +9164,21 @@ class EngineServicesClient {
9164
9164
  * by one".
9165
9165
  */
9166
9166
  async listDocumentDescriptors(projectId) {
9167
- return await this.#requestApi("GET", `${ITEM_PATH}/documents`, { query: { projectId } });
9167
+ const asked = this.#descriptorsAsked.get(projectId);
9168
+ if (asked) return await asked;
9169
+ const request = this.#listDocumentDescriptors(projectId);
9170
+ this.#descriptorsAsked.set(projectId, request);
9171
+ try {
9172
+ return await request;
9173
+ } finally {
9174
+ this.#descriptorsAsked.delete(projectId);
9175
+ }
9176
+ }
9177
+ #descriptorsAsked = /* @__PURE__ */ new Map();
9178
+ async #listDocumentDescriptors(projectId) {
9179
+ return await this.#requestApi("GET", `${ITEM_PATH}/documents`, {
9180
+ query: { projectId }
9181
+ });
9168
9182
  }
9169
9183
  async exportProjectDocuments(projectId, options) {
9170
9184
  if (options?.format === "csv") {