@shipengine/alchemy 6.0.52 → 6.0.53

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.
Files changed (3) hide show
  1. package/index.js +69 -49
  2. package/index.mjs +69 -49
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -3938,17 +3938,25 @@ var _createBind = createBind$1;
3938
3938
  * @returns {*} Returns the result of `func`.
3939
3939
  */
3940
3940
 
3941
- function apply$2(func, thisArg, args) {
3942
- switch (args.length) {
3943
- case 0: return func.call(thisArg);
3944
- case 1: return func.call(thisArg, args[0]);
3945
- case 2: return func.call(thisArg, args[0], args[1]);
3946
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
3947
- }
3948
- return func.apply(thisArg, args);
3949
- }
3941
+ var _apply;
3942
+ var hasRequired_apply;
3943
+
3944
+ function require_apply () {
3945
+ if (hasRequired_apply) return _apply;
3946
+ hasRequired_apply = 1;
3947
+ function apply(func, thisArg, args) {
3948
+ switch (args.length) {
3949
+ case 0: return func.call(thisArg);
3950
+ case 1: return func.call(thisArg, args[0]);
3951
+ case 2: return func.call(thisArg, args[0], args[1]);
3952
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
3953
+ }
3954
+ return func.apply(thisArg, args);
3955
+ }
3950
3956
 
3951
- var _apply = apply$2;
3957
+ _apply = apply;
3958
+ return _apply;
3959
+ }
3952
3960
 
3953
3961
  /* Built-in method references for those with the same name as other `lodash` methods. */
3954
3962
 
@@ -4478,45 +4486,53 @@ var _isLaziable = isLaziable$1;
4478
4486
 
4479
4487
  /** Used to detect hot functions by number of calls within a span of milliseconds. */
4480
4488
 
4481
- var HOT_COUNT = 800,
4482
- HOT_SPAN = 16;
4489
+ var _shortOut;
4490
+ var hasRequired_shortOut;
4483
4491
 
4484
- /* Built-in method references for those with the same name as other `lodash` methods. */
4485
- var nativeNow = Date.now;
4492
+ function require_shortOut () {
4493
+ if (hasRequired_shortOut) return _shortOut;
4494
+ hasRequired_shortOut = 1;
4495
+ var HOT_COUNT = 800,
4496
+ HOT_SPAN = 16;
4486
4497
 
4487
- /**
4488
- * Creates a function that'll short out and invoke `identity` instead
4489
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
4490
- * milliseconds.
4491
- *
4492
- * @private
4493
- * @param {Function} func The function to restrict.
4494
- * @returns {Function} Returns the new shortable function.
4495
- */
4496
- function shortOut$1(func) {
4497
- var count = 0,
4498
- lastCalled = 0;
4498
+ /* Built-in method references for those with the same name as other `lodash` methods. */
4499
+ var nativeNow = Date.now;
4499
4500
 
4500
- return function() {
4501
- var stamp = nativeNow(),
4502
- remaining = HOT_SPAN - (stamp - lastCalled);
4501
+ /**
4502
+ * Creates a function that'll short out and invoke `identity` instead
4503
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
4504
+ * milliseconds.
4505
+ *
4506
+ * @private
4507
+ * @param {Function} func The function to restrict.
4508
+ * @returns {Function} Returns the new shortable function.
4509
+ */
4510
+ function shortOut(func) {
4511
+ var count = 0,
4512
+ lastCalled = 0;
4503
4513
 
4504
- lastCalled = stamp;
4505
- if (remaining > 0) {
4506
- if (++count >= HOT_COUNT) {
4507
- return arguments[0];
4508
- }
4509
- } else {
4510
- count = 0;
4511
- }
4512
- return func.apply(undefined, arguments);
4513
- };
4514
- }
4514
+ return function() {
4515
+ var stamp = nativeNow(),
4516
+ remaining = HOT_SPAN - (stamp - lastCalled);
4515
4517
 
4516
- var _shortOut = shortOut$1;
4518
+ lastCalled = stamp;
4519
+ if (remaining > 0) {
4520
+ if (++count >= HOT_COUNT) {
4521
+ return arguments[0];
4522
+ }
4523
+ } else {
4524
+ count = 0;
4525
+ }
4526
+ return func.apply(undefined, arguments);
4527
+ };
4528
+ }
4529
+
4530
+ _shortOut = shortOut;
4531
+ return _shortOut;
4532
+ }
4517
4533
 
4518
4534
  var baseSetData$1 = _baseSetData,
4519
- shortOut = _shortOut;
4535
+ shortOut = require_shortOut();
4520
4536
 
