@giteeteam/apps-manifest 0.6.1 → 0.6.3
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/manifest.d.ts +1 -1
- package/lib/manifest.js +2 -2
- package/lib/schema/all.json +2 -2
- package/lib/schema/{mq.json → messageQueues.json} +1 -1
- package/lib/types.d.ts +6 -5
- package/lib/validate.d.ts +1 -1
- package/lib/validate.js +4 -4
- package/package.json +1 -1
package/lib/manifest.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare class Manifest {
|
|
|
9
9
|
get modules(): import("./types").TManifestModules;
|
|
10
10
|
get storage(): import("./types").IStorage | undefined;
|
|
11
11
|
get locales(): import("./types").TManifestLocales | undefined;
|
|
12
|
-
get
|
|
12
|
+
get messageQueues(): import("./types").IMessageQueue[] | undefined;
|
|
13
13
|
getManifest(): IManifest;
|
|
14
14
|
getManifestString(): string;
|
|
15
15
|
/**
|
package/lib/manifest.js
CHANGED
package/lib/schema/all.json
CHANGED
package/lib/types.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface IManifestApp {
|
|
|
9
9
|
key?: string;
|
|
10
10
|
description?: string;
|
|
11
11
|
version?: string;
|
|
12
|
+
global?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export type LoadType = 'micro' | 'iframe' | 'remoteJs' | 'redirect' | 'uikit';
|
|
14
15
|
export interface IManifestModule {
|
|
@@ -64,8 +65,8 @@ export interface IConsumer {
|
|
|
64
65
|
method: string;
|
|
65
66
|
};
|
|
66
67
|
}
|
|
67
|
-
export interface
|
|
68
|
-
|
|
68
|
+
export interface IMessageQueueConsumer extends IConsumer {
|
|
69
|
+
messageQueue: string;
|
|
69
70
|
messageTransformer: Record<string, any>;
|
|
70
71
|
}
|
|
71
72
|
export type TManifestModules = {
|
|
@@ -78,7 +79,7 @@ export type TManifestModules = {
|
|
|
78
79
|
customFieldType?: IManifestCustomFieldType[];
|
|
79
80
|
customItemType?: any[];
|
|
80
81
|
consumer?: IConsumer[];
|
|
81
|
-
|
|
82
|
+
messageQueueConsumer?: IMessageQueueConsumer[];
|
|
82
83
|
};
|
|
83
84
|
export type TDependProduct = 'team' | 'one';
|
|
84
85
|
export type TManifestLanguage = 'en-US' | 'zh-CN' | 'ru-RU';
|
|
@@ -100,7 +101,7 @@ export interface IStorageEntity {
|
|
|
100
101
|
export interface IStorage {
|
|
101
102
|
entities: IStorageEntity[];
|
|
102
103
|
}
|
|
103
|
-
export interface
|
|
104
|
+
export interface IMessageQueue {
|
|
104
105
|
key: string;
|
|
105
106
|
type: string;
|
|
106
107
|
endpoint: string;
|
|
@@ -113,5 +114,5 @@ export interface IManifest {
|
|
|
113
114
|
locales?: TManifestLocales;
|
|
114
115
|
dependVersion?: TDependVersion;
|
|
115
116
|
storage?: IStorage;
|
|
116
|
-
|
|
117
|
+
messageQueues?: IMessageQueue[];
|
|
117
118
|
}
|
package/lib/validate.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export declare const validateStorage: (json: IManifest) => {
|
|
|
58
58
|
message: string | undefined;
|
|
59
59
|
}[] | null;
|
|
60
60
|
};
|
|
61
|
-
export declare const
|
|
61
|
+
export declare const validateMessageQueues: (json: IManifest) => {
|
|
62
62
|
pass: boolean | Promise<unknown> | undefined;
|
|
63
63
|
errors: {
|
|
64
64
|
path: string;
|
package/lib/validate.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.
|
|
6
|
+
exports.validateMessageQueues = exports.validateStorage = exports.validateDependVersion = exports.validateLocales = exports.validateTables = exports.validateResources = exports.validateModules = exports.validateApp = exports.validateAll = void 0;
|
|
7
7
|
const ajv_1 = __importDefault(require("ajv"));
|
|
8
8
|
const ajv_keywords_1 = __importDefault(require("ajv-keywords"));
|
|
9
9
|
const lodash_1 = require("lodash");
|
|
@@ -21,7 +21,7 @@ const tables_json_1 = __importDefault(require("./schema/tables.json"));
|
|
|
21
21
|
const locales_json_1 = __importDefault(require("./schema/locales.json"));
|
|
22
22
|
const dependVersion_json_1 = __importDefault(require("./schema/dependVersion.json"));
|
|
23
23
|
const storage_json_1 = __importDefault(require("./schema/storage.json"));
|
|
24
|
-
const
|
|
24
|
+
const messageQueues_json_1 = __importDefault(require("./schema/messageQueues.json"));
|
|
25
25
|
const validateResource = (json) => {
|
|
26
26
|
const errors = [];
|
|
27
27
|
const frontendModules = ['adminPage', 'itemPanel', 'itemActivity', 'appPage'];
|
|
@@ -98,7 +98,7 @@ const validateFactory = (schema) => {
|
|
|
98
98
|
locales_json_1.default,
|
|
99
99
|
dependVersion_json_1.default,
|
|
100
100
|
storage_json_1.default,
|
|
101
|
-
|
|
101
|
+
messageQueues_json_1.default,
|
|
102
102
|
],
|
|
103
103
|
});
|
|
104
104
|
(0, ajv_keywords_1.default)(ajv);
|
|
@@ -133,4 +133,4 @@ exports.validateTables = validateFactory('http://proxima.com/schemas/tables.json
|
|
|
133
133
|
exports.validateLocales = validateFactory('http://proxima.com/schemas/locales.json');
|
|
134
134
|
exports.validateDependVersion = validateFactory('http://proxima.com/schemas/dependVersion.json');
|
|
135
135
|
exports.validateStorage = validateFactory('http://proxima.com/schemas/storage.json');
|
|
136
|
-
exports.
|
|
136
|
+
exports.validateMessageQueues = validateFactory('http://proxima.com/schemas/messageQueues.json');
|