@navservice/core 1.75.0 → 1.76.0

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/build/es/index.js CHANGED
@@ -171,14 +171,14 @@ const _api_api = class _api {
171
171
  if ("undefined" == typeof window) throw new Error("resolveApiBaseURL must run in browser");
172
172
  const { hostname } = window.location;
173
173
  const apiOverride = utils_environment.get;
174
- if ("SANDBOX" === apiOverride) return "https://api-sandbox.navsoftware.com.br";
175
- if ("PRODUCAO" === apiOverride) return "https://api.navsoftware.com.br";
176
- if ("LOCALHOST" === apiOverride) return "http://localhost:8787";
177
- if ("localhost" === hostname || hostname.startsWith("localhost")) return "http://localhost:8787";
178
174
  const isNavSoftware = hostname.includes("navsoftware");
179
175
  const isSandbox = hostname.includes("sandbox");
180
176
  if (isNavSoftware && isSandbox) return "https://api-sandbox.navsoftware.com.br";
181
177
  if (isNavSoftware) return "https://api.navsoftware.com.br";
178
+ if ("SANDBOX" === apiOverride) return "https://api-sandbox.navsoftware.com.br";
179
+ if ("PRODUCAO" === apiOverride) return "https://api.navsoftware.com.br";
180
+ if ("LOCALHOST" === apiOverride) return "http://localhost:8787";
181
+ if ("localhost" === hostname || hostname.startsWith("localhost")) return "http://localhost:8787";
182
182
  } catch (error) {
183
183
  throw new Error(`Ambiente não reconhecido: ${error}`);
184
184
  }
@@ -258,6 +258,14 @@ const _api_api = class _api {
258
258
  }
259
259
  const { hostname } = window.location;
260
260
  const apiOverride = utils_environment.get;
261
+ const isNavSoftware = hostname.includes("navsoftware");
262
+ const isSandbox = hostname.includes("sandbox");
263
+ if (isNavSoftware && isSandbox) {
264
+ return "https://api-sandbox.navsoftware.com.br";
265
+ }
266
+ if (isNavSoftware) {
267
+ return "https://api.navsoftware.com.br";
268
+ }
261
269
  if (apiOverride === "SANDBOX") {
262
270
  return "https://api-sandbox.navsoftware.com.br";
263
271
  }
@@ -270,14 +278,6 @@ const _api_api = class _api {
270
278
  if (hostname === "localhost" || hostname.startsWith("localhost")) {
271
279
  return "http://localhost:8787";
272
280
  }
273
- const isNavSoftware = hostname.includes("navsoftware");
274
- const isSandbox = hostname.includes("sandbox");
275
- if (isNavSoftware && isSandbox) {
276
- return "https://api-sandbox.navsoftware.com.br";
277
- }
278
- if (isNavSoftware) {
279
- return "https://api.navsoftware.com.br";
280
- }
281
281
  } catch (error) {
282
282
  throw new Error(`Ambiente não reconhecido: ${error}`);
283
283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navservice/core",
3
- "version": "1.75.0",
3
+ "version": "1.76.0",
4
4
  "description": "Service core de todos os micro serviços",
5
5
  "type": "module",
6
6
  "exports": {