@nomalism-com/api 0.8.159 → 0.8.161

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.
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.servicePublicPath = exports.serviceAuthPath = exports.serviceHostname = void 0;
4
4
  var client_1 = require("../../shared/client");
5
- exports.serviceHostname = client_1.processEnvironment === 'development'
5
+ exports.serviceHostname = client_1.processEnvironment === 'localhost'
6
6
  ? process.env.REACT_APP_DOCUMENT_MANAGEMENT_URL
7
7
  : client_1.REACT_APP_API_GATEWAY_URL;
8
- var serviceJwtPath = client_1.processEnvironment === 'development' ? '/' : 'documents/auth/';
9
- var serviceApiKeyPath = client_1.processEnvironment === 'development' ? '/' : 'documents/apikey/';
8
+ var serviceJwtPath = client_1.processEnvironment === 'localhost' ? '/' : 'documents/auth/';
9
+ var serviceApiKeyPath = client_1.processEnvironment === 'localhost' ? '/' : 'documents/apikey/';
10
10
  exports.serviceAuthPath = process.env.REACT_APP_API_KEY
11
11
  ? serviceApiKeyPath
12
12
  : serviceJwtPath;
13
- exports.servicePublicPath = client_1.processEnvironment === 'development' ? '/' : 'documents/public/';
13
+ exports.servicePublicPath = client_1.processEnvironment === 'localhost' ? '/' : 'documents/public/';
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.servicePublicPath = exports.serviceAuthPath = exports.serviceHostname = void 0;
4
4
  var client_1 = require("../../shared/client");
5
- exports.serviceHostname = client_1.processEnvironment === 'development'
5
+ exports.serviceHostname = client_1.processEnvironment === 'localhost'
6
6
  ? process.env.REACT_APP_INTEGRATION_URL
7
7
  : client_1.REACT_APP_API_GATEWAY_URL;
8
- var serviceJwtPath = client_1.processEnvironment === 'development' ? '/' : 'integration/auth/';
9
- var serviceApiKeyPath = client_1.processEnvironment === 'development' ? '/' : 'integration/apikey/';
8
+ var serviceJwtPath = client_1.processEnvironment === 'localhost' ? '/' : 'integration/auth/';
9
+ var serviceApiKeyPath = client_1.processEnvironment === 'localhost' ? '/' : 'integration/apikey/';
10
10
  exports.serviceAuthPath = process.env.REACT_APP_API_KEY
11
11
  ? serviceApiKeyPath
12
12
  : serviceJwtPath;
13
- exports.servicePublicPath = client_1.processEnvironment === 'development' ? '/' : 'integration/public/';
13
+ exports.servicePublicPath = client_1.processEnvironment === 'localhost' ? '/' : 'integration/public/';
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.serviceApiKeyPath = exports.servicePublicPath = exports.serviceAuthPath = exports.serviceHostname = void 0;
4
4
  var client_1 = require("../../shared/client");
5
- exports.serviceHostname = client_1.processEnvironment === 'development'
5
+ exports.serviceHostname = client_1.processEnvironment === 'localhost'
6
6
  ? process.env.REACT_APP_PRINT_URL
7
7
  : client_1.REACT_APP_API_GATEWAY_URL;
8
- exports.serviceAuthPath = client_1.processEnvironment === 'development' ? '/' : 'print/auth/';
9
- exports.servicePublicPath = client_1.processEnvironment === 'development' ? '/' : 'print/public/';
10
- exports.serviceApiKeyPath = client_1.processEnvironment === 'development' ? '/' : 'print/apikey/';
8
+ exports.serviceAuthPath = client_1.processEnvironment === 'localhost' ? '/' : 'print/auth/';
9
+ exports.servicePublicPath = client_1.processEnvironment === 'localhost' ? '/' : 'print/public/';
10
+ exports.serviceApiKeyPath = client_1.processEnvironment === 'localhost' ? '/' : 'print/apikey/';
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.servicePublicPath = exports.serviceAuthPath = exports.serviceHostname = void 0;
4
4
  var client_1 = require("../../shared/client");
5
- exports.serviceHostname = client_1.processEnvironment === 'development'
5
+ exports.serviceHostname = client_1.processEnvironment === 'localhost'
6
6
  ? process.env.REACT_APP_STOCK_URL
7
7
  : client_1.REACT_APP_API_GATEWAY_URL;
8
- var serviceJwtPath = client_1.processEnvironment === 'development' ? '/' : 'stock/auth/';
9
- var serviceApiKeyPath = client_1.processEnvironment === 'development' ? '/' : 'stock/apikey/';
8
+ var serviceJwtPath = client_1.processEnvironment === 'localhost' ? '/' : 'stock/auth/';
9
+ var serviceApiKeyPath = client_1.processEnvironment === 'localhost' ? '/' : 'stock/apikey/';
10
10
  exports.serviceAuthPath = process.env.REACT_APP_API_KEY
