@azure/core-client 1.4.1-alpha.20220110.3 → 1.5.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 +2 -4
- package/dist/index.js +396 -378
- package/dist/index.js.map +1 -1
- package/dist-esm/src/authorizeRequestOnClaimChallenge.js.map +1 -1
- package/dist-esm/src/deserializationPolicy.js +1 -1
- package/dist-esm/src/deserializationPolicy.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/interfaceHelpers.js.map +1 -1
- package/dist-esm/src/interfaces.js.map +1 -1
- package/dist-esm/src/operationHelpers.js.map +1 -1
- package/dist-esm/src/pipeline.js +1 -1
- package/dist-esm/src/pipeline.js.map +1 -1
- package/dist-esm/src/serializationPolicy.js +2 -2
- package/dist-esm/src/serializationPolicy.js.map +1 -1
- package/dist-esm/src/serializer.js +2 -2
- package/dist-esm/src/serializer.js.map +1 -1
- package/dist-esm/src/serviceClient.js +14 -3
- package/dist-esm/src/serviceClient.js.map +1 -1
- package/dist-esm/src/urlHelpers.js +9 -1
- package/dist-esm/src/urlHelpers.js.map +1 -1
- package/package.json +8 -9
- package/types/3.1/core-client.d.ts +20 -0
- package/types/latest/core-client.d.ts +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/core-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Core library for interfacing with AutoRest generated code",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
|
|
24
24
|
"build:samples": "echo Obsolete",
|
|
25
|
-
"build:test": "tsc -p . &&
|
|
25
|
+
"build:test": "tsc -p . && dev-tool run bundle",
|
|
26
26
|
"build:types": "downlevel-dts types/latest/ types/3.1/",
|
|
27
|
-
"build": "npm run clean && tsc -p . &&
|
|
27
|
+
"build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local && npm run build:types",
|
|
28
28
|
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
|
|
29
29
|
"clean": "rimraf dist dist-* temp types *.tgz *.log",
|
|
30
30
|
"execute:samples": "echo skipped",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"pack": "npm pack 2>&1",
|
|
39
39
|
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
|
|
40
40
|
"test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node",
|
|
41
|
-
"test": "npm run clean && tsc -p . && npm run unit-test:node &&
|
|
41
|
+
"test": "npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test",
|
|
42
42
|
"unit-test:browser": "karma start --single-run",
|
|
43
43
|
"unit-test:node": "cross-env TS_NODE_FILES=true mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 50000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
|
|
44
44
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@azure/abort-controller": "^1.0.0",
|
|
72
72
|
"@azure/core-asynciterator-polyfill": "^1.0.0",
|
|
73
73
|
"@azure/core-auth": "^1.3.0",
|
|
74
|
-
"@azure/core-rest-pipeline": "^1.
|
|
74
|
+
"@azure/core-rest-pipeline": "^1.5.0",
|
|
75
75
|
"@azure/core-tracing": "1.0.0-preview.13",
|
|
76
76
|
"@azure/logger": "^1.0.0",
|
|
77
77
|
"tslib": "^2.2.0"
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"@types/mocha": "^7.0.2",
|
|
84
84
|
"@types/node": "^12.0.0",
|
|
85
85
|
"@types/sinon": "^9.0.4",
|
|
86
|
-
"@azure/eslint-plugin-azure-sdk": "
|
|
87
|
-
"@azure/dev-tool": "
|
|
86
|
+
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
|
87
|
+
"@azure/dev-tool": "^1.0.0",
|
|
88
88
|
"chai": "^4.2.0",
|
|
89
|
-
"downlevel-dts": "
|
|
89
|
+
"downlevel-dts": "^0.8.0",
|
|
90
90
|
"cross-env": "^7.0.2",
|
|
91
91
|
"eslint": "^7.15.0",
|
|
92
92
|
"inherits": "^2.0.3",
|
|
@@ -105,7 +105,6 @@
|
|
|
105
105
|
"mocha-junit-reporter": "^2.0.0",
|
|
106
106
|
"prettier": "^2.5.1",
|
|
107
107
|
"rimraf": "^3.0.0",
|
|
108
|
-
"rollup": "^1.16.3",
|
|
109
108
|
"sinon": "^9.0.2",
|
|
110
109
|
"ts-node": "^10.0.0",
|
|
111
110
|
"typescript": "~4.2.0",
|
|
@@ -11,6 +11,22 @@ import { PipelineRequest } from '@azure/core-rest-pipeline';
|
|
|
11
11
|
import { PipelineResponse } from '@azure/core-rest-pipeline';
|
|
12
12
|
import { TokenCredential } from '@azure/core-auth';
|
|
13
13
|
import { TransferProgressEvent } from '@azure/core-rest-pipeline';
|
|
14
|
+
/**
|
|
15
|
+
* Used to configure additional policies added to the pipeline at construction.
|
|
16
|
+
*/
|
|
17
|
+
export declare interface AdditionalPolicyConfig {
|
|
18
|
+
/**
|
|
19
|
+
* A policy to be added.
|
|
20
|
+
*/
|
|
21
|
+
policy: PipelinePolicy;
|
|
22
|
+
/**
|
|
23
|
+
* Determines if this policy be applied before or after retry logic.
|
|
24
|
+
* Only use `perRetry` if you need to modify the request again
|
|
25
|
+
* each time the operation is retried due to retryable service
|
|
26
|
+
* issues.
|
|
27
|
+
*/
|
|
28
|
+
position: "perCall" | "perRetry";
|
|
29
|
+
}
|
|
14
30
|
/**
|
|
15
31
|
* This function can be used as a callback for the `bearerTokenAuthenticationPolicy` of `@azure/core-rest-pipeline`, to support CAE challenges:
|
|
16
32
|
* [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation).
|
|
@@ -111,6 +127,10 @@ export declare interface CommonClientOptions extends PipelineOptions {
|
|
|
111
127
|
* Set to true if the request is sent over HTTP instead of HTTPS
|
|
112
128
|
*/
|
|
113
129
|
allowInsecureConnection?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Additional policies to include in the HTTP pipeline.
|
|
132
|
+
*/
|
|
133
|
+
additionalPolicies?: AdditionalPolicyConfig[];
|
|
114
134
|
}
|
|
115
135
|
/**
|
|
116
136
|
* A mapper composed of other mappers.
|
|
@@ -12,6 +12,23 @@ import { PipelineResponse } from '@azure/core-rest-pipeline';
|
|
|
12
12
|
import { TokenCredential } from '@azure/core-auth';
|
|
13
13
|
import { TransferProgressEvent } from '@azure/core-rest-pipeline';
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Used to configure additional policies added to the pipeline at construction.
|
|
17
|
+
*/
|
|
18
|
+
export declare interface AdditionalPolicyConfig {
|
|
19
|
+
/**
|
|
20
|
+
* A policy to be added.
|
|
21
|
+
*/
|
|
22
|
+
policy: PipelinePolicy;
|
|
23
|
+
/**
|
|
24
|
+
* Determines if this policy be applied before or after retry logic.
|
|
25
|
+
* Only use `perRetry` if you need to modify the request again
|
|
26
|
+
* each time the operation is retried due to retryable service
|
|
27
|
+
* issues.
|
|
28
|
+
*/
|
|
29
|
+
position: "perCall" | "perRetry";
|
|
30
|
+
}
|
|
31
|
+
|
|
15
32
|
/**
|
|
16
33
|
* This function can be used as a callback for the `bearerTokenAuthenticationPolicy` of `@azure/core-rest-pipeline`, to support CAE challenges:
|
|
17
34
|
* [Continuous Access Evaluation](https://docs.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation).
|
|
@@ -114,6 +131,10 @@ export declare interface CommonClientOptions extends PipelineOptions {
|
|
|
114
131
|
* Set to true if the request is sent over HTTP instead of HTTPS
|
|
115
132
|
*/
|
|
116
133
|
allowInsecureConnection?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Additional policies to include in the HTTP pipeline.
|
|
136
|
+
*/
|
|
137
|
+
additionalPolicies?: AdditionalPolicyConfig[];
|
|
117
138
|
}
|
|
118
139
|
|
|
119
140
|
/**
|