@shuvi/platform-shared 1.0.22 → 1.0.23

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.
@@ -15,9 +15,8 @@ export declare type ErrorSource = 'server';
15
15
  export interface IError {
16
16
  code?: number;
17
17
  message?: string;
18
- stack?: string;
19
- name?: string;
20
18
  source?: ErrorSource;
19
+ error?: Error;
21
20
  }
22
21
  export interface IErrorState {
23
22
  error: IError | null;
@@ -1,7 +1,7 @@
1
1
  import { IErrorState, IError } from '../applicationTypes';
2
2
  export declare const errorModelName = "error";
3
3
  export declare const errorModel: import("doura").DefineModel<IErrorState, {
4
- set(error?: IError): void;
4
+ set(error: IError): void;
5
5
  clear(): void;
6
6
  }, {
7
7
  errorObject(): IError | null;
@@ -1,5 +1,4 @@
1
1
  import { defineModel } from 'doura';
2
- import { SHUVI_ERROR } from '@shuvi/shared/constants';
3
2
  const DEFAULT_ERROR_STATE = {
4
3
  error: null
5
4
  };
@@ -7,7 +6,7 @@ export const errorModelName = 'error';
7
6
  export const errorModel = defineModel({
8
7
  state: DEFAULT_ERROR_STATE,
9
8
  actions: {
10
- set(error = SHUVI_ERROR.APP_ERROR) {
9
+ set(error) {
11
10
  this.error = error;
12
11
  },
13
12
  clear() {
@@ -15,9 +15,8 @@ export declare type ErrorSource = 'server';
15
15
  export interface IError {
16
16
  code?: number;
17
17
  message?: string;
18
- stack?: string;
19
- name?: string;
20
18
  source?: ErrorSource;
19
+ error?: Error;
21
20
  }
22
21
  export interface IErrorState {
23
22
  error: IError | null;
@@ -1,7 +1,7 @@
1
1
  import { IErrorState, IError } from '../applicationTypes';
2
2
  export declare const errorModelName = "error";
3
3
  export declare const errorModel: import("doura").DefineModel<IErrorState, {
4
- set(error?: IError): void;
4
+ set(error: IError): void;
5
5
  clear(): void;
6
6
  }, {
7
7
  errorObject(): IError | null;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.errorModel = exports.errorModelName = void 0;
4
4
  const doura_1 = require("doura");
5
- const constants_1 = require("@shuvi/shared/constants");
6
5
  const DEFAULT_ERROR_STATE = {
7
6
  error: null
8
7
  };
@@ -10,7 +9,7 @@ exports.errorModelName = 'error';
10
9
  exports.errorModel = (0, doura_1.defineModel)({
11
10
  state: DEFAULT_ERROR_STATE,
12
11
  actions: {
13
- set(error = constants_1.SHUVI_ERROR.APP_ERROR) {
12
+ set(error) {
14
13
  this.error = error;
15
14
  },
16
15
  clear() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/platform-shared",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/shuvijs/shuvi.git",
@@ -83,17 +83,17 @@
83
83
  "node": ">= 16.0.0"
84
84
  },
85
85
  "dependencies": {
86
- "@shuvi/hook": "1.0.22",
87
- "doura": "0.0.10",
88
- "@shuvi/router": "1.0.22",
89
- "@shuvi/runtime": "1.0.22",
90
- "@shuvi/shared": "1.0.22",
91
- "@shuvi/toolpack": "1.0.22",
92
- "@shuvi/utils": "1.0.22",
86
+ "@shuvi/hook": "1.0.23",
87
+ "doura": "0.0.11",
88
+ "@shuvi/router": "1.0.23",
89
+ "@shuvi/runtime": "1.0.23",
90
+ "@shuvi/shared": "1.0.23",
91
+ "@shuvi/toolpack": "1.0.23",
92
+ "@shuvi/utils": "1.0.23",
93
93
  "redux": "4.1.2"
94
94
  },
95
95
  "peerDependencies": {
96
- "@shuvi/service": "1.0.22"
96
+ "@shuvi/service": "1.0.23"
97
97
  },
98
98
  "devDependencies": {
99
99
  "@shuvi/service": "workspace:*",