@typespec/ts-http-runtime 1.0.0-alpha.20240611.3 → 1.0.0-alpha.20240614.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,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.46.2"
8
+ "packageVersion": "7.47.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"userAgentPlatform.d.ts","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAWtE"}
1
+ {"version":3,"file":"userAgentPlatform.d.ts","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAatE"}
@@ -17,15 +17,17 @@ exports.getHeaderName = getHeaderName;
17
17
  * @internal
18
18
  */
19
19
  function setPlatformSpecificData(map) {
20
- const versions = process.versions;
21
- if (versions.bun) {
22
- map.set("Bun", versions.bun);
23
- }
24
- else if (versions.deno) {
25
- map.set("Deno", versions.deno);
26
- }
27
- else if (versions.node) {
28
- map.set("Node", versions.node);
20
+ if (process && process.versions) {
21
+ const versions = process.versions;
22
+ if (versions.bun) {
23
+ map.set("Bun", versions.bun);
24
+ }
25
+ else if (versions.deno) {
26
+ map.set("Deno", versions.deno);
27
+ }
28
+ else if (versions.node) {
29
+ map.set("Node", versions.node);
30
+ }
29
31
  }
30
32
  map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`);
31
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"userAgentPlatform.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,oDAA8B;AAC9B,8DAAwC;AAUxC;;GAEG;AACH,SAAgB,aAAa;IAC3B,OAAO,YAAY,CAAC;AACtB,CAAC;AAFD,sCAEC;AAED;;GAEG;AACH,SAAgB,uBAAuB,CAAC,GAAwB;IAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAoC,CAAC;IAC9D,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC;QACjB,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;SAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QACzB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;SAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QACzB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,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;AAXD,0DAWC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as os from \"node:os\";\nimport * as 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 function setPlatformSpecificData(map: Map<string, string>): void {\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 map.set(\"OS\", `(${os.arch()}-${os.type()}-${os.release()})`);\n}\n"]}
1
+ {"version":3,"file":"userAgentPlatform.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,oDAA8B;AAC9B,8DAAwC;AAUxC;;GAEG;AACH,SAAgB,aAAa;IAC3B,OAAO,YAAY,CAAC;AACtB,CAAC;AAFD,sCAEC;AAED;;GAEG;AACH,SAAgB,uBAAuB,CAAC,GAAwB;IAC9D,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;AAbD,0DAaC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as os from \"node:os\";\nimport * as 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 function setPlatformSpecificData(map: Map<string, string>): 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.d.ts","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAWtE"}
1
+ {"version":3,"file":"userAgentPlatform.d.ts","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAatE"}
@@ -12,15 +12,17 @@ export function getHeaderName() {
12
12
  * @internal
13
13
  */
14
14
  export function setPlatformSpecificData(map) {
15
- const versions = process.versions;
16
- if (versions.bun) {
17
- map.set("Bun", versions.bun);
18
- }
19
- else if (versions.deno) {
20
- map.set("Deno", versions.deno);
21
- }
22
- else if (versions.node) {
23
- map.set("Node", versions.node);
15
+ if (process && process.versions) {
16
+ const versions = process.versions;
17
+ if (versions.bun) {
18
+ map.set("Bun", versions.bun);
19
+ }
20
+ else if (versions.deno) {
21
+ map.set("Deno", versions.deno);
22
+ }
23
+ else if (versions.node) {
24
+ map.set("Node", versions.node);
25
+ }
24
26
  }
25
27
  map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`);
26
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"userAgentPlatform.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAUxC;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAwB;IAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAoC,CAAC;IAC9D,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC;QACjB,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;SAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QACzB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;SAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QACzB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,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 * as os from \"node:os\";\nimport * as 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 function setPlatformSpecificData(map: Map<string, string>): void {\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 map.set(\"OS\", `(${os.arch()}-${os.type()}-${os.release()})`);\n}\n"]}
1
+ {"version":3,"file":"userAgentPlatform.js","sourceRoot":"","sources":["../../../src/util/userAgentPlatform.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAUxC;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAwB;IAC9D,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 * as os from \"node:os\";\nimport * as 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 function setPlatformSpecificData(map: Map<string, string>): 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/ts-http-runtime",
3
- "version": "1.0.0-alpha.20240611.3",
3
+ "version": "1.0.0-alpha.20240614.3",
4
4
  "description": "Isomorphic client library for making HTTP requests in node.js and browser.",
5
5
  "sdk-type": "client",
6
6
  "type": "module",
@@ -11,18 +11,22 @@
11
11
  "./package.json": "./package.json",
12
12
  ".": {
13
13
  "browser": {
14
+ "source": "./src/index.ts",
14
15
  "types": "./dist/browser/index.d.ts",
15
16
  "default": "./dist/browser/index.js"
16
17
  },
17
18
  "react-native": {
19
+ "source": "./src/index.ts",
18
20
  "types": "./dist/react-native/index.d.ts",
19
21
  "default": "./dist/react-native/index.js"
20
22
  },
21
23
  "import": {
24
+ "source": "./src/index.ts",
22
25
  "types": "./dist/esm/index.d.ts",
23
26
  "default": "./dist/esm/index.js"
24
27
  },
25
28
  "require": {
29
+ "source": "./src/index.ts",
26
30
  "types": "./dist/commonjs/index.d.ts",
27
31
  "default": "./dist/commonjs/index.js"
28
32
  }