@evlop/commons 1.0.102 → 1.0.103
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/constants/index.d.ts +2 -3
- package/dist/src/constants/index.d.ts.map +1 -1
- package/dist/src/constants/index.js +4 -14
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/constants/platformSpecific.d.ts +2 -1
- package/dist/src/constants/platformSpecific.d.ts.map +1 -1
- package/dist/src/constants/platformSpecific.js +3 -0
- package/dist/src/constants/platformSpecific.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/adapters/setUserToken/index.d.ts +0 -2
- package/dist/src/adapters/setUserToken/index.d.ts.map +0 -1
- package/dist/src/adapters/setUserToken/index.js +0 -22
- package/dist/src/adapters/setUserToken/index.js.map +0 -1
- package/dist/src/adapters/setUserToken/index.native.d.ts +0 -2
- package/dist/src/adapters/setUserToken/index.native.d.ts.map +0 -1
- package/dist/src/adapters/setUserToken/index.native.js +0 -28
- package/dist/src/adapters/setUserToken/index.native.js.map +0 -1
@@ -1,3 +1,4 @@
|
|
1
|
+
import { API_BASE_URL, SOCKET_URL } from './platformSpecific';
|
1
2
|
export declare const IS_SSR: boolean;
|
2
3
|
export declare const DIRECTION_TOP = "direction/Top";
|
3
4
|
export declare const DIRECTION_RIGHT = "direction/Right";
|
@@ -6,9 +7,7 @@ export declare const DIRECTION_LEFT = "direction/Left";
|
|
6
7
|
export declare const VERTICAL_LAYOUT = "layout/vertical";
|
7
8
|
export declare const HORIZONTAL_LAYOUT = "layout/horizontal";
|
8
9
|
export declare const TYPE_COMPONENT = "type/component";
|
9
|
-
export declare const API_BASE_URL: string;
|
10
|
-
export declare const SOCKET_URL: string;
|
11
10
|
export declare const DATA_SOURCE_KEY_NAMESPACE = "a0aec1c8-4fed-4d5d-b399-504887b3b8e4";
|
11
|
+
export { API_BASE_URL, SOCKET_URL };
|
12
12
|
export { default as iconInfo } from './iconInfo';
|
13
|
-
export * from './platformSpecific';
|
14
13
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,SAAgE,CAAC;AAEpF,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAG/C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,eAAO,MAAM,cAAc,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,eAAO,MAAM,MAAM,SAAgE,CAAC;AAEpF,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAG/C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,yBAAyB,yCAAyC,CAAC;AAChF,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,CAAA;AAEjC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
@@ -1,19 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
-
}) : (function(o, m, k, k2) {
|
6
|
-
if (k2 === undefined) k2 = k;
|
7
|
-
o[k2] = m[k];
|
8
|
-
}));
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
|
-
};
|
12
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
13
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
14
4
|
};
|
15
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
exports.iconInfo = exports.
|
6
|
+
exports.iconInfo = exports.SOCKET_URL = exports.API_BASE_URL = exports.DATA_SOURCE_KEY_NAMESPACE = exports.TYPE_COMPONENT = exports.HORIZONTAL_LAYOUT = exports.VERTICAL_LAYOUT = exports.DIRECTION_LEFT = exports.DIRECTION_BOTTOM = exports.DIRECTION_RIGHT = exports.DIRECTION_TOP = exports.IS_SSR = void 0;
|
7
|
+
const platformSpecific_1 = require("./platformSpecific");
|
8
|
+
Object.defineProperty(exports, "API_BASE_URL", { enumerable: true, get: function () { return platformSpecific_1.API_BASE_URL; } });
|
9
|
+
Object.defineProperty(exports, "SOCKET_URL", { enumerable: true, get: function () { return platformSpecific_1.SOCKET_URL; } });
|
17
10
|
exports.IS_SSR = ['true', '1'].includes(String(process.env.SSR).toLowerCase());
|
18
11
|
exports.DIRECTION_TOP = "direction/Top";
|
19
12
|
exports.DIRECTION_RIGHT = "direction/Right";
|
@@ -22,10 +15,7 @@ exports.DIRECTION_LEFT = "direction/Left";
|
|
22
15
|
exports.VERTICAL_LAYOUT = 'layout/vertical';
|
23
16
|
exports.HORIZONTAL_LAYOUT = 'layout/horizontal';
|
24
17
|
exports.TYPE_COMPONENT = "type/component";
|
25
|
-
exports.API_BASE_URL = process.env.API_BASE_URL || process.env.REACT_APP_API_BASE_URL;
|
26
|
-
exports.SOCKET_URL = process.env.SOCKET_URL || process.env.REACT_APP_SOCKET_URL || exports.API_BASE_URL;
|
27
18
|
exports.DATA_SOURCE_KEY_NAMESPACE = "a0aec1c8-4fed-4d5d-b399-504887b3b8e4";
|
28
19
|
var iconInfo_1 = require("./iconInfo");
|
29
20
|
Object.defineProperty(exports, "iconInfo", { enumerable: true, get: function () { return __importDefault(iconInfo_1).default; } });
|
30
|
-
__exportStar(require("./platformSpecific"), exports);
|
31
21
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":";;;;;;AAAA,yDAA8D;AAetD,6FAfC,+BAAY,OAeD;AAAE,2FAfC,6BAAU,OAeD;AAdnB,QAAA,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAEvE,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,gBAAgB,GAAG,kBAAkB,CAAC;AACtC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAGlC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AAExC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAElC,QAAA,yBAAyB,GAAG,sCAAsC,CAAC;AAGhF,uCAAiD;AAAxC,qHAAA,OAAO,OAAY"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformSpecific.d.ts","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"platformSpecific.d.ts","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QAAiE,CAAC;AAC3F,eAAO,MAAM,UAAU,QAA6E,CAAC"}
|
@@ -1,3 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SOCKET_URL = exports.API_BASE_URL = void 0;
|
4
|
+
exports.API_BASE_URL = process.env.API_BASE_URL || process.env.REACT_APP_API_BASE_URL;
|
5
|
+
exports.SOCKET_URL = process.env.SOCKET_URL || process.env.REACT_APP_SOCKET_URL || exports.API_BASE_URL;
|
3
6
|
//# sourceMappingURL=platformSpecific.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformSpecific.js","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":""}
|
1
|
+
{"version":3,"file":"platformSpecific.js","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;AAC9E,QAAA,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,oBAAY,CAAC"}
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.ts"],"names":[],"mappings":"AAAA,wBAA8B,YAAY,CAAC,KAAK,EAAE,MAAM,iBAKvD"}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function setUserToken(token) {
|
13
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14
|
-
try {
|
15
|
-
localStorage.setItem('token', token);
|
16
|
-
}
|
17
|
-
catch (e) {
|
18
|
-
}
|
19
|
-
});
|
20
|
-
}
|
21
|
-
exports.default = setUserToken;
|
22
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAA8B,YAAY,CAAC,KAAa;;QACpD,IAAG;YACC,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SACxC;QAAC,OAAM,CAAC,EAAC;SACT;IACL,CAAC;CAAA;AALD,+BAKC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.native.ts"],"names":[],"mappings":"AAEA,wBAA8B,YAAY,CAAC,KAAK,EAAE,MAAM,gBAOvD"}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
const async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
|
16
|
-
function setUserToken(token) {
|
17
|
-
return __awaiter(this, void 0, void 0, function* () {
|
18
|
-
try {
|
19
|
-
yield async_storage_1.default.setItem('@User:token', token);
|
20
|
-
}
|
21
|
-
catch (e) {
|
22
|
-
console.log('Error setting token');
|
23
|
-
}
|
24
|
-
return null;
|
25
|
-
});
|
26
|
-
}
|
27
|
-
exports.default = setUserToken;
|
28
|
-
//# sourceMappingURL=index.native.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.native.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8FAAqE;AAErE,SAA8B,YAAY,CAAC,KAAa;;QACpD,IAAG;YACC,MAAM,uBAAY,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;SACpD;QAAC,OAAM,CAAC,EAAC;YACN,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;SACtC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CAAA;AAPD,+BAOC"}
|