@azure/data-tables 13.0.2-alpha.20220211.1 → 13.1.0-alpha.20220218.1
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 +7 -1
- package/dist/index.js +176 -247
- package/dist/index.js.map +1 -1
- package/dist-esm/src/TableClient.js +71 -138
- package/dist-esm/src/TableClient.js.map +1 -1
- package/dist-esm/src/TableServiceClient.js +37 -78
- package/dist-esm/src/TableServiceClient.js.map +1 -1
- package/dist-esm/src/TableTransaction.js +11 -23
- package/dist-esm/src/TableTransaction.js.map +1 -1
- package/dist-esm/src/generated/generatedClientContext.js +1 -1
- package/dist-esm/src/generated/generatedClientContext.js.map +1 -1
- package/dist-esm/src/secondaryEndpointPolicy.js +46 -0
- package/dist-esm/src/secondaryEndpointPolicy.js.map +1 -0
- package/dist-esm/src/utils/connectionString.js.map +1 -1
- package/dist-esm/src/utils/errorHelpers.js +1 -3
- package/dist-esm/src/utils/errorHelpers.js.map +1 -1
- package/dist-esm/src/utils/tracing.js +5 -4
- package/dist-esm/src/utils/tracing.js.map +1 -1
- package/package.json +7 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHelpers.js","sourceRoot":"","sources":["../../../src/utils/errorHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
1
|
+
{"version":3,"file":"errorHelpers.js","sourceRoot":"","sources":["../../../src/utils/errorHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsBlC,MAAM,UAAU,wBAAwB,CACtC,KAAc,EACd,UAA2E,EAAE;;IAE7E,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC9C,IACE,aAAa;QACb,aAAa,CAAC,MAAM,KAAK,GAAG;QAC5B,CAAA,MAAA,aAAa,CAAC,UAAU,CAAC,UAAU,0CAAE,IAAI,MAAK,oBAAoB,EAClE;QACA,MAAA,OAAO,CAAC,MAAM,0CAAE,IAAI,CAAC,SAAS,OAAO,CAAC,SAAS,iBAAiB,CAAC,CAAC;QAElE,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;SACvC;KACF;SAAM;QACL,MAAM,KAAK,CAAC;KACb;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;QACvB,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,aAAa,GAA8B,KAAK,CAAC,QAAqC,CAAC;IAE7F,IAAI,CAAC,aAAa,IAAI,CAAC,2BAA2B,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE;QAC5E,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAQ,KAAmB,CAAC,IAAI,KAAK,WAAW,CAAC;AACnD,CAAC;AAED,SAAS,2BAA2B,CAClC,iBAAsB;IAEtB,OAAO,OAAO,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,UAAU,CAAC,CAAC;AAChD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions, OperationRequest } from \"@azure/core-client\";\nimport { PipelineResponse, RestError } from \"@azure/core-rest-pipeline\";\nimport { AzureLogger } from \"@azure/logger\";\nimport { TableServiceError } from \"../generated\";\n\nexport type TableServiceErrorResponse = PipelineResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders?: Record<string, unknown>;\n /**\n * The response body as parsed JSON or XML.\n */\n parsedBody: TableServiceError;\n /**\n * The request that generated the response.\n */\n request: OperationRequest;\n};\n\nexport function handleTableAlreadyExists(\n error: unknown,\n options: OperationOptions & { tableName?: string; logger?: AzureLogger } = {}\n): void {\n const responseError = getErrorResponse(error);\n if (\n responseError &&\n responseError.status === 409 &&\n responseError.parsedBody.odataError?.code === \"TableAlreadyExists\"\n ) {\n options.logger?.info(`Table ${options.tableName} already Exists`);\n\n if (options.onResponse) {\n options.onResponse(responseError, {});\n }\n } else {\n throw error;\n }\n}\n\nfunction getErrorResponse(error: unknown): TableServiceErrorResponse | undefined {\n if (!isRestError(error)) {\n return undefined;\n }\n\n const errorResponse: TableServiceErrorResponse = error.response as TableServiceErrorResponse;\n\n if (!errorResponse || !isTableServiceErrorResponse(errorResponse.parsedBody)) {\n return undefined;\n }\n\n return errorResponse;\n}\n\nfunction isRestError(error: unknown): error is RestError {\n return (error as RestError).name === \"RestError\";\n}\n\nfunction isTableServiceErrorResponse(\n errorResponseBody: any\n): errorResponseBody is TableServiceError {\n return Boolean(errorResponseBody?.odataError);\n}\n"]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
import {
|
|
3
|
+
import { createTracingClient } from "@azure/core-tracing";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* A tracing client that can be used to manage spans.
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export const
|
|
9
|
-
packagePrefix: "Azure.Data.Tables",
|
|
8
|
+
export const tracingClient = createTracingClient({
|
|
10
9
|
namespace: "Microsoft.Data.Tables",
|
|
10
|
+
packageName: "@azure/data-tables",
|
|
11
|
+
packageVersion: "13.1.0",
|
|
11
12
|
});
|
|
12
13
|
//# sourceMappingURL=tracing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../src/utils/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../src/utils/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,uBAAuB;IAClC,WAAW,EAAE,oBAAoB;IACjC,cAAc,EAAE,QAAQ;CACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\n/**\n * A tracing client that can be used to manage spans.\n * @internal\n */\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Data.Tables\",\n packageName: \"@azure/data-tables\",\n packageVersion: \"13.1.0\",\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/data-tables",
|
|
3
|
-
"version": "13.0
|
|
3
|
+
"version": "13.1.0-alpha.20220218.1",
|
|
4
4
|
"description": "An isomorphic client library for the Azure Tables service.",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
38
38
|
"generate:client": "autorest --typescript ./swagger/README.md",
|
|
39
39
|
"integration-test:browser": "dev-tool run test:browser",
|
|
40
|
-
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
|
|
40
|
+
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 --exclude 'dist-esm/test/**/browser/*.spec.js' 'dist-esm/test/**/*.spec.js'",
|
|
41
41
|
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
|
42
42
|
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
|
|
43
43
|
"lint": "eslint package.json api-extractor.json src test --ext .ts",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@azure/core-paging": "^1.1.1",
|
|
82
82
|
"@azure/core-xml": "^1.0.0",
|
|
83
83
|
"@azure/logger": "^1.0.0",
|
|
84
|
-
"@azure/core-tracing": "1.0.0-preview.
|
|
84
|
+
"@azure/core-tracing": "1.0.0-preview.14",
|
|
85
85
|
"tslib": "^2.2.0",
|
|
86
86
|
"uuid": "^8.3.0"
|
|
87
87
|
},
|
|
@@ -144,6 +144,10 @@
|
|
|
144
144
|
{
|
|
145
145
|
"path": "swagger/README.md",
|
|
146
146
|
"prefix": "package-version"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"path": "src/utils/tracing.ts",
|
|
150
|
+
"prefix": "packageVersion"
|
|
147
151
|
}
|
|
148
152
|
]
|
|
149
153
|
}
|