@agility/content-sync 1.2.3 → 1.2.4

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.
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 47);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 46);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ([
@@ -139,112 +139,80 @@ module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exp
139
139
 
140
140
  /***/ }),
141
141
  /* 2 */
142
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
143
-
144
- "use strict";
145
- __webpack_require__.r(__webpack_exports__);
146
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logDebug", function() { return logDebug; });
147
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logInfo", function() { return logInfo; });
148
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logError", function() { return logError; });
149
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logWarning", function() { return logWarning; });
150
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logSuccess", function() { return logSuccess; });
151
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asyncForEach", function() { return asyncForEach; });
152
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sleep", function() { return sleep; });
153
- /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
154
- /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);
155
- /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
156
- /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);
157
-
158
- var asyncForEach = /*#__PURE__*/function () {var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(array, callback) {var index;return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function (_context) {while (1) switch (_context.prev = _context.next) {case 0:
159
- index = 0;case 1:if (!(index < array.length)) {_context.next = 3;break;}_context.next = 2;return (
160
- callback(array[index], index, array));case 2:index++;_context.next = 1;break;case 3:case "end":return _context.stop();}}, _callee);}));return function asyncForEach(_x, _x2) {return _ref.apply(this, arguments);};}();
161
-
162
-
163
-
164
-
165
- var getLogLevel = function getLogLevel() {
166
- var logLevel = (process.env.AGILITY_LOG_LEVEL || 'warning').toLowerCase();
167
-
168
- if (logLevel !== 'debug' && logLevel !== 'info' && logLevel !== 'warning' && logLevel !== 'error' && logLevel !== 'none') {
169
- return 'warning';
170
- }
171
-
172
- return logLevel;
142
+ /***/ (function(module, exports, __webpack_require__) {
173
143
 
174
- };
144
+ var toPropertyKey = __webpack_require__(9);
145
+ function _defineProperty(e, r, t) {
146
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
147
+ value: t,
148
+ enumerable: !0,
149
+ configurable: !0,
150
+ writable: !0
151
+ }) : e[r] = t, e;
152
+ }
153
+ module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
175
154
 
155
+ /***/ }),
156
+ /* 3 */
157
+ /***/ (function(module, exports) {
176
158
 
177
- var logSuccess = function logSuccess(message) {
159
+ module.exports = require("fs");
178
160
 
179
- var logLevel = getLogLevel();
180
- if (logLevel === 'debug' || logLevel === 'info') {
161
+ /***/ }),
162
+ /* 4 */
163
+ /***/ (function(module, exports) {
181
164
 
182
- message = "AgilityCMS => ".concat(message, " ");
183
- console.log('\x1b[32m%s\x1b[0m', message);
184
- }
185
- };
165
+ module.exports = require("path");
186
166
 
187
- var logWarning = function logWarning(message) {
167
+ /***/ }),
168
+ /* 5 */
169
+ /***/ (function(module, exports, __webpack_require__) {
188
170
 
189
- var logLevel = getLogLevel();
190
- if (logLevel === 'debug' || logLevel === 'info' || logLevel === 'warning') {
171
+ "use strict";
191
172
 
192
- message = "AgilityCMS => ".concat(message, " ");
193
- console.log('\x1b[33m%s\x1b[0m', message);
194
- }
195
- };
196
173
 
197
- var logError = function logError(message) {
174
+ const lockfile = __webpack_require__(33);
175
+ const { toPromise, toSync, toSyncOptions } = __webpack_require__(45);
198
176
 
199
- var logLevel = getLogLevel();
200
- if (logLevel === 'debug' || logLevel === 'info' || logLevel === 'warning' || logLevel === 'error') {
177
+ async function lock(file, options) {
178
+ const release = await toPromise(lockfile.lock)(file, options);
201
179
 
202
- message = "AgilityCMS => ".concat(message, " ");
203
- console.log('\x1b[31m%s\x1b[0m', message);
204
- }
205
- };
180
+ return toPromise(release);
181
+ }
206
182
 
207
- var logInfo = function logInfo(message) {
208
- var logLevel = getLogLevel();
209
- if (logLevel === 'debug' || logLevel === 'info') {
210
- message = "AgilityCMS => ".concat(message, " ");
211
- console.log(message);
212
- }
213
- };
183
+ function lockSync(file, options) {
184
+ const release = toSync(lockfile.lock)(file, toSyncOptions(options));
214
185
 
215
- var logDebug = function logDebug(message) {
216
- var logLevel = getLogLevel();
217
- if (logLevel === 'debug') {
218
- console.log('#######################################################################');
219
- message = "AgilityCMS(debug) => ".concat(message, " ");
220
- console.log('"\x1b[35m%s\x1b[0m', message);
221
- }
222
- };
186
+ return toSync(release);
187
+ }
223
188
 
189
+ function unlock(file, options) {
190
+ return toPromise(lockfile.unlock)(file, options);
191
+ }
224
192
 
225
- var sleep = function sleep(ms) {
226
- return new Promise(function (resolve) {return setTimeout(resolve, ms);});
227
- };
193
+ function unlockSync(file, options) {
194
+ return toSync(lockfile.unlock)(file, toSyncOptions(options));
195
+ }
228
196
 
197
+ function check(file, options) {
198
+ return toPromise(lockfile.check)(file, options);
199
+ }
229
200
 
201
+ function checkSync(file, options) {
202
+ return toSync(lockfile.check)(file, toSyncOptions(options));
203
+ }
230
204
 
231
- /***/ }),
232
- /* 3 */
233
- /***/ (function(module, exports, __webpack_require__) {
205
+ module.exports = lock;
206
+ module.exports.lock = lock;
207
+ module.exports.unlock = unlock;
208
+ module.exports.lockSync = lockSync;
209
+ module.exports.unlockSync = unlockSync;
210
+ module.exports.check = check;
211
+ module.exports.checkSync = checkSync;
234
212
 
235
- var toPropertyKey = __webpack_require__(8);
236
- function _defineProperty(e, r, t) {
237
- return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
238
- value: t,
239
- enumerable: !0,
240
- configurable: !0,
241
- writable: !0
242
- }) : e[r] = t, e;
243
- }
244
- module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
245
213
 
246
214
  /***/ }),
