node-consul-service 1.0.12 → 1.0.13

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/dist/index.cjs.js CHANGED
@@ -19022,7 +19022,8 @@ const {
19022
19022
 
19023
19023
  async function callService(serviceName, options = {}) {
19024
19024
  const { method = 'GET', path = '/hello', data, headers, params, } = options;
19025
- const url = await getServiceUrl(serviceName);
19025
+ const instance = await getRandomServiceInstance(serviceName);
19026
+ const url = `http://${instance.ServiceAddress}:${instance.ServicePort}${path}`;
19026
19027
  const response = await axios.request({
19027
19028
  url,
19028
19029
  method,
package/dist/index.esm.js CHANGED
@@ -19020,7 +19020,8 @@ const {
19020
19020
 
19021
19021
  async function callService(serviceName, options = {}) {
19022
19022
  const { method = 'GET', path = '/hello', data, headers, params, } = options;
19023
- const url = await getServiceUrl(serviceName);
19023
+ const instance = await getRandomServiceInstance(serviceName);
19024
+ const url = `http://${instance.ServiceAddress}:${instance.ServicePort}${path}`;
19024
19025
  const response = await axios.request({
19025
19026
  url,
19026
19027
  method,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-consul-service",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",