@kevisual/cnb 0.0.28 → 0.0.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/agent/routes/workspace/keep-file-live.ts +114 -0
- package/agent/routes/workspace/keep.ts +33 -170
- package/dist/keep.js +14 -14
- package/dist/opencode.js +474 -3809
- package/dist/routes.d.ts +21 -1
- package/dist/routes.js +602 -3945
- package/package.json +6 -5
- package/src/cnb-core.ts +1 -1
- package/src/user/index.ts +12 -0
- package/src/workspace/index.ts +55 -0
- package/src/workspace/keep-file-live.ts +136 -0
package/dist/routes.d.ts
CHANGED
|
@@ -136,6 +136,19 @@ declare class Workspace extends CNBCore {
|
|
|
136
136
|
/** 如果存在开发环境,则返回 WebIDE 访问 url;如果不存在开发环境,则返回启动云原生开发的 loading 页面 url 地址 */
|
|
137
137
|
url: string;
|
|
138
138
|
}>>;
|
|
139
|
+
/**
|
|
140
|
+
* 添加使用cookie获取工作空间访问权限的功能,适用于需要保持工作空间连接状态的场景,
|
|
141
|
+
* 例如使用 WebSocket 连接工作空间时需要携带 cookie 进行身份验证。
|
|
142
|
+
* https://cnb.cool/kevisual/dev-env/-/workspace/vscode-web/cnb-708-1ji9sog7o-001
|
|
143
|
+
* @param repo
|
|
144
|
+
* @param pipelineId
|
|
145
|
+
* @returns
|
|
146
|
+
*/
|
|
147
|
+
getWorkspaceCookie(repo: string, pipelineId: string): Promise<Result$1<{
|
|
148
|
+
value: string;
|
|
149
|
+
cookie: string;
|
|
150
|
+
cookieName: string;
|
|
151
|
+
}>>;
|
|
139
152
|
}
|
|
140
153
|
interface WorkspaceLinkDetail {
|
|
141
154
|
codebuddy: string;
|
|
@@ -378,6 +391,11 @@ declare class User extends CNBCore {
|
|
|
378
391
|
* @returns
|
|
379
392
|
*/
|
|
380
393
|
getCurrentUser(): Promise<Result$2<UserInfo>>;
|
|
394
|
+
/**
|
|
395
|
+
* 判断当前 Cookie 是否有效
|
|
396
|
+
* @returns
|
|
397
|
+
*/
|
|
398
|
+
checkCookieValid(): Promise<Result$2>;
|
|
381
399
|
/**
|
|
382
400
|
* 使用 Token 获取用户信息
|
|
383
401
|
* @returns
|
|
@@ -778,6 +796,8 @@ declare const config: {
|
|
|
778
796
|
KUBECONFIG_DATA?: string;
|
|
779
797
|
};
|
|
780
798
|
declare const cnb: CNB;
|
|
781
|
-
declare const app: QueryRouterServer
|
|
799
|
+
declare const app: QueryRouterServer<{
|
|
800
|
+
[x: string]: any;
|
|
801
|
+
}>;
|
|
782
802
|
|
|
783
803
|
export { app, cnb, config };
|