247
- /* 4 */
215
+ /* 6 */
248
216
  /***/ (function(module, exports) {
249
217
 
250
218
  function _typeof(o) {
@@ -259,28 +227,22 @@ function _typeof(o) {
259
227
  module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
260
228
 
261
229
  /***/ }),
262
- /* 5 */
230
+ /* 7 */
263
231
  /***/ (function(module, exports) {
264
232
 
265
233
  module.exports = require("assert");
266
234
 
267
235
  /***/ }),
268
- /* 6 */
269
- /***/ (function(module, exports) {
270
-
271
- module.exports = require("fs");
272
-
273
- /***/ }),
274
- /* 7 */
236
+ /* 8 */
275
237
  /***/ (function(module, exports) {
276
238
 
277
- module.exports = require("path");
239
+ module.exports = require("os");
278
240
 
279
241
  /***/ }),
280
- /* 8 */
242
+ /* 9 */
281
243
  /***/ (function(module, exports, __webpack_require__) {
282
244
 
283
- var _typeof = __webpack_require__(4)["default"];
245
+ var _typeof = __webpack_require__(6)["default"];
284
246
  var toPrimitive = __webpack_require__(22);
285
247
  function toPropertyKey(t) {
286
248
  var i = toPrimitive(t, "string");
@@ -288,23 +250,17 @@ function toPropertyKey(t) {
288
250
  }
289
251
  module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
290
252
 
291
- /***/ }),
292
- /* 9 */
293
- /***/ (function(module, exports) {
294
-
295
- module.exports = require("util");
296
-
297
253
  /***/ }),
298
254
  /* 10 */
299
255
  /***/ (function(module, exports) {
300
256
 
301
- module.exports = require("stream");
257
+ module.exports = require("util");
302
258
 
303
259
  /***/ }),
304
260
  /* 11 */
305
261
  /***/ (function(module, exports) {
306
262
 
307
- module.exports = require("os");
263
+ module.exports = require("stream");
308
264
 
309
265
  /***/ }),
310
266
  /* 12 */
@@ -491,12 +447,12 @@ module.exports = AsyncIterator, module.exports.__esModule = true, module.exports
491
447
  /* 17 */
492
448
  /***/ (function(module, exports, __webpack_require__) {
493
449
 
494
- var fs = __webpack_require__(6)
495
- var polyfills = __webpack_require__(35)
496
- var legacy = __webpack_require__(37)
497
- var clone = __webpack_require__(38)
450
+ var fs = __webpack_require__(3)
451
+ var polyfills = __webpack_require__(34)
452
+ var legacy = __webpack_require__(36)
453
+ var clone = __webpack_require__(37)
498
454
 
499
- var util = __webpack_require__(9)
455
+ var util = __webpack_require__(10)
500
456
 
501
457
  /* istanbul ignore next - node 0.x polyfill */
502
458
  var gracefulQueue
@@ -577,7 +533,7 @@ if (!fs[gracefulQueue]) {
577
533
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
578
534
  process.on('exit', function() {
579
535
  debug(fs[gracefulQueue])
580
- __webpack_require__(5).equal(fs[gracefulQueue].length, 0)
536
+ __webpack_require__(7).equal(fs[gracefulQueue].length, 0)
581
537
  })
582
538
  }
583
539
  }
@@ -2484,7 +2440,7 @@ function _typeof2(o) { "@babel/helpers - typeof"; return _typeof2 = "function" =
2484
2440
  /***/
2485
2441
  }), (/* 15 */
2486
2442
  /***/function (module, exports) {
2487
- module.exports = __webpack_require__(9);
2443
+ module.exports = __webpack_require__(10);
2488
2444
 
2489
2445
  /***/
2490
2446
  }), (/* 16 */
@@ -9627,12 +9583,12 @@ function _typeof2(o) { "@babel/helpers - typeof"; return _typeof2 = "function" =
9627
9583
  /***/
9628
9584
  }), (/* 32 */
9629
9585
  /***/function (module, exports) {
9630
- module.exports = __webpack_require__(10);
9586
+ module.exports = __webpack_require__(11);
9631
9587
 
9632
9588
  /***/
9633
9589
  }), (/* 33 */
9634
9590
  /***/function (module, exports) {
9635
- module.exports = __webpack_require__(5);
9591
+ module.exports = __webpack_require__(7);
9636
9592
 
9637
9593
  /***/
9638
9594
  }), (/* 34 */
@@ -10293,7 +10249,7 @@ function _typeof2(o) { "@babel/helpers - typeof"; return _typeof2 = "function" =
10293
10249
  /***/
10294
10250
  }), (/* 41 */
10295
10251
  /***/function (module, exports) {
10296
- module.exports = __webpack_require__(11);
10252
+ module.exports = __webpack_require__(8);
10297
10253
 
10298
10254
  /***/
10299
10255
  }), (/* 42 */
@@ -11721,7 +11677,7 @@ module.exports = _classCallCheck, module.exports.__esModule = true, module.expor
11721
11677
  /* 20 */
11722
11678
  /***/ (function(module, exports, __webpack_require__) {
11723
11679
 
11724
- var toPropertyKey = __webpack_require__(8);
11680
+ var toPropertyKey = __webpack_require__(9);
11725
11681
  function _defineProperties(e, r) {
11726
11682
  for (var t = 0; t < r.length; t++) {
11727
11683
  var o = r[t];
@@ -11762,8 +11718,8 @@ type DotenvConfigOutput = {
11762
11718
 
11763
11719
  */
11764
11720
 
11765
- const fs = __webpack_require__(6)
11766
- const path = __webpack_require__(7)
11721
+ const fs = __webpack_require__(3)
11722
+ const path = __webpack_require__(4)
11767
11723
 
11768
11724
  function log (message /*: string */) {
11769
11725
  console.log(`[dotenv][DEBUG] ${message}`)
@@ -11858,7 +11814,7 @@ module.exports.parse = parse
11858
11814
  /* 22 */
11859
11815
  /***/ (function(module, exports, __webpack_require__) {
11860
11816
 
11861
- var _typeof = __webpack_require__(4)["default"];
11817
+ var _typeof = __webpack_require__(6)["default"];
11862
11818
  function toPrimitive(t, r) {
11863
11819
  if ("object" != _typeof(t) || !t) return t;
11864
11820
  var e = t[Symbol.toPrimitive];
@@ -12043,7 +11999,7 @@ module.exports = _regeneratorKeys, module.exports.__esModule = true, module.expo
12043
11999
  /* 32 */
12044
12000
  /***/ (function(module, exports, __webpack_require__) {
12045
12001
 
12046
- var _typeof = __webpack_require__(4)["default"];
12002
+ var _typeof = __webpack_require__(6)["default"];
12047
12003
  function _regeneratorValues(e) {
12048
12004
  if (null != e) {
12049
12005
  var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
@@ -12070,58 +12026,11 @@ module.exports = _regeneratorValues, module.exports.__esModule = true, module.ex
12070
12026
  "use strict";
12071
12027
 
12072
12028
 
12073
- const lockfile = __webpack_require__(34);
12074
- const { toPromise, toSync, toSyncOptions } = __webpack_require__(46);
12075
-
12076
- async function lock(file, options) {
12077
- const release = await toPromise(lockfile.lock)(file, options);
12078
-
12079
- return toPromise(release);
12080
- }
12081
-
12082
- function lockSync(file, options) {
12083
- const release = toSync(lockfile.lock)(file, toSyncOptions(options));
12084
-
12085
- return toSync(release);
12086
- }
12087
-
12088
- function unlock(file, options) {
12089
- return toPromise(lockfile.unlock)(file, options);
12090
- }
12091
-
12092
- function unlockSync(file, options) {
12093
- return toSync(lockfile.unlock)(file, toSyncOptions(options));
12094
- }
12095
-
12096
- function check(file, options) {
12097
- return toPromise(lockfile.check)(file, options);
12098
- }
12099
-
12100
- function checkSync(file, options) {
12101
- return toSync(lockfile.check)(file, toSyncOptions(options));
12102
- }
12103
-
12104
- module.exports = lock;
12105
- module.exports.lock = lock;
12106
- module.exports.unlock = unlock;
12107
- module.exports.lockSync = lockSync;
12108
- module.exports.unlockSync = unlockSync;
12109
- module.exports.check = check;
12110
- module.exports.checkSync = checkSync;
12111
-
12112
-
12113
- /***/ }),
12114
- /* 34 */
12115
- /***/ (function(module, exports, __webpack_require__) {
12116
-
12117
- "use strict";
12118
-
12119
-
12120
- const path = __webpack_require__(7);
12029
+ const path = __webpack_require__(4);
12121
12030
  const fs = __webpack_require__(17);
12122
- const retry = __webpack_require__(39);
12123
- const onExit = __webpack_require__(42);
12124
- const mtimePrecision = __webpack_require__(45);
12031
+ const retry = __webpack_require__(38);
12032
+ const onExit = __webpack_require__(41);
12033
+ const mtimePrecision = __webpack_require__(44);
12125
12034
 
12126
12035
  const locks = {};
12127
12036
 
@@ -12460,10 +12369,10 @@ module.exports.getLocks = getLocks;
12460
12369
 
12461
12370
 
12462
12371
  /***/ }),
12463
- /* 35 */
12372
+ /* 34 */
12464
12373
  /***/ (function(module, exports, __webpack_require__) {
12465
12374
 
12466
- var constants = __webpack_require__(36)
12375
+ var constants = __webpack_require__(35)
12467
12376
 
12468
12377
  var origCwd = process.cwd
12469
12378
  var cwd = null
@@ -12821,16 +12730,16 @@ function patch (fs) {
12821
12730
 
12822
12731
 
12823
12732
  /***/ }),
12824
- /* 36 */
12733
+ /* 35 */
12825
12734
  /***/ (function(module, exports) {
12826
12735
 
12827
12736
  module.exports = require("constants");
12828
12737
 
12829
12738
  /***/ }),
12830
- /* 37 */
12739
+ /* 36 */
12831
12740
  /***/ (function(module, exports, __webpack_require__) {
12832
12741
 
12833
- var Stream = __webpack_require__(10).Stream
12742
+ var Stream = __webpack_require__(11).Stream
12834
12743
 
12835
12744
  module.exports = legacy
12836
12745
 
@@ -12951,7 +12860,7 @@ function legacy (fs) {
12951
12860
 
12952
12861
 
12953
12862
  /***/ }),
12954
- /* 38 */
12863
+ /* 37 */
12955
12864
  /***/ (function(module, exports, __webpack_require__) {
12956
12865
 
12957
12866
  "use strict";
@@ -12981,16 +12890,16 @@ function clone (obj) {
12981
12890
 
12982
12891
 
12983
12892
  /***/ }),
12984
- /* 39 */
12893
+ /* 38 */
12985
12894
  /***/ (function(module, exports, __webpack_require__) {
12986
12895
 
12987
- module.exports = __webpack_require__(40);
12896
+ module.exports = __webpack_require__(39);
12988
12897
 
12989
12898
  /***/ }),
12990
- /* 40 */
12899
+ /* 39 */
12991
12900
  /***/ (function(module, exports, __webpack_require__) {
12992
12901
 
12993
- var RetryOperation = __webpack_require__(41);
12902
+ var RetryOperation = __webpack_require__(40);
12994
12903
 
12995
12904
  exports.operation = function(options) {
12996
12905
  var timeouts = exports.timeouts(options);
@@ -13093,7 +13002,7 @@ exports.wrap = function(obj, options, methods) {
13093
13002
 
13094
13003
 
13095
13004
  /***/ }),
13096
- /* 41 */
13005
+ /* 40 */
13097
13006
  /***/ (function(module, exports) {
13098
13007
 
13099
13008
  function RetryOperation(timeouts, options) {
@@ -13257,7 +13166,7 @@ RetryOperation.prototype.mainError = function() {
13257
13166
 
13258
13167
 
13259
13168
  /***/ }),
13260
- /* 42 */
13169
+ /* 41 */
13261
13170
  /***/ (function(module, exports, __webpack_require__) {
13262
13171
 
13263
13172
  // Note: since nyc uses this module to output coverage, any lines
@@ -13285,11 +13194,11 @@ if (!processOk(process)) {
13285
13194
  return function () {}
13286
13195
  }
13287
13196
  } else {
13288
- var assert = __webpack_require__(5)
13289
- var signals = __webpack_require__(43)
13197
+ var assert = __webpack_require__(7)
13198
+ var signals = __webpack_require__(42)
13290
13199
  var isWin = /^win/i.test(process.platform)
13291
13200
 
13292
- var EE = __webpack_require__(44)
13201
+ var EE = __webpack_require__(43)
13293
13202
  /* istanbul ignore if */
13294
13203
  if (typeof EE !== 'function') {
13295
13204
  EE = EE.EventEmitter
@@ -13465,7 +13374,7 @@ if (!processOk(process)) {
13465
13374
 
13466
13375
 
13467
13376
  /***/ }),
13468
- /* 43 */
13377
+ /* 42 */
13469
13378
  /***/ (function(module, exports) {
13470
13379
 
13471
13380
  // This is not the set of all possible signals.
@@ -13524,13 +13433,13 @@ if (process.platform === 'linux') {
13524
13433
 
13525
13434
 
13526
13435
  /***/ }),
13527
- /* 44 */
13436
+ /* 43 */
13528
13437
  /***/ (function(module, exports) {
13529
13438
 
13530
13439
  module.exports = require("events");
13531
13440
 
13532
13441
  /***/ }),
13533
- /* 45 */
13442
+ /* 44 */
13534
13443
  /***/ (function(module, exports, __webpack_require__) {
13535
13444
 
13536
13445
  "use strict";
@@ -13592,7 +13501,7 @@ module.exports.getMtime = getMtime;
13592
13501
 
13593
13502
 
13594
13503
  /***/ }),
13595
- /* 46 */
13504
+ /* 45 */
13596
13505
  /***/ (function(module, exports, __webpack_require__) {
13597
13506
 
13598
13507
  "use strict";
@@ -13684,7 +13593,7 @@ module.exports = {
13684
13593
 
13685
13594
 
13686
13595
  /***/ }),
13687
- /* 47 */
13596
+ /* 46 */
13688
13597
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
13689
13598
 
13690
13599
  "use strict";
@@ -13695,7 +13604,7 @@ __webpack_require__.r(__webpack_exports__);
13695
13604
  __webpack_require__.d(__webpack_exports__, "getSyncClient", function() { return /* binding */ getSyncClient; });
13696
13605
 
13697
13606
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
13698
- var defineProperty = __webpack_require__(3);
13607
+ var defineProperty = __webpack_require__(2);
13699
13608
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
13700
13609
 
13701
13610
  // EXTERNAL MODULE: ./node_modules/@agility/content-fetch/dist/agility-content-fetch.node.js
@@ -13710,8 +13619,79 @@ var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerat
13710
13619
  var regenerator = __webpack_require__(0);
13711
13620
  var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
13712
13621
 
13713
- // EXTERNAL MODULE: ./src/util.js
13714
- var util = __webpack_require__(2);
13622
+ // CONCATENATED MODULE: ./src/util.js
13623
+
13624
+ var asyncForEach = /*#__PURE__*/function () {var _ref = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(array, callback) {var index;return regenerator_default.a.wrap(function (_context) {while (1) switch (_context.prev = _context.next) {case 0:
13625
+ index = 0;case 1:if (!(index < array.length)) {_context.next = 3;break;}_context.next = 2;return (
13626
+ callback(array[index], index, array));case 2:index++;_context.next = 1;break;case 3:case "end":return _context.stop();}}, _callee);}));return function asyncForEach(_x, _x2) {return _ref.apply(this, arguments);};}();
13627
+
13628
+
13629
+
13630
+
13631
+ var getLogLevel = function getLogLevel() {
13632
+ var logLevel = (process.env.AGILITY_LOG_LEVEL || 'warning').toLowerCase();
13633
+
13634
+ if (logLevel !== 'debug' && logLevel !== 'info' && logLevel !== 'warning' && logLevel !== 'error' && logLevel !== 'none') {
13635
+ return 'warning';
13636
+ }
13637
+
13638
+ return logLevel;
13639
+
13640
+ };
13641
+
13642
+
13643
+ var logSuccess = function logSuccess(message) {
13644
+
13645
+ var logLevel = getLogLevel();
13646
+ if (logLevel === 'debug' || logLevel === 'info') {
13647
+
13648
+ message = "AgilityCMS => ".concat(message, " ");
13649
+ console.log('\x1b[32m%s\x1b[0m', message);
13650
+ }
13651
+ };
13652
+
13653
+ var logWarning = function logWarning(message) {
13654
+
13655
+ var logLevel = getLogLevel();
13656
+ if (logLevel === 'debug' || logLevel === 'info' || logLevel === 'warning') {
13657
+
13658
+ message = "AgilityCMS => ".concat(message, " ");
13659
+ console.log('\x1b[33m%s\x1b[0m', message);
13660
+ }
13661
+ };
13662
+
13663
+ var logError = function logError(message) {
13664
+
13665
+ var logLevel = getLogLevel();
13666
+ if (logLevel === 'debug' || logLevel === 'info' || logLevel === 'warning' || logLevel === 'error') {
13667
+
13668
+ message = "AgilityCMS => ".concat(message, " ");
13669
+ console.log('\x1b[31m%s\x1b[0m', message);
13670
+ }
13671
+ };
13672
+
13673
+ var logInfo = function logInfo(message) {
13674
+ var logLevel = getLogLevel();
13675
+ if (logLevel === 'debug' || logLevel === 'info') {
13676
+ message = "AgilityCMS => ".concat(message, " ");
13677
+ console.log(message);
13678
+ }
13679
+ };
13680
+
13681
+ var logDebug = function logDebug(message) {
13682
+ var logLevel = getLogLevel();
13683
+ if (logLevel === 'debug') {
13684
+ console.log('#######################################################################');
13685
+ message = "AgilityCMS(debug) => ".concat(message, " ");
13686
+ console.log('"\x1b[35m%s\x1b[0m', message);
13687
+ }
13688
+ };
13689
+
13690
+
13691
+ var sleep = function sleep(ms) {
13692
+ return new Promise(function (resolve) {return setTimeout(resolve, ms);});
13693
+ };
13694
+
13715
13695
 
13716
13696
  // CONCATENATED MODULE: ./src/methods/syncContent.js
13717
13697
 
@@ -13747,22 +13727,22 @@ var util = __webpack_require__(2);
13747
13727
  //if the api is being updated, wait a few ms and try again...
13748
13728
  waitMS += waitIntervalMS;if (!(
13749
13729
  waitMS > waitMaxMS)) {_context.next = 3;break;}
13750
- Object(util["logWarning"])("Sync API has been busy for too long, canceling.");return _context.abrupt("continue", 12);case 3:
13730
+ logWarning("Sync API has been busy for too long, canceling.");return _context.abrupt("continue", 12);case 3:
13751
13731
 
13752
13732
 
13753
13733
 
13754
13734
  if (!busy) {
13755
13735
  //first time we're busy...
13756
13736
  busy = true;
13757
- Object(util["logInfo"])("Sync API is busy. Waiting...");
13737
+ logInfo("Sync API is busy. Waiting...");
13758
13738
  }_context.next = 4;return (
13759
13739
 
13760
- Object(util["sleep"])(waitIntervalMS));case 4:return _context.abrupt("continue", 11);case 5:
13740
+ sleep(waitIntervalMS));case 4:return _context.abrupt("continue", 11);case 5:
13761
13741
 
13762
13742
 
13763
13743
 
13764
13744
  if (busy === true) {
13765
- Object(util["logInfo"])("Continuing sync...");
13745
+ logInfo("Continuing sync...");
13766
13746
  busy = false;
13767
13747
  waitMS = 0;
13768
13748
  }
@@ -13788,9 +13768,9 @@ var util = __webpack_require__(2);
13788
13768
  token > 0 || busy === true) {_context.next = 1;break;}case 12:
13789
13769
 
13790
13770
  if (itemCount > 0) {
13791
- Object(util["logInfo"])("Content Sync returned ".concat(itemCount, " item(s)."));
13771
+ logInfo("Content Sync returned ".concat(itemCount, " item(s)."));
13792
13772
  } else {
13793
- Object(util["logInfo"])("Content Sync returned no item(s).");
13773
+ logInfo("Content Sync returned no item(s).");
13794
13774
  }return _context.abrupt("return",
13795
13775
 
13796
13776
  token);case 13:case "end":return _context.stop();}}, _callee);}));return syncContent_ref.apply(this, arguments);}
@@ -13799,7 +13779,7 @@ var util = __webpack_require__(2);
13799
13779
 
13800
13780
  /* harmony default export */ var methods_clearSync = (function (_x) {return clearSync_ref.apply(this, arguments);});function clearSync_ref() {clearSync_ref = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(storeInterface) {return regenerator_default.a.wrap(function (_context) {while (1) switch (_context.prev = _context.next) {case 0:_context.next = 1;return (
13801
13781
  storeInterface.clear());case 1:
13802
- Object(util["logSuccess"])("Cleared Sync Items");case 2:case "end":return _context.stop();}}, _callee);}));return clearSync_ref.apply(this, arguments);}
13782
+ logSuccess("Cleared Sync Items");case 2:case "end":return _context.stop();}}, _callee);}));return clearSync_ref.apply(this, arguments);}
13803
13783
  // CONCATENATED MODULE: ./src/methods/syncPages.js
13804
13784
 
13805
13785
 
@@ -13827,21 +13807,21 @@ var util = __webpack_require__(2);
13827
13807
  //if the api is being updated, wait a few ms and try again...
13828
13808
  waitMS += waitIntervalMS;if (!(
13829
13809
  waitMS > waitMaxMS)) {_context.next = 3;break;}
13830
- Object(util["logWarning"])("Sync API has been busy for too long, canceling.");return _context.abrupt("continue", 12);case 3:
13810
+ logWarning("Sync API has been busy for too long, canceling.");return _context.abrupt("continue", 12);case 3:
13831
13811
 
13832
13812
 
13833
13813
 
13834
13814
  if (!busy) {
13835
13815
  busy = true;
13836
- Object(util["logInfo"])("Sync API is busy. Waiting...");
13816
+ logInfo("Sync API is busy. Waiting...");
13837
13817
  }_context.next = 4;return (
13838
13818
 
13839
- Object(util["sleep"])(waitIntervalMS));case 4:return _context.abrupt("continue", 11);case 5:
13819
+ sleep(waitIntervalMS));case 4:return _context.abrupt("continue", 11);case 5:
13840
13820
 
13841
13821
 
13842
13822
 
13843
13823
  if (busy === true) {
13844
- Object(util["logInfo"])("Continuing sync...");
13824
+ logInfo("Continuing sync...");
13845
13825
  waitMS = 0;
13846
13826
  busy = false;
13847
13827
  }
@@ -13869,9 +13849,9 @@ var util = __webpack_require__(2);
13869
13849
  token > 0 || busy === true) {_context.next = 1;break;}case 12:
13870
13850
 
13871
13851
  if (itemCount > 0) {
13872
- Object(util["logInfo"])("Page Sync returned ".concat(itemCount, " item(s)."));
13852
+ logInfo("Page Sync returned ".concat(itemCount, " item(s)."));
13873
13853
  } else {
13874
- Object(util["logInfo"])("Page Sync returned no item(s).");
13854
+ logInfo("Page Sync returned no item(s).");
13875
13855
  }return _context.abrupt("return",
13876
13856
 
13877
13857
 
@@ -13927,7 +13907,7 @@ var sync = /*#__PURE__*/function () {var _ref2 = asyncToGenerator_default()(/*#_
13927
13907
 
13928
13908
 
13929
13909
 
13930
- Object(util["logSuccess"])("Starting Sync for ".concat(languageCode, " - ").concat(modeStr, " mode."));_context2.next = 5;return (
13910
+ logSuccess("Starting Sync for ".concat(languageCode, " - ").concat(modeStr, " mode."));_context2.next = 5;return (
13931
13911
  syncContent(languageCode, syncState.itemToken));case 5:newItemToken = _context2.sent;_context2.next = 6;return (
13932
13912
  syncPages(languageCode, syncState.pageToken));case 6:newPageToken = _context2.sent;if (!(
13933
13913
 
@@ -13936,7 +13916,7 @@ var sync = /*#__PURE__*/function () {var _ref2 = asyncToGenerator_default()(/*#_
13936
13916
  //if we sync ANYTHING - pull the new sitemap down
13937
13917
  _iterator2 = _createForOfIteratorHelper(
13938
13918
  channels);_context2.prev = 7;_iterator2.s();case 8:if ((_step2 = _iterator2.n()).done) {_context2.next = 12;break;}channelName = _step2.value;
13939
- Object(util["logInfo"])("Updating Sitemap channel ".concat(channelName, " in ").concat(languageCode));_context2.next = 9;return (
13919
+ logInfo("Updating Sitemap channel ".concat(channelName, " in ").concat(languageCode));_context2.next = 9;return (
13940
13920
 
13941
13921
  agilityClient.getSitemapFlat({ channelName: channelName, languageCode: languageCode }));case 9:sitemap = _context2.sent;
13942
13922
  storeInterface.saveSitemap({ sitemap: sitemap, languageCode: languageCode, channelName: channelName });_context2.next = 10;return (
@@ -13954,7 +13934,7 @@ var sync = /*#__PURE__*/function () {var _ref2 = asyncToGenerator_default()(/*#_
13954
13934
 
13955
13935
  agilityClient.getUrlRedirections({ lastAccessDate: lastAccessDate }));case 17:urlRedirections = _context2.sent;if (!(
13956
13936
  urlRedirections && urlRedirections.isUpToDate === false)) {_context2.next = 18;break;}
13957
- Object(util["logInfo"])("URL Redirections Updated and Saved");_context2.next = 18;return (
13937
+ logInfo("URL Redirections Updated and Saved");_context2.next = 18;return (
13958
13938
  storeInterface.saveUrlRedirections({ urlRedirections: urlRedirections, languageCode: languageCode }));case 18:
13959
13939
 
13960
13940
 
@@ -13964,7 +13944,7 @@ var sync = /*#__PURE__*/function () {var _ref2 = asyncToGenerator_default()(/*#_
13964
13944
 
13965
13945
  storeInterface.saveSyncState({ syncState: syncState, languageCode: languageCode }));case 19:
13966
13946
 
13967
- Object(util["logSuccess"])("Completed Sync for ".concat(languageCode, " - ").concat(modeStr, " mode."));case 20:_context2.next = 2;break;case 21:_context2.next = 23;break;case 22:_context2.prev = 22;_t2 = _context2["catch"](1);_iterator.e(_t2);case 23:_context2.prev = 23;_iterator.f();return _context2.finish(23);case 24:case "end":return _context2.stop();}}, _callee2, null, [[1, 22, 23, 24], [7, 13, 14, 15]]);}));return function sync(_x6, _x7, _x8, _x9, _x0) {return _ref2.apply(this, arguments);};}();
13947
+ logSuccess("Completed Sync for ".concat(languageCode, " - ").concat(modeStr, " mode."));case 20:_context2.next = 2;break;case 21:_context2.next = 23;break;case 22:_context2.prev = 22;_t2 = _context2["catch"](1);_iterator.e(_t2);case 23:_context2.prev = 23;_iterator.f();return _context2.finish(23);case 24:case "end":return _context2.stop();}}, _callee2, null, [[1, 22, 23, 24], [7, 13, 14, 15]]);}));return function sync(_x6, _x7, _x8, _x9, _x0) {return _ref2.apply(this, arguments);};}();
13968
13948
 
13969
13949
 
13970
13950
 
@@ -14039,7 +14019,7 @@ var store_interface_StoreInterface = /*#__PURE__*/function () {
14039
14019
  !contentItem ||
14040
14020
  !contentItem.properties)) {_context.next = 1;break;}
14041
14021
 
14042
- Object(util["logWarning"])("Null item or item with no properties cannot be saved");return _context.abrupt("return");case 1:
14022
+ logWarning("Null item or item with no properties cannot be saved");return _context.abrupt("return");case 1:
14043
14023
 
14044
14024
 
14045
14025
 
@@ -14073,7 +14053,7 @@ var store_interface_StoreInterface = /*#__PURE__*/function () {
14073
14053
 
14074
14054
  !contentItem.properties.definitionName ||
14075
14055
  !contentItem.properties.referenceName)) {_context.next = 5;break;}
14076
- Object(util["logWarning"])("Content with id ".concat(contentItem.contentID, " does not have the neccessary properties to be saved."));return _context.abrupt("return");case 5:_context.next = 6;return (
14056
+ logWarning("Content with id ".concat(contentItem.contentID, " does not have the neccessary properties to be saved."));return _context.abrupt("return");case 5:_context.next = 6;return (
14077
14057
 
14078
14058
 
14079
14059
 
@@ -14462,16 +14442,31 @@ var store_interface_StoreInterface = /*#__PURE__*/function () {
14462
14442
  */defineProperty_default()(this, "clear", /*#__PURE__*/asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(
14463
14443
  function _callee13() {return regenerator_default.a.wrap(function (_context13) {while (1) switch (_context13.prev = _context13.next) {case 0:_context13.next = 1;return (
14464
14444
  _this.store.clearItems({ options: _this.options }));case 1:case "end":return _context13.stop();}}, _callee13);})));this.store = store;this.options = options;}return createClass_default()(StoreInterface, [{ key: "validateStoreInterface", value: function validateStoreInterface(storeCandidate) {if (!storeCandidate.clearItems) {throw new TypeError("Your sync store interface must implement `clearItems`.");}if (!storeCandidate.deleteItem) {throw new TypeError("Your sync store interface must implement `deleteItem`.");}if (!storeCandidate.getItem) {throw new TypeError("Your sync store interface must implement `getItem`.");}if (!storeCandidate.saveItem) {throw new TypeError("Your sync store interface must implement `saveItem`.");}if (!storeCandidate.mergeItemToList) {throw new TypeError("Your sync store interface must implement `mergeItemToList`.");}} }]);}();
14445
+ // EXTERNAL MODULE: external "fs"
14446
+ var external_fs_ = __webpack_require__(3);
14447
+ var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_);
14448
+
14449
+ // EXTERNAL MODULE: external "os"
14450
+ var external_os_ = __webpack_require__(8);
14451
+ var external_os_default = /*#__PURE__*/__webpack_require__.n(external_os_);
14452
+
14453
+ // EXTERNAL MODULE: external "path"
14454
+ var external_path_ = __webpack_require__(4);
14455
+ var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_);
14456
+
14457
+ // EXTERNAL MODULE: ./node_modules/proper-lockfile/index.js
14458
+ var proper_lockfile = __webpack_require__(5);
14459
+
14465
14460
  // EXTERNAL MODULE: ./node_modules/dotenv/lib/main.js
14466
14461
  var main = __webpack_require__(21);
14467
14462
  var main_default = /*#__PURE__*/__webpack_require__.n(main);
14468
14463
 
14469
14464
  // CONCATENATED MODULE: ./src/store-interface-filesystem.js
14470
- var fs = __webpack_require__(6);
14471
- var os = __webpack_require__(11);
14472
- var path = __webpack_require__(7);
14473
- var _require = __webpack_require__(2),sleep = _require.sleep;
14474
- var _require2 = __webpack_require__(33),lockSync = _require2.lockSync,check = _require2.check;
14465
+
14466
+
14467
+
14468
+
14469
+
14475
14470
 
14476
14471
 
14477
14472
  main_default.a.config({
@@ -14491,17 +14486,17 @@ main_default.a.config({
14491
14486
  */
14492
14487
  var saveItem = /*#__PURE__*/function () {var _ref2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee(_ref) {var options, item, itemType, languageCode, itemID, filePath, dirPath, json;return regenerator_default.a.wrap(function (_context) {while (1) switch (_context.prev = _context.next) {case 0:options = _ref.options, item = _ref.item, itemType = _ref.itemType, languageCode = _ref.languageCode, itemID = _ref.itemID;
14493
14488
 
14494
- filePath = getFilePath({ options: options, itemType: itemType, languageCode: languageCode, itemID: itemID });
14489
+ filePath = store_interface_filesystem_getFilePath({ options: options, itemType: itemType, languageCode: languageCode, itemID: itemID });
14495
14490
 
14496
- dirPath = path.dirname(filePath);if (
14491
+ dirPath = external_path_default.a.dirname(filePath);if (
14497
14492
 
14498
14493
 
14499
- fs.existsSync(dirPath)) {_context.next = 1;break;}_context.next = 1;return (
14500
- fs.promises.mkdir(dirPath, { recursive: true }));case 1:
14494
+ external_fs_default.a.existsSync(dirPath)) {_context.next = 1;break;}_context.next = 1;return (
14495
+ external_fs_default.a.promises.mkdir(dirPath, { recursive: true }));case 1:
14501
14496
 
14502
14497
 
14503
14498
  json = JSON.stringify(item);_context.next = 2;return (
14504
- fs.promises.writeFile(filePath, json));case 2:case "end":return _context.stop();}}, _callee);}));return function saveItem(_x) {return _ref2.apply(this, arguments);};}();
14499
+ external_fs_default.a.promises.writeFile(filePath, json));case 2:case "end":return _context.stop();}}, _callee);}));return function saveItem(_x) {return _ref2.apply(this, arguments);};}();
14505
14500
 
14506
14501
  /**
14507
14502
  * The function to handle deleting an item to your storage. This could be a Content Item, Page, Url Redirections, Sync State (state), or Sitemap.
@@ -14515,10 +14510,10 @@ var saveItem = /*#__PURE__*/function () {var _ref2 = asyncToGenerator_default()(
14515
14510
  */
14516
14511
  var deleteItem = /*#__PURE__*/function () {var _ref4 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee2(_ref3) {var options, itemType, languageCode, itemID, filePath;return regenerator_default.a.wrap(function (_context2) {while (1) switch (_context2.prev = _context2.next) {case 0:options = _ref3.options, itemType = _ref3.itemType, languageCode = _ref3.languageCode, itemID = _ref3.itemID;
14517
14512
 
14518
- filePath = getFilePath({ options: options, itemType: itemType, languageCode: languageCode, itemID: itemID });if (!
14513
+ filePath = store_interface_filesystem_getFilePath({ options: options, itemType: itemType, languageCode: languageCode, itemID: itemID });if (!
14519
14514
 
14520
- fs.existsSync(filePath)) {_context2.next = 1;break;}_context2.next = 1;return (
14521
- fs.promises.unlink(filePath));case 1:case "end":return _context2.stop();}}, _callee2);}));return function deleteItem(_x2) {return _ref4.apply(this, arguments);};}();
14515
+ external_fs_default.a.existsSync(filePath)) {_context2.next = 1;break;}_context2.next = 1;return (
14516
+ external_fs_default.a.promises.unlink(filePath));case 1:case "end":return _context2.stop();}}, _callee2);}));return function deleteItem(_x2) {return _ref4.apply(this, arguments);};}();
14522
14517
 
