├── .coderabbit.yml
├── .github
├── ISSUE_TEMPLATE
│ ├── -------bug-report--.md
│ ├── -------feature-request--.md
│ └── -------question--.md
├── PULL_REQUEST_TEMPLATE.md
├── dependabot.yml
├── labeler.yml
├── release.yml
├── stale.yml
└── workflows
│ ├── auto-labeler.yml
│ ├── ci.yml
│ ├── release-next.yml
│ ├── release-rc.yml
│ └── release.yml
├── .gitignore
├── .yarn
└── releases
│ └── yarn-4.2.2.cjs
├── .yarnrc.yml
├── CHANGELOG.md
├── LEGAL.md
├── LICENSE
├── README-zh_CN.md
├── README.md
├── commitlint.config.js
├── docs
└── zh
│ ├── architecture.md
│ ├── quick-start.md
│ └── release-codeblitz.md
├── dprint.json
├── jest.config.js
├── jest.setup.js
├── lerna.json
├── package.json
├── packages
├── cli
│ ├── README.md
│ ├── __tests__
│ │ └── extension
│ │ │ └── scanner.test.ts
│ ├── package.json
│ ├── src
│ │ ├── commander.ts
│ │ ├── extension.ts
│ │ ├── extension
│ │ │ ├── metadata-type.ts
│ │ │ ├── scanner.ts
│ │ │ └── type.ts
│ │ ├── factory.ts
│ │ └── util
│ │ │ ├── check-framework.ts
│ │ │ ├── constant.ts
│ │ │ ├── index.ts
│ │ │ ├── log.ts
│ │ │ ├── path.ts
│ │ │ └── serve-file.ts
│ └── tsconfig.build.json
├── code-api
│ ├── README-zh_CN.md
│ ├── README.md
│ ├── __tests__
│ │ └── index.test.ts
│ ├── package.json
│ ├── src
│ │ ├── atomgit
│ │ │ ├── atomgit.service.ts
│ │ │ └── types.ts
│ │ ├── code-api.contribution.ts
│ │ ├── code-api.provider.ts
│ │ ├── codeup
│ │ │ ├── codeup.service.ts
│ │ │ └── types.ts
│ │ ├── common
│ │ │ ├── config.ts
│ │ │ ├── constant.ts
│ │ │ ├── index.ts
│ │ │ ├── service.ts
│ │ │ ├── types.ts
│ │ │ └── utils.ts
│ │ ├── gitee
│ │ │ ├── gitee.service.ts
│ │ │ └── types.ts
│ │ ├── github
│ │ │ ├── github.module.less
│ │ │ ├── github.service.ts
│ │ │ ├── github.view.tsx
│ │ │ └── types.ts
│ │ ├── gitlab
│ │ │ ├── gitlab.module.less
│ │ │ ├── gitlab.service.ts
│ │ │ ├── gitlab.view.tsx
│ │ │ └── types.ts
│ │ ├── gitlink
│ │ │ ├── gitlink.service.ts
│ │ │ └── types.ts
│ │ └── index.ts
│ └── tsconfig.build.json
├── code-service
│ ├── README.md
│ ├── __tests__
│ │ ├── index.test.ts
│ │ └── utils.test.ts
│ ├── package.json
│ ├── src
│ │ ├── code-model.service.ts
│ │ ├── code-service.contribution.ts
│ │ ├── commands.contribution.ts
│ │ ├── commands.ts
│ │ ├── config.service.ts
│ │ ├── decoration.provider.ts
│ │ ├── filesystem
│ │ │ └── configure.ts
│ │ ├── index.ts
│ │ ├── line-decoration.contribution.ts
│ │ ├── repository.ts
│ │ ├── static-resource.contribution.ts
│ │ ├── statusbar.ts
│ │ ├── style.module.less
│ │ ├── types.ts
│ │ └── utils.ts
│ └── tsconfig.build.json
├── common
│ ├── README.md
│ ├── package.json
│ ├── src
│ │ ├── cdn.ts
│ │ ├── index.ts
│ │ ├── mutex.ts
│ │ ├── request
│ │ │ └── index.ts
│ │ └── types
│ │ │ ├── extension.ts
│ │ │ ├── index.ts
│ │ │ └── util.ts
│ └── tsconfig.build.json
├── core
│ ├── .cloudide
│ │ └── extensions
│ │ │ ├── codeblitz.code-runner-for-web-0.1.5-patch.1
│ │ │ ├── .github
│ │ │ │ └── workflows
│ │ │ │ │ └── main.yml
│ │ │ ├── .vsixmanifest
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE.txt
│ │ │ ├── README.md
│ │ │ ├── images
│ │ │ │ ├── logo.png
│ │ │ │ └── usage.png
│ │ │ ├── kaitian-meta.json
│ │ │ ├── package.json
│ │ │ └── pyodide
│ │ │ │ ├── distutils.data
│ │ │ │ ├── distutils.js
│ │ │ │ ├── packages.json
│ │ │ │ ├── pyodide.asm.data
│ │ │ │ ├── pyodide.asm.js
│ │ │ │ ├── pyodide.asm.wasm
│ │ │ │ └── pyodide.js
│ │ │ ├── codeblitz.codeswing-0.0.21
│ │ │ ├── .vsixmanifest
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE.txt
│ │ │ ├── README.md
│ │ │ ├── images
│ │ │ │ └── icon.png
│ │ │ └── package.json
│ │ │ ├── codeblitz.css-language-features-worker-1.53.0-patch.3
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── icons
│ │ │ │ └── css.png
│ │ │ ├── kaitian-meta.json
│ │ │ ├── package.json
│ │ │ ├── package.nls.json
│ │ │ ├── schemas
│ │ │ │ └── package.schema.json
│ │ │ └── server
│ │ │ │ └── package.json
│ │ │ ├── codeblitz.emmet-1.0.0
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── images
│ │ │ │ └── icon.png
│ │ │ ├── kaitian-meta.json
│ │ │ ├── package.json
│ │ │ └── package.nls.json
│ │ │ ├── codeblitz.git-graph-1.30.0-3
│ │ │ ├── .vsixmanifest
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LEGAL.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── kaitian-meta.json
│ │ │ ├── licenses
│ │ │ │ ├── LICENSE_MICROSOFT
│ │ │ │ └── LICENSE_OCTICONS
│ │ │ ├── media
│ │ │ │ ├── out.min.css
│ │ │ │ └── out.min.js
│ │ │ ├── package.json
│ │ │ ├── resources
│ │ │ │ ├── cmd-icon-dark.svg
│ │ │ │ ├── cmd-icon-light.svg
│ │ │ │ ├── icon.png
│ │ │ │ ├── webview-icon-dark.svg
│ │ │ │ ├── webview-icon-light.svg
│ │ │ │ └── webview-icon.svg
│ │ │ └── webpack.config.js
│ │ │ ├── codeblitz.gitlens-10.2.3-2
│ │ │ ├── .vsixmanifest
│ │ │ ├── LEGAL.md
│ │ │ ├── README.md
│ │ │ ├── images
│ │ │ │ ├── dark
│ │ │ │ │ ├── highlight-gutter.svg
│ │ │ │ │ ├── icon-git-orange.svg
│ │ │ │ │ ├── icon-git-progress.svg
│ │ │ │ │ └── icon-git.svg
│ │ │ │ ├── gitlens-icon.png
│ │ │ │ └── light
│ │ │ │ │ ├── highlight-gutter.svg
│ │ │ │ │ ├── icon-git-orange.svg
│ │ │ │ │ ├── icon-git-progress.svg
│ │ │ │ │ └── icon-git.svg
│ │ │ ├── kaitian-meta.json
│ │ │ └── package.json
│ │ │ ├── codeblitz.html-language-features-worker-1.53.0-patch.3
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── icons
│ │ │ │ └── html.png
│ │ │ ├── kaitian-meta.json
│ │ │ ├── package.json
│ │ │ ├── package.nls.json
│ │ │ ├── schemas
│ │ │ │ └── package.schema.json
│ │ │ └── server
│ │ │ │ ├── lib
│ │ │ │ ├── cgmanifest.json
│ │ │ │ └── jquery.d.ts
│ │ │ │ └── package.json
│ │ │ ├── codeblitz.image-preview-1.53.0-patch.1
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── icon.png
│ │ │ ├── icon.svg
│ │ │ ├── kaitian-meta.json
│ │ │ ├── media
│ │ │ │ ├── loading-dark.svg
│ │ │ │ ├── loading-hc.svg
│ │ │ │ ├── loading.svg
│ │ │ │ ├── main.css
│ │ │ │ └── main.js
│ │ │ ├── package.json
│ │ │ └── package.nls.json
│ │ │ ├── codeblitz.json-language-features-worker-1.53.0-patch.3
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── icons
│ │ │ │ └── json.png
│ │ │ ├── kaitian-meta.json
│ │ │ ├── package.json
│ │ │ ├── package.nls.json
│ │ │ └── server
│ │ │ │ ├── README.md
│ │ │ │ └── package.json
│ │ │ ├── codeblitz.markdown-language-features-worker-1.53.0-patch.2
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── icon.png
│ │ │ ├── kaitian-meta.json
│ │ │ ├── media
│ │ │ │ ├── highlight.css
│ │ │ │ ├── index.js
│ │ │ │ ├── markdown.css
│ │ │ │ ├── pre.js
│ │ │ │ ├── preview-dark.svg
│ │ │ │ └── preview-light.svg
│ │ │ ├── package.json
│ │ │ ├── package.nls.json
│ │ │ └── schemas
│ │ │ │ └── package.schema.json
│ │ │ ├── codeblitz.merge-conflict-1.0.0
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── kaitian-meta.json
│ │ │ ├── media
│ │ │ │ └── icon.png
│ │ │ ├── package.json
│ │ │ └── package.nls.json
│ │ │ ├── codeblitz.references-view-1.0.0
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── kaitian-meta.json
│ │ │ ├── media
│ │ │ │ ├── demo.png
│ │ │ │ └── icon.png
│ │ │ ├── package.json
│ │ │ └── package.nls.json
│ │ │ ├── codeblitz.typescript-language-features-worker-1.53.0-patch.4
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── icon.png
│ │ │ ├── kaitian-meta.json
│ │ │ ├── language-configuration.json
│ │ │ ├── package.json
│ │ │ ├── package.nls.json
│ │ │ └── schemas
│ │ │ │ ├── jsconfig.schema.json
│ │ │ │ ├── package.schema.json
│ │ │ │ └── tsconfig.schema.json
│ │ │ └── vscode-extensions.anycode-0.0.67
│ │ │ ├── .vsixmanifest
│ │ │ ├── README.md
│ │ │ ├── ThirdPartyNotices.txt
│ │ │ ├── client
│ │ │ ├── .npmrc
│ │ │ ├── package-lock.json
│ │ │ ├── package.json
│ │ │ ├── tsconfig.browser.json
│ │ │ └── tsconfig.node.json
│ │ │ ├── package.json
│ │ │ ├── server
│ │ │ ├── .npmrc
│ │ │ ├── package-lock.json
│ │ │ ├── package.json
│ │ │ ├── src
│ │ │ │ └── common
│ │ │ │ │ └── test-fixture
│ │ │ │ │ ├── client
│ │ │ │ │ ├── test.all.js
│ │ │ │ │ └── test.html
│ │ │ │ │ ├── jsconfig.json
│ │ │ │ │ └── test.js
│ │ │ ├── tsconfig.browser.json
│ │ │ └── tsconfig.node.json
│ │ │ ├── telemetry.json
│ │ │ └── tsconfig.base.json
│ ├── README.md
│ ├── __tests__
│ │ └── index.ts
│ ├── bin
│ │ └── codeblitz
│ ├── extensions
│ │ ├── _reference.d.ts
│ │ ├── codeblitz.anycode-c-sharp.d.ts
│ │ ├── codeblitz.anycode-c-sharp.js
│ │ ├── codeblitz.anycode-cpp.d.ts
│ │ ├── codeblitz.anycode-cpp.js
│ │ ├── codeblitz.anycode-go.d.ts
│ │ ├── codeblitz.anycode-go.js
│ │ ├── codeblitz.anycode-java.d.ts
│ │ ├── codeblitz.anycode-java.js
│ │ ├── codeblitz.anycode-php.d.ts
│ │ ├── codeblitz.anycode-php.js
│ │ ├── codeblitz.anycode-python.d.ts
│ │ ├── codeblitz.anycode-python.js
│ │ ├── codeblitz.anycode-rust.d.ts
│ │ ├── codeblitz.anycode-rust.js
│ │ ├── codeblitz.anycode-typescript.d.ts
│ │ ├── codeblitz.anycode-typescript.js
│ │ ├── codeblitz.anycode.d.ts
│ │ ├── codeblitz.anycode.js
│ │ ├── codeblitz.code-runner-for-web.d.ts
│ │ ├── codeblitz.code-runner-for-web.js
│ │ ├── codeblitz.codeswing.d.ts
│ │ ├── codeblitz.codeswing.js
│ │ ├── codeblitz.css-language-features-worker.d.ts
│ │ ├── codeblitz.css-language-features-worker.js
│ │ ├── codeblitz.emmet.d.ts
│ │ ├── codeblitz.emmet.js
│ │ ├── codeblitz.git-graph.d.ts
│ │ ├── codeblitz.git-graph.js
│ │ ├── codeblitz.gitlens.d.ts
│ │ ├── codeblitz.gitlens.js
│ │ ├── codeblitz.html-language-features-worker.d.ts
│ │ ├── codeblitz.html-language-features-worker.js
│ │ ├── codeblitz.image-preview.d.ts
│ │ ├── codeblitz.image-preview.js
│ │ ├── codeblitz.json-language-features-worker.d.ts
│ │ ├── codeblitz.json-language-features-worker.js
│ │ ├── codeblitz.markdown-language-features-worker.d.ts
│ │ ├── codeblitz.markdown-language-features-worker.js
│ │ ├── codeblitz.merge-conflict.d.ts
│ │ ├── codeblitz.merge-conflict.js
│ │ ├── codeblitz.odc-theme.d.ts
│ │ ├── codeblitz.odc-theme.js
│ │ ├── codeblitz.references-view.d.ts
│ │ ├── codeblitz.references-view.js
│ │ ├── codeblitz.typescript-language-features-worker.d.ts
│ │ ├── codeblitz.typescript-language-features-worker.js
│ │ ├── codeblitz.web-scm.d.ts
│ │ └── codeblitz.web-scm.js
│ ├── modules
│ │ ├── code-api.d.ts
│ │ ├── code-api.js
│ │ ├── code-service.d.ts
│ │ ├── code-service.js
│ │ ├── ide-sumi-core.d.ts
│ │ └── ide-sumi-core.js
│ ├── package.json
│ ├── scripts
│ │ ├── .no-postinstall
│ │ └── install-ext.js
│ ├── src
│ │ ├── api
│ │ │ ├── constants.ts
│ │ │ ├── createApp.tsx
│ │ │ ├── createEditor.tsx
│ │ │ ├── exports.ts
│ │ │ ├── keepAlive.tsx
│ │ │ ├── normalize.less
│ │ │ ├── opts.ts
│ │ │ ├── register.ts
│ │ │ ├── renderApp.tsx
│ │ │ ├── renderDiffViewer.tsx
│ │ │ ├── renderEditor.tsx
│ │ │ ├── require.ts
│ │ │ └── types.ts
│ │ ├── core
│ │ │ ├── Landing.tsx
│ │ │ ├── Root.tsx
│ │ │ ├── commands.ts
│ │ │ ├── components
│ │ │ │ ├── CodeEditor.tsx
│ │ │ │ ├── DiffEditor.tsx
│ │ │ │ ├── context.ts
│ │ │ │ └── util.ts
│ │ │ ├── diff-viewer
│ │ │ │ ├── common.ts
│ │ │ │ ├── extension-patch.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── internal
│ │ │ │ │ ├── base.ts
│ │ │ │ │ └── theme.provider.ts
│ │ │ │ ├── languages-patch.ts
│ │ │ │ ├── module.ts
│ │ │ │ └── utils.ts
│ │ │ ├── editor
│ │ │ │ ├── contributions
│ │ │ │ │ └── static-resource.contribution.ts
│ │ │ │ ├── editor.extension.ts
│ │ │ │ ├── editor.module.ts
│ │ │ │ ├── modules.extension.ts
│ │ │ │ ├── modules.ts
│ │ │ │ └── types.ts
│ │ │ ├── env.ts
│ │ │ ├── extension
│ │ │ │ ├── extension.contribution.ts
│ │ │ │ ├── extension.patch.ts
│ │ │ │ └── metadata.ts
│ │ │ ├── hooks.ts
│ │ │ ├── internal
│ │ │ │ └── codeblitz.module.ts
│ │ │ ├── layout.tsx
│ │ │ ├── modules.ts
│ │ │ ├── patch.ts
│ │ │ ├── props.service.ts
│ │ │ ├── providers
│ │ │ │ ├── default-theme.provider.ts
│ │ │ │ └── index.ts
│ │ │ ├── style.module.less
│ │ │ ├── types.ts
│ │ │ └── utils.ts
│ │ ├── distribution
│ │ │ └── .gitkeep
│ │ ├── editor.all.ts
│ │ ├── editor.extension.ts
│ │ ├── editor.ts
│ │ ├── index.ts
│ │ └── modules
│ │ │ ├── codeblitz__code-api.ts
│ │ │ ├── codeblitz__code-service.ts
│ │ │ ├── codeblitz__ide-sumi-core.ts
│ │ │ ├── opensumi__common-di.ts
│ │ │ ├── opensumi__di.ts
│ │ │ ├── opensumi__ide-addons.ts
│ │ │ ├── opensumi__ide-comments.ts
│ │ │ ├── opensumi__ide-components.ts
│ │ │ ├── opensumi__ide-core-browser.ts
│ │ │ ├── opensumi__ide-core-common.ts
│ │ │ ├── opensumi__ide-debug.ts
│ │ │ ├── opensumi__ide-decoration.ts
│ │ │ ├── opensumi__ide-editor.ts
│ │ │ ├── opensumi__ide-explorer.ts
│ │ │ ├── opensumi__ide-extension-storage.ts
│ │ │ ├── opensumi__ide-extension.ts
│ │ │ ├── opensumi__ide-file-scheme.ts
│ │ │ ├── opensumi__ide-file-search.ts
│ │ │ ├── opensumi__ide-file-service.ts
│ │ │ ├── opensumi__ide-file-tree-next.ts
│ │ │ ├── opensumi__ide-keymaps.ts
│ │ │ ├── opensumi__ide-logs.ts
│ │ │ ├── opensumi__ide-main-layout.ts
│ │ │ ├── opensumi__ide-markdown.ts
│ │ │ ├── opensumi__ide-markers.ts
│ │ │ ├── opensumi__ide-menu-bar.ts
│ │ │ ├── opensumi__ide-monaco-enhance.ts
│ │ │ ├── opensumi__ide-monaco.ts
│ │ │ ├── opensumi__ide-opened-editor.ts
│ │ │ ├── opensumi__ide-outline.ts
│ │ │ ├── opensumi__ide-output.ts
│ │ │ ├── opensumi__ide-overlay.ts
│ │ │ ├── opensumi__ide-preferences.ts
│ │ │ ├── opensumi__ide-quick-open.ts
│ │ │ ├── opensumi__ide-scm.ts
│ │ │ ├── opensumi__ide-search.ts
│ │ │ ├── opensumi__ide-status-bar.ts
│ │ │ ├── opensumi__ide-storage.ts
│ │ │ ├── opensumi__ide-theme.ts
│ │ │ ├── opensumi__ide-toolbar.ts
│ │ │ ├── opensumi__ide-variable.ts
│ │ │ ├── opensumi__ide-webview.ts
│ │ │ ├── opensumi__ide-workspace-edit.ts
│ │ │ └── opensumi__ide-workspace.ts
│ ├── tsconfig.build.json
│ └── typings
│ │ ├── index.d.ts
│ │ ├── languages.d.ts
│ │ └── thenable.d.ts
├── i18n
│ ├── README.md
│ ├── __tests__
│ │ └── index.test.ts
│ ├── package.json
│ ├── src
│ │ ├── en-US.ts
│ │ ├── index.ts
│ │ └── zh-CN.ts
│ └── tsconfig.build.json
├── plugin
│ ├── README.md
│ ├── __tests__
│ │ └── index.test.ts
│ ├── package.json
│ ├── src
│ │ ├── api
│ │ │ ├── plugin.api.impl.ts
│ │ │ ├── plugin.commands.ts
│ │ │ └── plugin.context.ts
│ │ ├── index.ts
│ │ ├── plugin.contribution.ts
│ │ ├── plugin.service.ts
│ │ └── types.ts
│ └── tsconfig.build.json
├── registry
│ ├── README.md
│ ├── __tests__
│ │ └── index.test.ts
│ ├── package.json
│ ├── src
│ │ ├── index.ts
│ │ └── types.ts
│ └── tsconfig.build.json
├── startup
│ ├── README.md
│ ├── __tests__
│ │ └── index.test.ts
│ ├── package.json
│ ├── src
│ │ ├── code
│ │ │ ├── code.module.less
│ │ │ ├── code.tsx
│ │ │ ├── component.tsx
│ │ │ ├── index.tsx
│ │ │ └── startup.module.ts
│ │ ├── common
│ │ │ ├── constants.ts
│ │ │ ├── local-extension.module.ts
│ │ │ └── plugin.ts
│ │ ├── diff-viewer
│ │ │ ├── _create_data.ts
│ │ │ ├── data.json
│ │ │ ├── index.tsx
│ │ │ └── remote.ts
│ │ ├── editor
│ │ │ ├── index.tsx
│ │ │ ├── plugin.ts
│ │ │ └── style.less
│ │ ├── filesystem
│ │ │ └── index.tsx
│ │ ├── index.css
│ │ ├── provider
│ │ │ ├── index.css
│ │ │ ├── index.tsx
│ │ │ └── module.ts
│ │ └── startup
│ │ │ ├── index.tsx
│ │ │ ├── startup.module.ts
│ │ │ └── web-scm.plugin.ts
│ └── tsconfig.build.json
├── sumi-core
│ ├── README.md
│ ├── __tests__
│ │ └── index.test.ts
│ ├── package.json
│ ├── resources
│ │ ├── manifest.json
│ │ ├── worker-host.js
│ │ └── worker-host.js.LICENSE.txt
│ ├── src
│ │ ├── client
│ │ │ ├── ai-native
│ │ │ │ ├── index.ts
│ │ │ │ └── preferences.ts
│ │ │ ├── custom
│ │ │ │ ├── editor.ts
│ │ │ │ ├── file-tree.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── menu.ts
│ │ │ ├── debug
│ │ │ │ └── index.ts
│ │ │ ├── editor-empty
│ │ │ │ ├── editor-empty.contribution.ts
│ │ │ │ ├── editor-empty.module.less
│ │ │ │ └── editor-empty.view.tsx
│ │ │ ├── extension-manager
│ │ │ │ ├── base.ts
│ │ │ │ ├── common.module.less
│ │ │ │ ├── extension-detail.module.less
│ │ │ │ ├── extension-detail.view.tsx
│ │ │ │ ├── extension-list
│ │ │ │ │ ├── index.module.less
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── extension-manager.contribution.ts
│ │ │ │ ├── extension-manager.service.ts
│ │ │ │ ├── extension-panel-accordion.view.tsx
│ │ │ │ ├── extension-panel.module.less
│ │ │ │ ├── extension-panel.view.tsx
│ │ │ │ ├── extension-resource-provider.ts
│ │ │ │ ├── index.tsx
│ │ │ │ └── raw-extension
│ │ │ │ │ ├── index.module.less
│ │ │ │ │ └── index.tsx
│ │ │ ├── extension
│ │ │ │ ├── extension-fs.provider.ts
│ │ │ │ ├── extension.contribution.ts
│ │ │ │ └── index.ts
│ │ │ ├── file-scheme
│ │ │ │ └── index.contribution.ts
│ │ │ ├── index.ts
│ │ │ ├── layout
│ │ │ │ └── index.contribution.ts
│ │ │ ├── override
│ │ │ │ ├── breadcrumb.service.ts
│ │ │ │ ├── extensionStorageService.ts
│ │ │ │ ├── monacoContextKeyService.ts
│ │ │ │ ├── monacoOverride
│ │ │ │ │ ├── codeEditorService.ts
│ │ │ │ │ ├── commandService.ts
│ │ │ │ │ ├── contextKeyService.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── standaloneKeybindingService.ts
│ │ │ │ │ ├── textModelService.ts
│ │ │ │ │ └── workspaceEditService.ts
│ │ │ │ ├── snippet.service.ts
│ │ │ │ ├── vscodeContributesService.ts
│ │ │ │ └── webConnectionHelper.ts
│ │ │ ├── preference
│ │ │ │ └── preference.setting.contribution.ts
│ │ │ ├── search
│ │ │ │ └── index.contribution.ts
│ │ │ ├── textmate-language-grammar
│ │ │ │ ├── README.md
│ │ │ │ ├── base.ts
│ │ │ │ ├── index.contribution.ts
│ │ │ │ └── language-grammar.service.ts
│ │ │ └── welcome
│ │ │ │ ├── welcome.contributon.ts
│ │ │ │ ├── welcome.module.less
│ │ │ │ └── welcome.view.tsx
│ │ ├── common
│ │ │ ├── constant.ts
│ │ │ ├── enum.ts
│ │ │ ├── index.ts
│ │ │ ├── theme.ts
│ │ │ ├── types.ts
│ │ │ └── util.ts
│ │ ├── connection
│ │ │ └── index.ts
│ │ ├── index.ts
│ │ └── server
│ │ │ ├── ai-native
│ │ │ ├── ai-back-service.ts
│ │ │ └── index.ts
│ │ │ ├── core
│ │ │ ├── app.ts
│ │ │ ├── base.ts
│ │ │ ├── common.module.ts
│ │ │ ├── common.server.ts
│ │ │ ├── filesystem.ts
│ │ │ ├── fs-launch.contribution.ts
│ │ │ ├── index.ts
│ │ │ └── node-logger.ts
│ │ │ ├── extension-manager
│ │ │ ├── extension-manager.contribution.ts
│ │ │ └── index.ts
│ │ │ ├── file-scheme
│ │ │ ├── base.ts
│ │ │ ├── file-scheme-doc.service.ts
│ │ │ └── index.ts
│ │ │ ├── file-search
│ │ │ ├── base.ts
│ │ │ ├── file-search.service.ts
│ │ │ └── index.ts
│ │ │ ├── file-service
│ │ │ ├── base.ts
│ │ │ ├── disk-file-system.provider.ts
│ │ │ ├── encoding.ts
│ │ │ ├── file-change-collection.ts
│ │ │ ├── file-service-watcher.ts
│ │ │ ├── file-service.ts
│ │ │ └── index.ts
│ │ │ ├── index.ts
│ │ │ ├── logs-core
│ │ │ ├── base.ts
│ │ │ ├── index.ts
│ │ │ ├── log-manager.ts
│ │ │ └── log.service.ts
│ │ │ ├── node
│ │ │ ├── bfs
│ │ │ │ ├── Editor.ts
│ │ │ │ ├── FileIndex.ts
│ │ │ │ └── index.ts
│ │ │ ├── extend
│ │ │ │ ├── fs-extra.ts
│ │ │ │ ├── fs-watcher.ts
│ │ │ │ └── write-file-atomic.ts
│ │ │ └── index.ts
│ │ │ ├── opensumi-extension
│ │ │ ├── base.ts
│ │ │ ├── extension.service.client.ts
│ │ │ └── index.ts
│ │ │ └── search
│ │ │ ├── base.ts
│ │ │ ├── content-search.service.ts
│ │ │ ├── index.ts
│ │ │ └── search-manager.ts
│ └── tsconfig.build.json
├── toolkit
│ ├── README.md
│ ├── __tests__
│ │ └── index.test.ts
│ ├── define.json
│ ├── fixtures
│ │ └── worker-example
│ │ │ ├── browser.js
│ │ │ ├── package.json
│ │ │ ├── package.schema.json
│ │ │ ├── snippet.json
│ │ │ └── worker.js
│ ├── index.js
│ ├── jsconfig.json
│ ├── package.json
│ ├── playground
│ │ ├── main.tsx
│ │ └── webpack.config.js
│ ├── polyfill
│ │ ├── crypto.js
│ │ └── process.js
│ ├── public
│ │ ├── index.html
│ │ └── webview.html
│ └── webpack
│ │ ├── config.build.js
│ │ ├── config.dev.js
│ │ ├── config.integration.js
│ │ ├── config.languages.js
│ │ ├── config.webview.js
│ │ ├── config.worker.js
│ │ └── util
│ │ ├── banner-plugin.js
│ │ ├── find-porter.js
│ │ ├── index.js
│ │ ├── scan-extension.js
│ │ ├── tsconfig-paths-plugin.js
│ │ └── type.ts
├── tsconfig.base.json
└── tsconfig.build.json
├── scripts
├── bootstrap.js
├── build-assets.js
├── build.js
├── bundle.js
├── create.js
├── deps-fileds.js
├── generate.js
├── jest
│ └── mocks
│ │ └── styleMock.js
├── link-ext.js
├── preinstall.js
├── release.js
├── upgrade-opensumi.js
└── utils
│ ├── generate-alias.js
│ ├── parse-env.js
│ ├── replace.js
│ ├── update-package.js
│ ├── utils.js
│ └── version.js
├── tsconfig.json
├── typings
└── global
│ └── index.d.ts
└── yarn.lock
/.github/ISSUE_TEMPLATE/-------bug-report--.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 问题反馈 [ Bug report ]
3 | about: 提交问题帮助我们优化框架 (Create a report to help us improve)
4 | title: '[BUG] '
5 | labels: 🐞 bug
6 | assignees: ''
7 | ---
8 |
9 | **描述你的问题(Describe the bug)**
10 |
11 |
12 |
13 |
14 | **复现路径(To Reproduce)**
15 |
16 |
23 |
24 | **预期表现(Expected behavior)**
25 |
26 |
27 |
28 | **环境信息(Environment)**
29 |
30 | - OS: [e.g. macOS 11.2 Apple M1/Windows10/Windows11]
31 | - Browser: [e.g. chrome, safari, electron]
32 | - Codeblitz Version: [e.g. 1.0.0]
33 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/-------feature-request--.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 功能需求 [ Feature request ]
3 | about: 提一些建设性的建议或功能需求(Suggest an idea for this project)
4 | title: '[FEATURE] '
5 | labels: 🎨 feature
6 | assignees: ''
7 | ---
8 |
9 | **如果你的需求与问题相关,请在下面描述一下(Is your feature request related to a problem? Please describe.)**
10 |
11 |
12 |
13 |
14 | **描述你预期的功能表现(Describe the solution you'd like)**
15 |
16 |
17 |
18 |
19 | **描述你考虑过的替代方案(Describe alternatives you've considered)**
20 |
21 |
22 |
23 | **补充信息(Additional context)**
24 |
25 |
26 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/-------question--.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 提问 [ Question ]
3 | about: 提交对于框架的一些疑问寻求帮助 (Create a question issue)
4 | title: '[Question] '
5 | labels: 💬 question
6 | assignees: ''
7 | ---
8 |
9 | **描述你的问题(Describe you question here)**
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ### Types
2 |
3 |
4 |
5 | - [ ] 🎉 New Features
6 | - [ ] 🐛 Bug Fixes
7 | - [ ] 📚 Documentation Changes
8 | - [ ] 💄 Code Style Changes
9 | - [ ] 💄 Style Changes
10 | - [ ] 🪚 Refactors
11 | - [ ] 🚀 Performance Improvements
12 | - [ ] 🏗️ Build System
13 | - [ ] ⏱ Tests
14 | - [ ] 🧹 Chores
15 | - [ ] Other Changes
16 |
17 | ### Background or solution
18 |
19 |
20 | ### ChangeLog
21 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "npm" # See documentation for possible values
9 | directory: "/" # Location of package manifests
10 | schedule:
11 | interval: "weekly"
12 |
--------------------------------------------------------------------------------
/.github/labeler.yml:
--------------------------------------------------------------------------------
1 | labels:
2 | '🐞 bug':
3 | - '\bfix'
4 | '🎨 feature':
5 | - '\bfeat'
6 | '⚙️ refactor':
7 | - '\brefactor'
8 | '💄 style change':
9 | - '\bstyle'
10 | '📌 patch':
11 | - '\bpatch'
12 |
--------------------------------------------------------------------------------
/.github/release.yml:
--------------------------------------------------------------------------------
1 | changelog:
2 | exclude:
3 | labels:
4 | - ignore for release
5 | categories:
6 | - title: What's New Features
7 | labels:
8 | - 🎨 feature
9 | - 💪 enhancement
10 | - title: New Extension API Supported
11 | labels:
12 | - ⚡️ extension api
13 | - title: Refactor
14 | labels:
15 | - ⚙️ refactor
16 | - title: Breaking Changes
17 | labels:
18 | - 🛠 breaking change
19 | - title: Style Changes
20 | labels:
21 | - 💄 style change
22 | - title: Patch Changes
23 | labels:
24 | - 📌 patch
25 | - title: Other Changes
26 | labels:
27 | - '*'
28 |
--------------------------------------------------------------------------------
/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Number of days of inactivity before an issue becomes stale
2 | daysUntilStale: 60
3 | # Number of days of inactivity before a stale issue is closed
4 | daysUntilClose: 7
5 | # Issues with these labels will never be considered stale
6 | exemptLabels:
7 | - 🐞 bug
8 | - 🎨 feature
9 | - 🤔 help wanted
10 | - 👨🏻💻 good first issue
11 | - ⚡️ extension api
12 | # Label to use when marking an issue as stale
13 | staleLabel: 👾 wontfix
14 | # Comment to post when marking an issue as stale. Set to `false` to disable
15 | markComment: >
16 | 此问题已被自动标记为已过时,如果没有进一步的活动,它将被关闭。谢谢您的贡献。
17 |
18 | This issue has been automatically marked as stale because it has not had
19 | recent activity. It will be closed if no further activity occurs. Thank you
20 | for your contributions.
21 | # Comment to post when closing a stale issue. Set to `false` to disable
--------------------------------------------------------------------------------
/.github/workflows/auto-labeler.yml:
--------------------------------------------------------------------------------
1 | name: Auto Labeler
2 | on:
3 | pull_request_target:
4 | types: [opened, edited]
5 |
6 | jobs:
7 | labeler:
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: opensumi/actions/bot-token@main
12 | id: bot-token
13 | with:
14 | token-server: ${{ secrets.BOT_TOKEN_SERVER }}
15 | flag: ${{ secrets.BOT_FLAG }}
16 |
17 | - name: Check Labels
18 | id: labeler
19 | uses: jimschubert/labeler-action@v2
20 | with:
21 | GITHUB_TOKEN: ${{env.GITHUB_TOKEN}}
22 |
--------------------------------------------------------------------------------
/.yarnrc.yml:
--------------------------------------------------------------------------------
1 | compressionLevel: mixed
2 |
3 | enableGlobalCache: false
4 |
5 | nodeLinker: node-modules
6 |
7 | yarnPath: .yarn/releases/yarn-4.2.2.cjs
8 |
--------------------------------------------------------------------------------
/LEGAL.md:
--------------------------------------------------------------------------------
1 | Legal Disclaimer
2 |
3 | Within this source code, the comments in Chinese shall be the original, governing version. Any comment in other languages are for reference only. In the event of any conflict between the Chinese language version comments and other language version comments, the Chinese language version shall prevail.
4 |
5 | 法律免责声明
6 |
7 | 关于代码注释部分,中文注释为官方版本,其它语言注释仅做参考。中文注释可能与其它语言注释存在不一致,当中文注释与其它语言注释存在不一致时,请以中文注释为准。
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2021-present Ant Group Co. Ltd.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README-zh_CN.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 基于 OpenSumi 的纯前端 IDE 基础框架
6 |
7 | [English](./README.md) | 简体中文
8 |
9 | ## 快速体验
10 | [https://codeblitz.cloud.alipay.com/](https://codeblitz.cloud.alipay.com/)
11 |
12 | ## 项目启动
13 |
14 | ### 准备
15 | 需要安装 yarn >= 1.22,使用 yarn 的 [workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) 来管理 packages
16 |
17 | ### 启动项目
18 | ```bash
19 | 1. yarn
20 | 2. yarn run init
21 | 3. yarn run start
22 | ```
23 | 终端打开输出的地址,默认端口 9009,如被占用,会从 9009 查找可用端口
24 |
25 | ### 示例 [codeblitz-sample](https://github.com/opensumi/codeblitz-sample)
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Pure Front-end IDE Framework based on OpenSumi
6 |
7 | ---
8 |
9 | [](https://ide.cloud.alipay.com/-/github.com/opensumi/codeblitz)
10 | [](https://codeblitz.cloud.alipay.com/github/opensumi/codeblitz)
11 |
12 | English | [简体中文](./README-zh_CN.md)
13 |
14 | ## Quick Experience
15 | [http://codeblitz.opensumi.com](http://codeblitz.opensumi.com)
16 |
17 |
18 | ## Project Startup
19 |
20 | ### Preparation
21 | Need to install yarn >= 1.22 and use yarn's [workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) to manage packages
22 | ### Start the project
23 | ```bash
24 | 1. yarn
25 | 2. yarn run init
26 | 3. yarn run start
27 | ```
28 | The terminal opens the output address, the default port is 9009, if it is occupied, it will search for available ports from 9009
29 |
30 | ### Samples [codeblitz-sample](https://github.com/opensumi/codeblitz-sample)
31 |
--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: '@commitlint/config-conventional',
3 | rules: {
4 | 'type-enum': [
5 | 2,
6 | 'always',
7 | [
8 | 'build',
9 | 'ci',
10 | 'chore',
11 | 'docs',
12 | 'feat',
13 | 'fix',
14 | 'perf',
15 | 'refactor',
16 | 'revert',
17 | 'style',
18 | 'test',
19 | 'release',
20 | ],
21 | ],
22 | },
23 | };
24 |
--------------------------------------------------------------------------------
/docs/zh/architecture.md:
--------------------------------------------------------------------------------
1 | # 架构简述
2 |
3 | CodeBlitz 将原来 OpenSumi 的功能封装成了一个 React 组件。
4 |
5 | 它的主入口在 `@codeblitzjs/ide-core` 这个包,用起来很简单:
6 |
7 | ```tsx
8 | import { AppRenderer, EditorRenderer } from '@codeblitzjs/ide-core';
9 |
10 | function App() {
11 | return
12 | }
13 |
14 | function Editor() {
15 | return
16 | }
17 | ```
18 |
19 | 此外还提供了 `DiffViewerRenderer`,这是我们的新版 Diff 组件,所有的 diff 在行内展示,并且可以让用户选择是否采纳,
20 | 对于 AI 生成代码的场景特别有用。
21 |
22 | ## 产物
23 |
24 | CodeBlitz 有一个很特别的地方是它打包的产物分 `bundle` 与 `lib` 两种版本:
25 |
26 | 1. lib 下为源码经过 tsc 编译后的文件,因此如直接从 lib 下引用,那么可根据需要使用 OpenSumi (@opensumi/ide-*) 和 monaco (@opensumi/monaco-editor-core/esm) 相关模块,满足高定制的应用的需求,可以参考 [OpenSumi 开发文档](https://opensumi.com/zh/docs/integrate/universal-integrate-case/custom-view)。另外由于 lib 下的样式文件为 less,因此 webpack 需要额外处理 less 的编译。
27 |
28 | 2. 提供 bundle 方式可以减少集成方打包的时间,缺点就是整个 bundle 包体积很大。
29 | bundle 下为打包好的文件,只需引入 js 和 css 即可。
30 |
31 | 同时 CodeBlitz 还会打包成 umd 格式,方便在浏览器中直接引用,它的导出名为 `Alex`。
32 |
--------------------------------------------------------------------------------
/docs/zh/quick-start.md:
--------------------------------------------------------------------------------
1 | # Quick Start
2 |
3 | ## Clone
4 |
5 | ```bash
6 |
7 | git clone git@github.com:opensumi/codeblitz.git
8 | cd codeblitz
9 | ```
10 |
11 | ## Install
12 |
13 | ```bash
14 | yarn
15 | yarn run init
16 | ```
17 |
18 | ## Start
19 |
20 | ```bash
21 | yarn start
22 | ```
23 |
24 | CodeBlitz 有很多集成场景,在开发的时候需要模拟这些场景,你也可以直接通过命令行启动这些场景:
25 |
26 | - diff-viewer 行内的 diff 查看器
27 | `yarn diff-viewer`
28 | - code
29 | `yarn code`
30 | - provider 直接渲染编辑器组件、Diff 组件的例子
31 | 使用 `CodeEditor`/`DiffEditor`。
32 | `yarn provider`
33 |
--------------------------------------------------------------------------------
/docs/zh/release-codeblitz.md:
--------------------------------------------------------------------------------
1 | # 发布 CodeBlitz
2 |
3 | ## 更新 OpenSumi 版本
4 |
5 | 提供了一个脚本一键更新 OpenSumi 版本:
6 |
7 | ```sh
8 | node scripts/upgrade-opensumi.js -v x.x.x
9 | ```
10 |
11 | 在 codeblitz 项目根目录执行这个命令即可。
12 |
13 | 然后所有包的 OpenSumi 版本都会被更新为指定版本,将这些更新都提交了即可。
14 |
15 | ## 发布
16 |
17 | 发布流程和 OpenSumi 一样,参考这个 Wiki 即可:https://github.com/opensumi/core/wiki/%E5%8F%91%E5%B8%83%E6%96%87%E6%A1%A3
18 |
19 | 对应的 action 地址在这里:
20 |
21 | > 注意需要同步 @codeblitzjs/ide-core、@codeblitzjs/ide-sumi-core 的 CDN 资源
22 |
--------------------------------------------------------------------------------
/dprint.json:
--------------------------------------------------------------------------------
1 | {
2 | "typescript": {
3 | "quoteStyle": "alwaysSingle"
4 | },
5 | "json": {},
6 | "markdown": {},
7 | "toml": {},
8 | "includes": [
9 | "packages/**/*.{ts,tsx,js,jsx,json}"
10 | ],
11 | "excludes": ["**/node_modules", "**/*-lock.json", "packages/core/extensions/**"],
12 | "plugins": [
13 | "https://plugins.dprint.dev/typescript-0.91.0.wasm",
14 | "https://plugins.dprint.dev/json-0.19.3.wasm",
15 | "https://plugins.dprint.dev/markdown-0.17.1.wasm",
16 | "https://plugins.dprint.dev/toml-0.6.2.wasm"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'ts-jest',
3 | coverageDirectory: 'coverage',
4 | coverageReporters: ['html', 'lcov', 'text'],
5 | collectCoverageFrom: [
6 | 'packages/*/src/**/*.ts',
7 | '!packages/toolkit/**',
8 | '!packages/core/.kaitian/**',
9 | '!packages/core/extensions/**',
10 | ],
11 | watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'],
12 | moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
13 | moduleNameMapper: {
14 | '^@codeblitzjs/ide-core-(?!browserfs)(.*?)$': '/packages/$1/src',
15 | '^@codeblitzjs/ide-core$': '/packages/core/src',
16 | '\\.(css|less)$': '/scripts/jest/mocks/styleMock.js',
17 | },
18 | rootDir: __dirname,
19 | testMatch: ['/packages/**/__tests__/**/*@(test|spec).[jt]s?(x)'],
20 | testPathIgnorePatterns: ['/node_modules/'],
21 | setupFiles: ['./jest.setup.js'],
22 | };
23 |
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "node_modules/lerna/schemas/lerna-schema.json",
3 | "version": "2.5.1"
4 | }
--------------------------------------------------------------------------------
/packages/cli/README.md:
--------------------------------------------------------------------------------
1 | # @codeblitzjs/ide-cli
--------------------------------------------------------------------------------
/packages/cli/__tests__/extension/scanner.test.ts:
--------------------------------------------------------------------------------
1 | import { getExtensionIdByPath } from '../../src/extension/scanner';
2 |
3 | describe('cli extension scanner', () => {
4 | it('should get correct extension id', () => {
5 | let path = 'kaitian-worker.json-language-features-1.0.0';
6 | let version = '1.0.0';
7 | expect(getExtensionIdByPath(path, version)).toEqual({
8 | publisher: 'kaitian-worker',
9 | name: 'json-language-features',
10 | });
11 | expect(getExtensionIdByPath(path)).toEqual({
12 | publisher: 'kaitian-worker',
13 | name: 'json-language-features',
14 | });
15 |
16 | path = 'kaitian-worker.json-language-features-1.0.0-beta.1';
17 | version = '1.0.0-beta.1';
18 | expect(getExtensionIdByPath(path, version)).toEqual({
19 | publisher: 'kaitian-worker',
20 | name: 'json-language-features',
21 | });
22 | expect(getExtensionIdByPath(path)).toEqual({
23 | publisher: 'kaitian-worker',
24 | name: 'json-language-features',
25 | });
26 |
27 | expect(() => getExtensionIdByPath(path, '1.0.1')).toThrow();
28 |
29 | path = 'alex.worker-0.0.1';
30 | version = '0.0.1';
31 | expect(getExtensionIdByPath(path, version)).toEqual({ publisher: 'alex', name: 'worker' });
32 | });
33 | });
34 |
--------------------------------------------------------------------------------
/packages/cli/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@codeblitzjs/ide-cli",
3 | "version": "2.5.1",
4 | "description": "@codeblitzjs/ide-cli",
5 | "main": "lib/commander.js",
6 | "files": [
7 | "lib"
8 | ],
9 | "keywords": [
10 | "opensumi codeblitzjs"
11 | ],
12 | "engines": {
13 | "opensumi": "3.7.2-next-1741226843.0",
14 | "node": ">=18.0.0"
15 | },
16 | "dependencies": {
17 | "@codeblitzjs/ide-common": "workspace:*",
18 | "@opensumi/extension-installer": "^0.0.1",
19 | "@opensumi/ide-extension": "3.7.2-next-1741226843.0",
20 | "commander": "^7.2.0",
21 | "fs-extra": "^9.0.1",
22 | "lodash.pick": "^4.4.0",
23 | "portfinder": "^1.0.28",
24 | "rxjs": "^6.6.3",
25 | "semver": "^7.3.2",
26 | "send": "^0.19.0",
27 | "signale": "^1.4.0",
28 | "tslib": "^2.2.0"
29 | },
30 | "devDependencies": {
31 | "@types/commander": "^2.12.2",
32 | "@types/fs-extra": "^9.0.4",
33 | "@types/lodash.pick": "^4.4.6",
34 | "@types/semver": "^7.3.4",
35 | "@types/send": "^0.14.7",
36 | "@types/signale": "^1.4.1"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/packages/cli/src/commander.ts:
--------------------------------------------------------------------------------
1 | import { runCommand } from './factory';
2 |
3 | runCommand();
4 |
--------------------------------------------------------------------------------
/packages/cli/src/extension/metadata-type.ts:
--------------------------------------------------------------------------------
1 | import * as fse from 'fs-extra';
2 | import * as path from 'path';
3 | import { IExtensionInstallationConfig, resolveExtensionInstallationConfig } from '../util/constant';
4 |
5 | const referenceFile = '_reference.d.ts';
6 |
7 | async function createReference(config: IExtensionInstallationConfig) {
8 | const refPath = path.join(config.extensionMetadataDir, referenceFile);
9 | if (!(await fse.pathExists(refPath))) {
10 | await fse.writeFile(
11 | refPath,
12 | `
13 | import { IExtensionBasicMetadata } from '@codeblitzjs/ide-common'
14 | declare const metadata: IExtensionBasicMetadata;
15 | export { metadata }
16 | `.trim() + '\n',
17 | );
18 | }
19 | }
20 |
21 | export async function createMetadataType(extensionId: string) {
22 | const config = resolveExtensionInstallationConfig();
23 | const content = `
24 | import { metadata } from './_reference';
25 | export = metadata;
26 | `.trim() + '\n';
27 | await createReference(config);
28 | return fse.writeFile(path.join(config.extensionMetadataDir, `${extensionId}.d.ts`), content);
29 | }
30 |
--------------------------------------------------------------------------------
/packages/cli/src/extension/type.ts:
--------------------------------------------------------------------------------
1 | import { JSONType } from '@codeblitzjs/ide-common';
2 |
3 | export {
4 | IExtensionBasicMetadata,
5 | IExtensionDesc,
6 | IExtensionIdentity,
7 | IExtensionMetadata,
8 | IExtensionMode,
9 | JSONType,
10 | NLSInfo,
11 | } from '@codeblitzjs/ide-common';
12 |
13 | export interface IExtensionContributions extends JSONType {}
14 |
15 | export interface IKaitianExtensionContributions extends JSONType {}
16 |
17 | export interface IExtensionServerOptions {
18 | host?: string;
19 | }
20 |
--------------------------------------------------------------------------------
/packages/cli/src/util/check-framework.ts:
--------------------------------------------------------------------------------
1 | import { kExtensionConfig, resolveFrameworkPath } from './constant';
2 | import { log } from './log';
3 |
4 | export default function checkFramework() {
5 | const frameworkPath = resolveFrameworkPath();
6 | if (!frameworkPath) {
7 | log.error(`cli 无法单独使用,需要与 ${kExtensionConfig.frameworkPackageName} 一起安装使用`);
8 | throw new Error('error');
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/cli/src/util/index.ts:
--------------------------------------------------------------------------------
1 | import { IExtensionDesc } from '../extension/type';
2 |
3 | export const formatExtension = (ext: IExtensionDesc) =>
4 | `${ext.publisher}.${ext.name}${ext.version ? `@${ext.version}` : ''}`;
5 |
6 | export const stripSourceMappingURL = (content: string) => content.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, '');
7 |
--------------------------------------------------------------------------------
/packages/cli/src/util/log.ts:
--------------------------------------------------------------------------------
1 | import { Signale } from 'signale';
2 | import { kExtensionConfig } from './constant';
3 |
4 | const log = new Signale();
5 |
6 | const error = (msg) => {
7 | log.error(msg);
8 | throw new Error(msg);
9 | };
10 |
11 | export const init = () => {
12 | log.scope(kExtensionConfig.product);
13 | };
14 |
15 | export { error, log };
16 |
--------------------------------------------------------------------------------
/packages/cli/src/util/path.ts:
--------------------------------------------------------------------------------
1 | import path from 'path';
2 |
3 | export function resolveCWDPkgJSON() {
4 | const initCWD = process.env.INIT_CWD || process.cwd();
5 | return path.resolve(initCWD, 'package.json');
6 | }
7 |
--------------------------------------------------------------------------------
/packages/cli/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib",
6 | "types": ["node"],
7 | "module": "commonjs",
8 | "target": "ES5"
9 | },
10 | "include": [
11 | "./src"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/packages/code-api/__tests__/index.test.ts:
--------------------------------------------------------------------------------
1 | describe('code-api', () => {
2 | it('example', () => {
3 | expect(1 + 1).toBe(2);
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/packages/code-api/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@codeblitzjs/ide-code-api",
3 | "version": "2.5.1",
4 | "description": "@codeblitzjs/ide-code-api",
5 | "main": "lib/index.js",
6 | "typings": "lib/index.d.ts",
7 | "files": [
8 | "lib"
9 | ],
10 | "keywords": [
11 | "opensumi codeblitzjs"
12 | ],
13 | "dependencies": {
14 | "@codeblitzjs/ide-common": "workspace:*",
15 | "@codeblitzjs/ide-sumi-core": "workspace:*",
16 | "mobx": "^6.12.0",
17 | "tslib": "^2.2.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/code-api/src/code-api.contribution.ts:
--------------------------------------------------------------------------------
1 | import { Autowired } from '@opensumi/di';
2 | import { ClientAppContribution, CommandRegistry, SlotLocation } from '@opensumi/ide-core-browser';
3 | import { CommandContribution, Domain } from '@opensumi/ide-core-common';
4 | import { IMainLayoutService } from '@opensumi/ide-main-layout';
5 | import { CodeAPIProvider } from './code-api.provider';
6 | import { CodePlatform, ICodeAPIProvider } from './common/types';
7 |
8 | @Domain(CommandContribution, ClientAppContribution)
9 | export class CodeAPIContribution implements CommandContribution, ClientAppContribution {
10 | @Autowired(ICodeAPIProvider)
11 | codeAPI: CodeAPIProvider;
12 |
13 | @Autowired(IMainLayoutService)
14 | layoutService: IMainLayoutService;
15 |
16 | registerCommands(registry: CommandRegistry) {
17 | registry.afterExecuteCommand(`workbench.view.${CodePlatform.github}`, () => {
18 | this.codeAPI.github.refresh();
19 | });
20 | }
21 |
22 | onDidStart() {
23 | this.layoutService
24 | .getTabbarService(SlotLocation.left)
25 | .onCurrentChange(({ currentId, previousId }) => {
26 | if (previousId !== currentId && currentId === CodePlatform.github) {
27 | this.codeAPI.github.refresh();
28 | }
29 | });
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/packages/code-api/src/common/constant.ts:
--------------------------------------------------------------------------------
1 | export const GITHUB_OAUTH_TOKEN = 'codeblitz.github-oauth-token';
2 |
3 | export const GITLAB_PRIVATE_TOKEN = 'codeblitz.gitlab-private-token';
4 |
5 | export const ATOMGIT_PRIVATE_TOKEN = 'codeblitz.atomgit-private-token';
6 |
7 | export const GITEE_PRIVATE_TOKEN = 'codeblitz.gitee-private-token';
8 |
--------------------------------------------------------------------------------
/packages/code-api/src/common/index.ts:
--------------------------------------------------------------------------------
1 | export * from './config';
2 | export * from './constant';
3 | export * from './service';
4 | export * from './types';
5 | export * from './utils';
6 |
--------------------------------------------------------------------------------
/packages/code-api/src/common/utils.ts:
--------------------------------------------------------------------------------
1 | export class RetryError extends Error {}
2 |
3 | export const retry = (target: any, key: string, descriptor: any) => {
4 | const fn = descriptor.value;
5 | descriptor.value = async function(...args: any[]) {
6 | try {
7 | return await fn.call(this, ...args);
8 | } catch (err) {
9 | if (err instanceof RetryError) {
10 | return fn.call(this, ...args);
11 | }
12 | throw err;
13 | }
14 | };
15 | };
16 |
17 | /**
18 | * 解析代码托管平台 url,获取相关数据信息
19 | */
20 | export const parseCodeHostURL = (href: string) => {
21 | if (!href) return null;
22 | };
23 |
--------------------------------------------------------------------------------
/packages/code-api/src/github/github.module.less:
--------------------------------------------------------------------------------
1 | .container {
2 | padding: 8px;
3 | padding-top: 0;
4 | }
5 |
6 | .title {
7 | font-size: 15px;
8 | font-weight: 500;
9 | }
10 |
11 | .rateList {
12 | padding-left: 0;
13 | margin-bottom: 0;;
14 |
15 | .rateData {
16 | font-weight: 600;
17 | }
18 | }
19 |
20 | .resource {
21 | margin-bottom: 4px;
22 | }
23 |
24 | .resourceTitle {
25 | color: var(--descriptionForeground);
26 | padding: 4px 0;
27 | }
28 |
29 | .rateItem {
30 | display: flex;
31 | > span {
32 | width: 100px;
33 | }
34 | }
35 |
36 | .authTip {
37 | color: var(--descriptionForeground)
38 | }
39 |
40 | .authInput {
41 | margin: 4px 0;
42 | }
--------------------------------------------------------------------------------
/packages/code-api/src/gitlab/gitlab.module.less:
--------------------------------------------------------------------------------
1 | .container {
2 | padding: 8px;
3 | padding-top: 0;
4 | }
5 |
6 | .title {
7 | font-size: 15px;
8 | font-weight: 500;
9 | }
10 |
11 | .authTip {
12 | color: var(--descriptionForeground)
13 | }
14 |
15 | .authInput {
16 | margin: 4px 0;
17 | }
--------------------------------------------------------------------------------
/packages/code-api/src/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable, Provider } from '@opensumi/di';
2 | import { BrowserModule } from '@opensumi/ide-core-browser';
3 | import { CodeAPIContribution } from './code-api.contribution';
4 | import { CodeAPIProvider } from './code-api.provider';
5 | import { ICodeAPIProvider } from './common/types';
6 |
7 | export * from './common';
8 |
9 | @Injectable()
10 | export class CodeAPIModule extends BrowserModule {
11 | providers: Provider[] = [
12 | {
13 | token: ICodeAPIProvider,
14 | useClass: CodeAPIProvider,
15 | },
16 | CodeAPIContribution,
17 | ];
18 | }
19 |
--------------------------------------------------------------------------------
/packages/code-api/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib"
6 | },
7 | "include": [
8 | "./src"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/code-service/README.md:
--------------------------------------------------------------------------------
1 | # code-service
--------------------------------------------------------------------------------
/packages/code-service/__tests__/index.test.ts:
--------------------------------------------------------------------------------
1 | describe('code-service', () => {
2 | it('example', () => {
3 | expect(1 + 1).toBe(2);
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/packages/code-service/__tests__/utils.test.ts:
--------------------------------------------------------------------------------
1 | import { CodePlatformRegistry } from '../../code-api/src/common/config';
2 | import { parseGitmodules, parseSubmoduleUrl } from '../src/utils';
3 |
4 | const submodules = [
5 | {
6 | platform: 'github',
7 | owner: 'microsoft',
8 | name: 'vscode',
9 | path: 'lib/vscode',
10 | url: 'https://github.com/microsoft/vscode.git',
11 | },
12 | ];
13 |
14 | const submodulesContent = submodules.reduce((str, item) => {
15 | const submodule = `
16 | [submodule "${item.name}"]
17 | path = ${item.path}
18 | url = ${item.url}
19 | `;
20 | return str + submodule;
21 | }, '');
22 |
23 | describe(__filename, () => {
24 | it('parseGitmodules', () => {
25 | expect(parseGitmodules(submodulesContent)).toEqual(
26 | submodules.map((item) => ({
27 | name: item.name,
28 | path: item.path,
29 | url: item.url,
30 | })),
31 | );
32 | });
33 |
34 | it('parseSubmoduleUrl', () => {
35 | const configs = CodePlatformRegistry.instance().getCodePlatformConfigs();
36 | submodules.forEach((item) => {
37 | expect(parseSubmoduleUrl(item.url, configs)).toEqual({
38 | owner: item.owner,
39 | name: item.name,
40 | platform: item.platform,
41 | });
42 | });
43 | });
44 | });
45 |
--------------------------------------------------------------------------------
/packages/code-service/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@codeblitzjs/ide-code-service",
3 | "version": "2.5.1",
4 | "description": "@codeblitzjs/ide-code-service",
5 | "main": "lib/index.js",
6 | "typings": "lib/index.d.ts",
7 | "files": [
8 | "lib"
9 | ],
10 | "keywords": [
11 | "opensumi codeblitzjs"
12 | ],
13 | "dependencies": {
14 | "@codeblitzjs/ide-code-api": "workspace:*",
15 | "@codeblitzjs/ide-sumi-core": "workspace:*",
16 | "tslib": "^2.2.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/code-service/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib"
6 | },
7 | "include": [
8 | "./src"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/common/README.md:
--------------------------------------------------------------------------------
1 | # @codeblitzjs/ide-common
2 |
3 | 通用代码
4 |
5 | - src 下为一些公共的类型或工具方法
6 |
7 |
--------------------------------------------------------------------------------
/packages/common/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@codeblitzjs/ide-common",
3 | "version": "2.5.1",
4 | "description": "@codeblitzjs/ide-common",
5 | "main": "lib/index.js",
6 | "typing": "lib/index.d.ts",
7 | "files": [
8 | "lib"
9 | ],
10 | "keywords": [
11 | "opensumi codeblitzjs"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/packages/common/src/cdn.ts:
--------------------------------------------------------------------------------
1 | export type TComponentCDNType = 'unpkg' | 'jsdelivr' | 'alipay' | 'npmmirror';
2 |
3 | type IComponentCDNTypeMap = Record;
4 |
5 | const CDN_TYPE_MAP: IComponentCDNTypeMap = {
6 | alipay: 'https://gw.alipayobjects.com/os/lib',
7 | npmmirror: 'https://registry.npmmirror.com',
8 | unpkg: 'https://unpkg.com/browse',
9 | jsdelivr: 'https://cdn.jsdelivr.net/npm',
10 | };
11 |
12 | export function getResource(
13 | packageName: string,
14 | filePath: string,
15 | version: string,
16 | cdnType: TComponentCDNType = 'alipay',
17 | ) {
18 | if (cdnType === 'alipay') {
19 | return `${CDN_TYPE_MAP['alipay']}/${packageName.slice(1)}/${version}/${filePath}`;
20 | } else if (cdnType === 'npmmirror') {
21 | return `${CDN_TYPE_MAP['npmmirror']}/${packageName}/${version}/files/${filePath}`;
22 | } else {
23 | return `${CDN_TYPE_MAP[cdnType]}/${packageName}@${version}/${filePath}`;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/common/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './mutex';
2 | export * from './request';
3 | export * from './types';
4 | export * from './cdn';
5 |
--------------------------------------------------------------------------------
/packages/common/src/mutex.ts:
--------------------------------------------------------------------------------
1 | export class Mutex {
2 | private mutex = Promise.resolve();
3 |
4 | lock(): PromiseLike<() => void> {
5 | let begin: (unlock: () => void) => void = () => {};
6 |
7 | this.mutex = this.mutex.then(() => new Promise(begin));
8 |
9 | return new Promise((res) => {
10 | begin = res;
11 | });
12 | }
13 |
14 | async dispatch(fn: () => PromiseLike): Promise {
15 | const unlock = await this.lock();
16 | try {
17 | return await Promise.resolve(fn());
18 | } finally {
19 | unlock();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/common/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from './extension';
2 | export * from './util';
3 |
--------------------------------------------------------------------------------
/packages/common/src/types/util.ts:
--------------------------------------------------------------------------------
1 | export type Optional = Omit & Partial;
2 |
3 | export type Equals = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? true
4 | : false;
5 |
--------------------------------------------------------------------------------
/packages/common/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib"
6 | },
7 | "include": [
8 | "./src"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | branches: [ main ]
6 | pull_request:
7 | branches: [ main ]
8 |
9 | workflow_dispatch:
10 |
11 | jobs:
12 | build:
13 | strategy:
14 | fail-fast: false
15 | matrix:
16 | os: [macos-latest, ubuntu-latest, windows-latest]
17 | runs-on: ${{ matrix.os }}
18 |
19 | steps:
20 | - name: Checkout
21 | uses: actions/checkout@v2
22 | - name: Install Node.js
23 | uses: actions/setup-node@v1
24 | with:
25 | node-version: 16.x
26 | - run: npm install
27 | - run: npm run vscode:prepublish
28 | - run: npm run lint
29 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.1.5 (2021-12-12)
2 | * Open webview to the side of the active column
3 |
4 | ## 0.1.4 (2021-12-11)
5 | * Load packages built in Pyodide
6 |
7 | ## 0.1.3 (2021-12-05)
8 | * Add telemetry
9 |
10 | ## 0.1.2 (2021-12-04)
11 | * Try to fix issue in Chrome: `Failed to set the 'innerHTML' property on 'Element': This document requires 'TrustedHTML' assignment.`
12 |
13 | ## 0.1.1 (2021-12-04)
14 | * Fix repository url
15 | * Add GitHub Actions
16 |
17 | ## 0.1.0 (2021-12-04)
18 | * Initial Release
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Jun Han
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/README.md:
--------------------------------------------------------------------------------
1 | # Code Runner for Web
2 |
3 | [](https://github.com/formulahendry/vscode-code-runner-for-web/actions/workflows/main.yml)
4 |
5 | Run code in browser: Python
6 |
7 | ## Usages
8 |
9 | * To run code:
10 | * open **Command Palette** (Ctrl+Shift+P), then type `Run Code in Web`,
11 | * or right click the Text Editor and then click `Run Code in Web` in editor context menu
12 | * or click `Run Code in Web` button in editor title menu
13 |
14 | 
15 |
16 | ## Limitation
17 |
18 | * Only support [Python standard library](https://docs.python.org/3/library/) and [prebuilt Python packages in Pyodide](https://pyodide.org/en/latest/usage/packages-in-pyodide.html)
19 | * Only support running single Python file
20 |
21 | ## Telemetry
22 |
23 | Anonymous telemetry collection is on by default. To opt out, please set the `telemetry.enableTelemetry` setting to `false`. Learn more in [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/images/logo.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/images/usage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/images/usage.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json"
4 | ]
5 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/pyodide/distutils.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/pyodide/distutils.data
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/pyodide/pyodide.asm.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/pyodide/pyodide.asm.data
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/pyodide/pyodide.asm.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.code-runner-for-web-0.1.5-patch.1/pyodide/pyodide.asm.wasm
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.codeswing-0.0.21/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) Jonathan Carter and Contributors.
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.codeswing-0.0.21/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.codeswing-0.0.21/images/icon.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.css-language-features-worker-1.53.0-patch.3/README.md:
--------------------------------------------------------------------------------
1 | # Language Features for CSS, SCSS, and LESS files
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [CSS, SCSS and Less in VS Code](https://code.visualstudio.com/docs/languages/css) to learn about the features of this extension.
8 |
9 | Please read the [CONTRIBUTING.md](https://github.com/microsoft/vscode/blob/master/extensions/css-language-features/CONTRIBUTING.md) file to learn how to contribute to this extension.
10 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.css-language-features-worker-1.53.0-patch.3/icons/css.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.css-language-features-worker-1.53.0-patch.3/icons/css.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.css-language-features-worker-1.53.0-patch.3/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json",
4 | "server/dist/browser/cssServerMain.js",
5 | "client/dist/browser/cssClientMain.js",
6 | "schemas/package.schema.json",
7 | "README.md",
8 | "icons/css.png",
9 | "package.nls.json"
10 | ]
11 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.css-language-features-worker-1.53.0-patch.3/schemas/package.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-07/schema#",
3 | "title": "CSS contributions to package.json",
4 | "type": "object",
5 | "properties": {
6 | "contributes": {
7 | "type": "object",
8 | "properties": {
9 | "css.customData": {
10 | "type": "array",
11 | "markdownDescription": "A list of relative file paths pointing to JSON files following the [custom data format](https://github.com/microsoft/vscode-css-languageservice/blob/master/docs/customData.md).\n\nVS Code loads custom data on startup to enhance its CSS support for the custom CSS properties, at directives, pseudo classes and pseudo elements you specify in the JSON files.\n\nThe file paths are relative to workspace and only workspace folder settings are considered.",
12 | "items": {
13 | "type": "string",
14 | "description": "Relative path to a CSS custom data file"
15 | }
16 | }
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.css-language-features-worker-1.53.0-patch.3/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vscode-css-languageserver",
3 | "description": "CSS/LESS/SCSS language server",
4 | "version": "1.0.0",
5 | "author": "Microsoft Corporation",
6 | "license": "MIT",
7 | "engines": {
8 | "node": "*"
9 | },
10 | "main": "./out/node/cssServerMain",
11 | "browser": "./dist/browser/cssServerMain",
12 | "dependencies": {
13 | "vscode-css-languageservice": "^4.4.0",
14 | "vscode-languageserver": "7.0.0-next.3",
15 | "vscode-uri": "^2.1.2"
16 | },
17 | "devDependencies": {
18 | "@types/mocha": "7.0.2",
19 | "@types/node": "^12.11.7",
20 | "glob": "^7.1.6",
21 | "mocha": "^7.1.2",
22 | "mocha-junit-reporter": "^1.23.3",
23 | "mocha-multi-reporters": "^1.1.7"
24 | },
25 | "scripts": {
26 | "compile": "gulp compile-extension:css-language-features-server",
27 | "watch": "gulp watch-extension:css-language-features-server",
28 | "install-service-next": "yarn add vscode-css-languageservice@next",
29 | "install-service-local": "npm install ../../../../vscode-css-languageservice -f",
30 | "install-server-next": "yarn add vscode-languageserver@next",
31 | "install-server-local": "npm install ../../../../vscode-languageserver-node/server -f",
32 | "test": "node ./test/index.js"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.emmet-1.0.0/README.md:
--------------------------------------------------------------------------------
1 | # Emmet integration in Visual Studio Code
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [Emmet in Visual Studio Code](https://code.visualstudio.com/docs/editor/emmet) to learn about the features of this extension.
8 |
9 | Please read the [CONTRIBUTING.md](https://github.com/microsoft/vscode/blob/master/extensions/emmet/CONTRIBUTING.md) file to learn how to contribute to this extension.
10 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.emmet-1.0.0/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.emmet-1.0.0/images/icon.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.emmet-1.0.0/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json"
4 | ]
5 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.git-graph-1.30.0-3/LEGAL.md:
--------------------------------------------------------------------------------
1 | Legal Disclaimer
2 |
3 | Within this source code, the comments in Chinese shall be the original, governing version. Any comment in other languages are for reference only. In the event of any conflict between the Chinese language version comments and other language version comments, the Chinese language version shall prevail.
4 |
5 | 法律免责声明
6 |
7 | 关于代码注释部分,中文注释为官方版本,其它语言注释仅做参考。中文注释可能与其它语言注释存在不一致,当中文注释与其它语言注释存在不一致时,请以中文注释为准。
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.git-graph-1.30.0-3/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json",
4 | "media/out.min.js",
5 | "media/out.min.css",
6 | "README.md",
7 | "resources/icon.png",
8 | "resources/webview-icon.svg",
9 | "resources/webview-icon-dark.svg",
10 | "resources/webview-icon-light.svg",
11 | "resources/cmd-icon-dark.svg",
12 | "resources/cmd-icon-light.svg",
13 | "dist/extension.js"
14 | ]
15 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.git-graph-1.30.0-3/resources/cmd-icon-dark.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.git-graph-1.30.0-3/resources/cmd-icon-light.svg:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.git-graph-1.30.0-3/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.git-graph-1.30.0-3/resources/icon.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.git-graph-1.30.0-3/resources/webview-icon-dark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.git-graph-1.30.0-3/resources/webview-icon-light.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.git-graph-1.30.0-3/resources/webview-icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/LEGAL.md:
--------------------------------------------------------------------------------
1 | Legal Disclaimer
2 |
3 | Within this source code, the comments in Chinese shall be the original, governing version. Any comment in other languages are for reference only. In the event of any conflict between the Chinese language version comments and other language version comments, the Chinese language version shall prevail.
4 |
5 | 法律免责声明
6 |
7 | 关于代码注释部分,中文注释为官方版本,其它语言注释仅做参考。中文注释可能与其它语言注释存在不一致,当中文注释与其它语言注释存在不一致时,请以中文注释为准。
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/README.md:
--------------------------------------------------------------------------------
1 | # GitLens
2 | > fork vscode GitLens 扩展,适配代码服务接口,当前暂时支持 Ant Code
3 |
4 | ## 功能
5 |
6 | ### blame
7 | #### 单行 blame
8 | 显示当前光标行的 blame,hover 可查看对应 commit,点击跳转到远程地址
9 |
10 | #### 文件 blame
11 | 通过点击 editor 右侧 gitlens icon 或通过命令行输入命令 `gitlens.toggleFileBlame`,再次点击或按 Escape 关闭
12 |
13 | ## TODO
14 | 左侧面板增加其它信息
15 | - commits
16 | - 文件历史
17 | - 分支和标签
18 | - 搜索和对比
19 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/dark/highlight-gutter.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/dark/icon-git-orange.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/dark/icon-git-progress.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/dark/icon-git.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/gitlens-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/gitlens-icon.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/light/highlight-gutter.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/light/icon-git-orange.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/light/icon-git-progress.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/images/light/icon-git.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.gitlens-10.2.3-2/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json",
4 | "README.md",
5 | "images/gitlens-icon.png",
6 | "dist/extension.js"
7 | ]
8 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.html-language-features-worker-1.53.0-patch.3/README.md:
--------------------------------------------------------------------------------
1 | # Language Features for HTML
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [HTML in Visual Studio Code](https://code.visualstudio.com/docs/languages/html) to learn about the features of this extension.
8 |
9 | Please read the [CONTRIBUTING.md](https://github.com/microsoft/vscode/blob/master/extensions/html-language-features/CONTRIBUTING.md) file to learn how to contribute to this extension.
10 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.html-language-features-worker-1.53.0-patch.3/icons/html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.html-language-features-worker-1.53.0-patch.3/icons/html.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.html-language-features-worker-1.53.0-patch.3/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json",
4 | "server/dist/browser/htmlServerMain.js",
5 | "server/lib/cgmanifest.json",
6 | "server/lib/jquery.d.ts",
7 | "client/dist/browser/htmlClientMain.js",
8 | "schemas/package.schema.json",
9 | "README.md",
10 | "icons/html.png",
11 | "package.nls.json"
12 | ]
13 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.html-language-features-worker-1.53.0-patch.3/schemas/package.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-07/schema#",
3 | "title": "HTML contributions to package.json",
4 | "type": "object",
5 | "properties": {
6 | "contributes": {
7 | "type": "object",
8 | "properties": {
9 | "html.customData": {
10 | "type": "array",
11 | "markdownDescription": "A list of relative file paths pointing to JSON files following the [custom data format](https://github.com/microsoft/vscode-html-languageservice/blob/master/docs/customData.md).\n\nVS Code loads custom data on startup to enhance its HTML support for the custom HTML tags, attributes and attribute values you specify in the JSON files.\n\nThe file paths are relative to workspace and only workspace folder settings are considered.",
12 | "items": {
13 | "type": "string",
14 | "description": "Relative path to a HTML custom data file"
15 | }
16 | }
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.html-language-features-worker-1.53.0-patch.3/server/lib/cgmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "registrations": [
3 | {
4 | "component": {
5 | "type": "git",
6 | "git": {
7 | "name": "definitelytyped",
8 | "repositoryUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped",
9 | "commitHash": "69e3ac6bec3008271f76bbfa7cf69aa9198c4ff0"
10 | }
11 | },
12 | "license": "MIT"
13 | }
14 | ],
15 | "version": 1
16 | }
17 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.image-preview-1.53.0-patch.1/README.md:
--------------------------------------------------------------------------------
1 | # Image Preview
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | This extension provides VS Code's built-in image preview functionality.
8 |
9 | Supported image formats:
10 |
11 | - `*.jpg`, `*.jpe`, `*.jpeg`
12 | - `*.png`
13 | - `*.bmp`
14 | - `*.gif`
15 | - `*.ico`
16 | - `*.webp`
17 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.image-preview-1.53.0-patch.1/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.image-preview-1.53.0-patch.1/icon.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.image-preview-1.53.0-patch.1/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json",
4 | "media/main.js",
5 | "media/main.css",
6 | "media/loading.svg",
7 | "media/loading-dark.svg",
8 | "media/loading-hc.svg",
9 | "README.md",
10 | "icon.png",
11 | "icon.svg",
12 | "dist/browser/extension.js"
13 | ]
14 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.image-preview-1.53.0-patch.1/media/loading-dark.svg:
--------------------------------------------------------------------------------
1 |
2 |
32 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.image-preview-1.53.0-patch.1/media/loading-hc.svg:
--------------------------------------------------------------------------------
1 |
2 |
32 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.image-preview-1.53.0-patch.1/media/loading.svg:
--------------------------------------------------------------------------------
1 |
2 |
32 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.image-preview-1.53.0-patch.1/package.nls.json:
--------------------------------------------------------------------------------
1 | {
2 | "displayName": "Image Preview",
3 | "description": "Provides VS Code's built-in image preview",
4 | "customEditors.displayName": "Image Preview",
5 | "command.zoomIn": "Zoom in",
6 | "command.zoomOut": "Zoom out"
7 | }
8 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.json-language-features-worker-1.53.0-patch.3/README.md:
--------------------------------------------------------------------------------
1 | # Language Features for JSON files
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [JSON in Visual Studio Code](https://code.visualstudio.com/docs/languages/json) to learn about the features of this extension.
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.json-language-features-worker-1.53.0-patch.3/icons/json.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.json-language-features-worker-1.53.0-patch.3/icons/json.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.json-language-features-worker-1.53.0-patch.3/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json",
4 | "server/dist/browser/jsonServerMain.js",
5 | "README.md",
6 | "icons/json.png",
7 | "client/dist/browser/jsonClientMain.js",
8 | "package.nls.json",
9 | "http://json-schema.org/draft-07/schema#"
10 | ]
11 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.markdown-language-features-worker-1.53.0-patch.2/README.md:
--------------------------------------------------------------------------------
1 | # Language Features for Markdown files
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [Markdown in Visual Studio Code](https://code.visualstudio.com/docs/languages/markdown) to learn about the features of this extension.
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.markdown-language-features-worker-1.53.0-patch.2/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.markdown-language-features-worker-1.53.0-patch.2/icon.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.markdown-language-features-worker-1.53.0-patch.2/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json",
4 | "media/highlight.css",
5 | "media/index.js",
6 | "media/markdown.css",
7 | "media/pre.js",
8 | "media/preview-dark.svg",
9 | "media/preview-light.svg",
10 | "package.nls.json",
11 | "schemas/package.schema.json",
12 | "dist/browser/extension.js",
13 | "README.md",
14 | "icon.png"
15 | ]
16 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.markdown-language-features-worker-1.53.0-patch.2/media/preview-dark.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.markdown-language-features-worker-1.53.0-patch.2/media/preview-light.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.markdown-language-features-worker-1.53.0-patch.2/schemas/package.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-07/schema#",
3 | "title": "Markdown contributions to package.json",
4 | "type": "object",
5 | "properties": {
6 | "contributes": {
7 | "type": "object",
8 | "properties": {
9 | "markdown.previewStyles": {
10 | "type": "array",
11 | "description": "Contributed CSS files that change the look or layout of the Markdown preview",
12 | "items": {
13 | "type": "string",
14 | "description": "Extension relative path to a css file"
15 | }
16 | },
17 | "markdown.previewScripts": {
18 | "type": "array",
19 | "description": "Contributed scripts that are executed in the Markdown preview",
20 | "items": {
21 | "type": "string",
22 | "description": "Extension relative path to a JavaScript file"
23 | }
24 | },
25 | "markdown.markdownItPlugins": {
26 | "type": "boolean",
27 | "description": "Does this extension contribute a markdown-it plugin?"
28 | }
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.merge-conflict-1.0.0/README.md:
--------------------------------------------------------------------------------
1 | # Merge Conflict
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [Merge Conflicts in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_merge-conflicts) to learn about features of this extension.
8 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.merge-conflict-1.0.0/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json"
4 | ]
5 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.merge-conflict-1.0.0/media/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.merge-conflict-1.0.0/media/icon.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.references-view-1.0.0/kaitian-meta.json:
--------------------------------------------------------------------------------
1 | {
2 | "web-assets": [
3 | "package.json"
4 | ]
5 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.references-view-1.0.0/media/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.references-view-1.0.0/media/demo.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.references-view-1.0.0/media/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.references-view-1.0.0/media/icon.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.typescript-language-features-worker-1.53.0-patch.4/README.md:
--------------------------------------------------------------------------------
1 | # Language Features for TypeScript and JavaScript files
2 |
3 | **Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
4 |
5 | ## Features
6 |
7 | See [TypeScript in Visual Studio Code](https://code.visualstudio.com/docs/languages/typescript) and [JavaScript in Visual Studio Code](https://code.visualstudio.com/docs/languages/javascript) to learn about the features of this extension.
8 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.typescript-language-features-worker-1.53.0-patch.4/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/.cloudide/extensions/codeblitz.typescript-language-features-worker-1.53.0-patch.4/icon.png
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.typescript-language-features-worker-1.53.0-patch.4/language-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "comments": {
3 | "lineComment": "//",
4 | "blockComment": [ "/*", "*/" ]
5 | },
6 | "brackets": [
7 | ["{", "}"],
8 | ["[", "]"],
9 | ["(", ")"]
10 | ],
11 | "autoClosingPairs": [
12 | { "open": "{", "close": "}" },
13 | { "open": "[", "close": "]" },
14 | { "open": "(", "close": ")" },
15 | { "open": "'", "close": "'", "notIn": ["string", "comment"] },
16 | { "open": "\"", "close": "\"", "notIn": ["string"] },
17 | { "open": "`", "close": "`", "notIn": ["string", "comment"] },
18 | { "open": "/**", "close": " */", "notIn": ["string"] }
19 | ],
20 | "surroundingPairs": [
21 | ["{", "}"],
22 | ["[", "]"],
23 | ["(", ")"],
24 | ["'", "'"],
25 | ["\"", "\""],
26 | ["`", "`"]
27 | ],
28 | "folding": {
29 | "markers": {
30 | "start": "^\\s*//\\s*#?region\\b",
31 | "end": "^\\s*//\\s*#?endregion\\b"
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.typescript-language-features-worker-1.53.0-patch.4/schemas/jsconfig.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "allowTrailingCommas": true,
3 | "title": "JSON schema for the JavaScript configuration file",
4 | "type": "object",
5 | "default": {
6 | "compilerOptions": {
7 | "target": "es6"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.typescript-language-features-worker-1.53.0-patch.4/schemas/package.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-07/schema#",
3 | "title": "TypeScript contributions to package.json",
4 | "type": "object",
5 | "properties": {
6 | "contributes": {
7 | "type": "object",
8 | "properties": {
9 | "typescriptServerPlugins": {
10 | "type": "array",
11 | "description": "Contributed TypeScript server plugins.",
12 | "items": {
13 | "type": "object",
14 | "description": "TypeScript server plugin.",
15 | "properties": {
16 | "name": {
17 | "type": "string",
18 | "description": "Name of the plugin as listed in the package.json."
19 | },
20 | "enableForWorkspaceTypeScriptVersions": {
21 | "type": "boolean",
22 | "default": false,
23 | "description": "Should the plugin be loaded when using workspace versions of TypeScript?"
24 | }
25 | }
26 | }
27 | }
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/codeblitz.typescript-language-features-worker-1.53.0-patch.4/schemas/tsconfig.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "allowTrailingCommas": true,
3 | "title": "JSON schema for the TypeScript compiler's configuration file",
4 | "type": "object",
5 | "default": {
6 | "compilerOptions": {
7 | "module": "commonjs"
8 | },
9 | "exclude": [
10 | "node_modules"
11 | ]
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/ThirdPartyNotices.txt:
--------------------------------------------------------------------------------
1 | NOTICES AND INFORMATION
2 | Do Not Translate or Localize
3 |
4 | This software incorporates material from third parties.
5 | Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com,
6 | or you may send a check or money order for US $5.00, including the product name,
7 | the open source component name, platform, and version number, to:
8 |
9 | Source Code Compliance Team
10 | Microsoft Corporation
11 | One Microsoft Way
12 | Redmond, WA 98052
13 | USA
14 |
15 | Notwithstanding any other terms, you may reverse engineer this software to the extent
16 | required to debug changes to any libraries licensed under the GNU Lesser General Public License.
17 |
18 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/client/.npmrc:
--------------------------------------------------------------------------------
1 | registry=https://registry.devpackages.microsoft.io/api/npm/registry/default/
2 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/client/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "anycode-client",
3 | "license": "MIT",
4 | "publisher": "ms-vscode",
5 | "dependencies": {
6 | "vscode-extension-telemetry": "^0.4.2",
7 | "vscode-languageclient": "^8.0.0-next.5"
8 | },
9 | "devDependencies": {
10 | "@types/node": "17.0.25",
11 | "@types/mocha": "~9.1.0",
12 | "assert": "~2.0.0",
13 | "mocha": "^9.2.1"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/client/tsconfig.browser.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "lib": [
5 | "ES2020",
6 | "WebWorker"
7 | ]
8 | },
9 | "include": [
10 | "src/common/*",
11 | "src/browser/*",
12 | "../shared/common/*"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/client/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "include": [
4 | "src/common/*",
5 | "src/node/*",
6 | "../shared/common/*"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/server/.npmrc:
--------------------------------------------------------------------------------
1 | registry=https://registry.devpackages.microsoft.io/api/npm/registry/default/
2 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "anycode-client",
3 | "license": "MIT",
4 | "publisher": "ms-vscode",
5 | "scripts": {
6 | "postinstall": "npx playwright install-deps",
7 | "test": "npx mocha --ui tdd src/**/test/*.test.js"
8 | },
9 | "dependencies": {
10 | "vscode-languageserver": "^8.0.0-next.4",
11 | "vscode-languageserver-textdocument": "^1.0.4"
12 | },
13 | "devDependencies": {
14 | "@playwright/test": "^1.14.1",
15 | "@types/assert": "^1.5.6",
16 | "@types/chai": "^4.2.21",
17 | "@types/mocha": "~9.1.0",
18 | "assert": "~2.0.0",
19 | "mocha": "^9.2.1",
20 | "web-tree-sitter": "0.20.5",
21 | "yargs": "^17.3.1"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/server/src/common/test-fixture/client/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Mocha Tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
21 |
22 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/server/src/common/test-fixture/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "types": [
4 | "node"
5 | ]
6 | },
7 | "include": [
8 | "test.js"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/server/tsconfig.browser.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "lib": [
5 | "ES2020",
6 | "WebWorker"
7 | ]
8 | },
9 | "include": [
10 | "src/common/*",
11 | "src/browser/*",
12 | "../shared/common/*"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/server/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "lib": [
5 | "ES2020"
6 | ]
7 | },
8 | "include": [
9 | "src/common/*",
10 | "src/node/*",
11 | "../shared/common/*"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/telemetry.json:
--------------------------------------------------------------------------------
1 | {"events":{"ms-vscode.anycode/feature":{"name":{"classification":"SystemMetaData","purpose":"FeatureInsight"},"language":{"classification":"SystemMetaData","purpose":"FeatureInsight"}},"ms-vscode.anycode/init":{"numoffiles":{"classification":"SystemMetaData","purpose":"FeatureInsight","isMeasurement":true},"indexsize":{"classification":"SystemMetaData","purpose":"FeatureInsight","isMeasurement":true},"hasworkspacecontents":{"classification":"SystemMetaData","purpose":"FeatureInsight","isMeasurement":true},"duration":{"classification":"SystemMetaData","purpose":"FeatureInsight","isMeasurement":true}}},"commonProperties":{}}
--------------------------------------------------------------------------------
/packages/core/.cloudide/extensions/vscode-extensions.anycode-0.0.67/tsconfig.base.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "noEmit": true,
4 | "target": "ES2020",
5 | "lib": [
6 | "ES2020",
7 | ],
8 | "esModuleInterop": true,
9 | "module": "commonjs",
10 | "moduleResolution": "node",
11 | "sourceMap": false,
12 | "strict": true,
13 | "skipLibCheck": true
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/core/README.md:
--------------------------------------------------------------------------------
1 | # CodeBlitz
2 |
3 | > 基于 OpenSumi 的纯前端版本 IDE 框架
4 |
5 | ## 核心功能
6 |
7 | * 开箱即用,通过 React 组件方式只需几行代码即可运行一个无容器版本的 IDE
8 | * 内置 BrowserFS,根据业务形式定制 FileSystem,实现文件读写
9 | * 通过 Worker 扩展丰富 IDE 功能,支持扩展的自主安装
10 |
11 | ## 开发文档
12 |
13 | * CodeBlitz: [https://codeblitz.opensumi.com/](https://codeblitz.opensumi.com/)
14 | * OpenSumi: [https://opensumi.com/zh](https://opensumi.com/zh)
15 |
16 | ## 示例 [codeblitz-sample](https://github.com/opensumi/codeblitz-sample)
17 |
--------------------------------------------------------------------------------
/packages/core/__tests__/index.ts:
--------------------------------------------------------------------------------
1 | describe('test', () => {});
2 |
--------------------------------------------------------------------------------
/packages/core/bin/codeblitz:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | 'use strict';
4 |
5 | require('@codeblitzjs/ide-cli');
6 |
--------------------------------------------------------------------------------
/packages/core/extensions/_reference.d.ts:
--------------------------------------------------------------------------------
1 | import { IExtensionBasicMetadata } from '@codeblitzjs/ide-common'
2 | declare const metadata: IExtensionBasicMetadata;
3 | export { metadata }
4 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-c-sharp.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-c-sharp.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extension": {
3 | "publisher": "codeblitz",
4 | "name": "anycode-c-sharp",
5 | "version": "0.0.5"
6 | },
7 | "packageJSON": {
8 | "name": "anycode-c-sharp",
9 | "publisher": "ms-vscode",
10 | "version": "0.0.5",
11 | "repository": {
12 | "url": "https://github.com/microsoft/vscode-anycode"
13 | },
14 | "displayName": "anycode-c-sharp",
15 | "description": "C# for Anycode",
16 | "contributes": {
17 | "anycodeLanguages": {
18 | "grammarPath": "./tree-sitter-c_sharp.wasm",
19 | "languageId": "csharp",
20 | "extensions": [
21 | "cs"
22 | ],
23 | "queryPaths": {
24 | "comments": "./queries/comments.scm",
25 | "identifiers": "./queries/identifiers.scm",
26 | "locals": "./queries/locals.scm",
27 | "outline": "./queries/outline.scm",
28 | "references": "./queries/references.scm"
29 | },
30 | "suppressedBy": [
31 | "ms-dotnettools.csharp"
32 | ]
33 | }
34 | }
35 | },
36 | "pkgNlsJSON": {},
37 | "nlsList": [],
38 | "extendConfig": {},
39 | "webAssets": [],
40 | "mode": "public"
41 | }
42 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-cpp.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-go.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-go.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extension": {
3 | "publisher": "codeblitz",
4 | "name": "anycode-go",
5 | "version": "0.0.5"
6 | },
7 | "packageJSON": {
8 | "name": "anycode-go",
9 | "publisher": "ms-vscode",
10 | "version": "0.0.5",
11 | "repository": {
12 | "url": "https://github.com/microsoft/vscode-anycode"
13 | },
14 | "displayName": "anycode-go",
15 | "description": "Go for Anycode",
16 | "contributes": {
17 | "anycodeLanguages": {
18 | "grammarPath": "./tree-sitter-go.wasm",
19 | "languageId": "go",
20 | "extensions": [
21 | "go"
22 | ],
23 | "queryPaths": {
24 | "comments": "./queries/comments.scm",
25 | "identifiers": "./queries/identifiers.scm",
26 | "locals": "./queries/locals.scm",
27 | "outline": "./queries/outline.scm",
28 | "references": "./queries/references.scm"
29 | },
30 | "suppressedBy": [
31 | "golang.Go"
32 | ]
33 | }
34 | }
35 | },
36 | "pkgNlsJSON": {},
37 | "nlsList": [],
38 | "extendConfig": {},
39 | "webAssets": [],
40 | "mode": "public"
41 | }
42 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-java.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-java.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extension": {
3 | "publisher": "codeblitz",
4 | "name": "anycode-java",
5 | "version": "0.0.5"
6 | },
7 | "packageJSON": {
8 | "name": "anycode-java",
9 | "publisher": "ms-vscode",
10 | "version": "0.0.5",
11 | "repository": {
12 | "url": "https://github.com/microsoft/vscode-anycode"
13 | },
14 | "displayName": "anycode-java",
15 | "description": "Java for Anycode",
16 | "contributes": {
17 | "anycodeLanguages": {
18 | "grammarPath": "./tree-sitter-java.wasm",
19 | "languageId": "java",
20 | "extensions": [
21 | "java"
22 | ],
23 | "queryPaths": {
24 | "comments": "./queries/comments.scm",
25 | "folding": "./queries/folding.scm",
26 | "identifiers": "./queries/identifiers.scm",
27 | "locals": "./queries/locals.scm",
28 | "outline": "./queries/outline.scm",
29 | "references": "./queries/references.scm"
30 | },
31 | "suppressedBy": [
32 | "redhat.java"
33 | ]
34 | }
35 | }
36 | },
37 | "pkgNlsJSON": {},
38 | "nlsList": [],
39 | "extendConfig": {},
40 | "webAssets": [],
41 | "mode": "public"
42 | }
43 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-php.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-php.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extension": {
3 | "publisher": "codeblitz",
4 | "name": "anycode-php",
5 | "version": "0.0.6"
6 | },
7 | "packageJSON": {
8 | "name": "anycode-php",
9 | "publisher": "ms-vscode",
10 | "version": "0.0.6",
11 | "repository": {
12 | "url": "https://github.com/microsoft/vscode-anycode"
13 | },
14 | "displayName": "anycode-php",
15 | "description": "PHP for Anycode",
16 | "contributes": {
17 | "anycodeLanguages": {
18 | "grammarPath": "./tree-sitter-php.wasm",
19 | "languageId": "php",
20 | "extensions": [
21 | "php",
22 | "php4",
23 | "php5",
24 | "phtml",
25 | "ctp"
26 | ],
27 | "queryPaths": {
28 | "comments": "./queries/comments.scm",
29 | "identifiers": "./queries/identifiers.scm",
30 | "locals": "./queries/locals.scm",
31 | "outline": "./queries/outline.scm",
32 | "references": "./queries/references.scm"
33 | },
34 | "suppressedBy": [
35 | "bmewburn.vscode-intelephense-client"
36 | ]
37 | }
38 | }
39 | },
40 | "pkgNlsJSON": {},
41 | "nlsList": [],
42 | "extendConfig": {},
43 | "webAssets": [],
44 | "mode": "public"
45 | }
46 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-python.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-rust.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-rust.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extension": {
3 | "publisher": "codeblitz",
4 | "name": "anycode-rust",
5 | "version": "0.0.5"
6 | },
7 | "packageJSON": {
8 | "name": "anycode-rust",
9 | "publisher": "ms-vscode",
10 | "version": "0.0.5",
11 | "repository": {
12 | "url": "https://github.com/microsoft/vscode-anycode"
13 | },
14 | "displayName": "anycode-rust",
15 | "description": "Rust for Anycode",
16 | "contributes": {
17 | "anycodeLanguages": {
18 | "grammarPath": "./tree-sitter-rust.wasm",
19 | "languageId": "rust",
20 | "extensions": [
21 | "rs"
22 | ],
23 | "queryPaths": {
24 | "comments": "./queries/comments.scm",
25 | "folding": "./queries/folding.scm",
26 | "identifiers": "./queries/identifiers.scm",
27 | "locals": "./queries/locals.scm",
28 | "outline": "./queries/outline.scm",
29 | "references": "./queries/references.scm"
30 | },
31 | "suppressedBy": [
32 | "rust-lang.rust"
33 | ]
34 | }
35 | }
36 | },
37 | "pkgNlsJSON": {},
38 | "nlsList": [],
39 | "extendConfig": {},
40 | "webAssets": [],
41 | "mode": "public"
42 | }
43 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-typescript.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode-typescript.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extension": {
3 | "publisher": "codeblitz",
4 | "name": "anycode-typescript",
5 | "version": "0.0.5"
6 | },
7 | "packageJSON": {
8 | "name": "anycode-typescript",
9 | "publisher": "ms-vscode",
10 | "version": "0.0.5",
11 | "repository": {
12 | "url": "https://github.com/microsoft/vscode-anycode"
13 | },
14 | "displayName": "anycode-typescript",
15 | "description": "TypeScript for Anycode",
16 | "contributes": {
17 | "anycodeLanguages": {
18 | "grammarPath": "./tree-sitter-typescript.wasm",
19 | "languageId": "typescript",
20 | "extensions": [
21 | "ts"
22 | ],
23 | "queryPaths": {
24 | "comments": "./queries/comments.scm",
25 | "identifiers": "./queries/identifiers.scm",
26 | "locals": "./queries/locals.scm",
27 | "outline": "./queries/outline.scm",
28 | "references": "./queries/references.scm"
29 | },
30 | "suppressedBy": [
31 | "vscode.typescript-language-features"
32 | ]
33 | }
34 | }
35 | },
36 | "pkgNlsJSON": {},
37 | "nlsList": [],
38 | "extendConfig": {},
39 | "webAssets": [],
40 | "mode": "public"
41 | }
42 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.anycode.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.code-runner-for-web.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.codeswing.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.css-language-features-worker.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.emmet.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.git-graph.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.gitlens.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.html-language-features-worker.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.image-preview.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.json-language-features-worker.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.markdown-language-features-worker.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.merge-conflict.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.odc-theme.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.odc-theme.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "extension": {
3 | "publisher": "codeblitz",
4 | "name": "odc-theme",
5 | "version": "1.0.2"
6 | },
7 | "packageJSON": {
8 | "name": "odc-theme",
9 | "publisher": "codeblitz",
10 | "version": "1.0.2",
11 | "displayName": "ODC UI Theme",
12 | "description": "ODC UI Theme",
13 | "icon": "icons/icon.png",
14 | "contributes": {
15 | "themes": [
16 | {
17 | "id": "odc-light",
18 | "label": "ODC Light",
19 | "uiTheme": "vs",
20 | "path": "./themes/light/plus.json"
21 | }
22 | ]
23 | }
24 | },
25 | "pkgNlsJSON": {},
26 | "nlsList": [],
27 | "extendConfig": {},
28 | "webAssets": [
29 | "package.json",
30 | "themes/light/plus.json",
31 | "themes/light/vs.json",
32 | "themes/light/defaults.json"
33 | ],
34 | "mode": "public"
35 | }
36 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.references-view.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.typescript-language-features-worker.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/extensions/codeblitz.web-scm.d.ts:
--------------------------------------------------------------------------------
1 | import { metadata } from './_reference';
2 | export = metadata;
3 |
--------------------------------------------------------------------------------
/packages/core/modules/code-api.d.ts:
--------------------------------------------------------------------------------
1 | export * from "../lib/modules/codeblitz__code-api";
2 |
--------------------------------------------------------------------------------
/packages/core/modules/code-api.js:
--------------------------------------------------------------------------------
1 | const { requireModule } = require("../bundle");
2 | module.exports = requireModule("@codeblitz/code-api");
3 |
--------------------------------------------------------------------------------
/packages/core/modules/code-service.d.ts:
--------------------------------------------------------------------------------
1 | export * from "../lib/modules/codeblitz__code-service";
2 |
--------------------------------------------------------------------------------
/packages/core/modules/code-service.js:
--------------------------------------------------------------------------------
1 | const { requireModule } = require("../bundle");
2 | module.exports = requireModule("@codeblitz/code-service");
3 |
--------------------------------------------------------------------------------
/packages/core/modules/ide-sumi-core.d.ts:
--------------------------------------------------------------------------------
1 | export * from "../lib/modules/codeblitz__ide-sumi-core";
2 |
--------------------------------------------------------------------------------
/packages/core/modules/ide-sumi-core.js:
--------------------------------------------------------------------------------
1 | const { requireModule } = require("../bundle");
2 | module.exports = requireModule("@codeblitz/ide-sumi-core");
3 |
--------------------------------------------------------------------------------
/packages/core/scripts/.no-postinstall:
--------------------------------------------------------------------------------
1 | just prevent postinstall when develope
--------------------------------------------------------------------------------
/packages/core/scripts/install-ext.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 |
4 | if (fs.existsSync(path.join(__dirname, '.no-postinstall'))) {
5 | return;
6 | }
7 |
8 | require('@codeblitzjs/ide-cli/lib/extension')
9 | .install([], { silent: true })
10 | .catch((err) => console.error(err));
11 |
--------------------------------------------------------------------------------
/packages/core/src/api/constants.ts:
--------------------------------------------------------------------------------
1 | export const appName = 'CodeBlitz';
2 |
--------------------------------------------------------------------------------
/packages/core/src/api/exports.ts:
--------------------------------------------------------------------------------
1 | import { BrowserFSFileType, HOME_ROOT, REPORT_NAME, WORKSPACE_ROOT } from '@codeblitzjs/ide-sumi-core';
2 |
3 | export { Emitter, Uri } from '@opensumi/ide-core-common';
4 |
5 | export { getDefaultLayoutConfig } from '../core/layout';
6 |
7 | export { CodeEditor } from '../core/components/CodeEditor'
8 |
9 | export { DiffEditor } from '../core/components/DiffEditor'
10 |
11 | export { BrowserFSFileType, HOME_ROOT, REPORT_NAME, WORKSPACE_ROOT };
12 |
13 | export * from '../core/env';
14 |
--------------------------------------------------------------------------------
/packages/core/src/api/keepAlive.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useRef } from 'react';
2 | import ReactDOM from 'react-dom/client';
3 |
4 | const appContainer = document.createElement('div');
5 | appContainer.className = 'codeblitz-keepalive-portal';
6 | appContainer.style.width = '100%';
7 | appContainer.style.height = '100%';
8 |
9 | let appMounted = false;
10 |
11 | export const KeepAlive = (props: {
12 | children: React.ReactNode;
13 | }) => {
14 | const anchorRef = useRef(null);
15 | useEffect(() => {
16 | if (!appMounted) {
17 | appMounted = true;
18 | ReactDOM.createRoot(appContainer).render(
19 | <>{props.children}>,
20 | );
21 | }
22 |
23 | anchorRef?.current?.insertAdjacentElement('afterend', appContainer);
24 |
25 | return () => {
26 | try {
27 | if (anchorRef?.current?.parentNode !== null) {
28 | anchorRef?.current?.parentNode.removeChild(appContainer);
29 | }
30 | } catch (error) {
31 | console.error('[KeepAlive] unmount container error', error);
32 | }
33 | };
34 | }, []);
35 |
36 | return ;
37 | };
38 |
--------------------------------------------------------------------------------
/packages/core/src/api/register.ts:
--------------------------------------------------------------------------------
1 | import { Registry } from '@codeblitzjs/ide-registry';
2 | import { GrammarsContribution, LanguagesContribution } from '@opensumi/ide-monaco';
3 |
4 | export { Registry };
5 |
6 | /**
7 | * @deprecated please import language by path directly
8 | *
9 | * use `import "@codeblitzjs/ide-core/languages/"` to import specific language.
10 | * use `import "@codeblitzjs/ide-core/languages"` to import all languages
11 | */
12 | export const registerLanguage = (contrib: LanguagesContribution) => {
13 | Registry.register('language', contrib);
14 | };
15 |
16 | /**
17 | * @deprecated please import language by path directly
18 | *
19 | * use `import "@codeblitzjs/ide-core/languages/"` to import specific language
20 | * use `import "@codeblitzjs/ide-core/languages"` to import all languages
21 | */
22 | export const registerGrammar = (contrib: GrammarsContribution) => {
23 | Registry.register('grammar', contrib);
24 | };
25 |
--------------------------------------------------------------------------------
/packages/core/src/core/Landing.tsx:
--------------------------------------------------------------------------------
1 | import React, { FC } from 'react';
2 | import styles from './style.module.less';
3 | import { LandingProps } from './types';
4 |
5 | export const Landing: FC = ({ status, error }) => {
6 | return (
7 |
8 |
9 | {status === 'error' ?
{error} : (
10 |
11 |
21 | 正在加载...
22 |
23 | )}
24 |
25 |
26 | );
27 | };
28 |
--------------------------------------------------------------------------------
/packages/core/src/core/Root.tsx:
--------------------------------------------------------------------------------
1 | import React, { FC } from 'react';
2 | import { VERSION } from './env';
3 | import { Landing } from './Landing';
4 | import { RootProps } from './types';
5 |
6 | // TODO: 后续考虑用 shadow DOM
7 | export class AlexRoot extends HTMLElement {}
8 |
9 | customElements.get('codeblitz-root') ? null : customElements.define('codeblitz-root', AlexRoot);
10 |
11 | export const Root: FC = (props) => {
12 | const themeType = props.theme;
13 | const LandingComponent = props.Landing || Landing;
14 |
15 | // TODO: 可以获取挂载元素的 Rect 来设置宽高
16 | return (
17 |
22 | {(props.status === 'loading' || props.status === 'error') && }
23 | {props.children}
24 |
25 | );
26 | };
27 |
28 | declare global {
29 | namespace JSX {
30 | interface IntrinsicElements {
31 | 'codeblitz-root': React.DetailedHTMLProps<
32 | React.HTMLAttributes & { class: string },
33 | HTMLElement
34 | >;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/packages/core/src/core/components/context.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react'
2 | import { ClientApp } from '@codeblitzjs/ide-sumi-core'
3 |
4 | export const AppContext = createContext<{
5 | app: ClientApp | null,
6 | startState?: { status: 'loading' | 'success' | 'error', error?: string }
7 | }>({ app: null })
8 |
--------------------------------------------------------------------------------
/packages/core/src/core/components/util.ts:
--------------------------------------------------------------------------------
1 | import { URI } from '@opensumi/ide-core-browser';
2 | import * as path from 'path'
3 |
4 | export const parseUri = (uriInput: URI | string, workspaceDir: string) => {
5 | if (typeof uriInput === 'string') {
6 | let uri = URI.parse(uriInput)
7 | // 说明传的是路径
8 | if (uri.scheme === 'file' && !uriInput.startsWith('file:')) {
9 | uri = uri.withPath(path.join(workspaceDir, uri.codeUri.path))
10 | }
11 | return uri.toString();
12 | }
13 | return uriInput.toString()
14 | }
15 |
--------------------------------------------------------------------------------
/packages/core/src/core/diff-viewer/extension-patch.ts:
--------------------------------------------------------------------------------
1 | import anycode from '../../../extensions/codeblitz.anycode';
2 | // import anycodeCSharp from '../../../extensions/codeblitz.anycode-c-sharp';
3 | // import anycodeCpp from '../../../extensions/codeblitz.anycode-cpp';
4 | import anycodeGo from '../../../extensions/codeblitz.anycode-go';
5 | import anycodeJava from '../../../extensions/codeblitz.anycode-java';
6 | // import anycodePhp from '../../../extensions/codeblitz.anycode-php';
7 | import anycodePython from '../../../extensions/codeblitz.anycode-python';
8 | import anycodeRust from '../../../extensions/codeblitz.anycode-rust';
9 | import anycodeTypescript from '../../../extensions/codeblitz.anycode-typescript';
10 |
11 |
12 | export const extensionMetadata = [
13 | anycode,
14 | // anycodeCSharp,
15 | // anycodeCpp,
16 | anycodeGo,
17 | anycodeJava,
18 | // anycodePhp,
19 | anycodePython,
20 | anycodeRust,
21 | anycodeTypescript,
22 | ]
23 |
--------------------------------------------------------------------------------
/packages/core/src/core/diff-viewer/index.ts:
--------------------------------------------------------------------------------
1 | export * from './common';
2 |
--------------------------------------------------------------------------------
/packages/core/src/core/diff-viewer/module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@opensumi/ide-core-browser';
2 |
3 | import { Injectable } from '@opensumi/di';
4 | import { DiffViewerContribution } from './internal/base';
5 | import { DiffViewerThemeProvider } from './internal/theme.provider';
6 |
7 | @Injectable()
8 | export class DiffViewerModule extends BrowserModule {
9 | providers = [
10 | DiffViewerContribution,
11 | DiffViewerThemeProvider,
12 | ];
13 | }
14 |
--------------------------------------------------------------------------------
/packages/core/src/core/diff-viewer/utils.ts:
--------------------------------------------------------------------------------
1 | export function removeStart(str: string, pattern: string) {
2 | if (str.startsWith(pattern)) {
3 | return str.slice(pattern.length);
4 | }
5 | return str;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/core/src/core/editor/modules.extension.ts:
--------------------------------------------------------------------------------
1 | import { CommentsModule } from '@opensumi/ide-comments/lib/browser';
2 | import { ExtensionStorageModule } from '@opensumi/ide-extension-storage/lib/browser';
3 | import { ExtensionModule } from '@opensumi/ide-extension/lib/browser';
4 | import { WebviewModule } from '@opensumi/ide-webview/lib/browser';
5 |
6 | /**
7 | * editor special
8 | */
9 | import { ExtensionActivateModule } from './editor.extension';
10 |
11 | import { setExtensionModules } from './modules';
12 | import '../extension/extension.patch';
13 |
14 | setExtensionModules([
15 | ExtensionStorageModule,
16 | WebviewModule,
17 | ExtensionModule,
18 | CommentsModule,
19 | ExtensionActivateModule,
20 | ]);
21 |
--------------------------------------------------------------------------------
/packages/core/src/core/env.ts:
--------------------------------------------------------------------------------
1 | import { getResource } from "@codeblitzjs/ide-common";
2 |
3 | /**
4 | * codeblitz version
5 | */
6 | export const VERSION = __VERSION__;
7 | /**
8 | * worker url
9 | */
10 | export const EXT_WORKER_HOST = getResource("@codeblitzjs/ide-sumi-core", "resources/worker-host.js", VERSION);
11 |
--------------------------------------------------------------------------------
/packages/core/src/core/hooks.ts:
--------------------------------------------------------------------------------
1 | import { Injector } from '@opensumi/di';
2 | import { useRef, useMemo, useCallback } from 'react';
3 | import { IAppInstance } from '../api/types';
4 |
5 | export const useConstant = (fn: () => T): T => {
6 | const valueRef = useRef<{ v: T }>();
7 | if (!valueRef.current) {
8 | valueRef.current = { v: fn() };
9 | }
10 | return valueRef.current.v;
11 | };
12 |
13 | export function useMemorizeFn any>(fn: T) {
14 | const fnRef = useRef(fn);
15 | fnRef.current = useMemo(() => fn, [fn]);
16 | return useCallback((...args: any) => fnRef.current(...args), []) as T;
17 | }
18 |
19 | export let singleInjector: Injector | null = null;
20 |
21 | export function setSingleInjector(inject) {
22 | singleInjector = inject;
23 | }
24 |
25 | export let singleApp: IAppInstance | null = null;
26 |
27 | export function setSingleApp(app: IAppInstance) {
28 | singleApp = app;
29 | }
30 |
31 | export let isRendered = false;
32 |
33 | export const setRendered = () => {
34 | isRendered = true;
35 | };
36 |
--------------------------------------------------------------------------------
/packages/core/src/core/providers/index.ts:
--------------------------------------------------------------------------------
1 | export * from './default-theme.provider';
2 |
--------------------------------------------------------------------------------
/packages/core/src/core/types.ts:
--------------------------------------------------------------------------------
1 | import { ThemeType } from '@opensumi/ide-theme';
2 | import { ComponentType } from 'react';
3 |
4 | export interface LandingProps {
5 | status: 'loading' | 'success' | 'error';
6 | error?: string;
7 | theme?: ThemeType;
8 | className?: string;
9 | }
10 |
11 | export interface RootProps extends LandingProps {
12 | Landing?: ComponentType;
13 | children?: React.ReactNode;
14 | style?: React.CSSProperties;
15 | }
16 |
--------------------------------------------------------------------------------
/packages/core/src/distribution/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/opensumi/codeblitz/755b8e14c2351d1e770e565193554e8408533d4e/packages/core/src/distribution/.gitkeep
--------------------------------------------------------------------------------
/packages/core/src/editor.all.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 包含 extension 的 editor
3 | */
4 |
5 | import './editor.extension';
6 |
7 | export * from './editor';
8 |
--------------------------------------------------------------------------------
/packages/core/src/editor.extension.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * 引入 extension 相关的 module
3 | */
4 |
5 | import './core/editor/modules.extension';
6 |
--------------------------------------------------------------------------------
/packages/core/src/editor.ts:
--------------------------------------------------------------------------------
1 | export * from './api/createEditor';
2 | export * from './api/exports';
3 | export * from './api/register';
4 | export * from './api/renderEditor';
5 | export * from './api/types';
6 |
--------------------------------------------------------------------------------
/packages/core/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './api/createApp';
2 | export * from './api/exports';
3 | export * from './api/register';
4 | export * from './api/renderApp';
5 | export * from './api/renderDiffViewer';
6 | export * from './api/require';
7 | export * from './api/types';
8 |
--------------------------------------------------------------------------------
/packages/core/src/modules/codeblitz__code-api.ts:
--------------------------------------------------------------------------------
1 | export * from '@codeblitzjs/ide-code-api';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/codeblitz__code-service.ts:
--------------------------------------------------------------------------------
1 | export * from '@codeblitzjs/ide-code-service';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/codeblitz__ide-sumi-core.ts:
--------------------------------------------------------------------------------
1 | export * from '@codeblitzjs/ide-sumi-core';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__common-di.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @deprecated `@opensumi/common-di` is renamed to `@opensumi/di`
3 | */
4 |
5 | export * from '@opensumi/di';
6 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__di.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/di';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-addons.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-addons/lib/browser';
2 | export * from '@opensumi/ide-addons/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-comments.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-comments/lib/browser';
2 | export * from '@opensumi/ide-comments/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-components.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-components';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-core-browser.ts:
--------------------------------------------------------------------------------
1 | import { IToolbarActionGroup } from '@opensumi/ide-core-browser';
2 |
3 | export * from '@opensumi/ide-core-browser';
4 | export * from '@opensumi/ide-core-browser/lib/context-key';
5 | export * from '@opensumi/ide-core-browser/lib/menu/next';
6 |
7 | // local exports take priority.
8 | export { IToolbarActionGroup };
9 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-core-common.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-core-common';
2 | export * from '@opensumi/ide-core-common/lib/const';
3 | export * from '@opensumi/ide-core-common/lib/keyboard/keyboard-layout-provider';
4 | export * from '@opensumi/ide-core-common/lib/keyboard/keymap';
5 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-debug.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-debug/lib/browser';
2 | export * from '@opensumi/ide-debug/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-decoration.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-decoration/lib/browser';
2 | export * from '@opensumi/ide-decoration/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-editor.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-editor/lib/browser';
2 | export * from '@opensumi/ide-editor/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-explorer.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-explorer/lib/browser';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-extension-storage.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-extension-storage/lib/browser';
2 | export * from '@opensumi/ide-extension-storage/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-extension.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-extension/lib/browser';
2 | export * from '@opensumi/ide-extension/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-file-scheme.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-file-scheme/lib/browser';
2 | export * from '@opensumi/ide-file-scheme/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-file-search.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-file-search/lib/common';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-file-service.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-file-service/lib/browser';
2 | export * from '@opensumi/ide-file-service/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-file-tree-next.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-file-tree-next/lib/browser';
2 | export * from '@opensumi/ide-file-tree-next/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-keymaps.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-keymaps/lib/browser';
2 | export * from '@opensumi/ide-keymaps/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-logs.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-logs/lib/browser';
2 | export * from '@opensumi/ide-logs/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-main-layout.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-main-layout/lib/browser';
2 | export * from '@opensumi/ide-main-layout/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-markdown.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-markdown/lib/browser';
2 | export * from '@opensumi/ide-markdown/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-markers.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-markers/lib/browser';
2 | export * from '@opensumi/ide-markers/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-menu-bar.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-menu-bar/lib/browser';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-monaco-enhance.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-monaco-enhance/lib/browser';
2 | export * from '@opensumi/ide-monaco-enhance/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-monaco.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-monaco/lib/browser';
2 | export * from '@opensumi/ide-monaco/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-opened-editor.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-opened-editor/lib/browser';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-outline.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-outline/lib/browser';
2 | export * from '@opensumi/ide-outline/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-output.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-output/lib/browser';
2 | export * from '@opensumi/ide-output/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-overlay.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-overlay/lib/browser';
2 | export * from '@opensumi/ide-overlay/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-preferences.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-preferences/lib/browser';
2 | export * from '@opensumi/ide-preferences/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-quick-open.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-quick-open/lib/browser';
2 | export * from '@opensumi/ide-quick-open/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-scm.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-scm/lib/browser';
2 | export * from '@opensumi/ide-scm/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-search.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-search/lib/browser';
2 | export * from '@opensumi/ide-search/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-status-bar.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-status-bar/lib/browser';
2 | export * from '@opensumi/ide-status-bar/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-storage.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-storage/lib/browser';
2 | export * from '@opensumi/ide-storage/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-theme.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-theme/lib/browser';
2 | export * from '@opensumi/ide-theme/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-toolbar.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-toolbar/lib/browser';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-variable.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-variable/lib/browser';
2 | export * from '@opensumi/ide-variable/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-webview.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-webview/lib/browser';
2 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-workspace-edit.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-workspace-edit/lib/browser';
2 | export * from '@opensumi/ide-workspace-edit/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/src/modules/opensumi__ide-workspace.ts:
--------------------------------------------------------------------------------
1 | export * from '@opensumi/ide-workspace/lib/browser';
2 | export * from '@opensumi/ide-workspace/lib/common';
3 |
--------------------------------------------------------------------------------
/packages/core/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib"
6 | },
7 | "include": [
8 | "./src"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/core/typings/index.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/packages/core/typings/thenable.d.ts:
--------------------------------------------------------------------------------
1 | interface Thenable {
2 | then(
3 | onfulfilled?: (value: T) => TResult | Thenable,
4 | onrejected?: (reason: any) => TResult | Thenable,
5 | ): Thenable;
6 | then(
7 | onfulfilled?: (value: T) => TResult | Thenable,
8 | onrejected?: (reason: any) => void,
9 | ): Thenable;
10 | }
11 |
--------------------------------------------------------------------------------
/packages/i18n/README.md:
--------------------------------------------------------------------------------
1 | # i18n
--------------------------------------------------------------------------------
/packages/i18n/__tests__/index.test.ts:
--------------------------------------------------------------------------------
1 | describe('i18n', () => {
2 | it('example', () => {
3 | expect(1 + 1).toBe(2);
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/packages/i18n/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@codeblitzjs/ide-i18n",
3 | "version": "2.5.1",
4 | "description": "@codeblitzjs/ide-i18n",
5 | "main": "lib/index.js",
6 | "typings": "lib/index.d.ts",
7 | "files": [
8 | "lib"
9 | ],
10 | "keywords": [
11 | "opensumi codeblitzjs"
12 | ],
13 | "dependencies": {
14 | "@codeblitzjs/ide-common": "workspace:*",
15 | "@codeblitzjs/ide-sumi-core": "workspace:*",
16 | "tslib": "^2.2.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/i18n/src/index.ts:
--------------------------------------------------------------------------------
1 | import { registerLocalizationBundle } from '@opensumi/ide-core-common';
2 | import { localizationBundle as en } from './en-US';
3 | import { localizationBundle as zh } from './zh-CN';
4 |
5 | registerLocalizationBundle(zh);
6 | registerLocalizationBundle(en);
7 |
--------------------------------------------------------------------------------
/packages/i18n/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib"
6 | },
7 | "include": [
8 | "./src"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/plugin/README.md:
--------------------------------------------------------------------------------
1 | # plugin
2 |
3 | ## 通过类似 extension 的机制,让集成侧通过更简单的方式来 contribute 以及调用内部 API
4 |
--------------------------------------------------------------------------------
/packages/plugin/__tests__/index.test.ts:
--------------------------------------------------------------------------------
1 | describe('plugin', () => {
2 | it('example', () => {
3 | expect(1 + 1).toBe(2);
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/packages/plugin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@codeblitzjs/ide-plugin",
3 | "version": "2.5.1",
4 | "description": "@codeblitzjs/ide-plugin",
5 | "main": "lib/index.js",
6 | "typings": "lib/index.d.ts",
7 | "files": [
8 | "lib"
9 | ],
10 | "keywords": [
11 | "opensumi codeblitzjs"
12 | ],
13 | "dependencies": {
14 | "@codeblitzjs/ide-common": "workspace:*",
15 | "@codeblitzjs/ide-sumi-core": "workspace:*",
16 | "tslib": "^2.2.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/plugin/src/api/plugin.context.ts:
--------------------------------------------------------------------------------
1 | interface PluginContextOptions {
2 | pluginId: string;
3 | }
4 |
5 | export class PluginContext {
6 | readonly subscriptions: { dispose(): any }[] = [];
7 |
8 | constructor(options: PluginContextOptions) {}
9 | }
10 |
--------------------------------------------------------------------------------
/packages/plugin/src/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable, Provider } from '@opensumi/di';
2 | import { BrowserModule } from '@opensumi/ide-core-browser';
3 | import { PluginContribution } from './plugin.contribution';
4 | import { PluginService } from './plugin.service';
5 | import { IPluginService } from './types';
6 |
7 | export * from './types';
8 |
9 | @Injectable()
10 | export class PluginModule extends BrowserModule {
11 | providers: Provider[] = [
12 | PluginContribution,
13 | {
14 | token: IPluginService,
15 | useClass: PluginService,
16 | },
17 | ];
18 | }
19 |
--------------------------------------------------------------------------------
/packages/plugin/src/plugin.contribution.ts:
--------------------------------------------------------------------------------
1 | import { Autowired } from '@opensumi/di';
2 | import { ClientAppContribution, Domain } from '@opensumi/ide-core-browser';
3 | import { IPluginConfig, IPluginService } from './types';
4 |
5 | @Domain(ClientAppContribution)
6 | export class PluginContribution implements ClientAppContribution {
7 | @Autowired(IPluginService)
8 | pluginService: IPluginService;
9 |
10 | @Autowired(IPluginConfig)
11 | pluginConfig: IPluginConfig;
12 |
13 | onStart() {
14 | this.pluginService.activate(this.pluginConfig || []);
15 | }
16 |
17 | dispose() {
18 | // dispose 阶段不保证顺序,如果 IPluginService 比 PluginContribution 先 dispose,会导致此时 `this.pluginService` 为空
19 | if (this.pluginService) {
20 | this.pluginService.deactivate();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/packages/plugin/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib"
6 | },
7 | "include": [
8 | "./src"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/registry/README.md:
--------------------------------------------------------------------------------
1 | # registry
--------------------------------------------------------------------------------
/packages/registry/__tests__/index.test.ts:
--------------------------------------------------------------------------------
1 | import { Registry } from '../src';
2 |
3 | describe('registry', () => {
4 | beforeAll(() => {
5 | Registry.register('count', { v: 1 });
6 | Registry.register('count', { v: 2 });
7 | });
8 |
9 | it('getData', () => {
10 | expect(Registry.getData('count')?.length).toBe(2);
11 | expect(Registry.getData('count1')).toBeUndefined();
12 | });
13 |
14 | it('onRegister', () => {
15 | expect.assertions(3);
16 | const disposer = Registry.onRegister('count', (data) => {
17 | expect(data).toEqual({ v: 3 });
18 | });
19 | Registry.register('count', { v: 3 });
20 | expect(Registry.getData('count')?.length).toBe(3);
21 | disposer.dispose();
22 | Registry.register('count', { v: 3 });
23 | expect(Registry.getData('count')?.length).toBe(4);
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/packages/registry/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@codeblitzjs/ide-registry",
3 | "version": "2.5.1",
4 | "description": "@codeblitzjs/ide-registry",
5 | "main": "lib/index.js",
6 | "typings": "lib/index.d.ts",
7 | "files": [
8 | "lib"
9 | ],
10 | "keywords": [
11 | "opensumi codeblitzjs"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/packages/registry/src/types.ts:
--------------------------------------------------------------------------------
1 | export interface IDisposable {
2 | dispose(): void;
3 | }
4 |
5 | export interface Event {
6 | (listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[]): IDisposable;
7 | }
8 |
9 | export type Listener = [(e: T) => void, any] | ((e: T) => void);
10 |
--------------------------------------------------------------------------------
/packages/registry/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib"
6 | },
7 | "include": [
8 | "./src"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/startup/README.md:
--------------------------------------------------------------------------------
1 | # starup
--------------------------------------------------------------------------------
/packages/startup/__tests__/index.test.ts:
--------------------------------------------------------------------------------
1 | describe('integrations', () => {
2 | it('example', () => {
3 | expect(1 + 1).toBe(2);
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/packages/startup/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@codeblitzjs/ide-startup",
3 | "version": "2.5.1",
4 | "description": "@codeblitzjs/ide-startup",
5 | "main": "lib/index.js",
6 | "typing": "types/index.d.ts",
7 | "files": [
8 | "lib"
9 | ],
10 | "keywords": [
11 | "opensumi codeblitzjs"
12 | ],
13 | "dependencies": {
14 | "@ant-design/icons": "^5.4.0",
15 | "@codeblitzjs/ide-cli": "workspace:*",
16 | "@codeblitzjs/ide-code-api": "workspace:*",
17 | "@codeblitzjs/ide-code-service": "workspace:*",
18 | "@codeblitzjs/ide-common": "workspace:*",
19 | "@codeblitzjs/ide-core": "workspace:*",
20 | "@codeblitzjs/ide-i18n": "workspace:*",
21 | "@codeblitzjs/ide-sumi-core": "workspace:*",
22 | "antd": "^5.20.2",
23 | "lodash": "^4.17.21",
24 | "tslib": "^2.2.0"
25 | },
26 | "devDependencies": {
27 | "@types/react": "^18.2.0",
28 | "@types/react-dom": "^18.2.0",
29 | "split-retain": "^1.0.1"
30 | },
31 | "peerDependencies": {
32 | "react": "^18.2.0",
33 | "react-dom": "^18.2.0"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/packages/startup/src/code/code.module.less:
--------------------------------------------------------------------------------
1 | .codeblitz-dialog {
2 | background: #ffffff;
3 | border-radius: 4px;
4 | box-shadow: 0px 12px 48px 16px #00000008, 0px 9px 28px 0px #0000000d, 0px 6px 16px -8px #00000014;
5 | & > div:nth-child(2) {
6 | height: 100%;
7 | }
8 | :global(.right-slot) {
9 | div[class^='tab_panel'] {
10 | border-right: 1px solid #00000000 !important;
11 | }
12 | div[class^='tab_panel'] {
13 | border-left: 1px solid #00000000 !important;
14 | }
15 | #explorer div[class^='file_tree'] {
16 | font-size: 14px;
17 | }
18 | }
19 |
20 | :global {
21 | .ant-modal-content {
22 | padding: 0;
23 | overflow: hidden;
24 | }
25 |
26 | .kt-scrollbar .scrollbar-decoration-vertical {
27 | display: none;
28 | }
29 | }
30 |
31 | :global {
32 | div[class*='tab_panel'] {
33 | &::before {
34 | content: none;
35 | }
36 | }
37 | #main-horizontal-ai {
38 | padding-top: 40px !important;
39 | padding-right: 10px !important;
40 | }
41 |
42 | .codeblitz-dark {
43 | background-color: transparent !important;
44 | }
45 |
46 | div[data-menu-id='activityBar/extra'] {
47 | display: none;
48 | }
49 |
50 | #opensumi-quickpick {
51 | margin-top: 110px;
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/packages/startup/src/code/component.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export function TitlePlaceHolder() {
4 | return (
5 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/packages/startup/src/code/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { createRoot } from 'react-dom/client';
3 | import '@codeblitzjs/ide-core/languages';
4 |
5 | import '../index.css';
6 | import { ModelWrapper } from './code';
7 |
8 | const root = createRoot(document.getElementById('main') as HTMLElement);
9 | root.render();
10 |
--------------------------------------------------------------------------------
/packages/startup/src/common/constants.ts:
--------------------------------------------------------------------------------
1 | export const overrideColorTokens = {
2 | 'editorGroupHeader.tabsBackground': '#ECF1FE',
3 | 'editor.background': '#fff',
4 | 'aiNative.inlineDiffAddedRange': '#26bf6d1f',
5 | 'aiNative.inlineDiffRemovedRange': '#ff4d4f1e',
6 | 'aiNative.inlineDiffAcceptPartialEdit': '#26bf6d80',
7 | 'aiNative.inlineDiffDiscardPartialEdit': '#ff4d4f80',
8 | 'aiNative.inlineDiffAcceptPartialEdit.foreground': '#000',
9 | }
10 |
--------------------------------------------------------------------------------
/packages/startup/src/common/plugin.ts:
--------------------------------------------------------------------------------
1 | import { IPluginAPI, IPluginModule } from '@codeblitzjs/ide-core/lib/editor';
2 |
3 | export class Plugin implements IPluginModule {
4 | PLUGIN_ID = 'PLUGIN_TEST';
5 |
6 | private _commands: IPluginAPI['commands'] | null = null;
7 |
8 | get commands() {
9 | return this._commands;
10 | }
11 |
12 | activate({ context, commands }: IPluginAPI) {
13 | this._commands = commands;
14 | context.subscriptions.push(
15 | commands.registerCommand('plugin.command.add', (x: number) => {
16 | commands.executeCommand('plugin.command.say', 'alex is great');
17 | return x + x;
18 | }),
19 | );
20 | }
21 | }
22 |
23 | export default new Plugin();
24 |
--------------------------------------------------------------------------------
/packages/startup/src/diff-viewer/_create_data.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs';
2 | import path from 'path';
3 |
4 | const baseDir = path.resolve(__dirname, '..', '..');
5 | console.log(`🚀 ~ baseDir:`, baseDir);
6 |
7 | const filePath = 'src/filesystem/index.tsx';
8 |
9 | const fullPath = path.join(baseDir, filePath);
10 |
11 | const content = fs.readFileSync(fullPath, 'utf-8');
12 |
13 | function interceptCode(code: string) {
14 | const lines = code.split('\n');
15 |
16 | // random delete some lines
17 | const deleteCount = Math.floor(Math.random() * 10);
18 |
19 | for (let i = 0; i < deleteCount; i++) {
20 | const randomIndex = Math.floor(Math.random() * lines.length);
21 | lines.splice(randomIndex, 1);
22 | }
23 |
24 | return lines.join('\n');
25 | }
26 |
27 | const file2 = 'src/diff-viewer/index.tsx';
28 | const fullPath2 = path.join(baseDir, file2);
29 | const content2 = fs.readFileSync(fullPath2, 'utf-8');
30 |
31 | const data = [
32 | {
33 | path: filePath,
34 | oldCode: content,
35 | newCode: interceptCode(content),
36 | },
37 | {
38 | path: file2,
39 | oldCode: content2,
40 | newCode: content2,
41 | },
42 | ];
43 |
44 | fs.writeFileSync(path.join(baseDir, 'src/diff-viewer/data.json'), JSON.stringify(data, null, 2));
45 |
--------------------------------------------------------------------------------
/packages/startup/src/editor/plugin.ts:
--------------------------------------------------------------------------------
1 | import { IPluginAPI } from '@codeblitzjs/ide-core/lib/editor';
2 |
3 | export const PLUGIN_ID = 'editor';
4 |
5 | let _commands: IPluginAPI['commands'] | null = null;
6 |
7 | export const api = {
8 | get commands() {
9 | return _commands;
10 | },
11 | };
12 |
13 | export const activate = ({ context, commands }: IPluginAPI) => {
14 | _commands = commands;
15 | context.subscriptions.push(
16 | commands.registerCommand('plugin.command.add', async (x: number) => {
17 | commands.executeCommand('plugin.command.say', 'alex is great');
18 | return x + x;
19 | }),
20 | commands.registerCommand('plugin.command.changeTheme', (value) => {
21 | commands.executeCommand('alex.setDefaultPreference', 'general.theme', value, 1);
22 | }),
23 | commands.afterExecuteCommand('plugin.command.add', (result) => {
24 | console.log('afterExecuteCommand plugin.command.add', result);
25 | }),
26 | );
27 | };
28 |
--------------------------------------------------------------------------------
/packages/startup/src/editor/style.less:
--------------------------------------------------------------------------------
1 | html, body, #main {
2 | height: auto;
3 | overflow: initial;
4 | }
5 |
6 | #main {
7 | width: 100%;
8 | }
9 |
--------------------------------------------------------------------------------
/packages/startup/src/index.css:
--------------------------------------------------------------------------------
1 |
2 | /* 适配全局样式 黑色主题初始化为白色 */
3 | html,
4 | body {
5 | color: var(--foreground);
6 | background-color: var(--editor-background);
7 | }
8 |
9 | .kt-inline-diff-accept-partial-widget-container > div > span {
10 | padding-left: 8px !important;
11 | padding-right: 8px !important;
12 | }
13 |
14 | .kt-inline-diff-accept-partial-widget-container > div {
15 | flex-direction: row-reverse !important;
16 | background: #ffffff;
17 | box-shadow: 0px 0px 4px 0px #0000000a;
18 | }
19 |
20 | .kt-navigation-container {
21 | box-shadow: inset 0px -1px 0 0px #0000000f;
22 | }
23 |
--------------------------------------------------------------------------------
/packages/startup/src/provider/index.css:
--------------------------------------------------------------------------------
1 | #main {
2 | overflow: auto;
3 | }
--------------------------------------------------------------------------------
/packages/startup/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib"
6 | },
7 | "include": [
8 | "./src"
9 | ],
10 | "exclude": [
11 | "./bundle"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/packages/sumi-core/README.md:
--------------------------------------------------------------------------------
1 | # core
2 |
3 | ## client
4 | 适配在前端场景下部分服务
5 |
6 | - extension kt-ext 的静态文件及文件读取
7 |
8 | ## server
9 | 实现相对 browser 端 的 server 端,使用 Proxy 代理到 server app
10 | 最大程度复用 browser 端的代码,只需按照需要实现对应 server path 的服务即可
11 |
12 | - DiskFileServicePath 文件系统服务
13 | - ExtensionNodeServiceServerPath 获取 extensions 相关数据服务
14 | - LogServiceForClientPath 日志服务
15 | - CommonServerPath 通用后端服务
16 | - FileSchemeDocNodeServicePath 文件文档服务
17 |
--------------------------------------------------------------------------------
/packages/sumi-core/__tests__/index.test.ts:
--------------------------------------------------------------------------------
1 | describe('core', () => {
2 | it('example', () => {
3 | expect(1 + 1).toBe(2);
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/packages/sumi-core/resources/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "worker-host": "worker-host.js"
3 | }
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/ai-native/index.ts:
--------------------------------------------------------------------------------
1 | import { Autowired } from '@opensumi/di';
2 | import {
3 | AINativeCoreContribution,
4 | IAIMiddleware,
5 | IInlineChatFeatureRegistry,
6 | } from '@opensumi/ide-ai-native/lib/browser/types';
7 | import { Disposable, Domain } from '@opensumi/ide-core-common';
8 | import { RuntimeConfig } from '../../common';
9 |
10 | @Domain(AINativeCoreContribution)
11 | export class CodeBlitzAINativeContribution extends Disposable implements AINativeCoreContribution {
12 | @Autowired(RuntimeConfig)
13 | runtimeConfig: RuntimeConfig;
14 |
15 | middleware?: IAIMiddleware | undefined;
16 |
17 | constructor() {
18 | super();
19 | if (this.runtimeConfig.aiNative?.middleware) {
20 | this.middleware = this.runtimeConfig.aiNative.middleware;
21 | }
22 | }
23 |
24 | registerInlineChatFeature(registry: IInlineChatFeatureRegistry): void {
25 | const providerInlineChat = this.runtimeConfig.aiNative?.providerEditorInlineChat;
26 |
27 | if (providerInlineChat) {
28 | const providerValues = providerInlineChat();
29 |
30 | providerValues.forEach(({ operational, handler }) => {
31 | registry.registerEditorInlineChat(operational, handler);
32 | });
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/ai-native/preferences.ts:
--------------------------------------------------------------------------------
1 | import { Injector } from '@opensumi/di';
2 | import { IAINativeCapabilities } from '@opensumi/ide-core-common';
3 | import { AppConfig, RuntimeConfig } from '../../common';
4 |
5 | const codeblitzDefaultCapabilities: IAINativeCapabilities = {
6 | supportsTerminalCommandSuggest: false,
7 | supportsTerminalDetection: false,
8 | };
9 |
10 | export const injectAINativePreferences = (injector: Injector): void => {
11 | const runtimeConfig: RuntimeConfig = injector.get(RuntimeConfig);
12 | const appConfig: AppConfig = injector.get(AppConfig);
13 |
14 | if (runtimeConfig.aiNative && runtimeConfig.aiNative.enable) {
15 | const aiNativeCaps = runtimeConfig.aiNative.capabilities || {};
16 |
17 | appConfig.AINativeConfig = {
18 | capabilities: {
19 | ...appConfig.AINativeConfig?.capabilities,
20 | ...aiNativeCaps,
21 | ...codeblitzDefaultCapabilities,
22 | },
23 | };
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/custom/index.ts:
--------------------------------------------------------------------------------
1 | export * from './editor';
2 | export * from './file-tree';
3 | export * from './menu';
4 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/custom/menu.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@opensumi/di';
2 | import { Domain } from '@opensumi/ide-core-browser';
3 | import { IMenuRegistry, MenuContribution, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';
4 |
5 | @Domain(MenuContribution)
6 | export class MenuConfigContribution implements MenuContribution {
7 | registerMenus(menuRegistry: IMenuRegistry) {
8 | menuRegistry.removeMenubarItem(MenuId.MenubarHelpMenu);
9 | menuRegistry.removeMenubarItem(MenuId.MenubarTerminalMenu);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/debug/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * typescript 有 breakpoints contributes
3 | * 暂时不支持 debug,后续可以考虑在前端 debug js 的方案
4 | */
5 |
6 | export * from '@opensumi/ide-debug/lib/browser/debug-preferences';
7 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/editor-empty/editor-empty.contribution.ts:
--------------------------------------------------------------------------------
1 | import { Autowired } from '@opensumi/di';
2 | import { ComponentContribution, ComponentRegistry, Domain } from '@opensumi/ide-core-browser';
3 | import { RuntimeConfig } from '../../common';
4 | import { EditorEmptyComponent } from './editor-empty.view';
5 |
6 | @Domain(ComponentContribution)
7 | export class EditorEmptyContribution implements ComponentContribution {
8 | @Autowired(RuntimeConfig)
9 | runtimeConfig: RuntimeConfig;
10 |
11 | registerComponent(registry: ComponentRegistry) {
12 | const editorEmpty = this.runtimeConfig.EditorEmpty;
13 |
14 | registry.register('editor-empty', {
15 | id: 'editor-empty',
16 | component: editorEmpty ? editorEmpty : EditorEmptyComponent,
17 | });
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/editor-empty/editor-empty.module.less:
--------------------------------------------------------------------------------
1 | .emptyContainer {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | flex-direction: column;
6 | height: 100%;
7 | color: var(--descriptionForeground);
8 | > div {
9 | height: 82px;
10 | margin: 20px;
11 | }
12 | img {
13 | height: 82px;
14 | display: block;
15 | }
16 | p {
17 | font-size: 20px;
18 | color: var(--foreground);
19 | }
20 | i {
21 | font-style: normal;
22 | background-color: var(--editorGroupHeader-tabsBackground);
23 | color: var(--descriptionForeground);
24 | border-radius: 4px;
25 | margin-right: 2px;
26 | text-align: center;
27 | padding: 0 4px;
28 | min-width: 22px;
29 | display: inline-block;
30 | height: 22px;
31 | line-height: 22px;
32 | box-shadow: 0 1px 0 0 #43484D;
33 | }
34 | ul {
35 | margin: 0;
36 | padding: 0;
37 | width: 100%;
38 | li {
39 | line-height: 2.5;
40 | display: flex;
41 | > span {
42 | flex: 1;
43 | text-align: right;
44 | &:last-child {
45 | text-align: left;
46 | margin-left: 16px;
47 | span {
48 | margin-right: 8px;
49 | }
50 | }
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/extension-manager/common.module.less:
--------------------------------------------------------------------------------
1 | .icon {
2 | vertical-align: middle;
3 | font-size: 14px !important;
4 | }
5 |
6 | .tab_icon {
7 | width: 14px;
8 | height: 14px;
9 | }
10 |
11 | .tag {
12 | margin-right: 4px;
13 | background-color: var(--list-inactiveSelectionBackground);
14 | border: 1px solid var(--sideBarSectionHeader-background);
15 | color: var(--descriptionForeground);
16 | padding: 0 4px;
17 | border-radius: 4px;
18 | user-select: text;
19 | white-space: nowrap;
20 | font-size: 12px;
21 | height: 20px;
22 | line-height: 18px;
23 | box-sizing: border-box;
24 | &.green {
25 | background-color: rgba(#73D13D, 0.15);
26 | border-color: rgba(#73D13D, 0.25);
27 | }
28 |
29 | &.developmentMode {
30 | background-color: var(--statusBar-debuggingBackground);
31 | color: var(--foreground);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/extension-manager/extension-list/index.module.less:
--------------------------------------------------------------------------------
1 |
2 | .wrap {
3 | position: relative;
4 | }
5 |
6 | .selected {
7 | :global(.kt-extension-raw) {
8 | background: var(--list-activeSelectionBackground);
9 | }
10 |
11 | :global(.kt-button) {
12 | color: currentColor;
13 | }
14 | :global(.kt-extension-raw-description),
15 | :global(.kt-extension-raw) {
16 | color: var(--list-activeSelectionForeground);
17 | }
18 | }
19 |
20 | .empty {
21 | padding-top: 35px;
22 | text-align: center;
23 | color: var(--descriptionForeground);
24 | }
25 |
26 | .last_item {
27 | margin-bottom: 32px;
28 | }
29 |
30 | @keyframes loading {
31 | 0% {
32 | left: 0;
33 | }
34 | 50% {
35 | left: calc(100% - 20px);
36 | width: 20px;
37 | }
38 | 100% {
39 | left: 0;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/extension-manager/extension-panel-accordion.view.tsx:
--------------------------------------------------------------------------------
1 | import { useInjectable, ViewState } from '@opensumi/ide-core-browser';
2 | import { observer } from 'mobx-react-lite';
3 | import React from 'react';
4 |
5 | import { IExtensionManagerService } from './base';
6 | import { ExtensionList } from './extension-list';
7 | import { ExtensionManagerService } from './extension-manager.service';
8 |
9 | export const ExtensionEnableAccordion: React.FC<{
10 | viewState: ViewState;
11 | }> = observer(({ viewState }) => {
12 | const extensionManagerService = useInjectable(IExtensionManagerService);
13 |
14 | return ;
15 | });
16 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/extension-manager/extension-panel.module.less:
--------------------------------------------------------------------------------
1 | .panel,
2 | .panel :global(.views-container){
3 | height: 100%;
4 | }
5 |
6 | .title {
7 | line-height: 20px;
8 | padding: 8px;
9 | font-size: 12px;
10 | }
11 |
12 | .accordion {
13 | height: calc(100% - 36px);
14 | }
15 |
16 | .tabs {
17 | padding: 5px 0 0 10px;
18 |
19 | :global(.kt-tab) {
20 | font-size: 12px;
21 | }
22 | }
23 |
24 | .content {
25 | height: 100%;
26 | }
27 |
28 | .search_nofound {
29 | padding-top: 100px;
30 | display: flex;
31 | flex-direction: column;
32 | align-items:center;
33 | justify-content: center;
34 | }
35 |
36 | .search_nofound_link {
37 | margin-top: 10px;
38 | }
39 |
40 | .marketplace_search_nofound {
41 | :global(.link-button) {
42 | color: var(--textLink-foreground);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/extension-manager/extension-panel.view.tsx:
--------------------------------------------------------------------------------
1 | import { localize } from '@opensumi/ide-core-browser';
2 | import { AccordionContainer } from '@opensumi/ide-main-layout/lib/browser/accordion/accordion.view';
3 | import * as React from 'react';
4 | import { enableExtensionsContainerId, enableExtensionsTarbarHandlerId } from './base';
5 | import { ExtensionEnableAccordion } from './extension-panel-accordion.view';
6 | import * as styles from './extension-panel.module.less';
7 |
8 | export default () => {
9 | return (
10 |
11 |
{localize('marketplace.tab.installed')}
12 |
24 |
25 | );
26 | };
27 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/extension-manager/extension-resource-provider.ts:
--------------------------------------------------------------------------------
1 | import { Autowired, Injectable } from '@opensumi/di';
2 | import { localize, MaybePromise, URI, WithEventBus } from '@opensumi/ide-core-browser';
3 | import { IResource, IResourceProvider } from '@opensumi/ide-editor';
4 | import { IconType, IIconService } from '@opensumi/ide-theme';
5 | import { EXTENSION_SCHEME } from './base';
6 | import * as styles from './common.module.less';
7 |
8 | @Injectable()
9 | export class ExtensionResourceProvider extends WithEventBus implements IResourceProvider {
10 | readonly scheme: string = EXTENSION_SCHEME;
11 |
12 | @Autowired(IIconService)
13 | iconService: IIconService;
14 |
15 | provideResource(uri: URI): MaybePromise> {
16 | const { name, icon } = uri.getParsedQuery();
17 | const iconClass = this.iconService.fromIcon('', icon, IconType.Background);
18 | return {
19 | name: `${localize('marketplace.extension.container')}: ${name}`,
20 | icon: `${iconClass} ${styles.tab_icon}`,
21 | uri,
22 | };
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/extension-manager/index.tsx:
--------------------------------------------------------------------------------
1 | import { Injectable, Provider } from '@opensumi/di';
2 | import { BrowserModule } from '@opensumi/ide-core-browser';
3 | import { IExtensionManagerService } from './base';
4 | import { ExtensionManagerContribution } from './extension-manager.contribution';
5 | import { ExtensionManagerService } from './extension-manager.service';
6 |
7 | @Injectable()
8 | export class ExtensionManagerModule extends BrowserModule {
9 | providers: Provider[] = [
10 | ExtensionManagerContribution,
11 | {
12 | token: IExtensionManagerService,
13 | useClass: ExtensionManagerService,
14 | },
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/extension/index.ts:
--------------------------------------------------------------------------------
1 | export * from './extension-fs.provider';
2 | export * from './extension.contribution';
3 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/file-scheme/index.contribution.ts:
--------------------------------------------------------------------------------
1 | import { Autowired } from '@opensumi/di';
2 | import { Domain } from '@opensumi/ide-core-browser';
3 | import { IEditorOpenType, IResource } from '@opensumi/ide-editor';
4 | import { BrowserEditorContribution, EditorComponentRegistry } from '@opensumi/ide-editor/lib/browser';
5 | import { IFileServiceClient } from '@opensumi/ide-file-service/lib/common';
6 |
7 | @Domain(BrowserEditorContribution)
8 | export class FileSchemeContribution implements BrowserEditorContribution {
9 | @Autowired(IFileServiceClient)
10 | private readonly fileServiceClient: IFileServiceClient;
11 |
12 | registerEditorComponent(editorComponentRegistry: EditorComponentRegistry) {
13 | editorComponentRegistry.registerEditorComponentResolver(
14 | (scheme: string) => {
15 | return scheme === 'file' || this.fileServiceClient.handlesScheme(scheme) ? 0 : -1;
16 | },
17 | (resource: IResource, results: IEditorOpenType[]) => {
18 | // 如果装了 image-preview 插件,把内置的图片组件去掉
19 | // TODO: 暴露 static-resource 配置
20 | if (results.length > 1 && results[0].componentId === 'image-preview') {
21 | results.shift();
22 | }
23 | },
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/override/breadcrumb.service.ts:
--------------------------------------------------------------------------------
1 | import { Autowired, Injectable } from '@opensumi/di';
2 | import { MaybeNull, URI } from '@opensumi/ide-core-browser';
3 | import { BreadCrumbServiceImpl } from '@opensumi/ide-editor/lib/browser/breadcrumb';
4 | import { IEditor } from '@opensumi/ide-editor/lib/common';
5 | import { RuntimeConfig } from '../../common/types';
6 |
7 | export { IBreadCrumbService } from '@opensumi/ide-editor/lib/browser/types';
8 |
9 | @Injectable()
10 | export class BreadCrumbServiceImplOverride extends BreadCrumbServiceImpl {
11 | @Autowired(RuntimeConfig)
12 | runtimeConfig: RuntimeConfig;
13 |
14 | getBreadCrumbs(uri: URI, editor: MaybeNull) {
15 | if (this.runtimeConfig.hideBreadcrumb) {
16 | return undefined;
17 | }
18 | return super.getBreadCrumbs(uri, editor);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/override/extensionStorageService.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@opensumi/di';
2 | import { ClientAppContribution, Domain } from '@opensumi/ide-core-browser';
3 | import { IExtensionStorageService } from '@opensumi/ide-extension-storage';
4 | import { ExtensionStorageService } from '@opensumi/ide-extension-storage/lib/browser/storage.service';
5 |
6 | // TODO
7 | // 这里手动初始化 否则 ExtensionStoragePathServer 中 deferredStoragePath 会卡住
8 |
9 | @Domain(ClientAppContribution)
10 | export class ExtensionStorageServiceOverride extends ExtensionStorageService
11 | implements IExtensionStorageService, ClientAppContribution
12 | {
13 | constructor() {
14 | super();
15 | }
16 |
17 | initialize() {}
18 | }
19 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/override/vscodeContributesService.ts:
--------------------------------------------------------------------------------
1 | import { VSCodeContributePoint } from '@opensumi/ide-extension';
2 | import {
3 | VSCodeContributesService,
4 | VSCodeContributesServiceToken,
5 | } from '@opensumi/ide-extension/lib/browser/vscode/contributes';
6 | import { BreakpointsContributionPoint } from '@opensumi/ide-extension/lib/browser/vscode/contributes/breakpoints';
7 | import { DebuggersContributionPoint } from '@opensumi/ide-extension/lib/browser/vscode/contributes/debuggers';
8 | import { TerminalContributionPoint } from '@opensumi/ide-extension/lib/browser/vscode/contributes/terminal';
9 |
10 | export { VSCodeContributesServiceToken };
11 |
12 | // Codeblitz 内不需要的初始化贡献点
13 | const OUTSIDE_POINT = [
14 | TerminalContributionPoint,
15 | DebuggersContributionPoint,
16 | BreakpointsContributionPoint,
17 | ] as (typeof VSCodeContributePoint)[];
18 |
19 | export class VSCodeContributesServiceOverride extends VSCodeContributesService {
20 | constructor() {
21 | super();
22 | this.ContributionPoints = this.ContributionPoints.filter((t) => {
23 | return !OUTSIDE_POINT.includes(t);
24 | });
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/preference/preference.setting.contribution.ts:
--------------------------------------------------------------------------------
1 | import { Domain, ISettingGroup } from '@opensumi/ide-core-browser';
2 | import { PreferenceSettingId, SettingContribution } from '@opensumi/ide-preferences';
3 |
4 | @Domain(SettingContribution)
5 | export class PreferenceSettingContribution implements SettingContribution {
6 | // 移除默认终端首选项
7 | handleSettingGroup(settingGroup: ISettingGroup[]) {
8 | return settingGroup.filter((group) => {
9 | return group.id !== PreferenceSettingId.Terminal;
10 | });
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/textmate-language-grammar/README.md:
--------------------------------------------------------------------------------
1 | 语言通过类似 CodeMirror 的 mode 形式引入,相对插件的方式,不会造成延迟,目前内置 40 中语言,对于其它的还是推荐用插件的方式注册
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/textmate-language-grammar/base.ts:
--------------------------------------------------------------------------------
1 | export const ILanguageGrammarRegistrationService = Symbol('ILanguageGrammarRegistrationService');
2 |
3 | export interface ILanguageGrammarRegistrationService {
4 | languageDidRegistered: Promise;
5 | initRegisterLanguageAndGrammar: () => Promise;
6 | registerLanguageAndGrammar: (languageId: string) => Promise;
7 | registerByFilename: (filename: string) => Promise;
8 | }
9 |
10 | export enum TextmateKey {
11 | language = 'language',
12 | grammar = 'grammar',
13 | }
14 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/textmate-language-grammar/index.contribution.ts:
--------------------------------------------------------------------------------
1 | import { Autowired } from '@opensumi/di';
2 | import { ClientAppContribution } from '@opensumi/ide-core-browser';
3 | import { Disposable, Domain } from '@opensumi/ide-core-common';
4 |
5 | import { ILanguageGrammarRegistrationService } from './base';
6 |
7 | @Domain(ClientAppContribution)
8 | export class TextmateLanguageGrammarContribution implements ClientAppContribution {
9 | @Autowired(ILanguageGrammarRegistrationService)
10 | private readonly languageGrammarService: ILanguageGrammarRegistrationService;
11 |
12 | async initialize() {
13 | await this.languageGrammarService.initRegisterLanguageAndGrammar();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/welcome/welcome.module.less:
--------------------------------------------------------------------------------
1 | .container {
2 | min-height: 100%;
3 | width: 88.5%;
4 | color: var(--foreground);
5 | margin: 0 auto;
6 | padding: 32px 0;
7 | background-color: var(--welcomePage-background);
8 | }
9 |
10 | .title {
11 | .productName {
12 | font-size: 30px;
13 | line-height: 32px;
14 | }
15 |
16 | .productDescription {
17 | margin-top: 4px;
18 | color: var(--descriptionForeground);
19 | font-size: 14px;
20 | line-height: 22px;
21 | }
22 | }
23 |
24 | .tabIcon {
25 | width: 14px;
26 | height: 14px;
27 | }
28 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/client/welcome/welcome.view.tsx:
--------------------------------------------------------------------------------
1 | import { useInjectable } from '@opensumi/ide-core-browser';
2 | import { localize } from '@opensumi/ide-core-common';
3 | import { ReactEditorComponent } from '@opensumi/ide-editor/lib/browser';
4 | import React from 'react';
5 | import { AppCommonConfig, AppConfig } from '../../common';
6 |
7 | import styles from './welcome.module.less';
8 | export const EditorWelcomeComponent: ReactEditorComponent = () => {
9 | const appConfig = useInjectable(AppConfig);
10 |
11 | return (
12 |
13 |
14 |
{appConfig.app?.productName}
15 |
{localize('product.description')}
16 |
17 |
18 | );
19 | };
20 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/common/constant.ts:
--------------------------------------------------------------------------------
1 | export const EXT_SCHEME = 'kt-ext';
2 |
3 | export enum OSSBucket {
4 | internal = 'alipay-rmsdeploy-image.cn-hangzhou.alipay.aliyun-inc.com',
5 | public = 'gw.alipayobjects.com/os',
6 | }
7 |
8 | export const ROOT = '/';
9 |
10 | export const HOME_ROOT = '/home';
11 |
12 | export const TMP_ROOT = '/tmp';
13 |
14 | export const WORKSPACE_ROOT = '/workspace';
15 |
16 | export const SCM_ROOT = '/scm';
17 |
18 | export const CODE_ROOT = '/code';
19 |
20 | export const IDB_ROOT = '/idb';
21 |
22 | // 全局数据存储目录
23 | export const STORAGE_DIR = '.codeblitz';
24 |
25 | /**
26 | * home 的 indexedDB 名称
27 | */
28 | export const HOME_IDB_NAME = 'CODEBLITZ_HOME';
29 |
30 | /**
31 | * workspace 的 indexedDB 名称
32 | */
33 | export const WORKSPACE_IDB_NAME = 'CODEBLITZ_WORKSPACE';
34 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/common/enum.ts:
--------------------------------------------------------------------------------
1 | export enum REPORT_NAME {
2 | APP_START_ERROR = 'alex.appStartError',
3 | CODE_SERVICE_REQUEST_ERROR = 'code-service.requestError',
4 | }
5 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/common/index.ts:
--------------------------------------------------------------------------------
1 | export * from './constant';
2 | export * from './enum';
3 | export * from './types';
4 | export * from './util';
5 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/common/theme.ts:
--------------------------------------------------------------------------------
1 | import { IExtensionBasicMetadata } from '@codeblitzjs/ide-common';
2 | import { BuiltinTheme, getThemeId, getThemeType, IThemeContribution } from '@opensumi/ide-theme';
3 |
4 | const builtinTheme = {
5 | "opensumi-design-dark-theme": "vs-dark",
6 | "opensumi-design-light-theme": "vs",
7 | } as Record
8 |
9 | export const getThemeTypeByPreferenceThemeId = (
10 | themeId: string,
11 | extensionMetadata: IExtensionBasicMetadata[] | undefined,
12 | ) => {
13 | let uiTheme: BuiltinTheme | undefined;
14 | if (themeId && extensionMetadata) {
15 | for (const ext of extensionMetadata) {
16 | const theme: IThemeContribution | undefined = ext.packageJSON.contributes?.themes?.find(
17 | (contrib: IThemeContribution) => contrib && getThemeId(contrib) === themeId,
18 | );
19 |
20 | if (theme?.uiTheme) {
21 | uiTheme = theme.uiTheme;
22 | break;
23 | }
24 | }
25 | }
26 | if (builtinTheme[themeId]) {
27 | uiTheme = builtinTheme[themeId];
28 | }
29 |
30 | return getThemeType(uiTheme || 'vs-dark');
31 | };
32 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './client';
2 | export * from './common';
3 | export * from './server';
4 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/ai-native/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable, Provider } from '@opensumi/di';
2 | import { ChatProxyServiceToken } from '@opensumi/ide-ai-native/lib/common';
3 | import { AIBackSerivcePath, AIBackSerivceToken } from '@opensumi/ide-core-common';
4 | import { NodeModule } from '../core/app';
5 | import { AIBackService } from './ai-back-service';
6 |
7 | @Injectable()
8 | export class AINativeServerModule extends NodeModule {
9 | providers: Provider[] = [
10 | {
11 | token: AIBackSerivceToken,
12 | useClass: AIBackService,
13 | },
14 | ];
15 |
16 | backServices = [
17 | {
18 | servicePath: AIBackSerivcePath,
19 | token: AIBackSerivceToken,
20 | clientToken: ChatProxyServiceToken,
21 | },
22 | ];
23 | }
24 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/core/base.ts:
--------------------------------------------------------------------------------
1 | import type {
2 | ICommonServer as _ICommonServer,
3 | ILogServiceManager as _ILogServiceManager,
4 | } from '@opensumi/ide-core-common';
5 | import { RootFS } from '../../common/types';
6 |
7 | export { CommonServerPath } from '@opensumi/ide-core-common';
8 |
9 | export const ICommonServer = Symbol('ICommonServer');
10 |
11 | export interface ICommonServer extends _ICommonServer {}
12 |
13 | export const ILogServiceManager = Symbol('ILogServiceManager');
14 |
15 | export interface ILogServiceManager extends _ILogServiceManager {}
16 |
17 | export const FileSystemContribution = Symbol('FileSystemContribution');
18 |
19 | export interface FileSystemContribution {
20 | // 挂载文件系统,此时使用默认的 MountableFileSystem,可自定义挂载路径
21 | mountFileSystem(rootFS: RootFS): Promise;
22 | }
23 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/core/common.module.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@opensumi/di';
2 | import { CommonServerProtocol } from '@opensumi/ide-connection/lib/common/protocols/common-server';
3 | import { CommonServerPath, ICommonServer } from '@opensumi/ide-core-common';
4 | import { NodeModule } from './app';
5 | import { FileSystemContribution } from './base';
6 | import { CommonServer } from './common.server';
7 | import { FileSystemConfigContribution, FileSystemLaunchContribution } from './fs-launch.contribution';
8 |
9 | @Injectable()
10 | export class ServerCommonModule extends NodeModule {
11 | providers = [
12 | {
13 | token: ICommonServer,
14 | useClass: CommonServer,
15 | },
16 | FileSystemLaunchContribution,
17 | FileSystemConfigContribution,
18 | ];
19 | backServices = [
20 | {
21 | servicePath: CommonServerPath,
22 | token: ICommonServer,
23 | protocol: CommonServerProtocol,
24 | },
25 | ];
26 | contributionProvider = [FileSystemContribution];
27 | }
28 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/core/common.server.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@opensumi/di';
2 | import { OperatingSystem } from '@opensumi/ide-core-common';
3 | import { ICommonServer } from './base';
4 |
5 | @Injectable()
6 | export class CommonServer implements ICommonServer {
7 | async getBackendOS() {
8 | // 使用 linux 作为 server,path 保持 posix 风格
9 | return OperatingSystem.Linux;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/core/index.ts:
--------------------------------------------------------------------------------
1 | export * from './app';
2 | export * from './base';
3 | export * from './common.module';
4 | export * from './common.server';
5 | export { isFilesystemReady } from './filesystem';
6 | export * from './node-logger';
7 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/extension-manager/extension-manager.contribution.ts:
--------------------------------------------------------------------------------
1 | import { Autowired } from '@opensumi/di';
2 | import { Domain } from '@opensumi/ide-core-common';
3 | import { ServerAppContribution, ServerConfig } from '../core/app';
4 | import { fsExtra as fse } from '../node';
5 |
6 | @Domain(ServerAppContribution)
7 | export class ExtensionManagerContribution implements ServerAppContribution {
8 | @Autowired(ServerConfig)
9 | private serverConfig: ServerConfig;
10 |
11 | async initialize() {
12 | // 初始化插件目录
13 | await fse.mkdirp(this.serverConfig.marketplace.extensionDir);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/extension-manager/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@opensumi/di';
2 | import { NodeModule } from '../core/app';
3 |
4 | import { ExtensionManagerContribution } from './extension-manager.contribution';
5 |
6 | /**
7 | * 后续考虑支持安装 worker 插件
8 | */
9 |
10 | @Injectable()
11 | export class ExtensionManagerModule extends NodeModule {
12 | providers = [ExtensionManagerContribution];
13 | }
14 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/file-scheme/base.ts:
--------------------------------------------------------------------------------
1 | import type { IFileSchemeDocNodeService as _IFileSchemeDocNodeService } from '@opensumi/ide-file-scheme/lib/common';
2 |
3 | export { FileSchemeDocNodeServicePath } from '@opensumi/ide-file-scheme/lib/common';
4 |
5 | export const IFileSchemeDocNodeService = Symbol('FileSchemeDocNodeService');
6 |
7 | export interface IFileSchemeDocNodeService extends _IFileSchemeDocNodeService {}
8 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/file-scheme/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@opensumi/di';
2 | import { NodeModule } from '../core/app';
3 | import { FileSchemeDocNodeServicePath, IFileSchemeDocNodeService } from './base';
4 |
5 | import { FileSchemeDocNodeServiceImpl } from './file-scheme-doc.service';
6 |
7 | export * from './base';
8 |
9 | @Injectable()
10 | export class FileSchemeNodeModule extends NodeModule {
11 | providers = [
12 | {
13 | token: IFileSchemeDocNodeService,
14 | useClass: FileSchemeDocNodeServiceImpl,
15 | },
16 | ];
17 |
18 | backServices = [
19 | {
20 | servicePath: FileSchemeDocNodeServicePath,
21 | token: IFileSchemeDocNodeService,
22 | },
23 | ];
24 | }
25 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/file-search/base.ts:
--------------------------------------------------------------------------------
1 | import type { IFileSearchService as _IFileSearchService } from '@opensumi/ide-file-search/lib/common';
2 |
3 | export interface IFileSearchService extends _IFileSearchService {}
4 |
5 | export const IFileSearchService = Symbol('FileSearchService');
6 |
7 | export const FileSearchServicePath = 'FileSearchServicePath';
8 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/file-search/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@opensumi/di';
2 | import { NodeModule } from '../core/app';
3 | import { FileSearchServicePath, IFileSearchService } from './base';
4 | import { FileSearchService } from './file-search.service';
5 |
6 | @Injectable()
7 | export class FileSearchModule extends NodeModule {
8 | providers = [
9 | {
10 | token: IFileSearchService,
11 | useClass: FileSearchService,
12 | },
13 | ];
14 |
15 | backServices = [
16 | {
17 | token: IFileSearchService,
18 | servicePath: FileSearchServicePath,
19 | },
20 | ];
21 | }
22 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/file-service/base.ts:
--------------------------------------------------------------------------------
1 | import {
2 | IDiskFileProvider as _IDiskFileProvider,
3 | IFileService as _IFileService,
4 | } from '@opensumi/ide-file-service/lib/common';
5 |
6 | export { DiskFileServicePath, FileServicePath } from '@opensumi/ide-file-service/lib/common';
7 |
8 | export const IDiskFileProvider = Symbol('IDiskFileProvider');
9 |
10 | export interface IDiskFileProvider extends _IDiskFileProvider {}
11 |
12 | export const IFileService = Symbol('IFileService');
13 |
14 | export interface IFileService extends _IFileService {}
15 |
16 | export interface EncodingInfo {
17 | id: string; // encoding identifier
18 | labelLong: string; // long label name
19 | labelShort: string; // short label name
20 | }
21 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/file-service/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable, Provider } from '@opensumi/di';
2 | import { DiskFileServiceProtocol } from '@opensumi/ide-file-service/lib/common/protocols/disk-file-service';
3 | import { NodeModule } from '../core/app';
4 | import { DiskFileServicePath, FileServicePath, IDiskFileProvider, IFileService } from './base';
5 | import { DiskFileSystemProvider } from './disk-file-system.provider';
6 | import { getSafeFileService } from './file-service';
7 |
8 | export * from './base';
9 |
10 | @Injectable()
11 | export class FileServiceModule extends NodeModule {
12 | providers: Provider[] = [
13 | {
14 | token: IDiskFileProvider,
15 | useClass: DiskFileSystemProvider,
16 | },
17 | {
18 | token: IFileService,
19 | useFactory: getSafeFileService,
20 | },
21 | ];
22 |
23 | backServices = [
24 | {
25 | servicePath: DiskFileServicePath,
26 | token: IDiskFileProvider,
27 | protocol: DiskFileServiceProtocol,
28 | },
29 | {
30 | servicePath: FileServicePath,
31 | token: IFileService,
32 | },
33 | ];
34 | }
35 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/logs-core/base.ts:
--------------------------------------------------------------------------------
1 | import { ILogServiceForClient as _ILogServiceForClient } from '@opensumi/ide-logs/lib/common';
2 |
3 | export { LogServiceForClientPath } from '@opensumi/ide-logs/lib/common';
4 |
5 | export const ILogServiceForClient = Symbol('LogServiceForClient');
6 |
7 | export interface ILogServiceForClient extends _ILogServiceForClient {}
8 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/logs-core/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@opensumi/di';
2 | import { NodeModule } from '../core/app';
3 | import { ILogServiceManager } from '../core/base';
4 | import { ILogServiceForClient, LogServiceForClientPath } from './base';
5 | import { LogServiceManager } from './log-manager';
6 | import { LogServiceForClient } from './log.service';
7 |
8 | export * from './base';
9 |
10 | @Injectable()
11 | export class LogServiceModule extends NodeModule {
12 | providers = [
13 | {
14 | token: ILogServiceForClient,
15 | useClass: LogServiceForClient,
16 | },
17 | {
18 | token: ILogServiceManager,
19 | useClass: LogServiceManager,
20 | },
21 | ];
22 |
23 | backServices = [
24 | {
25 | servicePath: LogServiceForClientPath,
26 | token: ILogServiceForClient,
27 | },
28 | ];
29 | }
30 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/node/extend/fs-extra.ts:
--------------------------------------------------------------------------------
1 | import assert from 'assert';
2 | import buffer from 'buffer';
3 | import fsExtraFactory from 'fs-extra-factory';
4 | import path from 'path';
5 |
6 | import { fs } from '../bfs';
7 |
8 | export const fsExtra = fsExtraFactory({
9 | fs,
10 | path,
11 | process,
12 | assert,
13 | buffer,
14 | });
15 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/node/index.ts:
--------------------------------------------------------------------------------
1 | export * from './bfs';
2 |
3 | // should place before other fs api
4 | export * as fsWatcher from './extend/fs-watcher';
5 |
6 | export * from './extend/fs-extra';
7 |
8 | export * from './extend/write-file-atomic';
9 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/opensumi-extension/base.ts:
--------------------------------------------------------------------------------
1 | import { ExtraMetadata, IExtensionMetadata } from '@codeblitzjs/ide-common';
2 |
3 | import { ExtensionNodeServiceServerPath, IExtensionNodeClientService } from '@opensumi/ide-extension';
4 |
5 | // https://medium.com/javascript-in-plain-english/leveraging-type-only-imports-and-exports-with-typescript-3-8-5c1be8bd17fb
6 | // https://blog.logrocket.com/whats-new-in-typescript-3-8/
7 | export type { ExtraMetadata, IExtensionMetadata };
8 |
9 | export { ExtensionNodeServiceServerPath, IExtensionNodeClientService };
10 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/opensumi-extension/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable, Provider } from '@opensumi/di';
2 | import { NodeModule } from '../core/app';
3 | import { ExtensionNodeServiceServerPath, IExtensionNodeClientService } from './base';
4 | import { ExtensionServiceClientImpl } from './extension.service.client';
5 |
6 | export { ExtensionServiceClientImpl, IExtensionNodeClientService };
7 |
8 | @Injectable()
9 | export class OpenSumiExtensionModule extends NodeModule {
10 | providers: Provider[] = [
11 | {
12 | token: IExtensionNodeClientService,
13 | useClass: ExtensionServiceClientImpl,
14 | },
15 | ];
16 | backServices = [
17 | {
18 | servicePath: ExtensionNodeServiceServerPath,
19 | token: IExtensionNodeClientService,
20 | },
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/search/base.ts:
--------------------------------------------------------------------------------
1 | import type { IContentSearchServer as _IContentSearchServer } from '@opensumi/ide-search/lib/common';
2 |
3 | export {
4 | ContentSearchOptions,
5 | ContentSearchResult,
6 | SEARCH_STATE,
7 | SendClientResult,
8 | } from '@opensumi/ide-search/lib/common';
9 |
10 | export const IContentSearchServer = Symbol('IContentSearchServer');
11 |
12 | export interface IContentSearchServer extends _IContentSearchServer {}
13 |
14 | export const ContentSearchServerPath = 'ContentSearchServerPath';
15 |
--------------------------------------------------------------------------------
/packages/sumi-core/src/server/search/index.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@opensumi/di';
2 | import { NodeModule } from '../core/app';
3 | import { ContentSearchServerPath, IContentSearchServer } from './base';
4 | import { ContentSearchService } from './content-search.service';
5 |
6 | @Injectable()
7 | export class SearchModule extends NodeModule {
8 | providers = [
9 | {
10 | token: IContentSearchServer,
11 | useClass: ContentSearchService,
12 | },
13 | ];
14 |
15 | backServices = [
16 | {
17 | servicePath: ContentSearchServerPath,
18 | token: IContentSearchServer,
19 | },
20 | ];
21 | }
22 |
--------------------------------------------------------------------------------
/packages/sumi-core/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./lib"
6 | },
7 | "include": [
8 | "./src"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/toolkit/README.md:
--------------------------------------------------------------------------------
1 | # toolkit
2 |
3 | 开发打包等统一工具箱,作为独立包可外部复用
4 |
5 | - webpack 为 webpack 配置,可在外部自定义 module 打包,统一了配置
6 | - polyfill node 的 polyfill,对 process, os 需要更强的自定义,因为不使用第三方的,对于 crypto 只提供部分 api 简单实现,否则户增大包体积(实际发现会多 1M)
7 |
--------------------------------------------------------------------------------
/packages/toolkit/__tests__/index.test.ts:
--------------------------------------------------------------------------------
1 | describe('toolkit', () => {
2 | it('example', () => {
3 | expect(1 + 1).toBe(2);
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/packages/toolkit/define.json:
--------------------------------------------------------------------------------
1 | {
2 | "__OPENSUMI_VERSION__": "3.7.2-next-1741226843.0"
3 | }
--------------------------------------------------------------------------------
/packages/toolkit/fixtures/worker-example/browser.js:
--------------------------------------------------------------------------------
1 | const React = require('React');
2 |
3 | const Component = () => {
4 | return React.createElement('div', {}, `当前时间戳:${Date.now()}`);
5 | };
6 |
7 | exports.Component = Component;
8 |
--------------------------------------------------------------------------------
/packages/toolkit/fixtures/worker-example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "worker.example",
3 | "version": "0.0.1",
4 | "publisher": "alex",
5 | "engines": {
6 | "opensumi": "*"
7 | },
8 | "activationEvents": [
9 | "*"
10 | ],
11 | "sumiContributes": {
12 | "workerMain": "./worker.js",
13 | "browserMain": "./browser.js",
14 | "browserViews": {
15 | "left": {
16 | "type": "add",
17 | "view": [
18 | {
19 | "id": "Component",
20 | "iconPath": "https://mdn.alipayobjects.com/huamei_hwfivk/afts/img/A*YELPToBg40oAAAAAAAAAAAAADlyoAQ/original"
21 | }
22 | ]
23 | }
24 | }
25 | },
26 | "contributes": {
27 | "jsonValidation": [
28 | {
29 | "fileMatch": "/package.json",
30 | "url": "./package.schema.json"
31 | }
32 | ],
33 | "yamlValidation": [
34 | {
35 | "fileMatch": "/my.yml",
36 | "url": "./package.schema.json"
37 | }
38 | ],
39 | "snippets": [
40 | {
41 | "language": "javascript",
42 | "path": "./snippet.json"
43 | }
44 | ]
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/packages/toolkit/fixtures/worker-example/package.schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/draft-07/schema#",
3 | "title": "worker-example contributions to package.json",
4 | "type": "object",
5 | "properties": {
6 | "worker-example": {
7 | "type": "object",
8 | "description": "worker-example test json validation",
9 | "properties": {
10 | "string": {
11 | "type": "string",
12 | "description": "string test",
13 | "enum": ["aaa", "bbb", "ccc"]
14 | }
15 | }
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/toolkit/fixtures/worker-example/snippet.json:
--------------------------------------------------------------------------------
1 | {
2 | "Print to console": {
3 | "prefix": "log",
4 | "body": [
5 | "// snippet log",
6 | "console.log('$1');",
7 | "$2"
8 | ],
9 | "description": "Log output to console"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/toolkit/fixtures/worker-example/worker.js:
--------------------------------------------------------------------------------
1 | const { commands, workspace } = require('vscode');
2 | const log = (scope, ...msg) => console.log(`>>>[worker-example][${scope}]`, ...msg);
3 |
4 | /** @type {import('vscode').ExtensionContext} */
5 | let context;
6 |
7 | exports.activate = async (ctx) => {
8 | context = ctx;
9 |
10 | log('start');
11 |
12 | commands.registerCommand('plugin.command.test', async () => {
13 | commands.registerCommand('plugin.command.say', (msg) => {
14 | log('plugin', msg);
15 | });
16 | log('plugin', await commands.executeCommand('plugin.command.add', 1));
17 | });
18 |
19 | // 这里时序似乎有问题,command 是在 onStart 时注册的
20 | // 而如果插件 activateEvents 为 *,那么有可能在 commands 注册之前激活
21 | // 可能需要在 opensumi 中把插件的激活时机调整到 onStart,或者 alex 后续将 extension 模块异步加载可解
22 | // lsif();
23 |
24 | context.workspaceState.update('worker-example-workspace-state', 'alex is great');
25 | context.globalState.update('worker-example-global-state', 'alex is great');
26 |
27 | commands.registerCommand('alex.settings', () => {
28 | workspace.getConfiguration().update('editor.fontSize', 16, true);
29 | workspace.getConfiguration().update('editor.tabSize', 8, true);
30 | workspace.getConfiguration().update('general.theme', 'opensumi-design-dark-theme', true);
31 | });
32 | };
33 |
--------------------------------------------------------------------------------
/packages/toolkit/index.js:
--------------------------------------------------------------------------------
1 | // Nothing.
2 |
--------------------------------------------------------------------------------
/packages/toolkit/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "checkJs": true,
4 | "resolveJsonModule": true
5 | },
6 | "include": [
7 | "./webpack",
8 | "./polyfill",
9 | "./fixtures"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/toolkit/polyfill/process.js:
--------------------------------------------------------------------------------
1 | exports.nextTick = function nextTick(fn) {
2 | var args = Array.prototype.slice.call(arguments);
3 | args.shift();
4 | setTimeout(function() {
5 | fn.apply(null, args);
6 | }, 0);
7 | };
8 |
9 | exports.platform =
10 | exports.arch =
11 | exports.execPath =
12 | exports.title =
13 | 'browser';
14 | exports.pid = 1;
15 | exports.browser = true;
16 | exports.env = {};
17 | exports.argv = [];
18 |
19 | exports.binding = function(name) {
20 | throw new Error('No such module. (Possibly not yet loaded)');
21 | };
22 |
23 | var cwd = '/';
24 | var path;
25 | exports.cwd = function() {
26 | return cwd;
27 | };
28 | exports.chdir = function(dir) {
29 | if (!path) path = require('path');
30 | cwd = path.resolve(dir, cwd);
31 | };
32 |
33 | exports.exit =
34 | exports.kill =
35 | exports.umask =
36 | exports.dlopen =
37 | exports.uptime =
38 | exports.memoryUsage =
39 | exports.uvCounters =
40 | function() {};
41 | exports.features = {};
42 |
--------------------------------------------------------------------------------
/packages/toolkit/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | codeblitzjs
6 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/packages/toolkit/public/webview.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Webview Panel Container
8 | <% for (key in htmlWebpackPlugin.files.js) { %>
9 |
10 | <% } %>
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/toolkit/webpack/config.languages.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const TerserPlugin = require('terser-webpack-plugin');
3 | const { config } = require('./util');
4 |
5 | module.exports = () => {
6 | return {
7 | context: path.join(__dirname, '../../..'),
8 | entry: {
9 | [config.languageGlobalEntry]: './packages/core/languages/index.js',
10 | [config.languageGlobalMinEntry]: './packages/core/languages/index.js',
11 | },
12 | output: {
13 | path: path.resolve(__dirname, '../../core/languages'),
14 | library: 'AlexLanguages',
15 | libraryTarget: 'global',
16 | },
17 | devtool: false,
18 | mode: 'production',
19 | resolve: {
20 | extensions: ['.js', '.json'],
21 | },
22 | externals: {
23 | '@codeblitzjs/ide-registry': 'Alex',
24 | },
25 | optimization: {
26 | minimize: true,
27 | minimizer: [
28 | new TerserPlugin({
29 | parallel: true,
30 | include: /\.min\.js$/,
31 | }),
32 | ],
33 | },
34 | };
35 | };
36 |
--------------------------------------------------------------------------------
/packages/toolkit/webpack/util/banner-plugin.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const { ConcatSource } = require('webpack-sources');
4 | const path = require('path');
5 |
6 | class BannerPlugin {
7 | constructor(options) {
8 | if (typeof options === 'string' || typeof options === 'function') {
9 | options = {
10 | banner: options,
11 | };
12 | }
13 | this.options = options;
14 | this.banner = typeof options.banner === 'function' ? options.banner : () => options.banner;
15 | }
16 |
17 | apply(compiler) {
18 | const options = this.options;
19 | const banner = this.banner;
20 |
21 | compiler.hooks.compilation.tap('BannerPlugin', (compilation) => {
22 | compilation.hooks.processAssets.tapPromise('BannerPlugin', async () => {
23 | const bannerAsset = await banner();
24 | for (const chunk of compilation.chunks) {
25 | if (options.entryOnly && !chunk.canBeInitial()) {
26 | continue;
27 | }
28 |
29 | for (const file of chunk.files) {
30 | if (path.extname(file) !== '.js') {
31 | continue;
32 | }
33 |
34 | compilation.updateAsset(file, (old) => new ConcatSource(bannerAsset, '\n', old));
35 | }
36 | }
37 | });
38 | });
39 | }
40 | }
41 |
42 | module.exports = BannerPlugin;
43 |
--------------------------------------------------------------------------------
/packages/toolkit/webpack/util/find-porter.js:
--------------------------------------------------------------------------------
1 | /**
2 | * link https://joecreager.com/5-reasons-to-avoid-deasync-for-node-js/
3 | */
4 |
5 | const { execSync } = require('child_process');
6 | const portfinder = require('portfinder');
7 |
8 | exports.findPort = async (basePort, child = false) => {
9 | try {
10 | const port = await portfinder.getPortPromise({ port: basePort });
11 | if (child) {
12 | process.stdout.write(String(port));
13 | } else {
14 | return port;
15 | }
16 | } catch (err) {
17 | if (child) {
18 | process.stdout.write('-1');
19 | } else {
20 | throw err;
21 | }
22 | }
23 | };
24 |
25 | exports.findPortSync = (basePort) => {
26 | const port = execSync(`node -e "require('${__filename}').findPort(${basePort}, true)"`, {
27 | encoding: 'utf-8',
28 | });
29 | if (port === '-1') {
30 | throw new Error('find port error');
31 | }
32 | return Number(port);
33 | };
34 |
--------------------------------------------------------------------------------
/packages/toolkit/webpack/util/tsconfig-paths-plugin.js:
--------------------------------------------------------------------------------
1 | /**
2 | * webpack5 tsconfig-paths-webpack-plugin 兼容性有点问题,extends 改下
3 | */
4 | const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
5 | const Options = require('tsconfig-paths-webpack-plugin/lib/options');
6 | const TsconfigPaths = require('tsconfig-paths');
7 |
8 | module.exports = class TsconfigPathsPluginPatch extends TsconfigPathsPlugin.default {
9 | constructor(rawOptions = {}) {
10 | super(rawOptions);
11 | const options = Options.getOptions(rawOptions);
12 | const context = options.context || process.cwd();
13 | const loadFrom = options.configFile || context;
14 | const loadResult = TsconfigPaths.loadConfig(loadFrom);
15 | if (loadResult.resultType === 'failed') {
16 | this.log.logError(`Failed to load ${loadFrom}: ${loadResult.message}`);
17 | } else {
18 | this.matchPath = TsconfigPaths.createMatchPathAsync(
19 | this.absoluteBaseUrl,
20 | loadResult.paths,
21 | options.mainFields,
22 | false,
23 | );
24 | }
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/packages/toolkit/webpack/util/type.ts:
--------------------------------------------------------------------------------
1 | import CopyWebpackPlugin from 'copy-webpack-plugin';
2 | import { Configuration } from 'webpack';
3 | import { Configuration as DevServerConfiguration } from 'webpack-dev-server';
4 |
5 | export interface WebpackConfiguration extends Configuration {
6 | devServer?: DevServerConfiguration;
7 | }
8 |
9 | export interface ConfigOption {
10 | /**
11 | * tsconfig 路径
12 | */
13 | tsconfigPath: string;
14 | /**
15 | * webpack mode
16 | */
17 | mode?: 'development' | 'production';
18 | /**
19 | * 输出 路径
20 | */
21 | outputPath?: string;
22 | /**
23 | * 模板路径
24 | */
25 | template?: string;
26 | /**
27 | * uri-loader limit
28 | */
29 | inlineLimit?: number;
30 | /**
31 | * DefineProvider
32 | */
33 | define?: Record;
34 | /**
35 | * CopyPlugin
36 | */
37 | copy?: ConstructorParameters[0];
38 | /**
39 | * 默认端口
40 | */
41 | port?: number;
42 | /**
43 | * 是否使用本地的 worker-host 好 webview host 资源
44 | */
45 | useLocalWorkerAndWebviewHost?: boolean;
46 | /**
47 | * webpack 配置
48 | */
49 | webpackConfig?: WebpackConfiguration;
50 | }
51 |
52 | export interface ConfigFn {
53 | (option: ConfigOption): WebpackConfiguration;
54 | }
55 |
--------------------------------------------------------------------------------
/packages/tsconfig.base.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "paths": {},
5 | "skipLibCheck": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/tsconfig.build.json:
--------------------------------------------------------------------------------
1 | {
2 | "references": [
3 | {
4 | "path": "./common/tsconfig.build.json"
5 | },
6 | {
7 | "path": "./cli/tsconfig.build.json"
8 | },
9 | {
10 | "path": "./registry/tsconfig.build.json"
11 | },
12 | {
13 | "path": "./sumi-core/tsconfig.build.json"
14 | },
15 | {
16 | "path": "./code-api/tsconfig.build.json"
17 | },
18 | {
19 | "path": "./code-service/tsconfig.build.json"
20 | },
21 | {
22 | "path": "./i18n/tsconfig.build.json"
23 | },
24 | {
25 | "path": "./plugin/tsconfig.build.json"
26 | },
27 | {
28 | "path": "./core/tsconfig.build.json"
29 | },
30 | {
31 | "path": "./startup/tsconfig.build.json"
32 | }
33 | ],
34 | "files": [],
35 | "include": []
36 | }
37 |
--------------------------------------------------------------------------------
/scripts/build-assets.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const fs = require('fs');
3 | const signale = require('signale');
4 | const { invoke, exec } = require('./utils/utils');
5 | const pkg = require('../package.json');
6 |
7 | invoke(async () => {
8 | signale.pending(`开始编译 worker-host 和 webview`);
9 |
10 | await exec('npx rimraf ./packages/sumi-core/resources');
11 | await exec(`yarn workspace @codeblitzjs/ide-toolkit build:host`);
12 |
13 |
14 | const distDir = path.resolve(__dirname, '../packages/sumi-core/resources');
15 | const manifest = require(path.join(distDir, 'manifest.json'));
16 | signale.log('manifest', manifest);
17 |
18 | const config = { __OPENSUMI_VERSION__: pkg.engines.opensumi };
19 |
20 | fs.writeFileSync(
21 | path.resolve(__dirname, '../packages/toolkit/define.json'),
22 | JSON.stringify(config, null, 2)
23 | );
24 |
25 | signale.success('构建资源成功');
26 | });
27 |
--------------------------------------------------------------------------------
/scripts/bundle.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const signale = require('signale');
3 | const fse = require('fs-extra');
4 | const { invoke, exec } = require('./utils/utils');
5 |
6 | invoke(async () => {
7 | const targetDir = path.join(__dirname, '../packages/core/bundle');
8 | await exec(`npx rimraf ${targetDir}`);
9 |
10 | signale.pending('开始打包');
11 |
12 | try {
13 | await exec('yarn workspace @codeblitzjs/ide-toolkit build');
14 |
15 | await fse.writeFile(
16 | path.join(targetDir, 'index.js'),
17 | `
18 | module.exports = require("./codeblitz");
19 | `.trim() + '\n'
20 | );
21 | await fse.writeFile(
22 | path.join(targetDir, 'index.d.ts'),
23 | `
24 | export * from "../lib";
25 | `.trim() + '\n'
26 | );
27 |
28 | // editor 类型文件
29 | await fse.writeFile(
30 | path.join(targetDir, 'codeblitz.editor.d.ts'),
31 | `
32 | export * from "../lib/editor";
33 | `.trim() + '\n'
34 | );
35 |
36 | // editor.all 类型文件
37 | await fse.writeFile(
38 | path.join(targetDir, 'codeblitz.editor.all.d.ts'),
39 | `
40 | export * from "../lib/editor.all";
41 | `.trim() + '\n'
42 | );
43 |
44 | signale.success('打包成功');
45 | } catch (err) {
46 | signale.error('打包失败');
47 | throw err;
48 | }
49 | });
50 |
--------------------------------------------------------------------------------
/scripts/create.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 | const path = require('path')
3 | const signale = require('signale')
4 |
5 | const pkgName = process.argv[2]
6 |
7 | if (!pkgName) {
8 | signale.error('未提供模块名\n')
9 | process.exit(1)
10 | }
11 |
12 | const pkgPath = path.join(__dirname, `../packages/${pkgName}`)
13 | if (fs.existsSync(pkgPath)) {
14 | signale.error(`模块 ${pkgName} 已存在\n`)
15 | process.exit(1)
16 | }
17 |
18 | fs.mkdirSync(pkgPath)
19 |
20 | require('./bootstrap')
21 |
--------------------------------------------------------------------------------
/scripts/deps-fileds.js:
--------------------------------------------------------------------------------
1 | module.exports = [
2 | 'dependencies',
3 | 'devDependencies',
4 | 'peerDependencies',
5 | ];
6 |
--------------------------------------------------------------------------------
/scripts/generate.js:
--------------------------------------------------------------------------------
1 | const signale = require('signale');
2 | const { invoke, exec } = require('./utils/utils');
3 | const { generateLanguages, generateModules, generateShims } = require('./utils/generate-alias');
4 |
5 | invoke(async () => {
6 | await Promise.all([generateLanguages(), generateModules(), generateShims()]);
7 |
8 | try {
9 | await exec('yarn workspace @codeblitzjs/ide-toolkit build:languages');
10 | } catch (err) {
11 | signale.error('build languages 失败');
12 | throw err;
13 | }
14 | });
15 |
--------------------------------------------------------------------------------
/scripts/jest/mocks/styleMock.js:
--------------------------------------------------------------------------------
1 | module.exports = {};
2 |
--------------------------------------------------------------------------------
/scripts/link-ext.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const fse = require('fs-extra');
3 | const { exec } = require('./utils/utils');
4 | const target = process.argv[2];
5 |
6 | const cwd = path.join(__dirname, '../packages/toolkit/extensions');
7 |
8 | fse.ensureDirSync(cwd);
9 |
10 | exec(`ln -s ${target}`, { cwd });
11 |
--------------------------------------------------------------------------------
/scripts/preinstall.js:
--------------------------------------------------------------------------------
1 | let err = false;
2 |
3 | if (!/yarn$|yarn[\w-.]*\.c?js$|yarnpkg$/.test(process.env['npm_execpath'])) {
4 | console.error('\033[1;31mPlease use yarn to install dependencies.\033[0;0m');
5 | err = true;
6 | }
7 |
8 | if (err) {
9 | console.error('');
10 | process.exit(1);
11 | }
12 |
--------------------------------------------------------------------------------
/scripts/utils/parse-env.js:
--------------------------------------------------------------------------------
1 | const fse = require('fs-extra');
2 | const path = require('path');
3 |
4 | export const parse = async (file) => {
5 | const content = await fse.readFile(path.resolve(process.cwd(), file), 'utf8');
6 | const RE_INI_KEY_VAL = /^\s*([\w.-]+)\s*=\s*(.*)?\s*$/;
7 | const NEWLINES_MATCH = /\n|\r|\r\n/;
8 |
9 | const obj = {};
10 | content.split(NEWLINES_MATCH).forEach((line) => {
11 | const keyValue = line.match(RE_INI_KEY_VAL);
12 | if (keyValue !== null) {
13 | const key = keyValue[1];
14 | let value = keyValue[2];
15 | const end = value.length - 1;
16 | if ((value[0] === '"' && value[end] === '"') || (value[0] === "'" && value[end] === "'")) {
17 | value = value.slice(1, end);
18 | } else {
19 | value = value.trim();
20 | }
21 | obj[key] = value;
22 | }
23 | });
24 | console.log(`env: ${JSON.stringify(obj)}`);
25 | return obj;
26 | };
27 |
--------------------------------------------------------------------------------
/scripts/utils/utils.js:
--------------------------------------------------------------------------------
1 | const execa = require('execa');
2 |
3 | exports.invoke = async (fn) => {
4 | try {
5 | await fn();
6 | } catch (err) {
7 | console.error(err);
8 | process.exit(128);
9 | }
10 | };
11 |
12 | exports.exec = async (command, options, silent = false) => {
13 | console.log(`[exec] ${command}`)
14 | try {
15 | return await execa.command(command, {
16 | stdio: 'inherit',
17 | ...options,
18 | });
19 | } catch (err) {
20 | if (!silent) {
21 | throw err;
22 | }
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/scripts/utils/version.js:
--------------------------------------------------------------------------------
1 | const semver = require('semver');
2 | const chalk = require('chalk');
3 |
4 | exports.SEMVER_INC = ['patch', 'minor', 'major', 'prepatch', 'preminor', 'premajor', 'prerelease'];
5 |
6 | exports.getNewVersion = (oldVersion, inc) => {
7 | const newVersion = semver.inc(oldVersion, inc);
8 |
9 | const output = [];
10 | for (let i = 0; i < newVersion.length; i++) {
11 | if (newVersion[i] === oldVersion[i]) {
12 | output.push(newVersion[i]);
13 | } else {
14 | output.push(chalk.green(newVersion[i]));
15 | }
16 | }
17 | return { version: newVersion, text: output.join('') };
18 | };
19 |
20 | exports.isValidVersion = (input) => Boolean(semver.valid(input));
21 |
22 | exports.isVersionGreat = (newVersion, oldVersion) => semver.gt(newVersion, oldVersion);
23 |
--------------------------------------------------------------------------------
/typings/global/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.less';
2 | declare module '*.css';
3 |
4 | declare module 'process' {
5 | global {
6 | namespace NodeJS {
7 | interface ProcessEnv {
8 | IS_DEV: boolean;
9 | }
10 | }
11 | }
12 | }
13 |
14 | // build 时会被替换
15 | declare var __DEV__: string;
16 | declare var __WORKER_HOST__: string;
17 | declare var __VERSION__: string;
18 |
19 | type Optional = Omit & Partial;
20 |
21 | declare module '@codeblitzjs/ide-core/extensions/*' {
22 | import { IExtensionBasicMetadata } from '@codeblitzjs/ide-common';
23 | const metadata: IExtensionBasicMetadata;
24 | export = metadata;
25 | }
26 |
--------------------------------------------------------------------------------