Skip to content

Commit 7e14add

Browse files
author
winjo
committed
chore: 暴露 webview-script oss 地址
1 parent 07566d2 commit 7e14add

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

packages/alex/src/core/env.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export const WEBVIEW_ENDPOINT = __WEBVIEW_ENDPOINT__;
1313
*/
1414
export const WEBVIEW_ENDPOINT_INTERNAL = __WEBVIEW_ENDPOINT_INTERNAL__;
1515

16+
/**
17+
* webview 脚本 url
18+
*/
19+
export const WEBVIEW_SCRIPT = __WEBVIEW_SCRIPT__;
20+
1621
/**
1722
* alex version
1823
*/

packages/cli/src/commander.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const extensionProgram = program
1111
`
1212
install kaitian extensions, you should config in package.json firstly, example:
1313
{
14-
"kaitianExtensions": {
14+
"cloudideExtensions": {
1515
"publisher": "kaitian",
1616
"name": "ide-dark-theme",
1717
"version": "2.0.0"

packages/toolkit/webpack/config.integration.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,8 @@ module.exports = (option) => {
207207
__WEBVIEW_ENDPOINT__: process.env.WEBVIEW_ENDPOINT
208208
? JSON.stringify(`/assets/~${process.env.WEBVIEW_ENDPOINT}`)
209209
: JSON.stringify(`${baseURL}/${config.webviewEntry}`),
210-
__WEBVIEW_ENDPOINT_INTERNAL__: process.env.WEBVIEW_ENDPOINT_INTERNAL
211-
? JSON.stringify(`/assets/~${process.env.WEBVIEW_ENDPOINT_INTERNAL}`)
212-
: JSON.stringify(`${baseURL}/${config.webviewEntry}`),
210+
__WEBVIEW_ENDPOINT_INTERNAL__: JSON.stringify(''),
211+
__WEBVIEW_SCRIPT__: JSON.stringify(''),
213212
__VERSION__: JSON.stringify(pkg.version),
214213
...option.define,
215214
}),

typings/global/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ declare var __DEV__: string;
1818
declare var __WORKER_HOST__: string;
1919
declare var __WEBVIEW_ENDPOINT__: string;
2020
declare var __WEBVIEW_ENDPOINT_INTERNAL__: string;
21+
declare var __WEBVIEW_SCRIPT__: string;
2122
declare var __VERSION__: string;
2223

2324
type Optional<T, K extends keyof T> = Omit<T, K> & Partial<T>;

0 commit comments

Comments
 (0)