GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: fix package/workspace build error · euui/lowcode-engine@1342481

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lerna.json
  • packages
    • engine
      • build.plugin.js
      • package.json
      • src
        • engine-core.ts
    • renderer-core/tests
      • setup.ts
    • shell
      • package.json
    • workspace
      • package.json
      • src
        • base-context.ts
        • index.ts
        • shell-model-factory.ts
  • scripts
    • build.sh
    • sync.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lerna.json‎

Copy file name to clipboardExpand all lines: lerna.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lerna": "4.0.0",
3-
"version": "1.0.18",
3+
"version": "1.1.0",
44
"npmClient": "yarn",
55
"useWorkspaces": true,
66
"packages": [
Collapse file

‎packages/engine/build.plugin.js‎

Copy file name to clipboardExpand all lines: packages/engine/build.plugin.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ module.exports = ({ context, onGetWebpackConfig }) => {
3434
.use('babel-loader')
3535
.tap((options) => {
3636
const { plugins = [] } = options;
37-
console.log('plugins', plugins);
3837
return {
3938
...options,
4039
plugins: [
Collapse file

‎packages/engine/package.json‎

Copy file name to clipboardExpand all lines: packages/engine/package.json
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@alilc/lowcode-plugin-outline-pane": "1.0.18",
2828
"@alilc/lowcode-shell": "1.0.18",
2929
"@alilc/lowcode-utils": "1.0.18",
30+
"@alilc/lowcode-workspace": "1.0.18",
3031
"react": "^16.8.1",
3132
"react-dom": "^16.8.1"
3233
},
Collapse file

‎packages/engine/src/engine-core.ts‎

Copy file name to clipboardExpand all lines: packages/engine/src/engine-core.ts
+11-7Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,16 @@ export * from './modules/lowcode-types';
6161

6262
registerDefaults();
6363

64-
const innerWorkspace = new InnerWorkspace();
64+
async function registryInnerPlugin(designer: Designer, editor: Editor, plugins: Plugins) {
65+
// 注册一批内置插件
66+
await plugins.register(OutlinePlugin, {}, { autoInit: true });
67+
await plugins.register(componentMetaParser(designer));
68+
await plugins.register(setterRegistry, {}, { autoInit: true });
69+
await plugins.register(defaultPanelRegistry(editor, designer));
70+
await plugins.register(builtinHotkey);
71+
}
72+
73+
const innerWorkspace = new InnerWorkspace(registryInnerPlugin, shellModelFactory);
6574
const workspace = new Workspace(innerWorkspace);
6675
const editor = new Editor();
6776
globalContext.register(editor, Editor);
@@ -170,12 +179,7 @@ export async function init(
170179
}
171180
engineConfig.setEngineOptions(engineOptions as any);
172181

173-
// 注册一批内置插件
174-
await plugins.register(OutlinePlugin, {}, { autoInit: true });
175-
await plugins.register(componentMetaParser(designer));
176-
await plugins.register(setterRegistry, {}, { autoInit: true });
177-
await plugins.register(defaultPanelRegistry(editor, designer));
178-
await plugins.register(builtinHotkey);
182+
await registryInnerPlugin(designer, editor, plugins);
179183

180184
await plugins.init(pluginPreference as any);
181185

Collapse file

‎packages/renderer-core/tests/setup.ts‎

Copy file name to clipboardExpand all lines: packages/renderer-core/tests/setup.ts
-13Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
jest.mock('zen-logger', () => {
2-
class Logger {
3-
log() {}
4-
error() {}
5-
warn() {}
6-
debug() {}
7-
}
8-
return {
9-
__esModule: true,
10-
default: Logger,
11-
};
12-
});
13-
141
jest.mock('lodash', () => {
152
const original = jest.requireActual('lodash');
163

Collapse file

‎packages/shell/package.json‎

Copy file name to clipboardExpand all lines: packages/shell/package.json
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@alilc/lowcode-editor-skeleton": "1.0.18",
2121
"@alilc/lowcode-types": "1.0.18",
2222
"@alilc/lowcode-utils": "1.0.18",
23+
"@alilc/lowcode-workspace": "1.0.18",
2324
"classnames": "^2.2.6",
2425
"enzyme": "^3.11.0",
2526
"enzyme-adapter-react-16": "^1.15.5",
Collapse file

‎packages/workspace/package.json‎

Copy file name to clipboardExpand all lines: packages/workspace/package.json
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "1.0.18",
44
"description": "Shell Layer for AliLowCodeEngine",
55
"main": "lib/index.js",
6-
"private": true,
76
"module": "es/index.js",
87
"files": [
98
"lib",
Collapse file

‎packages/workspace/src/base-context.ts‎

Copy file name to clipboardExpand all lines: packages/workspace/src/base-context.ts
+4-15Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
import {
1717
Skeleton as InnerSkeleton,
1818
} from '@alilc/lowcode-editor-skeleton';
19-
2019
import {
2120
Hotkey,
2221
Plugins,
@@ -34,14 +33,8 @@ import {
3433
IPublicTypePluginMeta,
3534
} from '@alilc/lowcode-types';
3635
import { getLogger } from '@alilc/lowcode-utils';
37-
import { OutlinePlugin } from '@alilc/lowcode-plugin-outline-pane';
38-
import { setterRegistry } from '../../engine/src/inner-plugins/setter-registry';
39-
import { componentMetaParser } from '../../engine/src/inner-plugins/component-meta-parser';
40-
import defaultPanelRegistry from '../../engine/src/inner-plugins/default-panel-registry';
41-
import { builtinHotkey } from '../../engine/src/inner-plugins/builtin-hotkey';
36+
import { Workspace as InnerWorkspace } from './index';
4237
import { EditorWindow } from './editor-window/context';
43-
import { shellModelFactory } from './shell-model-factory';
44-
4538
export class BasicContext {
4639
skeleton: Skeleton;
4740
plugins: Plugins;
@@ -62,7 +55,7 @@ export class BasicContext {
6255
innerPlugins: LowCodePluginManager;
6356
canvas: Canvas;
6457

65-
constructor(innerWorkspace: any, viewName: string, public editorWindow?: EditorWindow) {
58+
constructor(innerWorkspace: InnerWorkspace, viewName: string, public editorWindow?: EditorWindow) {
6659
const editor = new Editor(viewName, true);
6760

6861
const innerSkeleton = new InnerSkeleton(editor, viewName);
@@ -71,7 +64,7 @@ export class BasicContext {
7164
const designer: Designer = new Designer({
7265
editor,
7366
viewName,
74-
shellModelFactory,
67+
shellModelFactory: innerWorkspace.shellModelFactory,
7568
});
7669
editor.set('designer' as any, designer);
7770

@@ -138,11 +131,7 @@ export class BasicContext {
138131

139132
// 注册一批内置插件
140133
this.registerInnerPlugins = async function registerPlugins() {
141-
await plugins.register(OutlinePlugin, {}, { autoInit: true });
142-
await plugins.register(componentMetaParser(designer));
143-
await plugins.register(setterRegistry, {}, { autoInit: true });
144-
await plugins.register(defaultPanelRegistry(editor, designer));
145-
await plugins.register(builtinHotkey);
134+
await innerWorkspace.registryInnerPlugin(designer, editor, plugins);
146135
};
147136
}
148137
}
Collapse file

‎packages/workspace/src/index.ts‎

Copy file name to clipboardExpand all lines: packages/workspace/src/index.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import { Designer } from '@alilc/lowcode-designer';
12
import { Editor } from '@alilc/lowcode-editor-core';
23
import {
34
Skeleton as InnerSkeleton,
45
} from '@alilc/lowcode-editor-skeleton';
6+
import { Plugins } from '@alilc/lowcode-shell';
57
import { IPublicResourceOptions } from '@alilc/lowcode-types';
68
import { EditorWindow } from './editor-window/context';
79
import { Resource } from './resource';
@@ -14,7 +16,10 @@ export class Workspace {
1416
readonly editor = new Editor();
1517
readonly skeleton = new InnerSkeleton(this.editor);
1618

17-
constructor() {
19+
constructor(
20+
readonly registryInnerPlugin: (designer: Designer, editor: Editor, plugins: Plugins) => Promise<void>,
21+
readonly shellModelFactory: any,
22+
) {
1823
if (this.defaultResource) {
1924
this.window = new EditorWindow(this.defaultResource, this);
2025
}
Collapse file

‎packages/workspace/src/shell-model-factory.ts‎

Copy file name to clipboardExpand all lines: packages/workspace/src/shell-model-factory.ts
-18Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.