@ohbug/core 1.1.6 → 2.0.1

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.
@@ -1,680 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
-
16
- var __assign = function() {
17
- __assign = Object.assign || function __assign(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
21
- }
22
- return t;
23
- };
24
- return __assign.apply(this, arguments);
25
- };
26
-
27
- function __awaiter(thisArg, _arguments, P, generator) {
28
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
- return new (P || (P = Promise))(function (resolve, reject) {
30
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
31
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
33
- step((generator = generator.apply(thisArg, _arguments || [])).next());
34
- });
35
- }
36
-
37
- function __generator(thisArg, body) {
38
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
39
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
40
- function verb(n) { return function (v) { return step([n, v]); }; }
41
- function step(op) {
42
- if (f) throw new TypeError("Generator is already executing.");
43
- while (_) try {
44
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45
- if (y = 0, t) op = [op[0] & 2, t.value];
46
- switch (op[0]) {
47
- case 0: case 1: t = op; break;
48
- case 4: _.label++; return { value: op[1], done: false };
49
- case 5: _.label++; y = op[1]; op = [0]; continue;
50
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
51
- default:
52
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
53
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
54
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
55
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
56
- if (t[2]) _.ops.pop();
57
- _.trys.pop(); continue;
58
- }
59
- op = body.call(thisArg, _);
60
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
61
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
62
- }
63
- }
64
-
65
- function __spreadArray$1(to, from) {
66
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
67
- to[j] = from[i];
68
- return to;
69
- }
70
-
71
- /*! *****************************************************************************
72
- Copyright (c) Microsoft Corporation.
73
-
74
- Permission to use, copy, modify, and/or distribute this software for any
75
- purpose with or without fee is hereby granted.
76
-
77
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
78
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
79
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
80
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
81
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
82
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
83
- PERFORMANCE OF THIS SOFTWARE.
84
- ***************************************************************************** */
85
-
86
- function __spreadArray(to, from) {
87
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
88
- to[j] = from[i];
89
- return to;
90
- }
91
-
92
- var prefix = 'Ohbug';
93
- var logger = {
94
- log: function () {
95
- var args = [];
96
- for (var _i = 0; _i < arguments.length; _i++) {
97
- args[_i] = arguments[_i];
98
- }
99
- // eslint-disable-next-line no-console
100
- console.log.apply(console, __spreadArray([prefix], args));
101
- },
102
- info: function () {
103
- var args = [];
104
- for (var _i = 0; _i < arguments.length; _i++) {
105
- args[_i] = arguments[_i];
106
- }
107
- // eslint-disable-next-line no-console
108
- console.info.apply(console, __spreadArray([prefix], args));
109
- },
110
- warn: function () {
111
- var args = [];
112
- for (var _i = 0; _i < arguments.length; _i++) {
113
- args[_i] = arguments[_i];
114
- }
115
- console.warn.apply(console, __spreadArray([prefix], args));
116
- },
117
- error: function () {
118
- var args = [];
119
- for (var _i = 0; _i < arguments.length; _i++) {
120
- args[_i] = arguments[_i];
121
- }
122
- console.error.apply(console, __spreadArray([prefix], args));
123
- },
124
- };
125
-
126
- function isString(value) {
127
- return typeof value === 'string';
128
- }
129
- function isNumber(value) {
130
- return typeof value === 'number' && parseInt("" + value, 10) === value;
131
- }
132
- function isFunction(value) {
133
- return typeof value === 'function';
134
- }
135
- function isObject(value) {
136
- return Object.prototype.toString.call(value) === '[object Object]';
137
- }
138
-
139
- var schema = {
140
- // base
141
- apiKey: {
142
- defaultValue: undefined,
143
- message: 'is required',
144
- validate: function (value) { return Boolean(value) && isString(value); },
145
- },
146
- appVersion: {
147
- defaultValue: undefined,
148
- message: 'should be a string',
149
- validate: function (value) { return value === undefined || isString(value); },
150
- },
151
- appType: {
152
- defaultValue: undefined,
153
- message: 'should be a string',
154
- validate: function (value) { return value === undefined || isString(value); },
155
- },
156
- releaseStage: {
157
- defaultValue: 'production',
158
- message: 'should be a string',
159
- validate: function (value) { return value === undefined || isString(value); },
160
- },
161
- endpoint: {
162
- defaultValue: 'http://localhost:6660/report',
163
- message: 'should be a string',
164
- validate: function (value) { return value === undefined || isString(value); },
165
- },
166
- maxActions: {
167
- defaultValue: 30,
168
- message: 'should be a number between 0 and 100',
169
- validate: function (value) {
170
- return value === undefined || (isNumber(value) && value >= 1 && value <= 100);
171
- },
172
- },
173
- // hooks
174
- created: {
175
- defaultValue: function (event) { return event; },
176
- message: 'should be a function',
177
- validate: function (value) { return value === undefined || isFunction(value); },
178
- },
179
- notified: {
180
- defaultValue: function () { },
181
- message: 'should be a function',
182
- validate: function (value) { return value === undefined || isFunction(value); },
183
- },
184
- // utils
185
- logger: {
186
- defaultValue: logger,
187
- message: 'should be null or an object with methods { log, info, warn, error }',
188
- validate: function (value) {
189
- return value === undefined ||
190
- (value &&
191
- ['log', 'info', 'warn', 'error'].reduce(function (accumulator, method) {
192
- return accumulator && typeof value[method] === 'function';
193
- }, true));
194
- },
195
- },
196
- // data
197
- user: {
198
- defaultValue: undefined,
199
- message: 'should be an object and have up to 6 attributes',
200
- validate: function (value) {
201
- return value === undefined ||
202
- (isObject(value) && Object.keys(value).length <= 6);
203
- },
204
- },
205
- metaData: {
206
- defaultValue: undefined,
207
- message: 'should be an object',
208
- validate: function (value) { return value === undefined || isObject(value); },
209
- },
210
- };
211
-
212
- function createExtension(extension) {
213
- return extension;
214
- }
215
- function createExtensionUI(extensionUI) {
216
- return extensionUI;
217
- }
218
- /**
219
- * Extension loading and initialization
220
- *
221
- * @param extension
222
- * @param client
223
- * @param args
224
- */
225
- function loadExtension(extension, client) {
226
- var _a;
227
- var args = [];
228
- for (var _i = 2; _i < arguments.length; _i++) {
229
- args[_i - 2] = arguments[_i];
230
- }
231
- var result = (_a = extension.init) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spreadArray$1([extension, client], args));
232
- client._extensions.push(extension);
233
- // @ts-ignore
234
- // eslint-disable-next-line no-param-reassign
235
- client._hooks.created = function (_event, _client) {
236
- var _a, _b;
237
- var funcs = __spreadArray$1([
238
- _client._config.created
239
- ], _client._extensions
240
- .filter(function (_a) {
241
- var created = _a.created;
242
- return isFunction(created);
243
- })
244
- .map(function (_a) {
245
- var created = _a.created;
246
- return created;
247
- }));
248
- if (funcs.length === 0)
249
- return (function () {
250
- var arg = [];
251
- for (var _i = 0; _i < arguments.length; _i++) {
252
- arg[_i] = arguments[_i];
253
- }
254
- return arg;
255
- })(_event, _client);
256
- if (funcs.length === 1)
257
- return (_a = funcs[0]) === null || _a === void 0 ? void 0 : _a.call(funcs, _event, _client);
258
- // @ts-ignore
259
- return (_b = funcs.reduce(function (a, b) { return function (event) { return b(a(event, _client), _client); }; })) === null || _b === void 0 ? void 0 : _b(_event, _client);
260
- };
261
- // eslint-disable-next-line no-param-reassign
262
- client._hooks.notified = function (_event, _client) {
263
- return __spreadArray$1([
264
- _client._config.notified
265
- ], _client._extensions
266
- .filter(function (_a) {
267
- var notified = _a.notified;
268
- return isFunction(notified);
269
- })
270
- .map(function (_a) {
271
- var notified = _a.notified;
272
- return notified;
273
- })).forEach(function (func) { return func === null || func === void 0 ? void 0 : func(_event, _client); });
274
- };
275
- return result || client;
276
- }
277
-
278
- var Action = /** @class */ (function () {
279
- function Action(message, data, type, timestamp) {
280
- this.type = type;
281
- this.timestamp = timestamp || new Date().toISOString();
282
- this.message = message;
283
- this.data = data;
284
- }
285
- return Action;
286
- }());
287
-
288
- function getConfigErrorMessage(errors, config) {
289
- return new Error("Invalid configuration\n" + Object.keys(errors)
290
- .map(
291
- // @ts-ignore
292
- function (key) { return "- " + key + " " + errors[key] + ", got " + JSON.stringify(config[key]); })
293
- .join('\n') + "\n ");
294
- }
295
- function getErrorMessage(message, data) {
296
- return new Error("Invalid data\n- " + message + ", got " + JSON.stringify(data));
297
- }
298
-
299
- function addMetaData(map, section, data) {
300
- if (!section)
301
- return;
302
- map[section] = data;
303
- }
304
- function getMetaData(map, section) {
305
- if (map[section]) {
306
- return map[section];
307
- }
308
- return undefined;
309
- }
310
- function deleteMetaData(map, section) {
311
- if (map[section]) {
312
- return delete map[section];
313
- }
314
- return undefined;
315
- }
316
-
317
- var Event = /** @class */ (function () {
318
- function Event(values, client) {
319
- var apiKey = values.apiKey, appVersion = values.appVersion, appType = values.appType, releaseStage = values.releaseStage, timestamp = values.timestamp, category = values.category, type = values.type, sdk = values.sdk, detail = values.detail, device = values.device, user = values.user, actions = values.actions, metaData = values.metaData;
320
- this.apiKey = apiKey;
321
- this.appVersion = appVersion;
322
- this.appType = appType;
323
- this.releaseStage = releaseStage;
324
- this.timestamp = timestamp;
325
- this.category = category;
326
- this.type = type;
327
- this.sdk = sdk;
328
- this.detail = detail;
329
- this.device = device;
330
- this.user = user;
331
- this.actions = actions;
332
- this.metaData = metaData;
333
- this._client = client;
334
- }
335
- Object.defineProperty(Event.prototype, "_isOhbugEvent", {
336
- get: function () {
337
- return true;
338
- },
339
- enumerable: false,
340
- configurable: true
341
- });
342
- /**
343
- * Add an action.
344
- * Once the threshold is reached, the oldest breadcrumbs will be deleted.
345
- * 新增一个动作。
346
- * 一旦达到阈值,最老的 Action 将被删除。
347
- *
348
- * @param message
349
- * @param data
350
- * @param type
351
- * @param timestamp
352
- */
353
- Event.prototype.addAction = function (message, data, type, timestamp) {
354
- var _a, _b;
355
- var actions = this.actions;
356
- var targetMessage = isString(message) ? message : '';
357
- var targetData = data || {};
358
- var targetType = isString(type) ? type : '';
359
- var action = new Action(targetMessage, targetData, targetType, timestamp);
360
- if (actions.length >= ((_b = (_a = this._client) === null || _a === void 0 ? void 0 : _a._config.maxActions) !== null && _b !== void 0 ? _b : 30)) {
361
- actions.shift();
362
- }
363
- actions.push(action);
364
- };
365
- /**
366
- * Get current user information
367
- * 获取当前的用户信息
368
- */
369
- Event.prototype.getUser = function () {
370
- return this.user;
371
- };
372
- /**
373
- * Set current user information
374
- * 设置当前的用户信息
375
- */
376
- Event.prototype.setUser = function (user) {
377
- var _a;
378
- if (isObject(user) && Object.keys(user).length <= 6) {
379
- this.user = __assign(__assign({}, this.user), user);
380
- return this.getUser();
381
- }
382
- (_a = this._client) === null || _a === void 0 ? void 0 : _a._logger.warn(getErrorMessage('setUser should be an object and have up to 6 attributes', user));
383
- return undefined;
384
- };
385
- /**
386
- * Add metaData
387
- * 新增 metaData
388
- *
389
- * @param section
390
- * @param data
391
- */
392
- Event.prototype.addMetaData = function (section, data) {
393
- return addMetaData(this.metaData, section, data);
394
- };
395
- /**
396
- * Get metaData
397
- * 获取 metaData
398
- *
399
- * @param section
400
- */
401
- Event.prototype.getMetaData = function (section) {
402
- return getMetaData(this.metaData, section);
403
- };
404
- /**
405
- * Delete metaData
406
- * 删除 metaData
407
- *
408
- * @param section
409
- */
410
- Event.prototype.deleteMetaData = function (section) {
411
- return deleteMetaData(this.metaData, section);
412
- };
413
- Event.prototype.toJSON = function () {
414
- var _a = this, apiKey = _a.apiKey, appVersion = _a.appVersion, appType = _a.appType, timestamp = _a.timestamp, category = _a.category, type = _a.type, sdk = _a.sdk, device = _a.device, detail = _a.detail, user = _a.user, actions = _a.actions, metaData = _a.metaData, releaseStage = _a.releaseStage;
415
- return {
416
- apiKey: apiKey,
417
- appVersion: appVersion,
418
- appType: appType,
419
- timestamp: timestamp,
420
- category: category,
421
- type: type,
422
- sdk: sdk,
423
- device: device,
424
- detail: detail,
425
- user: user,
426
- actions: actions,
427
- metaData: metaData,
428
- releaseStage: releaseStage,
429
- };
430
- };
431
- return Event;
432
- }());
433
- function createEvent(values, client) {
434
- var _a = client._config, apiKey = _a.apiKey, appVersion = _a.appVersion, appType = _a.appType, releaseStage = _a.releaseStage;
435
- var timestamp = new Date().toISOString();
436
- var device = client._device(client);
437
- var category;
438
- var type;
439
- var detail;
440
- if (isObject(values) &&
441
- Object.prototype.hasOwnProperty.call(values, 'type') &&
442
- Object.prototype.hasOwnProperty.call(values, 'detail')) {
443
- category = values.category || 'error';
444
- type = values.type;
445
- detail = values.detail;
446
- }
447
- else {
448
- category = 'error';
449
- type = 'unknownError';
450
- detail = values;
451
- }
452
- return new Event({
453
- apiKey: apiKey,
454
- appVersion: appVersion,
455
- appType: appType,
456
- timestamp: timestamp,
457
- category: category,
458
- type: type,
459
- sdk: client._sdk,
460
- device: device,
461
- user: client._user,
462
- detail: detail,
463
- actions: client._actions,
464
- metaData: client._metaData,
465
- releaseStage: releaseStage,
466
- }, client);
467
- }
468
- function isEvent(eventLike) {
469
- return Boolean(eventLike === null || eventLike === void 0 ? void 0 : eventLike._isOhbugEvent);
470
- }
471
-
472
- /**
473
- * Used to control the timing of reporting events and the related life cycle.
474
- *
475
- * @param event
476
- * @param client
477
- */
478
- function notify(event, client) {
479
- return __awaiter(this, void 0, void 0, function () {
480
- var result, e_1;
481
- return __generator(this, function (_a) {
482
- switch (_a.label) {
483
- case 0:
484
- _a.trys.push([0, 3, , 4]);
485
- result = null;
486
- if (!event) return [3 /*break*/, 2];
487
- return [4 /*yield*/, client._notifier(event)];
488
- case 1:
489
- result = _a.sent();
490
- _a.label = 2;
491
- case 2:
492
- if (isFunction(client._hooks.notified)) {
493
- client._hooks.notified(event, client);
494
- }
495
- return [2 /*return*/, result];
496
- case 3:
497
- e_1 = _a.sent();
498
- client._logger.error(e_1);
499
- return [3 /*break*/, 4];
500
- case 4: return [2 /*return*/];
501
- }
502
- });
503
- });
504
- }
505
-
506
- function verifyConfig(config, schema) {
507
- var keys = Object.keys(schema);
508
- return keys.reduce(function (accumulator, key) {
509
- var configValue = config[key];
510
- var _a = schema[key], defaultValue = _a.defaultValue, message = _a.message, validate = _a.validate;
511
- if (configValue !== undefined) {
512
- var valid = validate(configValue);
513
- if (valid) {
514
- accumulator.config[key] = configValue;
515
- }
516
- else {
517
- accumulator.config[key] = defaultValue;
518
- accumulator.errors[key] = message;
519
- }
520
- }
521
- else {
522
- // if there is no corresponding configuration, use the default value
523
- // 如果没有传入相应配置 使用默认值
524
- accumulator.config[key] = defaultValue;
525
- }
526
- return accumulator;
527
- }, {
528
- config: {},
529
- errors: {},
530
- });
531
- }
532
-
533
- var Client = /** @class */ (function () {
534
- function Client(_a) {
535
- var _this = this;
536
- var sdk = _a.sdk, baseConfig = _a.config, _b = _a.schema, schema$1 = _b === void 0 ? schema : _b, device = _a.device, notifier = _a.notifier;
537
- var _c = verifyConfig(baseConfig, schema$1), config = _c.config, errors = _c.errors;
538
- // initialization
539
- this._sdk = sdk;
540
- this._config = config;
541
- this._logger = config.logger;
542
- this._device = device;
543
- this._notifier = notifier;
544
- this._extensions = [];
545
- this._hooks = {
546
- created: config.created,
547
- notified: config.notified,
548
- };
549
- this._actions = [];
550
- this._user = config.user;
551
- this._metaData = {};
552
- if (isObject(config.metaData)) {
553
- Object.keys(config.metaData).forEach(function (key) {
554
- _this.addMetaData(key, config.metaData[key]);
555
- });
556
- }
557
- if (Object.keys(errors).length) {
558
- this._logger.warn(getConfigErrorMessage(errors, baseConfig));
559
- }
560
- }
561
- /**
562
- * Load extension
563
- * 加载扩展
564
- *
565
- * @param extension
566
- * @param args
567
- */
568
- Client.prototype.use = function (extension) {
569
- var args = [];
570
- for (var _i = 1; _i < arguments.length; _i++) {
571
- args[_i - 1] = arguments[_i];
572
- }
573
- return loadExtension.apply(void 0, __spreadArray$1([extension, this], args));
574
- };
575
- /**
576
- * Create an event, you will get a data body containing device actions and other information
577
- * 创建事件,将会得到一个含有 device actions 等信息的数据体
578
- *
579
- * @param value
580
- */
581
- Client.prototype.createEvent = function (value) {
582
- var event = createEvent(value, this);
583
- if (isFunction(this._hooks.created)) {
584
- // trigger created hook
585
- return this._hooks.created(event, this);
586
- }
587
- return event;
588
- };
589
- /**
590
- * Used to trigger the reporting interface
591
- * 用于触发上报接口
592
- *
593
- * @param eventLike
594
- * @param beforeNotify
595
- */
596
- Client.prototype.notify = function (eventLike, beforeNotify) {
597
- var event;
598
- if (Boolean(eventLike) && !isEvent(eventLike)) {
599
- event = this.createEvent(eventLike);
600
- }
601
- else {
602
- event = eventLike;
603
- }
604
- if (beforeNotify)
605
- event = beforeNotify(event);
606
- return notify(event, this);
607
- };
608
- /**
609
- * Add an action.
610
- * Once the threshold is reached, the oldest breadcrumbs will be deleted.
611
- * 新增一个动作。
612
- * 一旦达到阈值,最老的 Action 将被删除。
613
- *
614
- * @param message
615
- * @param data
616
- * @param type
617
- * @param timestamp
618
- */
619
- Client.prototype.addAction = function (message, data, type, timestamp) {
620
- var actions = this._actions;
621
- var targetMessage = isString(message) ? message : '';
622
- var targetData = data || {};
623
- var targetType = isString(type) ? type : '';
624
- var action = new Action(targetMessage, targetData, targetType, timestamp);
625
- if (actions.length >= this._config.maxActions) {
626
- actions.shift();
627
- }
628
- actions.push(action);
629
- };
630
- /**
631
- * Get current user information
632
- * 获取当前的用户信息
633
- */
634
- Client.prototype.getUser = function () {
635
- return this._user;
636
- };
637
- /**
638
- * Set current user information
639
- * 设置当前的用户信息
640
- */
641
- Client.prototype.setUser = function (user) {
642
- if (isObject(user) && Object.keys(user).length <= 6) {
643
- this._user = __assign(__assign({}, this._user), user);
644
- return this.getUser();
645
- }
646
- this._logger.warn(getErrorMessage('setUser should be an object and have up to 6 attributes', user));
647
- return undefined;
648
- };
649
- /**
650
- * Add metaData
651
- * 新增 metaData
652
- *
653
- * @param section
654
- * @param data
655
- */
656
- Client.prototype.addMetaData = function (section, data) {
657
- return addMetaData(this._metaData, section, data);
658
- };
659
- /**
660
- * Get metaData
661
- * 获取 metaData
662
- *
663
- * @param section
664
- */
665
- Client.prototype.getMetaData = function (section) {
666
- return getMetaData(this._metaData, section);
667
- };
668
- /**
669
- * Delete metaData
670
- * 删除 metaData
671
- *
672
- * @param section
673
- */
674
- Client.prototype.deleteMetaData = function (section) {
675
- return deleteMetaData(this._metaData, section);
676
- };
677
- return Client;
678
- }());
679
-
680
- export { Client, createExtension, createExtensionUI, isEvent };