@blocklet/meta 1.6.9 → 1.6.13
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/constants.js +1 -0
- package/lib/util.js +14 -0
- package/package.json +2 -2
package/lib/constants.js
CHANGED
package/lib/util.js
CHANGED
|
@@ -119,8 +119,22 @@ const wipeSensitiveData = (blocklet) => {
|
|
|
119
119
|
return blocklet;
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
+
const isDeletableBlocklet = (blocklet) => {
|
|
123
|
+
if (!blocklet) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const config = blocklet.environments.find((x) => x.key === 'BLOCKLET_DELETABLE');
|
|
128
|
+
if (!config) {
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return config.value === 'yes';
|
|
133
|
+
};
|
|
134
|
+
|
|
122
135
|
module.exports = {
|
|
123
136
|
isFreeBlocklet,
|
|
137
|
+
isDeletableBlocklet,
|
|
124
138
|
forEachBlocklet,
|
|
125
139
|
isAuthServiceEnabled,
|
|
126
140
|
getRequiredMissingConfigs,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.13",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"jest": "^27.4.5"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "4fff3e4867db54e55b11bb0188bbbf703505dea9"
|
|
46
46
|
}
|