14523
14518
 
14524
14519
 
@@ -14579,11 +14574,11 @@ var mergeItemToList = /*#__PURE__*/function () {var _ref6 = asyncToGenerator_def
14579
14574
  * @returns {Promise<Object>}
14580
14575
  */
14581
14576
  var getItem = /*#__PURE__*/function () {var _ref8 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee4(_ref7) {var options, itemType, languageCode, itemID, filePath, json;return regenerator_default.a.wrap(function (_context4) {while (1) switch (_context4.prev = _context4.next) {case 0:options = _ref7.options, itemType = _ref7.itemType, languageCode = _ref7.languageCode, itemID = _ref7.itemID;
14582
- filePath = getFilePath({ options: options, itemType: itemType, languageCode: languageCode, itemID: itemID });if (
14577
+ filePath = store_interface_filesystem_getFilePath({ options: options, itemType: itemType, languageCode: languageCode, itemID: itemID });if (
14583
14578
 
14584
- fs.existsSync(filePath)) {_context4.next = 1;break;}return _context4.abrupt("return", null);case 1:_context4.next = 2;return (
14579
+ external_fs_default.a.existsSync(filePath)) {_context4.next = 1;break;}return _context4.abrupt("return", null);case 1:_context4.next = 2;return (
14585
14580
 
14586
- fs.promises.readFile(filePath, 'utf8'));case 2:json = _context4.sent;return _context4.abrupt("return",
14581
+ external_fs_default.a.promises.readFile(filePath, 'utf8'));case 2:json = _context4.sent;return _context4.abrupt("return",
14587
14582
  JSON.parse(json));case 3:case "end":return _context4.stop();}}, _callee4);}));return function getItem(_x4) {return _ref8.apply(this, arguments);};}();
