piral-core 0.15.0-alpha.3640 → 0.15.0-alpha.3719
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/esm/components/ErrorBoundary.js +2 -1
- package/esm/components/ErrorBoundary.js.map +1 -1
- package/esm/types/components.d.ts +12 -0
- package/lib/components/ErrorBoundary.js +2 -1
- package/lib/components/ErrorBoundary.js.map +1 -1
- package/lib/types/components.d.ts +12 -0
- package/package.json +5 -4
- package/src/components/ErrorBoundary.tsx +2 -1
- package/src/types/components.ts +12 -0
|
@@ -24,7 +24,8 @@ export class ErrorBoundary extends React.Component {
|
|
|
24
24
|
const { error } = this.state;
|
|
25
25
|
const rest = renderProps;
|
|
26
26
|
if (error) {
|
|
27
|
-
|
|
27
|
+
const pilet = piral.meta.name;
|
|
28
|
+
return React.createElement(PiralError, Object.assign({ type: errorType, error: error, pilet: pilet }, rest));
|
|
28
29
|
}
|
|
29
30
|
return React.createElement(React.Suspense, { fallback: React.createElement(PiralLoadingIndicator, null) }, children);
|
|
30
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAqBjE;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAA1F;;QACE,UAAK,GAAG;YACN,KAAK,EAAE,SAAS;SACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAqBjE;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAA1F;;QACE,UAAK,GAAG;YACN,KAAK,EAAE,SAAS;SACjB,CAAC;IAwBJ,CAAC;IAtBC,iBAAiB,CAAC,KAAY;QAC5B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACxC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,qCAAqC,SAAS,IAAI,EAAE,KAAK,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,MAAM,KAAiD,IAAI,CAAC,KAAK,EAA3D,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,OAA+B,EAA1B,WAAW,cAA5C,kCAA8C,CAAa,CAAC;QAClE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,MAAM,IAAI,GAAQ,WAAW,CAAC;QAE9B,IAAI,KAAK,EAAE;YACT,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9B,OAAO,oBAAC,UAAU,kBAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAM,IAAI,EAAI,CAAC;SAC9E;QAED,OAAO,oBAAC,KAAK,CAAC,QAAQ,IAAC,QAAQ,EAAE,oBAAC,qBAAqB,OAAG,IAAG,QAAQ,CAAkB,CAAC;IAC1F,CAAC;CACF"}
|
|
@@ -81,6 +81,10 @@ export interface PageErrorInfoProps extends RouteComponentProps {
|
|
|
81
81
|
* The provided error details.
|
|
82
82
|
*/
|
|
83
83
|
error: any;
|
|
84
|
+
/**
|
|
85
|
+
* The name of the pilet emitting the error.
|
|
86
|
+
*/
|
|
87
|
+
pilet?: string;
|
|
84
88
|
}
|
|
85
89
|
/**
|
|
86
90
|
* The error used when the app could not be loaded.
|
|
@@ -107,6 +111,10 @@ export interface ExtensionErrorInfoProps {
|
|
|
107
111
|
* The provided error details.
|
|
108
112
|
*/
|
|
109
113
|
error: any;
|
|
114
|
+
/**
|
|
115
|
+
* The name of the pilet emitting the error.
|
|
116
|
+
*/
|
|
117
|
+
pilet?: string;
|
|
110
118
|
}
|
|
111
119
|
/**
|
|
112
120
|
* The error used when the exact type is unknown.
|
|
@@ -120,6 +128,10 @@ export interface UnknownErrorInfoProps {
|
|
|
120
128
|
* The provided error details.
|
|
121
129
|
*/
|
|
122
130
|
error: any;
|
|
131
|
+
/**
|
|
132
|
+
* The name of the pilet emitting the error.
|
|
133
|
+
*/
|
|
134
|
+
pilet?: string;
|
|
123
135
|
}
|
|
124
136
|
/**
|
|
125
137
|
* Map of all error types to their respective props.
|
|
@@ -27,7 +27,8 @@ class ErrorBoundary extends React.Component {
|
|
|
27
27
|
const { error } = this.state;
|
|
28
28
|
const rest = renderProps;
|
|
29
29
|
if (error) {
|
|
30
|
-
|
|
30
|
+
const pilet = piral.meta.name;
|
|
31
|
+
return React.createElement(components_1.PiralError, Object.assign({ type: errorType, error: error, pilet: pilet }, rest));
|
|
31
32
|
}
|
|
32
33
|
return React.createElement(React.Suspense, { fallback: React.createElement(components_1.PiralLoadingIndicator, null) }, children);
|
|
33
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,6CAAiE;AAqBjE;;GAEG;AACH,MAAa,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAA1F;;QACE,UAAK,GAAG;YACN,KAAK,EAAE,SAAS;SACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/components/ErrorBoundary.tsx"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,6CAAiE;AAqBjE;;GAEG;AACH,MAAa,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAA1F;;QACE,UAAK,GAAG;YACN,KAAK,EAAE,SAAS;SACjB,CAAC;IAwBJ,CAAC;IAtBC,iBAAiB,CAAC,KAAY;QAC5B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACxC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,qCAAqC,SAAS,IAAI,EAAE,KAAK,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC;YACZ,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,MAAM,KAAiD,IAAI,CAAC,KAAK,EAA3D,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,OAA+B,EAA1B,WAAW,2BAA5C,kCAA8C,CAAa,CAAC;QAClE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,MAAM,IAAI,GAAQ,WAAW,CAAC;QAE9B,IAAI,KAAK,EAAE;YACT,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9B,OAAO,oBAAC,uBAAU,kBAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAM,IAAI,EAAI,CAAC;SAC9E;QAED,OAAO,oBAAC,KAAK,CAAC,QAAQ,IAAC,QAAQ,EAAE,oBAAC,kCAAqB,OAAG,IAAG,QAAQ,CAAkB,CAAC;IAC1F,CAAC;CACF;AA3BD,sCA2BC"}
|
|
@@ -81,6 +81,10 @@ export interface PageErrorInfoProps extends RouteComponentProps {
|
|
|
81
81
|
* The provided error details.
|
|
82
82
|
*/
|
|
83
83
|
error: any;
|
|
84
|
+
/**
|
|
85
|
+
* The name of the pilet emitting the error.
|
|
86
|
+
*/
|
|
87
|
+
pilet?: string;
|
|
84
88
|
}
|
|
85
89
|
/**
|
|
86
90
|
* The error used when the app could not be loaded.
|
|
@@ -107,6 +111,10 @@ export interface ExtensionErrorInfoProps {
|
|
|
107
111
|
* The provided error details.
|
|
108
112
|
*/
|
|
109
113
|
error: any;
|
|
114
|
+
/**
|
|
115
|
+
* The name of the pilet emitting the error.
|
|
116
|
+
*/
|
|
117
|
+
pilet?: string;
|
|
110
118
|
}
|
|
111
119
|
/**
|
|
112
120
|
* The error used when the exact type is unknown.
|
|
@@ -120,6 +128,10 @@ export interface UnknownErrorInfoProps {
|
|
|
120
128
|
* The provided error details.
|
|
121
129
|
*/
|
|
122
130
|
error: any;
|
|
131
|
+
/**
|
|
132
|
+
* The name of the pilet emitting the error.
|
|
133
|
+
*/
|
|
134
|
+
pilet?: string;
|
|
123
135
|
}
|
|
124
136
|
/**
|
|
125
137
|
* Map of all error types to their respective props.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-core",
|
|
3
|
-
"version": "0.15.0-alpha.
|
|
3
|
+
"version": "0.15.0-alpha.3719",
|
|
4
4
|
"description": "The core library for creating a Piral instance.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"portal",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"url": "https://github.com/smapiot/piral/issues"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
+
"cleanup": "rimraf esm lib",
|
|
42
43
|
"build": "yarn build:commonjs && yarn build:esnext",
|
|
43
44
|
"build:commonjs": "tsc --project tsconfig.json --outDir lib --module commonjs",
|
|
44
45
|
"build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext",
|
|
@@ -47,8 +48,8 @@
|
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@dbeining/react-atom": "^4.0.0",
|
|
50
|
-
"piral-base": "0.15.0-alpha.
|
|
51
|
-
"piral-debug-utils": "0.15.0-alpha.
|
|
51
|
+
"piral-base": "0.15.0-alpha.3719",
|
|
52
|
+
"piral-debug-utils": "0.15.0-alpha.3719"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
55
|
"react": ">=16.8.0",
|
|
@@ -78,5 +79,5 @@
|
|
|
78
79
|
"@libre/atom",
|
|
79
80
|
"@dbeining/react-atom"
|
|
80
81
|
],
|
|
81
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "f40561b82bfc877ef475493779c4378ed67ebaa2"
|
|
82
83
|
}
|
|
@@ -44,7 +44,8 @@ export class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoun
|
|
|
44
44
|
const rest: any = renderProps;
|
|
45
45
|
|
|
46
46
|
if (error) {
|
|
47
|
-
|
|
47
|
+
const pilet = piral.meta.name;
|
|
48
|
+
return <PiralError type={errorType} error={error} pilet={pilet} {...rest} />;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
return <React.Suspense fallback={<PiralLoadingIndicator />}>{children}</React.Suspense>;
|
package/src/types/components.ts
CHANGED
|
@@ -88,6 +88,10 @@ export interface PageErrorInfoProps extends RouteComponentProps {
|
|
|
88
88
|
* The provided error details.
|
|
89
89
|
*/
|
|
90
90
|
error: any;
|
|
91
|
+
/**
|
|
92
|
+
* The name of the pilet emitting the error.
|
|
93
|
+
*/
|
|
94
|
+
pilet?: string;
|
|
91
95
|
}
|
|
92
96
|
|
|
93
97
|
/**
|
|
@@ -116,6 +120,10 @@ export interface ExtensionErrorInfoProps {
|
|
|
116
120
|
* The provided error details.
|
|
117
121
|
*/
|
|
118
122
|
error: any;
|
|
123
|
+
/**
|
|
124
|
+
* The name of the pilet emitting the error.
|
|
125
|
+
*/
|
|
126
|
+
pilet?: string;
|
|
119
127
|
}
|
|
120
128
|
|
|
121
129
|
/**
|
|
@@ -130,6 +138,10 @@ export interface UnknownErrorInfoProps {
|
|
|
130
138
|
* The provided error details.
|
|
131
139
|
*/
|
|
132
140
|
error: any;
|
|
141
|
+
/**
|
|
142
|
+
* The name of the pilet emitting the error.
|
|
143
|
+
*/
|
|
144
|
+
pilet?: string;
|
|
133
145
|
}
|
|
134
146
|
|
|
135
147
|
/**
|