@blocklet/meta 1.6.9 → 1.6.10

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 CHANGED
@@ -150,5 +150,6 @@ module.exports = Object.freeze({
150
150
  BLOCKLET_APP_DESCRIPTION: 'BLOCKLET_APP_DESCRIPTION',
151
151
  BLOCKLET_APP_SK: 'BLOCKLET_APP_SK',
152
152
  BLOCKLET_WALLET_TYPE: 'BLOCKLET_WALLET_TYPE',
153
+ BLOCKLET_DELETABLE: 'BLOCKLET_DELETABLE',
153
154
  },
154
155
  });
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.9",
6
+ "version": "1.6.10",
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": "372e95513bd9a510702d93650c0c004589579cb3"
45
+ "gitHead": "90aa29d892f9f54c87faa3041daec042997fffcc"
46
46
  }