@azure/cosmos 4.0.0-alpha.20230911.3 → 4.0.0
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/CHANGELOG.md +1 -1
- package/dist/index.js +10 -18
- package/dist/index.js.map +1 -1
- package/dist-esm/src/client/ChangeFeed/ChangeFeedForEpkRange.d.ts.map +1 -1
- package/dist-esm/src/client/ChangeFeed/ChangeFeedForEpkRange.js +4 -8
- package/dist-esm/src/client/ChangeFeed/ChangeFeedForEpkRange.js.map +1 -1
- package/dist-esm/src/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist-esm/src/client/ChangeFeed/ChangeFeedForPartitionKey.js +7 -11
- package/dist-esm/src/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -6883,8 +6883,8 @@ class ChangeFeedForEpkRange {
|
|
|
6883
6883
|
: undefined;
|
|
6884
6884
|
this.isInstantiated = false;
|
|
6885
6885
|
}
|
|
6886
|
-
async setIteratorRid() {
|
|
6887
|
-
const { resource } = await this.container.
|
|
6886
|
+
async setIteratorRid(diagnosticNode) {
|
|
6887
|
+
const { resource } = await this.container.readInternal(diagnosticNode);
|
|
6888
6888
|
this.rId = resource._rid;
|
|
6889
6889
|
}
|
|
6890
6890
|
continuationTokenRidMatchContainerRid() {
|
|
@@ -6962,11 +6962,7 @@ class ChangeFeedForEpkRange {
|
|
|
6962
6962
|
return tslib.__asyncGenerator(this, arguments, function* getAsyncIterator_1() {
|
|
6963
6963
|
do {
|
|
6964
6964
|
const result = yield tslib.__await(this.readNext());
|
|
6965
|
-
|
|
6966
|
-
if ((result.count === 0 && result.statusCode === StatusCodes.NotModified) ||
|
|
6967
|
-
(result.count > 0 && result.statusCode === StatusCodes.Ok)) {
|
|
6968
|
-
yield yield tslib.__await(result);
|
|
6969
|
-
}
|
|
6965
|
+
yield yield tslib.__await(result);
|
|
6970
6966
|
} while (this.hasMoreResults);
|
|
6971
6967
|
});
|
|
6972
6968
|
}
|
|
@@ -6981,7 +6977,7 @@ class ChangeFeedForEpkRange {
|
|
|
6981
6977
|
return withDiagnostics(async (diagnosticNode) => {
|
|
6982
6978
|
// validate if the internal queue is filled up with feed ranges.
|
|
6983
6979
|
if (!this.isInstantiated) {
|
|
6984
|
-
await this.setIteratorRid();
|
|
6980
|
+
await this.setIteratorRid(diagnosticNode);
|
|
6985
6981
|
await this.fillChangeFeedQueue(diagnosticNode);
|
|
6986
6982
|
}
|
|
6987
6983
|
// stores the last feedRange for which statusCode is not 304 i.e. there were new changes in that feed range.
|
|
@@ -7194,8 +7190,8 @@ class ChangeFeedForPartitionKey {
|
|
|
7194
7190
|
this.startTime = changeFeedOptions.startTime.toUTCString();
|
|
7195
7191
|
}
|
|
7196
7192
|
}
|
|
7197
|
-
async instantiateIterator() {
|
|
7198
|
-
await this.setIteratorRid();
|
|
7193
|
+
async instantiateIterator(diagnosticNode) {
|
|
7194
|
+
await this.setIteratorRid(diagnosticNode);
|
|
7199
7195
|
if (this.continuationToken) {
|
|
7200
7196
|
if (!this.continuationTokenRidMatchContainerRid()) {
|
|
7201
7197
|
throw new ErrorResponse("The continuation is not for the current container definition.");
|
|
@@ -7212,8 +7208,8 @@ class ChangeFeedForPartitionKey {
|
|
|
7212
7208
|
}
|
|
7213
7209
|
return true;
|
|
7214
7210
|
}
|
|
7215
|
-
async setIteratorRid() {
|
|
7216
|
-
const { resource } = await this.container.
|
|
7211
|
+
async setIteratorRid(diagnosticNode) {
|
|
7212
|
+
const { resource } = await this.container.readInternal(diagnosticNode);
|
|
7217
7213
|
this.rId = resource._rid;
|
|
7218
7214
|
}
|
|
7219
7215
|
/**
|
|
@@ -7229,11 +7225,7 @@ class ChangeFeedForPartitionKey {
|
|
|
7229
7225
|
return tslib.__asyncGenerator(this, arguments, function* getAsyncIterator_1() {
|
|
7230
7226
|
do {
|
|
7231
7227
|
const result = yield tslib.__await(this.readNext());
|
|
7232
|
-
|
|
7233
|
-
if ((result.count === 0 && result.statusCode === StatusCodes.NotModified) ||
|
|
7234
|
-
(result.count > 0 && result.statusCode === StatusCodes.Ok)) {
|
|
7235
|
-
yield yield tslib.__await(result);
|
|
7236
|
-
}
|
|
7228
|
+
yield yield tslib.__await(result);
|
|
7237
7229
|
} while (this.hasMoreResults);
|
|
7238
7230
|
});
|
|
7239
7231
|
}
|
|
@@ -7243,7 +7235,7 @@ class ChangeFeedForPartitionKey {
|
|
|
7243
7235
|
async readNext() {
|
|
7244
7236
|
return withDiagnostics(async (diagnosticNode) => {
|
|
7245
7237
|
if (!this.isInstantiated) {
|
|
7246
|
-
await this.instantiateIterator();
|
|
7238
|
+
await this.instantiateIterator(diagnosticNode);
|
|
7247
7239
|
}
|
|
7248
7240
|
const result = await this.fetchNext(diagnosticNode);
|
|
7249
7241
|
return result;
|