@azure-tools/typespec-ts 0.57.0-dev.8 → 0.57.0-dev.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-ts",
|
|
3
|
-
"version": "0.57.0-dev.
|
|
3
|
+
"version": "0.57.0-dev.9",
|
|
4
4
|
"description": "A TypeSpec emitter for TypeScript",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"@microsoft/api-extractor": "^7.58.1",
|
|
40
40
|
"@types/pluralize": "^0.0.33",
|
|
41
41
|
"yaml": "^2.8.3",
|
|
42
|
-
"@
|
|
42
|
+
"@azure-tools/spector-runner": "^0.1.0",
|
|
43
43
|
"@typespec/spec-api": "^0.1.0-alpha.16",
|
|
44
|
-
"@typespec/
|
|
44
|
+
"@typespec/http-specs": "^0.1.0-alpha.41",
|
|
45
45
|
"@typespec/spector": "^0.1.0-alpha.28",
|
|
46
|
-
"@
|
|
46
|
+
"@typespec/tspd": "^0.77.0",
|
|
47
47
|
"@typespec/compiler": "^1.15.0",
|
|
48
48
|
"@typespec/http": "^1.15.0",
|
|
49
49
|
"@typespec/openapi": "^1.15.0",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"@azure-tools/typespec-client-generator-core": "^0.71.2 || >= 0.72.0-dev.4",
|
|
57
57
|
"@typespec/compiler": "^1.15.0",
|
|
58
58
|
"@typespec/http": "^1.15.0",
|
|
59
|
-
"@typespec/
|
|
59
|
+
"@typespec/xml": "^0.85.0",
|
|
60
60
|
"@typespec/versioning": "^0.85.0",
|
|
61
|
-
"@typespec/
|
|
61
|
+
"@typespec/rest": "^0.85.0"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"fast-xml-parser": "^5.10.1",
|
|
@@ -55,14 +55,15 @@ type StorageCompatResult<TBody, THeaders> = TBody extends undefined | void | nul
|
|
|
55
55
|
* @param rawResponse - The raw FullOperationResponse from the HTTP pipeline.
|
|
56
56
|
* @param parsedBody - The deserialized response body.
|
|
57
57
|
* @param parsedHeaders - The deserialized response headers.
|
|
58
|
-
* @returns
|
|
58
|
+
* @returns A flattened copy of the body and headers augmented with a `_response` property.
|
|
59
59
|
*/
|
|
60
60
|
export function addStorageCompatResponse<TBody, THeaders = Record<string, unknown>>(
|
|
61
61
|
rawResponse: FullOperationResponse,
|
|
62
62
|
parsedBody: TBody,
|
|
63
63
|
parsedHeaders: THeaders,
|
|
64
64
|
): StorageCompatResult<TBody, THeaders> {
|
|
65
|
-
const base =
|
|
65
|
+
const base =
|
|
66
|
+
parsedBody !== undefined && parsedBody !== null ? Object.assign({}, parsedBody) : ({} as TBody);
|
|
66
67
|
return Object.assign(base as any, parsedHeaders, {
|
|
67
68
|
_response: {
|
|
68
69
|
rawResponse,
|