@doreamonjs/plugin-terminal 1.9.30
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 +100 -0
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/lib/constants.d.ts +2 -0
- package/lib/constants.js +8 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +17 -0
- package/lib/instance.d.ts +4 -0
- package/lib/instance.js +7 -0
- package/lib/model.d.ts +10 -0
- package/lib/model.js +143 -0
- package/lib/service.d.ts +15 -0
- package/lib/service.js +51 -0
- package/lib/types.d.ts +21 -0
- package/lib/types.js +2 -0
- package/package.json +81 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [1.9.30](https://github.com/doreamonjs/doreamon/compare/v1.9.29...v1.9.30) (2023-09-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.2.13](https://github.com/doreamonjs/doreamon/compare/v1.2.12...v1.2.13) (2022-11-14)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
17
|
+
|
|
18
|
+
## [1.2.5](https://github.com/doreamonjs/doreamon/compare/v1.2.4...v1.2.5) (2022-10-17)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
21
|
+
|
|
22
|
+
## [1.1.36](https://github.com/doreamonjs/doreamon/compare/v1.1.35...v1.1.36) (2022-10-10)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
25
|
+
|
|
26
|
+
## [1.1.35](https://github.com/doreamonjs/doreamon/compare/v1.1.34...v1.1.35) (2022-10-10)
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
29
|
+
|
|
30
|
+
## [1.1.34](https://github.com/doreamonjs/doreamon/compare/v1.1.33...v1.1.34) (2022-10-10)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
33
|
+
|
|
34
|
+
## [1.1.33](https://github.com/doreamonjs/doreamon/compare/v1.1.32...v1.1.33) (2022-10-10)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
37
|
+
|
|
38
|
+
## [1.1.32](https://github.com/doreamonjs/doreamon/compare/v1.1.31...v1.1.32) (2022-10-10)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
41
|
+
|
|
42
|
+
## [1.1.31](https://github.com/doreamonjs/doreamon/compare/v1.1.30...v1.1.31) (2022-10-10)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
45
|
+
|
|
46
|
+
## [1.1.28](https://github.com/doreamonjs/doreamon/compare/v1.1.27...v1.1.28) (2022-09-29)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
49
|
+
|
|
50
|
+
## [1.1.22](https://github.com/doreamonjs/doreamon/compare/v1.1.21...v1.1.22) (2022-09-16)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
53
|
+
|
|
54
|
+
## [1.1.8](https://github.com/doreamonjs/doreamon/compare/v1.1.7...v1.1.8) (2022-09-09)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
57
|
+
|
|
58
|
+
## [1.0.1](https://github.com/doreamonjs/doreamon/compare/v0.6.13...v1.0.1) (2022-09-04)
|
|
59
|
+
|
|
60
|
+
### Bug Fixes
|
|
61
|
+
|
|
62
|
+
- update dependencies versions ([77fb520](https://github.com/doreamonjs/doreamon/commit/77fb520f652d2bb1a6ffe25399d14bd204b3f87e))
|
|
63
|
+
|
|
64
|
+
## [0.6.10](https://github.com/doreamonjs/doreamon/compare/v0.6.9...v0.6.10) (2022-09-04)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
67
|
+
|
|
68
|
+
## [0.6.4](https://github.com/doreamonjs/doreamon/compare/v0.6.3...v0.6.4) (2022-09-03)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
71
|
+
|
|
72
|
+
# [0.6.0](https://github.com/doreamonjs/doreamon/compare/v0.5.0...v0.6.0) (2022-09-03)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
75
|
+
|
|
76
|
+
# [0.5.0](https://github.com/doreamonjs/doreamon/compare/v0.4.5...v0.5.0) (2022-09-02)
|
|
77
|
+
|
|
78
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
79
|
+
|
|
80
|
+
## [0.4.2](https://github.com/doreamonjs/doreamon/compare/v0.4.1...v0.4.2) (2022-08-31)
|
|
81
|
+
|
|
82
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
83
|
+
|
|
84
|
+
## [0.4.1](https://github.com/doreamonjs/doreamon/compare/v0.4.0...v0.4.1) (2022-08-31)
|
|
85
|
+
|
|
86
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
87
|
+
|
|
88
|
+
# [0.4.0](https://github.com/doreamonjs/doreamon/compare/v0.3.17...v0.4.0) (2022-08-31)
|
|
89
|
+
|
|
90
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
91
|
+
|
|
92
|
+
## [0.3.16](https://github.com/doreamonjs/doreamon/compare/v0.3.15...v0.3.16) (2022-08-31)
|
|
93
|
+
|
|
94
|
+
**Note:** Version bump only for package @doreamonjs/plugin-terminal
|
|
95
|
+
|
|
96
|
+
## [0.3.15](https://github.com/doreamonjs/doreamon/compare/v0.3.14...v0.3.15) (2022-08-31)
|
|
97
|
+
|
|
98
|
+
### Bug Fixes
|
|
99
|
+
|
|
100
|
+
- merge confict and clean changelog ([b5b0428](https://github.com/doreamonjs/doreamon/commit/b5b042803ef660e6c8faf214bd24fc27934deb91))
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Eason
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/lib/constants.js
ADDED
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./types"), exports);
|
|
14
|
+
__exportStar(require("./constants"), exports);
|
|
15
|
+
__exportStar(require("./model"), exports);
|
|
16
|
+
__exportStar(require("./service"), exports);
|
|
17
|
+
__exportStar(require("./instance"), exports);
|
package/lib/instance.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.service = exports.model = void 0;
|
|
4
|
+
const model_1 = require("./model");
|
|
5
|
+
const service_1 = require("./service");
|
|
6
|
+
exports.model = new model_1.Model();
|
|
7
|
+
exports.service = new service_1.Service();
|
package/lib/model.d.ts
ADDED
package/lib/model.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Model = void 0;
|
|
4
|
+
const doreamon_1 = require("@zodash/doreamon");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
class Model {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
this.options = options;
|
|
9
|
+
}
|
|
10
|
+
get namespace() {
|
|
11
|
+
return constants_1.NAMESPACE;
|
|
12
|
+
}
|
|
13
|
+
build() {
|
|
14
|
+
return {
|
|
15
|
+
namespace: constants_1.NAMESPACE,
|
|
16
|
+
state: {
|
|
17
|
+
visible: false,
|
|
18
|
+
attributes: {
|
|
19
|
+
title: '终端',
|
|
20
|
+
},
|
|
21
|
+
datasets: {
|
|
22
|
+
values: {}, // data is here
|
|
23
|
+
},
|
|
24
|
+
// callback function
|
|
25
|
+
callback: null,
|
|
26
|
+
},
|
|
27
|
+
reducers: {
|
|
28
|
+
save: (state, { payload }) => ({ ...state, ...payload }),
|
|
29
|
+
'value/change'(state, { payload }) {
|
|
30
|
+
return { ...state, datasets: { ...state.datasets, ...payload } };
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
effects: {
|
|
34
|
+
// ui
|
|
35
|
+
*open({ payload }, { select, put, call }) {
|
|
36
|
+
const visible = yield select((state) => state[constants_1.NAMESPACE].visible);
|
|
37
|
+
if (visible) {
|
|
38
|
+
return yield put({
|
|
39
|
+
type: 'queue/in',
|
|
40
|
+
payload,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const { attributes, datasets = {}, callback, } = payload || {};
|
|
44
|
+
const { target } = attributes || {};
|
|
45
|
+
if (callback) {
|
|
46
|
+
callback(null, 'open');
|
|
47
|
+
}
|
|
48
|
+
else if (!target) {
|
|
49
|
+
throw new Error(`require attributes.target`);
|
|
50
|
+
}
|
|
51
|
+
else if (!(datasets === null || datasets === void 0 ? void 0 : datasets.values)) {
|
|
52
|
+
throw new Error(`require datasets.values`);
|
|
53
|
+
}
|
|
54
|
+
yield put({
|
|
55
|
+
type: 'save',
|
|
56
|
+
payload: {
|
|
57
|
+
visible: true,
|
|
58
|
+
attributes,
|
|
59
|
+
datasets,
|
|
60
|
+
//
|
|
61
|
+
callback,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
*cancel(action, { select, put }) {
|
|
66
|
+
const { callback } = yield select((state) => state.confirms);
|
|
67
|
+
yield put({ type: 'save', payload: { visible: false } });
|
|
68
|
+
callback === null || callback === void 0 ? void 0 : callback(null, 'cancel');
|
|
69
|
+
yield put({ type: 'queue/out' });
|
|
70
|
+
},
|
|
71
|
+
// data
|
|
72
|
+
*submit({ payload: { values: updates } }, { select, put, call, take }) {
|
|
73
|
+
var _a;
|
|
74
|
+
const { attributes, datasets: originals, callback, } = yield select((state) => state[constants_1.NAMESPACE]);
|
|
75
|
+
const { target } = attributes || {};
|
|
76
|
+
if (callback) {
|
|
77
|
+
//
|
|
78
|
+
}
|
|
79
|
+
else if (!target) {
|
|
80
|
+
throw new Error(`require attributes.target`);
|
|
81
|
+
}
|
|
82
|
+
const { namespace, effect, props } = target || {};
|
|
83
|
+
const nextEffect = `${namespace}/${effect}`;
|
|
84
|
+
const datasets = doreamon_1.default.immer.produce(originals, (draft) => {
|
|
85
|
+
draft.values = {
|
|
86
|
+
...originals.values,
|
|
87
|
+
...updates,
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
yield put({ type: 'save', payload: { datasets } });
|
|
91
|
+
// @TODO business
|
|
92
|
+
yield call(doreamon_1.default.delay, 300);
|
|
93
|
+
if (callback) {
|
|
94
|
+
yield put({ type: 'close' });
|
|
95
|
+
callback(null, 'ok', (_a = datasets) === null || _a === void 0 ? void 0 : _a.values);
|
|
96
|
+
yield put({ type: 'queue/out' });
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
yield put({ ...props, type: nextEffect, payload: datasets });
|
|
100
|
+
yield take(`${nextEffect}/@@end`);
|
|
101
|
+
yield put({ type: 'close' });
|
|
102
|
+
yield put({ type: 'queue/out' });
|
|
103
|
+
},
|
|
104
|
+
//
|
|
105
|
+
*close(action, { put }) {
|
|
106
|
+
yield put({ type: 'save', payload: { visible: false } });
|
|
107
|
+
yield put({ type: 'queue/out' });
|
|
108
|
+
},
|
|
109
|
+
//
|
|
110
|
+
*'queue/in'({ payload }, { select, put }) {
|
|
111
|
+
const state = yield select((state) => state[constants_1.NAMESPACE]);
|
|
112
|
+
yield put({
|
|
113
|
+
type: 'save',
|
|
114
|
+
payload: {
|
|
115
|
+
...state,
|
|
116
|
+
queue: !state.queue ? [payload] : [...state.queue, payload],
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
*'queue/out'(action, { select, put, call }) {
|
|
121
|
+
yield call(doreamon_1.default.delay, 500);
|
|
122
|
+
const { queue } = yield select((state) => state[constants_1.NAMESPACE]);
|
|
123
|
+
if ((queue === null || queue === void 0 ? void 0 : queue.length) > 0) {
|
|
124
|
+
yield put({
|
|
125
|
+
type: 'save',
|
|
126
|
+
payload: {
|
|
127
|
+
queue: queue.slice(1),
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
yield put({
|
|
131
|
+
type: 'open',
|
|
132
|
+
payload: queue[0],
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
toDva() {
|
|
140
|
+
return this.build();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.Model = Model;
|
package/lib/service.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface OpenConfig {
|
|
2
|
+
type?: 'drawer' | 'modal';
|
|
3
|
+
values?: any;
|
|
4
|
+
onError?: (err: any) => void;
|
|
5
|
+
onOpen?: () => void;
|
|
6
|
+
onOk?: (values: any) => void;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class Service {
|
|
10
|
+
private logger;
|
|
11
|
+
get namespace(): string;
|
|
12
|
+
private dispatch;
|
|
13
|
+
open(log: string, cfg: OpenConfig): void;
|
|
14
|
+
close(): void;
|
|
15
|
+
}
|
package/lib/service.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Service = void 0;
|
|
4
|
+
const shared = require("@doreamonjs/plugin-shared");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
class Service {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.logger = shared.logger;
|
|
9
|
+
}
|
|
10
|
+
get namespace() {
|
|
11
|
+
return constants_1.NAMESPACE;
|
|
12
|
+
}
|
|
13
|
+
dispatch(type, payload) {
|
|
14
|
+
shared.store.dispatch({
|
|
15
|
+
type: `${constants_1.NAMESPACE}/${type}`,
|
|
16
|
+
payload,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
open(log, cfg) {
|
|
20
|
+
const { values, ...attributes } = cfg;
|
|
21
|
+
this.dispatch('open', {
|
|
22
|
+
attributes,
|
|
23
|
+
datasets: {
|
|
24
|
+
values: {
|
|
25
|
+
log,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
//
|
|
29
|
+
callback: (err, status, values) => {
|
|
30
|
+
var _a, _b, _c, _d;
|
|
31
|
+
if (err) {
|
|
32
|
+
return (_a = cfg.onError) === null || _a === void 0 ? void 0 : _a.call(cfg, err);
|
|
33
|
+
}
|
|
34
|
+
switch (status) {
|
|
35
|
+
case 'open':
|
|
36
|
+
return (_b = cfg.onOpen) === null || _b === void 0 ? void 0 : _b.call(cfg);
|
|
37
|
+
case 'ok':
|
|
38
|
+
return (_c = cfg.onOk) === null || _c === void 0 ? void 0 : _c.call(cfg, values);
|
|
39
|
+
case 'cancel':
|
|
40
|
+
return (_d = cfg.onCancel) === null || _d === void 0 ? void 0 : _d.call(cfg);
|
|
41
|
+
default:
|
|
42
|
+
throw new Error(`unknown status: ${status}`);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
close() {
|
|
48
|
+
this.dispatch('close');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.Service = Service;
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface State {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
attributes: Attributes;
|
|
4
|
+
datasets: Datasets;
|
|
5
|
+
queue: State[];
|
|
6
|
+
callback?: (err: Error | null, type: 'open' | 'close' | 'cancel' | 'ok', vallues?: any) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface Attributes {
|
|
9
|
+
type?: Type;
|
|
10
|
+
title?: string;
|
|
11
|
+
target: AttributeTarget;
|
|
12
|
+
}
|
|
13
|
+
export interface Datasets {
|
|
14
|
+
values: object;
|
|
15
|
+
}
|
|
16
|
+
export interface AttributeTarget {
|
|
17
|
+
namespace: string;
|
|
18
|
+
effect: string;
|
|
19
|
+
props: any;
|
|
20
|
+
}
|
|
21
|
+
export declare type Type = 'modal' | 'drawer';
|
package/lib/types.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@doreamonjs/plugin-terminal",
|
|
3
|
+
"version": "1.9.30",
|
|
4
|
+
"description": "log plugin for doreamonjs",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"doreamonjs",
|
|
7
|
+
"plugin"
|
|
8
|
+
],
|
|
9
|
+
"author": "whatwewant <tobewhatwewant@gmail.com>",
|
|
10
|
+
"homepage": "https://github.com/doreamonjs/doreamon#readme",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"main": "lib/index.js",
|
|
13
|
+
"typings": "lib/index.d.ts",
|
|
14
|
+
"directories": {
|
|
15
|
+
"lib": "lib"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"lib"
|
|
19
|
+
],
|
|
20
|
+
"jest": {
|
|
21
|
+
"roots": [
|
|
22
|
+
"__tests__"
|
|
23
|
+
],
|
|
24
|
+
"transform": {
|
|
25
|
+
"^.+\\.tsx?$": "ts-jest"
|
|
26
|
+
},
|
|
27
|
+
"testRegex": ".*\\.(spec|test)\\.(ts|tsx)$",
|
|
28
|
+
"moduleDirectories": [
|
|
29
|
+
"node_modules",
|
|
30
|
+
"src"
|
|
31
|
+
],
|
|
32
|
+
"moduleFileExtensions": [
|
|
33
|
+
"ts",
|
|
34
|
+
"tsx",
|
|
35
|
+
"js",
|
|
36
|
+
"jsx"
|
|
37
|
+
],
|
|
38
|
+
"coverageDirectory": "./coverage/",
|
|
39
|
+
"collectCoverage": true,
|
|
40
|
+
"collectCoverageFrom": [
|
|
41
|
+
"src/**/*.{ts,tsx}"
|
|
42
|
+
],
|
|
43
|
+
"coverageThreshold": {
|
|
44
|
+
"global": {
|
|
45
|
+
"branches": 60,
|
|
46
|
+
"functions": 60,
|
|
47
|
+
"lines": 60,
|
|
48
|
+
"statements": -10
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "git+https://github.com/doreamonjs/doreamon.git"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "tsc",
|
|
61
|
+
"test": "jest -w 1",
|
|
62
|
+
"coverage": "codecov"
|
|
63
|
+
},
|
|
64
|
+
"bugs": {
|
|
65
|
+
"url": "https://github.com/doreamonjs/doreamon/issues"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@doreamonjs/plugin-shared": "^1.1.28",
|
|
69
|
+
"@doreamonjs/request": "^1.2.13",
|
|
70
|
+
"@sentry/browser": "^7.11.1",
|
|
71
|
+
"@sentry/tracing": "^7.11.1",
|
|
72
|
+
"@zcorky/delay": "^1.0.1",
|
|
73
|
+
"@zcorky/query-string": "^1.0.2",
|
|
74
|
+
"@zodash/doreamon": "^1.1.5",
|
|
75
|
+
"dva": "^2.4.1",
|
|
76
|
+
"immer": "^9.0.15",
|
|
77
|
+
"mixpanel-browser": "^2.45.0",
|
|
78
|
+
"thinkingdata-browser": "^1.6.0"
|
|
79
|
+
},
|
|
80
|
+
"gitHead": "a4453b6b8437218ba86bc47f532c9cbd3ca23bc6"
|
|
81
|
+
}
|