strapi-plugin-field-clearer 1.0.0 → 1.0.1

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.
@@ -10480,7 +10480,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
10480
10480
  var ys = arrObjKeys(obj, inspect2);
10481
10481
  var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
10482
10482
  var protoTag = obj instanceof Object ? "" : "null prototype";
10483
- var stringTag2 = !isPlainObject2 && toStringTag$1 && Object(obj) === obj && toStringTag$1 in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
10483
+ var stringTag2 = !isPlainObject2 && toStringTag$1 && Object(obj) === obj && toStringTag$1 in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
10484
10484
  var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
10485
10485
  var tag = constructorTag + (stringTag2 || protoTag ? "[" + $join.call($concat$1.call([], stringTag2 || [], protoTag || []), ": ") + "] " : "");
10486
10486
  if (ys.length === 0) {
@@ -10505,25 +10505,25 @@ function canTrustToString(obj) {
10505
10505
  return !toStringTag$1 || !(typeof obj === "object" && (toStringTag$1 in obj || typeof obj[toStringTag$1] !== "undefined"));
10506
10506
  }
10507
10507
  function isArray$4(obj) {
10508
- return toStr(obj) === "[object Array]" && canTrustToString(obj);
10508
+ return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
10509
10509
  }
10510
10510
  function isDate$2(obj) {
10511
- return toStr(obj) === "[object Date]" && canTrustToString(obj);
10511
+ return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
10512
10512
  }
10513
10513
  function isRegExp$2(obj) {
10514
- return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
10514
+ return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
10515
10515
  }
10516
10516
  function isError(obj) {
10517
- return toStr(obj) === "[object Error]" && canTrustToString(obj);
10517
+ return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
10518
10518
  }
10519
10519
  function isString$1(obj) {
10520
- return toStr(obj) === "[object String]" && canTrustToString(obj);
10520
+ return toStr$1(obj) === "[object String]" && canTrustToString(obj);
10521
10521
  }
10522
10522
  function isNumber$1(obj) {
10523
- return toStr(obj) === "[object Number]" && canTrustToString(obj);
10523
+ return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
10524
10524
  }
10525
10525
  function isBoolean$1(obj) {
10526
- return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
10526
+ return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
10527
10527
  }
10528
10528
  function isSymbol(obj) {
10529
10529
  if (hasShammedSymbols) {
@@ -10559,7 +10559,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
10559
10559
  function has$5(obj, key) {
10560
10560
  return hasOwn$1.call(obj, key);
10561
10561
  }
10562
- function toStr(obj) {
10562
+ function toStr$1(obj) {
10563
10563
  return objectToString.call(obj);
10564
10564
  }
10565
10565
  function nameOf(f2) {
@@ -10868,7 +10868,7 @@ var syntax = SyntaxError;
10868
10868
  var uri = URIError;
10869
10869
  var abs$2 = Math.abs;
10870
10870
  var floor$1 = Math.floor;
10871
- var max$1 = Math.max;
10871
+ var max$2 = Math.max;
10872
10872
  var min$1 = Math.min;
10873
10873
  var pow$1 = Math.pow;
10874
10874
  var round$1 = Math.round;
@@ -10997,91 +10997,77 @@ function requireObject_getPrototypeOf() {
10997
10997
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
10998
10998
  return Object_getPrototypeOf;
10999
10999
  }
11000
- var implementation;
11001
- var hasRequiredImplementation;
11002
- function requireImplementation() {
11003
- if (hasRequiredImplementation) return implementation;
11004
- hasRequiredImplementation = 1;
11005
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
11006
- var toStr2 = Object.prototype.toString;
11007
- var max2 = Math.max;
11008
- var funcType = "[object Function]";
11009
- var concatty = function concatty2(a2, b2) {
11010
- var arr = [];
11011
- for (var i2 = 0; i2 < a2.length; i2 += 1) {
11012
- arr[i2] = a2[i2];
11013
- }
11014
- for (var j2 = 0; j2 < b2.length; j2 += 1) {
11015
- arr[j2 + a2.length] = b2[j2];
11016
- }
11017
- return arr;
11018
- };
11019
- var slicy = function slicy2(arrLike, offset) {
11020
- var arr = [];
11021
- for (var i2 = offset, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
11022
- arr[j2] = arrLike[i2];
11023
- }
11024
- return arr;
11025
- };
11026
- var joiny = function(arr, joiner) {
11027
- var str = "";
11028
- for (var i2 = 0; i2 < arr.length; i2 += 1) {
11029
- str += arr[i2];
11030
- if (i2 + 1 < arr.length) {
11031
- str += joiner;
11032
- }
11000
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
11001
+ var toStr = Object.prototype.toString;
11002
+ var max$1 = Math.max;
11003
+ var funcType = "[object Function]";
11004
+ var concatty = function concatty2(a2, b2) {
11005
+ var arr = [];
11006
+ for (var i2 = 0; i2 < a2.length; i2 += 1) {
11007
+ arr[i2] = a2[i2];
11008
+ }
11009
+ for (var j2 = 0; j2 < b2.length; j2 += 1) {
11010
+ arr[j2 + a2.length] = b2[j2];
11011
+ }
11012
+ return arr;
11013
+ };
11014
+ var slicy = function slicy2(arrLike, offset) {
11015
+ var arr = [];
11016
+ for (var i2 = offset, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
11017
+ arr[j2] = arrLike[i2];
11018
+ }
11019
+ return arr;
11020
+ };
11021
+ var joiny = function(arr, joiner) {
11022
+ var str = "";
11023
+ for (var i2 = 0; i2 < arr.length; i2 += 1) {
11024
+ str += arr[i2];
11025
+ if (i2 + 1 < arr.length) {
11026
+ str += joiner;
11033
11027
  }
11034
- return str;
11035
- };
11036
- implementation = function bind2(that) {
11037
- var target = this;
11038
- if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
11039
- throw new TypeError(ERROR_MESSAGE + target);
11040
- }
11041
- var args = slicy(arguments, 1);
11042
- var bound;
11043
- var binder = function() {
11044
- if (this instanceof bound) {
11045
- var result = target.apply(
11046
- this,
11047
- concatty(args, arguments)
11048
- );
11049
- if (Object(result) === result) {
11050
- return result;
11051
- }
11052
- return this;
11053
- }
11054
- return target.apply(
11055
- that,
11028
+ }
11029
+ return str;
11030
+ };
11031
+ var implementation$1 = function bind(that) {
11032
+ var target = this;
11033
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
11034
+ throw new TypeError(ERROR_MESSAGE + target);
11035
+ }
11036
+ var args = slicy(arguments, 1);
11037
+ var bound;
11038
+ var binder = function() {
11039
+ if (this instanceof bound) {
11040
+ var result = target.apply(
11041
+ this,
11056
11042
  concatty(args, arguments)
11057
11043
  );
11058
- };
11059
- var boundLength = max2(0, target.length - args.length);
11060
- var boundArgs = [];
11061
- for (var i2 = 0; i2 < boundLength; i2++) {
11062
- boundArgs[i2] = "$" + i2;
11063
- }
11064
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
11065
- if (target.prototype) {
11066
- var Empty = function Empty2() {
11067
- };
11068
- Empty.prototype = target.prototype;
11069
- bound.prototype = new Empty();
11070
- Empty.prototype = null;
11044
+ if (Object(result) === result) {
11045
+ return result;
11046
+ }
11047
+ return this;
11071
11048
  }
11072
- return bound;
11049
+ return target.apply(
11050
+ that,
11051
+ concatty(args, arguments)
11052
+ );
11073
11053
  };
11074
- return implementation;
11075
- }
11076
- var functionBind;
11077
- var hasRequiredFunctionBind;
11078
- function requireFunctionBind() {
11079
- if (hasRequiredFunctionBind) return functionBind;
11080
- hasRequiredFunctionBind = 1;
11081
- var implementation2 = requireImplementation();
11082
- functionBind = Function.prototype.bind || implementation2;
11083
- return functionBind;
11084
- }
11054
+ var boundLength = max$1(0, target.length - args.length);
11055
+ var boundArgs = [];
11056
+ for (var i2 = 0; i2 < boundLength; i2++) {
11057
+ boundArgs[i2] = "$" + i2;
11058
+ }
11059
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
11060
+ if (target.prototype) {
11061
+ var Empty = function Empty2() {
11062
+ };
11063
+ Empty.prototype = target.prototype;
11064
+ bound.prototype = new Empty();
11065
+ Empty.prototype = null;
11066
+ }
11067
+ return bound;
11068
+ };
11069
+ var implementation = implementation$1;
11070
+ var functionBind = Function.prototype.bind || implementation;
11085
11071
  var functionCall;
11086
11072
  var hasRequiredFunctionCall;
11087
11073
  function requireFunctionCall() {
@@ -11099,12 +11085,12 @@ function requireFunctionApply() {
11099
11085
  return functionApply;
11100
11086
  }
11101
11087
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
11102
- var bind$3 = requireFunctionBind();
11088
+ var bind$3 = functionBind;
11103
11089
  var $apply$1 = requireFunctionApply();
11104
11090
  var $call$2 = requireFunctionCall();
11105
11091
  var $reflectApply = reflectApply;
11106
11092
  var actualApply = $reflectApply || bind$3.call($call$2, $apply$1);
11107
- var bind$2 = requireFunctionBind();
11093
+ var bind$2 = functionBind;
11108
11094
  var $TypeError$4 = type;
11109
11095
  var $call$1 = requireFunctionCall();
11110
11096
  var $actualApply = actualApply;
@@ -11172,8 +11158,8 @@ function requireHasown() {
11172
11158
  hasRequiredHasown = 1;
11173
11159
  var call = Function.prototype.call;
11174
11160
  var $hasOwn = Object.prototype.hasOwnProperty;
11175
- var bind2 = requireFunctionBind();
11176
- hasown = bind2.call(call, $hasOwn);
11161
+ var bind3 = functionBind;
11162
+ hasown = bind3.call(call, $hasOwn);
11177
11163
  return hasown;
11178
11164
  }
11179
11165
  var undefined$1;
@@ -11187,7 +11173,7 @@ var $TypeError$3 = type;
11187
11173
  var $URIError = uri;
11188
11174
  var abs$1 = abs$2;
11189
11175
  var floor = floor$1;
11190
- var max = max$1;
11176
+ var max = max$2;
11191
11177
  var min = min$1;
11192
11178
  var pow = pow$1;
11193
11179
  var round = round$1;
@@ -11392,7 +11378,7 @@ var LEGACY_ALIASES = {
11392
11378
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
11393
11379
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
11394
11380
  };
11395
- var bind$1 = requireFunctionBind();
11381
+ var bind$1 = functionBind;
11396
11382
  var hasOwn = requireHasown();
11397
11383
  var $concat = bind$1.call($call, Array.prototype.concat);
11398
11384
  var $spliceApply = bind$1.call($apply, Array.prototype.splice);
@@ -15723,7 +15709,7 @@ const admin = adminApi.enhanceEndpoints({
15723
15709
  overrideExisting: false
15724
15710
  });
15725
15711
  const { useInitQuery, useTelemetryPropertiesQuery, useInformationQuery, useProjectSettingsQuery, useUpdateProjectSettingsMutation, useGetPluginsQuery, useGetLicenseLimitsQuery, useGetLicenseTrialTimeLeftQuery, useGetGuidedTourMetaQuery } = admin;
15726
- function bind(fn2, thisArg) {
15712
+ function bind2(fn2, thisArg) {
15727
15713
  return function wrap() {
15728
15714
  return fn2.apply(thisArg, arguments);
15729
15715
  };
@@ -15860,7 +15846,7 @@ function merge2() {
15860
15846
  const extend = (a2, b2, thisArg, { allOwnKeys } = {}) => {
15861
15847
  forEach$1(b2, (val, key) => {
15862
15848
  if (thisArg && isFunction$1(val)) {
15863
- a2[key] = bind(val, thisArg);
15849
+ a2[key] = bind2(val, thisArg);
15864
15850
  } else {
15865
15851
  a2[key] = val;
15866
15852
  }
@@ -18140,7 +18126,7 @@ Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
18140
18126
  });
18141
18127
  function createInstance(defaultConfig) {
18142
18128
  const context = new Axios$1(defaultConfig);
18143
- const instance = bind(Axios$1.prototype.request, context);
18129
+ const instance = bind2(Axios$1.prototype.request, context);
18144
18130
  utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
18145
18131
  utils$1.extend(instance, context, null, { allOwnKeys: true });
18146
18132
  instance.create = function create2(instanceConfig) {
@@ -235,6 +235,7 @@ const service = ({ strapi }) => ({
235
235
  try {
236
236
  document = await strapi.documents(contentType).findOne({
237
237
  documentId,
238
+ status: "draft",
238
239
  populate: "*"
239
240
  });
240
241
  } catch (error) {
@@ -269,6 +270,7 @@ const service = ({ strapi }) => ({
269
270
  try {
270
271
  document = await strapi.documents(contentType).findOne({
271
272
  documentId,
273
+ status: "draft",
272
274
  populate: {
273
275
  [componentField]: {
274
276
  populate: "*"
@@ -472,6 +474,7 @@ const service = ({ strapi }) => ({
472
474
  try {
473
475
  document = await strapi.documents(contentType).findOne({
474
476
  documentId,
477
+ status: "draft",
475
478
  populate: "*"
476
479
  });
477
480
  } catch (error) {
@@ -527,6 +530,7 @@ const service = ({ strapi }) => ({
527
530
  try {
528
531
  document = await strapi.documents(contentType).findOne({
529
532
  documentId,
533
+ status: "draft",
530
534
  populate: {
531
535
  [componentField]: {
532
536
  populate: "*"
@@ -234,6 +234,7 @@ const service = ({ strapi }) => ({
234
234
  try {
235
235
  document = await strapi.documents(contentType).findOne({
236
236
  documentId,
237
+ status: "draft",
237
238
  populate: "*"
238
239
  });
239
240
  } catch (error) {
@@ -268,6 +269,7 @@ const service = ({ strapi }) => ({
268
269
  try {
269
270
  document = await strapi.documents(contentType).findOne({
270
271
  documentId,
272
+ status: "draft",
271
273
  populate: {
272
274
  [componentField]: {
273
275
  populate: "*"
@@ -471,6 +473,7 @@ const service = ({ strapi }) => ({
471
473
  try {
472
474
  document = await strapi.documents(contentType).findOne({
473
475
  documentId,
476
+ status: "draft",
474
477
  populate: "*"
475
478
  });
476
479
  } catch (error) {
@@ -526,6 +529,7 @@ const service = ({ strapi }) => ({
526
529
  try {
527
530
  document = await strapi.documents(contentType).findOne({
528
531
  documentId,
532
+ status: "draft",
529
533
  populate: {
530
534
  [componentField]: {
531
535
  populate: "*"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-field-clearer",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A Strapi v5 plugin to clear/delete field data from content types. Supports nested fields, component arrays, relations, and more.",
5
5
  "keywords": [
6
6
  "strapi",