Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
chore: fix demo uniscript building error (#3350)
Wenzhao Hucb08bca89fae
diff --git a/e2e/README.md b/e2e/README.mdnew file mode 100644index 0000000000..e69de29bb2diff --git a/examples/esbuild.config.mjs b/examples/esbuild.config.mjsindex 4dd75f3927..77dac4bda1 100644--- a/examples/esbuild.config.mjs+++ b/examples/esbuild.config.mjs@@ -16,7 +16,13 @@ const args = minimist(process.argv.slice(2));const isE2E = !!args.e2e;// User should also config their bunlder to build monaco editor's resources for web worker.-const monacoEditorEntryPoints = ['vs/language/typescript/ts.worker.js', 'vs/editor/editor.worker.js'];+const monacoEditorEntryPoints = [+ 'vs/language/json/json.worker.js',+ 'vs/language/css/css.worker.js',+ 'vs/language/html/html.worker.js',+ 'vs/language/typescript/ts.worker.js',+ 'vs/editor/editor.worker.js',+];// Get git commit hash and ref nameconst gitCommitHash = execSync('git rev-parse --short HEAD').toString().trim();diff --git a/examples/src/sheets/lazy.ts b/examples/src/sheets/lazy.tsindex 61c1561edb..82c664d759 100644--- a/examples/src/sheets/lazy.ts+++ b/examples/src/sheets/lazy.ts@@ -18,23 +18,27 @@ import type { Plugin, PluginCtor } from '@univerjs/core';import { UniverSheetsFilterUIPlugin } from '@univerjs/sheets-filter-ui';import { UniverSheetsFindReplacePlugin } from '@univerjs/sheets-find-replace';import { UniverSheetsCrosshairHighlightPlugin } from '@univerjs/sheets-crosshair-highlight';-// import { UniverUniscriptPlugin } from '@univerjs/uniscript';+import { UniverUniscriptPlugin } from '@univerjs/uniscript';export default function getLazyPlugins(): Array<[PluginCtor<Plugin>] | [PluginCtor<Plugin>, unknown]> {return [- // [- // UniverUniscriptPlugin,- // {- // getWorkerUrl(moduleID: string, label: string) {- // if (label === 'typescript' || label === 'javascript') {- // return './vs/language/typescript/ts.worker.js';- // }-- // return './vs/editor/editor.worker.js';- // },- // },-- // ],+ [UniverUniscriptPlugin, {+ getWorkerUrl(_: string, label: string) {+ if (label === 'json') {+ return '/vs/language/json/json.worker.js';+ }+ if (label === 'css' || label === 'scss' || label === 'less') {+ return '/vs/language/css/css.worker.js';+ }+ if (label === 'html' || label === 'handlebars' || label === 'razor') {+ return '/vs/language/html/html.worker.js';+ }+ if (label === 'typescript' || label === 'javascript') {+ return '/vs/language/typescript/ts.worker.js';+ }+ return '/vs/editor/editor.worker.js';+ },+ }],[UniverSheetsCrosshairHighlightPlugin],[UniverSheetsFilterUIPlugin, { useRemoteFilterValuesGenerator: false }],[UniverSheetsFindReplacePlugin],diff --git a/packages/debugger/src/controllers/e2e/e2e-memory.controller.ts b/packages/debugger/src/controllers/e2e/e2e-memory.controller.tsindex 6e41641941..10c98279a4 100644--- a/packages/debugger/src/controllers/e2e/e2e-memory.controller.ts+++ b/packages/debugger/src/controllers/e2e/e2e-memory.controller.ts@@ -23,6 +23,8 @@ import { getDefaultDocData } from './data/default-doc';const AWAIT_LOADING_TIMEOUT = 5000;const AWAIT_DISPOSING_TIMEOUT = 5000;+// NOTE: this interface is copied to `e2e/e2e.d.ts`. When you modify this interface, make sure+// the duplication is updated as well.export interface IE2EControllerAPI {loadAndRelease(id: number, loadTimeout?: number, disposeTimeout?: number): Promise<void>;loadDefaultSheet(loadTimeout?: number): Promise<void>;