14588
14583
 
14589
14584
 
@@ -14595,7 +14590,7 @@ var getItem = /*#__PURE__*/function () {var _ref8 = asyncToGenerator_default()(/
14595
14590
  * @returns {Promise<void>}
14596
14591
  */
14597
14592
  var clearItems = /*#__PURE__*/function () {var _ref0 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee5(_ref9) {var options;return regenerator_default.a.wrap(function (_context5) {while (1) switch (_context5.prev = _context5.next) {case 0:options = _ref9.options;_context5.next = 1;return (
14598
- fs.promises.rmdir(options.rootPath, { recursive: true }));case 1:case "end":return _context5.stop();}}, _callee5);}));return function clearItems(_x5) {return _ref0.apply(this, arguments);};}();
14593
+ external_fs_default.a.promises.rmdir(options.rootPath, { recursive: true }));case 1:case "end":return _context5.stop();}}, _callee5);}));return function clearItems(_x5) {return _ref0.apply(this, arguments);};}();
14599
14594
 
14600
14595
 
14601
14596
 
@@ -14607,17 +14602,17 @@ var clearItems = /*#__PURE__*/function () {var _ref0 = asyncToGenerator_default(
14607
14602
  var mutexLock = /*#__PURE__*/function () {var _ref1 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee6() {var dir, lockFile, _t, _t2;return regenerator_default.a.wrap(function (_context6) {while (1) switch (_context6.prev = _context6.next) {case 0:
14608
14603
 
14609
14604
 
14610
- dir = os.tmpdir();
14605
+ dir = external_os_default.a.tmpdir();
14611
14606
  lockFile = "".concat(dir, "/", "agility-sync", ".mutex");if (
14612
- fs.existsSync(lockFile)) {_context6.next = 1;break;}_context6.next = 1;return (
14613
- fs.promises.writeFile(lockFile, "agility-sync"));case 1:_context6.next = 2;return (
14607
+ external_fs_default.a.existsSync(lockFile)) {_context6.next = 1;break;}_context6.next = 1;return (
14608
+ external_fs_default.a.promises.writeFile(lockFile, "agility-sync"));case 1:_context6.next = 2;return (
14614
14609
 
14615
14610
 
14616
14611
 
14617
14612
  waitOnLock(lockFile));case 2:_context6.prev = 2;return _context6.abrupt("return",
14618
14613
 
14619
14614
 
14620
- lockSync(lockFile));case 3:_context6.prev = 3;_t = _context6["catch"](2);if (!(
14615
+ Object(proper_lockfile["lockSync"])(lockFile));case 3:_context6.prev = 3;_t = _context6["catch"](2);if (!(
14621
14616
 
14622
14617
  "".concat(_t).indexOf("Lock file is already being held") !== -1)) {_context6.next = 9;break;}_context6.next = 4;return (
14623
14618
 
@@ -14626,14 +14621,14 @@ var mutexLock = /*#__PURE__*/function () {var _ref1 = asyncToGenerator_default()
14626
14621
  waitOnLock(lockFile));case 5:_context6.prev = 5;return _context6.abrupt("return",
14627
14622
 
14628
14623
 
14629
- lockSync(lockFile));case 6:_context6.prev = 6;_t2 = _context6["catch"](5);if (!(
14624
+ Object(proper_lockfile["lockSync"])(lockFile));case 6:_context6.prev = 6;_t2 = _context6["catch"](5);if (!(
14630
14625
 
14631
14626
  "".concat(_t).indexOf("Lock file is already being held") !== -1)) {_context6.next = 9;break;}_context6.next = 7;return (
14632
14627
 
14633
14628
 
14634
14629
  sleep(100));case 7:_context6.next = 8;return (
14635
14630
  waitOnLock(lockFile));case 8:return _context6.abrupt("return",
14636
- lockSync(lockFile));case 9:throw (
14631
+ Object(proper_lockfile["lockSync"])(lockFile));case 9:throw (
14637
14632
 
14638
14633
 
14639
14634
 
@@ -14646,18 +14641,18 @@ var mutexLock = /*#__PURE__*/function () {var _ref1 = asyncToGenerator_default()
14646
14641
 
14647
14642
  //private function to get a wait on a lock file
14648
14643
  var waitOnLock = /*#__PURE__*/function () {var _ref10 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default.a.mark(function _callee7(lockFile) {return regenerator_default.a.wrap(function (_context7) {while (1) switch (_context7.prev = _context7.next) {case 0:_context7.next = 1;return (
14649
- check(lockFile));case 1:if (!_context7.sent) {_context7.next = 3;break;}_context7.next = 2;return (
14644
+ Object(proper_lockfile["check"])(lockFile));case 1:if (!_context7.sent) {_context7.next = 3;break;}_context7.next = 2;return (
14650
14645
  sleep(100));case 2:_context7.next = 0;break;case 3:case "end":return _context7.stop();}}, _callee7);}));return function waitOnLock(_x6) {return _ref10.apply(this, arguments);};}();
14651
14646
 
14652
14647
 
14653
14648
 
14654
14649
  //private function to get path of an item
14655
- var getFilePath = function getFilePath(_ref11) {var options = _ref11.options,itemType = _ref11.itemType,languageCode = _ref11.languageCode,itemID = _ref11.itemID;
14650
+ var store_interface_filesystem_getFilePath = function getFilePath(_ref11) {var options = _ref11.options,itemType = _ref11.itemType,languageCode = _ref11.languageCode,itemID = _ref11.itemID;
14656
14651
  if (typeof itemID === 'string' || itemID instanceof String) {
14657
14652
  itemID = itemID.replace(/[`!@#$%^&*()+\=\[\]{};':"\\|,.<>\/?~]/g, "");
14658
14653
  }
14659
14654
  var fileName = "".concat(itemID, ".json");
14660
- return path.join(options.rootPath, languageCode, itemType, fileName);
14655
+ return external_path_default.a.join(options.rootPath, languageCode, itemType, fileName);
14661
14656
  };
14662
14657
 
14663
14658
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agility/content-sync",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "JavaScript SDK for synchronizing content from Agility CMS",
5
5
  "main": "dist/agility-sync-sdk.node.js",
6
6
  "scripts": {
@@ -1,8 +1,8 @@
1
- const fs = require('fs')
2
- const os = require('os')
3
- const path = require('path')
4
- const {sleep} = require("./util")
5
- const { lockSync, check } = require("proper-lockfile")
1
+ import fs from 'fs'
2
+ import os from 'os'
3
+ import path from 'path'
4
+ import { sleep } from "./util"
5
+ import { lockSync, check } from "proper-lockfile"
6
6
  import dotenv from "dotenv"
7
7
 
8
8
  dotenv.config({