orange-orm 4.2.0-beta.5 → 4.2.0
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.
- package/docs/changelog.md +2 -0
- package/package.json +1 -1
- package/src/client/index.js +22 -9
- package/src/client/index.mjs +135 -37
package/docs/changelog.md
CHANGED
package/package.json
CHANGED
package/src/client/index.js
CHANGED
|
@@ -488,7 +488,6 @@ function rdbClient(options = {}) {
|
|
|
488
488
|
rootMap.set(array, { json: cloneFromDb(array, fast), strategy, originalArray: [...array] });
|
|
489
489
|
});
|
|
490
490
|
let innerProxy = new Proxy(watcher, handler);
|
|
491
|
-
//todo
|
|
492
491
|
if (strategy !== undefined) {
|
|
493
492
|
const { limit, ...cleanStrategy } = { ...strategy };
|
|
494
493
|
fetchingStrategyMap.set(array, cleanStrategy);
|
|
@@ -593,7 +592,9 @@ function rdbClient(options = {}) {
|
|
|
593
592
|
|
|
594
593
|
async function saveArray(array, concurrencyOptions, strategy) {
|
|
595
594
|
let deduceStrategy = false;
|
|
596
|
-
let
|
|
595
|
+
let json = rootMap.get(array)?.json;
|
|
596
|
+
if (!json)
|
|
597
|
+
return;
|
|
597
598
|
strategy = extractStrategy({ strategy }, array);
|
|
598
599
|
strategy = extractFetchingStrategy(array, strategy);
|
|
599
600
|
|
|
@@ -673,7 +674,7 @@ function rdbClient(options = {}) {
|
|
|
673
674
|
return options.strategy;
|
|
674
675
|
if (obj) {
|
|
675
676
|
let context = rootMap.get(obj);
|
|
676
|
-
if (context
|
|
677
|
+
if (context?.strategy !== undefined) {
|
|
677
678
|
// @ts-ignore
|
|
678
679
|
let { limit, ...strategy } = { ...context.strategy };
|
|
679
680
|
return strategy;
|
|
@@ -692,13 +693,17 @@ function rdbClient(options = {}) {
|
|
|
692
693
|
}
|
|
693
694
|
|
|
694
695
|
function clearChangesArray(array) {
|
|
695
|
-
let
|
|
696
|
+
let json = rootMap.get(array)?.json;
|
|
697
|
+
if (!json)
|
|
698
|
+
return;
|
|
696
699
|
let old = cloneFromDb(json);
|
|
697
700
|
array.splice(0, old.length, ...old);
|
|
698
701
|
}
|
|
699
702
|
|
|
700
703
|
function acceptChangesArray(array) {
|
|
701
704
|
const map = rootMap.get(array);
|
|
705
|
+
if (!map)
|
|
706
|
+
return;
|
|
702
707
|
map.json = cloneFromDb(array);
|
|
703
708
|
map.originalArray = [...array];
|
|
704
709
|
}
|
|
@@ -796,7 +801,7 @@ function rdbClient(options = {}) {
|
|
|
796
801
|
strategy = extractStrategy({ strategy }, row);
|
|
797
802
|
strategy = extractFetchingStrategy(row, strategy);
|
|
798
803
|
|
|
799
|
-
let
|
|
804
|
+
let json = rootMap.get(row)?.json;
|
|
800
805
|
if (!json)
|
|
801
806
|
return;
|
|
802
807
|
let meta = await getMeta();
|
|
@@ -839,12 +844,15 @@ function rdbClient(options = {}) {
|
|
|
839
844
|
}
|
|
840
845
|
|
|
841
846
|
function acceptChangesRow(row) {
|
|
842
|
-
const
|
|
847
|
+
const data = rootMap.get(row);
|
|
848
|
+
if (!data)
|
|
849
|
+
return;
|
|
850
|
+
const { strategy } = data;
|
|
843
851
|
rootMap.set(row, { json: cloneFromDb(row), strategy });
|
|
844
852
|
}
|
|
845
853
|
|
|
846
854
|
function clearChangesRow(row) {
|
|
847
|
-
let
|
|
855
|
+
let json = rootMap.get(row)?.json;
|
|
848
856
|
if (!json)
|
|
849
857
|
return;
|
|
850
858
|
let old = cloneFromDb(json);
|
|
@@ -1027,9 +1035,14 @@ function onChange(target, onChange) {
|
|
|
1027
1035
|
}
|
|
1028
1036
|
return Reflect.set(target, prop, value, receiver);
|
|
1029
1037
|
|
|
1038
|
+
},
|
|
1039
|
+
deleteProperty(target, prop) {
|
|
1040
|
+
if (!notified) {
|
|
1041
|
+
notified = true;
|
|
1042
|
+
onChange(JSON.stringify(target));
|
|
1043
|
+
}
|
|
1044
|
+
return Reflect.deleteProperty(target, prop);
|
|
1030
1045
|
}
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
1046
|
};
|
|
1034
1047
|
|
|
1035
1048
|
return new Proxy(target, handler);
|
package/src/client/index.mjs
CHANGED
|
@@ -815,7 +815,7 @@ var fastJsonPatch = /*#__PURE__*/Object.freeze({
|
|
|
815
815
|
|
|
816
816
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(fastJsonPatch);
|
|
817
817
|
|
|
818
|
-
function dateToISOString$
|
|
818
|
+
function dateToISOString$2(date) {
|
|
819
819
|
let tzo = -date.getTimezoneOffset();
|
|
820
820
|
let dif = tzo >= 0 ? '+' : '-';
|
|
821
821
|
|
|
@@ -839,9 +839,9 @@ function dateToISOString$1(date) {
|
|
|
839
839
|
':' + pad(tzo % 60);
|
|
840
840
|
}
|
|
841
841
|
|
|
842
|
-
var dateToISOString_1 = dateToISOString$
|
|
842
|
+
var dateToISOString_1 = dateToISOString$2;
|
|
843
843
|
|
|
844
|
-
let dateToISOString = dateToISOString_1;
|
|
844
|
+
let dateToISOString$1 = dateToISOString_1;
|
|
845
845
|
const isNode = (typeof window === 'undefined');
|
|
846
846
|
|
|
847
847
|
function stringify$4(value) {
|
|
@@ -853,7 +853,7 @@ function replacer(key, value) {
|
|
|
853
853
|
return value.toString('base64');
|
|
854
854
|
// @ts-ignore
|
|
855
855
|
else if (value instanceof Date && !isNaN(value))
|
|
856
|
-
return dateToISOString(value);
|
|
856
|
+
return dateToISOString$1(value);
|
|
857
857
|
else
|
|
858
858
|
return value;
|
|
859
859
|
}
|
|
@@ -1587,6 +1587,57 @@ var createPatch$1 = function createPatch(original, dto, options) {
|
|
|
1587
1587
|
|
|
1588
1588
|
};
|
|
1589
1589
|
|
|
1590
|
+
let dateToISOString = dateToISOString_1;
|
|
1591
|
+
|
|
1592
|
+
function cloneFromDbFast(obj) {
|
|
1593
|
+
if (obj === null || typeof obj !== 'object')
|
|
1594
|
+
return obj;
|
|
1595
|
+
if (Array.isArray(obj)) {
|
|
1596
|
+
const arrClone = [];
|
|
1597
|
+
for (let i = 0; i < obj.length; i++) {
|
|
1598
|
+
arrClone[i] = cloneFromDbFast(obj[i]);
|
|
1599
|
+
}
|
|
1600
|
+
return arrClone;
|
|
1601
|
+
}
|
|
1602
|
+
const clone = {};
|
|
1603
|
+
const keys = Object.keys(obj);
|
|
1604
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1605
|
+
const key = keys[i];
|
|
1606
|
+
clone[key] = cloneFromDbFast(obj[key]);
|
|
1607
|
+
}
|
|
1608
|
+
return clone;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
function cloneRegular(obj) {
|
|
1612
|
+
if (obj === null || typeof obj !== 'object')
|
|
1613
|
+
return obj;
|
|
1614
|
+
if (Array.isArray(obj)) {
|
|
1615
|
+
const arrClone = [];
|
|
1616
|
+
for (let i = 0; i < obj.length; i++) {
|
|
1617
|
+
arrClone[i] = cloneRegular(obj[i]);
|
|
1618
|
+
}
|
|
1619
|
+
return arrClone;
|
|
1620
|
+
}
|
|
1621
|
+
else if (obj instanceof Date && !isNaN(obj))
|
|
1622
|
+
return dateToISOString(obj);
|
|
1623
|
+
const clone = {};
|
|
1624
|
+
const keys = Object.keys(obj);
|
|
1625
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1626
|
+
const key = keys[i];
|
|
1627
|
+
clone[key] = cloneRegular(obj[key]);
|
|
1628
|
+
}
|
|
1629
|
+
return clone;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
function cloneFromDb$1(obj, isFast) {
|
|
1633
|
+
if (isFast)
|
|
1634
|
+
return cloneFromDbFast(obj);
|
|
1635
|
+
else
|
|
1636
|
+
return cloneRegular(obj);
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
var cloneFromDb_1 = cloneFromDb$1;
|
|
1640
|
+
|
|
1590
1641
|
function bind(fn, thisArg) {
|
|
1591
1642
|
return function wrap() {
|
|
1592
1643
|
return fn.apply(thisArg, arguments);
|
|
@@ -3607,7 +3658,7 @@ function isAbsoluteURL(url) {
|
|
|
3607
3658
|
*/
|
|
3608
3659
|
function combineURLs(baseURL, relativeURL) {
|
|
3609
3660
|
return relativeURL
|
|
3610
|
-
? baseURL.replace(
|
|
3661
|
+
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
3611
3662
|
: baseURL;
|
|
3612
3663
|
}
|
|
3613
3664
|
|
|
@@ -4241,7 +4292,7 @@ function mergeConfig(config1, config2) {
|
|
|
4241
4292
|
return config;
|
|
4242
4293
|
}
|
|
4243
4294
|
|
|
4244
|
-
const VERSION = "1.6.
|
|
4295
|
+
const VERSION = "1.6.2";
|
|
4245
4296
|
|
|
4246
4297
|
const validators$1 = {};
|
|
4247
4298
|
|
|
@@ -5298,6 +5349,7 @@ var axiosInterceptor = function create() {
|
|
|
5298
5349
|
|
|
5299
5350
|
const createPatch = createPatch$1;
|
|
5300
5351
|
const stringify = stringify_1;
|
|
5352
|
+
const cloneFromDb = cloneFromDb_1;
|
|
5301
5353
|
const netAdapter = netAdapter_1;
|
|
5302
5354
|
const toKeyPositionMap = toKeyPositionMap_1;
|
|
5303
5355
|
const rootMap = new WeakMap();
|
|
@@ -5524,7 +5576,7 @@ function rdbClient(options = {}) {
|
|
|
5524
5576
|
let args = [_, strategy].concat(Array.prototype.slice.call(arguments).slice(2));
|
|
5525
5577
|
let rows = await getManyCore.apply(null, args);
|
|
5526
5578
|
await metaPromise;
|
|
5527
|
-
return proxify(rows, strategy,
|
|
5579
|
+
return proxify(rows, strategy, true);
|
|
5528
5580
|
}
|
|
5529
5581
|
|
|
5530
5582
|
async function groupBy(strategy) {
|
|
@@ -5556,7 +5608,7 @@ function rdbClient(options = {}) {
|
|
|
5556
5608
|
await metaPromise;
|
|
5557
5609
|
if (rows.length === 0)
|
|
5558
5610
|
return;
|
|
5559
|
-
return proxify(rows[0], strategy,
|
|
5611
|
+
return proxify(rows[0], strategy, true);
|
|
5560
5612
|
}
|
|
5561
5613
|
|
|
5562
5614
|
async function getById() {
|
|
@@ -5744,14 +5796,14 @@ function rdbClient(options = {}) {
|
|
|
5744
5796
|
}
|
|
5745
5797
|
|
|
5746
5798
|
|
|
5747
|
-
function proxify(itemOrArray, strategy,
|
|
5799
|
+
function proxify(itemOrArray, strategy, fast) {
|
|
5748
5800
|
if (Array.isArray(itemOrArray))
|
|
5749
|
-
return proxifyArray(itemOrArray, strategy,
|
|
5801
|
+
return proxifyArray(itemOrArray, strategy, fast);
|
|
5750
5802
|
else
|
|
5751
|
-
return proxifyRow(itemOrArray, strategy,
|
|
5803
|
+
return proxifyRow(itemOrArray, strategy, fast);
|
|
5752
5804
|
}
|
|
5753
5805
|
|
|
5754
|
-
function proxifyArray(array, strategy,
|
|
5806
|
+
function proxifyArray(array, strategy, fast) {
|
|
5755
5807
|
let _array = array;
|
|
5756
5808
|
if (_reactive)
|
|
5757
5809
|
array = _reactive(array);
|
|
@@ -5778,8 +5830,11 @@ function rdbClient(options = {}) {
|
|
|
5778
5830
|
}
|
|
5779
5831
|
|
|
5780
5832
|
};
|
|
5781
|
-
|
|
5782
|
-
|
|
5833
|
+
|
|
5834
|
+
let watcher = onChange(array, () => {
|
|
5835
|
+
rootMap.set(array, { json: cloneFromDb(array, fast), strategy, originalArray: [...array] });
|
|
5836
|
+
});
|
|
5837
|
+
let innerProxy = new Proxy(watcher, handler);
|
|
5783
5838
|
if (strategy !== undefined) {
|
|
5784
5839
|
const { limit, ...cleanStrategy } = { ...strategy };
|
|
5785
5840
|
fetchingStrategyMap.set(array, cleanStrategy);
|
|
@@ -5787,18 +5842,18 @@ function rdbClient(options = {}) {
|
|
|
5787
5842
|
return innerProxy;
|
|
5788
5843
|
}
|
|
5789
5844
|
|
|
5790
|
-
function proxifyRow(row, strategy,
|
|
5845
|
+
function proxifyRow(row, strategy, fast) {
|
|
5791
5846
|
let handler = {
|
|
5792
5847
|
get(_target, property,) {
|
|
5793
5848
|
if (property === 'save' || property === 'saveChanges') //call server then acceptChanges
|
|
5794
5849
|
return saveRow.bind(null, row);
|
|
5795
|
-
else if (property === 'delete') //call server then remove from
|
|
5850
|
+
else if (property === 'delete') //call server then remove from json and original
|
|
5796
5851
|
return deleteRow.bind(null, row);
|
|
5797
5852
|
else if (property === 'refresh') //refresh from server then acceptChanges
|
|
5798
5853
|
return refreshRow.bind(null, row);
|
|
5799
|
-
else if (property === 'clearChanges') //refresh from
|
|
5854
|
+
else if (property === 'clearChanges') //refresh from json, update original if present
|
|
5800
5855
|
return clearChangesRow.bind(null, row);
|
|
5801
|
-
else if (property === 'acceptChanges') //remove from
|
|
5856
|
+
else if (property === 'acceptChanges') //remove from json
|
|
5802
5857
|
return acceptChangesRow.bind(null, row);
|
|
5803
5858
|
else if (property === 'toJSON')
|
|
5804
5859
|
return () => {
|
|
@@ -5811,8 +5866,10 @@ function rdbClient(options = {}) {
|
|
|
5811
5866
|
}
|
|
5812
5867
|
|
|
5813
5868
|
};
|
|
5814
|
-
let
|
|
5815
|
-
|
|
5869
|
+
let watcher = onChange(row, () => {
|
|
5870
|
+
rootMap.set(row, { json: cloneFromDb(row, fast), strategy });
|
|
5871
|
+
});
|
|
5872
|
+
let innerProxy = new Proxy(watcher, handler);
|
|
5816
5873
|
fetchingStrategyMap.set(row, strategy);
|
|
5817
5874
|
return innerProxy;
|
|
5818
5875
|
}
|
|
@@ -5882,12 +5939,14 @@ function rdbClient(options = {}) {
|
|
|
5882
5939
|
|
|
5883
5940
|
async function saveArray(array, concurrencyOptions, strategy) {
|
|
5884
5941
|
let deduceStrategy = false;
|
|
5885
|
-
let
|
|
5942
|
+
let json = rootMap.get(array)?.json;
|
|
5943
|
+
if (!json)
|
|
5944
|
+
return;
|
|
5886
5945
|
strategy = extractStrategy({ strategy }, array);
|
|
5887
5946
|
strategy = extractFetchingStrategy(array, strategy);
|
|
5888
5947
|
|
|
5889
5948
|
let meta = await getMeta();
|
|
5890
|
-
const patch = createPatch(
|
|
5949
|
+
const patch = createPatch(json, array, meta);
|
|
5891
5950
|
if (patch.length === 0)
|
|
5892
5951
|
return;
|
|
5893
5952
|
let body = stringify({ patch, options: { strategy, ...tableOptions, ...concurrencyOptions, deduceStrategy } });
|
|
@@ -5902,7 +5961,7 @@ function rdbClient(options = {}) {
|
|
|
5902
5961
|
let insertedPositions = getInsertedRowsPosition(array);
|
|
5903
5962
|
let { changed, strategy: newStrategy } = await p;
|
|
5904
5963
|
copyIntoArray(changed, array, [...insertedPositions, ...updatedPositions]);
|
|
5905
|
-
rootMap.set(array, { json:
|
|
5964
|
+
rootMap.set(array, { json: cloneFromDb(array), strategy: newStrategy, originalArray: [...array] });
|
|
5906
5965
|
}
|
|
5907
5966
|
|
|
5908
5967
|
async function patch(patch, concurrencyOptions, strategy) {
|
|
@@ -5962,7 +6021,7 @@ function rdbClient(options = {}) {
|
|
|
5962
6021
|
return options.strategy;
|
|
5963
6022
|
if (obj) {
|
|
5964
6023
|
let context = rootMap.get(obj);
|
|
5965
|
-
if (context
|
|
6024
|
+
if (context?.strategy !== undefined) {
|
|
5966
6025
|
// @ts-ignore
|
|
5967
6026
|
let { limit, ...strategy } = { ...context.strategy };
|
|
5968
6027
|
return strategy;
|
|
@@ -5981,14 +6040,18 @@ function rdbClient(options = {}) {
|
|
|
5981
6040
|
}
|
|
5982
6041
|
|
|
5983
6042
|
function clearChangesArray(array) {
|
|
5984
|
-
let
|
|
5985
|
-
|
|
6043
|
+
let json = rootMap.get(array)?.json;
|
|
6044
|
+
if (!json)
|
|
6045
|
+
return;
|
|
6046
|
+
let old = cloneFromDb(json);
|
|
5986
6047
|
array.splice(0, old.length, ...old);
|
|
5987
6048
|
}
|
|
5988
6049
|
|
|
5989
6050
|
function acceptChangesArray(array) {
|
|
5990
6051
|
const map = rootMap.get(array);
|
|
5991
|
-
|
|
6052
|
+
if (!map)
|
|
6053
|
+
return;
|
|
6054
|
+
map.json = cloneFromDb(array);
|
|
5992
6055
|
map.originalArray = [...array];
|
|
5993
6056
|
}
|
|
5994
6057
|
|
|
@@ -6001,7 +6064,7 @@ function rdbClient(options = {}) {
|
|
|
6001
6064
|
let adapter = netAdapter(url, tableName, { axios: axiosInterceptor, tableOptions });
|
|
6002
6065
|
let { strategy } = await adapter.patch(body);
|
|
6003
6066
|
array.length = 0;
|
|
6004
|
-
rootMap.set(array, {
|
|
6067
|
+
rootMap.set(array, { json: cloneFromDb(array), strategy });
|
|
6005
6068
|
}
|
|
6006
6069
|
|
|
6007
6070
|
function setMapValue(rowsMap, keys, row, index) {
|
|
@@ -6064,7 +6127,7 @@ function rdbClient(options = {}) {
|
|
|
6064
6127
|
array.splice(i + offset, 1);
|
|
6065
6128
|
offset--;
|
|
6066
6129
|
}
|
|
6067
|
-
rootMap.set(array, { json:
|
|
6130
|
+
rootMap.set(array, { json: cloneFromDb(array), strategy, originalArray: [...array] });
|
|
6068
6131
|
fetchingStrategyMap.set(array, strategy);
|
|
6069
6132
|
}
|
|
6070
6133
|
|
|
@@ -6085,12 +6148,12 @@ function rdbClient(options = {}) {
|
|
|
6085
6148
|
strategy = extractStrategy({ strategy }, row);
|
|
6086
6149
|
strategy = extractFetchingStrategy(row, strategy);
|
|
6087
6150
|
|
|
6088
|
-
let
|
|
6151
|
+
let json = rootMap.get(row)?.json;
|
|
6089
6152
|
if (!json)
|
|
6090
6153
|
return;
|
|
6091
6154
|
let meta = await getMeta();
|
|
6092
6155
|
|
|
6093
|
-
let patch = createPatch([
|
|
6156
|
+
let patch = createPatch([json], [row], meta);
|
|
6094
6157
|
if (patch.length === 0)
|
|
6095
6158
|
return;
|
|
6096
6159
|
|
|
@@ -6099,7 +6162,7 @@ function rdbClient(options = {}) {
|
|
|
6099
6162
|
let adapter = netAdapter(url, tableName, { axios: axiosInterceptor, tableOptions });
|
|
6100
6163
|
let { changed, strategy: newStrategy } = await adapter.patch(body);
|
|
6101
6164
|
copyInto(changed, [row]);
|
|
6102
|
-
rootMap.set(row, { json:
|
|
6165
|
+
rootMap.set(row, { json: cloneFromDb(row), strategy: newStrategy });
|
|
6103
6166
|
}
|
|
6104
6167
|
|
|
6105
6168
|
async function refreshRow(row, strategy) {
|
|
@@ -6123,20 +6186,23 @@ function rdbClient(options = {}) {
|
|
|
6123
6186
|
for (let p in rows[0]) {
|
|
6124
6187
|
row[p] = rows[0][p];
|
|
6125
6188
|
}
|
|
6126
|
-
rootMap.set(row, { json:
|
|
6189
|
+
rootMap.set(row, { json: cloneFromDb(row), strategy });
|
|
6127
6190
|
fetchingStrategyMap.set(row, strategy);
|
|
6128
6191
|
}
|
|
6129
6192
|
|
|
6130
6193
|
function acceptChangesRow(row) {
|
|
6131
|
-
const
|
|
6132
|
-
|
|
6194
|
+
const data = rootMap.get(row);
|
|
6195
|
+
if (!data)
|
|
6196
|
+
return;
|
|
6197
|
+
const { strategy } = data;
|
|
6198
|
+
rootMap.set(row, { json: cloneFromDb(row), strategy });
|
|
6133
6199
|
}
|
|
6134
6200
|
|
|
6135
6201
|
function clearChangesRow(row) {
|
|
6136
|
-
let
|
|
6202
|
+
let json = rootMap.get(row)?.json;
|
|
6137
6203
|
if (!json)
|
|
6138
6204
|
return;
|
|
6139
|
-
let old =
|
|
6205
|
+
let old = cloneFromDb(json);
|
|
6140
6206
|
for (let p in row) {
|
|
6141
6207
|
delete row[p];
|
|
6142
6208
|
}
|
|
@@ -6298,6 +6364,38 @@ function column(path, ...previous) {
|
|
|
6298
6364
|
|
|
6299
6365
|
}
|
|
6300
6366
|
|
|
6367
|
+
function onChange(target, onChange) {
|
|
6368
|
+
|
|
6369
|
+
let notified = false;
|
|
6370
|
+
const handler = {
|
|
6371
|
+
get(target, prop, receiver) {
|
|
6372
|
+
const value = Reflect.get(target, prop, receiver);
|
|
6373
|
+
if (typeof value === 'object' && value !== null) {
|
|
6374
|
+
return new Proxy(value, handler);
|
|
6375
|
+
}
|
|
6376
|
+
return value;
|
|
6377
|
+
},
|
|
6378
|
+
set(target, prop, value, receiver) {
|
|
6379
|
+
if (!notified) {
|
|
6380
|
+
notified = true;
|
|
6381
|
+
onChange(JSON.stringify(target));
|
|
6382
|
+
}
|
|
6383
|
+
return Reflect.set(target, prop, value, receiver);
|
|
6384
|
+
|
|
6385
|
+
},
|
|
6386
|
+
deleteProperty(target, prop) {
|
|
6387
|
+
if (!notified) {
|
|
6388
|
+
notified = true;
|
|
6389
|
+
onChange(JSON.stringify(target));
|
|
6390
|
+
}
|
|
6391
|
+
return Reflect.deleteProperty(target, prop);
|
|
6392
|
+
}
|
|
6393
|
+
};
|
|
6394
|
+
|
|
6395
|
+
return new Proxy(target, handler);
|
|
6396
|
+
}
|
|
6397
|
+
|
|
6398
|
+
|
|
6301
6399
|
var client = rdbClient();
|
|
6302
6400
|
|
|
6303
6401
|
export { client as default };
|