@strapi/utils 4.9.2 → 4.10.0-beta.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.
- package/lib/content-types.js +2 -0
- package/package.json +2 -2
package/lib/content-types.js
CHANGED
|
@@ -82,6 +82,7 @@ const isVisibleAttribute = (model, attributeName) => {
|
|
|
82
82
|
return getVisibleAttributes(model).includes(attributeName);
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
+
const getOptions = (model) => _.assign({ draftAndPublish: false }, _.get(model, 'options', {}));
|
|
85
86
|
const hasDraftAndPublish = (model) => _.get(model, 'options.draftAndPublish', false) === true;
|
|
86
87
|
|
|
87
88
|
const isDraft = (data, model) =>
|
|
@@ -178,6 +179,7 @@ module.exports = {
|
|
|
178
179
|
getTimestamps,
|
|
179
180
|
isVisibleAttribute,
|
|
180
181
|
hasDraftAndPublish,
|
|
182
|
+
getOptions,
|
|
181
183
|
isDraft,
|
|
182
184
|
isSingleType,
|
|
183
185
|
isCollectionType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/utils",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.0-beta.1",
|
|
4
4
|
"description": "Shared utilities for the Strapi packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"node": ">=14.19.1 <=18.x.x",
|
|
50
50
|
"npm": ">=6.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "95d581b31bee464af42e5d8db408fa578d8532c7"
|
|
53
53
|
}
|