4521
4537
  /**
4522
4538
  * Sets metadata for `func`.
@@ -4674,7 +4690,7 @@ function require_setToString () {
4674
4690
  if (hasRequired_setToString) return _setToString;
4675
4691
  hasRequired_setToString = 1;
4676
4692
  var baseSetToString = require_baseSetToString(),
4677
- shortOut = _shortOut;
4693
+ shortOut = require_shortOut();
4678
4694
 
4679
4695
  /**
4680
4696
  * Sets the `toString` method of `func` to return `string`.
@@ -5148,7 +5164,7 @@ function createHybrid$2(func, bitmask, thisArg, partials, holders, partialsRight
5148
5164
 
5149
5165
  var _createHybrid = createHybrid$2;
5150
5166
 
5151
- var apply$1 = _apply,
5167
+ var apply$1 = require_apply(),
5152
5168
  createCtor$1 = _createCtor,
5153
5169
  createHybrid$1 = _createHybrid,
5154
5170
  createRecurry = _createRecurry,
@@ -5195,7 +5211,7 @@ function createCurry$1(func, bitmask, arity) {
5195
5211
 
5196
5212
  var _createCurry = createCurry$1;
5197
5213
 
5198
- var apply = _apply,
5214
+ var apply = require_apply(),
5199
5215
  createCtor = _createCtor,
5200
5216
  root$4 = _root;
5201
5217
 
@@ -9967,7 +9983,7 @@ var hasRequired_overRest;
9967
9983
  function require_overRest () {
9968
9984
  if (hasRequired_overRest) return _overRest;
9969
9985
  hasRequired_overRest = 1;
9970
- var apply = _apply;
9986
+ var apply = require_apply();
9971
9987
 
9972
9988
  /* Built-in method references for those with the same name as other `lodash` methods. */
9973
9989
  var nativeMax = Math.max;
@@ -13976,9 +13992,9 @@ const getEndUserIpAddress = () => __async$10(void 0, null, function* () {
13976
13992
  }
13977
13993
  });
13978
13994
 
