@pisell/core 1.0.71 → 1.0.73
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/es/app/app.d.ts +2 -2
- package/es/app/app.js +1 -1
- package/es/history/index.d.ts +1 -1
- package/es/request/index.d.ts +1 -1
- package/es/request/utils.js +3 -2
- package/es/routes/index.d.ts +2 -2
- package/lib/app/app.d.ts +2 -2
- package/lib/app/app.js +1 -1
- package/lib/history/index.d.ts +1 -1
- package/lib/request/index.d.ts +1 -1
- package/lib/request/utils.js +3 -2
- package/lib/routes/index.d.ts +2 -2
- package/package.json +1 -1
package/es/app/app.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export interface AppOptions {
|
|
|
31
31
|
cmd?: CMDOptions;
|
|
32
32
|
aws?: AWSOptions;
|
|
33
33
|
getPisellos?: () => any;
|
|
34
|
-
sqlite?: (
|
|
34
|
+
sqlite?: () => any;
|
|
35
35
|
}
|
|
36
36
|
declare class App {
|
|
37
37
|
private static instance;
|
|
@@ -55,7 +55,7 @@ declare class App {
|
|
|
55
55
|
remove: (url: string, data: any, config: import("../request").RequestSetting | undefined) => Promise<any>;
|
|
56
56
|
custom: (url: string, config: import("../request").RequestSetting | undefined) => any;
|
|
57
57
|
sse: <TMeta = import("../request/sse").SSEMetaData, TData = import("../request/sse").SSEDataPayload<any>, TComplete = import("../request/sse").SSECompletePayload>(url: string, data: Record<string, any> | undefined, config: import("../request").RequestSetting & {
|
|
58
|
-
method?: "
|
|
58
|
+
method?: "POST" | "GET" | undefined;
|
|
59
59
|
actions?: import("../request/sse").SSEActions<TMeta, TData, TComplete> | undefined;
|
|
60
60
|
}) => Promise<() => void>;
|
|
61
61
|
setConfig: (newConfig: Partial<import("../request").RequestConfig>) => void;
|
package/es/app/app.js
CHANGED
|
@@ -97,7 +97,7 @@ var App = /*#__PURE__*/function () {
|
|
|
97
97
|
this.aws = new AWS(this, options === null || options === void 0 ? void 0 : options.aws);
|
|
98
98
|
this.getPisellos = options === null || options === void 0 ? void 0 : options.getPisellos;
|
|
99
99
|
if (options !== null && options !== void 0 && options.sqlite) {
|
|
100
|
-
this.sqlite = options.sqlite(
|
|
100
|
+
this.sqlite = options.sqlite();
|
|
101
101
|
}
|
|
102
102
|
if (options !== null && options !== void 0 && options.constants) {
|
|
103
103
|
this.constants = options.constants || {};
|
package/es/history/index.d.ts
CHANGED
package/es/request/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare const _default: {
|
|
|
24
24
|
remove: (url: string, data: any, config: RequestSetting | undefined) => Promise<any>;
|
|
25
25
|
custom: (url: string, config: RequestSetting | undefined) => any;
|
|
26
26
|
sse: <TMeta = SSEMetaData, TData = SSEDataPayload<any>, TComplete = SSECompletePayload>(url: string, data: Record<string, any> | undefined, config: RequestSetting & {
|
|
27
|
-
method?: "
|
|
27
|
+
method?: "POST" | "GET" | undefined;
|
|
28
28
|
actions?: SSEActions<TMeta, TData, TComplete> | undefined;
|
|
29
29
|
}) => Promise<() => void>;
|
|
30
30
|
setConfig: (newConfig: Partial<RequestConfig>) => void;
|
package/es/request/utils.js
CHANGED
|
@@ -91,10 +91,11 @@ export var interceptorsResponse = function interceptorsResponse(response) {
|
|
|
91
91
|
|
|
92
92
|
// 置换token
|
|
93
93
|
var Authorization = response.headers['Authorization'];
|
|
94
|
-
|
|
94
|
+
var authorization = response.headers['authorization'];
|
|
95
|
+
if (Authorization || authorization) {
|
|
95
96
|
var _getConfig4 = getConfig(),
|
|
96
97
|
setToken = _getConfig4.setToken;
|
|
97
|
-
setToken === null || setToken === void 0 || setToken(Authorization);
|
|
98
|
+
setToken === null || setToken === void 0 || setToken(Authorization || authorization);
|
|
98
99
|
}
|
|
99
100
|
if (_interceptorsResponse) {
|
|
100
101
|
return _interceptorsResponse(response);
|
package/es/routes/index.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ export declare class RouterManager {
|
|
|
20
20
|
get(name: string): RouteType;
|
|
21
21
|
has(name: string): boolean;
|
|
22
22
|
remove(name: string): void;
|
|
23
|
-
renderComponent(item: RouteType, children?: React.ReactNode): string | number | boolean | React.
|
|
23
|
+
renderComponent(item: RouteType, children?: React.ReactNode): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
24
24
|
getPageByRoute(route: string): ApplicationInterface | undefined;
|
|
25
25
|
getRouterComponent({ fallback }: {
|
|
26
26
|
fallback?: React.ReactNode;
|
|
27
|
-
}): JSX.Element[];
|
|
27
|
+
}): React.JSX.Element[];
|
|
28
28
|
}
|
package/lib/app/app.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export interface AppOptions {
|
|
|
31
31
|
cmd?: CMDOptions;
|
|
32
32
|
aws?: AWSOptions;
|
|
33
33
|
getPisellos?: () => any;
|
|
34
|
-
sqlite?: (
|
|
34
|
+
sqlite?: () => any;
|
|
35
35
|
}
|
|
36
36
|
declare class App {
|
|
37
37
|
private static instance;
|
|
@@ -55,7 +55,7 @@ declare class App {
|
|
|
55
55
|
remove: (url: string, data: any, config: import("../request").RequestSetting | undefined) => Promise<any>;
|
|
56
56
|
custom: (url: string, config: import("../request").RequestSetting | undefined) => any;
|
|
57
57
|
sse: <TMeta = import("../request/sse").SSEMetaData, TData = import("../request/sse").SSEDataPayload<any>, TComplete = import("../request/sse").SSECompletePayload>(url: string, data: Record<string, any> | undefined, config: import("../request").RequestSetting & {
|
|
58
|
-
method?: "
|
|
58
|
+
method?: "POST" | "GET" | undefined;
|
|
59
59
|
actions?: import("../request/sse").SSEActions<TMeta, TData, TComplete> | undefined;
|
|
60
60
|
}) => Promise<() => void>;
|
|
61
61
|
setConfig: (newConfig: Partial<import("../request").RequestConfig>) => void;
|
package/lib/app/app.js
CHANGED
|
@@ -123,7 +123,7 @@ var App = class _App {
|
|
|
123
123
|
this.aws = new import_aws.default(this, options == null ? void 0 : options.aws);
|
|
124
124
|
this.getPisellos = options == null ? void 0 : options.getPisellos;
|
|
125
125
|
if (options == null ? void 0 : options.sqlite) {
|
|
126
|
-
this.sqlite = options.sqlite(
|
|
126
|
+
this.sqlite = options.sqlite();
|
|
127
127
|
}
|
|
128
128
|
if (options == null ? void 0 : options.constants) {
|
|
129
129
|
this.constants = options.constants || {};
|
package/lib/history/index.d.ts
CHANGED
package/lib/request/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare const _default: {
|
|
|
24
24
|
remove: (url: string, data: any, config: RequestSetting | undefined) => Promise<any>;
|
|
25
25
|
custom: (url: string, config: RequestSetting | undefined) => any;
|
|
26
26
|
sse: <TMeta = SSEMetaData, TData = SSEDataPayload<any>, TComplete = SSECompletePayload>(url: string, data: Record<string, any> | undefined, config: RequestSetting & {
|
|
27
|
-
method?: "
|
|
27
|
+
method?: "POST" | "GET" | undefined;
|
|
28
28
|
actions?: SSEActions<TMeta, TData, TComplete> | undefined;
|
|
29
29
|
}) => Promise<() => void>;
|
|
30
30
|
setConfig: (newConfig: Partial<RequestConfig>) => void;
|
package/lib/request/utils.js
CHANGED
|
@@ -64,9 +64,10 @@ var interceptorsRequestError = (err) => {
|
|
|
64
64
|
var interceptorsResponse = (response) => {
|
|
65
65
|
const _interceptorsResponse = (0, import_config.getConfig)().interceptorsResponse;
|
|
66
66
|
const Authorization = response.headers["Authorization"];
|
|
67
|
-
|
|
67
|
+
const authorization = response.headers["authorization"];
|
|
68
|
+
if (Authorization || authorization) {
|
|
68
69
|
const { setToken } = (0, import_config.getConfig)();
|
|
69
|
-
setToken == null ? void 0 : setToken(Authorization);
|
|
70
|
+
setToken == null ? void 0 : setToken(Authorization || authorization);
|
|
70
71
|
}
|
|
71
72
|
if (_interceptorsResponse) {
|
|
72
73
|
return _interceptorsResponse(response);
|
package/lib/routes/index.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ export declare class RouterManager {
|
|
|
20
20
|
get(name: string): RouteType;
|
|
21
21
|
has(name: string): boolean;
|
|
22
22
|
remove(name: string): void;
|
|
23
|
-
renderComponent(item: RouteType, children?: React.ReactNode): string | number | boolean | React.
|
|
23
|
+
renderComponent(item: RouteType, children?: React.ReactNode): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
24
24
|
getPageByRoute(route: string): ApplicationInterface | undefined;
|
|
25
25
|
getRouterComponent({ fallback }: {
|
|
26
26
|
fallback?: React.ReactNode;
|
|
27
|
-
}): JSX.Element[];
|
|
27
|
+
}): React.JSX.Element[];
|
|
28
28
|
}
|