11
11
  ? serviceApiKeyPath
12
12
  : serviceJwtPath;
13
- exports.servicePublicPath = client_1.processEnvironment === 'development' ? '/' : 'stock/public/';
13
+ exports.servicePublicPath = client_1.processEnvironment === 'localhost' ? '/' : 'stock/public/';
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.servicePublicPath = exports.serviceAuthPath = exports.serviceHostname = void 0;
4
4
  var client_1 = require("../../shared/client");
5
- exports.serviceHostname = client_1.processEnvironment === 'development'
5
+ exports.serviceHostname = client_1.processEnvironment === 'localhost'
6
6
  ? process.env.REACT_APP_TICKETS_URL
7
7
  : client_1.REACT_APP_API_GATEWAY_URL;
8
- var serviceJwtPath = client_1.processEnvironment === 'development' ? '/' : 'tickets/auth/';
9
- var serviceApiKeyPath = client_1.processEnvironment === 'development' ? '/' : 'tickets/apikey/';
8
+ var serviceJwtPath = client_1.processEnvironment === 'localhost' ? '/' : 'tickets/auth/';
9
+ var serviceApiKeyPath = client_1.processEnvironment === 'localhost' ? '/' : 'tickets/apikey/';
10
10
  exports.serviceAuthPath = process.env.REACT_APP_API_KEY
11
11
  ? serviceApiKeyPath
12
12
  : serviceJwtPath;
13
- exports.servicePublicPath = client_1.processEnvironment === 'development' ? '/' : 'tickets/public/';
13
+ exports.servicePublicPath = client_1.processEnvironment === 'localhost' ? '/' : 'tickets/public/';
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.servicePublicPath = exports.serviceAuthPath = exports.serviceHostname = void 0;
4
4
  var client_1 = require("../../shared/client");
5
- exports.serviceHostname = client_1.processEnvironment === 'development'
5
+ exports.serviceHostname = client_1.processEnvironment === 'localhost'
6
6
  ? process.env.REACT_APP_USER_URL
7
7
  : client_1.REACT_APP_API_GATEWAY_URL;
8
- var serviceJwtPath = client_1.processEnvironment === 'development' ? '/' : 'users/auth/';
9
- var serviceApiKeyPath = client_1.processEnvironment === 'development' ? '/' : 'users/apikey/';
8
+ var serviceJwtPath = client_1.processEnvironment === 'localhost' ? '/' : 'users/auth/';
9
+ var serviceApiKeyPath = client_1.processEnvironment === 'localhost' ? '/' : 'users/apikey/';
10
10
  exports.serviceAuthPath = process.env.REACT_APP_API_KEY
11
11
  ? serviceApiKeyPath
12
12
  : serviceJwtPath;
13
- exports.servicePublicPath = client_1.processEnvironment === 'development' ? '/' : 'users/public/';
13
+ exports.servicePublicPath = client_1.processEnvironment === 'localhost' ? '/' : 'users/public/';
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.serviceAuthPath = exports.serviceHostname = void 0;
4
4
  var client_1 = require("../../shared/client");
5
- exports.serviceHostname = client_1.processEnvironment === 'development'
5
+ exports.serviceHostname = client_1.processEnvironment === 'localhost'
6
6
  ? process.env.REACT_APP_VIEW_URL
7
7
  : client_1.REACT_APP_API_GATEWAY_URL;
8
- var serviceJwtPath = client_1.processEnvironment === 'development' ? '/' : 'view/auth/';
9
- var serviceApiKeyPath = client_1.processEnvironment === 'development' ? '/' : 'view/apikey/';
8
+ var serviceJwtPath = client_1.processEnvironment === 'localhost' ? '/' : 'view/auth/';
9
+ var serviceApiKeyPath = client_1.processEnvironment === 'localhost' ? '/' : 'view/apikey/';
10
10
  exports.serviceAuthPath = process.env.REACT_APP_API_KEY
11
11
  ? serviceApiKeyPath
12
12
  : serviceJwtPath;
@@ -16,11 +16,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.REACT_APP_API_GATEWAY_URL = exports.processEnvironment = void 0;
18
18
  var axios_1 = __importDefault(require("axios"));
19
- exports.processEnvironment = process.env.REACT_APP_ENV || process.env.NODE_ENV || 'development';
19
+ exports.processEnvironment = process.env.REACT_APP_ENV || process.env.NODE_ENV || 'localhost';
20
20
  var PROCESS_REACT_APP_API_GATEWAY_URL = {
21
- production: process.env.REACT_APP_API_GATEWAY_URL_DEV,
21
+ production: process.env.REACT_APP_API_GATEWAY_URL_PROD,
22
22
  uat: process.env.REACT_APP_API_GATEWAY_URL_UAT,
23
- development: process.env.REACT_APP_API_GATEWAY_URL_PROD,
23
+ development: process.env.REACT_APP_API_GATEWAY_URL_DEV,
24
+ localhost: 'localhost',
24
25
  };
