@blocklet/meta 1.16.17-beta-7ec31a60 → 1.16.17-beta-8cacb9b3
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/payment/v2.js +0 -4
- package/lib/schema.js +2 -2
- package/lib/util.d.ts +1 -3
- package/lib/util.js +1 -6
- package/package.json +4 -4
package/lib/payment/v2.js
CHANGED
|
@@ -114,10 +114,6 @@ const innerGetComponents = async (inputMeta, context = {}) => {
|
|
|
114
114
|
catch (err) {
|
|
115
115
|
throw new Error(`Failed get component meta: ${config.title || config.name}: ${err.message}`);
|
|
116
116
|
}
|
|
117
|
-
// check is component
|
|
118
|
-
if (!(0, util_2.isComponentBlocklet)(meta)) {
|
|
119
|
-
throw new Error(`The blocklet cannot be a component: ${meta.title}`);
|
|
120
|
-
}
|
|
121
117
|
// check circular dependencies
|
|
122
118
|
if (ancestors.map((x) => x.meta?.did).indexOf(meta.did) > -1) {
|
|
123
119
|
throw new Error('Blocklet components have circular dependencies');
|
package/lib/schema.js
CHANGED
|
@@ -630,9 +630,9 @@ const blockletMetaProps = {
|
|
|
630
630
|
.optional(),
|
|
631
631
|
navigation: Joi.boolean().default(true),
|
|
632
632
|
serverless: Joi.boolean().optional(),
|
|
633
|
-
// @deprecated
|
|
634
|
-
component: Joi.boolean().default(true),
|
|
635
633
|
resourceExportPage: Joi.string().trim(),
|
|
634
|
+
// @deprecated
|
|
635
|
+
component: Joi.boolean(), // Can blocklet become a component and be composed by other blocklets
|
|
636
636
|
}).default({}),
|
|
637
637
|
// Other contents to be included in the bundle
|
|
638
638
|
files: Joi.array().items(Joi.string().trim()).optional(),
|
package/lib/util.d.ts
CHANGED
|
@@ -95,7 +95,6 @@ declare const getAppMissingConfigs: (app?: any) => any[];
|
|
|
95
95
|
declare const getComponentMissingConfigs: (component?: any, app?: any) => any[];
|
|
96
96
|
declare const isFreeBlocklet: (meta: TBlockletMeta) => boolean;
|
|
97
97
|
declare const isFreeComponent: (meta: TBlockletMeta) => boolean;
|
|
98
|
-
declare const isComponentBlocklet: (meta?: TBlockletMeta) => boolean;
|
|
99
98
|
declare const wipeSensitiveData: (blocklet?: BlockletState) => BlockletState;
|
|
100
99
|
declare const isDeletableBlocklet: (blocklet?: BlockletState) => boolean;
|
|
101
100
|
declare const isGatewayBlocklet: (meta: TBlockletMeta) => boolean;
|
|
@@ -147,11 +146,10 @@ declare const isInProgress: (status: string | number) => boolean;
|
|
|
147
146
|
declare const isBeforeInstalled: (status: string | number) => boolean;
|
|
148
147
|
declare const isRunning: (status: string | number) => boolean;
|
|
149
148
|
declare const hasStartEngine: (meta: TBlockletMeta) => boolean;
|
|
150
|
-
export { isFreeBlocklet, isFreeComponent,
|
|
149
|
+
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, isGatewayBlocklet, hasStartEngine, };
|
|
151
150
|
declare const _default: {
|
|
152
151
|
isFreeBlocklet: (meta: TBlockletMeta) => boolean;
|
|
153
152
|
isFreeComponent: (meta: TBlockletMeta) => boolean;
|
|
154
|
-
isComponentBlocklet: (meta?: TBlockletMeta) => boolean;
|
|
155
153
|
forEachBlocklet: (blocklet: TComponentPro, cb: Function, { parallel, concurrencyLimit, sync, params: inputParams, _parent, _root, _level, _tasks: inputTasks, _ancestors, _limit, }?: {
|
|
156
154
|
parallel?: boolean;
|
|
157
155
|
concurrencyLimit?: number;
|
package/lib/util.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.hasStartEngine = exports.isGatewayBlocklet = 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.
|
|
6
|
+
exports.hasStartEngine = exports.isGatewayBlocklet = 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 = void 0;
|
|
7
7
|
/* eslint-disable no-await-in-loop */
|
|
8
8
|
const get_1 = __importDefault(require("lodash/get"));
|
|
9
9
|
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
@@ -375,10 +375,6 @@ const isFreeComponent = (meta) => {
|
|
|
375
375
|
return !meta.payment.componentPrice.length;
|
|
376
376
|
};
|
|
377
377
|
exports.isFreeComponent = isFreeComponent;
|
|
378
|
-
const isComponentBlocklet = (meta) => {
|
|
379
|
-
return (0, get_1.default)(meta, 'capabilities.component') !== false;
|
|
380
|
-
};
|
|
381
|
-
exports.isComponentBlocklet = isComponentBlocklet;
|
|
382
378
|
const wipeSensitiveData = (blocklet) => {
|
|
383
379
|
if (!blocklet) {
|
|
384
380
|
return blocklet;
|
|
@@ -685,7 +681,6 @@ exports.hasStartEngine = hasStartEngine;
|
|
|
685
681
|
exports.default = {
|
|
686
682
|
isFreeBlocklet,
|
|
687
683
|
isFreeComponent,
|
|
688
|
-
isComponentBlocklet,
|
|
689
684
|
forEachBlocklet,
|
|
690
685
|
forEachBlockletSync,
|
|
691
686
|
forEachChild,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.17-beta-
|
|
6
|
+
"version": "1.16.17-beta-8cacb9b3",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@abtnode/constant": "1.16.17-beta-
|
|
27
|
+
"@abtnode/constant": "1.16.17-beta-8cacb9b3",
|
|
28
28
|
"@arcblock/did": "1.18.91",
|
|
29
29
|
"@arcblock/did-ext": "1.18.91",
|
|
30
30
|
"@arcblock/did-util": "1.18.91",
|
|
31
31
|
"@arcblock/jwt": "1.18.91",
|
|
32
|
-
"@blocklet/constant": "1.16.17-beta-
|
|
32
|
+
"@blocklet/constant": "1.16.17-beta-8cacb9b3",
|
|
33
33
|
"@ocap/asset": "1.18.91",
|
|
34
34
|
"@ocap/mcrypto": "1.18.91",
|
|
35
35
|
"@ocap/types": "1.18.91",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"ts-node": "^10.9.1",
|
|
79
79
|
"typescript": "^5.0.4"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "0e3266f543b6d419a004ca94ee9efb572e3d9809"
|
|
82
82
|
}
|