@blocklet/meta 1.16.32-beta-04a5da00 → 1.16.32-beta-0593a408
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/schema.js +1 -1
- package/lib/service.js +0 -14
- package/lib/util.js +0 -4
- package/package.json +4 -4
package/lib/schema.js
CHANGED
|
@@ -454,7 +454,7 @@ const themeSchema = Joi.object({
|
|
|
454
454
|
exports.themeSchema = themeSchema;
|
|
455
455
|
const authConfigSchema = Joi.object({
|
|
456
456
|
whoCanAccess: Joi.string().valid('owner', 'invited', 'all'),
|
|
457
|
-
profileFields: Joi.array()
|
|
457
|
+
profileFields: Joi.array() // deprecated
|
|
458
458
|
.items(Joi.string().valid('fullName', 'email', 'avatar', 'phone'))
|
|
459
459
|
.unique(),
|
|
460
460
|
ignoreUrls: Joi.array().items(Joi.string().min(1)),
|
package/lib/service.js
CHANGED
|
@@ -5,9 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.setService = exports.findService = exports.getDefaultServiceConfig = exports.getServiceConfig = void 0;
|
|
7
7
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
8
|
-
const constant_1 = __importDefault(require("@abtnode/constant"));
|
|
9
8
|
const schema_1 = require("./schema");
|
|
10
|
-
const { NODE_SERVICES } = constant_1.default;
|
|
11
9
|
const SERVICES = {};
|
|
12
10
|
const setService = (meta) => {
|
|
13
11
|
SERVICES[meta.name] = {
|
|
@@ -21,14 +19,6 @@ setService({
|
|
|
21
19
|
schema: schema_1.authConfigSchema,
|
|
22
20
|
default: {},
|
|
23
21
|
});
|
|
24
|
-
// backward compatible
|
|
25
|
-
SERVICES[NODE_SERVICES.AUTH_SERVICE] = {
|
|
26
|
-
...SERVICES[NODE_SERVICES.AUTH],
|
|
27
|
-
meta: {
|
|
28
|
-
...SERVICES[NODE_SERVICES.AUTH].meta,
|
|
29
|
-
name: NODE_SERVICES.AUTH_SERVICE,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
22
|
const getService = (serviceName) => {
|
|
33
23
|
if (!serviceName) {
|
|
34
24
|
throw new Error('service name should not be empty');
|
|
@@ -56,10 +46,6 @@ const getDefaultServiceConfig = (serviceName) => {
|
|
|
56
46
|
exports.getDefaultServiceConfig = getDefaultServiceConfig;
|
|
57
47
|
const findService = (services, name) => {
|
|
58
48
|
const names = [name];
|
|
59
|
-
// backward compatible
|
|
60
|
-
if (name === NODE_SERVICES.AUTH) {
|
|
61
|
-
names.push(NODE_SERVICES.AUTH_SERVICE);
|
|
62
|
-
}
|
|
63
49
|
return (services || []).find((x) => names.includes(x.name));
|
|
64
50
|
};
|
|
65
51
|
exports.findService = findService;
|
package/lib/util.js
CHANGED
|
@@ -543,10 +543,6 @@ const findWebInterfacePort = (blocklet) => {
|
|
|
543
543
|
exports.findWebInterfacePort = findWebInterfacePort;
|
|
544
544
|
const findServiceFromMeta = (meta, ServiceName) => {
|
|
545
545
|
const names = [ServiceName];
|
|
546
|
-
// backward compatible
|
|
547
|
-
if (ServiceName === NODE_SERVICES.AUTH) {
|
|
548
|
-
names.push(NODE_SERVICES.AUTH_SERVICE);
|
|
549
|
-
}
|
|
550
546
|
const webInterface = findWebInterface(meta);
|
|
551
547
|
if (!webInterface) {
|
|
552
548
|
return null;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.32-beta-
|
|
6
|
+
"version": "1.16.32-beta-0593a408",
|
|
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.32-beta-
|
|
28
|
+
"@abtnode/constant": "1.16.32-beta-0593a408",
|
|
29
29
|
"@arcblock/did": "1.18.135",
|
|
30
30
|
"@arcblock/did-ext": "1.18.135",
|
|
31
31
|
"@arcblock/did-util": "1.18.135",
|
|
32
32
|
"@arcblock/jwt": "1.18.135",
|
|
33
|
-
"@blocklet/constant": "1.16.32-beta-
|
|
33
|
+
"@blocklet/constant": "1.16.32-beta-0593a408",
|
|
34
34
|
"@ocap/asset": "1.18.135",
|
|
35
35
|
"@ocap/mcrypto": "1.18.135",
|
|
36
36
|
"@ocap/types": "1.18.135",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"ts-node": "^10.9.1",
|
|
80
80
|
"typescript": "^5.0.4"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "5cca981049ad04018d8d361d9cdd33748f47d7d7"
|
|
83
83
|
}
|