@blocklet/meta 1.16.45-beta-20250610-112229-2eb0face → 1.16.45-beta-20250614-101901-d1700f8d
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/util.d.ts +1 -1
- package/lib/util.js +5 -2
- package/package.json +6 -6
package/lib/util.d.ts
CHANGED
|
@@ -90,8 +90,8 @@ declare const isEnvShareableToClient: (env?: TConfig) => boolean;
|
|
|
90
90
|
* is env shareable between components
|
|
91
91
|
*/
|
|
92
92
|
declare const isEnvShareable: (env?: Partial<TConfig>, includeSecure?: boolean) => boolean;
|
|
93
|
-
declare const getSharedConfigObj: (app?: TComponentPro, component?: TComponentPro, includeSecure?: boolean) => any;
|
|
94
93
|
declare const isPreferenceKey: (x: Partial<TConfig>) => Boolean;
|
|
94
|
+
declare const getSharedConfigObj: (app?: TComponentPro, component?: TComponentPro, includeSecure?: boolean) => any;
|
|
95
95
|
declare const getAppMissingConfigs: (app?: any) => any[];
|
|
96
96
|
declare const getComponentMissingConfigs: (component?: any, app?: any) => any[];
|
|
97
97
|
declare const isFreeBlocklet: (meta: TBlockletMeta) => boolean;
|
package/lib/util.js
CHANGED
|
@@ -284,6 +284,8 @@ const isEnvShareable = (env, includeSecure = false) => {
|
|
|
284
284
|
(includeSecure ? true : !env.secure));
|
|
285
285
|
};
|
|
286
286
|
exports.isEnvShareable = isEnvShareable;
|
|
287
|
+
const isPreferenceKey = (x) => x.key.startsWith(constant_2.BLOCKLET_PREFERENCE_PREFIX) === true;
|
|
288
|
+
exports.isPreferenceKey = isPreferenceKey;
|
|
287
289
|
const getSharedConfigObj = (app, component, includeSecure = false) => {
|
|
288
290
|
const res = {};
|
|
289
291
|
if (!app || !component) {
|
|
@@ -291,6 +293,9 @@ const getSharedConfigObj = (app, component, includeSecure = false) => {
|
|
|
291
293
|
}
|
|
292
294
|
if (Array.isArray(app.configs)) {
|
|
293
295
|
app.configs.forEach(({ key, value: value0, secure }) => {
|
|
296
|
+
if (isPreferenceKey({ key })) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
294
299
|
// config in container is force shared to components
|
|
295
300
|
if (!isEnvShareable({ key, secure, shared: true }, includeSecure)) {
|
|
296
301
|
return;
|
|
@@ -336,8 +341,6 @@ const getSharedConfigObj = (app, component, includeSecure = false) => {
|
|
|
336
341
|
return res;
|
|
337
342
|
};
|
|
338
343
|
exports.getSharedConfigObj = getSharedConfigObj;
|
|
339
|
-
const isPreferenceKey = (x) => x.key.startsWith(constant_2.BLOCKLET_PREFERENCE_PREFIX) === true;
|
|
340
|
-
exports.isPreferenceKey = isPreferenceKey;
|
|
341
344
|
const isConfigMissing = (item, sharedConfigObj) => {
|
|
342
345
|
if (item.required) {
|
|
343
346
|
if (
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.45-beta-
|
|
6
|
+
"version": "1.16.45-beta-20250614-101901-d1700f8d",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@abtnode/constant": "1.16.45-beta-
|
|
29
|
-
"@abtnode/db-cache": "1.16.45-beta-
|
|
30
|
-
"@abtnode/docker-utils": "1.16.45-beta-
|
|
28
|
+
"@abtnode/constant": "1.16.45-beta-20250614-101901-d1700f8d",
|
|
29
|
+
"@abtnode/db-cache": "1.16.45-beta-20250614-101901-d1700f8d",
|
|
30
|
+
"@abtnode/docker-utils": "1.16.45-beta-20250614-101901-d1700f8d",
|
|
31
31
|
"@arcblock/did": "1.20.14",
|
|
32
32
|
"@arcblock/did-ext": "1.20.14",
|
|
33
33
|
"@arcblock/did-util": "1.20.14",
|
|
34
34
|
"@arcblock/jwt": "1.20.14",
|
|
35
|
-
"@blocklet/constant": "1.16.45-beta-
|
|
35
|
+
"@blocklet/constant": "1.16.45-beta-20250614-101901-d1700f8d",
|
|
36
36
|
"@ocap/asset": "1.20.14",
|
|
37
37
|
"@ocap/mcrypto": "1.20.14",
|
|
38
38
|
"@ocap/types": "1.20.14",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"ts-node": "^10.9.1",
|
|
83
83
|
"typescript": "^5.6.3"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "5fb4c294b2754d660fa946ac85c962edb2deaad2"
|
|
86
86
|
}
|