@opensumi/ide-core-browser 2.21.3 → 2.21.4-rc-1668395886.0
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/lib/contextkey/testing.d.ts +1 -0
- package/lib/contextkey/testing.d.ts.map +1 -1
- package/lib/contextkey/testing.js +2 -1
- package/lib/contextkey/testing.js.map +1 -1
- package/package.json +7 -6
- package/src/application/application-state-service.ts +54 -0
- package/src/application/application.service.ts +51 -0
- package/src/application/index.ts +2 -0
- package/src/authentication/authentication.contribution.ts +35 -0
- package/src/authentication/authentication.service.ts +517 -0
- package/src/bootstrap/app.ts +745 -0
- package/src/bootstrap/app.view.tsx +88 -0
- package/src/bootstrap/connection.ts +116 -0
- package/src/bootstrap/index.ts +3 -0
- package/src/bootstrap/inner-providers.ts +297 -0
- package/src/bootstrap/lifecycle.service.ts +19 -0
- package/src/browser-module.ts +24 -0
- package/src/common/common.command.ts +977 -0
- package/src/common/common.contribution.ts +343 -0
- package/src/common/common.define.ts +55 -0
- package/src/common/common.module.ts +33 -0
- package/src/common/common.storage.ts +22 -0
- package/src/common/container-id.ts +12 -0
- package/src/common/index.ts +4 -0
- package/src/components/actions/index.tsx +502 -0
- package/src/components/actions/placements.ts +47 -0
- package/src/components/actions/styles.module.less +144 -0
- package/src/components/badge/index.tsx +1 -0
- package/src/components/index.ts +26 -0
- package/src/components/layout/box-panel.tsx +88 -0
- package/src/components/layout/default-layout.tsx +61 -0
- package/src/components/layout/index.ts +4 -0
- package/src/components/layout/layout.ts +80 -0
- package/src/components/layout/split-panel.service.ts +56 -0
- package/src/components/layout/split-panel.tsx +296 -0
- package/src/components/layout/styles.module.less +21 -0
- package/src/components/loading/index.ts +1 -0
- package/src/components/loading/loading.less +14 -0
- package/src/components/loading/loading.view.tsx +7 -0
- package/src/components/loading/media/loading-dark.svg +52 -0
- package/src/components/loading/media/loading-hc.svg +52 -0
- package/src/components/loading/media/loading.svg +52 -0
- package/src/components/popover/styles.module.less +81 -0
- package/src/components/portal/index.tsx +13 -0
- package/src/components/progressbar/index.tsx +16 -0
- package/src/components/progressbar/styles.module.less +31 -0
- package/src/components/recycle-tree/index.ts +1 -0
- package/src/components/recycle-tree/recycle-tree.view.tsx +368 -0
- package/src/components/resize/resize.module.less +78 -0
- package/src/components/resize/resize.tsx +663 -0
- package/src/components/scroll/index.tsx +386 -0
- package/src/components/scroll/scroll.module.less +108 -0
- package/src/components/scrollbar/index.ts +1 -0
- package/src/components/scrollbar/scrollbar.less +36 -0
- package/src/components/scrollbar/scrollbar.view.ts +8 -0
- package/src/components/select/index.tsx +12 -0
- package/src/components/select/styles.less +6 -0
- package/src/components/tree/index.ts +3 -0
- package/src/components/tree/tree-node.view.tsx +546 -0
- package/src/components/tree/tree.module.less +296 -0
- package/src/components/tree/tree.view.tsx +486 -0
- package/src/context-key.ts +48 -0
- package/src/contextkey/dialog.ts +3 -0
- package/src/contextkey/explorer.ts +26 -0
- package/src/contextkey/index.ts +6 -0
- package/src/contextkey/outline.ts +4 -0
- package/src/contextkey/resource.ts +61 -0
- package/src/contextkey/terminal.ts +7 -0
- package/src/contextkey/testing.ts +9 -0
- package/src/contextkey/workspace.ts +7 -0
- package/src/core-preferences.ts +318 -0
- package/src/dom/index.ts +176 -0
- package/src/encoding-registry.ts +83 -0
- package/src/extensions/extensions-point.service.ts +78 -0
- package/src/extensions/index.ts +3 -0
- package/src/extensions/schema/browserViews.ts +96 -0
- package/src/extensions/schema/menu.ts +245 -0
- package/src/extensions/schema/opensumiExtensionPackageSchema.ts +12 -0
- package/src/extensions/schema/toolbar.ts +338 -0
- package/src/extensions/schema/vscodeExtensionPackageSchema.ts +330 -0
- package/src/fs/index.ts +12 -0
- package/src/hash-calculate/hash-calculate.contribution.ts +19 -0
- package/src/index.ts +42 -0
- package/src/keybinding/index.ts +1 -0
- package/src/keybinding/keybinding.ts +908 -0
- package/src/keyboard/index.ts +3 -0
- package/src/keyboard/keyboard-layout-provider.ts +412 -0
- package/src/keyboard/keyboard-layout-service.ts +449 -0
- package/src/keyboard/keys.ts +748 -0
- package/src/keyboard/layouts/_.contribution.ts +24 -0
- package/src/keyboard/layouts/cz.win.ts +168 -0
- package/src/keyboard/layouts/de-swiss.win.ts +168 -0
- package/src/keyboard/layouts/de.darwin.ts +131 -0
- package/src/keyboard/layouts/de.linux.ts +186 -0
- package/src/keyboard/layouts/de.win.ts +168 -0
- package/src/keyboard/layouts/dk.win.ts +168 -0
- package/src/keyboard/layouts/dvorak.darwin.ts +131 -0
- package/src/keyboard/layouts/en-belgian.win.ts +168 -0
- package/src/keyboard/layouts/en-ext.darwin.ts +131 -0
- package/src/keyboard/layouts/en-in.win.ts +168 -0
- package/src/keyboard/layouts/en-intl.darwin.ts +131 -0
- package/src/keyboard/layouts/en-intl.win.ts +168 -0
- package/src/keyboard/layouts/en-uk.darwin.ts +131 -0
- package/src/keyboard/layouts/en-uk.win.ts +168 -0
- package/src/keyboard/layouts/en.darwin.ts +139 -0
- package/src/keyboard/layouts/en.linux.ts +186 -0
- package/src/keyboard/layouts/en.win.ts +173 -0
- package/src/keyboard/layouts/es-latin.win.ts +168 -0
- package/src/keyboard/layouts/es.darwin.ts +131 -0
- package/src/keyboard/layouts/es.linux.ts +186 -0
- package/src/keyboard/layouts/es.win.ts +168 -0
- package/src/keyboard/layouts/fr.darwin.ts +131 -0
- package/src/keyboard/layouts/fr.linux.ts +186 -0
- package/src/keyboard/layouts/fr.win.ts +168 -0
- package/src/keyboard/layouts/hu.win.ts +168 -0
- package/src/keyboard/layouts/it.darwin.ts +131 -0
- package/src/keyboard/layouts/it.win.ts +168 -0
- package/src/keyboard/layouts/jp-roman.darwin.ts +131 -0
- package/src/keyboard/layouts/jp.darwin.ts +131 -0
- package/src/keyboard/layouts/ko.darwin.ts +131 -0
- package/src/keyboard/layouts/layout.contribution.darwin.ts +23 -0
- package/src/keyboard/layouts/layout.contribution.linux.ts +12 -0
- package/src/keyboard/layouts/layout.contribution.ts +9 -0
- package/src/keyboard/layouts/layout.contribution.win.ts +29 -0
- package/src/keyboard/layouts/no.win.ts +168 -0
- package/src/keyboard/layouts/pl.darwin.ts +131 -0
- package/src/keyboard/layouts/pl.win.ts +168 -0
- package/src/keyboard/layouts/pt-br.win.ts +169 -0
- package/src/keyboard/layouts/pt.darwin.ts +131 -0
- package/src/keyboard/layouts/pt.win.ts +168 -0
- package/src/keyboard/layouts/ru.darwin.ts +131 -0
- package/src/keyboard/layouts/ru.linux.ts +186 -0
- package/src/keyboard/layouts/ru.win.ts +168 -0
- package/src/keyboard/layouts/sv.darwin.ts +131 -0
- package/src/keyboard/layouts/sv.win.ts +168 -0
- package/src/keyboard/layouts/thai.win.ts +168 -0
- package/src/keyboard/layouts/tr.win.ts +168 -0
- package/src/keyboard/layouts/zh-hans.darwin.ts +131 -0
- package/src/layout/accordion/tab-bar-toolbar.tsx +59 -0
- package/src/layout/accordion/view-context-key.registry.ts +34 -0
- package/src/layout/constants.ts +7 -0
- package/src/layout/index.ts +5 -0
- package/src/layout/layout-hooks.ts +68 -0
- package/src/layout/layout-state.ts +107 -0
- package/src/layout/layout.interface.ts +101 -0
- package/src/layout/layout.ts +80 -0
- package/src/layout/view-id.ts +18 -0
- package/src/logger/browser-logger.ts +51 -0
- package/src/logger/index.ts +1 -0
- package/src/markdown/index.tsx +62 -0
- package/src/menu/next/base.ts +513 -0
- package/src/menu/next/ctxmenu-service.ts +188 -0
- package/src/menu/next/index.ts +10 -0
- package/src/menu/next/menu-id.ts +86 -0
- package/src/menu/next/menu-service.ts +252 -0
- package/src/menu/next/menu-util.ts +77 -0
- package/src/menu/next/menu.contrib.interface.ts +78 -0
- package/src/menu/next/menu.interface.ts +253 -0
- package/src/menu/next/menubar-service.ts +211 -0
- package/src/menu/next/renderer/ctxmenu/base.ts +18 -0
- package/src/menu/next/renderer/ctxmenu/browser.ts +45 -0
- package/src/menu/next/renderer/ctxmenu/electron.ts +201 -0
- package/src/menu/next/toolbar-action.service.ts +132 -0
- package/src/monaco/index.ts +128 -0
- package/src/opener/command-opener.ts +42 -0
- package/src/opener/default-opener.ts +31 -0
- package/src/opener/http-opener.ts +25 -0
- package/src/opener/index.ts +19 -0
- package/src/opener/opener.contribution.ts +57 -0
- package/src/opener/opener.service.ts +66 -0
- package/src/preferences/early-preferences.ts +117 -0
- package/src/preferences/index.ts +9 -0
- package/src/preferences/preference-configurations.ts +77 -0
- package/src/preferences/preference-contribution.ts +401 -0
- package/src/preferences/preference-provider.ts +414 -0
- package/src/preferences/preference-proxy.ts +292 -0
- package/src/preferences/preference-scope.ts +3 -0
- package/src/preferences/preference-service.ts +571 -0
- package/src/preferences/settings.ts +53 -0
- package/src/preferences/types.ts +111 -0
- package/src/progress/index.ts +58 -0
- package/src/progress/progress-bar.tsx +22 -0
- package/src/progress/progress-indicator.ts +90 -0
- package/src/progress/progress.module.less +46 -0
- package/src/progress/progress.service.tsx +429 -0
- package/src/quick-open/index.ts +655 -0
- package/src/quick-open/recent-files.ts +68 -0
- package/src/raw-context-key.ts +116 -0
- package/src/react-hooks/event.tsx +80 -0
- package/src/react-hooks/hot-key.tsx +58 -0
- package/src/react-hooks/index.ts +3 -0
- package/src/react-hooks/injectable-hooks.tsx +35 -0
- package/src/react-hooks/portal-hooks.tsx +38 -0
- package/src/react-providers/config-provider.tsx +259 -0
- package/src/react-providers/index.tsx +2 -0
- package/src/react-providers/slot.module.less +19 -0
- package/src/react-providers/slot.tsx +242 -0
- package/src/services/clipboard.service.ts +97 -0
- package/src/services/credentials-service.ts +91 -0
- package/src/services/crypto-service.ts +23 -0
- package/src/services/external-uri.service.ts +68 -0
- package/src/services/index.ts +7 -0
- package/src/services/label-service.ts +386 -0
- package/src/services/status-bar-service.ts +108 -0
- package/src/services/storage-service.ts +192 -0
- package/src/style/codicons/README.md +22 -0
- package/src/style/codicons/codicon-animations.css +15 -0
- package/src/style/codicons/generator.js +15 -0
- package/src/style/entry.less +25 -0
- package/src/style/icon/fileicons/file-default.svg +1 -0
- package/src/style/icon/fileicons/folder-default.svg +1 -0
- package/src/style/icon/fileicons.less +20 -0
- package/src/style/icon/icon.ts +543 -0
- package/src/style/icon/ide-iconfont.ts +13 -0
- package/src/style/icon/index.less +54 -0
- package/src/style/icon/seti.woff +0 -0
- package/src/style/icon/symbol-icons/boolean-dark.svg +3 -0
- package/src/style/icon/symbol-icons/boolean-light.svg +3 -0
- package/src/style/icon/symbol-icons/class-dark.svg +3 -0
- package/src/style/icon/symbol-icons/class-light.svg +3 -0
- package/src/style/icon/symbol-icons/constant-dark.svg +4 -0
- package/src/style/icon/symbol-icons/constant-light.svg +4 -0
- package/src/style/icon/symbol-icons/enumerator-dark.svg +3 -0
- package/src/style/icon/symbol-icons/enumerator-item-dark.svg +3 -0
- package/src/style/icon/symbol-icons/enumerator-item-light.svg +3 -0
- package/src/style/icon/symbol-icons/enumerator-light.svg +3 -0
- package/src/style/icon/symbol-icons/event-dark.svg +3 -0
- package/src/style/icon/symbol-icons/event-light.svg +3 -0
- package/src/style/icon/symbol-icons/field-dark.svg +3 -0
- package/src/style/icon/symbol-icons/field-light.svg +3 -0
- package/src/style/icon/symbol-icons/file-dark.svg +3 -0
- package/src/style/icon/symbol-icons/file-light.svg +3 -0
- package/src/style/icon/symbol-icons/indexer-dark.svg +3 -0
- package/src/style/icon/symbol-icons/indexer-light.svg +3 -0
- package/src/style/icon/symbol-icons/interface-dark.svg +3 -0
- package/src/style/icon/symbol-icons/interface-light.svg +3 -0
- package/src/style/icon/symbol-icons/keyword-dark.svg +3 -0
- package/src/style/icon/symbol-icons/keyword-light.svg +3 -0
- package/src/style/icon/symbol-icons/method-dark.svg +3 -0
- package/src/style/icon/symbol-icons/method-light.svg +3 -0
- package/src/style/icon/symbol-icons/namespace-dark.svg +3 -0
- package/src/style/icon/symbol-icons/namespace-light.svg +3 -0
- package/src/style/icon/symbol-icons/numeric-dark.svg +3 -0
- package/src/style/icon/symbol-icons/numeric-light.svg +3 -0
- package/src/style/icon/symbol-icons/operator-dark.svg +3 -0
- package/src/style/icon/symbol-icons/operator-light.svg +3 -0
- package/src/style/icon/symbol-icons/property-dark.svg +3 -0
- package/src/style/icon/symbol-icons/property-light.svg +3 -0
- package/src/style/icon/symbol-icons/snippet-dark.svg +3 -0
- package/src/style/icon/symbol-icons/snippet-light.svg +3 -0
- package/src/style/icon/symbol-icons/string-dark.svg +3 -0
- package/src/style/icon/symbol-icons/string-light.svg +3 -0
- package/src/style/icon/symbol-icons/structure-dark.svg +3 -0
- package/src/style/icon/symbol-icons/structure-light.svg +3 -0
- package/src/style/icon/symbol-icons/symbol-icons.css +284 -0
- package/src/style/icon/symbol-icons/template-dark.svg +3 -0
- package/src/style/icon/symbol-icons/template-light.svg +3 -0
- package/src/style/icon/symbol-icons/variable-dark.svg +3 -0
- package/src/style/icon/symbol-icons/variable-light.svg +3 -0
- package/src/style/icon.less +8 -0
- package/src/style/index.less +14 -0
- package/src/style/monaco-override.less +116 -0
- package/src/style/normalize.less +92 -0
- package/src/style/octicons/octicons-cdn.css +720 -0
- package/src/style/octicons/octicons.css +714 -0
- package/src/style/octicons/octicons.html +1882 -0
- package/src/style/octicons/octicons.svg +582 -0
- package/src/style/octicons/octicons.ttf +0 -0
- package/src/style/override.less +97 -0
- package/src/style/toolbar.less +199 -0
- package/src/style/utilities.less +8 -0
- package/src/style/variable.less +8 -0
- package/src/terminal/index.ts +7 -0
- package/src/toolbar/components/auto-complete.tsx +0 -0
- package/src/toolbar/components/button.tsx +440 -0
- package/src/toolbar/components/index.ts +2 -0
- package/src/toolbar/components/select.tsx +189 -0
- package/src/toolbar/index.ts +3 -0
- package/src/toolbar/toolbar.popover.registry.ts +32 -0
- package/src/toolbar/toolbar.registry.ts +352 -0
- package/src/toolbar/toolbar.tsx +710 -0
- package/src/toolbar/types.ts +383 -0
- package/src/tree/index.ts +3 -0
- package/src/tree/tree-expansion.ts +25 -0
- package/src/tree/tree-selection.ts +89 -0
- package/src/tree/tree.ts +294 -0
- package/src/utils/create-overlay.tsx +53 -0
- package/src/utils/electron.ts +92 -0
- package/src/utils/env.ts +26 -0
- package/src/utils/icon.ts +13 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/json.ts +251 -0
- package/src/utils/label.tsx +27 -0
- package/src/utils/parse.ts +72 -0
- package/src/utils/react-hooks.ts +118 -0
- package/src/variable/index.ts +1 -0
- package/src/variable/variable.ts +84 -0
- package/src/window/index.ts +34 -0
- package/src/window/window.service.ts +100 -0
|
@@ -5,4 +5,5 @@ export declare const TestingHasAnyResults: RawContextKey<false>;
|
|
|
5
5
|
export declare const TestingIsRunning: RawContextKey<false>;
|
|
6
6
|
export declare const TestingIsInPeek: RawContextKey<true>;
|
|
7
7
|
export declare const TestingIsPeekVisible: RawContextKey<false>;
|
|
8
|
+
export declare const TestingCanRefreshTests: RawContextKey<false>;
|
|
8
9
|
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/contextkey/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,eAAO,MAAM,2BAA2B,kBAAwD,CAAC;AACjG,eAAO,MAAM,qCAAqC,sBAAmE,CAAC;AACtH,eAAO,MAAM,oBAAoB,sBAAoD,CAAC;AACtF,eAAO,MAAM,gBAAgB,sBAAgD,CAAC;AAC9E,eAAO,MAAM,eAAe,qBAA8C,CAAC;AAC3E,eAAO,MAAM,oBAAoB,sBAAoD,CAAC"}
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/contextkey/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,eAAO,MAAM,2BAA2B,kBAAwD,CAAC;AACjG,eAAO,MAAM,qCAAqC,sBAAmE,CAAC;AACtH,eAAO,MAAM,oBAAoB,sBAAoD,CAAC;AACtF,eAAO,MAAM,gBAAgB,sBAAgD,CAAC;AAC9E,eAAO,MAAM,eAAe,qBAA8C,CAAC;AAC3E,eAAO,MAAM,oBAAoB,sBAAoD,CAAC;AACtF,eAAO,MAAM,sBAAsB,sBAAiD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestingIsPeekVisible = exports.TestingIsInPeek = exports.TestingIsRunning = exports.TestingHasAnyResults = exports.TestingServiceHasDebuggableContextKey = exports.TestingServiceProviderCount = void 0;
|
|
3
|
+
exports.TestingCanRefreshTests = exports.TestingIsPeekVisible = exports.TestingIsInPeek = exports.TestingIsRunning = exports.TestingHasAnyResults = exports.TestingServiceHasDebuggableContextKey = exports.TestingServiceProviderCount = void 0;
|
|
4
4
|
const raw_context_key_1 = require("../raw-context-key");
|
|
5
5
|
exports.TestingServiceProviderCount = new raw_context_key_1.RawContextKey('service.testing.providerCount', 0);
|
|
6
6
|
exports.TestingServiceHasDebuggableContextKey = new raw_context_key_1.RawContextKey('service.testing.hasDebuggableContext', false);
|
|
@@ -8,4 +8,5 @@ exports.TestingHasAnyResults = new raw_context_key_1.RawContextKey('testing.hasA
|
|
|
8
8
|
exports.TestingIsRunning = new raw_context_key_1.RawContextKey('testing.isRunning', false);
|
|
9
9
|
exports.TestingIsInPeek = new raw_context_key_1.RawContextKey('testing.isInPeek', true);
|
|
10
10
|
exports.TestingIsPeekVisible = new raw_context_key_1.RawContextKey('testing.isPeekVisible', false);
|
|
11
|
+
exports.TestingCanRefreshTests = new raw_context_key_1.RawContextKey('testing.canRefresh', false);
|
|
11
12
|
//# sourceMappingURL=testing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../src/contextkey/testing.ts"],"names":[],"mappings":";;;AAAA,wDAAmD;AAEtC,QAAA,2BAA2B,GAAG,IAAI,+BAAa,CAAC,+BAA+B,EAAE,CAAC,CAAC,CAAC;AACpF,QAAA,qCAAqC,GAAG,IAAI,+BAAa,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;AACzG,QAAA,oBAAoB,GAAG,IAAI,+BAAa,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;AACzE,QAAA,gBAAgB,GAAG,IAAI,+BAAa,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AACjE,QAAA,eAAe,GAAG,IAAI,+BAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;AAC9D,QAAA,oBAAoB,GAAG,IAAI,+BAAa,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../../src/contextkey/testing.ts"],"names":[],"mappings":";;;AAAA,wDAAmD;AAEtC,QAAA,2BAA2B,GAAG,IAAI,+BAAa,CAAC,+BAA+B,EAAE,CAAC,CAAC,CAAC;AACpF,QAAA,qCAAqC,GAAG,IAAI,+BAAa,CAAC,sCAAsC,EAAE,KAAK,CAAC,CAAC;AACzG,QAAA,oBAAoB,GAAG,IAAI,+BAAa,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;AACzE,QAAA,gBAAgB,GAAG,IAAI,+BAAa,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AACjE,QAAA,eAAe,GAAG,IAAI,+BAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;AAC9D,QAAA,oBAAoB,GAAG,IAAI,+BAAa,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;AACzE,QAAA,sBAAsB,GAAG,IAAI,+BAAa,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-core-browser",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.4-rc-1668395886.0",
|
|
4
4
|
"description": "@opensumi/ide-core-browser",
|
|
5
5
|
"files": [
|
|
6
|
-
"lib"
|
|
6
|
+
"lib",
|
|
7
|
+
"src"
|
|
7
8
|
],
|
|
8
9
|
"license": "MIT",
|
|
9
10
|
"main": "lib/index.js",
|
|
@@ -17,9 +18,9 @@
|
|
|
17
18
|
"build": "tsc --build ../../configs/ts/references/tsconfig.core-browser.json"
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {
|
|
20
|
-
"@opensumi/ide-components": "2.21.
|
|
21
|
-
"@opensumi/ide-connection": "2.21.
|
|
22
|
-
"@opensumi/ide-core-common": "2.21.
|
|
21
|
+
"@opensumi/ide-components": "2.21.4-rc-1668395886.0",
|
|
22
|
+
"@opensumi/ide-connection": "2.21.4-rc-1668395886.0",
|
|
23
|
+
"@opensumi/ide-core-common": "2.21.4-rc-1668395886.0",
|
|
23
24
|
"@opensumi/vscode-debugprotocol": "1.49.0-beta.1",
|
|
24
25
|
"@vscode/codicons": "0.0.27",
|
|
25
26
|
"ajv": "^6.10.0",
|
|
@@ -47,5 +48,5 @@
|
|
|
47
48
|
"vscode-languageserver-protocol": "3.16.0",
|
|
48
49
|
"vscode-textmate": "7.0.1"
|
|
49
50
|
},
|
|
50
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "b669ad404fd46fe859c7553a349b85d6d3e633c8"
|
|
51
52
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Injectable, Autowired } from '@opensumi/di';
|
|
2
|
+
import { Deferred, IEventBus, BasicEvent } from '@opensumi/ide-core-common';
|
|
3
|
+
|
|
4
|
+
// 状态本身不带有顺序,以 `reachedState` 时生成 promise,以赋值时 resolve 掉 promise
|
|
5
|
+
export type ClientAppState =
|
|
6
|
+
| 'init'
|
|
7
|
+
| 'client_connected'
|
|
8
|
+
// contribution initialized 及命令、菜单、快捷键三个核心模块都初始化结束后
|
|
9
|
+
| 'core_module_initialized'
|
|
10
|
+
| 'started_contributions'
|
|
11
|
+
| 'ready'
|
|
12
|
+
| 'electron_asking_close'
|
|
13
|
+
| 'electron_confirmed_close'
|
|
14
|
+
| 'electron_closing'
|
|
15
|
+
| 'closing_window';
|
|
16
|
+
|
|
17
|
+
export class ClientAppStateEvent extends BasicEvent<ClientAppState> {}
|
|
18
|
+
|
|
19
|
+
@Injectable()
|
|
20
|
+
export class ClientAppStateService {
|
|
21
|
+
private _state: ClientAppState = 'init';
|
|
22
|
+
|
|
23
|
+
protected deferred: { [state: string]: Deferred<void> } = {};
|
|
24
|
+
|
|
25
|
+
@Autowired(IEventBus)
|
|
26
|
+
private eventBus: IEventBus;
|
|
27
|
+
|
|
28
|
+
get state(): ClientAppState {
|
|
29
|
+
return this._state;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
set state(state: ClientAppState) {
|
|
33
|
+
if (state !== this._state) {
|
|
34
|
+
this.deferred[this._state] = new Deferred();
|
|
35
|
+
this._state = state;
|
|
36
|
+
if (this.deferred[state] === undefined) {
|
|
37
|
+
this.deferred[state] = new Deferred();
|
|
38
|
+
}
|
|
39
|
+
this.deferred[state].resolve();
|
|
40
|
+
this.eventBus.fire(new ClientAppStateEvent(state));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public reachedState(state: ClientAppState): Promise<void> {
|
|
45
|
+
if (this.deferred[state] === undefined) {
|
|
46
|
+
this.deferred[state] = new Deferred();
|
|
47
|
+
}
|
|
48
|
+
return this.deferred[state].promise;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public reachedAnyState(...states: ClientAppState[]): Promise<void> {
|
|
52
|
+
return Promise.race(states.map((s) => this.reachedState(s)));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Injectable, Autowired } from '@opensumi/di';
|
|
2
|
+
import {
|
|
3
|
+
OS,
|
|
4
|
+
OperatingSystem,
|
|
5
|
+
IApplicationService,
|
|
6
|
+
CommonServerPath,
|
|
7
|
+
ICommonServer,
|
|
8
|
+
Deferred,
|
|
9
|
+
} from '@opensumi/ide-core-common';
|
|
10
|
+
|
|
11
|
+
import { AppConfig } from '../react-providers/config-provider';
|
|
12
|
+
|
|
13
|
+
@Injectable()
|
|
14
|
+
export class ApplicationService implements IApplicationService {
|
|
15
|
+
@Autowired(CommonServerPath)
|
|
16
|
+
protected readonly commonServer: ICommonServer;
|
|
17
|
+
|
|
18
|
+
@Autowired(AppConfig)
|
|
19
|
+
private readonly appConfig: AppConfig;
|
|
20
|
+
|
|
21
|
+
private _backendOS: OperatingSystem;
|
|
22
|
+
|
|
23
|
+
private _initialized = new Deferred<void>();
|
|
24
|
+
|
|
25
|
+
async initializeData() {
|
|
26
|
+
this._backendOS = await this.commonServer.getBackendOS();
|
|
27
|
+
this._initialized.resolve();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
get frontendOS() {
|
|
31
|
+
return OS.type();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
get backendOS() {
|
|
35
|
+
if (this._backendOS) {
|
|
36
|
+
return this._backendOS;
|
|
37
|
+
}
|
|
38
|
+
// electron 作为 backend,可直接使用 frontend 的 os
|
|
39
|
+
if (this.appConfig.isElectronRenderer) {
|
|
40
|
+
return this.frontendOS;
|
|
41
|
+
}
|
|
42
|
+
throw new Error(
|
|
43
|
+
"Can't get backend os type before initialize, if you want wait to get backend os, please use async method: getBackendOS",
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async getBackendOS() {
|
|
48
|
+
await this._initialized.promise;
|
|
49
|
+
return this.backendOS;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Autowired } from '@opensumi/di';
|
|
2
|
+
import {
|
|
3
|
+
Domain,
|
|
4
|
+
IAuthenticationService,
|
|
5
|
+
CommandContribution,
|
|
6
|
+
CommandRegistry,
|
|
7
|
+
noAccountsId,
|
|
8
|
+
} from '@opensumi/ide-core-common';
|
|
9
|
+
|
|
10
|
+
import { ClientAppContribution } from '../common/common.define';
|
|
11
|
+
|
|
12
|
+
@Domain(ClientAppContribution, CommandContribution)
|
|
13
|
+
export class AuthenticationContribution implements ClientAppContribution, CommandContribution {
|
|
14
|
+
@Autowired(IAuthenticationService)
|
|
15
|
+
protected readonly authenticationService: IAuthenticationService;
|
|
16
|
+
|
|
17
|
+
onStart() {
|
|
18
|
+
this.authenticationService.initialize();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
registerCommands(commands: CommandRegistry) {
|
|
22
|
+
commands.registerCommand(
|
|
23
|
+
{
|
|
24
|
+
id: noAccountsId,
|
|
25
|
+
label: '%authentication.noAccounts%',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
execute: () => {
|
|
29
|
+
// noop
|
|
30
|
+
// 点击菜单时空实现
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|