@blocklet/meta 1.16.3 → 1.16.4-beta-8682e092
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/did-utils.d.ts +10 -0
- package/lib/did-utils.js +29 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +12 -1
- package/lib/schema.js +4 -4
- package/lib/url-friendly.d.ts +3 -0
- package/lib/url-friendly.js +3 -0
- package/lib/url-path-friendly.d.ts +6 -0
- package/lib/url-path-friendly.js +37 -0
- package/lib/util.d.ts +19 -1
- package/lib/util.js +56 -2
- package/package.json +15 -15
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UserInfo } from '@abtnode/client';
|
|
2
|
+
export interface ExtraConfigs {
|
|
3
|
+
sourceProvider: string;
|
|
4
|
+
connectedAccounts: any[];
|
|
5
|
+
}
|
|
6
|
+
export declare function getMainDidFromUser(user: UserInfo): string;
|
|
7
|
+
export declare function getAliasAccountFromUser(user: UserInfo): any[];
|
|
8
|
+
export declare function getAliasDidFromUser(user: UserInfo): any[];
|
|
9
|
+
export declare function getWalletAccountFromUser(user: UserInfo): any;
|
|
10
|
+
export declare function getWalletDidFromUser(user: UserInfo): any;
|
package/lib/did-utils.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWalletDidFromUser = exports.getWalletAccountFromUser = exports.getAliasDidFromUser = exports.getAliasAccountFromUser = exports.getMainDidFromUser = void 0;
|
|
4
|
+
function getMainDidFromUser(user) {
|
|
5
|
+
return user.did;
|
|
6
|
+
}
|
|
7
|
+
exports.getMainDidFromUser = getMainDidFromUser;
|
|
8
|
+
function getAliasAccountFromUser(user) {
|
|
9
|
+
const connectedAccounts = user.extraConfigs?.connectedAccounts || [];
|
|
10
|
+
return connectedAccounts;
|
|
11
|
+
}
|
|
12
|
+
exports.getAliasAccountFromUser = getAliasAccountFromUser;
|
|
13
|
+
function getAliasDidFromUser(user) {
|
|
14
|
+
const connectedAccounts = getAliasAccountFromUser(user);
|
|
15
|
+
const didList = connectedAccounts.map((item) => item.did);
|
|
16
|
+
return didList;
|
|
17
|
+
}
|
|
18
|
+
exports.getAliasDidFromUser = getAliasDidFromUser;
|
|
19
|
+
function getWalletAccountFromUser(user) {
|
|
20
|
+
const connectedAccounts = user.extraConfigs?.connectedAccounts || [];
|
|
21
|
+
const walletAccount = connectedAccounts.find((item) => item.provider === 'wallet');
|
|
22
|
+
return walletAccount;
|
|
23
|
+
}
|
|
24
|
+
exports.getWalletAccountFromUser = getWalletAccountFromUser;
|
|
25
|
+
function getWalletDidFromUser(user) {
|
|
26
|
+
const walletAccount = getWalletAccountFromUser(user);
|
|
27
|
+
return walletAccount?.did;
|
|
28
|
+
}
|
|
29
|
+
exports.getWalletDidFromUser = getWalletDidFromUser;
|
package/lib/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { validateMeta, fixAndValidateService } from './validate';
|
|
|
9
9
|
import { formatPerson, parsePerson, fixPerson, fixInterfaces, fixService, fixName } from './fix';
|
|
10
10
|
import { list, select, update, read } from './file';
|
|
11
11
|
import verifyMultiSig from './verify-multi-sig';
|
|
12
|
+
import { getAliasAccountFromUser, getAliasDidFromUser, getMainDidFromUser, getWalletAccountFromUser, getWalletDidFromUser } from './did-utils';
|
|
12
13
|
export { constants };
|
|
13
14
|
export { list };
|
|
14
15
|
export { select };
|
|
@@ -28,6 +29,7 @@ export { getBlockletWallet };
|
|
|
28
29
|
export { getBlockletInfo };
|
|
29
30
|
export { getBlockletEngine };
|
|
30
31
|
export { verifyMultiSig };
|
|
32
|
+
export { getAliasAccountFromUser, getAliasDidFromUser, getMainDidFromUser, getWalletAccountFromUser, getWalletDidFromUser, };
|
|
31
33
|
declare const _default: {
|
|
32
34
|
constants: any;
|
|
33
35
|
list: any[];
|
|
@@ -82,5 +84,10 @@ declare const _default: {
|
|
|
82
84
|
};
|
|
83
85
|
getBlockletEngine: (meta: import("./types").TBlockletMeta) => import("./types").TEngine;
|
|
84
86
|
verifyMultiSig: (blockletMeta: import("./types").TBlockletMeta) => boolean;
|
|
87
|
+
getAliasAccountFromUser: typeof getAliasAccountFromUser;
|
|
88
|
+
getAliasDidFromUser: typeof getAliasDidFromUser;
|
|
89
|
+
getMainDidFromUser: typeof getMainDidFromUser;
|
|
90
|
+
getWalletAccountFromUser: typeof getWalletAccountFromUser;
|
|
91
|
+
getWalletDidFromUser: typeof getWalletDidFromUser;
|
|
85
92
|
};
|
|
86
93
|
export default _default;
|
package/lib/index.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.verifyMultiSig = exports.getBlockletEngine = exports.getBlockletInfo = exports.getBlockletWallet = exports.toBlockletDid = exports.fixName = exports.fixService = exports.fixInterfaces = exports.fixPerson = exports.parsePerson = exports.formatPerson = exports.fixAndValidateService = exports.validateMeta = exports.parse = exports.read = exports.update = exports.select = exports.list = exports.constants = void 0;
|
|
6
|
+
exports.getWalletDidFromUser = exports.getWalletAccountFromUser = exports.getMainDidFromUser = exports.getAliasDidFromUser = exports.getAliasAccountFromUser = exports.verifyMultiSig = exports.getBlockletEngine = exports.getBlockletInfo = exports.getBlockletWallet = exports.toBlockletDid = exports.fixName = exports.fixService = exports.fixInterfaces = exports.fixPerson = exports.parsePerson = exports.formatPerson = exports.fixAndValidateService = exports.validateMeta = exports.parse = exports.read = exports.update = exports.select = exports.list = exports.constants = void 0;
|
|
7
7
|
const constants_1 = __importDefault(require("./constants"));
|
|
8
8
|
exports.constants = constants_1.default;
|
|
9
9
|
const parse_1 = __importDefault(require("./parse"));
|
|
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "update", { enumerable: true, get: function () {
|
|
|
33
33
|
Object.defineProperty(exports, "read", { enumerable: true, get: function () { return file_1.read; } });
|
|
34
34
|
const verify_multi_sig_1 = __importDefault(require("./verify-multi-sig"));
|
|
35
35
|
exports.verifyMultiSig = verify_multi_sig_1.default;
|
|
36
|
+
const did_utils_1 = require("./did-utils");
|
|
37
|
+
Object.defineProperty(exports, "getAliasAccountFromUser", { enumerable: true, get: function () { return did_utils_1.getAliasAccountFromUser; } });
|
|
38
|
+
Object.defineProperty(exports, "getAliasDidFromUser", { enumerable: true, get: function () { return did_utils_1.getAliasDidFromUser; } });
|
|
39
|
+
Object.defineProperty(exports, "getMainDidFromUser", { enumerable: true, get: function () { return did_utils_1.getMainDidFromUser; } });
|
|
40
|
+
Object.defineProperty(exports, "getWalletAccountFromUser", { enumerable: true, get: function () { return did_utils_1.getWalletAccountFromUser; } });
|
|
41
|
+
Object.defineProperty(exports, "getWalletDidFromUser", { enumerable: true, get: function () { return did_utils_1.getWalletDidFromUser; } });
|
|
36
42
|
exports.default = {
|
|
37
43
|
constants: constants_1.default,
|
|
38
44
|
list: file_1.list,
|
|
@@ -53,4 +59,9 @@ exports.default = {
|
|
|
53
59
|
getBlockletInfo: info_1.default,
|
|
54
60
|
getBlockletEngine: engine_1.default,
|
|
55
61
|
verifyMultiSig: verify_multi_sig_1.default,
|
|
62
|
+
getAliasAccountFromUser: did_utils_1.getAliasAccountFromUser,
|
|
63
|
+
getAliasDidFromUser: did_utils_1.getAliasDidFromUser,
|
|
64
|
+
getMainDidFromUser: did_utils_1.getMainDidFromUser,
|
|
65
|
+
getWalletAccountFromUser: did_utils_1.getWalletAccountFromUser,
|
|
66
|
+
getWalletDidFromUser: did_utils_1.getWalletDidFromUser,
|
|
56
67
|
};
|
package/lib/schema.js
CHANGED
|
@@ -40,7 +40,7 @@ const extension_1 = require("./extension");
|
|
|
40
40
|
const name_1 = require("./name");
|
|
41
41
|
const constants_1 = __importDefault(require("./constants"));
|
|
42
42
|
const parse_navigation_from_blocklet_1 = require("./parse-navigation-from-blocklet");
|
|
43
|
-
const
|
|
43
|
+
const url_path_friendly_1 = __importStar(require("./url-path-friendly"));
|
|
44
44
|
const cjkLength = cjk_length_1.default.default;
|
|
45
45
|
const { BLOCKLET_GROUPS, BLOCKLET_PLATFORMS, BLOCKLET_ARCHITECTURES, BLOCKLET_INTERFACE_TYPES, BLOCKLET_INTERFACE_PROTOCOLS, BLOCKLET_ENTRY_FILE, BLOCKLET_BUNDLE_FILE, BLOCKLET_DEFAULT_PORT_NAME, BLOCKLET_DYNAMIC_PATH_PREFIX, BlockletGroup, BLOCKLET_LATEST_REQUIREMENT_SERVER, BLOCKLET_INTERFACE_TYPE_WEB, BLOCKLET_INTERFACE_TYPE_WELLKNOWN, BLOCKLET_APP_SPACE_ENDPOINTS, BLOCKLET_CONFIGURABLE_KEY, } = constants_1.default;
|
|
46
46
|
const WELLKNOWN_PATH_PREFIX = '/.well-known';
|
|
@@ -106,16 +106,16 @@ const baseMountPointSchema = Joi.string().trim().min(1);
|
|
|
106
106
|
const mountPointSchema = baseMountPointSchema
|
|
107
107
|
.meta({ className: 'TMountPoint' })
|
|
108
108
|
.custom((value, helper) => {
|
|
109
|
-
if ((0,
|
|
109
|
+
if ((0, url_path_friendly_1.isValidUrlPath)(value)) {
|
|
110
110
|
return value;
|
|
111
111
|
}
|
|
112
112
|
// @ts-expect-error
|
|
113
|
-
return helper.message('mountPoint cannot contain such characters space
|
|
113
|
+
return helper.message('mountPoint cannot contain such characters space $*+~()\'"!:@\\');
|
|
114
114
|
});
|
|
115
115
|
exports.mountPointSchema = mountPointSchema;
|
|
116
116
|
const updateMountPointSchema = baseMountPointSchema
|
|
117
117
|
.meta({ className: 'TUpdateMountPoint' })
|
|
118
|
-
.custom((value) => (0,
|
|
118
|
+
.custom((value) => (0, url_path_friendly_1.default)(value));
|
|
119
119
|
exports.updateMountPointSchema = updateMountPointSchema;
|
|
120
120
|
const blockletNameSchema = Joi.string()
|
|
121
121
|
.custom((value) => {
|
package/lib/url-friendly.d.ts
CHANGED
package/lib/url-friendly.js
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isValidUrlPath = void 0;
|
|
4
|
+
const isValidUrlPath = (name) => {
|
|
5
|
+
// Check if the path contains any uppercase letters
|
|
6
|
+
if (/[A-Z]/.test(name)) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
// Check if the path contains any non-ASCII characters
|
|
10
|
+
if (/[^\x20-\x7F]/.test(name)) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
// Check if the resulting string matches the pattern of a valid URL path
|
|
14
|
+
const regex = /^[a-z0-9/\-._]*$/i;
|
|
15
|
+
return regex.test(name) && !name.includes('//');
|
|
16
|
+
};
|
|
17
|
+
exports.isValidUrlPath = isValidUrlPath;
|
|
18
|
+
const urlPathFriendly = (name, { keepSlash = true } = { keepSlash: true }) => {
|
|
19
|
+
// Replace non-URL path friendly characters with hyphens
|
|
20
|
+
const pathFriendlyStr = name
|
|
21
|
+
.trim()
|
|
22
|
+
.replace(/[^\x20-\x7F]/g, '')
|
|
23
|
+
.replace(/[^a-z0-9_.\-/]/gi, '-')
|
|
24
|
+
.toLowerCase();
|
|
25
|
+
// Remove consecutive hyphens
|
|
26
|
+
const noConsecutiveHyphens = pathFriendlyStr.replace(/-+/g, '-');
|
|
27
|
+
// Replace consecutive periods with a single period
|
|
28
|
+
const result = noConsecutiveHyphens.replace(/\.+/g, '.');
|
|
29
|
+
// Remove consecutive slashes if keepSlash is true
|
|
30
|
+
const noConsecutiveSlashes = result.replace(/\/+/g, '/');
|
|
31
|
+
// Remove leading/trailing slashes if keepSlash is false
|
|
32
|
+
if (!keepSlash) {
|
|
33
|
+
return noConsecutiveSlashes.replace(/^\/|\/$/g, '');
|
|
34
|
+
}
|
|
35
|
+
return noConsecutiveSlashes;
|
|
36
|
+
};
|
|
37
|
+
exports.default = urlPathFriendly;
|
package/lib/util.d.ts
CHANGED
|
@@ -121,7 +121,16 @@ declare const getRolesFromAuthConfig: (config: {
|
|
|
121
121
|
whoCanAccess: string;
|
|
122
122
|
}) => Array<string>;
|
|
123
123
|
declare const getBlockletAppIdList: (blocklet: Partial<BlockletState>) => string[];
|
|
124
|
-
|
|
124
|
+
declare const getBlockletServices: (blocklet: Partial<BlockletState>) => Array<{
|
|
125
|
+
name: string;
|
|
126
|
+
protocol: string;
|
|
127
|
+
port: number;
|
|
128
|
+
upstreamPort: number;
|
|
129
|
+
}>;
|
|
130
|
+
declare const isInProgress: (status: string | number) => boolean;
|
|
131
|
+
declare const isBeforeInstalled: (status: string | number) => boolean;
|
|
132
|
+
declare const isRunning: (status: string | number) => boolean;
|
|
133
|
+
export { isFreeBlocklet, isFreeComponent, isComponentBlocklet, forEachBlocklet, forEachBlockletSync, forEachChild, forEachChildSync, isDeletableBlocklet, getSharedConfigObj, getAppMissingConfigs, getComponentMissingConfigs, isEnvShareable, wipeSensitiveData, hasRunnableComponent, getAppName, getAppName as getDisplayName, getAppDescription, fixBlockletStatus, findWebInterface, findWebInterfacePort, findServiceFromMeta, getWhoCanAccess, replaceSlotToIp, getComponentId, getComponentName, getComponentBundleId, findComponent, findComponentById, getParentComponentName, getConnectAppUrl, getChainInfo, getBlockletChainInfo, isExternalBlocklet, isPreferenceKey, getRolesFromAuthConfig, getBlockletAppIdList, getBlockletServices, isInProgress, isBeforeInstalled, isRunning, };
|
|
125
134
|
declare const _default: {
|
|
126
135
|
isFreeBlocklet: (meta: TBlockletMeta) => boolean;
|
|
127
136
|
isFreeComponent: (meta: TBlockletMeta) => boolean;
|
|
@@ -208,5 +217,14 @@ declare const _default: {
|
|
|
208
217
|
getRolesFromAuthConfig: (config: {
|
|
209
218
|
whoCanAccess: string;
|
|
210
219
|
}) => string[];
|
|
220
|
+
getBlockletServices: (blocklet: Partial<BlockletState>) => {
|
|
221
|
+
name: string;
|
|
222
|
+
protocol: string;
|
|
223
|
+
port: number;
|
|
224
|
+
upstreamPort: number;
|
|
225
|
+
}[];
|
|
226
|
+
isInProgress: (status: string | number) => boolean;
|
|
227
|
+
isBeforeInstalled: (status: string | number) => boolean;
|
|
228
|
+
isRunning: (status: string | number) => boolean;
|
|
211
229
|
};
|
|
212
230
|
export default _default;
|
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.getBlockletAppIdList = exports.getRolesFromAuthConfig = exports.isPreferenceKey = exports.isExternalBlocklet = exports.getBlockletChainInfo = exports.getChainInfo = exports.getConnectAppUrl = exports.getParentComponentName = exports.findComponentById = exports.findComponent = exports.getComponentBundleId = exports.getComponentName = exports.getComponentId = exports.replaceSlotToIp = exports.getWhoCanAccess = exports.findServiceFromMeta = exports.findWebInterfacePort = exports.findWebInterface = exports.fixBlockletStatus = exports.getAppDescription = exports.getDisplayName = exports.getAppName = exports.hasRunnableComponent = exports.wipeSensitiveData = exports.isEnvShareable = exports.getComponentMissingConfigs = exports.getAppMissingConfigs = exports.getSharedConfigObj = exports.isDeletableBlocklet = exports.forEachChildSync = exports.forEachChild = exports.forEachBlockletSync = exports.forEachBlocklet = exports.isComponentBlocklet = exports.isFreeComponent = exports.isFreeBlocklet = void 0;
|
|
6
|
+
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.findComponentById = exports.findComponent = exports.getComponentBundleId = exports.getComponentName = exports.getComponentId = exports.replaceSlotToIp = exports.getWhoCanAccess = exports.findServiceFromMeta = exports.findWebInterfacePort = exports.findWebInterface = exports.fixBlockletStatus = exports.getAppDescription = exports.getDisplayName = exports.getAppName = exports.hasRunnableComponent = exports.wipeSensitiveData = exports.isEnvShareable = exports.getComponentMissingConfigs = exports.getAppMissingConfigs = exports.getSharedConfigObj = exports.isDeletableBlocklet = exports.forEachChildSync = exports.forEachChild = exports.forEachBlockletSync = exports.forEachBlocklet = exports.isComponentBlocklet = 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"));
|
|
@@ -12,7 +12,7 @@ const p_limit_1 = __importDefault(require("p-limit"));
|
|
|
12
12
|
const constant_1 = __importDefault(require("@abtnode/constant"));
|
|
13
13
|
const constants_1 = __importDefault(require("./constants"));
|
|
14
14
|
const { NODE_SERVICES, SLOT_FOR_IP_DNS_SITE, WHO_CAN_ACCESS, WHO_CAN_ACCESS_PREFIX_ROLES } = constant_1.default;
|
|
15
|
-
const { BlockletGroup, fromBlockletStatus, fromBlockletSource, BLOCKLET_INTERFACE_TYPE_WEB, BLOCKLET_CONFIGURABLE_KEY, CHAIN_INFO_CONFIG, BLOCKLET_PREFERENCE_PREFIX, } = constants_1.default;
|
|
15
|
+
const { BlockletGroup, BlockletStatus, fromBlockletStatus, fromBlockletSource, BLOCKLET_INTERFACE_TYPE_WEB, BLOCKLET_CONFIGURABLE_KEY, CHAIN_INFO_CONFIG, BLOCKLET_PREFERENCE_PREFIX, BLOCKLET_INTERFACE_TYPE_SERVICE, } = constants_1.default;
|
|
16
16
|
const getComponentId = (component, ancestors = []) => `${ancestors.map((x) => (x && x.meta ? x.meta.did : '')).join('/')}${ancestors.length ? '/' : ''}${component && component.meta ? component.meta.did : ''}`;
|
|
17
17
|
exports.getComponentId = getComponentId;
|
|
18
18
|
const getComponentName = (component, ancestors = []) => `${ancestors.map((x) => (x && x.meta ? x.meta.name : '')).join('/')}${ancestors.length ? '/' : ''}${component && component.meta ? component.meta.name : ''}`;
|
|
@@ -497,6 +497,56 @@ const getBlockletAppIdList = (blocklet) => {
|
|
|
497
497
|
return (0, uniq_1.default)([blocklet.appDid, blocklet.appPid, ...migratedFrom].filter(Boolean));
|
|
498
498
|
};
|
|
499
499
|
exports.getBlockletAppIdList = getBlockletAppIdList;
|
|
500
|
+
const getBlockletServices = (blocklet) => {
|
|
501
|
+
const services = [];
|
|
502
|
+
if (!blocklet) {
|
|
503
|
+
return services;
|
|
504
|
+
}
|
|
505
|
+
forEachBlockletSync(blocklet, (component) => {
|
|
506
|
+
const interfaces = (component.meta?.interfaces || []).filter((x) => x.type === BLOCKLET_INTERFACE_TYPE_SERVICE);
|
|
507
|
+
interfaces.forEach((x) => {
|
|
508
|
+
const port = (x.port || {});
|
|
509
|
+
services.push({
|
|
510
|
+
name: x.name,
|
|
511
|
+
protocol: x.protocol,
|
|
512
|
+
port: Number(port.external),
|
|
513
|
+
upstreamPort: Number((component.ports || {})[port.internal]),
|
|
514
|
+
});
|
|
515
|
+
});
|
|
516
|
+
});
|
|
517
|
+
return services;
|
|
518
|
+
};
|
|
519
|
+
exports.getBlockletServices = getBlockletServices;
|
|
520
|
+
const isInProgress = (status) => [
|
|
521
|
+
BlockletStatus.downloading,
|
|
522
|
+
BlockletStatus.waiting,
|
|
523
|
+
BlockletStatus.starting,
|
|
524
|
+
BlockletStatus.installing,
|
|
525
|
+
BlockletStatus.stopping,
|
|
526
|
+
BlockletStatus.upgrading,
|
|
527
|
+
'downloading',
|
|
528
|
+
'waiting',
|
|
529
|
+
'starting',
|
|
530
|
+
'installing',
|
|
531
|
+
'stopping',
|
|
532
|
+
'upgrading',
|
|
533
|
+
'restarting',
|
|
534
|
+
'deleting',
|
|
535
|
+
].includes(status);
|
|
536
|
+
exports.isInProgress = isInProgress;
|
|
537
|
+
const isBeforeInstalled = (status) => [
|
|
538
|
+
BlockletStatus.added,
|
|
539
|
+
BlockletStatus.waiting,
|
|
540
|
+
BlockletStatus.downloading,
|
|
541
|
+
BlockletStatus.installing,
|
|
542
|
+
'added',
|
|
543
|
+
'waiting',
|
|
544
|
+
'downloading',
|
|
545
|
+
'installing',
|
|
546
|
+
].includes(status);
|
|
547
|
+
exports.isBeforeInstalled = isBeforeInstalled;
|
|
548
|
+
const isRunning = (status) => [BlockletStatus.running, 'running'].includes(status);
|
|
549
|
+
exports.isRunning = isRunning;
|
|
500
550
|
exports.default = {
|
|
501
551
|
isFreeBlocklet,
|
|
502
552
|
isFreeComponent,
|
|
@@ -533,4 +583,8 @@ exports.default = {
|
|
|
533
583
|
isExternalBlocklet,
|
|
534
584
|
isPreferenceKey,
|
|
535
585
|
getRolesFromAuthConfig,
|
|
586
|
+
getBlockletServices,
|
|
587
|
+
isInProgress,
|
|
588
|
+
isBeforeInstalled,
|
|
589
|
+
isRunning,
|
|
536
590
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.
|
|
6
|
+
"version": "1.16.4-beta-8682e092",
|
|
7
7
|
"description": "Library to parse/validate/fix blocklet meta",
|
|
8
8
|
"main": "./lib/index.js",
|
|
9
9
|
"typings": "./lib/index.d.ts",
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
"author": "wangshijun <wangshijun2020@gmail.com> (http://github.com/wangshijun)",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@abtnode/client": "1.16.
|
|
28
|
-
"@abtnode/constant": "1.16.
|
|
29
|
-
"@abtnode/util": "1.16.
|
|
30
|
-
"@arcblock/did": "1.18.
|
|
31
|
-
"@arcblock/did-ext": "1.18.
|
|
32
|
-
"@arcblock/did-util": "1.18.
|
|
33
|
-
"@arcblock/jwt": "1.18.
|
|
34
|
-
"@blocklet/constant": "1.16.
|
|
35
|
-
"@ocap/asset": "1.18.
|
|
36
|
-
"@ocap/mcrypto": "1.18.
|
|
37
|
-
"@ocap/types": "1.18.
|
|
38
|
-
"@ocap/util": "1.18.
|
|
39
|
-
"@ocap/wallet": "1.18.
|
|
27
|
+
"@abtnode/client": "1.16.4-beta-8682e092",
|
|
28
|
+
"@abtnode/constant": "1.16.4-beta-8682e092",
|
|
29
|
+
"@abtnode/util": "1.16.4-beta-8682e092",
|
|
30
|
+
"@arcblock/did": "1.18.67",
|
|
31
|
+
"@arcblock/did-ext": "1.18.67",
|
|
32
|
+
"@arcblock/did-util": "1.18.67",
|
|
33
|
+
"@arcblock/jwt": "1.18.67",
|
|
34
|
+
"@blocklet/constant": "1.16.4-beta-8682e092",
|
|
35
|
+
"@ocap/asset": "1.18.67",
|
|
36
|
+
"@ocap/mcrypto": "1.18.67",
|
|
37
|
+
"@ocap/types": "1.18.67",
|
|
38
|
+
"@ocap/util": "1.18.67",
|
|
39
|
+
"@ocap/wallet": "1.18.67",
|
|
40
40
|
"ajv": "^8.11.0",
|
|
41
41
|
"axios": "^0.27.2",
|
|
42
42
|
"cjk-length": "^1.0.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"ts-node": "^10.9.1",
|
|
81
81
|
"typescript": "^4.8.4"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "ab6fc7aeaec32f14ec2153976f2121aa893486b5"
|
|
84
84
|
}
|