@blocklet/meta 1.16.28-beta-bfbab430 → 1.16.28-beta-17c98819
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/engine.d.ts +0 -1
- package/lib/engine.js +1 -3
- package/lib/types/schema.d.ts +1 -1
- package/lib/util.d.ts +2 -3
- package/lib/util.js +2 -4
- package/package.json +4 -4
package/lib/engine.d.ts
CHANGED
|
@@ -6,6 +6,5 @@ import { TEngine, TBlockletMeta } from './types';
|
|
|
6
6
|
export declare const getBlockletEngine: (meta: any) => TEngine;
|
|
7
7
|
export declare const isGatewayBlocklet: (meta: TBlockletMeta) => boolean;
|
|
8
8
|
export declare const isPackBlocklet: (meta: TBlockletMeta) => boolean;
|
|
9
|
-
export declare const isEngineBlocklet: (meta: TBlockletMeta) => boolean;
|
|
10
9
|
export declare const hasStartEngine: (meta: any) => boolean;
|
|
11
10
|
export declare const hasMountPoint: (meta: any) => boolean;
|
package/lib/engine.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.hasMountPoint = exports.hasStartEngine = exports.
|
|
6
|
+
exports.hasMountPoint = exports.hasStartEngine = exports.isPackBlocklet = exports.isGatewayBlocklet = exports.getBlockletEngine = void 0;
|
|
7
7
|
const os_1 = __importDefault(require("os"));
|
|
8
8
|
const constant_1 = require("@blocklet/constant");
|
|
9
9
|
/**
|
|
@@ -36,8 +36,6 @@ const isGatewayBlocklet = (meta) => meta?.group === constant_1.BlockletGroup.gat
|
|
|
36
36
|
exports.isGatewayBlocklet = isGatewayBlocklet;
|
|
37
37
|
const isPackBlocklet = (meta) => meta?.group === constant_1.BlockletGroup.pack;
|
|
38
38
|
exports.isPackBlocklet = isPackBlocklet;
|
|
39
|
-
const isEngineBlocklet = (meta) => meta?.group === constant_1.BlockletGroup.engine;
|
|
40
|
-
exports.isEngineBlocklet = isEngineBlocklet;
|
|
41
39
|
const hasStartEngine = (meta) => !!meta?.main || (0, exports.getBlockletEngine)((meta || {})).interpreter === 'blocklet';
|
|
42
40
|
exports.hasStartEngine = hasStartEngine;
|
|
43
41
|
const hasMountPoint = (meta) => ((0, exports.hasStartEngine)(meta) || (meta?.interfaces || []).find((x) => x.type === constant_1.BLOCKLET_INTERFACE_TYPE_WEB)) &&
|
package/lib/types/schema.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export interface TBlockletMeta {
|
|
|
47
47
|
environments?: TEnvironment[];
|
|
48
48
|
files?: string[];
|
|
49
49
|
gitHash?: string;
|
|
50
|
-
group?: 'dapp' | 'static' | 'gateway' | 'pack'
|
|
50
|
+
group?: 'dapp' | 'static' | 'gateway' | 'pack';
|
|
51
51
|
homepage?: string;
|
|
52
52
|
htmlAst?: any;
|
|
53
53
|
interfaces?: TInterface[];
|
package/lib/util.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlockletState, ComponentState } from '@abtnode/client';
|
|
2
2
|
import type { Request } from 'express';
|
|
3
|
-
import { hasStartEngine,
|
|
3
|
+
import { hasStartEngine, isGatewayBlocklet, isPackBlocklet } from './engine';
|
|
4
4
|
import type { TBlockletMeta, TEnvironment } from './types';
|
|
5
5
|
type TConfig = TEnvironment & {
|
|
6
6
|
key: string;
|
|
@@ -151,7 +151,7 @@ declare const hasResourceType: (component: ComponentState, { type, did }?: {
|
|
|
151
151
|
type: string;
|
|
152
152
|
did: string;
|
|
153
153
|
}) => boolean;
|
|
154
|
-
export { isFreeBlocklet, isFreeComponent, forEachBlocklet, forEachBlockletSync, forEachChild, forEachChildSync, forEachComponentV2, forEachComponentV2Sync, isDeletableBlocklet, getSharedConfigObj, getAppMissingConfigs, getComponentMissingConfigs, isEnvShareableToClient, isEnvShareable, wipeSensitiveData, hasRunnableComponent, getAppName, getAppName as getDisplayName, getAppDescription, fixBlockletStatus, findWebInterface, findWebInterfacePort, findServiceFromMeta, getWhoCanAccess, getComponentWhoCanAccess, replaceSlotToIp, getComponentId, getComponentName, getComponentBundleId, findComponent, findComponentById, findComponentV2, findComponentByIdV2, filterComponentsV2, getParentComponentName, getConnectAppUrl, getChainInfo, getBlockletChainInfo, isExternalBlocklet, isPreferenceKey, getRolesFromAuthConfig, getBlockletAppIdList, getBlockletServices, isInProgress, isBeforeInstalled, isRunning, isAccessible, isGatewayBlocklet,
|
|
154
|
+
export { isFreeBlocklet, isFreeComponent, forEachBlocklet, forEachBlockletSync, forEachChild, forEachChildSync, forEachComponentV2, forEachComponentV2Sync, isDeletableBlocklet, getSharedConfigObj, getAppMissingConfigs, getComponentMissingConfigs, isEnvShareableToClient, isEnvShareable, wipeSensitiveData, hasRunnableComponent, getAppName, getAppName as getDisplayName, getAppDescription, fixBlockletStatus, findWebInterface, findWebInterfacePort, findServiceFromMeta, getWhoCanAccess, getComponentWhoCanAccess, replaceSlotToIp, getComponentId, getComponentName, getComponentBundleId, findComponent, findComponentById, findComponentV2, findComponentByIdV2, filterComponentsV2, getParentComponentName, getConnectAppUrl, getChainInfo, getBlockletChainInfo, isExternalBlocklet, isPreferenceKey, getRolesFromAuthConfig, getBlockletAppIdList, getBlockletServices, isInProgress, isBeforeInstalled, isRunning, isAccessible, isGatewayBlocklet, isPackBlocklet, hasStartEngine, hasResourceType, };
|
|
155
155
|
declare const _default: {
|
|
156
156
|
isFreeBlocklet: (meta: TBlockletMeta) => boolean;
|
|
157
157
|
isFreeComponent: (meta: TBlockletMeta) => boolean;
|
|
@@ -260,7 +260,6 @@ declare const _default: {
|
|
|
260
260
|
isRunning: (status: string | number) => boolean;
|
|
261
261
|
isAccessible: (status: string | number) => boolean;
|
|
262
262
|
isGatewayBlocklet: (meta: TBlockletMeta) => boolean;
|
|
263
|
-
isEngineBlocklet: (meta: TBlockletMeta) => boolean;
|
|
264
263
|
isPackBlocklet: (meta: TBlockletMeta) => boolean;
|
|
265
264
|
hasStartEngine: (meta: any) => boolean;
|
|
266
265
|
hasResourceType: (component: ComponentState, { type, did }?: {
|
package/lib/util.js
CHANGED
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.hasResourceType = exports.hasStartEngine =
|
|
6
|
+
exports.isPackBlocklet = exports.isGatewayBlocklet = exports.isAccessible = exports.isRunning = exports.isBeforeInstalled = exports.isInProgress = exports.getBlockletServices = exports.getBlockletAppIdList = exports.getRolesFromAuthConfig = exports.isPreferenceKey = exports.isExternalBlocklet = exports.getBlockletChainInfo = exports.getChainInfo = exports.getConnectAppUrl = exports.getParentComponentName = exports.filterComponentsV2 = exports.findComponentByIdV2 = exports.findComponentV2 = exports.findComponentById = exports.findComponent = exports.getComponentBundleId = exports.getComponentName = exports.getComponentId = exports.replaceSlotToIp = exports.getComponentWhoCanAccess = exports.getWhoCanAccess = exports.findServiceFromMeta = exports.findWebInterfacePort = exports.findWebInterface = exports.fixBlockletStatus = exports.getAppDescription = exports.getDisplayName = exports.getAppName = exports.hasRunnableComponent = exports.wipeSensitiveData = exports.isEnvShareable = exports.isEnvShareableToClient = exports.getComponentMissingConfigs = exports.getAppMissingConfigs = exports.getSharedConfigObj = exports.isDeletableBlocklet = exports.forEachComponentV2Sync = exports.forEachComponentV2 = exports.forEachChildSync = exports.forEachChild = exports.forEachBlockletSync = exports.forEachBlocklet = exports.isFreeComponent = exports.isFreeBlocklet = exports.getAppUrl = void 0;
|
|
7
|
+
exports.hasResourceType = exports.hasStartEngine = void 0;
|
|
8
8
|
/* eslint-disable no-await-in-loop */
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
10
10
|
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
@@ -14,7 +14,6 @@ const constant_1 = __importDefault(require("@abtnode/constant"));
|
|
|
14
14
|
const constant_2 = require("@blocklet/constant");
|
|
15
15
|
const engine_1 = require("./engine");
|
|
16
16
|
Object.defineProperty(exports, "hasStartEngine", { enumerable: true, get: function () { return engine_1.hasStartEngine; } });
|
|
17
|
-
Object.defineProperty(exports, "isEngineBlocklet", { enumerable: true, get: function () { return engine_1.isEngineBlocklet; } });
|
|
18
17
|
Object.defineProperty(exports, "isGatewayBlocklet", { enumerable: true, get: function () { return engine_1.isGatewayBlocklet; } });
|
|
19
18
|
Object.defineProperty(exports, "isPackBlocklet", { enumerable: true, get: function () { return engine_1.isPackBlocklet; } });
|
|
20
19
|
const { NODE_SERVICES, SLOT_FOR_IP_DNS_SITE, WHO_CAN_ACCESS, WHO_CAN_ACCESS_PREFIX_ROLES } = constant_1.default;
|
|
@@ -769,7 +768,6 @@ exports.default = {
|
|
|
769
768
|
isRunning,
|
|
770
769
|
isAccessible,
|
|
771
770
|
isGatewayBlocklet: engine_1.isGatewayBlocklet,
|
|
772
|
-
isEngineBlocklet: engine_1.isEngineBlocklet,
|
|
773
771
|
isPackBlocklet: engine_1.isPackBlocklet,
|
|
774
772
|
hasStartEngine: engine_1.hasStartEngine,
|
|
775
773
|
hasResourceType,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.28-beta-
|
|
6
|
+
"version": "1.16.28-beta-17c98819",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -25,12 +25,12 @@
|
|
|
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.28-beta-
|
|
28
|
+
"@abtnode/constant": "1.16.28-beta-17c98819",
|
|
29
29
|
"@arcblock/did": "1.18.123",
|
|
30
30
|
"@arcblock/did-ext": "1.18.123",
|
|
31
31
|
"@arcblock/did-util": "1.18.123",
|
|
32
32
|
"@arcblock/jwt": "1.18.123",
|
|
33
|
-
"@blocklet/constant": "1.16.28-beta-
|
|
33
|
+
"@blocklet/constant": "1.16.28-beta-17c98819",
|
|
34
34
|
"@ocap/asset": "1.18.123",
|
|
35
35
|
"@ocap/mcrypto": "1.18.123",
|
|
36
36
|
"@ocap/types": "1.18.123",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"ts-node": "^10.9.1",
|
|
80
80
|
"typescript": "^5.0.4"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "952ebe5b093575757efe06237c3c3e80b6909d50"
|
|
83
83
|
}
|