25
26
  exports.REACT_APP_API_GATEWAY_URL = PROCESS_REACT_APP_API_GATEWAY_URL[exports.processEnvironment];
26
27
  exports.default = axios_1.default.create(__assign({ baseURL: exports.REACT_APP_API_GATEWAY_URL }, (process.env.REACT_APP_API_KEY
package/package.json CHANGED
@@ -1,54 +1,54 @@
1
- {
2
- "name": "@nomalism-com/api",
3
- "description": "A nomalism API package for performing HTTP requests on API endpoints",
4
- "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
5
- "keywords": [
6
- "nomalism",
7
- "api",
8
- "types",
9
- "typescript",
10
- "helper"
11
- ],
12
- "version": "0.8.159",
13
- "main": "dist/index.js",
14
- "types": "./dist/index.d.ts",
15
- "files": [
16
- "dist"
17
- ],
18
- "license": "UNLICENSED",
19
- "homepage": "https://gitlab.com/nomalism-develop/api",
20
- "bugs": {
21
- "url": "https://gitlab.com/nomalism-develop/api/issues"
22
- },
23
- "repository": {
24
- "type": "git",
25
- "url": "git+https://gitlab.com/nomalism-develop/api.git"
26
- },
27
- "scripts": {
28
- "lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
29
- "build": "rm -rf dist && tsc --project tsconfig.json",
30
- "start": "tsx --tsconfig ./tsconfig.json src/index.ts",
31
- "prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
32
- },
33
- "devDependencies": {
34
- "@types/convert-units": "^2.3.5",
35
- "@types/node": "^18.15.3",
36
- "@typescript-eslint/eslint-plugin": "^5.55.0",
37
- "@typescript-eslint/parser": "^5.55.0",
38
- "concurrently": "^7.6.0",
39
- "eslint": "^8.36.0",
40
- "eslint-config-airbnb-base": "^15.0.0",
41
- "eslint-config-prettier": "^8.7.0",
42
- "eslint-import-resolver-typescript": "^3.5.3",
43
- "eslint-plugin-import": "^2.27.5",
44
- "eslint-plugin-prettier": "^4.2.1",
45
- "prettier": "^2.8.4",
46
- "tsx": "^3.12.5",
47
- "typescript": "^5.0.2"
48
- },
49
- "dependencies": {
50
- "@nomalism-com/api": "^0.8.157",
51
- "@nomalism-com/types": "^0.9.185",
52
- "axios": "^0.27.2"
53
- }
54
- }
1
+ {
2
+ "name": "@nomalism-com/api",
3
+ "description": "A nomalism API package for performing HTTP requests on API endpoints",
4
+ "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
5
+ "keywords": [
6
+ "nomalism",
7
+ "api",
8
+ "types",
9
+ "typescript",
10
+ "helper"
11
+ ],
12
+ "version": "0.8.161",
13
+ "main": "dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "license": "UNLICENSED",
19
+ "homepage": "https://gitlab.com/nomalism-develop/api",
20
+ "bugs": {
21
+ "url": "https://gitlab.com/nomalism-develop/api/issues"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://gitlab.com/nomalism-develop/api.git"
26
+ },
27
+ "scripts": {
28
+ "lint": "eslint src --ext .ts,.js --ignore-pattern node_modules --ignore-pattern dist --cache",
29
+ "build": "rm -rf dist && tsc --project tsconfig.json",
30
+ "start": "tsx --tsconfig ./tsconfig.json src/index.ts",
31
+ "prepack": "concurrently --success all \"npm run lint\" \"npm run build\" \"npm run start\""
32
+ },
33
+ "devDependencies": {
34
+ "@types/convert-units": "^2.3.5",
35
+ "@types/node": "^18.15.5",
36
+ "@typescript-eslint/eslint-plugin": "^5.56.0",
37
+ "@typescript-eslint/parser": "^5.56.0",
38
+ "concurrently": "^7.6.0",
39
+ "eslint": "^8.36.0",
40
+ "eslint-config-airbnb-base": "^15.0.0",
41
+ "eslint-config-prettier": "^8.8.0",
42
+ "eslint-import-resolver-typescript": "^3.5.3",
43
+ "eslint-plugin-import": "^2.27.5",
44
+ "eslint-plugin-prettier": "^4.2.1",
45
+ "prettier": "^2.8.6",
46
+ "tsx": "^3.12.6",
47
+ "typescript": "^5.0.2"
48
+ },
49
+ "dependencies": {
50
+ "@nomalism-com/api": "^0.8.159",
51
+ "@nomalism-com/types": "^0.9.190",
52
+ "axios": "^0.27.2"
53
+ }
54
+ }