@bigbinary/neeto-audit-frontend 2.0.4 → 2.0.6
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/common/recommendedDependencies/common.js +20 -20
- package/common/recommendedDependencies/extension.js +9 -9
- package/common/recommendedDependencies/frontend.js +29 -31
- package/common/recommendedDependencies/nano.js +29 -31
- package/dist/index.js +478 -445
- package/package.json +6 -4
- package/src/utils/index.js +14 -14
- package/src/verifiers/recommendedPackageVersions/index.js +5 -5
- package/src/verifiers/recommendedPackageVersions/utils.js +3 -7
package/dist/index.js
CHANGED
|
@@ -3044,31 +3044,31 @@ function _arrayWithHoles(arr) {
|
|
|
3044
3044
|
if (Array.isArray(arr)) return arr;
|
|
3045
3045
|
}
|
|
3046
3046
|
|
|
3047
|
-
function _iterableToArrayLimit(
|
|
3048
|
-
var
|
|
3049
|
-
if (null !=
|
|
3050
|
-
var
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3047
|
+
function _iterableToArrayLimit(r, l) {
|
|
3048
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
3049
|
+
if (null != t) {
|
|
3050
|
+
var e,
|
|
3051
|
+
n,
|
|
3052
|
+
i,
|
|
3053
|
+
u,
|
|
3054
|
+
a = [],
|
|
3055
|
+
f = !0,
|
|
3056
|
+
o = !1;
|
|
3057
3057
|
try {
|
|
3058
|
-
if (
|
|
3059
|
-
if (Object(
|
|
3060
|
-
|
|
3061
|
-
} else for (; !(
|
|
3062
|
-
} catch (
|
|
3063
|
-
|
|
3058
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
3059
|
+
if (Object(t) !== t) return;
|
|
3060
|
+
f = !1;
|
|
3061
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
3062
|
+
} catch (r) {
|
|
3063
|
+
o = !0, n = r;
|
|
3064
3064
|
} finally {
|
|
3065
3065
|
try {
|
|
3066
|
-
if (!
|
|
3066
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
3067
3067
|
} finally {
|
|
3068
|
-
if (
|
|
3068
|
+
if (o) throw n;
|
|
3069
3069
|
}
|
|
3070
3070
|
}
|
|
3071
|
-
return
|
|
3071
|
+
return a;
|
|
3072
3072
|
}
|
|
3073
3073
|
}
|
|
3074
3074
|
|
|
@@ -3095,111 +3095,154 @@ function _slicedToArray(arr, i) {
|
|
|
3095
3095
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
3096
3096
|
}
|
|
3097
3097
|
|
|
3098
|
-
function _typeof(
|
|
3098
|
+
function _typeof(o) {
|
|
3099
3099
|
"@babel/helpers - typeof";
|
|
3100
3100
|
|
|
3101
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
3102
|
-
return typeof
|
|
3103
|
-
} : function (
|
|
3104
|
-
return
|
|
3105
|
-
}, _typeof(
|
|
3101
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
3102
|
+
return typeof o;
|
|
3103
|
+
} : function (o) {
|
|
3104
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
3105
|
+
}, _typeof(o);
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
function _classCallCheck(instance, Constructor) {
|
|
3109
|
+
if (!(instance instanceof Constructor)) {
|
|
3110
|
+
throw new TypeError("Cannot call a class as a function");
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
|
|
3114
|
+
function _toPrimitive(input, hint) {
|
|
3115
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
3116
|
+
var prim = input[Symbol.toPrimitive];
|
|
3117
|
+
if (prim !== undefined) {
|
|
3118
|
+
var res = prim.call(input, hint || "default");
|
|
3119
|
+
if (_typeof(res) !== "object") return res;
|
|
3120
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3121
|
+
}
|
|
3122
|
+
return (hint === "string" ? String : Number)(input);
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
function _toPropertyKey(arg) {
|
|
3126
|
+
var key = _toPrimitive(arg, "string");
|
|
3127
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
function _defineProperties(target, props) {
|
|
3131
|
+
for (var i = 0; i < props.length; i++) {
|
|
3132
|
+
var descriptor = props[i];
|
|
3133
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
3134
|
+
descriptor.configurable = true;
|
|
3135
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
3136
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
3140
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
3141
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
3142
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
3143
|
+
writable: false
|
|
3144
|
+
});
|
|
3145
|
+
return Constructor;
|
|
3106
3146
|
}
|
|
3107
3147
|
|
|
3148
|
+
function _defineProperty(obj, key, value) {
|
|
3149
|
+
key = _toPropertyKey(key);
|
|
3150
|
+
if (key in obj) {
|
|
3151
|
+
Object.defineProperty(obj, key, {
|
|
3152
|
+
value: value,
|
|
3153
|
+
enumerable: true,
|
|
3154
|
+
configurable: true,
|
|
3155
|
+
writable: true
|
|
3156
|
+
});
|
|
3157
|
+
} else {
|
|
3158
|
+
obj[key] = value;
|
|
3159
|
+
}
|
|
3160
|
+
return obj;
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3164
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3108
3165
|
// src/utils/env.ts
|
|
3109
|
-
var NOTHING = Symbol
|
|
3110
|
-
var DRAFTABLE = Symbol
|
|
3111
|
-
var DRAFT_STATE = Symbol
|
|
3166
|
+
var NOTHING = Symbol["for"]("immer-nothing");
|
|
3167
|
+
var DRAFTABLE = Symbol["for"]("immer-draftable");
|
|
3168
|
+
var DRAFT_STATE = Symbol["for"]("immer-state");
|
|
3112
3169
|
|
|
3113
3170
|
// src/utils/errors.ts
|
|
3114
3171
|
var errors$1 = process.env.NODE_ENV !== "production" ? [
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
"The third argument to `produce` must be a function or undefined",
|
|
3130
|
-
"First argument to `createDraft` must be a plain object, an array, or an immerable object",
|
|
3131
|
-
"First argument to `finishDraft` must be a draft returned by `createDraft`",
|
|
3132
|
-
function(thing) {
|
|
3133
|
-
return `'current' expects a draft, got: ${thing}`;
|
|
3134
|
-
},
|
|
3135
|
-
"Object.defineProperty() cannot be used on an Immer draft",
|
|
3136
|
-
"Object.setPrototypeOf() cannot be used on an Immer draft",
|
|
3137
|
-
"Immer only supports deleting array indices",
|
|
3138
|
-
"Immer only supports setting array indices and the 'length' property",
|
|
3139
|
-
function(thing) {
|
|
3140
|
-
return `'original' expects a draft, got: ${thing}`;
|
|
3141
|
-
}
|
|
3142
|
-
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
|
3143
|
-
// See Patches.ts for additional errors
|
|
3172
|
+
// All error codes, starting by 0:
|
|
3173
|
+
function (plugin) {
|
|
3174
|
+
return "The plugin for '".concat(plugin, "' has not been loaded into Immer. To enable the plugin, import and call `enable").concat(plugin, "()` when initializing your application.");
|
|
3175
|
+
}, function (thing) {
|
|
3176
|
+
return "produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '".concat(thing, "'");
|
|
3177
|
+
}, "This object has been frozen and should not be mutated", function (data) {
|
|
3178
|
+
return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + data;
|
|
3179
|
+
}, "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.", "Immer forbids circular references", "The first or second argument to `produce` must be a function", "The third argument to `produce` must be a function or undefined", "First argument to `createDraft` must be a plain object, an array, or an immerable object", "First argument to `finishDraft` must be a draft returned by `createDraft`", function (thing) {
|
|
3180
|
+
return "'current' expects a draft, got: ".concat(thing);
|
|
3181
|
+
}, "Object.defineProperty() cannot be used on an Immer draft", "Object.setPrototypeOf() cannot be used on an Immer draft", "Immer only supports deleting array indices", "Immer only supports setting array indices and the 'length' property", function (thing) {
|
|
3182
|
+
return "'original' expects a draft, got: ".concat(thing);
|
|
3183
|
+
}
|
|
3184
|
+
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
|
3185
|
+
// See Patches.ts for additional errors
|
|
3144
3186
|
] : [];
|
|
3145
|
-
function die(error
|
|
3187
|
+
function die(error) {
|
|
3146
3188
|
if (process.env.NODE_ENV !== "production") {
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3189
|
+
var e = errors$1[error];
|
|
3190
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
|
|
3191
|
+
args[_key2 - 1] = arguments[_key2];
|
|
3192
|
+
}
|
|
3193
|
+
var msg = typeof e === "function" ? e.apply(null, args) : e;
|
|
3194
|
+
throw new Error("[Immer] ".concat(msg));
|
|
3150
3195
|
}
|
|
3151
|
-
throw new Error(
|
|
3152
|
-
`[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`
|
|
3153
|
-
);
|
|
3196
|
+
throw new Error("[Immer] minified error nr: ".concat(error, ". Full error at: https://bit.ly/3cXEKWf"));
|
|
3154
3197
|
}
|
|
3155
3198
|
|
|
3156
3199
|
// src/utils/common.ts
|
|
3157
|
-
var
|
|
3200
|
+
var _getPrototypeOf = Object.getPrototypeOf;
|
|
3158
3201
|
function isDraft(value) {
|
|
3159
3202
|
return !!value && !!value[DRAFT_STATE];
|
|
3160
3203
|
}
|
|
3161
3204
|
function isDraftable(value) {
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
return isPlainObject$1(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!value.constructor
|
|
3205
|
+
var _value$constructor;
|
|
3206
|
+
if (!value) return false;
|
|
3207
|
+
return isPlainObject$1(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!((_value$constructor = value.constructor) !== null && _value$constructor !== void 0 && _value$constructor[DRAFTABLE]) || isMap(value) || isSet(value);
|
|
3165
3208
|
}
|
|
3166
3209
|
var objectCtorString = Object.prototype.constructor.toString();
|
|
3167
3210
|
function isPlainObject$1(value) {
|
|
3168
|
-
if (!value ||
|
|
3169
|
-
|
|
3170
|
-
const proto = getPrototypeOf$1(value);
|
|
3211
|
+
if (!value || _typeof(value) !== "object") return false;
|
|
3212
|
+
var proto = _getPrototypeOf(value);
|
|
3171
3213
|
if (proto === null) {
|
|
3172
3214
|
return true;
|
|
3173
3215
|
}
|
|
3174
|
-
|
|
3175
|
-
if (Ctor === Object)
|
|
3176
|
-
return true;
|
|
3216
|
+
var Ctor = Object.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
3217
|
+
if (Ctor === Object) return true;
|
|
3177
3218
|
return typeof Ctor == "function" && Function.toString.call(Ctor) === objectCtorString;
|
|
3178
3219
|
}
|
|
3179
3220
|
function each(obj, iter) {
|
|
3180
3221
|
if (getArchtype(obj) === 0 /* Object */) {
|
|
3181
|
-
Object.entries(obj).forEach((
|
|
3222
|
+
Object.entries(obj).forEach(function (_ref) {
|
|
3223
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
3224
|
+
key = _ref2[0],
|
|
3225
|
+
value = _ref2[1];
|
|
3182
3226
|
iter(key, value, obj);
|
|
3183
3227
|
});
|
|
3184
3228
|
} else {
|
|
3185
|
-
obj.forEach((entry, index)
|
|
3229
|
+
obj.forEach(function (entry, index) {
|
|
3230
|
+
return iter(index, entry, obj);
|
|
3231
|
+
});
|
|
3186
3232
|
}
|
|
3187
3233
|
}
|
|
3188
3234
|
function getArchtype(thing) {
|
|
3189
|
-
|
|
3235
|
+
var state = thing[DRAFT_STATE];
|
|
3190
3236
|
return state ? state.type_ : Array.isArray(thing) ? 1 /* Array */ : isMap(thing) ? 2 /* Map */ : isSet(thing) ? 3 /* Set */ : 0 /* Object */;
|
|
3191
3237
|
}
|
|
3192
3238
|
function has(thing, prop) {
|
|
3193
3239
|
return getArchtype(thing) === 2 /* Map */ ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);
|
|
3194
3240
|
}
|
|
3195
3241
|
function set(thing, propOrOldValue, value) {
|
|
3196
|
-
|
|
3197
|
-
if (t === 2 /* Map */)
|
|
3198
|
-
thing.set(propOrOldValue, value);
|
|
3199
|
-
else if (t === 3 /* Set */) {
|
|
3242
|
+
var t = getArchtype(thing);
|
|
3243
|
+
if (t === 2 /* Map */) thing.set(propOrOldValue, value);else if (t === 3 /* Set */) {
|
|
3200
3244
|
thing.add(value);
|
|
3201
|
-
} else
|
|
3202
|
-
thing[propOrOldValue] = value;
|
|
3245
|
+
} else thing[propOrOldValue] = value;
|
|
3203
3246
|
}
|
|
3204
3247
|
function is(x, y) {
|
|
3205
3248
|
if (x === y) {
|
|
@@ -3224,45 +3267,44 @@ function shallowCopy(base, strict) {
|
|
|
3224
3267
|
if (isSet(base)) {
|
|
3225
3268
|
return new Set(base);
|
|
3226
3269
|
}
|
|
3227
|
-
if (Array.isArray(base))
|
|
3228
|
-
return Array.prototype.slice.call(base);
|
|
3270
|
+
if (Array.isArray(base)) return Array.prototype.slice.call(base);
|
|
3229
3271
|
if (!strict && isPlainObject$1(base)) {
|
|
3230
|
-
if (!
|
|
3231
|
-
|
|
3272
|
+
if (!_getPrototypeOf(base)) {
|
|
3273
|
+
var obj = /* @__PURE__ */Object.create(null);
|
|
3232
3274
|
return Object.assign(obj, base);
|
|
3233
3275
|
}
|
|
3234
|
-
return {
|
|
3276
|
+
return _objectSpread$1({}, base);
|
|
3235
3277
|
}
|
|
3236
|
-
|
|
3278
|
+
var descriptors = Object.getOwnPropertyDescriptors(base);
|
|
3237
3279
|
delete descriptors[DRAFT_STATE];
|
|
3238
|
-
|
|
3239
|
-
for (
|
|
3240
|
-
|
|
3241
|
-
|
|
3280
|
+
var keys = Reflect.ownKeys(descriptors);
|
|
3281
|
+
for (var i = 0; i < keys.length; i++) {
|
|
3282
|
+
var key = keys[i];
|
|
3283
|
+
var desc = descriptors[key];
|
|
3242
3284
|
if (desc.writable === false) {
|
|
3243
3285
|
desc.writable = true;
|
|
3244
3286
|
desc.configurable = true;
|
|
3245
3287
|
}
|
|
3246
|
-
if (desc.get || desc.set)
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
};
|
|
3288
|
+
if (desc.get || desc.set) descriptors[key] = {
|
|
3289
|
+
configurable: true,
|
|
3290
|
+
writable: true,
|
|
3291
|
+
// could live with !!desc.set as well here...
|
|
3292
|
+
enumerable: desc.enumerable,
|
|
3293
|
+
value: base[key]
|
|
3294
|
+
};
|
|
3254
3295
|
}
|
|
3255
|
-
return Object.create(
|
|
3296
|
+
return Object.create(_getPrototypeOf(base), descriptors);
|
|
3256
3297
|
}
|
|
3257
|
-
function freeze(obj
|
|
3258
|
-
|
|
3259
|
-
|
|
3298
|
+
function freeze(obj) {
|
|
3299
|
+
var deep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
3300
|
+
if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj)) return obj;
|
|
3260
3301
|
if (getArchtype(obj) > 1) {
|
|
3261
|
-
obj.set = obj.add = obj.clear = obj
|
|
3302
|
+
obj.set = obj.add = obj.clear = obj["delete"] = dontMutateFrozenCollections;
|
|
3262
3303
|
}
|
|
3263
3304
|
Object.freeze(obj);
|
|
3264
|
-
if (deep)
|
|
3265
|
-
|
|
3305
|
+
if (deep) each(obj, function (_key, value) {
|
|
3306
|
+
return freeze(value, true);
|
|
3307
|
+
});
|
|
3266
3308
|
return obj;
|
|
3267
3309
|
}
|
|
3268
3310
|
function dontMutateFrozenCollections() {
|
|
@@ -3275,7 +3317,7 @@ function isFrozen(obj) {
|
|
|
3275
3317
|
// src/utils/plugins.ts
|
|
3276
3318
|
var plugins = {};
|
|
3277
3319
|
function getPlugin(pluginKey) {
|
|
3278
|
-
|
|
3320
|
+
var plugin = plugins[pluginKey];
|
|
3279
3321
|
if (!plugin) {
|
|
3280
3322
|
die(0, pluginKey);
|
|
3281
3323
|
}
|
|
@@ -3290,8 +3332,8 @@ function getCurrentScope() {
|
|
|
3290
3332
|
function createScope(parent_, immer_) {
|
|
3291
3333
|
return {
|
|
3292
3334
|
drafts_: [],
|
|
3293
|
-
parent_,
|
|
3294
|
-
immer_,
|
|
3335
|
+
parent_: parent_,
|
|
3336
|
+
immer_: immer_,
|
|
3295
3337
|
// Whenever the modified draft contains a draft from another scope, we
|
|
3296
3338
|
// need to prevent auto-freezing so the unowned draft can be finalized.
|
|
3297
3339
|
canAutoFreeze_: true,
|
|
@@ -3320,18 +3362,15 @@ function enterScope(immer2) {
|
|
|
3320
3362
|
return currentScope = createScope(currentScope, immer2);
|
|
3321
3363
|
}
|
|
3322
3364
|
function revokeDraft(draft) {
|
|
3323
|
-
|
|
3324
|
-
if (state.type_ === 0 /* Object */ || state.type_ === 1 /* Array */)
|
|
3325
|
-
state.revoke_();
|
|
3326
|
-
else
|
|
3327
|
-
state.revoked_ = true;
|
|
3365
|
+
var state = draft[DRAFT_STATE];
|
|
3366
|
+
if (state.type_ === 0 /* Object */ || state.type_ === 1 /* Array */) state.revoke_();else state.revoked_ = true;
|
|
3328
3367
|
}
|
|
3329
3368
|
|
|
3330
3369
|
// src/core/finalize.ts
|
|
3331
3370
|
function processResult(result, scope) {
|
|
3332
3371
|
scope.unfinalizedDrafts_ = scope.drafts_.length;
|
|
3333
|
-
|
|
3334
|
-
|
|
3372
|
+
var baseDraft = scope.drafts_[0];
|
|
3373
|
+
var isReplaced = result !== void 0 && result !== baseDraft;
|
|
3335
3374
|
if (isReplaced) {
|
|
3336
3375
|
if (baseDraft[DRAFT_STATE].modified_) {
|
|
3337
3376
|
revokeScope(scope);
|
|
@@ -3339,16 +3378,10 @@ function processResult(result, scope) {
|
|
|
3339
3378
|
}
|
|
3340
3379
|
if (isDraftable(result)) {
|
|
3341
3380
|
result = finalize(scope, result);
|
|
3342
|
-
if (!scope.parent_)
|
|
3343
|
-
maybeFreeze(scope, result);
|
|
3381
|
+
if (!scope.parent_) maybeFreeze(scope, result);
|
|
3344
3382
|
}
|
|
3345
3383
|
if (scope.patches_) {
|
|
3346
|
-
getPlugin("Patches").generateReplacementPatches_(
|
|
3347
|
-
baseDraft[DRAFT_STATE].base_,
|
|
3348
|
-
result,
|
|
3349
|
-
scope.patches_,
|
|
3350
|
-
scope.inversePatches_
|
|
3351
|
-
);
|
|
3384
|
+
getPlugin("Patches").generateReplacementPatches_(baseDraft[DRAFT_STATE].base_, result, scope.patches_, scope.inversePatches_);
|
|
3352
3385
|
}
|
|
3353
3386
|
} else {
|
|
3354
3387
|
result = finalize(scope, baseDraft, []);
|
|
@@ -3360,17 +3393,15 @@ function processResult(result, scope) {
|
|
|
3360
3393
|
return result !== NOTHING ? result : void 0;
|
|
3361
3394
|
}
|
|
3362
3395
|
function finalize(rootScope, value, path) {
|
|
3363
|
-
if (isFrozen(value))
|
|
3364
|
-
|
|
3365
|
-
const state = value[DRAFT_STATE];
|
|
3396
|
+
if (isFrozen(value)) return value;
|
|
3397
|
+
var state = value[DRAFT_STATE];
|
|
3366
3398
|
if (!state) {
|
|
3367
|
-
each(
|
|
3368
|
-
value,
|
|
3369
|
-
|
|
3399
|
+
each(value, function (key, childValue) {
|
|
3400
|
+
return finalizeProperty(rootScope, state, value, key, childValue, path);
|
|
3401
|
+
});
|
|
3370
3402
|
return value;
|
|
3371
3403
|
}
|
|
3372
|
-
if (state.scope_ !== rootScope)
|
|
3373
|
-
return value;
|
|
3404
|
+
if (state.scope_ !== rootScope) return value;
|
|
3374
3405
|
if (!state.modified_) {
|
|
3375
3406
|
maybeFreeze(rootScope, state.base_, true);
|
|
3376
3407
|
return state.base_;
|
|
@@ -3378,42 +3409,35 @@ function finalize(rootScope, value, path) {
|
|
|
3378
3409
|
if (!state.finalized_) {
|
|
3379
3410
|
state.finalized_ = true;
|
|
3380
3411
|
state.scope_.unfinalizedDrafts_--;
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3412
|
+
var result = state.copy_;
|
|
3413
|
+
var resultEach = result;
|
|
3414
|
+
var isSet2 = false;
|
|
3384
3415
|
if (state.type_ === 3 /* Set */) {
|
|
3385
3416
|
resultEach = new Set(result);
|
|
3386
3417
|
result.clear();
|
|
3387
3418
|
isSet2 = true;
|
|
3388
3419
|
}
|
|
3389
|
-
each(
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
);
|
|
3420
|
+
each(resultEach, function (key, childValue) {
|
|
3421
|
+
return finalizeProperty(rootScope, state, result, key, childValue, path, isSet2);
|
|
3422
|
+
});
|
|
3393
3423
|
maybeFreeze(rootScope, result, false);
|
|
3394
3424
|
if (path && rootScope.patches_) {
|
|
3395
|
-
getPlugin("Patches").generatePatches_(
|
|
3396
|
-
state,
|
|
3397
|
-
path,
|
|
3398
|
-
rootScope.patches_,
|
|
3399
|
-
rootScope.inversePatches_
|
|
3400
|
-
);
|
|
3425
|
+
getPlugin("Patches").generatePatches_(state, path, rootScope.patches_, rootScope.inversePatches_);
|
|
3401
3426
|
}
|
|
3402
3427
|
}
|
|
3403
3428
|
return state.copy_;
|
|
3404
3429
|
}
|
|
3405
3430
|
function finalizeProperty(rootScope, parentState, targetObject, prop, childValue, rootPath, targetIsSet) {
|
|
3406
|
-
if (process.env.NODE_ENV !== "production" && childValue === targetObject)
|
|
3407
|
-
die(5);
|
|
3431
|
+
if (process.env.NODE_ENV !== "production" && childValue === targetObject) die(5);
|
|
3408
3432
|
if (isDraft(childValue)) {
|
|
3409
|
-
|
|
3433
|
+
var path = rootPath && parentState && parentState.type_ !== 3 /* Set */ &&
|
|
3434
|
+
// Set objects are atomic since they have no keys.
|
|
3410
3435
|
!has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
|
|
3411
|
-
|
|
3436
|
+
var res = finalize(rootScope, childValue, path);
|
|
3412
3437
|
set(targetObject, prop, res);
|
|
3413
3438
|
if (isDraft(res)) {
|
|
3414
3439
|
rootScope.canAutoFreeze_ = false;
|
|
3415
|
-
} else
|
|
3416
|
-
return;
|
|
3440
|
+
} else return;
|
|
3417
3441
|
} else if (targetIsSet) {
|
|
3418
3442
|
targetObject.add(childValue);
|
|
3419
3443
|
}
|
|
@@ -3422,11 +3446,11 @@ function finalizeProperty(rootScope, parentState, targetObject, prop, childValue
|
|
|
3422
3446
|
return;
|
|
3423
3447
|
}
|
|
3424
3448
|
finalize(rootScope, childValue);
|
|
3425
|
-
if (!parentState || !parentState.scope_.parent_)
|
|
3426
|
-
maybeFreeze(rootScope, childValue);
|
|
3449
|
+
if (!parentState || !parentState.scope_.parent_) maybeFreeze(rootScope, childValue);
|
|
3427
3450
|
}
|
|
3428
3451
|
}
|
|
3429
|
-
function maybeFreeze(scope, value
|
|
3452
|
+
function maybeFreeze(scope, value) {
|
|
3453
|
+
var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
3430
3454
|
if (!scope.parent_ && scope.immer_.autoFreeze_ && scope.canAutoFreeze_) {
|
|
3431
3455
|
freeze(value, deep);
|
|
3432
3456
|
}
|
|
@@ -3434,9 +3458,10 @@ function maybeFreeze(scope, value, deep = false) {
|
|
|
3434
3458
|
|
|
3435
3459
|
// src/core/proxy.ts
|
|
3436
3460
|
function createProxyProxy(base, parent) {
|
|
3437
|
-
|
|
3438
|
-
|
|
3461
|
+
var isArray = Array.isArray(base);
|
|
3462
|
+
var state = {
|
|
3439
3463
|
type_: isArray ? 1 /* Array */ : 0 /* Object */,
|
|
3464
|
+
|
|
3440
3465
|
// Track which produce call this is associated with.
|
|
3441
3466
|
scope_: parent ? parent.scope_ : getCurrentScope(),
|
|
3442
3467
|
// True for both shallow and deep changes.
|
|
@@ -3458,26 +3483,27 @@ function createProxyProxy(base, parent) {
|
|
|
3458
3483
|
revoke_: null,
|
|
3459
3484
|
isManual_: false
|
|
3460
3485
|
};
|
|
3461
|
-
|
|
3462
|
-
|
|
3486
|
+
var target = state;
|
|
3487
|
+
var traps = objectTraps;
|
|
3463
3488
|
if (isArray) {
|
|
3464
3489
|
target = [state];
|
|
3465
3490
|
traps = arrayTraps;
|
|
3466
3491
|
}
|
|
3467
|
-
|
|
3492
|
+
var _Proxy$revocable = Proxy.revocable(target, traps),
|
|
3493
|
+
revoke = _Proxy$revocable.revoke,
|
|
3494
|
+
proxy = _Proxy$revocable.proxy;
|
|
3468
3495
|
state.draft_ = proxy;
|
|
3469
3496
|
state.revoke_ = revoke;
|
|
3470
3497
|
return proxy;
|
|
3471
3498
|
}
|
|
3472
3499
|
var objectTraps = {
|
|
3473
|
-
get(state, prop) {
|
|
3474
|
-
if (prop === DRAFT_STATE)
|
|
3475
|
-
|
|
3476
|
-
const source = latest(state);
|
|
3500
|
+
get: function get(state, prop) {
|
|
3501
|
+
if (prop === DRAFT_STATE) return state;
|
|
3502
|
+
var source = latest(state);
|
|
3477
3503
|
if (!has(source, prop)) {
|
|
3478
3504
|
return readPropFromProto(state, source, prop);
|
|
3479
3505
|
}
|
|
3480
|
-
|
|
3506
|
+
var value = source[prop];
|
|
3481
3507
|
if (state.finalized_ || !isDraftable(value)) {
|
|
3482
3508
|
return value;
|
|
3483
3509
|
}
|
|
@@ -3487,40 +3513,40 @@ var objectTraps = {
|
|
|
3487
3513
|
}
|
|
3488
3514
|
return value;
|
|
3489
3515
|
},
|
|
3490
|
-
has(state, prop) {
|
|
3516
|
+
has: function has(state, prop) {
|
|
3491
3517
|
return prop in latest(state);
|
|
3492
3518
|
},
|
|
3493
|
-
ownKeys(state) {
|
|
3519
|
+
ownKeys: function ownKeys(state) {
|
|
3494
3520
|
return Reflect.ownKeys(latest(state));
|
|
3495
3521
|
},
|
|
3496
|
-
set(state, prop, value) {
|
|
3497
|
-
|
|
3498
|
-
if (desc
|
|
3522
|
+
set: function set(state, prop, value) {
|
|
3523
|
+
var desc = getDescriptorFromProto(latest(state), prop);
|
|
3524
|
+
if (desc !== null && desc !== void 0 && desc.set) {
|
|
3499
3525
|
desc.set.call(state.draft_, value);
|
|
3500
3526
|
return true;
|
|
3501
3527
|
}
|
|
3502
3528
|
if (!state.modified_) {
|
|
3503
|
-
|
|
3504
|
-
|
|
3529
|
+
var current2 = peek(latest(state), prop);
|
|
3530
|
+
var currentState = current2 === null || current2 === void 0 ? void 0 : current2[DRAFT_STATE];
|
|
3505
3531
|
if (currentState && currentState.base_ === value) {
|
|
3506
3532
|
state.copy_[prop] = value;
|
|
3507
3533
|
state.assigned_[prop] = false;
|
|
3508
3534
|
return true;
|
|
3509
3535
|
}
|
|
3510
|
-
if (is(value, current2) && (value !== void 0 || has(state.base_, prop)))
|
|
3511
|
-
return true;
|
|
3536
|
+
if (is(value, current2) && (value !== void 0 || has(state.base_, prop))) return true;
|
|
3512
3537
|
prepareCopy(state);
|
|
3513
3538
|
markChanged(state);
|
|
3514
3539
|
}
|
|
3515
|
-
if (state.copy_[prop] === value &&
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3540
|
+
if (state.copy_[prop] === value && (
|
|
3541
|
+
// special case: handle new props with value 'undefined'
|
|
3542
|
+
value !== void 0 || prop in state.copy_) ||
|
|
3543
|
+
// special case: NaN
|
|
3544
|
+
Number.isNaN(value) && Number.isNaN(state.copy_[prop])) return true;
|
|
3519
3545
|
state.copy_[prop] = value;
|
|
3520
3546
|
state.assigned_[prop] = true;
|
|
3521
3547
|
return true;
|
|
3522
3548
|
},
|
|
3523
|
-
deleteProperty(state, prop) {
|
|
3549
|
+
deleteProperty: function deleteProperty(state, prop) {
|
|
3524
3550
|
if (peek(state.base_, prop) !== void 0 || prop in state.base_) {
|
|
3525
3551
|
state.assigned_[prop] = false;
|
|
3526
3552
|
prepareCopy(state);
|
|
@@ -3535,11 +3561,10 @@ var objectTraps = {
|
|
|
3535
3561
|
},
|
|
3536
3562
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
3537
3563
|
// the same guarantee in ES5 mode.
|
|
3538
|
-
getOwnPropertyDescriptor(state, prop) {
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
if (!desc)
|
|
3542
|
-
return desc;
|
|
3564
|
+
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(state, prop) {
|
|
3565
|
+
var owner = latest(state);
|
|
3566
|
+
var desc = Reflect.getOwnPropertyDescriptor(owner, prop);
|
|
3567
|
+
if (!desc) return desc;
|
|
3543
3568
|
return {
|
|
3544
3569
|
writable: true,
|
|
3545
3570
|
configurable: state.type_ !== 1 /* Array */ || prop !== "length",
|
|
@@ -3547,55 +3572,50 @@ var objectTraps = {
|
|
|
3547
3572
|
value: owner[prop]
|
|
3548
3573
|
};
|
|
3549
3574
|
},
|
|
3550
|
-
defineProperty() {
|
|
3575
|
+
defineProperty: function defineProperty() {
|
|
3551
3576
|
die(11);
|
|
3552
3577
|
},
|
|
3553
|
-
getPrototypeOf(state) {
|
|
3554
|
-
return
|
|
3578
|
+
getPrototypeOf: function getPrototypeOf(state) {
|
|
3579
|
+
return _getPrototypeOf(state.base_);
|
|
3555
3580
|
},
|
|
3556
|
-
setPrototypeOf() {
|
|
3581
|
+
setPrototypeOf: function setPrototypeOf() {
|
|
3557
3582
|
die(12);
|
|
3558
3583
|
}
|
|
3559
3584
|
};
|
|
3560
3585
|
var arrayTraps = {};
|
|
3561
|
-
each(objectTraps, (key, fn)
|
|
3562
|
-
arrayTraps[key] = function() {
|
|
3586
|
+
each(objectTraps, function (key, fn) {
|
|
3587
|
+
arrayTraps[key] = function () {
|
|
3563
3588
|
arguments[0] = arguments[0][0];
|
|
3564
3589
|
return fn.apply(this, arguments);
|
|
3565
3590
|
};
|
|
3566
3591
|
});
|
|
3567
|
-
arrayTraps.deleteProperty = function(state, prop) {
|
|
3568
|
-
if (process.env.NODE_ENV !== "production" && isNaN(parseInt(prop)))
|
|
3569
|
-
die(13);
|
|
3592
|
+
arrayTraps.deleteProperty = function (state, prop) {
|
|
3593
|
+
if (process.env.NODE_ENV !== "production" && isNaN(parseInt(prop))) die(13);
|
|
3570
3594
|
return arrayTraps.set.call(this, state, prop, void 0);
|
|
3571
3595
|
};
|
|
3572
|
-
arrayTraps.set = function(state, prop, value) {
|
|
3573
|
-
if (process.env.NODE_ENV !== "production" && prop !== "length" && isNaN(parseInt(prop)))
|
|
3574
|
-
die(14);
|
|
3596
|
+
arrayTraps.set = function (state, prop, value) {
|
|
3597
|
+
if (process.env.NODE_ENV !== "production" && prop !== "length" && isNaN(parseInt(prop))) die(14);
|
|
3575
3598
|
return objectTraps.set.call(this, state[0], prop, value, state[0]);
|
|
3576
3599
|
};
|
|
3577
3600
|
function peek(draft, prop) {
|
|
3578
|
-
|
|
3579
|
-
|
|
3601
|
+
var state = draft[DRAFT_STATE];
|
|
3602
|
+
var source = state ? latest(state) : draft;
|
|
3580
3603
|
return source[prop];
|
|
3581
3604
|
}
|
|
3582
3605
|
function readPropFromProto(state, source, prop) {
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
) : void 0;
|
|
3606
|
+
var _desc$get;
|
|
3607
|
+
var desc = getDescriptorFromProto(source, prop);
|
|
3608
|
+
return desc ? "value" in desc ? desc.value : // This is a very special case, if the prop is a getter defined by the
|
|
3609
|
+
// prototype, we should invoke it with the draft as context!
|
|
3610
|
+
(_desc$get = desc.get) === null || _desc$get === void 0 ? void 0 : _desc$get.call(state.draft_) : void 0;
|
|
3589
3611
|
}
|
|
3590
3612
|
function getDescriptorFromProto(source, prop) {
|
|
3591
|
-
if (!(prop in source))
|
|
3592
|
-
|
|
3593
|
-
let proto = getPrototypeOf$1(source);
|
|
3613
|
+
if (!(prop in source)) return void 0;
|
|
3614
|
+
var proto = _getPrototypeOf(source);
|
|
3594
3615
|
while (proto) {
|
|
3595
|
-
|
|
3596
|
-
if (desc)
|
|
3597
|
-
|
|
3598
|
-
proto = getPrototypeOf$1(proto);
|
|
3616
|
+
var desc = Object.getOwnPropertyDescriptor(proto, prop);
|
|
3617
|
+
if (desc) return desc;
|
|
3618
|
+
proto = _getPrototypeOf(proto);
|
|
3599
3619
|
}
|
|
3600
3620
|
return void 0;
|
|
3601
3621
|
}
|
|
@@ -3609,16 +3629,15 @@ function markChanged(state) {
|
|
|
3609
3629
|
}
|
|
3610
3630
|
function prepareCopy(state) {
|
|
3611
3631
|
if (!state.copy_) {
|
|
3612
|
-
state.copy_ = shallowCopy(
|
|
3613
|
-
state.base_,
|
|
3614
|
-
state.scope_.immer_.useStrictShallowCopy_
|
|
3615
|
-
);
|
|
3632
|
+
state.copy_ = shallowCopy(state.base_, state.scope_.immer_.useStrictShallowCopy_);
|
|
3616
3633
|
}
|
|
3617
3634
|
}
|
|
3618
3635
|
|
|
3619
3636
|
// src/core/immerClass.ts
|
|
3620
|
-
var Immer2 =
|
|
3621
|
-
|
|
3637
|
+
var Immer2 = /*#__PURE__*/function () {
|
|
3638
|
+
function Immer2(config) {
|
|
3639
|
+
var _this = this;
|
|
3640
|
+
_classCallCheck(this, Immer2);
|
|
3622
3641
|
this.autoFreeze_ = true;
|
|
3623
3642
|
this.useStrictShallowCopy_ = false;
|
|
3624
3643
|
/**
|
|
@@ -3640,153 +3659,162 @@ var Immer2 = class {
|
|
|
3640
3659
|
* @param {Function} patchListener - optional function that will be called with all the patches produced here
|
|
3641
3660
|
* @returns {any} a new state, or the initial state if nothing was modified
|
|
3642
3661
|
*/
|
|
3643
|
-
this.produce = (base, recipe, patchListener)
|
|
3662
|
+
this.produce = function (base, recipe, patchListener) {
|
|
3644
3663
|
if (typeof base === "function" && typeof recipe !== "function") {
|
|
3645
|
-
|
|
3664
|
+
var defaultBase = recipe;
|
|
3646
3665
|
recipe = base;
|
|
3647
|
-
|
|
3648
|
-
return function curriedProduce(
|
|
3649
|
-
|
|
3666
|
+
var self = _this;
|
|
3667
|
+
return function curriedProduce() {
|
|
3668
|
+
var _this2 = this;
|
|
3669
|
+
var base2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultBase;
|
|
3670
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key3 = 1; _key3 < _len2; _key3++) {
|
|
3671
|
+
args[_key3 - 1] = arguments[_key3];
|
|
3672
|
+
}
|
|
3673
|
+
return self.produce(base2, function (draft) {
|
|
3674
|
+
var _recipe;
|
|
3675
|
+
return (_recipe = recipe).call.apply(_recipe, [_this2, draft].concat(args));
|
|
3676
|
+
});
|
|
3650
3677
|
};
|
|
3651
3678
|
}
|
|
3652
|
-
if (typeof recipe !== "function")
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
die(7);
|
|
3656
|
-
let result;
|
|
3679
|
+
if (typeof recipe !== "function") die(6);
|
|
3680
|
+
if (patchListener !== void 0 && typeof patchListener !== "function") die(7);
|
|
3681
|
+
var result;
|
|
3657
3682
|
if (isDraftable(base)) {
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3683
|
+
var scope = enterScope(_this);
|
|
3684
|
+
var proxy = createProxy(base, void 0);
|
|
3685
|
+
var hasError = true;
|
|
3661
3686
|
try {
|
|
3662
3687
|
result = recipe(proxy);
|
|
3663
3688
|
hasError = false;
|
|
3664
3689
|
} finally {
|
|
3665
|
-
if (hasError)
|
|
3666
|
-
revokeScope(scope);
|
|
3667
|
-
else
|
|
3668
|
-
leaveScope(scope);
|
|
3690
|
+
if (hasError) revokeScope(scope);else leaveScope(scope);
|
|
3669
3691
|
}
|
|
3670
3692
|
usePatchesInScope(scope, patchListener);
|
|
3671
3693
|
return processResult(result, scope);
|
|
3672
|
-
} else if (!base ||
|
|
3694
|
+
} else if (!base || _typeof(base) !== "object") {
|
|
3673
3695
|
result = recipe(base);
|
|
3674
|
-
if (result === void 0)
|
|
3675
|
-
|
|
3676
|
-
if (result
|
|
3677
|
-
result = void 0;
|
|
3678
|
-
if (this.autoFreeze_)
|
|
3679
|
-
freeze(result, true);
|
|
3696
|
+
if (result === void 0) result = base;
|
|
3697
|
+
if (result === NOTHING) result = void 0;
|
|
3698
|
+
if (_this.autoFreeze_) freeze(result, true);
|
|
3680
3699
|
if (patchListener) {
|
|
3681
|
-
|
|
3682
|
-
|
|
3700
|
+
var p = [];
|
|
3701
|
+
var ip = [];
|
|
3683
3702
|
getPlugin("Patches").generateReplacementPatches_(base, result, p, ip);
|
|
3684
3703
|
patchListener(p, ip);
|
|
3685
3704
|
}
|
|
3686
3705
|
return result;
|
|
3687
|
-
} else
|
|
3688
|
-
die(1, base);
|
|
3706
|
+
} else die(1, base);
|
|
3689
3707
|
};
|
|
3690
|
-
this.produceWithPatches = (base, recipe)
|
|
3708
|
+
this.produceWithPatches = function (base, recipe) {
|
|
3691
3709
|
if (typeof base === "function") {
|
|
3692
|
-
return
|
|
3710
|
+
return function (state) {
|
|
3711
|
+
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key4 = 1; _key4 < _len3; _key4++) {
|
|
3712
|
+
args[_key4 - 1] = arguments[_key4];
|
|
3713
|
+
}
|
|
3714
|
+
return _this.produceWithPatches(state, function (draft) {
|
|
3715
|
+
return base.apply(void 0, [draft].concat(args));
|
|
3716
|
+
});
|
|
3717
|
+
};
|
|
3693
3718
|
}
|
|
3694
|
-
|
|
3695
|
-
|
|
3719
|
+
var patches, inversePatches;
|
|
3720
|
+
var result = _this.produce(base, recipe, function (p, ip) {
|
|
3696
3721
|
patches = p;
|
|
3697
3722
|
inversePatches = ip;
|
|
3698
3723
|
});
|
|
3699
3724
|
return [result, patches, inversePatches];
|
|
3700
3725
|
};
|
|
3701
|
-
if (typeof config
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
return processResult(void 0, scope);
|
|
3724
|
-
}
|
|
3725
|
-
/**
|
|
3726
|
-
* Pass true to automatically freeze all copies created by Immer.
|
|
3727
|
-
*
|
|
3728
|
-
* By default, auto-freezing is enabled.
|
|
3729
|
-
*/
|
|
3730
|
-
setAutoFreeze(value) {
|
|
3731
|
-
this.autoFreeze_ = value;
|
|
3732
|
-
}
|
|
3733
|
-
/**
|
|
3734
|
-
* Pass true to enable strict shallow copy.
|
|
3735
|
-
*
|
|
3736
|
-
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
|
|
3737
|
-
*/
|
|
3738
|
-
setUseStrictShallowCopy(value) {
|
|
3739
|
-
this.useStrictShallowCopy_ = value;
|
|
3740
|
-
}
|
|
3741
|
-
applyPatches(base, patches) {
|
|
3742
|
-
let i;
|
|
3743
|
-
for (i = patches.length - 1; i >= 0; i--) {
|
|
3744
|
-
const patch = patches[i];
|
|
3745
|
-
if (patch.path.length === 0 && patch.op === "replace") {
|
|
3746
|
-
base = patch.value;
|
|
3747
|
-
break;
|
|
3748
|
-
}
|
|
3726
|
+
if (typeof (config === null || config === void 0 ? void 0 : config.autoFreeze) === "boolean") this.setAutoFreeze(config.autoFreeze);
|
|
3727
|
+
if (typeof (config === null || config === void 0 ? void 0 : config.useStrictShallowCopy) === "boolean") this.setUseStrictShallowCopy(config.useStrictShallowCopy);
|
|
3728
|
+
}
|
|
3729
|
+
_createClass(Immer2, [{
|
|
3730
|
+
key: "createDraft",
|
|
3731
|
+
value: function createDraft(base) {
|
|
3732
|
+
if (!isDraftable(base)) die(8);
|
|
3733
|
+
if (isDraft(base)) base = current(base);
|
|
3734
|
+
var scope = enterScope(this);
|
|
3735
|
+
var proxy = createProxy(base, void 0);
|
|
3736
|
+
proxy[DRAFT_STATE].isManual_ = true;
|
|
3737
|
+
leaveScope(scope);
|
|
3738
|
+
return proxy;
|
|
3739
|
+
}
|
|
3740
|
+
}, {
|
|
3741
|
+
key: "finishDraft",
|
|
3742
|
+
value: function finishDraft(draft, patchListener) {
|
|
3743
|
+
var state = draft && draft[DRAFT_STATE];
|
|
3744
|
+
if (!state || !state.isManual_) die(9);
|
|
3745
|
+
var scope = state.scope_;
|
|
3746
|
+
usePatchesInScope(scope, patchListener);
|
|
3747
|
+
return processResult(void 0, scope);
|
|
3749
3748
|
}
|
|
3750
|
-
|
|
3751
|
-
|
|
3749
|
+
/**
|
|
3750
|
+
* Pass true to automatically freeze all copies created by Immer.
|
|
3751
|
+
*
|
|
3752
|
+
* By default, auto-freezing is enabled.
|
|
3753
|
+
*/
|
|
3754
|
+
}, {
|
|
3755
|
+
key: "setAutoFreeze",
|
|
3756
|
+
value: function setAutoFreeze(value) {
|
|
3757
|
+
this.autoFreeze_ = value;
|
|
3752
3758
|
}
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3759
|
+
/**
|
|
3760
|
+
* Pass true to enable strict shallow copy.
|
|
3761
|
+
*
|
|
3762
|
+
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
|
|
3763
|
+
*/
|
|
3764
|
+
}, {
|
|
3765
|
+
key: "setUseStrictShallowCopy",
|
|
3766
|
+
value: function setUseStrictShallowCopy(value) {
|
|
3767
|
+
this.useStrictShallowCopy_ = value;
|
|
3768
|
+
}
|
|
3769
|
+
}, {
|
|
3770
|
+
key: "applyPatches",
|
|
3771
|
+
value: function applyPatches(base, patches) {
|
|
3772
|
+
var i;
|
|
3773
|
+
for (i = patches.length - 1; i >= 0; i--) {
|
|
3774
|
+
var patch = patches[i];
|
|
3775
|
+
if (patch.path.length === 0 && patch.op === "replace") {
|
|
3776
|
+
base = patch.value;
|
|
3777
|
+
break;
|
|
3778
|
+
}
|
|
3779
|
+
}
|
|
3780
|
+
if (i > -1) {
|
|
3781
|
+
patches = patches.slice(i + 1);
|
|
3782
|
+
}
|
|
3783
|
+
var applyPatchesImpl = getPlugin("Patches").applyPatches_;
|
|
3784
|
+
if (isDraft(base)) {
|
|
3785
|
+
return applyPatchesImpl(base, patches);
|
|
3786
|
+
}
|
|
3787
|
+
return this.produce(base, function (draft) {
|
|
3788
|
+
return applyPatchesImpl(draft, patches);
|
|
3789
|
+
});
|
|
3756
3790
|
}
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
);
|
|
3761
|
-
}
|
|
3762
|
-
};
|
|
3791
|
+
}]);
|
|
3792
|
+
return Immer2;
|
|
3793
|
+
}();
|
|
3763
3794
|
function createProxy(value, parent) {
|
|
3764
|
-
|
|
3765
|
-
|
|
3795
|
+
var draft = isMap(value) ? getPlugin("MapSet").proxyMap_(value, parent) : isSet(value) ? getPlugin("MapSet").proxySet_(value, parent) : createProxyProxy(value, parent);
|
|
3796
|
+
var scope = parent ? parent.scope_ : getCurrentScope();
|
|
3766
3797
|
scope.drafts_.push(draft);
|
|
3767
3798
|
return draft;
|
|
3768
3799
|
}
|
|
3769
3800
|
|
|
3770
3801
|
// src/core/current.ts
|
|
3771
3802
|
function current(value) {
|
|
3772
|
-
if (!isDraft(value))
|
|
3773
|
-
die(10, value);
|
|
3803
|
+
if (!isDraft(value)) die(10, value);
|
|
3774
3804
|
return currentImpl(value);
|
|
3775
3805
|
}
|
|
3776
3806
|
function currentImpl(value) {
|
|
3777
|
-
if (!isDraftable(value) || isFrozen(value))
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
let copy;
|
|
3807
|
+
if (!isDraftable(value) || isFrozen(value)) return value;
|
|
3808
|
+
var state = value[DRAFT_STATE];
|
|
3809
|
+
var copy;
|
|
3781
3810
|
if (state) {
|
|
3782
|
-
if (!state.modified_)
|
|
3783
|
-
return state.base_;
|
|
3811
|
+
if (!state.modified_) return state.base_;
|
|
3784
3812
|
state.finalized_ = true;
|
|
3785
3813
|
copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);
|
|
3786
3814
|
} else {
|
|
3787
3815
|
copy = shallowCopy(value, true);
|
|
3788
3816
|
}
|
|
3789
|
-
each(copy, (key, childValue)
|
|
3817
|
+
each(copy, function (key, childValue) {
|
|
3790
3818
|
set(copy, key, currentImpl(childValue));
|
|
3791
3819
|
});
|
|
3792
3820
|
if (state) {
|
|
@@ -3798,17 +3826,13 @@ function currentImpl(value) {
|
|
|
3798
3826
|
// src/immer.ts
|
|
3799
3827
|
var immer = new Immer2();
|
|
3800
3828
|
immer.produce;
|
|
3801
|
-
immer.produceWithPatches.bind(
|
|
3802
|
-
immer
|
|
3803
|
-
);
|
|
3829
|
+
immer.produceWithPatches.bind(immer);
|
|
3804
3830
|
immer.setAutoFreeze.bind(immer);
|
|
3805
3831
|
immer.setUseStrictShallowCopy.bind(immer);
|
|
3806
3832
|
immer.applyPatches.bind(immer);
|
|
3807
3833
|
immer.createDraft.bind(immer);
|
|
3808
3834
|
immer.finishDraft.bind(immer);
|
|
3809
3835
|
|
|
3810
|
-
/* eslint-disable @bigbinary/neeto/neetocommons-tips */
|
|
3811
|
-
|
|
3812
3836
|
/**
|
|
3813
3837
|
* @template {Function} T
|
|
3814
3838
|
* @param {T} func
|
|
@@ -19322,7 +19346,7 @@ const getCliOptions = () => {
|
|
|
19322
19346
|
|
|
19323
19347
|
const getFileContent = async ({
|
|
19324
19348
|
relativeFilePath = "",
|
|
19325
|
-
debug = false
|
|
19349
|
+
debug = false
|
|
19326
19350
|
}) => {
|
|
19327
19351
|
const resolvedFilePath = path$2.resolve(relativeFilePath);
|
|
19328
19352
|
|
|
@@ -19338,7 +19362,7 @@ const createOrReplaceFile = async ({
|
|
|
19338
19362
|
relativeFilePath = "",
|
|
19339
19363
|
content = "",
|
|
19340
19364
|
debug = false,
|
|
19341
|
-
options = {}
|
|
19365
|
+
options = {}
|
|
19342
19366
|
}) => {
|
|
19343
19367
|
const resolvedFilePath = path$2.resolve(relativeFilePath);
|
|
19344
19368
|
|
|
@@ -19346,7 +19370,7 @@ const createOrReplaceFile = async ({
|
|
|
19346
19370
|
return await writeFile(resolvedFilePath, content, {
|
|
19347
19371
|
encoding: "utf8",
|
|
19348
19372
|
flag: "w",
|
|
19349
|
-
...options
|
|
19373
|
+
...options
|
|
19350
19374
|
});
|
|
19351
19375
|
} catch (error) {
|
|
19352
19376
|
debug && console.error(error);
|
|
@@ -19357,7 +19381,7 @@ const createOrReplaceFile = async ({
|
|
|
19357
19381
|
const identicalFiles = async ({
|
|
19358
19382
|
sourceFile = "",
|
|
19359
19383
|
destinationFile = "",
|
|
19360
|
-
debug = false
|
|
19384
|
+
debug = false
|
|
19361
19385
|
}) => {
|
|
19362
19386
|
try {
|
|
19363
19387
|
const sourceFileContent = await readFile(sourceFile);
|
|
@@ -19375,7 +19399,7 @@ const identicalFiles = async ({
|
|
|
19375
19399
|
const identicalDirectoryFiles = async ({
|
|
19376
19400
|
sourceDirectory,
|
|
19377
19401
|
destinationDirectory,
|
|
19378
|
-
debug
|
|
19402
|
+
debug
|
|
19379
19403
|
}) => {
|
|
19380
19404
|
try {
|
|
19381
19405
|
const files = await promises.readdir(sourceDirectory);
|
|
@@ -19390,14 +19414,14 @@ const identicalDirectoryFiles = async ({
|
|
|
19390
19414
|
return await identicalFiles({
|
|
19391
19415
|
sourceFile,
|
|
19392
19416
|
destinationFile,
|
|
19393
|
-
debug
|
|
19417
|
+
debug
|
|
19394
19418
|
});
|
|
19395
19419
|
} else {
|
|
19396
19420
|
await mkdir(destinationFile, { recursive: true });
|
|
19397
19421
|
const identicalFiles = await identicalDirectoryFiles({
|
|
19398
19422
|
sourceDirectory: sourceFile,
|
|
19399
19423
|
destinationDirectory: destinationFile,
|
|
19400
|
-
debug
|
|
19424
|
+
debug
|
|
19401
19425
|
});
|
|
19402
19426
|
|
|
19403
19427
|
const results = await Promise.all(identicalFiles);
|
|
@@ -19417,7 +19441,7 @@ const createOrReplaceDirectoryFiles = async ({
|
|
|
19417
19441
|
sourceDirectory,
|
|
19418
19442
|
destinationDirectory,
|
|
19419
19443
|
debug,
|
|
19420
|
-
options
|
|
19444
|
+
options
|
|
19421
19445
|
}) => {
|
|
19422
19446
|
try {
|
|
19423
19447
|
const files = await promises.readdir(sourceDirectory);
|
|
@@ -19431,14 +19455,14 @@ const createOrReplaceDirectoryFiles = async ({
|
|
|
19431
19455
|
if (isFile) {
|
|
19432
19456
|
const content = await getFileContent({
|
|
19433
19457
|
relativeFilePath: sourcePath,
|
|
19434
|
-
debug
|
|
19458
|
+
debug
|
|
19435
19459
|
});
|
|
19436
19460
|
|
|
19437
19461
|
await createOrReplaceFile({
|
|
19438
19462
|
relativeFilePath: destinationPath,
|
|
19439
19463
|
content,
|
|
19440
19464
|
debug,
|
|
19441
|
-
options
|
|
19465
|
+
options
|
|
19442
19466
|
});
|
|
19443
19467
|
} else {
|
|
19444
19468
|
await mkdir(destinationPath, { recursive: true });
|
|
@@ -19446,7 +19470,7 @@ const createOrReplaceDirectoryFiles = async ({
|
|
|
19446
19470
|
sourceDirectory: sourcePath,
|
|
19447
19471
|
destinationDirectory: destinationPath,
|
|
19448
19472
|
debug,
|
|
19449
|
-
options
|
|
19473
|
+
options
|
|
19450
19474
|
});
|
|
19451
19475
|
}
|
|
19452
19476
|
});
|
|
@@ -19499,14 +19523,14 @@ const getNanoType = async () => {
|
|
|
19499
19523
|
|
|
19500
19524
|
return {
|
|
19501
19525
|
type: NANO_TYPE_MAP[last$2(split$1("-", projectName))],
|
|
19502
|
-
repoName: projectName
|
|
19526
|
+
repoName: projectName
|
|
19503
19527
|
};
|
|
19504
19528
|
};
|
|
19505
19529
|
|
|
19506
19530
|
const getPackageJson = async (debug) => {
|
|
19507
19531
|
const packageJsonContent = await getFileContent({
|
|
19508
19532
|
relativeFilePath: PACKAGE_JSON_PATH,
|
|
19509
|
-
debug
|
|
19533
|
+
debug
|
|
19510
19534
|
});
|
|
19511
19535
|
|
|
19512
19536
|
return JSON.parse(packageJsonContent);
|
|
@@ -19732,20 +19756,20 @@ const prettier = async (debug) => {
|
|
|
19732
19756
|
const DEPENDENCIES$4 = {};
|
|
19733
19757
|
|
|
19734
19758
|
const DEV_DEPENDENCIES$4 = {
|
|
19735
|
-
"@babel/core": "7.
|
|
19736
|
-
"@babel/eslint-parser": "7.22.
|
|
19737
|
-
"@babel/plugin-transform-runtime": "7.
|
|
19738
|
-
"@babel/preset-env": "7.
|
|
19739
|
-
"@babel/preset-react": "7.22.
|
|
19740
|
-
"@babel/preset-typescript": "7.
|
|
19741
|
-
"@babel/runtime": "7.
|
|
19742
|
-
"@bigbinary/babel-preset-neeto": "1.0.
|
|
19759
|
+
"@babel/core": "7.23.2",
|
|
19760
|
+
"@babel/eslint-parser": "7.22.15",
|
|
19761
|
+
"@babel/plugin-transform-runtime": "7.23.2",
|
|
19762
|
+
"@babel/preset-env": "7.23.2",
|
|
19763
|
+
"@babel/preset-react": "7.22.15",
|
|
19764
|
+
"@babel/preset-typescript": "7.23.2",
|
|
19765
|
+
"@babel/runtime": "7.23.2",
|
|
19766
|
+
"@bigbinary/babel-preset-neeto": "1.0.6",
|
|
19743
19767
|
"@bigbinary/eslint-plugin-neeto": "latest",
|
|
19744
19768
|
"@bigbinary/neeto-cist": "latest",
|
|
19745
19769
|
"@bigbinary/neeto-commons-frontend": "latest",
|
|
19746
19770
|
"@bigbinary/neeto-icons": "latest",
|
|
19747
19771
|
"@bigbinary/neetoui": "latest",
|
|
19748
|
-
autoprefixer: "10.4.
|
|
19772
|
+
autoprefixer: "10.4.16",
|
|
19749
19773
|
"babel-loader": "9.1.3",
|
|
19750
19774
|
"babel-plugin-istanbul": "6.1.1",
|
|
19751
19775
|
"babel-plugin-js-logger": "1.0.17",
|
|
@@ -19753,25 +19777,25 @@ const DEV_DEPENDENCIES$4 = {
|
|
|
19753
19777
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
|
19754
19778
|
"babel-preset-react": "6.24.1",
|
|
19755
19779
|
"babel-preset-typescript": "7.0.0-alpha.19",
|
|
19756
|
-
eslint: "8.
|
|
19757
|
-
"eslint-config-prettier": "
|
|
19758
|
-
"eslint-plugin-cypress": "2.
|
|
19759
|
-
"eslint-plugin-import": "2.
|
|
19780
|
+
eslint: "8.52.0",
|
|
19781
|
+
"eslint-config-prettier": "9.0.0",
|
|
19782
|
+
"eslint-plugin-cypress": "2.15.1",
|
|
19783
|
+
"eslint-plugin-import": "2.29.0",
|
|
19760
19784
|
"eslint-plugin-jam3": "0.2.3",
|
|
19761
19785
|
"eslint-plugin-json": "3.1.0",
|
|
19762
|
-
"eslint-plugin-prettier": "
|
|
19786
|
+
"eslint-plugin-prettier": "4.0.0",
|
|
19763
19787
|
"eslint-plugin-promise": "6.1.1",
|
|
19764
|
-
"eslint-plugin-react": "7.
|
|
19788
|
+
"eslint-plugin-react": "7.33.2",
|
|
19765
19789
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
19766
19790
|
"eslint-plugin-unused-imports": "3.0.0",
|
|
19767
19791
|
husky: "8.0.3",
|
|
19768
|
-
"lint-staged": "
|
|
19769
|
-
postcss: "8.4.
|
|
19792
|
+
"lint-staged": "15.0.2",
|
|
19793
|
+
postcss: "8.4.31",
|
|
19770
19794
|
"postcss-import": "15.1.0",
|
|
19771
19795
|
"postcss-loader": "7.3.3",
|
|
19772
|
-
"postcss-preset-env": "9.
|
|
19773
|
-
prettier: "
|
|
19774
|
-
"prettier-plugin-tailwindcss": "0.
|
|
19796
|
+
"postcss-preset-env": "9.2.0",
|
|
19797
|
+
prettier: "3.0.3",
|
|
19798
|
+
"prettier-plugin-tailwindcss": "0.5.6",
|
|
19775
19799
|
};
|
|
19776
19800
|
|
|
19777
19801
|
const PEER_DEPENDENCIES$4 = {};
|
|
@@ -19785,18 +19809,18 @@ var common = {
|
|
|
19785
19809
|
const DEPENDENCIES$3 = {
|
|
19786
19810
|
"@honeybadger-io/js": "6.5.3",
|
|
19787
19811
|
"@honeybadger-io/react": "6.1.9",
|
|
19788
|
-
antd: "
|
|
19789
|
-
axios: "1.
|
|
19790
|
-
i18next: "23.
|
|
19812
|
+
antd: "5.10.2",
|
|
19813
|
+
axios: "1.6.0",
|
|
19814
|
+
i18next: "23.6.0",
|
|
19791
19815
|
"js-logger": "1.6.1",
|
|
19792
|
-
ramda: "0.29.
|
|
19793
|
-
react: "
|
|
19794
|
-
"react-dom": "
|
|
19795
|
-
"react-i18next": "13.
|
|
19816
|
+
ramda: "0.29.1",
|
|
19817
|
+
react: "18.2.0",
|
|
19818
|
+
"react-dom": "18.2.0",
|
|
19819
|
+
"react-i18next": "13.3.1",
|
|
19796
19820
|
"react-router-dom": "5.3.4",
|
|
19797
19821
|
"react-toastify": "8.2.0",
|
|
19798
|
-
sass: "1.
|
|
19799
|
-
yup: "1.2
|
|
19822
|
+
sass: "1.69.5",
|
|
19823
|
+
yup: "1.3.2",
|
|
19800
19824
|
};
|
|
19801
19825
|
|
|
19802
19826
|
const DEV_DEPENDENCIES$3 = {};
|
|
@@ -19814,41 +19838,40 @@ const DEPENDENCIES$2 = {};
|
|
|
19814
19838
|
const DEV_DEPENDENCIES$2 = {
|
|
19815
19839
|
"@bigbinary/neeto-filters-frontend": "latest",
|
|
19816
19840
|
"@bigbinary/neeto-molecules": "latest",
|
|
19817
|
-
"@faker-js/faker": "8.0
|
|
19841
|
+
"@faker-js/faker": "8.2.0",
|
|
19818
19842
|
"@honeybadger-io/js": "6.5.3",
|
|
19819
19843
|
"@honeybadger-io/react": "6.1.9",
|
|
19820
|
-
"@rollup/plugin-alias": "5.0.
|
|
19821
|
-
"@rollup/plugin-babel": "6.0.
|
|
19822
|
-
"@rollup/plugin-commonjs": "25.0.
|
|
19823
|
-
"@rollup/plugin-json": "6.0.
|
|
19824
|
-
"@rollup/plugin-node-resolve": "15.
|
|
19825
|
-
"@rollup/plugin-replace": "5.0.
|
|
19826
|
-
"@svgr/rollup": "8.0
|
|
19827
|
-
antd: "
|
|
19828
|
-
axios: "1.
|
|
19844
|
+
"@rollup/plugin-alias": "5.0.1",
|
|
19845
|
+
"@rollup/plugin-babel": "6.0.4",
|
|
19846
|
+
"@rollup/plugin-commonjs": "25.0.7",
|
|
19847
|
+
"@rollup/plugin-json": "6.0.1",
|
|
19848
|
+
"@rollup/plugin-node-resolve": "15.2.3",
|
|
19849
|
+
"@rollup/plugin-replace": "5.0.4",
|
|
19850
|
+
"@svgr/rollup": "8.1.0",
|
|
19851
|
+
antd: "5.10.2",
|
|
19852
|
+
axios: "1.6.0",
|
|
19829
19853
|
classnames: "2.3.2",
|
|
19830
|
-
formik: "2.4.
|
|
19831
|
-
i18next: "23.
|
|
19854
|
+
formik: "2.4.5",
|
|
19855
|
+
i18next: "23.6.0",
|
|
19832
19856
|
"js-logger": "1.6.1",
|
|
19833
|
-
"mixpanel-browser": "2.47.0",
|
|
19834
19857
|
qs: "6.11.2",
|
|
19835
|
-
ramda: "0.29.
|
|
19836
|
-
react: "
|
|
19837
|
-
"react-dom": "
|
|
19858
|
+
ramda: "0.29.1",
|
|
19859
|
+
react: "18.2.0",
|
|
19860
|
+
"react-dom": "18.2.0",
|
|
19838
19861
|
"react-helmet": "6.1.0",
|
|
19839
|
-
"react-i18next": "13.
|
|
19862
|
+
"react-i18next": "13.3.1",
|
|
19863
|
+
"react-query": "3.39.3",
|
|
19840
19864
|
"react-router-dom": "5.3.4",
|
|
19841
19865
|
"react-toastify": "8.2.0",
|
|
19842
|
-
"react-query": "3.39.3",
|
|
19843
19866
|
rollup: "2.79.1",
|
|
19844
19867
|
"rollup-plugin-analyzer": "4.0.0",
|
|
19845
19868
|
"rollup-plugin-cleaner": "1.0.0",
|
|
19846
19869
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
19847
19870
|
"rollup-plugin-styles": "4.0.0",
|
|
19848
|
-
sass: "1.
|
|
19871
|
+
sass: "1.69.5",
|
|
19849
19872
|
tailwindcss: "npm:@tailwindcss/postcss7-compat",
|
|
19850
19873
|
util: "0.12.5",
|
|
19851
|
-
yup: "1.2
|
|
19874
|
+
yup: "1.3.2",
|
|
19852
19875
|
};
|
|
19853
19876
|
|
|
19854
19877
|
const PEER_DEPENDENCIES$2 = {
|
|
@@ -19859,20 +19882,19 @@ const PEER_DEPENDENCIES$2 = {
|
|
|
19859
19882
|
"@bigbinary/neetoui": "latest",
|
|
19860
19883
|
"@honeybadger-io/js": "^6.5.3",
|
|
19861
19884
|
"@honeybadger-io/react": "^6.1.9",
|
|
19862
|
-
axios: "^
|
|
19885
|
+
axios: "^1.6.0",
|
|
19863
19886
|
classnames: "^2.3.2",
|
|
19864
|
-
formik: "^2.
|
|
19865
|
-
i18next: "^
|
|
19887
|
+
formik: "^2.4.5",
|
|
19888
|
+
i18next: "^23.6.0",
|
|
19866
19889
|
"js-logger": "^1.6.1",
|
|
19867
|
-
|
|
19868
|
-
|
|
19869
|
-
react: "
|
|
19870
|
-
"react-dom": "17.0.2",
|
|
19890
|
+
ramda: "^0.29.1",
|
|
19891
|
+
react: "^18.2.0",
|
|
19892
|
+
"react-dom": "^18.2.0",
|
|
19871
19893
|
"react-helmet": "^6.1.0",
|
|
19872
|
-
"react-i18next": "^
|
|
19873
|
-
"react-query": "3.39.
|
|
19874
|
-
"react-router-dom": "5.3.
|
|
19875
|
-
"react-toastify": "8.2.0",
|
|
19894
|
+
"react-i18next": "^13.3.1",
|
|
19895
|
+
"react-query": "^3.39.3",
|
|
19896
|
+
"react-router-dom": "^5.3.4",
|
|
19897
|
+
"react-toastify": "^8.2.0",
|
|
19876
19898
|
yup: "^0.32.11",
|
|
19877
19899
|
};
|
|
19878
19900
|
|
|
@@ -19887,41 +19909,40 @@ const DEPENDENCIES$1 = {};
|
|
|
19887
19909
|
const DEV_DEPENDENCIES$1 = {
|
|
19888
19910
|
"@bigbinary/neeto-filters-frontend": "latest",
|
|
19889
19911
|
"@bigbinary/neeto-molecules": "latest",
|
|
19890
|
-
"@faker-js/faker": "8.0
|
|
19912
|
+
"@faker-js/faker": "8.2.0",
|
|
19891
19913
|
"@honeybadger-io/js": "6.5.3",
|
|
19892
19914
|
"@honeybadger-io/react": "6.1.9",
|
|
19893
|
-
"@rollup/plugin-alias": "5.0.
|
|
19894
|
-
"@rollup/plugin-babel": "6.0.
|
|
19895
|
-
"@rollup/plugin-commonjs": "25.0.
|
|
19896
|
-
"@rollup/plugin-json": "6.0.
|
|
19897
|
-
"@rollup/plugin-node-resolve": "15.
|
|
19898
|
-
"@rollup/plugin-replace": "5.0.
|
|
19899
|
-
"@svgr/rollup": "8.0
|
|
19900
|
-
antd: "
|
|
19901
|
-
axios: "1.
|
|
19915
|
+
"@rollup/plugin-alias": "5.0.1",
|
|
19916
|
+
"@rollup/plugin-babel": "6.0.4",
|
|
19917
|
+
"@rollup/plugin-commonjs": "25.0.7",
|
|
19918
|
+
"@rollup/plugin-json": "6.0.1",
|
|
19919
|
+
"@rollup/plugin-node-resolve": "15.2.3",
|
|
19920
|
+
"@rollup/plugin-replace": "5.0.4",
|
|
19921
|
+
"@svgr/rollup": "8.1.0",
|
|
19922
|
+
antd: "5.10.2",
|
|
19923
|
+
axios: "1.6.0",
|
|
19902
19924
|
classnames: "2.3.2",
|
|
19903
|
-
formik: "2.4.
|
|
19904
|
-
i18next: "23.
|
|
19925
|
+
formik: "2.4.5",
|
|
19926
|
+
i18next: "23.6.0",
|
|
19905
19927
|
"js-logger": "1.6.1",
|
|
19906
|
-
"mixpanel-browser": "2.47.0",
|
|
19907
19928
|
qs: "6.11.2",
|
|
19908
|
-
ramda: "0.29.
|
|
19909
|
-
react: "
|
|
19910
|
-
"react-dom": "
|
|
19929
|
+
ramda: "0.29.1",
|
|
19930
|
+
react: "18.2.0",
|
|
19931
|
+
"react-dom": "18.2.0",
|
|
19911
19932
|
"react-helmet": "6.1.0",
|
|
19912
|
-
"react-i18next": "13.
|
|
19933
|
+
"react-i18next": "13.3.1",
|
|
19934
|
+
"react-query": "3.39.3",
|
|
19913
19935
|
"react-router-dom": "5.3.4",
|
|
19914
19936
|
"react-toastify": "8.2.0",
|
|
19915
|
-
"react-query": "3.39.3",
|
|
19916
19937
|
rollup: "2.79.1",
|
|
19917
19938
|
"rollup-plugin-analyzer": "4.0.0",
|
|
19918
19939
|
"rollup-plugin-cleaner": "1.0.0",
|
|
19919
19940
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
19920
19941
|
"rollup-plugin-styles": "4.0.0",
|
|
19921
|
-
sass: "1.
|
|
19942
|
+
sass: "1.69.5",
|
|
19922
19943
|
tailwindcss: "npm:@tailwindcss/postcss7-compat",
|
|
19923
19944
|
util: "0.12.5",
|
|
19924
|
-
yup: "1.2
|
|
19945
|
+
yup: "1.3.2",
|
|
19925
19946
|
};
|
|
19926
19947
|
|
|
19927
19948
|
const PEER_DEPENDENCIES$1 = {
|
|
@@ -19932,20 +19953,19 @@ const PEER_DEPENDENCIES$1 = {
|
|
|
19932
19953
|
"@bigbinary/neetoui": "latest",
|
|
19933
19954
|
"@honeybadger-io/js": "^6.5.3",
|
|
19934
19955
|
"@honeybadger-io/react": "^6.1.9",
|
|
19935
|
-
axios: "^
|
|
19956
|
+
axios: "^1.6.0",
|
|
19936
19957
|
classnames: "^2.3.2",
|
|
19937
|
-
formik: "^2.
|
|
19938
|
-
i18next: "^
|
|
19958
|
+
formik: "^2.4.5",
|
|
19959
|
+
i18next: "^23.6.0",
|
|
19939
19960
|
"js-logger": "^1.6.1",
|
|
19940
|
-
|
|
19941
|
-
|
|
19942
|
-
react: "
|
|
19943
|
-
"react-dom": "17.0.2",
|
|
19961
|
+
ramda: "^0.29.1",
|
|
19962
|
+
react: "^18.2.0",
|
|
19963
|
+
"react-dom": "^18.2.0",
|
|
19944
19964
|
"react-helmet": "^6.1.0",
|
|
19945
|
-
"react-i18next": "^
|
|
19946
|
-
"react-query": "3.39.
|
|
19947
|
-
"react-router-dom": "5.3.
|
|
19948
|
-
"react-toastify": "8.2.0",
|
|
19965
|
+
"react-i18next": "^13.3.1",
|
|
19966
|
+
"react-query": "^3.39.3",
|
|
19967
|
+
"react-router-dom": "^5.3.4",
|
|
19968
|
+
"react-toastify": "^8.2.0",
|
|
19949
19969
|
yup: "^0.32.11",
|
|
19950
19970
|
};
|
|
19951
19971
|
|
|
@@ -34785,7 +34805,7 @@ followRedirects$1.exports.wrap = wrap;
|
|
|
34785
34805
|
var followRedirectsExports = followRedirects$1.exports;
|
|
34786
34806
|
var followRedirects = /*@__PURE__*/getDefaultExportFromCjs(followRedirectsExports);
|
|
34787
34807
|
|
|
34788
|
-
const VERSION = "1.
|
|
34808
|
+
const VERSION = "1.6.0";
|
|
34789
34809
|
|
|
34790
34810
|
function parseProtocol(url) {
|
|
34791
34811
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
@@ -35389,6 +35409,18 @@ const wrapAsync = (asyncExecutor) => {
|
|
|
35389
35409
|
})
|
|
35390
35410
|
};
|
|
35391
35411
|
|
|
35412
|
+
const resolveFamily = ({address, family}) => {
|
|
35413
|
+
if (!utils.isString(address)) {
|
|
35414
|
+
throw TypeError('address must be a string');
|
|
35415
|
+
}
|
|
35416
|
+
return ({
|
|
35417
|
+
address,
|
|
35418
|
+
family: family || (address.indexOf('.') < 0 ? 6 : 4)
|
|
35419
|
+
});
|
|
35420
|
+
};
|
|
35421
|
+
|
|
35422
|
+
const buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family});
|
|
35423
|
+
|
|
35392
35424
|
/*eslint consistent-return:0*/
|
|
35393
35425
|
var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
35394
35426
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
@@ -35399,15 +35431,16 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
35399
35431
|
let rejected = false;
|
|
35400
35432
|
let req;
|
|
35401
35433
|
|
|
35402
|
-
if (lookup
|
|
35403
|
-
|
|
35404
|
-
|
|
35405
|
-
|
|
35406
|
-
|
|
35407
|
-
|
|
35408
|
-
|
|
35409
|
-
|
|
35410
|
-
|
|
35434
|
+
if (lookup) {
|
|
35435
|
+
const _lookup = callbackify$1(lookup, (value) => utils.isArray(value) ? value : [value]);
|
|
35436
|
+
// hotfix to support opt.all option which is required for node 20.x
|
|
35437
|
+
lookup = (hostname, opt, cb) => {
|
|
35438
|
+
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
35439
|
+
const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
35440
|
+
|
|
35441
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
35442
|
+
});
|
|
35443
|
+
};
|
|
35411
35444
|
}
|
|
35412
35445
|
|
|
35413
35446
|
// temporary internal emitter until the AxiosRequest class will be implemented
|
|
@@ -35810,7 +35843,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
35810
35843
|
}
|
|
35811
35844
|
response.data = responseData;
|
|
35812
35845
|
} catch (err) {
|
|
35813
|
-
reject(AxiosError.from(err, null, config, response.request, response));
|
|
35846
|
+
return reject(AxiosError.from(err, null, config, response.request, response));
|
|
35814
35847
|
}
|
|
35815
35848
|
settle(resolve, reject, response);
|
|
35816
35849
|
});
|
|
@@ -36193,8 +36226,8 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
36193
36226
|
// Specifically not if we're in a web worker, or react-native.
|
|
36194
36227
|
if (platform.isStandardBrowserEnv) {
|
|
36195
36228
|
// Add xsrf header
|
|
36196
|
-
|
|
36197
|
-
|
|
36229
|
+
// regarding CVE-2023-45857 config.withCredentials condition was removed temporarily
|
|
36230
|
+
const xsrfValue = isURLSameOrigin(fullPath) && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
36198
36231
|
|
|
36199
36232
|
if (xsrfValue) {
|
|
36200
36233
|
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
@@ -37108,7 +37141,7 @@ const updateBigbinaryPackages = async (recommendedList) => {
|
|
|
37108
37141
|
while (retries < MAX_RETRIES) {
|
|
37109
37142
|
try {
|
|
37110
37143
|
const {
|
|
37111
|
-
data: { repos }
|
|
37144
|
+
data: { repos }
|
|
37112
37145
|
} = await axios$1.get(
|
|
37113
37146
|
"https://nanos-release-tool-staging.neetodeployapp.com/api/v1/repos"
|
|
37114
37147
|
);
|
|
@@ -37214,7 +37247,7 @@ const recommendedPackageVersions = async (debug) => {
|
|
|
37214
37247
|
(await createOrReplaceFile({
|
|
37215
37248
|
relativeFilePath: PACKAGE_JSON_PATH,
|
|
37216
37249
|
content: JSON.stringify(newPackageJson, null, 2),
|
|
37217
|
-
debug
|
|
37250
|
+
debug
|
|
37218
37251
|
}));
|
|
37219
37252
|
|
|
37220
37253
|
const commands = getInstallationCommands(
|
|
@@ -37236,7 +37269,7 @@ const recommendedPackageVersions = async (debug) => {
|
|
|
37236
37269
|
return {
|
|
37237
37270
|
error: "The dependency packages are not using the recommended versions.",
|
|
37238
37271
|
status: STATUSES.FAIL,
|
|
37239
|
-
fix
|
|
37272
|
+
fix
|
|
37240
37273
|
};
|
|
37241
37274
|
}
|
|
37242
37275
|
|