rlz-engine 1.0.11 → 1.0.12

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.
@@ -1,5 +1,5 @@
1
1
  import { getFrontConfig } from '../config';
2
- const API_DOMAIN = getFrontConfig().callLocalhost ? 'http://localhost:8080/' : '/';
2
+ const API_DOMAIN = getFrontConfig().apiDomain;
3
3
  export class Forbidden extends Error {
4
4
  constructor(url) {
5
5
  super(`Forbidden: ${url}`);
@@ -1,6 +1,6 @@
1
1
  export declare const PRODUCTION: boolean;
2
2
  export interface FrontConfig {
3
- callLocalhost: boolean;
3
+ apiDomain: string;
4
4
  }
5
5
  export declare function initFrontConfig(cfg: FrontConfig): void;
6
6
  export declare function getFrontConfig(): FrontConfig;
@@ -9,7 +9,7 @@ export function initFrontConfig(cfg) {
9
9
  export function getFrontConfig() {
10
10
  if (frontConfig === null) {
11
11
  frontConfig = {
12
- callLocalhost: !PRODUCTION
12
+ apiDomain: PRODUCTION ? '/' : 'http://localhost:8080/'
13
13
  };
14
14
  }
15
15
  return frontConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rlz-engine",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Deps and tools for my style of development",
5
5
  "scripts": {
6
6
  "build": "tsc",