13979
- const camelizeKeys = (obj) => {
13995
+ const camelizeKeys = (obj, parentKey) => {
13980
13996
  if (Array.isArray(obj)) {
13981
- return obj.map(camelizeKeys);
13997
+ return obj.map((item) => camelizeKeys(item, parentKey));
13982
13998
  } else if (obj !== null && typeof obj === "object") {
13983
13999
  const newObj = {};
13984
14000
  for (const key in obj) {
@@ -13998,7 +14014,11 @@ const camelizeKeys = (obj) => {
13998
14014
  newKey += char;
13999
14015
  }
14000
14016
  }
14001
- newObj[newKey] = camelizeKeys(obj[key]);
14017
+ if (parentKey === "formSchema" && ["jsonSchema", "uiSchema", "brandedContent"].includes(newKey)) {
14018
+ newObj[newKey] = obj[key];
14019
+ } else {
14020
+ newObj[newKey] = camelizeKeys(obj[key], newKey);
14021
+ }
14002
14022
  }
14003
14023
  }
14004
14024
  return newObj;
package/index.mjs CHANGED
@@ -3916,17 +3916,25 @@ var _createBind = createBind$1;
3916
3916
  * @returns {*} Returns the result of `func`.
3917
3917
  */
3918
3918
 
3919
- function apply$2(func, thisArg, args) {
3920
- switch (args.length) {
3921
- case 0: return func.call(thisArg);
3922
- case 1: return func.call(thisArg, args[0]);
3923
- case 2: return func.call(thisArg, args[0], args[1]);
3924
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
3925
- }
3926
- return func.apply(thisArg, args);
3927
- }
3919
+ var _apply;
3920
+ var hasRequired_apply;
3921
+
3922
+ function require_apply () {
3923
+ if (hasRequired_apply) return _apply;
3924
+ hasRequired_apply = 1;
3925
+ function apply(func, thisArg, args) {
3926
+ switch (args.length) {
3927
+ case 0: return func.call(thisArg);
3928
+ case 1: return func.call(thisArg, args[0]);
3929
+ case 2: return func.call(thisArg, args[0], args[1]);
3930
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
3931
+ }
3932
+ return func.apply(thisArg, args);
3933
+ }
3928
3934
 
3929
- var _apply = apply$2;
3935
+ _apply = apply;
3936
+ return _apply;
3937
+ }
3930
3938
 
3931
3939
  /* Built-in method references for those with the same name as other `lodash` methods. */
3932
3940
 
@@ -4456,45 +4464,53 @@ var _isLaziable = isLaziable$1;
4456
4464
 
4457
4465
  /** Used to detect hot functions by number of calls within a span of milliseconds. */
4458
4466
 
4459
- var HOT_COUNT = 800,
4460
- HOT_SPAN = 16;
4467
+ var _shortOut;
4468
+ var hasRequired_shortOut;
4461
4469
 
4462
- /* Built-in method references for those with the same name as other `lodash` methods. */
4463
- var nativeNow = Date.now;
4470
+ function require_shortOut () {
4471
+ if (hasRequired_shortOut) return _shortOut;
4472
+ hasRequired_shortOut = 1;
4473
+ var HOT_COUNT = 800,
4474
+ HOT_SPAN = 16;
4464
4475
 
4465
- /**
4466
- * Creates a function that'll short out and invoke `identity` instead
4467
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
4468
- * milliseconds.
4469
- *
4470
- * @private
4471
- * @param {Function} func The function to restrict.
4472
- * @returns {Function} Returns the new shortable function.
4473
- */
4474
- function shortOut$1(func) {
4475
- var count = 0,
4476
- lastCalled = 0;
4476
+ /* Built-in method references for those with the same name as other `lodash` methods. */
4477
+ var nativeNow = Date.now;
4477
4478
 
4478
- return function() {
4479
- var stamp = nativeNow(),
4480
- remaining = HOT_SPAN - (stamp - lastCalled);
4479
+ /**
4480
+ * Creates a function that'll short out and invoke `identity` instead
4481
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
4482
+ * milliseconds.
4483
+ *
4484
+ * @private
4485
+ * @param {Function} func The function to restrict.
4486
+ * @returns {Function} Returns the new shortable function.
4487
+ */
4488
+ function shortOut(func) {
4489
+ var count = 0,
4490
+ lastCalled = 0;
4481
4491
 
4482
- lastCalled = stamp;
4483
- if (remaining > 0) {
4484
- if (++count >= HOT_COUNT) {
4485
- return arguments[0];
4486
- }
4487
- } else {
4488
- count = 0;
4489
- }
4490
- return func.apply(undefined, arguments);
4491
- };
4492
- }
4492
+ return function() {
4493
+ var stamp = nativeNow(),
4494
+ remaining = HOT_SPAN - (stamp - lastCalled);
4493
4495
 
4494
- var _shortOut = shortOut$1;
4496
+ lastCalled = stamp;
4497
+ if (remaining > 0) {
4498
+ if (++count >= HOT_COUNT) {
4499
+ return arguments[0];
4500
+ }
4501
+ } else {
4502
+ count = 0;
4503
+ }
4504
+ return func.apply(undefined, arguments);
4505
+ };
4506
+ }
4507
+
4508
+ _shortOut = shortOut;
4509
+ return _shortOut;
4510
+ }
4495
4511
 
4496
4512
  var baseSetData$1 = _baseSetData,
4497
- shortOut = _shortOut;
4513
+ shortOut = require_shortOut();
4498
4514
 
4499
4515
  /**
4500
4516
  * Sets metadata for `func`.
@@ -4652,7 +4668,7 @@ function require_setToString () {
4652
4668
  if (hasRequired_setToString) return _setToString;
4653
4669
  hasRequired_setToString = 1;
4654
4670
  var baseSetToString = require_baseSetToString(),
4655
- shortOut = _shortOut;
4671
+ shortOut = require_shortOut();
4656
4672
 
4657
4673
  /**
4658
4674
  * Sets the `toString` method of `func` to return `string`.
@@ -5126,7 +5142,7 @@ function createHybrid$2(func, bitmask, thisArg, partials, holders, partialsRight
5126
5142
 
5127
5143
  var _createHybrid = createHybrid$2;
5128
5144
 
5129
- var apply$1 = _apply,
5145
+ var apply$1 = require_apply(),
5130
5146
  createCtor$1 = _createCtor,
5131
5147
  createHybrid$1 = _createHybrid,
5132
5148
  createRecurry = _createRecurry,
@@ -5173,7 +5189,7 @@ function createCurry$1(func, bitmask, arity) {
5173
5189
 
5174
5190
  var _createCurry = createCurry$1;
5175
5191
 
5176
- var apply = _apply,
5192
+ var apply = require_apply(),
5177
5193
  createCtor = _createCtor,
5178
5194
  root$4 = _root;
5179
5195
 
@@ -9945,7 +9961,7 @@ var hasRequired_overRest;
9945
9961
  function require_overRest () {
9946
9962
  if (hasRequired_overRest) return _overRest;
9947
9963
  hasRequired_overRest = 1;
9948
- var apply = _apply;
9964
+ var apply = require_apply();
9949
9965
 
9950
9966
  /* Built-in method references for those with the same name as other `lodash` methods. */
9951
9967
  var nativeMax = Math.max;
@@ -13954,9 +13970,9 @@ const getEndUserIpAddress = () => __async$10(void 0, null, function* () {
13954
13970
  }
13955
13971
  });
13956
13972
 
13957
- const camelizeKeys = (obj) => {
13973
+ const camelizeKeys = (obj, parentKey) => {
13958
13974
  if (Array.isArray(obj)) {
13959
- return obj.map(camelizeKeys);
13975
+ return obj.map((item) => camelizeKeys(item, parentKey));
13960
13976
  } else if (obj !== null && typeof obj === "object") {
13961
13977
  const newObj = {};
13962
13978
  for (const key in obj) {
@@ -13976,7 +13992,11 @@ const camelizeKeys = (obj) => {
13976
13992
  newKey += char;
13977
13993
  }
13978
13994
  }
13979
- newObj[newKey] = camelizeKeys(obj[key]);
13995
+ if (parentKey === "formSchema" && ["jsonSchema", "uiSchema", "brandedContent"].includes(newKey)) {
13996
+ newObj[newKey] = obj[key];
13997
+ } else {
13998
+ newObj[newKey] = camelizeKeys(obj[key], newKey);
13999
+ }
13980
14000
  }
13981
14001
  }
13982
14002
  return newObj;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/alchemy",
3
- "version": "6.0.52",
3
+ "version": "6.0.53",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {