@doreamonjs/plugin-shared 0.3.7 → 0.3.8
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/CHANGELOG.md +8 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/message.js +3 -2
- package/lib/notification.js +3 -2
- package/lib/router.js +3 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.3.8](https://github.com/zcorky/zodash/compare/v0.3.7...v0.3.8) (2022-08-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @doreamonjs/plugin-shared
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.3.7](https://github.com/zcorky/zodash/compare/v0.3.6...v0.3.7) (2022-08-31)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @doreamonjs/plugin-shared
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
const shared_1 = require("./shared");
|
|
14
14
|
__exportStar(require("./type"), exports);
|
|
15
|
+
__exportStar(require("./shared"), exports);
|
|
15
16
|
__exportStar(require("./message"), exports);
|
|
16
17
|
__exportStar(require("./notification"), exports);
|
|
17
18
|
__exportStar(require("./router"), exports);
|
package/lib/message.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.message = exports.Message = void 0;
|
|
4
|
+
const shared_1 = require("./shared");
|
|
4
5
|
class Message {
|
|
5
6
|
constructor(options) {
|
|
6
7
|
this.options = options;
|
|
@@ -12,8 +13,8 @@ class Message {
|
|
|
12
13
|
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.messager) {
|
|
13
14
|
this._messager = (_b = this.options) === null || _b === void 0 ? void 0 : _b.messager;
|
|
14
15
|
}
|
|
15
|
-
else if (
|
|
16
|
-
this._messager =
|
|
16
|
+
else if (shared_1.shared.has('message')) {
|
|
17
|
+
this._messager = shared_1.shared.get('message');
|
|
17
18
|
}
|
|
18
19
|
else {
|
|
19
20
|
throw new Error('[doreamonjs] message is not registered');
|
package/lib/notification.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.notification = exports.Notification = void 0;
|
|
4
|
+
const shared_1 = require("./shared");
|
|
4
5
|
class Notification {
|
|
5
6
|
constructor(options) {
|
|
6
7
|
this.options = options;
|
|
@@ -12,8 +13,8 @@ class Notification {
|
|
|
12
13
|
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.notifier) {
|
|
13
14
|
this._notifier = (_b = this.options) === null || _b === void 0 ? void 0 : _b.notifier;
|
|
14
15
|
}
|
|
15
|
-
else if (
|
|
16
|
-
this._notifier =
|
|
16
|
+
else if (shared_1.shared.has('notification')) {
|
|
17
|
+
this._notifier = shared_1.shared.get('notification');
|
|
17
18
|
}
|
|
18
19
|
else {
|
|
19
20
|
throw new Error('[doreamonjs] nitification is not registered');
|
package/lib/router.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.router = exports.Router = void 0;
|
|
4
|
+
const shared_1 = require("./shared");
|
|
4
5
|
class Router {
|
|
5
6
|
constructor(options) {
|
|
6
7
|
this.options = options;
|
|
@@ -12,9 +13,9 @@ class Router {
|
|
|
12
13
|
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.router) {
|
|
13
14
|
this._router = (_b = this.options) === null || _b === void 0 ? void 0 : _b.router;
|
|
14
15
|
}
|
|
15
|
-
else if (
|
|
16
|
+
else if (shared_1.shared.has('router')) {
|
|
16
17
|
// doreamonjs
|
|
17
|
-
this._router =
|
|
18
|
+
this._router = shared_1.shared.get('router');
|
|
18
19
|
}
|
|
19
20
|
else {
|
|
20
21
|
throw new Error('[doreamonjs] router is not registered');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doreamonjs/plugin-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "shared plugin for doreamonjs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"doreamonjs",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"@zodash/doreamon": "^1.0.17",
|
|
72
72
|
"history": "^5.3.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "38b601ea285643d97ae0f5adaab938b5dd7b5b4b"
|
|
75
75
|
}
|