@@ -64,7 +64,7 @@ module.exports =
64
64
/******/ __webpack_require__ . p = "" ;
65
65
/******/
66
66
/******/ // Load entry module and return exports
67
- /******/ return __webpack_require__ ( __webpack_require__ . s = 12 ) ;
67
+ /******/ return __webpack_require__ ( __webpack_require__ . s = 13 ) ;
68
68
/******/ } )
69
69
/************************************************************************/
70
70
/******/ ( [
@@ -96,7 +96,7 @@ var _request = __webpack_require__(2);
96
96
97
97
var _request2 = _interopRequireDefault ( _request ) ;
98
98
99
- var _result = __webpack_require__ ( 14 ) ;
99
+ var _result = __webpack_require__ ( 15 ) ;
100
100
101
101
var _result2 = _interopRequireDefault ( _result ) ;
102
102
@@ -471,7 +471,7 @@ function sendRequest(queryObject) {
471
471
} ) ;
472
472
}
473
473
} ;
474
- /* WEBPACK VAR INJECTION */ } . call ( exports , __webpack_require__ ( 9 ) ) )
474
+ /* WEBPACK VAR INJECTION */ } . call ( exports , __webpack_require__ ( 10 ) ) )
475
475
476
476
/***/ } ) ,
477
477
/* 1 */
@@ -490,7 +490,7 @@ var _createClass = function () { function defineProperties(target, props) { for
490
490
/*import Sync from './modules/sync';*/
491
491
492
492
493
- var _config = __webpack_require__ ( 7 ) ;
493
+ var _config = __webpack_require__ ( 8 ) ;
494
494
495
495
var _config2 = _interopRequireDefault ( _config ) ;
496
496
@@ -502,7 +502,7 @@ var _entry = __webpack_require__(5);
502
502
503
503
var _entry2 = _interopRequireDefault ( _entry ) ;
504
504
505
- var _assets = __webpack_require__ ( 13 ) ;
505
+ var _assets = __webpack_require__ ( 14 ) ;
506
506
507
507
var _assets2 = _interopRequireDefault ( _assets ) ;
508
508
@@ -548,15 +548,16 @@ var Stack = function () {
548
548
function Stack ( ) {
549
549
_classCallCheck ( this , Stack ) ;
550
550
551
- this . config = _config2 . default ;
552
- this . cachePolicy = _index2 . default . policies . IGNORE_CACHE ;
553
- this . provider = _index2 . default . providers ( 'localstorage' ) ;
554
- //this.sync_cdn_api_key = stack_arguments[0].sync_cdn_api_key;
555
-
556
551
for ( var _len = arguments . length , stack_arguments = Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) {
557
552
stack_arguments [ _key ] = arguments [ _key ] ;
558
553
}
559
554
555
+ if ( stack_arguments [ 0 ] . region && stack_arguments [ 0 ] . region != undefined && stack_arguments [ 0 ] . region != "us" ) {
556
+ _config2 . default [ 'host' ] = stack_arguments [ 0 ] . region + "-" + "cdn.contentstack.com" ;
557
+ }
558
+ this . config = _config2 . default ;
559
+ this . cachePolicy = _index2 . default . policies . IGNORE_CACHE ;
560
+ this . provider = _index2 . default . providers ( 'localstorage' ) ;
560
561
switch ( stack_arguments . length ) {
561
562
case 1 :
562
563
if ( _typeof ( stack_arguments [ 0 ] ) === "object" && typeof stack_arguments [ 0 ] . api_key === "string" && typeof stack_arguments [ 0 ] . access_token === "string" && typeof stack_arguments [ 0 ] . environment === "string" ) {
@@ -1050,7 +1051,7 @@ var _utils = __webpack_require__(0);
1050
1051
1051
1052
var Utils = _interopRequireWildcard ( _utils ) ;
1052
1053
1053
- var _http = __webpack_require__ ( 15 ) ;
1054
+ var _http = __webpack_require__ ( 16 ) ;
1054
1055
1055
1056
var _http2 = _interopRequireDefault ( _http ) ;
1056
1057
@@ -1059,7 +1060,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
1059
1060
function _interopRequireWildcard ( obj ) { if ( obj && obj . __esModule ) { return obj ; } else { var newObj = { } ; if ( obj != null ) { for ( var key in obj ) { if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) newObj [ key ] = obj [ key ] ; } } newObj . default = obj ; return newObj ; } }
1060
1061
1061
1062
//JS SDK version
1062
- var version = '3.7.0 ' ;
1063
+ var version = '3.7.1 ' ;
1063
1064
var environment = void 0 ,
1064
1065
api_key = void 0 ;
1065
1066
@@ -1125,7 +1126,7 @@ Object.defineProperty(exports, "__esModule", {
1125
1126
value : true
1126
1127
} ) ;
1127
1128
1128
- var _localstorage = __webpack_require__ ( 11 ) ;
1129
+ var _localstorage = __webpack_require__ ( 12 ) ;
1129
1130
1130
1131
var _localstorage2 = _interopRequireDefault ( _localstorage ) ;
1131
1132
@@ -1173,7 +1174,7 @@ var _utils = __webpack_require__(0);
1173
1174
1174
1175
var Utils = _interopRequireWildcard ( _utils ) ;
1175
1176
1176
- var _localstorage = __webpack_require__ ( 16 ) ;
1177
+ var _localstorage = __webpack_require__ ( 17 ) ;
1177
1178
1178
1179
var _localstorage2 = _interopRequireDefault ( _localstorage ) ;
1179
1180
@@ -2370,6 +2371,24 @@ exports.default = Query;
2370
2371
"use strict" ;
2371
2372
2372
2373
2374
+ Object . defineProperty ( exports , "__esModule" , {
2375
+ value : true
2376
+ } ) ;
2377
+ var ContentstackRegion = {
2378
+ EU : "eu" ,
2379
+ US : "us"
2380
+ } ;
2381
+
2382
+ exports . default = ContentstackRegion ;
2383
+ //module.exports = ContentstackRegion;
2384
+
2385
+ /***/ } ) ,
2386
+ /* 8 */
2387
+ /***/ ( function ( module , exports , __webpack_require__ ) {
2388
+
2389
+ "use strict" ;
2390
+
2391
+
2373
2392
Object . defineProperty ( exports , "__esModule" , {
2374
2393
value : true
2375
2394
} ) ;
@@ -2390,7 +2409,7 @@ var config = {
2390
2409
exports . default = config ;
2391
2410
2392
2411
/***/ } ) ,
2393
- /* 8 */
2412
+ /* 9 */
2394
2413
/***/ ( function ( module , exports , __webpack_require__ ) {
2395
2414
2396
2415
"use strict" ;
@@ -2449,10 +2468,10 @@ exports.default = config;
2449
2468
module . exports = new LocalStorage ( ) ;
2450
2469
}
2451
2470
} ) ( ) ;
2452
- /* WEBPACK VAR INJECTION */ } . call ( exports , __webpack_require__ ( 10 ) ) )
2471
+ /* WEBPACK VAR INJECTION */ } . call ( exports , __webpack_require__ ( 11 ) ) )
2453
2472
2454
2473
/***/ } ) ,
2455
- /* 9 */
2474
+ /* 10 */
2456
2475
/***/ ( function ( module , exports , __webpack_require__ ) {
2457
2476
2458
2477
"use strict" ;
@@ -2645,7 +2664,7 @@ process.umask = function () {
2645
2664
} ;
2646
2665
2647
2666
/***/ } ) ,
2648
- /* 10 */
2667
+ /* 11 */
2649
2668
/***/ ( function ( module , exports , __webpack_require__ ) {
2650
2669
2651
2670
"use strict" ;
@@ -2675,7 +2694,7 @@ try {
2675
2694
module . exports = g ;
2676
2695
2677
2696
/***/ } ) ,
2678
- /* 11 */
2697
+ /* 12 */
2679
2698
/***/ ( function ( module , exports , __webpack_require__ ) {
2680
2699
2681
2700
"use strict" ;
@@ -2767,7 +2786,7 @@ localStorage.clearAll = function (callback) {
2767
2786
exports . default = localStorage ;
2768
2787
2769
2788
/***/ } ) ,
2770
- /* 12 */
2789
+ /* 13 */
2771
2790
/***/ ( function ( module , exports , __webpack_require__ ) {
2772
2791
2773
2792
"use strict" ;
@@ -2783,6 +2802,10 @@ var _index = __webpack_require__(3);
2783
2802
2784
2803
var _index2 = _interopRequireDefault ( _index ) ;
2785
2804
2805
+ var _contentstackregion = __webpack_require__ ( 7 ) ;
2806
+
2807
+ var _contentstackregion2 = _interopRequireDefault ( _contentstackregion ) ;
2808
+
2786
2809
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
2787
2810
2788
2811
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
@@ -2809,6 +2832,7 @@ var Contentstack = function () {
2809
2832
* Contentstack.CachePolicy.CACHE_THEN_NETWORK
2810
2833
*/
2811
2834
this . CachePolicy = _index2 . default . policies ;
2835
+ this . Region = _contentstackregion2 . default ;
2812
2836
}
2813
2837
/**
2814
2838
@@ -2833,7 +2857,7 @@ var Contentstack = function () {
2833
2857
module . exports = new Contentstack ( ) ;
2834
2858
2835
2859
/***/ } ) ,
2836
- /* 13 */
2860
+ /* 14 */
2837
2861
/***/ ( function ( module , exports , __webpack_require__ ) {
2838
2862
2839
2863
"use strict" ;
@@ -2980,7 +3004,7 @@ var Assets = function () {
2980
3004
exports . default = Assets ;
2981
3005
2982
3006
/***/ } ) ,
2983
- /* 14 */
3007
+ /* 15 */
2984
3008
/***/ ( function ( module , exports , __webpack_require__ ) {
2985
3009
2986
3010
"use strict" ;
@@ -3123,7 +3147,7 @@ module.exports = function (object) {
3123
3147
} ;
3124
3148
3125
3149
/***/ } ) ,
3126
- /* 15 */
3150
+ /* 16 */
3127
3151
/***/ ( function ( module , exports , __webpack_require__ ) {
3128
3152
3129
3153
"use strict" ;
@@ -3135,7 +3159,7 @@ Object.defineProperty(exports, "__esModule", {
3135
3159
exports . default = fetch ;
3136
3160
3137
3161
/***/ } ) ,
3138
- /* 16 */
3162
+ /* 17 */
3139
3163
/***/ ( function ( module , exports , __webpack_require__ ) {
3140
3164
3141
3165
"use strict" ;
@@ -3145,7 +3169,7 @@ Object.defineProperty(exports, "__esModule", {
3145
3169
value : true
3146
3170
} ) ;
3147
3171
3148
- var _localStorage = __webpack_require__ ( 8 ) ;
3172
+ var _localStorage = __webpack_require__ ( 9 ) ;
3149
3173
3150
3174
var _localStorage2 = _interopRequireDefault ( _localStorage ) ;
3151
3175
0 commit comments