@azure/core-rest-pipeline 1.22.1-alpha.20250711.2 → 1.22.1-alpha.20250716.3
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.
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.getHeaderName = getHeaderName;
|
|
6
6
|
exports.setPlatformSpecificData = setPlatformSpecificData;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const node_os_1 = tslib_1.__importDefault(require("node:os"));
|
|
9
|
+
const node_process_1 = tslib_1.__importDefault(require("node:process"));
|
|
10
10
|
/**
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
@@ -17,8 +17,8 @@ function getHeaderName() {
|
|
|
17
17
|
* @internal
|
|
18
18
|
*/
|
|
19
19
|
async function setPlatformSpecificData(map) {
|
|
20
|
-
if (
|
|
21
|
-
const versions =
|
|
20
|
+
if (node_process_1.default && node_process_1.default.versions) {
|
|
21
|
+
const versions = node_process_1.default.versions;
|
|
22
22
|
if (versions.bun) {
|
|
23
23
|
map.set("Bun", versions.bun);
|
|
24
24
|
}
|
|
@@ -29,6 +29,6 @@ async function setPlatformSpecificData(map) {
|
|
|
29
29
|
map.set("Node", versions.node);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
map.set("OS", `(${
|
|
32
|
+
map.set("OS", `(${node_os_1.default.arch()}-${node_os_1.default.type()}-${node_os_1.default.release()})`);
|
|
33
33
|
}
|
|
34
34
|
//# sourceMappingURL=userAgentPlatform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userAgentPlatform.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgBlC,sCAEC;AAKD,0DAaC;;AAlCD,
|
|
1
|
+
{"version":3,"file":"userAgentPlatform.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgBlC,sCAEC;AAKD,0DAaC;;AAlCD,8DAAyB;AACzB,wEAAmC;AAUnC;;GAEG;AACH,SAAgB,aAAa;IAC3B,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,uBAAuB,CAAC,GAAwB;IACpE,IAAI,sBAAO,IAAI,sBAAO,CAAC,QAAQ,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,sBAAO,CAAC,QAAoC,CAAC;QAC9D,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC;YACjB,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC;aAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;YACzB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;aAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;YACzB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,iBAAE,CAAC,IAAI,EAAE,IAAI,iBAAE,CAAC,IAAI,EAAE,IAAI,iBAAE,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport os from \"node:os\";\nimport process from \"node:process\";\n\n/**\n * @internal\n */\ninterface ExtendedPlatformVersions extends NodeJS.ProcessVersions {\n bun?: string;\n deno?: string;\n}\n\n/**\n * @internal\n */\nexport function getHeaderName(): string {\n return \"User-Agent\";\n}\n\n/**\n * @internal\n */\nexport async function setPlatformSpecificData(map: Map<string, string>): Promise<void> {\n if (process && process.versions) {\n const versions = process.versions as ExtendedPlatformVersions;\n if (versions.bun) {\n map.set(\"Bun\", versions.bun);\n } else if (versions.deno) {\n map.set(\"Deno\", versions.deno);\n } else if (versions.node) {\n map.set(\"Node\", versions.node);\n }\n }\n\n map.set(\"OS\", `(${os.arch()}-${os.type()}-${os.release()})`);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userAgentPlatform.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,
|
|
1
|
+
{"version":3,"file":"userAgentPlatform.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,OAAO,MAAM,cAAc,CAAC;AAUnC;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,GAAwB;IACpE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAoC,CAAC;QAC9D,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC;YACjB,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC;aAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;YACzB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;aAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;YACzB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport os from \"node:os\";\nimport process from \"node:process\";\n\n/**\n * @internal\n */\ninterface ExtendedPlatformVersions extends NodeJS.ProcessVersions {\n bun?: string;\n deno?: string;\n}\n\n/**\n * @internal\n */\nexport function getHeaderName(): string {\n return \"User-Agent\";\n}\n\n/**\n * @internal\n */\nexport async function setPlatformSpecificData(map: Map<string, string>): Promise<void> {\n if (process && process.versions) {\n const versions = process.versions as ExtendedPlatformVersions;\n if (versions.bun) {\n map.set(\"Bun\", versions.bun);\n } else if (versions.deno) {\n map.set(\"Deno\", versions.deno);\n } else if (versions.node) {\n map.set(\"Node\", versions.node);\n }\n }\n\n map.set(\"OS\", `(${os.arch()}-${os.type()}-${os.release()})`);\n}\n"]}
|
package/package.json
CHANGED