@blocklet/js-sdk 1.16.33-beta-20241107-065332-b20666d2 → 1.16.33-beta-20241111-162739-f5906773
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/dist/index.d.mts +22 -3
- package/dist/index.d.ts +22 -3
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { Axios, AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { TTheme, TNavigationItem } from '@blocklet/meta/lib/types';
|
|
4
|
-
import * as _blocklet_meta_lib_blocklet from '@blocklet/meta/lib/blocklet';
|
|
5
4
|
import { TComponentInternalInfo } from '@blocklet/meta/lib/blocklet';
|
|
6
5
|
|
|
7
6
|
type UserPublicInfo = {
|
|
@@ -81,12 +80,32 @@ declare class TokenService {
|
|
|
81
80
|
removeRefreshToken(): void;
|
|
82
81
|
}
|
|
83
82
|
|
|
83
|
+
declare const BlockletStatus: Readonly<{
|
|
84
|
+
added: 0;
|
|
85
|
+
downloading: 1;
|
|
86
|
+
downloaded: 2;
|
|
87
|
+
installing: 3;
|
|
88
|
+
installed: 4;
|
|
89
|
+
starting: 5;
|
|
90
|
+
running: 6;
|
|
91
|
+
stopping: 7;
|
|
92
|
+
stopped: 8;
|
|
93
|
+
error: 9;
|
|
94
|
+
upgrading: 10;
|
|
95
|
+
restarting: 11;
|
|
96
|
+
corrupted: 12;
|
|
97
|
+
waiting: 13;
|
|
98
|
+
deleted: 14;
|
|
99
|
+
}>;
|
|
100
|
+
|
|
84
101
|
type RequestParams = {
|
|
85
102
|
lazy?: boolean;
|
|
86
103
|
lazyTime?: number;
|
|
87
104
|
componentDid?: string;
|
|
88
105
|
};
|
|
89
|
-
type BlockletComponent = TComponentInternalInfo
|
|
106
|
+
type BlockletComponent = TComponentInternalInfo & {
|
|
107
|
+
status: keyof typeof BlockletStatus;
|
|
108
|
+
};
|
|
90
109
|
type BlockletSettings = {
|
|
91
110
|
session: {
|
|
92
111
|
ttl: number;
|
|
@@ -210,7 +229,7 @@ declare class ComponentService {
|
|
|
210
229
|
constructor({ blocklet }?: {
|
|
211
230
|
blocklet?: Blocklet;
|
|
212
231
|
});
|
|
213
|
-
getComponent(name: string):
|
|
232
|
+
getComponent(name: string): BlockletComponent;
|
|
214
233
|
getComponentMountPoint(name?: string): string;
|
|
215
234
|
getUrl(name: string, ...parts: string[]): string;
|
|
216
235
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { Axios, AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { TTheme, TNavigationItem } from '@blocklet/meta/lib/types';
|
|
4
|
-
import * as _blocklet_meta_lib_blocklet from '@blocklet/meta/lib/blocklet';
|
|
5
4
|
import { TComponentInternalInfo } from '@blocklet/meta/lib/blocklet';
|
|
6
5
|
|
|
7
6
|
type UserPublicInfo = {
|
|
@@ -81,12 +80,32 @@ declare class TokenService {
|
|
|
81
80
|
removeRefreshToken(): void;
|
|
82
81
|
}
|
|
83
82
|
|
|
83
|
+
declare const BlockletStatus: Readonly<{
|
|
84
|
+
added: 0;
|
|
85
|
+
downloading: 1;
|
|
86
|
+
downloaded: 2;
|
|
87
|
+
installing: 3;
|
|
88
|
+
installed: 4;
|
|
89
|
+
starting: 5;
|
|
90
|
+
running: 6;
|
|
91
|
+
stopping: 7;
|
|
92
|
+
stopped: 8;
|
|
93
|
+
error: 9;
|
|
94
|
+
upgrading: 10;
|
|
95
|
+
restarting: 11;
|
|
96
|
+
corrupted: 12;
|
|
97
|
+
waiting: 13;
|
|
98
|
+
deleted: 14;
|
|
99
|
+
}>;
|
|
100
|
+
|
|
84
101
|
type RequestParams = {
|
|
85
102
|
lazy?: boolean;
|
|
86
103
|
lazyTime?: number;
|
|
87
104
|
componentDid?: string;
|
|
88
105
|
};
|
|
89
|
-
type BlockletComponent = TComponentInternalInfo
|
|
106
|
+
type BlockletComponent = TComponentInternalInfo & {
|
|
107
|
+
status: keyof typeof BlockletStatus;
|
|
108
|
+
};
|
|
90
109
|
type BlockletSettings = {
|
|
91
110
|
session: {
|
|
92
111
|
ttl: number;
|
|
@@ -210,7 +229,7 @@ declare class ComponentService {
|
|
|
210
229
|
constructor({ blocklet }?: {
|
|
211
230
|
blocklet?: Blocklet;
|
|
212
231
|
});
|
|
213
|
-
getComponent(name: string):
|
|
232
|
+
getComponent(name: string): BlockletComponent;
|
|
214
233
|
getComponentMountPoint(name?: string): string;
|
|
215
234
|
getUrl(name: string, ...parts: string[]): string;
|
|
216
235
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/js-sdk",
|
|
3
|
-
"version": "1.16.33-beta-
|
|
3
|
+
"version": "1.16.33-beta-20241111-162739-f5906773",
|
|
4
4
|
"main": "dist/index.mjs",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"watch": "nodemon -w src -e ts -x 'npm run build'"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/constant": "1.16.33-beta-
|
|
36
|
-
"@blocklet/meta": "1.16.33-beta-
|
|
35
|
+
"@abtnode/constant": "1.16.33-beta-20241111-162739-f5906773",
|
|
36
|
+
"@blocklet/meta": "1.16.33-beta-20241111-162739-f5906773",
|
|
37
37
|
"axios": "^1.7.5",
|
|
38
38
|
"is-url": "^1.2.4",
|
|
39
39
|
"js-cookie": "^3.0.5",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"unbuild": "^2.0.0",
|
|
46
46
|
"vitest": "^2.0.5"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "de1be92a37cd504e82b3d963b5b4d5302ecbb887"
|
|
49
49
|
}
|