@cfworker/cosmos 1.10.2 → 1.11.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/dist/client.d.ts +3 -1
- package/dist/response.d.ts +2 -1
- package/dist/retry.d.ts +1 -0
- package/dist/session.d.ts +1 -0
- package/dist/signer.d.ts +1 -0
- package/package.json +8 -8
- package/src/client.ts +1 -5
- package/tsconfig.json +7 -2
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="@cloudflare/workers-types" />
|
|
2
|
+
/// <reference types="@cfworker/worker-types" />
|
|
1
3
|
import { FeedResponse, ItemResponse } from './response.js';
|
|
2
4
|
import { RetryPolicy } from './retry.js';
|
|
3
5
|
import { SessionContainer } from './session.js';
|
|
@@ -45,7 +47,7 @@ export declare class CosmosClient {
|
|
|
45
47
|
private fetch;
|
|
46
48
|
private setHeaders;
|
|
47
49
|
}
|
|
48
|
-
export declare type DocumentInit = BufferSource | ReadableStream
|
|
50
|
+
export declare type DocumentInit = BufferSource | ReadableStream | string | Resource;
|
|
49
51
|
interface CommonArgs {
|
|
50
52
|
activityId?: string;
|
|
51
53
|
consistencyLevel?: ConsistencyLevel;
|
package/dist/response.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
/// <reference types="@cloudflare/workers-types" />
|
|
1
2
|
import { PersistedResource } from './types.js';
|
|
2
3
|
export declare abstract class CosmosResponse {
|
|
3
4
|
protected readonly response: Response;
|
|
4
5
|
constructor(response: Response);
|
|
5
6
|
get status(): number;
|
|
6
7
|
get headers(): Headers;
|
|
7
|
-
get body(): ReadableStream
|
|
8
|
+
get body(): ReadableStream | null;
|
|
8
9
|
get activityId(): string | null;
|
|
9
10
|
get etag(): string;
|
|
10
11
|
get requestCharge(): number;
|
package/dist/retry.d.ts
CHANGED
package/dist/session.d.ts
CHANGED
package/dist/signer.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfworker/cosmos",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "Azure Cosmos DB client for Cloudflare Workers and service workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"azure",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"test": "cfworker test test/**/*.spec.ts"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@cfworker/worker-types": "^1.
|
|
41
|
-
"@cloudflare/workers-types": "^2.
|
|
42
|
-
"base64-arraybuffer": "^0.
|
|
40
|
+
"@cfworker/worker-types": "^1.11.0",
|
|
41
|
+
"@cloudflare/workers-types": "^3.2.0",
|
|
42
|
+
"base64-arraybuffer": "^1.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@cfworker/dev": "^1.
|
|
46
|
-
"@types/chai": "^4.2.
|
|
47
|
-
"@types/mocha": "^
|
|
45
|
+
"@cfworker/dev": "^1.11.0",
|
|
46
|
+
"@types/chai": "^4.2.22",
|
|
47
|
+
"@types/mocha": "^9.0.0",
|
|
48
48
|
"chai": "^4.3.4",
|
|
49
|
-
"mocha": "^
|
|
49
|
+
"mocha": "^9.1.3",
|
|
50
50
|
"typescript": "^4.5.2"
|
|
51
51
|
}
|
|
52
52
|
}
|
package/src/client.ts
CHANGED
|
@@ -404,11 +404,7 @@ export class CosmosClient {
|
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
-
export type DocumentInit =
|
|
408
|
-
| BufferSource
|
|
409
|
-
| ReadableStream<Uint8Array>
|
|
410
|
-
| string
|
|
411
|
-
| Resource;
|
|
407
|
+
export type DocumentInit = BufferSource | ReadableStream | string | Resource;
|
|
412
408
|
|
|
413
409
|
function toBodyInit(obj: DocumentInit): BodyInit {
|
|
414
410
|
if (
|
package/tsconfig.json
CHANGED
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
"extends": "../../tsconfig-base",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"target": "ES2021",
|
|
5
|
-
"lib": ["esnext"
|
|
6
|
-
"types": [
|
|
5
|
+
"lib": ["esnext"],
|
|
6
|
+
"types": [
|
|
7
|
+
"chai",
|
|
8
|
+
"mocha",
|
|
9
|
+
"@cfworker/worker-types",
|
|
10
|
+
"@cloudflare/workers-types"
|
|
11
|
+
],
|
|
7
12
|
"outDir": "dist",
|
|
8
13
|
"rootDir": "./src"
|
|
9
14
|
},
|