deploy: current vibn theia state
Made-with: Cursor
This commit is contained in:
50
.dockerignore
Normal file
50
.dockerignore
Normal file
@@ -0,0 +1,50 @@
|
||||
# Git
|
||||
.git
|
||||
.gitignore
|
||||
.gitattributes
|
||||
|
||||
# Documentation
|
||||
*.md
|
||||
docs/
|
||||
|
||||
# IDE
|
||||
.vscode
|
||||
.idea
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Testing
|
||||
coverage/
|
||||
.nyc_output/
|
||||
test/
|
||||
tests/
|
||||
**/*.test.ts
|
||||
**/*.spec.ts
|
||||
|
||||
# Source maps not needed in production
|
||||
**/*.js.map
|
||||
|
||||
# Examples (except browser)
|
||||
examples/api-provider-sample
|
||||
examples/browser-only
|
||||
examples/electron
|
||||
|
||||
# Temporary files
|
||||
tmp/
|
||||
temp/
|
||||
.cache/
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
11
.editorconfig
Normal file
11
.editorconfig
Normal file
@@ -0,0 +1,11 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
|
||||
[*.{js,ts,tsx,md}]
|
||||
indent_size = 4
|
||||
|
||||
[*.{json,yml}]
|
||||
indent_size = 2
|
||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
dev-packages/*/bin/*.js text eol=lf
|
||||
5
.github/CODEOWNERS
vendored
Normal file
5
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# plugin
|
||||
packages/plugin/** @theia-ide/plugin-system
|
||||
packages/plugin-dev/** @theia-ide/plugin-system
|
||||
packages/plugin-ext/** @theia-ide/plugin-system
|
||||
packages/plugin-ext-vscode/** @theia-ide/plugin-system
|
||||
17
.github/DISCUSSION_TEMPLATE/general.yml
vendored
Normal file
17
.github/DISCUSSION_TEMPLATE/general.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
labels: []
|
||||
body:
|
||||
- type: textarea
|
||||
id: content
|
||||
attributes:
|
||||
label: Discussion
|
||||
description: Share what's on your mind about Eclipse Theia.
|
||||
placeholder: Start your discussion here...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
---
|
||||
|
||||
💙 Eclipse Theia is community-supported. If you find it valuable, consider supporting the project: https://theia-ide.org/support/
|
||||
17
.github/DISCUSSION_TEMPLATE/ideas.yml
vendored
Normal file
17
.github/DISCUSSION_TEMPLATE/ideas.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
labels: []
|
||||
body:
|
||||
- type: textarea
|
||||
id: idea
|
||||
attributes:
|
||||
label: Idea Description
|
||||
description: Describe your idea for Eclipse Theia.
|
||||
placeholder: Share your idea here...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
---
|
||||
|
||||
💙 Eclipse Theia is community-supported. If you find it valuable, consider supporting the project: https://theia-ide.org/support/
|
||||
17
.github/DISCUSSION_TEMPLATE/improvements.yml
vendored
Normal file
17
.github/DISCUSSION_TEMPLATE/improvements.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
labels: []
|
||||
body:
|
||||
- type: textarea
|
||||
id: improvement
|
||||
attributes:
|
||||
label: Improvement Description
|
||||
description: Describe the improvement you'd like to see in Eclipse Theia.
|
||||
placeholder: Describe the improvement here...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
---
|
||||
|
||||
💙 Eclipse Theia is community-supported. If you find it valuable, consider supporting the project: https://theia-ide.org/support/
|
||||
93
.github/DISCUSSION_TEMPLATE/prompt-template-contribution.yml
vendored
Normal file
93
.github/DISCUSSION_TEMPLATE/prompt-template-contribution.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
title: "Prompt Template for <Agent Name> <Describe Functionality>"
|
||||
body:
|
||||
- type: textarea
|
||||
id: what_template_does
|
||||
attributes:
|
||||
label: What Does This Template Do?
|
||||
description: Provide a brief description of the prompt template. What problem does it solve? What specific functionality and agent does it enhance and how?
|
||||
placeholder: Enter a description of the template.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: prompt_template
|
||||
attributes:
|
||||
label: The Prompt Template
|
||||
description: Paste your prompt template here as plain text.
|
||||
placeholder: Enter the prompt template.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: tested_llms
|
||||
attributes:
|
||||
label: Tested LLMs
|
||||
description: List the language models this template has been tested with, including versions, providers, and notable performance observations.
|
||||
placeholder: |-
|
||||
- LLM Name & Version (e.g., OpenAI GPT-4)
|
||||
- Provider (e.g., OpenAI, llama-file, Ollama)
|
||||
- Observations or challenges
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: example_requests
|
||||
attributes:
|
||||
label: Example User Requests
|
||||
description: Provide some example user requests tested with this template.
|
||||
placeholder: |-
|
||||
1. Example Request 1: [User input]
|
||||
2. Example Request 2: [User input]
|
||||
3. Example Request 3: [User input]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: improvement_suggestions
|
||||
attributes:
|
||||
label: Suggestions for Improvements (Optional)
|
||||
description: Share any known limitations or ideas for improving the template.
|
||||
placeholder: Describe any challenges or potential enhancements.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: related_resources
|
||||
attributes:
|
||||
label: Related Discussions or Resources (Optional)
|
||||
description: Link to any relevant discussions, documentation, or resources that could help others understand or improve your template.
|
||||
placeholder: Provide URLs or references.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
id: license_agreement
|
||||
attributes:
|
||||
label: License Agreement
|
||||
description: By submitting this template, you agree to the following terms
|
||||
options:
|
||||
- label: |
|
||||
By submitting this template, you agree to the following:
|
||||
|
||||
1. Your submission is contributed under the [MIT License](https://opensource.org/licenses/MIT).
|
||||
2. You certify that your contribution complies with the **Developer Certificate of Origin (DCO) Version 1.1**, outlined below:
|
||||
|
||||
### Developer Certificate of Origin 1.1
|
||||
|
||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
||||
660 York Street, Suite 102, San Francisco, CA 94110 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
|
||||
#### Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open-source license indicated in the file; or
|
||||
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open-source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open-source license (unless I am permitted to submit under a different license), as indicated in the file; or
|
||||
(c) The contribution was provided directly to me by some other person who certified (a), (b), or (c) and I have not modified it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my signoff) is maintained indefinitely and may be redistributed consistent with this project or the open-source license(s) involved.
|
||||
|
||||
I agree to contribute this submission under the MIT License and certify compliance with the Developer Certificate of Origin (DCO) Version 1.1.
|
||||
required: true
|
||||
17
.github/DISCUSSION_TEMPLATE/q-a.yml
vendored
Normal file
17
.github/DISCUSSION_TEMPLATE/q-a.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
labels: []
|
||||
body:
|
||||
- type: textarea
|
||||
id: question
|
||||
attributes:
|
||||
label: Question
|
||||
description: What would you like to know about Eclipse Theia?
|
||||
placeholder: Ask your question here...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
---
|
||||
|
||||
💙 Eclipse Theia is community-supported. If you find it valuable, consider supporting the project: https://theia-ide.org/support/
|
||||
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: Bug Report (except security vulnerabilities)
|
||||
about: Create a report to help us improve
|
||||
---
|
||||
|
||||
<!-- Please provide a detailed description of the bug. -->
|
||||
<!-- Note: This template is not meant for security vulnerabilities disclosure -->
|
||||
<!-- Any such issue, created in this repo, will be deleted on sight -->
|
||||
<!-- Instead please report vulnerabilities to the Eclipse Foundation's security team -->
|
||||
<!-- For more details, please read SECURITY.md in the repository root -->
|
||||
### Bug Description:
|
||||
|
||||
<!-- Please provide clear steps to reproduce the bug. -->
|
||||
### Steps to Reproduce:
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
<!-- Please provide any additional information available. -->
|
||||
<!-- Additional information can be in the form of logs, screenshots, screencasts. -->
|
||||
|
||||
### Additional Information
|
||||
|
||||
- Operating System:
|
||||
- Theia Version:
|
||||
|
||||
<!-- 💙 Eclipse Theia is community-supported. If you find it valuable, consider sponsoring the project: https://theia-ide.org/support/ -->
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Question
|
||||
url: https://github.com/eclipse-theia/theia/discussions
|
||||
about: Please ask questions here.
|
||||
14
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
14
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Propose an idea for the project
|
||||
---
|
||||
|
||||
<!-- Please fill out the following content for a feature request. -->
|
||||
|
||||
<!-- Please provide a clear description of the feature and any relevant information. -->
|
||||
### Feature Description:
|
||||
|
||||
|
||||
|
||||
<!-- 💙 Eclipse Theia is community-supported. If you find it valuable, consider sponsoring the project: https://theia-ide.org/support/ -->
|
||||
|
||||
39
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
39
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Thank you for your Pull Request. Please provide a description and review
|
||||
the requirements below.
|
||||
|
||||
Contributors guide: https://github.com/theia-ide/theia/blob/master/CONTRIBUTING.md
|
||||
|
||||
Note: Security vulnerabilities should not be disclosed on GitHub, through a PR or any
|
||||
other means. See SECURITY.md at the root of this repository, to learn how to report
|
||||
vulnerabilities.
|
||||
-->
|
||||
|
||||
#### What it does
|
||||
|
||||
<!-- Include relevant issues and describe how they are addressed. -->
|
||||
|
||||
#### How to test
|
||||
|
||||
<!-- Explain how a reviewer can reproduce a bug, test new functionality or verify performance improvements. -->
|
||||
|
||||
#### Follow-ups
|
||||
|
||||
<!-- Please list potential follow-up work, including known issues, possible future work, identified technical debt, and potentially introduced technical debt. If the PR introduces technical debt, specify the reason why this is acceptable. Please create tickets and link them here. Please use the label "technical debt" for new issues when it applies. -->
|
||||
|
||||
#### Breaking changes
|
||||
|
||||
- [ ] This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the [changelog](https://github.com/eclipse-theia/theia/blob/master/CHANGELOG.md) has been updated.
|
||||
|
||||
#### Attribution
|
||||
|
||||
<!-- If the changelog entry for this change should contain an attribution at the end (e.g. Contributed on behalf of x) add it in this section -->
|
||||
|
||||
#### Review checklist
|
||||
|
||||
- [ ] As an author, I have thoroughly tested my changes and carefully followed [the review guidelines](https://github.com/theia-ide/theia/blob/master/doc/pull-requests.md#requesting-a-review)
|
||||
- [ ] User-facing text is internationalized using the `nls` service (for details, please see the [Internationalization/Localization section](https://github.com/theia-ide/theia/blob/master/doc/coding-guidelines.md#internationalizationlocalization) in the Coding Guidelines)
|
||||
|
||||
#### Reminder for reviewers
|
||||
|
||||
- As a reviewer, I agree to behave in accordance with [the review guidelines](https://github.com/theia-ide/theia/blob/master/doc/pull-requests.md#reviewing)
|
||||
97
.github/workflows/check-new-package.yml
vendored
Normal file
97
.github/workflows/check-new-package.yml
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
name: Check New Theia Package
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
types: [opened, synchronized, reopened]
|
||||
paths:
|
||||
- 'packages/*/package.json'
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
detect-new-packages:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Detect if a new package was added
|
||||
id: detect
|
||||
run: |
|
||||
git fetch origin ${{ github.base_ref }}
|
||||
NEW_PACKAGES=$(git diff --name-only --diff-filter=A origin/${{ github.base_ref }}...HEAD | grep -E '^packages/[^/]+/package\.json$' || true)
|
||||
|
||||
if [ -z "$NEW_PACKAGES" ]; then
|
||||
echo "new_package_found=false" >> $GITHUB_OUTPUT
|
||||
echo "No new packages detected"
|
||||
else
|
||||
echo "new_package_found=true" >> $GITHUB_OUTPUT
|
||||
PACKAGE_NAMES=$(echo "$NEW_PACKAGES" | sed 's|packages/\([^/]*\)/package\.json|\1|' | tr '\n' ',' | sed 's/,$//')
|
||||
echo "package_names=$PACKAGE_NAMES" >> $GITHUB_OUTPUT
|
||||
echo "New packages detected: $PACKAGE_NAMES"
|
||||
fi
|
||||
|
||||
- name: Post or update checklist comment
|
||||
if: steps.detect.outputs.new_package_found == 'true'
|
||||
uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const packageNames = '${{ steps.detect.outputs.package_names }}';
|
||||
const packageList = packageNames.split(',').map(name => `\`${name}\``).join(', ');
|
||||
|
||||
const commentBody = `
|
||||
### New \`@theia\` Package(s) Detected
|
||||
|
||||
This PR adds the following new package(s): ${packageList}
|
||||
|
||||
Please ensure the following checklist items are completed before merging:
|
||||
|
||||
- [ ] \`package.json\` contains all required fields (name, version, description, license, etc.) and scripts
|
||||
- [ ] \`README.md\` was added (please align with the existing README structure, e.g. [README.md](https://github.com/eclipse-theia/theia/blob/master/packages/editor/README.md))
|
||||
- [ ] Config files (\`tsconfig.json\`, \`.eslintrc.js\`) were added and align with the existing packages
|
||||
- [ ] Folder structure follows Theia conventions (see [Code Organization](https://github.com/eclipse-theia/theia/blob/master/doc/code-organization.md))
|
||||
- [ ] Package is added to the example applications (i.e. \`browser\`, \`browser-only\`, \`electron\`)
|
||||
- [ ] New packages must be published manually by a Theia committer initially (see also [Release Process - Newly added Theia packages](https://github.com/eclipse-theia/theia/blob/master/doc/Publishing.md#212-newly-added-theia-packages---publish-initially-to-npm)).
|
||||
If you are not a committer or do not have enough time, please open a follow-up ticket with the label \`toDoWithRelease\` to inform the release team about the new package (see for example: <https://github.com/eclipse-theia/theia/issues/16651>).
|
||||
- [ ] If the package should also be part of the Theia IDE, please [open a ticket for the Theia IDE](https://github.com/eclipse-theia/theia-ide/issues/new?template=feature_request.md)
|
||||
and assign the \`toDoWithRelease\` (see for example: <https://github.com/eclipse-theia/theia-ide/issues/615>)
|
||||
`;
|
||||
|
||||
const issue_number = context.issue.number;
|
||||
const owner = context.repo.owner;
|
||||
const repo = context.repo.repo;
|
||||
|
||||
const comments = await github.issues.listComments({
|
||||
owner,
|
||||
repo,
|
||||
issue_number
|
||||
});
|
||||
|
||||
const botComment = comments.data.find(comment =>
|
||||
comment.user.type === 'Bot' &&
|
||||
comment.body.includes('New `@theia` Package(s) Detected')
|
||||
);
|
||||
|
||||
if (botComment) {
|
||||
await github.issues.updateComment({
|
||||
owner,
|
||||
repo,
|
||||
comment_id: botComment.id,
|
||||
body: commentBody
|
||||
});
|
||||
console.log('Updated existing comment');
|
||||
} else {
|
||||
await github.issues.createComment({
|
||||
owner,
|
||||
repo,
|
||||
issue_number,
|
||||
body: commentBody
|
||||
});
|
||||
console.log('Created new comment');
|
||||
}
|
||||
113
.github/workflows/ci-cd.yml
vendored
Normal file
113
.github/workflows/ci-cd.yml
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
name: CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
|
||||
jobs:
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: 22.x
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Install and Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
./scripts/check_git_status.sh
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
npm run lint
|
||||
|
||||
build:
|
||||
name: Build and Test (${{ matrix.os }}, node-${{ matrix.node }})
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-2022, ubuntu-22.04, macos-14]
|
||||
node: [20.x, 22.x]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
git status
|
||||
./scripts/check_git_status.sh
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Download Plugins
|
||||
shell: bash
|
||||
run: |
|
||||
npm run download:plugins -- --rate-limit 3
|
||||
|
||||
- name: Test (headless)
|
||||
if: matrix.tests != 'skip'
|
||||
shell: bash
|
||||
run: |
|
||||
npm run rebuild:browser
|
||||
npm run test:theia
|
||||
|
||||
- name: Test (browser)
|
||||
if: matrix.tests != 'skip' && matrix.node == '20.x'
|
||||
run: |
|
||||
npm run test:browser
|
||||
|
||||
- name: Test (electron)
|
||||
if: matrix.tests != 'skip' && runner.os == 'Linux'
|
||||
run: |
|
||||
xvfb-run -a npm run test:electron
|
||||
46
.github/workflows/discussion-welcome.yml
vendored
Normal file
46
.github/workflows/discussion-welcome.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Welcome Discussion
|
||||
|
||||
on:
|
||||
discussion:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
welcome:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add welcome comment
|
||||
uses: actions/github-script@e69ef5462fd455e02edcaf4dd7708eda96b9eda0 # v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const discussion = context.payload.discussion;
|
||||
const author = discussion.user.login;
|
||||
|
||||
const message = [
|
||||
`Hi @${author}, thanks for starting this discussion! 👋`,
|
||||
'',
|
||||
'The Theia community will take a look soon. In the meantime, you might find helpful information in:',
|
||||
'- 📖 [Theia Documentation](https://theia-ide.org/docs/)',
|
||||
'- ❓ [FAQ](https://theia-ide.org/docs/faq/)',
|
||||
'- 💬 [Previous Discussions](https://github.com/eclipse-theia/theia/discussions)',
|
||||
'',
|
||||
'---',
|
||||
'',
|
||||
'💙 Eclipse Theia is built and maintained by a community of contributors and sponsors. ' +
|
||||
'If Theia is valuable to your work, consider [sponsoring the project](https://theia-ide.org/support/). ' +
|
||||
'For professional support, training, or consulting services, [learn more about available options](https://theia-ide.org/support/).'
|
||||
].join('\n');
|
||||
|
||||
await github.graphql(`
|
||||
mutation($discussionId: ID!, $body: String!) {
|
||||
addDiscussionComment(input: {discussionId: $discussionId, body: $body}) {
|
||||
clientMutationId
|
||||
}
|
||||
}
|
||||
`, {
|
||||
discussionId: discussion.node_id,
|
||||
body: message
|
||||
});
|
||||
77
.github/workflows/generate-sbom.yml
vendored
Normal file
77
.github/workflows/generate-sbom.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: Generate NPM SBOM
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version"
|
||||
default: "master"
|
||||
required: true
|
||||
|
||||
env:
|
||||
NODE_VERSION: "20.x"
|
||||
REGISTRY_URL: "https://registry.npmjs.org"
|
||||
PRODUCT_PATH: "./"
|
||||
CDXGEN_VERSION: "11.7.0"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
generate-sbom:
|
||||
name: Generate SBOM
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
project-version: ${{ steps.version.outputs.PROJECT_VERSION }}
|
||||
permissions:
|
||||
packages: read
|
||||
|
||||
steps:
|
||||
- name: Extract version
|
||||
id: version
|
||||
run: |
|
||||
VERSION="${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}"
|
||||
echo "PROJECT_VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Product version: $VERSION"
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ steps.version.outputs.PROJECT_VERSION }}
|
||||
|
||||
- name: Setup Node SDK
|
||||
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
registry-url: ${{ env.REGISTRY_URL }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm ci
|
||||
|
||||
- name: Install cdxgen
|
||||
run: |
|
||||
npm install -g @cyclonedx/cdxgen@${{ env.CDXGEN_VERSION }}
|
||||
|
||||
- name: Generate SBOM
|
||||
run: |
|
||||
cdxgen -r -o ${{ env.PRODUCT_PATH }}bom.json
|
||||
|
||||
- name: Upload SBOM as artifact
|
||||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
|
||||
with:
|
||||
name: sbom
|
||||
path: ${{ env.PRODUCT_PATH }}/bom.json
|
||||
|
||||
store-sbom-data: # stores sbom and metadata in a predefined format for otterdog to pick up
|
||||
needs: ["generate-sbom"]
|
||||
uses: eclipse-csi/workflows/.github/workflows/store-sbom-data.yml@main
|
||||
with:
|
||||
projectName: "theia"
|
||||
projectVersion: ${{ needs.generate-sbom.outputs.project-version }}
|
||||
bomArtifact: "sbom"
|
||||
bomFilename: "bom.json"
|
||||
parentProject: "2b55dbe6-7a7e-4659-a803-babf4138e03f"
|
||||
54
.github/workflows/license-check.yml
vendored
Normal file
54
.github/workflows/license-check.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: 3PP License Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'package-lock.json'
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'package-lock.json'
|
||||
schedule:
|
||||
- cron: '0 4 * * *' # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
|
||||
|
||||
jobs:
|
||||
License-check:
|
||||
name: 3PP License Check
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-22.04]
|
||||
node: ['22.x']
|
||||
java: ['11']
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Use Java ${{ matrix.java }}
|
||||
uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3.9.0
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: ${{ matrix.java }}
|
||||
|
||||
- name: Run dash-licenses check
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run license:check
|
||||
50
.github/workflows/native-dependencies.yml
vendored
Normal file
50
.github/workflows/native-dependencies.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: Package Native Dependencies
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-22.04", "windows-latest", "macos-latest"]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
# Update the node version here after every Electron upgrade
|
||||
- name: Use Node.js v22.20.0
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.20.0"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install and Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Build Browser App
|
||||
shell: bash
|
||||
run: |
|
||||
npm run build:browser
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
|
||||
- name: Zip Native Dependencies
|
||||
shell: bash
|
||||
run: npm run zip:native:dependencies
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4
|
||||
with:
|
||||
name: native-dependencies-${{ matrix.os }}
|
||||
path: ./scripts/native-dependencies-*.zip
|
||||
58
.github/workflows/performance-tests.yml
vendored
Normal file
58
.github/workflows/performance-tests.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Performance Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-test-performance:
|
||||
name: Performance Tests
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: '3.13'
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm install -g node-gyp
|
||||
npm ci
|
||||
npm run build
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Performance (browser)
|
||||
shell: bash
|
||||
run: npm run performance:startup:browser
|
||||
|
||||
- name: Performance (Electron)
|
||||
shell: bash
|
||||
run: xvfb-run npm run performance:startup:electron
|
||||
|
||||
- name: Analyze performance results
|
||||
uses: benchmark-action/github-action-benchmark@fd31771ce86cc65eab85653da103f71ab1b4479c # v1.9.0
|
||||
with:
|
||||
name: Performance Benchmarks
|
||||
tool: "customSmallerIsBetter"
|
||||
output-file-path: performance-result.json
|
||||
alert-threshold: "150%"
|
||||
fail-on-alert: false
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }} # Needed for comments an GH Pages
|
||||
benchmark-data-dir-path: tests/performance
|
||||
auto-push: true # Push to GH Pages
|
||||
comment-on-alert: true # Comment on commit if it causes a performance regression
|
||||
max-items-in-chart: 100 # Don't just collect results forever
|
||||
77
.github/workflows/playwright.yml
vendored
Normal file
77
.github/workflows/playwright.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: Playwright Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
schedule:
|
||||
- cron: "0 4 * * *" # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
|
||||
|
||||
jobs:
|
||||
build-and-test-playwright:
|
||||
name: Playwright Tests (ubuntu-22.04, Node.js 22.x)
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js "22.x"
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install IPython Kernel
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m pip install ipykernel==6.15.2
|
||||
python3 -m ipykernel install --user
|
||||
|
||||
- name: Build Browser
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run build:browser
|
||||
npm run download:plugins
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Build Playwright
|
||||
shell: bash
|
||||
run: |
|
||||
cd examples/playwright && npm run build
|
||||
|
||||
- name: Test (playwright)
|
||||
shell: bash
|
||||
run: cd examples/playwright && npm run ui-tests-ci
|
||||
|
||||
- name: Archive test results
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4
|
||||
if: ${{ !cancelled() }}
|
||||
with:
|
||||
name: playwright-test-results
|
||||
path: |
|
||||
examples/playwright/test-results/
|
||||
examples/playwright/playwright-report/
|
||||
retention-days: 7
|
||||
58
.github/workflows/production-smoke-test.yml
vendored
Normal file
58
.github/workflows/production-smoke-test.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Production Build Smoke Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'doc/**'
|
||||
- 'logo/**'
|
||||
|
||||
jobs:
|
||||
build-and-test-playwright:
|
||||
name: Smoke Test for Browser Example Production Build on ubuntu-22.04 with Node.js 22.x
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js "22.x"
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Build Browser Example Application for Production
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
cd examples/browser && npm run build:production
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Build Playwright
|
||||
shell: bash
|
||||
run: |
|
||||
cd examples/playwright && npm run build
|
||||
|
||||
- name: Run Smoke Test (examples/playwright/src/tests/theia-app)
|
||||
shell: bash
|
||||
run: npm run test:playwright -- theia-app
|
||||
55
.github/workflows/publish-api-doc-gh-pages.yml
vendored
Normal file
55
.github/workflows/publish-api-doc-gh-pages.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Publish API Documentation on GitHub Pages
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish to NPM and GitHub pages
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
# The current approach is silly. We should be smarter and use `actions/upload-artifact` and `actions/download-artifact` instead of rebuilding
|
||||
# everything from scratch again. (git checkout, Node.js install, npm, etc.) It was not possible to share artifacts on Travis CI without an
|
||||
# external storage (such as S3), so we did rebuild everything before the npm publish. We should overcome this limitation with GH Actions.
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
with:
|
||||
fetch-depth: 0 # To fetch all history for all branches and tags. (Will be required for caching with lerna: https://github.com/markuplint/markuplint/pull/111)
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install and Build
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Generate Documentation
|
||||
run: |
|
||||
npm run docs
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=8192
|
||||
|
||||
- name: Publish GH Pages
|
||||
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./gh-pages
|
||||
force_orphan: true # will only keep latest commit on branch gh-pages
|
||||
161
.github/workflows/publish-ci.yml
vendored
Normal file
161
.github/workflows/publish-ci.yml
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
name: Publish packages to NPM
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_type:
|
||||
description: 'Release type: "minor" increments the minor version (e.g., 1.53.0 → 1.54.0), "patch" increments the patch version (e.g., 1.54.0 → 1.54.1), "next" publishes a pre-release version (e.g., 1.55.0-next.17).'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- 'minor'
|
||||
- 'patch'
|
||||
- 'next'
|
||||
default: 'next'
|
||||
is_patch_to_previous:
|
||||
description: 'Patch a previous release branch: Enable this to publish a patch to an older version branch (e.g., patching 1.53.x when 1.54.x is the latest). Must be used with release_type="patch". Leave disabled for publishing to the current latest or next version.'
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
schedule:
|
||||
- cron: "0 0 * * 1" # Publish next version (default) every monday at midnight
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Perform Publishing
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
RELEASE_TYPE: ${{ inputs.release_type || 'next' }}
|
||||
IS_PATCH_TO_PREVIOUS: ${{ inputs.is_patch_to_previous || false }}
|
||||
steps:
|
||||
- name: Validate Inputs
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ env.IS_PATCH_TO_PREVIOUS }}" == "true" && "${{ env.RELEASE_TYPE }}" != "patch" ]]; then
|
||||
echo "Error: When 'is_patch_to_previous' is enabled, release_type must be 'patch'"
|
||||
exit 1
|
||||
fi
|
||||
echo "Input validation passed"
|
||||
echo "Release type: ${{ env.RELEASE_TYPE }}"
|
||||
echo "Is patch to previous: ${{ env.IS_PATCH_TO_PREVIOUS }}"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
with:
|
||||
# To fetch all history for all branches and tags.
|
||||
# Required for lerna to determine the version of the next package.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: 22.x
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install and build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- name: Publish to NPM (Latest)
|
||||
# We only publish minor or patch releases for the current version as latest, never for older patches or next versions.
|
||||
if: ${{ (env.RELEASE_TYPE == 'patch' || env.RELEASE_TYPE == 'minor') && env.IS_PATCH_TO_PREVIOUS == 'false' }}
|
||||
shell: bash
|
||||
run: |
|
||||
npm run publish:latest ${{ env.RELEASE_TYPE }}
|
||||
npm run publish:check
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: "true"
|
||||
|
||||
- name: Publish to NPM (Patch - To Previous Version)
|
||||
if: ${{ env.RELEASE_TYPE == 'patch' && env.IS_PATCH_TO_PREVIOUS == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
npm run publish:patch ${{ env.RELEASE_TYPE }}
|
||||
npm run publish:check
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: "true"
|
||||
|
||||
- name: Publish to NPM (Next)
|
||||
if: ${{ env.RELEASE_TYPE == 'next' }}
|
||||
shell: bash
|
||||
run: |
|
||||
npm run publish:next
|
||||
env:
|
||||
NPM_CONFIG_PROVENANCE: "true"
|
||||
|
||||
- name: Submit PR for package updates
|
||||
if: ${{ env.RELEASE_TYPE != 'next' }}
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
# Configure git
|
||||
git config --local user.email "eclipse-theia-bot@eclipse.org"
|
||||
git config --local user.name "eclipse-theia-bot"
|
||||
|
||||
# Get the version from lerna.json after publishing
|
||||
VERSION=$(node -p "require('./lerna.json').version")
|
||||
echo "Lerna Version: $VERSION"
|
||||
|
||||
# First commit: Update packages/core/README.md
|
||||
if git diff --name-only | grep -q "packages/core/README.md"; then
|
||||
git add packages/core/README.md
|
||||
git commit -m "core: update re-exports for v${VERSION}"
|
||||
echo "First commit created for packages/core/README.md"
|
||||
else
|
||||
echo "No changes to packages/core/README.md"
|
||||
fi
|
||||
|
||||
# Second commit: Add all other changes
|
||||
git add .
|
||||
if git diff --staged --quiet; then
|
||||
echo "No other changes to commit"
|
||||
else
|
||||
git commit -m "v${VERSION}"
|
||||
echo "Second commit created for remaining changes"
|
||||
fi
|
||||
|
||||
# Submit PR
|
||||
if git log origin/${{ github.ref_name }}..HEAD | grep -q "commit"; then
|
||||
# Define PR body
|
||||
PR_BODY="Automated package updates for release v${VERSION}
|
||||
|
||||
To complete the release:
|
||||
- Update all remaining package versions locally
|
||||
- Amend the commits with your author details (to ensure the ECA check passes)
|
||||
- Keep the commits split (the re-export commit on the readme needs to be separate)
|
||||
- Force push the branch
|
||||
- Verify that all checks pass, and then \`rebase and merge\`"
|
||||
|
||||
# Create a new branch for the PR
|
||||
BRANCH_NAME="${{ github.ref_name }}-package-updates"
|
||||
git checkout -b "$BRANCH_NAME"
|
||||
git push origin "$BRANCH_NAME"
|
||||
|
||||
# Create PR using GitHub CLI
|
||||
gh pr create \
|
||||
--title "Release v${VERSION} - Package updates" \
|
||||
--body "$PR_BODY" \
|
||||
--base "${{ github.ref_name }}" \
|
||||
--head "$BRANCH_NAME"
|
||||
|
||||
echo "PR created for branch $BRANCH_NAME"
|
||||
else
|
||||
echo "No commits to push"
|
||||
fi
|
||||
60
.github/workflows/set-milestone-on-pr.yml
vendored
Normal file
60
.github/workflows/set-milestone-on-pr.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
#
|
||||
# Copyright (c) 2020 Red Hat, Inc. and others.
|
||||
# This program and the accompanying materials are made available under the
|
||||
# terms of the Eclipse Public License v. 2.0 which is available at
|
||||
# http://www.eclipse.org/legal/epl-2.0.
|
||||
#
|
||||
# This Source Code may also be made available under the following Secondary
|
||||
# Licenses when the conditions for such availability set forth in the Eclipse
|
||||
# Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
# with the GNU Classpath Exception which is available at
|
||||
# https://www.gnu.org/software/classpath/license.html.
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
# Set milestone on each pull request by using the next minor version
|
||||
# next version is computed using npm version tool
|
||||
on:
|
||||
pull_request_target:
|
||||
branches: [master]
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
set-milestone:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
- id: compute-milestone
|
||||
run: |
|
||||
export THEIA_CORE_VERSION=$(node -p "require(\"./packages/core/package.json\").version")
|
||||
echo "MILESTONE_NUMBER=$(npx -q semver@7 --increment minor $THEIA_CORE_VERSION)" >> $GITHUB_ENV
|
||||
- id: set
|
||||
uses: actions/github-script@ffc2c79a5b2490bd33e0a41c1de74b877714d736 # v3.2.0
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
// get milestone
|
||||
const milestone = process.env.MILESTONE_NUMBER
|
||||
console.log(`Using milestone with name ${milestone}`)
|
||||
// check if milestone exists ?
|
||||
const issuesGetMilestonesParams = context.repo
|
||||
|
||||
// search if milestone is already defined
|
||||
const response = await github.issues.listMilestones(issuesGetMilestonesParams)
|
||||
let githubMilestone = response.data.find(milestoneResponse => milestoneResponse.title === milestone)
|
||||
|
||||
// not defined, create it
|
||||
if (!githubMilestone) {
|
||||
const issuesCreateMilestoneParams = { owner: context.repo.owner, repo:context.repo.repo, title: milestone }
|
||||
const createMilestoneResponse = await github.issues.createMilestone(issuesCreateMilestoneParams)
|
||||
githubMilestone = createMilestoneResponse.data
|
||||
}
|
||||
|
||||
// Grab the milestone number
|
||||
const milestoneNumber = githubMilestone.number
|
||||
|
||||
// sets the milestone from the number
|
||||
const issuesUpdateParams = { owner: context.repo.owner, repo: context.repo.repo, milestone: milestoneNumber, issue_number: context.issue.number }
|
||||
await github.issues.update(issuesUpdateParams)
|
||||
64
.github/workflows/translation.yml
vendored
Normal file
64
.github/workflows/translation.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
name: Automatic Translation
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
translation:
|
||||
name: Translation Update
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Use Node.js 22.x
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
with:
|
||||
node-version: 22.x
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Use Python 3.13
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Install and Build
|
||||
shell: bash
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9
|
||||
|
||||
- id: compute-next-version
|
||||
run: |
|
||||
export THEIA_CORE_VERSION=$(node -p "require(\"./packages/core/package.json\").version")
|
||||
echo "NEXT_VERSION_NUMBER=$(npx -q semver@7 --increment minor $THEIA_CORE_VERSION)" >> $GITHUB_ENV
|
||||
|
||||
- name: Perform Automatic Translation
|
||||
run: |
|
||||
node ./scripts/translation-update.js
|
||||
env:
|
||||
DEEPL_API_TOKEN: ${{ secrets.DEEPL_API_TOKEN }}
|
||||
|
||||
- name: Get Actor User Data
|
||||
uses: octokit/request-action@21d174fc38ff59af9cf4d7e07347d29df6dbaa99 # v2.3.0
|
||||
id: actor_user_data
|
||||
with:
|
||||
route: GET /users/{user}
|
||||
user: ${{ github.actor }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
|
||||
with:
|
||||
commiter: ${{ github.actor }} <${{ fromJson(steps.actor_user_data.outputs.data).email }}>
|
||||
author: ${{ github.actor }} <${{ fromJson(steps.actor_user_data.outputs.data).email }}>
|
||||
branch: bot/translation-update
|
||||
title: Translation update for version ${{ env.NEXT_VERSION_NUMBER }}
|
||||
commit-message: Translation update for version ${{ env.NEXT_VERSION_NUMBER }}
|
||||
body: Automated translation update for Theia version ${{ env.NEXT_VERSION_NUMBER }}. Triggered by @${{ github.actor }}.
|
||||
labels: localization
|
||||
40
.gitignore
vendored
Normal file
40
.gitignore
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
build
|
||||
lib
|
||||
tmp
|
||||
*.log
|
||||
.idea
|
||||
.metadata
|
||||
*.iml
|
||||
jdt.ls-java-project
|
||||
lerna-debug.log
|
||||
.nyc_output
|
||||
coverage
|
||||
errorShots
|
||||
examples/*/src-gen
|
||||
examples/*/gen-webpack.config.js
|
||||
examples/*/gen-webpack.node.config.js
|
||||
examples/*/.test
|
||||
.browser_modules
|
||||
**/docs/api
|
||||
package-backup.json
|
||||
.history
|
||||
.Trash-*
|
||||
packages/plugin/typedoc
|
||||
plugins
|
||||
gh-pages
|
||||
.vscode/ipch
|
||||
dev-packages/electron/compile_commands.json
|
||||
*.tsbuildinfo
|
||||
.eslintcache
|
||||
*-trace.json
|
||||
.tours
|
||||
/performance-result.json
|
||||
*.vsix
|
||||
/scripts/native-dependencies-*
|
||||
allure-results
|
||||
.claude
|
||||
license-check-summary.txt*
|
||||
.playwright-mcp/*
|
||||
/.theia/chatSessions
|
||||
15
.npmignore
Normal file
15
.npmignore
Normal file
@@ -0,0 +1,15 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
build
|
||||
*.log
|
||||
.idea
|
||||
.metadata
|
||||
jdt.ls-java-project
|
||||
lerna-debug.log
|
||||
.nyc_output
|
||||
coverage
|
||||
.browser_modules
|
||||
download
|
||||
*ui-spec.ts
|
||||
*slow-spec.ts
|
||||
test-resources
|
||||
3
.prompts/customAgents.yml
Normal file
3
.prompts/customAgents.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
# Vibn custom agents are implemented as TypeScript extensions in packages/ai-ide/
|
||||
# The primary agent is the built-in "Coder" agent with "Code OS" mode.
|
||||
# No YAML-defined agents are needed — this file intentionally left empty.
|
||||
116
.prompts/project-info.prompttemplate
Normal file
116
.prompts/project-info.prompttemplate
Normal file
@@ -0,0 +1,116 @@
|
||||
## Theia Project Information
|
||||
|
||||
This section contains informations specific about the Theia Project and code base, which the user is currenty working on.
|
||||
|
||||
### Architecture overview
|
||||
|
||||
Theia has a modular architecture and consists of so-called "Theia extensions", which are technically node packages.
|
||||
Most features and generally the source code can be found under "/packages/" which hosts a list of Theia extensions for different sorts of features.
|
||||
Theia applications can be used in the browser or (via Electron) on the desktop, but generally have a front end (browser application) and a backend part (node application).
|
||||
Therefore, extensions can contribute to the front end and the backend. This is reflected in the folder structure of extensions:
|
||||
- src/browser: Frontend part of an extensions
|
||||
- src/node: Backend part of an extension.
|
||||
- src/common: Common/shared components, interfaces and protocol information for front end back end communication
|
||||
|
||||
Theia uses dependency injection (via inversify) to wired components. If a class is contributed via dependency injection it needs to be bound in the corresponding frontend or
|
||||
backend module (which usually already exists in existing packages)
|
||||
|
||||
#### Widgets
|
||||
|
||||
Widgets are views that are visible in the workbench of a Theia-based application.
|
||||
|
||||
#### Commands
|
||||
|
||||
Commands in Theia are actions that can be executed by users and programmatically. They are registered through the `CommandRegistry` and can be triggered via menus,
|
||||
keybindings, or other UI elements such as toolbar items.
|
||||
|
||||
Commands are contributed via `CommandContribution`, see for example: packages/ai-chat-ui/src/browser/chat-view-widget-toolbar-contribution.tsx
|
||||
|
||||
#### Toolbars
|
||||
|
||||
Toolbars in Theia are UI components that provide quick access to commonly used commands. They can be added to various parts of the workbench including the main toolbar,
|
||||
and custom widget toolbars.
|
||||
|
||||
Toolbars are typically contributed through:
|
||||
- `TabBarToolbarContribution`: For adding toolbar items to tab bars
|
||||
- `ToolbarContribution`: For contributing to main application toolbars
|
||||
ToolbarContributions are located in separate files.
|
||||
Browse the following file for an example: packages/ai-chat-ui/src/browser/chat-view-widget-toolbar-contribution.tsx
|
||||
|
||||
### Coding Guidelines
|
||||
|
||||
- Trailing white spaces and empty lines with white spaces are forbidden
|
||||
- Use constants for values that never get reassigned
|
||||
- The use of `null` is forbidden. Use `undefined` instead for representing absent or uninitialized values.
|
||||
- Use single quotes (`'`) for string literals instead of double quotes (`"`).
|
||||
- Use Theia's Event/Emitter/Disposable for handling event listener patterns
|
||||
|
||||
### Test File References
|
||||
|
||||
When writing new tests, refer to the following files to see example tests and ensure consistency in style and methodology within the project:
|
||||
|
||||
- **Backend Test Example**: `packages/core/src/common/content-replacer.spec.ts`
|
||||
- **Frontend Test Example**: `packages/ai-code-completion/src/browser/code-completion-postprocessor.spec.ts`
|
||||
|
||||
Tests are located in the same directory as the components under test.
|
||||
|
||||
### Compile and Test
|
||||
|
||||
If you want to compile something, run the linter or tests, prefer to execute them for changed packages first, as they will run faster. Only build the full project once you are
|
||||
done for a final validation.
|
||||
|
||||
### Preferences
|
||||
|
||||
Theia uses a preferences system for user/workspace settings. To add new preferences:
|
||||
|
||||
1. Define a `PreferenceSchema` with property definitions (type, default, description)
|
||||
2. Create a `PreferenceContribution` symbol and bind it
|
||||
3. Use `PreferenceProxy` for type-safe access to preference values
|
||||
|
||||
**Example:** `packages/workspace/src/common/workspace-trust-preferences.ts`
|
||||
|
||||
### Plugin API Extensions
|
||||
|
||||
To extend the plugin API (VS Code compatible API):
|
||||
|
||||
1. **Type definitions:** Add to `packages/plugin/src/theia.d.ts`
|
||||
2. **Plugin-side implementation:** `packages/plugin-ext/src/plugin/` (e.g., `workspace.ts`)
|
||||
3. **Main-side implementation:** `packages/plugin-ext/src/main/browser/` (e.g., `workspace-main.ts`)
|
||||
4. **RPC protocol:** Define in `packages/plugin-ext/src/common/plugin-api-rpc.ts`
|
||||
5. **Expose to plugins:** `packages/plugin-ext/src/plugin/plugin-context.ts`
|
||||
|
||||
Events flow: Main side service → `workspace-main.ts` → RPC → `workspace.ts` → plugin context
|
||||
|
||||
#### Proposed APIs
|
||||
|
||||
For APIs that are not yet stable, Theia follows VS Code's proposed API pattern:
|
||||
|
||||
1. **Define proposed types:** Create `packages/plugin/src/theia.proposed.<feature>.d.ts`
|
||||
2. **Enable via package.json:** Extensions must declare `enabledApiProposals` in their package.json
|
||||
3. **Implementation:** Same as stable APIs, but types come from the proposed file
|
||||
|
||||
Note: Some VS Code APIs that were previously "proposed" are now stable (e.g., workspace trust). Check VS Code's current API status before creating proposed API files.
|
||||
|
||||
### Styling
|
||||
|
||||
Theia permits extensive color theming and makes extensive use of CSS variables. Styles are typically located either in an `index.css` file for an entire package or in a
|
||||
module-level CSS file.
|
||||
|
||||
- **Color variable contribution example**: `packages/core/src/browser/common-frontend-contribution.ts`
|
||||
- **Package-level CSS example**: `packages/ai-ide/src/browser/style/index.css`
|
||||
- **Module-specific CSS example**: `packages/core/src/browser/style/tabs.css`
|
||||
|
||||
### FileService and Filesystem Access (Browser Mode)
|
||||
|
||||
The `FileService` in browser mode communicates with the backend via RPC and has **restricted filesystem access**:
|
||||
|
||||
- **Accessible paths:** Files within the current workspace directory or the Theia user config directory (e.g., `~/.theia/`)
|
||||
- **Inaccessible paths:** Arbitrary filesystem paths outside these boundaries (e.g., `/tmp/`, `/etc/`)
|
||||
|
||||
When implementing browser-side services that need to read files from user-configured directories:
|
||||
1. Use `FileService` from `@theia/filesystem/lib/browser/file-service`
|
||||
2. Convert paths to URIs using `URI.fromFilePath(path)`
|
||||
3. Expect `fileService.exists()` to return `false` for paths outside allowed boundaries
|
||||
4. Document that users should configure paths within their workspace or config directory
|
||||
|
||||
**Reference implementation:** `packages/ai-core/src/browser/skill-service.ts` and `packages/ai-core/src/browser/frontend-prompt-customization-service.ts`
|
||||
23
.theia/settings.json
Normal file
23
.theia/settings.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.insertSpaces": true,
|
||||
"[typescript]": {
|
||||
"editor.tabSize": 4
|
||||
},
|
||||
"[json]": {
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"clang-format.language.typescript.enable": false,
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "davidanson.vscode-markdownlint"
|
||||
},
|
||||
"markdownlint.config": {
|
||||
"MD032": false, // don't require blank line around lists
|
||||
"MD033": false, // allow inline html
|
||||
"MD041": false // don't require h1 in first line
|
||||
},
|
||||
}
|
||||
26
.vscode/c_cpp_properties.json
vendored
Normal file
26
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "@theia/electron (Linux)",
|
||||
"compileCommands": "${workspaceFolder}/dev-packages/electron/compile_commands.json",
|
||||
"defines": [],
|
||||
"cStandard": "c89",
|
||||
"intelliSenseMode": "${default}"
|
||||
},
|
||||
{
|
||||
"name": "@theia/electron Debug (Windows)",
|
||||
"compileCommands": "${workspaceFolder}\\dev-packages\\electron\\Debug\\compile_commands.json",
|
||||
"defines": [],
|
||||
"cStandard": "c89",
|
||||
"intelliSenseMode": "${default}"
|
||||
},
|
||||
{
|
||||
"name": "@theia/electron Release (Windows)",
|
||||
"compileCommands": "${workspaceFolder}\\dev-packages\\electron\\Release\\compile_commands.json",
|
||||
"defines": [],
|
||||
"cStandard": "c89",
|
||||
"intelliSenseMode": "${default}"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
11
.vscode/extensions.json
vendored
Normal file
11
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
||||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
||||
// List of extensions which should be recommended for users of this workspace.
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"DavidAnson.vscode-markdownlint"
|
||||
],
|
||||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
||||
"unwantedRecommendations": []
|
||||
}
|
||||
191
.vscode/launch.json
vendored
Normal file
191
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,191 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible Node.js debug attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Playwright Tests",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/@playwright/test/cli.js",
|
||||
"cwd": "${workspaceFolder}/examples/playwright",
|
||||
"args": [
|
||||
"test",
|
||||
"--config=./configs/playwright.config.ts"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"name": "Attach by Process ID",
|
||||
"processId": "${command:PickProcess}"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch with Node.js",
|
||||
"program": "${file}"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Electron Backend",
|
||||
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
|
||||
"windows": {
|
||||
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
|
||||
},
|
||||
"cwd": "${workspaceFolder}/examples/electron",
|
||||
"protocol": "inspector",
|
||||
"args": [
|
||||
".",
|
||||
"--log-level=debug",
|
||||
"--hostname=localhost",
|
||||
"--no-cluster",
|
||||
"--app-project-path=${workspaceFolder}/examples/electron",
|
||||
"--remote-debugging-port=9222",
|
||||
"--no-app-auto-install",
|
||||
"--plugins=local-dir:../../plugins",
|
||||
"--ovsx-router-config=${workspaceFolder}/examples/ovsx-router-config.json"
|
||||
],
|
||||
"env": {
|
||||
"NODE_ENV": "development"
|
||||
},
|
||||
"sourceMaps": true,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/examples/electron/lib/backend/electron-main.js",
|
||||
"${workspaceFolder}/examples/electron/lib/backend/main.js",
|
||||
"${workspaceFolder}/examples/electron/lib/**/*.js",
|
||||
"${workspaceFolder}/examples/api-samples/lib/**/*.js",
|
||||
"${workspaceFolder}/packages/*/lib/**/*.js",
|
||||
"${workspaceFolder}/dev-packages/*/lib/**/*.js"
|
||||
],
|
||||
"smartStep": true,
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"outputCapture": "std"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Browser Backend",
|
||||
"program": "${workspaceFolder}/examples/browser/lib/backend/main.js",
|
||||
"cwd": "${workspaceFolder}/examples/browser",
|
||||
"args": [
|
||||
"--hostname=0.0.0.0",
|
||||
"--port=3000",
|
||||
"--no-cluster",
|
||||
"--app-project-path=${workspaceFolder}/examples/browser",
|
||||
"--plugins=local-dir:../../plugins",
|
||||
"--hosted-plugin-inspect=9339",
|
||||
"--ovsx-router-config=${workspaceFolder}/examples/ovsx-router-config.json"
|
||||
],
|
||||
"env": {
|
||||
"NODE_ENV": "development"
|
||||
},
|
||||
"sourceMaps": true,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/examples/browser/src-gen/backend/*.js",
|
||||
"${workspaceFolder}/examples/browser/lib/**/*.js",
|
||||
"${workspaceFolder}/examples/api-samples/lib/**/*.js",
|
||||
"${workspaceFolder}/packages/*/lib/**/*.js",
|
||||
"${workspaceFolder}/dev-packages/*/lib/**/*.js"
|
||||
],
|
||||
"smartStep": true,
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"outputCapture": "std"
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"name": "Attach to Plugin Host",
|
||||
"port": 9339,
|
||||
"timeout": 60000,
|
||||
"stopOnEntry": false,
|
||||
"smartStep": true,
|
||||
"sourceMaps": true,
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/packages/plugin-ext/lib/**/*.js",
|
||||
"${workspaceFolder}/plugins/**/*.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"protocol": "inspector",
|
||||
"name": "Run Mocha Tests",
|
||||
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
|
||||
"args": [
|
||||
"--no-timeouts",
|
||||
"--colors",
|
||||
"--config",
|
||||
"${workspaceFolder}/configs/mocharc.yml",
|
||||
"**/${fileBasenameNoExtension}.js"
|
||||
],
|
||||
"env": {
|
||||
"TS_NODE_PROJECT": "${workspaceFolder}/tsconfig.json"
|
||||
},
|
||||
"sourceMaps": true,
|
||||
"smartStep": true,
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"outputCapture": "std"
|
||||
},
|
||||
{
|
||||
"name": "Launch Browser Frontend",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"url": "http://localhost:3000/",
|
||||
"webRoot": "${workspaceFolder}/examples/browser"
|
||||
},
|
||||
{
|
||||
"type": "chrome",
|
||||
"request": "attach",
|
||||
"name": "Attach to Electron Frontend",
|
||||
"port": 9222,
|
||||
"webRoot": "${workspaceFolder}/examples/electron"
|
||||
},
|
||||
{
|
||||
"name": "Launch VS Code Tests",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${workspaceFolder}/examples/browser/lib/backend/main.js",
|
||||
"${workspaceFolder}/plugins/vscode-api-tests/testWorkspace",
|
||||
"--port",
|
||||
"3030",
|
||||
"--hostname",
|
||||
"0.0.0.0",
|
||||
"--extensionTestsPath=${workspaceFolder}/plugins/vscode-api-tests/out/singlefolder-tests",
|
||||
"--hosted-plugin-inspect=9339"
|
||||
],
|
||||
"env": {
|
||||
"THEIA_DEFAULT_PLUGINS": "local-dir:${workspaceFolder}/plugins"
|
||||
},
|
||||
"stopOnEntry": false,
|
||||
"sourceMaps": true,
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/../.js"
|
||||
]
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Launch Electron Backend & Frontend",
|
||||
"configurations": [
|
||||
"Launch Electron Backend",
|
||||
"Attach to Plugin Host",
|
||||
"Attach to Electron Frontend"
|
||||
],
|
||||
"stopAll": true
|
||||
},
|
||||
{
|
||||
"name": "Launch Browser Backend & Frontend",
|
||||
"configurations": [
|
||||
"Launch Browser Backend",
|
||||
"Attach to Plugin Host",
|
||||
"Launch Browser Frontend"
|
||||
],
|
||||
"stopAll": true
|
||||
}
|
||||
]
|
||||
}
|
||||
75
.vscode/settings.json
vendored
Normal file
75
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
// If one would like to add/remove/modify user preferences without modifying the content of the
|
||||
// workspace settings file, then one would need to modify the `settings.json` under here:
|
||||
// - Windows: %APPDATA%\Code\User\settings.json
|
||||
// - Linux: $HOME/.config/Code/User/settings.json
|
||||
// - Mac: $HOME/Library/Application Support/Code/User/settings.json
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/lib": true,
|
||||
"**/coverage": true
|
||||
},
|
||||
"lcov.path": [
|
||||
"packages/core/coverage/lcov.info",
|
||||
"packages/editor/coverage/lcov.info",
|
||||
"packages/filesystem/coverage/lcov.info",
|
||||
"packages/go/coverage/lcov.info",
|
||||
"packages/java/coverage/lcov.info",
|
||||
"packages/languages/coverage/lcov.info",
|
||||
"packages/monaco/coverage/lcov.info",
|
||||
"packages/navigator/coverage/lcov.info",
|
||||
"packages/keymaps/coverage/lcov.info",
|
||||
"packages/preferences/coverage/lcov.info",
|
||||
"packages/process/coverage/lcov.info",
|
||||
"packages/python/coverage/lcov.info",
|
||||
"packages/terminal/coverage/lcov.info",
|
||||
"packages/workspace/coverage/lcov.info",
|
||||
"packages/task/coverage/lcov.info",
|
||||
"packages/monaco-textmate/coverage/lcov.info"
|
||||
],
|
||||
"lcov.watch": [
|
||||
{
|
||||
"pattern": "**/*.spec.ts",
|
||||
"command": "npm run test:theia"
|
||||
}
|
||||
],
|
||||
"editor.insertSpaces": true,
|
||||
"[typescript]": {
|
||||
"editor.tabSize": 4,
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features",
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.tabSize": 4,
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.tabSize": 2,
|
||||
"editor.defaultFormatter": "vscode.json-language-features",
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.tabSize": 2,
|
||||
"editor.defaultFormatter": "vscode.json-language-features",
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
|
||||
},
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"files.insertFinalNewline": true,
|
||||
"clang-format.language.typescript.enable": false,
|
||||
// ESLint `max-len` rule.
|
||||
"editor.rulers": [
|
||||
180
|
||||
],
|
||||
"typescript.preferences.quoteStyle": "single",
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features",
|
||||
"typescript.preferences.quoteStyle": "single",
|
||||
"editor.tabSize": 4,
|
||||
},
|
||||
"markdownlint.config": {
|
||||
"MD032": false, // don't require blank line around lists
|
||||
"MD033": false, // allow inline html
|
||||
"MD041": false // don't require h1 in first line
|
||||
},
|
||||
}
|
||||
20
.vscode/theia.code-snippets
vendored
Normal file
20
.vscode/theia.code-snippets
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"Copyright-JS/JSX/TS/TSX": {
|
||||
"prefix": [
|
||||
"header",
|
||||
"copyright"
|
||||
],
|
||||
"body": "// *****************************************************************************\n// Copyright (C) $CURRENT_YEAR ${YourCompany} and others.\n//\n// This program and the accompanying materials are made available under the\n// terms of the Eclipse Public License v. 2.0 which is available at\n// http://www.eclipse.org/legal/epl-2.0.\n//\n// This Source Code may also be made available under the following Secondary\n// Licenses when the conditions for such availability set forth in the Eclipse\n// Public License v. 2.0 are satisfied: GNU General Public License, version 2\n// with the GNU Classpath Exception which is available at\n// https://www.gnu.org/software/classpath/license.html.\n//\n// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0\n// *****************************************************************************\n$0",
|
||||
"description": "Adds the copyright...",
|
||||
"scope": "javascript,javascriptreact,typescript,typescriptreact"
|
||||
},
|
||||
"Copyright-CSS": {
|
||||
"prefix": [
|
||||
"header",
|
||||
"copyright"
|
||||
],
|
||||
"body": "/********************************************************************************\n * Copyright (C) $CURRENT_YEAR ${YourCompany} and others.\n *\n * This program and the accompanying materials are made available under the\n * terms of the Eclipse Public License v. 2.0 which is available at\n * http://www.eclipse.org/legal/epl-2.0.\n *\n * This Source Code may also be made available under the following Secondary\n * Licenses when the conditions for such availability set forth in the Eclipse\n * Public License v. 2.0 are satisfied: GNU General Public License, version 2\n * with the GNU Classpath Exception which is available at\n * https://www.gnu.org/software/classpath/license.html.\n *\n * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0\n ********************************************************************************/\n\n$0",
|
||||
"description": "Adds the copyright...",
|
||||
"scope": "css"
|
||||
}
|
||||
}
|
||||
955
CHANGELOG.md
Normal file
955
CHANGELOG.md
Normal file
@@ -0,0 +1,955 @@
|
||||
# Changelog
|
||||
|
||||
## History
|
||||
|
||||
- [Previous Changelogs](https://github.com/eclipse-theia/theia/tree/master/doc/changelogs/)
|
||||
|
||||
## 1.68.0 - 1/29/2026
|
||||
|
||||
- [ai-chat] added mode selection for coder and architect agents [#16860](https://github.com/eclipse-theia/theia/pull/16860)
|
||||
- [ai-chat] fix: do not break chat when interrupting tool calls [#16806](https://github.com/eclipse-theia/theia/pull/16806)
|
||||
- [ai-chat] fixed refresh bug after manual task context change [#16816](https://github.com/eclipse-theia/theia/pull/16816)
|
||||
- [ai-chat] fixed respect for agentId in delegateToAgent when prompt contains @mentions [#16855](https://github.com/eclipse-theia/theia/pull/16855)
|
||||
- [ai-chat] fixed the failing test [#16897](https://github.com/eclipse-theia/theia/pull/16897)
|
||||
- [ai-chat] implemented preference for AI chat persisted session limit [#16776](https://github.com/eclipse-theia/theia/pull/16776)
|
||||
- [ai-chat] serialized and restored parsedChatRequest in chat sessions [#16736](https://github.com/eclipse-theia/theia/pull/16736)
|
||||
- [ai-chat] stored persistent chat sessions in the workspace by default [#16847](https://github.com/eclipse-theia/theia/pull/16847)
|
||||
- [ai-chat-ui] added toggle button to collapse changeset list [#16801](https://github.com/eclipse-theia/theia/pull/16801)
|
||||
- [ai-chat-ui] displayed prompt variant customization in chat view responses and agent config [#16749](https://github.com/eclipse-theia/theia/pull/16749)
|
||||
- [ai-chat-ui] enhanced chat accessibility (focus commands and ARIA) [#16835](https://github.com/eclipse-theia/theia/pull/16835)
|
||||
- [ai-chat-ui] highlighted referenced tools in users' chat messages [#16812](https://github.com/eclipse-theia/theia/pull/16812)
|
||||
- [ai-copilot] added GitHub Copilot language model integration [#16841](https://github.com/eclipse-theia/theia/pull/16841)
|
||||
- [ai-core] added agent skills support [#16810](https://github.com/eclipse-theia/theia/pull/16810)
|
||||
- [ai-core] updated default models [#16828](https://github.com/eclipse-theia/theia/pull/16828)
|
||||
- [ai-hugging-face] upgraded sdk to v4.x for new api endpoint [#16864](https://github.com/eclipse-theia/theia/pull/16864)
|
||||
- [ai-hugging-face] used patchLanguageModel to update model status [#16885](https://github.com/eclipse-theia/theia/pull/16885)
|
||||
- [ai-ide] added createSkill agent [#16903](https://github.com/eclipse-theia/theia/pull/16903)
|
||||
- [ai-ide] added Theia coder agent mode next prompt [#16799](https://github.com/eclipse-theia/theia/pull/16799)
|
||||
- [ai-ide] added todo tool function [#16859](https://github.com/eclipse-theia/theia/pull/16859)
|
||||
- [ai-ide] appTester improvements [#16898](https://github.com/eclipse-theia/theia/pull/16898)
|
||||
- [ai-ide] fixed misleading tool description for context_addFiles [#16778](https://github.com/eclipse-theia/theia/pull/16778)
|
||||
- [ai-ide] fixed model selection UI update for model alias [#16800](https://github.com/eclipse-theia/theia/pull/16800)
|
||||
- [ai-ide] fixed remote MCP server state and improved UX [#16822](https://github.com/eclipse-theia/theia/pull/16822)
|
||||
- [ai-ide] fixed selected item after model alias change [#16760](https://github.com/eclipse-theia/theia/pull/16760)
|
||||
- [ai-ide] improved architect planning mode - next prompt [#16843](https://github.com/eclipse-theia/theia/pull/16843)
|
||||
- [ai-ide] improved function descriptions [#16796](https://github.com/eclipse-theia/theia/pull/16796)
|
||||
- [ai-ide] improved task context variable description [#16817](https://github.com/eclipse-theia/theia/pull/16817)
|
||||
- [ai-ide] Reverted "Fixed #16795 (#16800)" [#16802](https://github.com/eclipse-theia/theia/pull/16802)
|
||||
- [ai-ide] switched writeFileReplacement to V2 replacer [#16815](https://github.com/eclipse-theia/theia/pull/16815)
|
||||
- [ai-mcp] blocked mcp server autostart in untrusted workspaces [#16891](https://github.com/eclipse-theia/theia/pull/16891)
|
||||
- [ai-mcp] updated MCP SDK to v1.25.1 and migrated to zod v4 [#16780](https://github.com/eclipse-theia/theia/pull/16780)
|
||||
- [core] added injectable LoggerSanitizer to mask sensitive data in logs [#16771](https://github.com/eclipse-theia/theia/pull/16771) - Contributed on behalf of STMicroelectronics
|
||||
- [core] fixed memory leaks from 'toDisposeOn' disposable collections [#16856](https://github.com/eclipse-theia/theia/pull/16856)
|
||||
- [core] improved keybinding lookup and prioritization [#16763](https://github.com/eclipse-theia/theia/pull/16763)
|
||||
- [core] postponed default override warning logging until builtin preferences registered [#16853](https://github.com/eclipse-theia/theia/pull/16853)
|
||||
- [core] refactored tree search box into react widget and enhanced ux and styling [#16761](https://github.com/eclipse-theia/theia/pull/16761)
|
||||
- [core] restored enhanced tab preview for all widgets [#16895](https://github.com/eclipse-theia/theia/pull/16895)
|
||||
- [core] theia v1.67.0 released [#16738](https://github.com/eclipse-theia/theia/pull/16738)
|
||||
- [core] translation update for version 1.68.0 [#16907](https://github.com/eclipse-theia/theia/pull/16907)
|
||||
- [debug] fixed deletion of disabled source breakpoints [#16794](https://github.com/eclipse-theia/theia/pull/16794)
|
||||
- [debug] improved debug console with output persistence and text filtering [#16882](https://github.com/eclipse-theia/theia/pull/16882)
|
||||
- [doc] updated publishing guide documentation [#16768](https://github.com/eclipse-theia/theia/pull/16768) - Contributed on behalf of STMicroelectronics
|
||||
- [examples] fixed clean script for the example applications [#16767](https://github.com/eclipse-theia/theia/pull/16767)
|
||||
- [github] added discussion auto-reply [#16746](https://github.com/eclipse-theia/theia/pull/16746)
|
||||
- [github] added sponsoring hint to discussion templates [#16745](https://github.com/eclipse-theia/theia/pull/16745)
|
||||
- [github] added sponsoring hint to gh ticket templates [#16744](https://github.com/eclipse-theia/theia/pull/16744)
|
||||
- [localization-manager] set deepl auth header [#16906](https://github.com/eclipse-theia/theia/pull/16906)
|
||||
- [messages] allowed copying messages from notifications and fixed copying of error messages in AI chat [#16830](https://github.com/eclipse-theia/theia/pull/16830) - Contributed on behalf of STMicroelectronics
|
||||
- [messages] handled notification timeout correctly when set to 0 [#16849](https://github.com/eclipse-theia/theia/pull/16849) - Contributed on behalf of STMicroelectronics
|
||||
- [monaco] updated built-in theme and color definitions [#16873](https://github.com/eclipse-theia/theia/pull/16873)
|
||||
- [output] fixed state restoration in outputWidget [#16851](https://github.com/eclipse-theia/theia/pull/16851)
|
||||
- [plugin] preserved lsp diagnostic.data in markers [#16766](https://github.com/eclipse-theia/theia/pull/16766)
|
||||
- [plugin] updated VS Code built-in extensions to 1.104.0 and Typescript to 5.9.3 [#16774](https://github.com/eclipse-theia/theia/pull/16774) - contributed on behalf of STMicroelectronics
|
||||
- [preferences] marked llmprovider as experimental [#16784](https://github.com/eclipse-theia/theia/pull/16784)
|
||||
- [preferences] supported preference tags in settings view [#16783](https://github.com/eclipse-theia/theia/pull/16783)
|
||||
- [scm] added action button (commit button) support to scm [#16803](https://github.com/eclipse-theia/theia/pull/16803) - contributed under the supervision of @JonasHelming as part of the TUM Bachelor Thesis project "Enhancing Terminal Usability in Modern IDEs through AI-Assisted Interaction"
|
||||
- [scm] fix manual resolution not detected in some cases [#16869](https://github.com/eclipse-theia/theia/pull/16869)
|
||||
- [scm] fixed `Go to Previous Unhandled Conflict` doing nothing [#16838](https://github.com/eclipse-theia/theia/pull/16838)
|
||||
- [scm] fixed `mark as handled` having no effect in some cases [#16858](https://github.com/eclipse-theia/theia/pull/16858)
|
||||
- [scm] ux: fixed styling for scm commit button for high contrast themes [#16905](https://github.com/eclipse-theia/theia/pull/16905)
|
||||
- [terminal-manager] improved handling of terminal manager preferences & element deletion [#16827](https://github.com/eclipse-theia/theia/pull/16827)
|
||||
- [terminal-manager] updated active page handling on terminal page deletion [#16807](https://github.com/eclipse-theia/theia/pull/16807)
|
||||
- [vscode] API evolution (public and proposed) and nls update to 1.108.0 [#16871](https://github.com/eclipse-theia/theia/pull/16871) - contributed on behalf of STMicroelectronics
|
||||
- [vsx-registry] fixed vsxExtensionsViewContainer onAfterAttach issue [#16862](https://github.com/eclipse-theia/theia/pull/16862)
|
||||
- [workspace] implemented workspace trust dialog and management [#16809](https://github.com/eclipse-theia/theia/pull/16809)
|
||||
- [workspace] improved computation of workspace trust for saved/multi-root workspaces [#16893](https://github.com/eclipse-theia/theia/pull/16893)
|
||||
- [workspace] updated dialog and status bar item styling and fixed command state handling [#16877](https://github.com/eclipse-theia/theia/pull/16877)
|
||||
|
||||
<a name="breaking_changes_1.68.0">[Breaking Changes:](#breaking_changes_1.68.0)</a>
|
||||
|
||||
- [monaco] refactored some of the fields in `MonacoEditor` and `MonacoDiffEditor` as part of [#16832](https://github.com/eclipse-theia/theia/pull/16832):
|
||||
- changed the type of `MonacoEditor.savedViewState` from `monaco.editor.ICodeEditorViewState | null` to `monaco.editor.IEditorViewState | null` and also changed its visibility from public to protected
|
||||
- removed protected field `MonacoEditor.model`
|
||||
- removed protected fields `savedDiffState`, `originalTextModel`, and `modifiedTextModel` in `MonacoDiffEditor`
|
||||
- [preferences] Removed the optional 'knownCurrentValue' argument to `PreferenceLeadNodeRenderer#updateModificationStatus`. Renamed `isModifiedInScope` to `isSet` to reflect new semantics. [#16836](https://github.com/eclipse-theia/theia/pull/16836)
|
||||
- [core] removed `oldValue` and `newValue` fields from the `PreferenceChange` and the `PreferenceProxy`'s `PreferenceChangeEvent` interfaces. The `newValue` field was a common footgun, as it represented the value in the changed scope rather than the effective value. In particular, it could be `undefined` when a given scope was cleared even if another scope provided a defined value. Use `PreferenceService.get` or `PreferenceProxy.get` or indexing on a `PreferenceProxy` to retrieve the active value rather than using the `newValue` field. [#16832](https://github.com/eclipse-theia/theia/pull/16846)
|
||||
- [scm] refactored some of the methods pertaining to the 3-way Merge Editor implementation as part of [#16867](https://github.com/eclipse-theia/theia/pull/16867)
|
||||
- removed the `MergeEditorModel.findMergeRanges` method
|
||||
- renamed the `RangeUtils.isBeforeOrTouching` method to `isBefore`
|
||||
- [ai-chat, ai-core] refactored tool handler context types [#16899](https://github.com/eclipse-theia/theia/issues/16899): Tool handlers now receive `ToolInvocationContext` (with `cancellationToken`) instead of `MutableChatRequestModel`. Chat-bound tools should use `assertChatContext(ctx)` to access `ChatToolContext` with `request` and `response` properties.
|
||||
- [ai-chat] fixed: refactor tool handler context types for type safety [#16901](https://github.com/eclipse-theia/theia/pull/16901)
|
||||
- [ai-terminal] added shellExecutionTool for AI agents [#16878](https://github.com/eclipse-theia/theia/pull/16878)
|
||||
- [core] passed widget consistently to toolbar enablement handlers [#16826](https://github.com/eclipse-theia/theia/pull/16826)
|
||||
|
||||
## 1.67.0 - 12/10/2025
|
||||
|
||||
- [ai-anthropic] added opus 4.5 to default models [#16656](https://github.com/eclipse-theia/theia/pull/16656)
|
||||
- [ai-anthropic, ai-core, ai-google, ai-openai] updated default models [#16636](https://github.com/eclipse-theia/theia/pull/16636)
|
||||
- [ai-chat] clarified role of Orchestrator agent in Theia AI chat interactions [#16663](https://github.com/eclipse-theia/theia/pull/16663)
|
||||
- [ai-chat-ui] ensured active session is recreated after deletion [#16702](https://github.com/eclipse-theia/theia/pull/16702) - Contributed on behalf of [Lonti.com](http://lonti.com/) Pty Ltd
|
||||
- [ai-claude-code] added session forking support [#16667](https://github.com/eclipse-theia/theia/pull/16667)
|
||||
- [ai-claude-code] migrated Claude Code to Theia native slash commands and modes [#16541](https://github.com/eclipse-theia/theia/pull/16541)
|
||||
- [ai-codex] added codex as an agent [#16484](https://github.com/eclipse-theia/theia/pull/16484)
|
||||
- [ai-codex] correctly asserted path for windows and linux tests [#16620](https://github.com/eclipse-theia/theia/pull/16620)
|
||||
- [ai-core] enableAgent/disableAgent: added async/await [#16599](https://github.com/eclipse-theia/theia/pull/16599)
|
||||
- [ai-core] enabled markdown syntax for prompt template files [#16557](https://github.com/eclipse-theia/theia/pull/16557)
|
||||
- [ai-core] fixed duplicate command check [#16718](https://github.com/eclipse-theia/theia/pull/16718)
|
||||
- [ai-core] handled undefined parameters for prompt template discard command [#16706](https://github.com/eclipse-theia/theia/pull/16706)
|
||||
- [ai-core] made opus 4.5 default in model alliasses [#16734](https://github.com/eclipse-theia/theia/pull/16734)
|
||||
- [ai-core] returned command by name if not found by ID [#16614](https://github.com/eclipse-theia/theia/pull/16614)
|
||||
- [ai-google] updated @google/genai dependency, added thoughtSignature support and fixed content extraction [#16664](https://github.com/eclipse-theia/theia/pull/16664)
|
||||
- [ai-ide] added GitHub slash commands [#16704](https://github.com/eclipse-theia/theia/pull/16704)
|
||||
- [ai-ide] added remember command [#16639](https://github.com/eclipse-theia/theia/pull/16639)
|
||||
- [ai-ide] clicking on a file in ai context does not open file [#16468](https://github.com/eclipse-theia/theia/pull/16468)
|
||||
- [ai-ide] improved AI Agent Configuration view [#16698](https://github.com/eclipse-theia/theia/pull/16698)
|
||||
- [ai-ide] made next replacer function default [#16597](https://github.com/eclipse-theia/theia/pull/16597)
|
||||
- [ai-ide] updated command prompt template examples [#16608](https://github.com/eclipse-theia/theia/pull/16608)
|
||||
- [ai-llamafile] updated llamafile model status for agent availability [#16692](https://github.com/eclipse-theia/theia/pull/16692)
|
||||
- [ai-openai] recursively strictified tool call schemata [#16553](https://github.com/eclipse-theia/theia/pull/16553)
|
||||
- [ai-terminal] fixed unresponsiveness in ask AI terminal assistant [#16714](https://github.com/eclipse-theia/theia/pull/16714)
|
||||
- [application-package] bumped API compatibility to 1.106.1 [#16655](https://github.com/eclipse-theia/theia/pull/16655) - Contributed on behalf of STMicroelectronics
|
||||
- [ci] fixed check-new-packages workflow and checkPublish script [#16650](https://github.com/eclipse-theia/theia/pull/16650)
|
||||
- [ci] migrated to npm trusted publishing (OIDC) and updated publishing workflow [#16630](https://github.com/eclipse-theia/theia/pull/16630)
|
||||
- [ci] optimized test builds to avoid redundant executions [#16552](https://github.com/eclipse-theia/theia/pull/16552)
|
||||
- [ci] set default values for scheduled publish-ci runs [#16695](https://github.com/eclipse-theia/theia/pull/16695)
|
||||
- [core] added support for emojis in markdown renderers [#16548](https://github.com/eclipse-theia/theia/pull/16548)
|
||||
- [core] fixed electron startup crash on wayland [#16658](https://github.com/eclipse-theia/theia/pull/16658)
|
||||
- [core] fixed the issue with exclude pattern in user settings not merging with workspace settings [#16483](https://github.com/eclipse-theia/theia/pull/16483)
|
||||
- [core] fixed workbench.startupEditor and scm.defaultViewMode reset behavior [#16646](https://github.com/eclipse-theia/theia/pull/16646)
|
||||
- [core] improved error handling in catalog.json download script [#16579](https://github.com/eclipse-theia/theia/pull/16579) - contributed on behalf of STMicroelectronics
|
||||
- [core] improved menubar items active state handling on hover [#16586](https://github.com/eclipse-theia/theia/pull/16586) - contributed on behalf of STMicroelectronics
|
||||
- [core] improved typing related to `globalThis` object [#16603](https://github.com/eclipse-theia/theia/pull/16603)
|
||||
- [core] npm upgrade [#16516](https://github.com/eclipse-theia/theia/pull/16516)
|
||||
- [core] provided markdown and localizedMarkdown components [#16470](https://github.com/eclipse-theia/theia/pull/16470)
|
||||
- [core] removed references to gitpod (now ona) [#16610](https://github.com/eclipse-theia/theia/pull/16610)
|
||||
- [core] restored tree expansion state preservation in SourceTreeWidget [#16654](https://github.com/eclipse-theia/theia/pull/16654)
|
||||
- [core] reverted "fix(core): restore tree expansion state preservation in SourceTreeWidget" [#16672](https://github.com/eclipse-theia/theia/pull/16672)
|
||||
- [core] reverted to `scrollIntoView` [#16532](https://github.com/eclipse-theia/theia/pull/16532)
|
||||
- [core] theia v1.66.0 released [#16515](https://github.com/eclipse-theia/theia/pull/16515)
|
||||
- [core] updated nls.metadata for vscode API 1.106.1 and added update eslint localization check [#16728](https://github.com/eclipse-theia/theia/pull/16728) - contributed on behalf of STMicroelectronics
|
||||
- [core] updated package READMEs [#16631](https://github.com/eclipse-theia/theia/pull/16631)
|
||||
- [core] updated translations for 'applyAll' and 'finished' in Chinese locale [#16556](https://github.com/eclipse-theia/theia/pull/16556)
|
||||
- [core] used PreferenceService.get to merge agent settings from different scopes [#16612](https://github.com/eclipse-theia/theia/pull/16612)
|
||||
- [core] used undefined-safe deep equality check in preference updates [#16709](https://github.com/eclipse-theia/theia/pull/16709)
|
||||
- [customAgents] fixed default model for theia-dev [#16680](https://github.com/eclipse-theia/theia/pull/16680)
|
||||
- [debug] added breakpoint actions to debug view [#16700](https://github.com/eclipse-theia/theia/pull/16700)
|
||||
- [debug] added support for "lazy" debug variables [#16681](https://github.com/eclipse-theia/theia/pull/16681)
|
||||
- [debug] added support for adding the current editor selection to watch [#16567](https://github.com/eclipse-theia/theia/pull/16567)
|
||||
- [debug] added support for data breakpoints [#16505](https://github.com/eclipse-theia/theia/pull/16505)
|
||||
- [debug] opened stack frame editor on tap [#16519](https://github.com/eclipse-theia/theia/pull/16519)
|
||||
- [debug] variables made expandable when they should not [#16684](https://github.com/eclipse-theia/theia/pull/16684)
|
||||
- [dev-container] basic devcontainer docker compose support [#16577](https://github.com/eclipse-theia/theia/pull/16577)
|
||||
- [dev-container] fixed devContainer startup failure due to non-injectable logger [#16678](https://github.com/eclipse-theia/theia/pull/16678)
|
||||
- [doc] added coding guideline for localizing rich content [#16501](https://github.com/eclipse-theia/theia/pull/16501)
|
||||
- [doc] added i18n checklist item to PR template and review checklist [#16611](https://github.com/eclipse-theia/theia/pull/16611)
|
||||
- [doc] updated publishing guide [#16592](https://github.com/eclipse-theia/theia/pull/16592) - Contributed on behalf of STMicroelectronics
|
||||
- [examples] fixed script parameters [#16523](https://github.com/eclipse-theia/theia/pull/16523)
|
||||
- [filesystem] fixed undefined error on context menu upload files command [#16600](https://github.com/eclipse-theia/theia/pull/16600)
|
||||
- [getting-started] enhanced localization of the package [#16578](https://github.com/eclipse-theia/theia/pull/16578)
|
||||
- [metrics] fixed error after deleting node_modules folder - cannot resolve package @theia/<package> [#16602](https://github.com/eclipse-theia/theia/pull/16602)
|
||||
- [monaco] quick command panel not closing when pressing escape fixed [#16668](https://github.com/eclipse-theia/theia/pull/16668)
|
||||
- [notebook] "split editor" functionality for notebooks [#16507](https://github.com/eclipse-theia/theia/pull/16507)
|
||||
- [playwright] missing tslib import in @theia/playwright [#16670](https://github.com/eclipse-theia/theia/pull/16670)
|
||||
- [plugin] API evolution (proposed) to 1.106.1 [#16626](https://github.com/eclipse-theia/theia/pull/16626) - contributed on behalf of STMicroelectronics
|
||||
- [plugin] API evolution (public) to 1.106.1 [#16625](https://github.com/eclipse-theia/theia/pull/16625) - Contributed on behalf of STMicroelectronics
|
||||
- [plugin-ext] fixed incorrect argument passing to StatusBarEntry [#16694](https://github.com/eclipse-theia/theia/pull/16694)
|
||||
- [plugin-ext] fixed issue with creating proper type instances in toSymbolInformation [#16731](https://github.com/eclipse-theia/theia/pull/16731)
|
||||
- [preferences] fixed: align input heights in preferences UI [#16733](https://github.com/eclipse-theia/theia/pull/16733)
|
||||
- [preferences] preference UI: subscribed directly to provider changes [#16506](https://github.com/eclipse-theia/theia/pull/16506)
|
||||
- [prompts] added two agents that allow for an agentic flow [#16473](https://github.com/eclipse-theia/theia/pull/16473)
|
||||
- [prompts] moved TheiaDev and TheiaDevCoder prompts to customAgents.yml [#16711](https://github.com/eclipse-theia/theia/pull/16711)
|
||||
- [terminal] enhanced localization of the terminal package [#16587](https://github.com/eclipse-theia/theia/pull/16587)
|
||||
- [terminal] new terminals were created in the panel of the clicked button [#16538](https://github.com/eclipse-theia/theia/pull/16538)
|
||||
- [terminal] when the terminal was inputting with a Chinese input method, the text that had already been input was covered [#16605](https://github.com/eclipse-theia/theia/pull/16605)
|
||||
- [terminal-manager] Adds new package providing a terminal manager widget to have multiple terminals within one view. Adds setting `terminal.grouping.mode` to switch between the
|
||||
old behavior and the new view. Default is the old behavior. [#16604](https://github.com/eclipse-theia/theia/issues/16604)
|
||||
- [terminal-manager] enhanced localization of the terminal-manager package [#16717](https://github.com/eclipse-theia/theia/pull/16717)
|
||||
- [terminal-manager] removed terminal flash animation on selection and cleaned up unused css rules [#16715](https://github.com/eclipse-theia/theia/pull/16715)
|
||||
- [timeline] updated proposed.timeline API and theia timeline view implementation [#16627](https://github.com/eclipse-theia/theia/pull/16627) - Contributed on behalf of STMicroelectronics
|
||||
- [toolbar] improved icon picker dialog for adding toolbar items and updated @vscode/codicons [#16629](https://github.com/eclipse-theia/theia/pull/16629)
|
||||
- [vsx-registry] used versioned id's for (un)installed and deployed plugins [#16513](https://github.com/eclipse-theia/theia/pull/16513)
|
||||
- [workspace] do not copy preferences that are valid in folder scope [#16622](https://github.com/eclipse-theia/theia/pull/16622)
|
||||
- [workspace] enhanced localization of the workspace package [#16589](https://github.com/eclipse-theia/theia/pull/16589)
|
||||
|
||||
<a name="breaking_changes_1.67.0">[Breaking Changes:](#breaking_changes_1.67.0)</a>
|
||||
|
||||
- [ai-core] objects returned by `AiSettingsService` settings retrievals marked readonly. To mutate a settings object, make a copy. [#16612](https://github.com/eclipse-theia/theia/pull/16612)
|
||||
- [core] `CommonCommands` has been extracted from `common-frontend-contribution.ts` into its own file `common-commands.ts`. This only affects code using deep imports: imports of `CommonCommands` from `@theia/core/lib/browser/common-frontend-contribution` should be updated to use the standard barrel export `@theia/core/lib/browser` instead.
|
||||
- [core] `CommonMenus` has been extracted from `common-frontend-contribution.ts` into its own file `common-menus.ts`. This only affects code using deep imports: imports of `CommonMenus` from `@theia/core/lib/browser/common-frontend-contribution` should be updated to use the standard barrel export `@theia/core/lib/browser` instead.
|
||||
- [core] moved CommonCommands to separate file [#16522](https://github.com/eclipse-theia/theia/pull/16522)
|
||||
- [debug] `DebugSessionManager.getFunctionBreakpoints()`, `DebugSessionManager.getInstructionBreakpoints()`, and `DebugSessionManager.getBreakpoints()` no longer default to the current session when called without arguments. Callers that relied on the implicit default to `currentSession` must now pass `this.currentSession` explicitly. [#16537](https://github.com/eclipse-theia/theia/pull/16537)
|
||||
- [debug] refactored some of the debug model elements as part of [#16689](https://github.com/eclipse-theia/theia/pull/16689):
|
||||
- added required `id` parameter to `DebugStackFrame` and `DebugScope` constructors
|
||||
- changed type of keys in the `DebugThread._frames` map from `number` to `string`
|
||||
- added required `startFrame` parameter to `DebugThread.doUpdateFrames` method
|
||||
- [debug] some of the fields and methods of `DebugToolBar` have been removed in [#16719](https://github.com/eclipse-theia/theia/pull/16719)
|
||||
- [debug] moved `Debug*Commands` and `DebugMenus` to separate file [#16700](https://github.com/eclipse-theia/theia/pull/16700)
|
||||
- [plugin-ext] `$setBadge` method removed from `WebviewsMain` interface and `WebviewsMainImpl`; badge-related fields removed from `WebviewView` interface and implementation; badge-related fields removed from `PluginViewWidget`; badge-related fields removed from `WebviewWidget`. Use the `BadgeService` instead of `BadgeWidget` interface implementation to show extension badges. [#16518](https://github.com/eclipse-theia/theia/pull/16518)
|
||||
- [scm] `ScmTabBarDecorator` and bindings removed. `ScmWidget` now contributes badge decorations via the `BadgeService`. [#16518](https://github.com/eclipse-theia/theia/pull/16518)
|
||||
|
||||
## 1.66.0 - 10/30/2025
|
||||
|
||||
- [ai-anthropic] allowed configuring proxy settings [#16453](https://github.com/eclipse-theia/theia/pull/16453)
|
||||
- [ai-anthropic] fixed Anthropic request errors when using parallel tool calls [#16359](https://github.com/eclipse-theia/theia/pull/16359)
|
||||
- [ai-chat] enhanced localization of the ai-chat package [#16409](https://github.com/eclipse-theia/theia/pull/16409)
|
||||
- [ai-chat] implemented chat session persistence [#16486](https://github.com/eclipse-theia/theia/pull/16486)
|
||||
- [ai-chat] refined the description of agent delegate tool [#16378](https://github.com/eclipse-theia/theia/pull/16378)
|
||||
- [ai-chat-ui] added mode support for chat agents [#16489](https://github.com/eclipse-theia/theia/pull/16489)
|
||||
- [ai-chat-ui] enhanced localization of the ai-chat-ui package [#16414](https://github.com/eclipse-theia/theia/pull/16414)
|
||||
- [ai-claude-code] added dedicated Claude Code API key preference [#16508](https://github.com/eclipse-theia/theia/pull/16508)
|
||||
- [ai-claude-code] enhanced localization of the ai-claude-code package [#16451](https://github.com/eclipse-theia/theia/pull/16451)
|
||||
- [ai-claude-code] migrated to claude agent sdk [#16500](https://github.com/eclipse-theia/theia/pull/16500)
|
||||
- [ai-code-completion] enhanced localization of ai-code-completion [#16416](https://github.com/eclipse-theia/theia/pull/16416)
|
||||
- [ai-core] added support for slash commands [#16444](https://github.com/eclipse-theia/theia/pull/16444)
|
||||
- [ai-core] enhanced localization of the ai-core package [#16350](https://github.com/eclipse-theia/theia/pull/16350)
|
||||
- [ai-editor] enhanced localization of ai-editor [#16416](https://github.com/eclipse-theia/theia/pull/16416)
|
||||
- [ai-google] conditionally included tools in GoogleModel based on functionDeclarations length [#16480](https://github.com/eclipse-theia/theia/pull/16480)
|
||||
- [ai-google] fixed google language model error for requests without tool functions [#16380](https://github.com/eclipse-theia/theia/pull/16380) - Contributed on behalf of Lonti.com Pty Ltd
|
||||
- [ai-ide] adapted workspace functions preferences [#16452](https://github.com/eclipse-theia/theia/pull/16452)
|
||||
- [ai-ide] added GitHub agent [#16374](https://github.com/eclipse-theia/theia/pull/16374)
|
||||
- [ai-ide] added initial project info agent (alpha) [#16462](https://github.com/eclipse-theia/theia/pull/16462)
|
||||
- [ai-ide] added new content replacer strategy for coder edit mode [#16322](https://github.com/eclipse-theia/theia/pull/16322)
|
||||
- [ai-ide] added orchestrator agent exclusion list [#16510](https://github.com/eclipse-theia/theia/pull/16510)
|
||||
- [ai-ide] added support to suggest terminal command [#16428](https://github.com/eclipse-theia/theia/pull/16428)
|
||||
- [ai-ide] enhanced localization of the ai-ide package [#16426](https://github.com/eclipse-theia/theia/pull/16426)
|
||||
- [ai-ide] extracted task context prompt into separate agent [#16393](https://github.com/eclipse-theia/theia/pull/16393)
|
||||
- [ai-ide] fixed two minor spelling/wording issues with the coder prompt [#16402](https://github.com/eclipse-theia/theia/pull/16402)
|
||||
- [ai-ide] forbade meta comments in coder prompt [#16331](https://github.com/eclipse-theia/theia/pull/16331)
|
||||
- [ai-ide] removed @theia/git dependency [#16465](https://github.com/eclipse-theia/theia/pull/16465)
|
||||
- [ai-mcp] added option to run a resolve operation on mcp server start [#16049](https://github.com/eclipse-theia/theia/pull/16049)
|
||||
- [ai-mcp] fixed preference categorization for MCP server preferences [#16346](https://github.com/eclipse-theia/theia/pull/16346)
|
||||
- [ai-mcp-server] added .js extension to imports for ESM to allow usage in commonjs [#16410](https://github.com/eclipse-theia/theia/pull/16410) - Contributed by STMicroelectronics
|
||||
- [ai-openai] allowed configuring proxy settings [#16453](https://github.com/eclipse-theia/theia/pull/16453)
|
||||
- [ai-openai] used OpenAI response API [#16394](https://github.com/eclipse-theia/theia/pull/16394)
|
||||
- [ai-scanoss] fixed SCANOSS dialog expansion with long JSON content [#16485](https://github.com/eclipse-theia/theia/pull/16485)
|
||||
- [ai-terminal] enhanced localization of ai-terminal [#16416](https://github.com/eclipse-theia/theia/pull/16416)
|
||||
- [application-manager] resolved `.node` files in webpack backend config [#16377](https://github.com/eclipse-theia/theia/pull/16377)
|
||||
- [application-package] bumped vscode API compatibility to 1.105.0 [#16495](https://github.com/eclipse-theia/theia/pull/16495)
|
||||
- [ci] optimized CI build to avoid redundant executions [#16457](https://github.com/eclipse-theia/theia/pull/16457)
|
||||
- [ci] updated license workflow and switched to nodejs wrapper [#16456](https://github.com/eclipse-theia/theia/pull/16456)
|
||||
- [ci] updated publish-release workflow for release automation [#16433](https://github.com/eclipse-theia/theia/pull/16433) - Contributed on behalf of STMicroelectronics
|
||||
- [core] added symbol icon default colors [#15860](https://github.com/eclipse-theia/theia/pull/15860)
|
||||
- [core] added z-index to dock layering style [#16375](https://github.com/eclipse-theia/theia/pull/16375)
|
||||
- [core] ensured reveal scrolls to selected tree row [#16463](https://github.com/eclipse-theia/theia/pull/16463)
|
||||
- [core] evaluated enablement and toggle state of command only once before showing context menu [#16325](https://github.com/eclipse-theia/theia/pull/16325) - Contributed on behalf of Lonti.com Pty Ltd
|
||||
- [core] evolved vscode API (public) to 1.105.0 [#16476](https://github.com/eclipse-theia/theia/pull/16476) - Contributed on behalf of STMicroelectronics
|
||||
- [core] fixed authentication service not reacting to session changes [#16252](https://github.com/eclipse-theia/theia/pull/16252)
|
||||
- [core] fixed tooltip/hover service mouseOut for non-chromium browsers [#16417](https://github.com/eclipse-theia/theia/pull/16417)
|
||||
- [core] fixed vscode plugin activation failed error when it uses an already existing key in its settings [#16481](https://github.com/eclipse-theia/theia/pull/16481)
|
||||
- [core] improved default value and reset handling for preferences [#16356](https://github.com/eclipse-theia/theia/pull/16356)
|
||||
- [core] prevented await identifiers [#16404](https://github.com/eclipse-theia/theia/pull/16404) - Contributed on behalf of STMicroelectronics
|
||||
- [core] showed hover tooltip immediately when clicking status bar item [#16385](https://github.com/eclipse-theia/theia/pull/16385)
|
||||
- [core] updated toggle developer tools keyboard shortcut to avoid overlap [#16488](https://github.com/eclipse-theia/theia/pull/16488)
|
||||
- [core] upgraded NPM [#16357](https://github.com/eclipse-theia/theia/pull/16357)
|
||||
- [debug] added check for valid debug session [#16330](https://github.com/eclipse-theia/theia/pull/16330)
|
||||
- [debug] added support for context menu in debug hover [#16366](https://github.com/eclipse-theia/theia/pull/16366)
|
||||
- [debug] fixed `Add to Watch` command [#16340](https://github.com/eclipse-theia/theia/pull/16340)
|
||||
- [debug] made reveal position smoother [#16311](https://github.com/eclipse-theia/theia/pull/16311) - Contributed on behalf of MVTec Software GmbH
|
||||
- [debug] retained session-bound metadata for disabled breakpoints [#16361](https://github.com/eclipse-theia/theia/pull/16361)
|
||||
- [docs] added CLAUDE.md file [#16458](https://github.com/eclipse-theia/theia/pull/16458)
|
||||
- [docs] published API documentation on GitHub Pages [#16422](https://github.com/eclipse-theia/theia/pull/16422)
|
||||
- [docs] updated README.md [#16353](https://github.com/eclipse-theia/theia/pull/16353)
|
||||
- [editor] fixed OutputWidget and MonacoEditor memory leak [#16487](https://github.com/eclipse-theia/theia/pull/16487) - Contributed by Hbb
|
||||
- [electron] updated electron to version 38.4.0 [#16477](https://github.com/eclipse-theia/theia/pull/16477)
|
||||
- [filesystem] avoided trying to use watchman for file system watcher [#16335](https://github.com/eclipse-theia/theia/pull/16335) - contributed on behalf of STMicroelectronics
|
||||
- [notebook] used shared lodash.debounce import in notebook-editor-widget [#16423](https://github.com/eclipse-theia/theia/pull/16423)
|
||||
- [playwright] added stability checks for TheiaMenuBar and TheiaMenu in Playwright tests [#16455](https://github.com/eclipse-theia/theia/pull/16455)
|
||||
- [plugin] aligned module declaration for proposed.statusBarItemTooltip.d.ts [#16396](https://github.com/eclipse-theia/theia/pull/16396)
|
||||
- [plugin] evolved vscode API (proposed) to 1.105.0 [#16475](https://github.com/eclipse-theia/theia/pull/16475) - Contributed on behalf of STMicroelectronics
|
||||
- [plugin] refactored local plugin readme resolution [#16382](https://github.com/eclipse-theia/theia/pull/16382)
|
||||
- [plugin] removed deprecated WMIC and unmaintained ps-tree usage [#16439](https://github.com/eclipse-theia/theia/pull/16439)
|
||||
- [plugin-ext] allowed VSCode extension to access files outside of the extension directory [#16195](https://github.com/eclipse-theia/theia/pull/16195)
|
||||
- [plugin-ext] ensured output channel methods stay within this context [#16420](https://github.com/eclipse-theia/theia/pull/16420)
|
||||
- [plugin-ext] implemented asynchronous tooltips [#16364](https://github.com/eclipse-theia/theia/pull/16364)
|
||||
- [plugin-ext] used unversioned IDs for disabled extensions [#16392](https://github.com/eclipse-theia/theia/pull/16392)
|
||||
- [preferences] avoided reporting misleading 'invalid scope' warning for excluded preferences [#16332](https://github.com/eclipse-theia/theia/pull/16332)
|
||||
- [preferences] debounced updateInMemoryResources to reduce startup times [#16440](https://github.com/eclipse-theia/theia/pull/16440)
|
||||
- [preferences] fixed missing commonly used settings section [#16344](https://github.com/eclipse-theia/theia/pull/16344)
|
||||
- [preferences] renamed await to awaitAll for esbuild compatibility [#16398](https://github.com/eclipse-theia/theia/pull/16398) - Contributed on behalf of STMicroelectronics
|
||||
- [scanoss] fixed preference categorization for SCANOSS preferences [#16346](https://github.com/eclipse-theia/theia/pull/16346)
|
||||
- [vsx-registry] fixed local plugin readme file resolution [#16376](https://github.com/eclipse-theia/theia/pull/16376)
|
||||
- [workspace] added filename attribute to localization function [#16482](https://github.com/eclipse-theia/theia/pull/16482)
|
||||
|
||||
<a name="breaking_changes_1.66.0">[Breaking Changes:](#breaking_changes_1.66.0)</a>
|
||||
|
||||
- [core] `Listener.await` has been renamed to `Listener.awaitAll` for better compatibility with esbuild. [#16398](https://github.com/eclipse-theia/theia/pull/16398) - Contributed on behalf of STMicroelectronics
|
||||
|
||||
## 1.65.0 - 9/26/2025
|
||||
|
||||
- [ai-chat] cancelled incomplete requests on new request [#16179](https://github.com/eclipse-theia/theia/pull/16179)
|
||||
- [ai-chat] deduplicated tools before sending llm request [#16229](https://github.com/eclipse-theia/theia/pull/16229)
|
||||
- [ai-chat] enabled specifying original state in change sets [#16067](https://github.com/eclipse-theia/theia/pull/16067)
|
||||
- [ai-chat] unified tool call result handling [#16106](https://github.com/eclipse-theia/theia/pull/16106)
|
||||
- [ai-chat-ui] added chat input history with arrow key navigation [#16174](https://github.com/eclipse-theia/theia/pull/16174) - Contributed on behalf of STMicroelectronics
|
||||
- [ai-chat-ui] cancelled tool execution confirm dialogs when request was cancelled [#16221](https://github.com/eclipse-theia/theia/pull/16221)
|
||||
- [ai-chat-ui] fix(chat): prevent prompt navigation when suggestion widget is visible [#16224](https://github.com/eclipse-theia/theia/pull/16224)
|
||||
- [ai-chat-ui] fixed #16129 [#16185](https://github.com/eclipse-theia/theia/pull/16185)
|
||||
- [ai-chat-ui] fixed arrow up/down only triggering prompt history if visual top/bottom line [#16265](https://github.com/eclipse-theia/theia/pull/16265)
|
||||
- [ai-claude-code] initial Claude Code agent integration [#16273](https://github.com/eclipse-theia/theia/pull/16273)
|
||||
- [ai-core] Also watch non-existent template directories [#16251](https://github.com/eclipse-theia/theia/pull/16251)
|
||||
- [ai-google] improved error reporting for Google GenAI connector [#16228](https://github.com/eclipse-theia/theia/pull/16228)
|
||||
- [ai-ide] added "find files" tool function [#16250](https://github.com/eclipse-theia/theia/pull/16250)
|
||||
- [ai-ide] collapsed prompt fragment list 1st level by default [#16202](https://github.com/eclipse-theia/theia/pull/16202)
|
||||
- [ai-ide] fixed show variables and functions only from selected prompt variants [#15519](https://github.com/eclipse-theia/theia/pull/15519)
|
||||
- [ai-ide] improved getWorkspaceList to mark sub directories [#16170](https://github.com/eclipse-theia/theia/pull/16170)
|
||||
- [ai-ide] refined app tester prompt [#16147](https://github.com/eclipse-theia/theia/pull/16147)
|
||||
- [ai-ide] removed workspace directory structure function from default prompts [#16171](https://github.com/eclipse-theia/theia/pull/16171)
|
||||
- [ai-mcp-server] added model context protocol server integration for theia [#15832](https://github.com/eclipse-theia/theia/pull/15832)
|
||||
- [ai-openai] added info on bearer token [#16307](https://github.com/eclipse-theia/theia/pull/16307)
|
||||
- [ai-openai] correctly handled reasoning output of openai/gpt-oss-120b [#16282](https://github.com/eclipse-theia/theia/pull/16282)
|
||||
- [ai-openai] deployment configuration for Azure hosted models was added [#16324](https://github.com/eclipse-theia/theia/pull/16324)
|
||||
- [ai-openai] updated OpenAI models, added gpt-5 [#16169](https://github.com/eclipse-theia/theia/pull/16169)
|
||||
- [changelog] fixed changelog for 1.64.0 [#16103](https://github.com/eclipse-theia/theia/pull/16103)
|
||||
- [changelog] updated changelog.md [#16217](https://github.com/eclipse-theia/theia/pull/16217)
|
||||
- [core] added coding guidelines to project info [#16318](https://github.com/eclipse-theia/theia/pull/16318)
|
||||
- [core] cleaned up emitters and dangling references when Theia DockPanel disposed [#16317](https://github.com/eclipse-theia/theia/pull/16317)
|
||||
- [core] ended support for Node 18 and upgraded to node-gyp 11.x [#16218](https://github.com/eclipse-theia/theia/pull/16218) - Contributed on behalf of STMicroelectronics
|
||||
- [core] fixed api tests on windows [#16050](https://github.com/eclipse-theia/theia/pull/16050)
|
||||
- [core] fixed missing filters in save as dialog [#16247](https://github.com/eclipse-theia/theia/pull/16247) - Contributed on behalf of MVTec Software GmbH
|
||||
- [core] fixed react warning for duplicate createroot calls on singleton reactdialogs [#16306](https://github.com/eclipse-theia/theia/pull/16306)
|
||||
- [core] fixed test failures on Ubuntu with Node 22 [#16272](https://github.com/eclipse-theia/theia/pull/16272)
|
||||
- [core] fixed: correctly handle plugin-icons during menu creation and use tooltip [#16181](https://github.com/eclipse-theia/theia/pull/16181)
|
||||
- [core] localized property tooltips for `tasks.json` [#16300](https://github.com/eclipse-theia/theia/pull/16300)
|
||||
- [core] new contribution point to modify the shell layout data [#16242](https://github.com/eclipse-theia/theia/pull/16242)
|
||||
- [core] npm upgrade [#16264](https://github.com/eclipse-theia/theia/pull/16264)
|
||||
- [core] Passed correct "effectiveMenuPath" to menu actions [#16148](https://github.com/eclipse-theia/theia/pull/16148) - Contributed on behalf of STMicroelectronics
|
||||
- [core] ran npm upgrade [#15688](https://github.com/eclipse-theia/theia/pull/15688)
|
||||
- [core] replaced links in status bar items which provide markdown with safe commands [#16182](https://github.com/eclipse-theia/theia/pull/16182)
|
||||
- [core] restored extracted widget to main window [#15871](https://github.com/eclipse-theia/theia/pull/15871) - contributed on behalf of STMicroelectronics
|
||||
- [core] Reverted "Ensure context menu arguments are propagated to submenus" [#16139](https://github.com/eclipse-theia/theia/pull/16139)
|
||||
- [core] theia v1.64.0 released [#16100](https://github.com/eclipse-theia/theia/pull/16100)
|
||||
- [core] translation update for version 1.65.0 [#16329](https://github.com/eclipse-theia/theia/pull/16329)
|
||||
- [core] updated colors for editor gutter [#16096](https://github.com/eclipse-theia/theia/pull/16096)
|
||||
- [debug] added `evaluate in debug console` command [#16289](https://github.com/eclipse-theia/theia/pull/16289)
|
||||
- [debug] added `Run to Cursor` and `Run to Line` commands [#16219](https://github.com/eclipse-theia/theia/pull/16219)
|
||||
- [debug] don't accept/cancel breakpoint editor while its suggest widget is visible [#16285](https://github.com/eclipse-theia/theia/pull/16285)
|
||||
- [debug] Don't show inline stackframe pointer when line is empty [#16308](https://github.com/eclipse-theia/theia/pull/16308) - Contributed on behalf of MVTec Software GmbH
|
||||
- [debug] enhanced localization of the debug package [#16305](https://github.com/eclipse-theia/theia/pull/16305)
|
||||
- [debug] fixed breakpoints being lost when editing source [#16154](https://github.com/eclipse-theia/theia/pull/16154)
|
||||
- [debug] fixed enabling continue command if the debugger is active for pressing F5 [#14641](https://github.com/eclipse-theia/theia/pull/14641) - Contributed by MVTec Software GmbH
|
||||
- [debug] fixed line breakpoints not shifting if lines are inserted above [#16183](https://github.com/eclipse-theia/theia/pull/16183)
|
||||
- [debug] fixed text misalignment caused by inline breakpoint decoration [#16160](https://github.com/eclipse-theia/theia/pull/16160)
|
||||
- [debug] removed excessive spacing in breakpoint list [#16173](https://github.com/eclipse-theia/theia/pull/16173) - Contributed on behalf of STMicroelectronics
|
||||
- [debug] showed the error message when setting a variable fails [#16235](https://github.com/eclipse-theia/theia/pull/16235)
|
||||
- [debug] supported `copy value`/`copy as expression` in debug console [#16310](https://github.com/eclipse-theia/theia/pull/16310)
|
||||
- [editor] stored/restored navigation locations without warning [#16207](https://github.com/eclipse-theia/theia/pull/16207) - Contributed on behalf of STMicroelectronics
|
||||
- [ffmpeg] fixed ffmpeg cache write promise [#16297](https://github.com/eclipse-theia/theia/pull/16297)
|
||||
- [getting-started] added a link to usage data & telemetry info [#16184](https://github.com/eclipse-theia/theia/pull/16184)
|
||||
- [github] added sbom generation and upload workflow [#16290](https://github.com/eclipse-theia/theia/pull/16290)
|
||||
- [monaco] fixed two dots in save as dialog [#16299](https://github.com/eclipse-theia/theia/pull/16299)
|
||||
- [notebook] added support for vscode-notebook-cell uri's [#16276](https://github.com/eclipse-theia/theia/pull/16276)
|
||||
- [plugin] added argument processor for plugin toolbar command arguments [#16230](https://github.com/eclipse-theia/theia/pull/16230)
|
||||
- [plugin] new jupyter support and non chromium rendering fix [#16243](https://github.com/eclipse-theia/theia/pull/16243)
|
||||
- [plugin-ext] added automatic `${viewId}.open` command [#16239](https://github.com/eclipse-theia/theia/pull/16239)
|
||||
- [plugin-ext] correctly supported shadow dom when forwarding links from webviews [#16213](https://github.com/eclipse-theia/theia/pull/16213)
|
||||
- [plugin-ext] fixed error in previous PR [#16178](https://github.com/eclipse-theia/theia/pull/16178)
|
||||
- [plugin-ext] fixed leak in status bar registry that caused memory leaks on item updates [#16168](https://github.com/eclipse-theia/theia/pull/16168)
|
||||
- [plugin-ext] fixed missing new file entries from vscode extensions [#16241](https://github.com/eclipse-theia/theia/pull/16241) - Contributed on behalf of MVTec Software GmbH
|
||||
- [preferences] improved preferenceWidget state restoration on start and scope change [#16078](https://github.com/eclipse-theia/theia/pull/16078)
|
||||
- [scripts] updated translation workflow to include common dirs [#16328](https://github.com/eclipse-theia/theia/pull/16328)
|
||||
- [search-in-workspace] search in workspace / find in files functionality fixed in browser-only environment [#16231](https://github.com/eclipse-theia/theia/pull/16231)
|
||||
- [task] enhanced localization of the task package [#16286](https://github.com/eclipse-theia/theia/pull/16286)
|
||||
- [vscode] API evolution (public and proposed) to 1.104.0 [#16281](https://github.com/eclipse-theia/theia/pull/16281) - Contributed on behalf of STMicroelectronics
|
||||
|
||||
<a name="breaking_changes_1.65.0">[Breaking Changes:](#breaking_changes_1.65.0)</a>
|
||||
|
||||
- [ai-ide]`TaskContextFileStorageService.getStorageLocation` and `TaskContextFileStorageService.watchStorage` modified to run synchronously, with corresponding change of signature. [#16063](https://github.com/eclipse-theia/theia/pull/16063)
|
||||
- [core] Make Preferences available in the back end [#16017](https://github.com/eclipse-theia/theia/pull/16017) - Contributed on behalf of STMicroelectronics\
|
||||
This PR allows to user default and user preferences in the back-end process. See [Migration.md](./doc/Migration.md) for breaking API changes
|
||||
- [workspace] `WorkspaceService.reloadWindow` now requires the workspace path string parameter [#16238](https://github.com/eclipse-theia/theia/pull/16238)
|
||||
- [filesystem] browser-only: fixed Safari compatibility issues, refactored implementation to use OPFS API with web workers, implemented file watching, folder copying, file/folder download and upload capabilities with streaming support. `OPFSFileSystemProvider` rewritten, `OPFSInitialization.getRootDirectory()` signature changed. `FileUploadService`/`FileDownloadService` moved/renamed. See [Migration.md](./doc/Migration.md) for migration steps. [#16187](https://github.com/eclipse-theia/theia/pull/16187)
|
||||
|
||||
## 1.64.0 - 7/31/2025
|
||||
|
||||
- [ai-chat] adapted the default of the summary agent to gtp-4o [#16042](https://github.com/eclipse-theia/theia/pull/16042)
|
||||
- [ai-chat] added session cleanup to `AgentDelegationTool` [#15996](https://github.com/eclipse-theia/theia/pull/15996)
|
||||
- [ai-chat] correctly handled stream responses [#15942](https://github.com/eclipse-theia/theia/pull/15942)
|
||||
- [ai-chat] preserved delegation content [#16066](https://github.com/eclipse-theia/theia/pull/16066)
|
||||
- [ai-chat] reduced formatter selection prompts for changeset elements [#16094](https://github.com/eclipse-theia/theia/pull/16094)
|
||||
- [ai-chat-ui] fixed cancel on escape in chat input [#16068](https://github.com/eclipse-theia/theia/pull/16068)
|
||||
- [ai-chat-ui] improved chatUI auto-scroll / scroll-lock consistency [#15936](https://github.com/eclipse-theia/theia/pull/15936)
|
||||
- [ai-chat-ui] improved delegated content part styling [#15956](https://github.com/eclipse-theia/theia/pull/15956)
|
||||
- [ai-chat-ui] renamed 'pin agent' to 'agent' to avoid confusion [#16072](https://github.com/eclipse-theia/theia/pull/16072)
|
||||
- [ai-core] added AI model aliases and default models [#15782](https://github.com/eclipse-theia/theia/pull/15782)
|
||||
- [ai-core] displayed warning when selected variant does not exist [#15974](https://github.com/eclipse-theia/theia/pull/15974)
|
||||
- [ai-core] fixed startup crash when 'ai-chat' was not included [#15902](https://github.com/eclipse-theia/theia/pull/15902)
|
||||
- [ai-ide] added functions for launch configuration [#15941](https://github.com/eclipse-theia/theia/pull/15941)
|
||||
- [ai-ide] introduced puppeteer to manage the browser instance [#15734](https://github.com/eclipse-theia/theia/pull/15734)
|
||||
- [ai-ide] put new prompt templates under MIT [#16051](https://github.com/eclipse-theia/theia/pull/16051)
|
||||
- [ai-ide] promoted AI IDE features to beta [#16058](https://github.com/eclipse-theia/theia/pull/16058)
|
||||
- [ai-ide] refined architect task context creation prompt [#16059](https://github.com/eclipse-theia/theia/pull/16059)
|
||||
- [ai-ide] showed selected prompted variant if configured, showed default otherwise [#15907](https://github.com/eclipse-theia/theia/pull/15907)
|
||||
- [ai-ide] updated toolProvider to handle cancellation [#15951](https://github.com/eclipse-theia/theia/pull/15951)
|
||||
- [ai-ide] used the agent name that requested the tool call in the change set title [#15952](https://github.com/eclipse-theia/theia/pull/15952) - Contributed on behalf of Lonti.com Pty Lt
|
||||
- [ai-ollama] fixed crash in ollama language model [#16091](https://github.com/eclipse-theia/theia/pull/16091)
|
||||
- [ai-ollama] used available parameter information from the provided tool description [#15575](https://github.com/eclipse-theia/theia/pull/15575)
|
||||
- [application-package] bumped vscode API compatibility to 1.102.3 [#16081](https://github.com/eclipse-theia/theia/pull/16081) - Contributed on behalf of STMicroelectronics
|
||||
- [core] bumped cookie to 1.0.2 [#16041](https://github.com/eclipse-theia/theia/pull/16041) - contributed by STMicroelectronics
|
||||
- [core] bumped nyc to 17.1.0 [#15989](https://github.com/eclipse-theia/theia/pull/15989) - contributed by STMicroelectronics
|
||||
- [core] correctly detached from DOM in DynamicMenuWidget [#16019](https://github.com/eclipse-theia/theia/pull/16019)
|
||||
- [core] enabled clicks inside interactive hover tooltips and opened tooltip on status-bar click [#15971](https://github.com/eclipse-theia/theia/pull/15971)
|
||||
- [core] ensured double click on tab maximizes area [#16079](https://github.com/eclipse-theia/theia/pull/16079)
|
||||
- [core] fix cannot drop explorer view files on AI chat input on Windows [#15979](https://github.com/eclipse-theia/theia/pull/15979) - contributed on behalf of Lonti.com Pty Ltd.
|
||||
- [core] fix: dynamicMenuWidget memory leak [#15982](https://github.com/eclipse-theia/theia/pull/15982) - contributed by Hbb
|
||||
- [core] fixed default locale issue [#16093](https://github.com/eclipse-theia/theia/pull/16093)
|
||||
- [core] fixed memory leak in RenderedToolbarItemImpl [#15949](https://github.com/eclipse-theia/theia/pull/15949) - contributed on behalf of Lonti.com Pty Ltd
|
||||
- [core] fixed stale tree selection [#15928](https://github.com/eclipse-theia/theia/pull/15928)
|
||||
- [core] fixed typeError in updateAutoSaveMode [#15991](https://github.com/eclipse-theia/theia/pull/15991)
|
||||
- [core] reenabled deprecated paste command in electron [#15918](https://github.com/eclipse-theia/theia/pull/15918) - contributed on behalf of STMicroelectronics
|
||||
- [core] setting service gracefully handled ENOENT [#15803](https://github.com/eclipse-theia/theia/pull/15803)
|
||||
- [core] translation update for version 1.64.0 [#16099](https://github.com/eclipse-theia/theia/pull/16099)
|
||||
- [core] ui fixes (squashed) [#15953](https://github.com/eclipse-theia/theia/pull/15953)
|
||||
- [doc] updated publishing guide documentation [#15939](https://github.com/eclipse-theia/theia/pull/15939)
|
||||
- [editor] removed now unneeded EditorManager override [#15934](https://github.com/eclipse-theia/theia/pull/15934)
|
||||
- [electron] updated to Electron 37.2.1 [#15999](https://github.com/eclipse-theia/theia/pull/15999)
|
||||
- [monaco] ide cannot fully restore to the previous state after restarting [#15898](https://github.com/eclipse-theia/theia/pull/15898)
|
||||
- [navigator] removed double-click handler that caused folders to auto-open [#15869](https://github.com/eclipse-theia/theia/pull/15869)
|
||||
- [notebook] fixed usage of lodash debounce [#16045](https://github.com/eclipse-theia/theia/pull/16045)
|
||||
- [playwright] exported terminal, monaco and welcome-view playwright utilities [#16013](https://github.com/eclipse-theia/theia/pull/16013)
|
||||
- [playwright] made expectation independent from execution order [#16047](https://github.com/eclipse-theia/theia/pull/16047)
|
||||
- [plugin-ext] implemented support for remote MCP server [#16002](https://github.com/eclipse-theia/theia/pull/16002)
|
||||
- [remote] improved type safety of remote ssh config [#15671](https://github.com/eclipse-theia/theia/pull/15671)
|
||||
- [remote] used environment variable instead of wmic to get remote architecture [#16004](https://github.com/eclipse-theia/theia/pull/16004)
|
||||
- [remote] used node 22 for remote containers [#15937](https://github.com/eclipse-theia/theia/pull/15937)
|
||||
- [scm] added the 3-way merge editor [#15701](https://github.com/eclipse-theia/theia/pull/15701)
|
||||
- [scm] fixed minor issues with scroll sync [#16038](https://github.com/eclipse-theia/theia/pull/16038)
|
||||
- [scm] set relative sizes for horizontal split panel [#16036](https://github.com/eclipse-theia/theia/pull/16036)
|
||||
- [toolbar] fixed styling of main toolbar items so enabled items have a pointer cursor [#15948](https://github.com/eclipse-theia/theia/pull/15948) - contributed on behalf of Lonti.com Pty Ltd
|
||||
- [vsx-registry] disabled extension recommendations [#15830](https://github.com/eclipse-theia/theia/pull/15830)
|
||||
- [vsx-registry] restored location for the clear all actions in vsx extension view [#15923](https://github.com/eclipse-theia/theia/pull/15923) - contributed on behalf of STMicroelectronics
|
||||
- [workflows] published next version once a week [#15965](https://github.com/eclipse-theia/theia/pull/15965)
|
||||
|
||||
<a name="breaking_changes_1.64.0">[Breaking Changes:](#breaking_changes_1.64.0)</a>
|
||||
|
||||
- [ai-core] extracts UI from `@theia/ai-core` and `@theia/ai-mcp` to `@theia/ai-core-ui` and `@theia/ai-mcp-ui` [#16075](https://github.com/eclipse-theia/theia/pull/16075).\
|
||||
Include these new packages to restore the old behavior. Also moves the AI Enable preference to `@theia/ai-ide` and enables the AI features by default if `@theia/ai-ide` is not included.
|
||||
|
||||
## 1.63 - 6/26/2025
|
||||
|
||||
- [ai-anthropic] implemented prompt caching for Anthropic [#15731](https://github.com/eclipse-theia/theia/pull/15731)
|
||||
- [ai-anthropic] removed tool results from subsequential requests [#15702](https://github.com/eclipse-theia/theia/pull/15702)
|
||||
- [ai-anthropic] reverted "fix: remove tool results from subsequential requests" [#15721](https://github.com/eclipse-theia/theia/pull/15721)
|
||||
- [ai-anthropic] set opus 4 to 32000 max tokens [#15788](https://github.com/eclipse-theia/theia/pull/15788)
|
||||
- [ai-chat] adapted all prompt ids to common schema [#15880](https://github.com/eclipse-theia/theia/pull/15880)
|
||||
- [ai-chat] added async initialization to changesetfileelement [#15761](https://github.com/eclipse-theia/theia/pull/15761)
|
||||
- [ai-chat] enabled agent-to-agent delegation via tool calls [#15736](https://github.com/eclipse-theia/theia/pull/15736)
|
||||
- [ai-chat] filtered out error messages from the messages sent to the llm [#15720](https://github.com/eclipse-theia/theia/pull/15720)
|
||||
- [ai-chat] fixed change set deletion [#15759](https://github.com/eclipse-theia/theia/pull/15759)
|
||||
- [ai-chat] fixed pinning of the last mentioned agent rather than the first one [#15777](https://github.com/eclipse-theia/theia/pull/15777)
|
||||
- [ai-chat] introduced tool call confirmation UI [#15714](https://github.com/eclipse-theia/theia/pull/15714)
|
||||
- [ai-chat] removed requirement that agent has to be mentioned first [#15854](https://github.com/eclipse-theia/theia/pull/15854)
|
||||
- [ai-chat] sanitized task context labels [#15762](https://github.com/eclipse-theia/theia/pull/15762)
|
||||
- [ai-chat] provided a task context management / agent [#15732](https://github.com/eclipse-theia/theia/pull/15732)
|
||||
- [ai-chat-ui] added chat retry button [#15779](https://github.com/eclipse-theia/theia/pull/15779)
|
||||
- [ai-chat-ui] fixed chat input widget not tracking branches and pending state [#15727](https://github.com/eclipse-theia/theia/pull/15727)
|
||||
- [ai-chat-ui] fixed difficulty to scroll up when auto scroll is enabled [#15748](https://github.com/eclipse-theia/theia/pull/15748)
|
||||
- [ai-chat-ui] fixed paste handling in chat input [#15766](https://github.com/eclipse-theia/theia/pull/15766)
|
||||
- [ai-chat-ui] fixed temporary scroll lock when user scrolls up in AI Chat [#15683](https://github.com/eclipse-theia/theia/pull/15683)
|
||||
- [ai-chat-ui] fixed toolcall spinner [#15757](https://github.com/eclipse-theia/theia/pull/15757)
|
||||
- [ai-chat-ui] showed active chat in chat dropdown [#15723](https://github.com/eclipse-theia/theia/pull/15723)
|
||||
- [ai-chat-ui] started chat from task context [#15700](https://github.com/eclipse-theia/theia/pull/15700)
|
||||
- [ai-chat-ui] supported instant request for chat initialized with task context and agent [#15778](https://github.com/eclipse-theia/theia/pull/15778)
|
||||
- [ai-chat-ui] replaced YOLO terminology with "Always Allow" [#15756](https://github.com/eclipse-theia/theia/pull/15756)
|
||||
- [ai-code-completion] added support for custom AI variables in code completion prompt [#15681](https://github.com/eclipse-theia/theia/pull/15681) - Contributed on behalf of Lonti.com Pty Ltd.
|
||||
- [ai-code-completion] fixed caching in code completion [#15855](https://github.com/eclipse-theia/theia/pull/15855)
|
||||
- [ai-code-completion] worked on improving code completion [#15715](https://github.com/eclipse-theia/theia/pull/15715)
|
||||
- [ai-core] added chat variable for all open editors [#15775](https://github.com/eclipse-theia/theia/pull/15775)
|
||||
- [ai-core] added fall back to default prompts if selected does not exist [#15879](https://github.com/eclipse-theia/theia/pull/15879)
|
||||
- [ai-core] AI features accessible when AI is not enabled [#15780](https://github.com/eclipse-theia/theia/pull/15780)
|
||||
- [ai-core] allowed to increase the number of retries before failing [#15730](https://github.com/eclipse-theia/theia/pull/15730)
|
||||
- [ai-core] allowed adding variants via files [#15815](https://github.com/eclipse-theia/theia/pull/15815)
|
||||
- [ai-core] fixed bug that customizations are treated as variants [#15846](https://github.com/eclipse-theia/theia/pull/15846)
|
||||
- [ai-core] handled toolCall errors gracefully instead of throwing [#15800](https://github.com/eclipse-theia/theia/pull/15800)
|
||||
- [ai-core] implemented theia-ai agent completion notification [#15816](https://github.com/eclipse-theia/theia/pull/15816)
|
||||
- [ai-core] improved image support for tool calls [#15765](https://github.com/eclipse-theia/theia/pull/15765)
|
||||
- [ai-core] fixed prompt fragment view resetting custom prompt fragments [#15852](https://github.com/eclipse-theia/theia/pull/15852)
|
||||
- [ai-editor] improved ask AI feature [#15725](https://github.com/eclipse-theia/theia/pull/15725)
|
||||
- [ai-editor] refined inline Ask AI chat input appearance [#15885](https://github.com/eclipse-theia/theia/pull/15885)
|
||||
- [ai-editor] started chat from editor context [#15712](https://github.com/eclipse-theia/theia/pull/15712)
|
||||
- [ai-editor] used chatInputWidget in AskAI Input and fixed keyboard scrolling [#15781](https://github.com/eclipse-theia/theia/pull/15781)
|
||||
- [ai-editor] streamlined ask AI commands and fixed send to AI chat error [#15839](https://github.com/eclipse-theia/theia/pull/15839)
|
||||
- [ai-google] updated the Google AI SDK [#15737](https://github.com/eclipse-theia/theia/pull/15737)
|
||||
- [ai-ide] added ai tools for write through file changes [#15717](https://github.com/eclipse-theia/theia/pull/15717)
|
||||
- [ai-ide] consolidated coder prompts [#15733](https://github.com/eclipse-theia/theia/pull/15733)
|
||||
- [ai-ide] fixed agent tree selection highlighting in AI configuration widget [#15850](https://github.com/eclipse-theia/theia/pull/15850)
|
||||
- [ai-ide] fixed AI Configuration widget tab bar overflow [#15739](https://github.com/eclipse-theia/theia/pull/15739)
|
||||
- [ai-ide] included the ai-ide stylesheet in the secondary window [#15752](https://github.com/eclipse-theia/theia/pull/15752)
|
||||
- [ai-ide] introduced appTester agent via browser automation [#15713](https://github.com/eclipse-theia/theia/pull/15713)
|
||||
- [ai-ide] made workspace functions token efficient [#15703](https://github.com/eclipse-theia/theia/pull/15703)
|
||||
- [ai-ide] made workspace search function more efficient / use less tokens [#15743](https://github.com/eclipse-theia/theia/pull/15743)
|
||||
- [ai-ide] moved AI configuration view to main [#15726](https://github.com/eclipse-theia/theia/pull/15726)
|
||||
- [ai-ide] refined coder prompt [#15774](https://github.com/eclipse-theia/theia/pull/15774)
|
||||
- [ai-ide] reminded coder to use file change functions [#15848](https://github.com/eclipse-theia/theia/pull/15848)
|
||||
- [ai-ide] reorganized architect prompts [#15859](https://github.com/eclipse-theia/theia/pull/15859)
|
||||
- [ai-ide] used relative path in search results in workspace function [#15704](https://github.com/eclipse-theia/theia/pull/15704)
|
||||
- [ai-ide] workspace search function allowed specifying file extensions [#15699](https://github.com/eclipse-theia/theia/pull/15699)
|
||||
- [ai-ollama] updated ollama version and supported newest features [#15795](https://github.com/eclipse-theia/theia/pull/15795)
|
||||
- [ai-openai] made sure to add openai stream options only in streaming models [#15706](https://github.com/eclipse-theia/theia/pull/15706)
|
||||
- [ai-openai] supported more than 10 tool calls via OpenAI SDK [#15696](https://github.com/eclipse-theia/theia/pull/15696)
|
||||
- [application-package] bumped vscode API compatibility to 1.101.1 [#15888](https://github.com/eclipse-theia/theia/pull/15888) - contributed on behalf of STMicroelectronics
|
||||
- [core] cancelled hover preview on right mouse click [#15826](https://github.com/eclipse-theia/theia/pull/15826)
|
||||
- [core] didn't focus window to reveal widget [#15760](https://github.com/eclipse-theia/theia/pull/15760)
|
||||
- [core] didn't steal global focus for widget activation [#15735](https://github.com/eclipse-theia/theia/pull/15735)
|
||||
- [core] fixed getMenuNode() for leaf nodes [#15845](https://github.com/eclipse-theia/theia/pull/15845) - contributed on behalf of STMicroelectronics
|
||||
- [core] fixed initial configuration of backend loggers [#15705](https://github.com/eclipse-theia/theia/pull/15705)
|
||||
- [core] fixed problems with menu item 15828_menu_visibility [#15856](https://github.com/eclipse-theia/theia/pull/15856) - Contributed on behalf of STMicroelectronics
|
||||
- [core] fixed revealTab [#15754](https://github.com/eclipse-theia/theia/pull/15754)
|
||||
- [core] listened for model will save events directly instead of registering a save participant [#15787](https://github.com/eclipse-theia/theia/pull/15787) - contributed on behalf of STMicroelectronics
|
||||
- [core] removed obsolete menu workaround [#15753](https://github.com/eclipse-theia/theia/pull/15753) - Contributed on behalf of STMicroelectronics
|
||||
- [core] returned undefined instead of throwing when getting non-existent menu [#15792](https://github.com/eclipse-theia/theia/pull/15792) - Contributed on behalf of STMicroelectronics
|
||||
- [core] sync selection if props change [#15784](https://github.com/eclipse-theia/theia/pull/15784)
|
||||
- [core] theia 1.62.0 released [#15679](https://github.com/eclipse-theia/theia/pull/15679)
|
||||
- [core] translation update for version 1.63.0 [#15892](https://github.com/eclipse-theia/theia/pull/15892)
|
||||
- [core] updated electron to version 36.4.0 [#15837](https://github.com/eclipse-theia/theia/pull/15837) - contributed on behalf of STMicroelectronics
|
||||
- [core] Updated translations for version 1.62.0 [#15678](https://github.com/eclipse-theia/theia/pull/15678)
|
||||
- [core] used Ctrl+Tab for tab switching on Mac [#15763](https://github.com/eclipse-theia/theia/pull/15763)
|
||||
- [debug] enabled multiSelect for the debugBreakpointsWidget [#15749](https://github.com/eclipse-theia/theia/pull/15749)
|
||||
- [doc] added (major) dependency update to publishing [#15674](https://github.com/eclipse-theia/theia/pull/15674)
|
||||
- [editor] added missing NLS template item for format on save [#15813](https://github.com/eclipse-theia/theia/pull/15813)
|
||||
- [electron-browser] fixed localization of files [#15677](https://github.com/eclipse-theia/theia/pull/15677)
|
||||
- [filesystem] bumped multer version to 2.0.1 [#15808](https://github.com/eclipse-theia/theia/pull/15808) - contributed on behalf of STMicroelectronics
|
||||
- [filesystem] bumped multer version to 2.0.1 [#15806](https://github.com/eclipse-theia/theia/pull/15806) - Contributed on behalf of STMicroelectronics
|
||||
- [filesystem] bumped tar-fs to 3.0.9 on 1.61.1 [#15805](https://github.com/eclipse-theia/theia/pull/15805)
|
||||
- [filesystem] deps: bumped tar-fs to 3.0.9 [#15719](https://github.com/eclipse-theia/theia/pull/15719) - contributed by STMicroelectronics
|
||||
- [general] updated project info with styling information [#15722](https://github.com/eclipse-theia/theia/pull/15722)
|
||||
- [monaco] enacted code actions when change set file was created [#15724](https://github.com/eclipse-theia/theia/pull/15724)
|
||||
- [monaco] fixed existence check when contributing monaco menu items [#15746](https://github.com/eclipse-theia/theia/pull/15746) - Contributed on behalf of STMicroelectronics
|
||||
- [playwright] avoided playwright tests depending on cwd [#15676](https://github.com/eclipse-theia/theia/pull/15676) - Contributed by MVTec Software GmbH
|
||||
- [playwright] fixed playwright tests on windows [#15684](https://github.com/eclipse-theia/theia/pull/15684) - Contributed by MVTec Software GmbH
|
||||
- [plugin] added support for the new vscode.lm.registerMcpServerDefinitionProvider API [#15755](https://github.com/eclipse-theia/theia/pull/15755)
|
||||
- [plugin] supported encoding/decoding from workspace and while opening text documents [#15873](https://github.com/eclipse-theia/theia/pull/15873) - Contributed on behalf of STMicroelectronics
|
||||
- [project-info] added widgets, commands and toolbar to project info [#15697](https://github.com/eclipse-theia/theia/pull/15697)
|
||||
- [scm] amended enablement/visibility checks for dirty diff widget toolbar actions [#15851](https://github.com/eclipse-theia/theia/pull/15851)
|
||||
- [search-in-workspace] fixed bug with incorrect height calculation of the search field [#15881](https://github.com/eclipse-theia/theia/pull/15881)
|
||||
- [toolbar] restored toolbar default items [#15878](https://github.com/eclipse-theia/theia/pull/15878)
|
||||
|
||||
## 1.62.0 - 5/28/2025
|
||||
|
||||
- [ai-anthropic] added Claude 4 models [#15640](https://github.com/eclipse-theia/theia/pull/15640)
|
||||
- [ai-chat] added logic to handle empty text response correctly [#15638](https://github.com/eclipse-theia/theia/pull/15638)
|
||||
- [ai-chat] overloaded ChatToolRequest.handler [#15655](https://github.com/eclipse-theia/theia/pull/15655)
|
||||
- [ai-chat-ui] added logic to hide suggestions from chat input for message editing [#15617](https://github.com/eclipse-theia/theia/pull/15617)
|
||||
- [ai-chat-ui] fixed chat input field to show a vertical scroll bar if content overflows [#15654](https://github.com/eclipse-theia/theia/pull/15654)
|
||||
- [ai-code-completion] introduced debounce for inline AI code completion [#15619](https://github.com/eclipse-theia/theia/pull/15619)
|
||||
- [ai-core] added check for a valid LanguageModelStreamResponsePart [#15653](https://github.com/eclipse-theia/theia/pull/15653)
|
||||
- [ai-core] added default context resolution for custom agents [#15571](https://github.com/eclipse-theia/theia/pull/15571)
|
||||
- [ai-core] added new generic AI communication model [#15409](https://github.com/eclipse-theia/theia/pull/15409) - Contributed on behalf of STMicroelectronics
|
||||
- [ai-ide] added initial prompt for coder agent mode [#15569](https://github.com/eclipse-theia/theia/pull/15569)
|
||||
- [ai-ide] added logic to open AI configuration view at bottom [#15637](https://github.com/eclipse-theia/theia/pull/15637)
|
||||
- [ai-ide] added next prompt for architect [#15649](https://github.com/eclipse-theia/theia/pull/15649)
|
||||
- [ai-ide] cleaned up next coder prompt [#15634](https://github.com/eclipse-theia/theia/pull/15634)
|
||||
- [ai-ide] clarified resolution of context files for coder an architect [#15579](https://github.com/eclipse-theia/theia/pull/15579)
|
||||
- [ai-ide] fixed a repetition in the coder prompt [#15650](https://github.com/eclipse-theia/theia/pull/15650)
|
||||
- [ai-ide] improved file change set functions [#15642](https://github.com/eclipse-theia/theia/pull/15642)
|
||||
- [ai-openai] added stream_options/include_usage only for openai models [#15615](https://github.com/eclipse-theia/theia/pull/15615)
|
||||
- [ai-vercel-ai] clarified API key description for Vercel AI keys [#15665](https://github.com/eclipse-theia/theia/pull/15665)
|
||||
- [ai-vercel-ai] introduced experimental generic LLM provider via Vercel AI [#15482](https://github.com/eclipse-theia/theia/pull/15482)
|
||||
- [collaboration] updated OCT integration to v0.3 [#15633](https://github.com/eclipse-theia/theia/pull/15633)
|
||||
- [core] added logic to close secondary windows on reload [#15591](https://github.com/eclipse-theia/theia/pull/15591) - Contributed on behalf of STMicroelectronics
|
||||
- [core] added logic to render groups correctly in "more" tab bar menu [#15647](https://github.com/eclipse-theia/theia/pull/15647) - Contributed on behalf of STMicroelectronics
|
||||
- [core] added logic to update tree upon becoming visible [#15595](https://github.com/eclipse-theia/theia/pull/15595) - Contributed on behalf of STMicroelectronics
|
||||
- [core] added logic to use pointer capture for split handle dragging [#15643](https://github.com/eclipse-theia/theia/pull/15643) - Contributed on behalf of STMicroelectronics
|
||||
- [core] added logic to use same autosave heuristic when closing widget [#15502](https://github.com/eclipse-theia/theia/pull/15502)
|
||||
- [core] bumped dompurify to 3.2.4 [#15564](https://github.com/eclipse-theia/theia/pull/15564) - Contributed by STMicroelectronics
|
||||
- [core] cleaned up handling of "toggle maximized" [#15547](https://github.com/eclipse-theia/theia/pull/15547) - Contributed on behalf of STMicroelectronics
|
||||
- [core] improved handling of logging with proxies [#15478](https://github.com/eclipse-theia/theia/pull/15478)
|
||||
- [core] made hover-service use platform showPopover() [#15452](https://github.com/eclipse-theia/theia/pull/15452)
|
||||
- [debug] added logic to subscribe to decoration changes at initialization [#15573](https://github.com/eclipse-theia/theia/pull/15573) - Contributed by MVTec Software GmbH
|
||||
- [debug] allowed to see editor hovers while debugging [#15609](https://github.com/eclipse-theia/theia/pull/15609) - Contributed by MVTec Software GmbH
|
||||
- [dev-packages] fixed ssh terminals [#15443](https://github.com/eclipse-theia/theia/pull/15443)
|
||||
- [editor] added logic to respect editor associations when opening diff-editors [#15422](https://github.com/eclipse-theia/theia/pull/15422)
|
||||
- [editor] fixed "Show all opened editors" dropdown display by using correct icon class type [#15624](https://github.com/eclipse-theia/theia/pull/15624)
|
||||
- [filesystem] bumped multer to 2.0.0 [#15614](https://github.com/eclipse-theia/theia/pull/15614) - Contributed by STMicroelectronics
|
||||
- [filesystem] bumped tar-fs to 3.0.8 [#15562](https://github.com/eclipse-theia/theia/pull/15562) - Contributed by STMicroelectronics
|
||||
- [notebook] made monaco commands available through command palette for notebook cells [#15538](https://github.com/eclipse-theia/theia/pull/15538)
|
||||
- [playwright] improved playwright tests reliability [#15446](https://github.com/eclipse-theia/theia/pull/15446)
|
||||
- [remote-wsl] added WSL remote support [#15543](https://github.com/eclipse-theia/theia/pull/15543)
|
||||
- [vscode] bumped vscode API compatibility to 1.99.3 [#15658](https://github.com/eclipse-theia/theia/pull/15658)
|
||||
- [vscode] added support for CommentAuthorInformation in CommentThread canreply [#15598](https://github.com/eclipse-theia/theia/pull/15598) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] added support for TerminalState shell property [#15514](https://github.com/eclipse-theia/theia/pull/15514) - Contributed on behalf of STMicroelectronics
|
||||
|
||||
<a name="breaking_changes_1.62.0">[Breaking Changes:](#breaking_changes_1.62.0)</a>
|
||||
|
||||
- [core] refactored menu nodes [#14676](https://github.com/eclipse-theia/theia/pull/14676) - Contributed on behalf of STMicroelectronics
|
||||
- [ai-core] refactored prompt management and the agent registration interface [#15632](https://github.com/eclipse-theia/theia/pull/15632)\
|
||||
Check the PR for more information.
|
||||
- [ai-history] updated logic to use communication model in AI history [#15540](https://github.com/eclipse-theia/theia/pull/15540) - Contributed by STMicroelectronics\
|
||||
This refactoring removes the communication recording service. Manual recording is no longer needed. When using the `LanguageModelService`, LLM interactions are automatically recorded into a communication model, which can be inspected in the history view.
|
||||
- [monaco] implemented "code actions on save" [#15555](https://github.com/eclipse-theia/theia/pull/15555) - Contributed on behalf of STMicroelectronics\
|
||||
Replaced `MonacoEditorModel.onWillSave` "wait until event" event with `registerWillSaveModelListener` for simpler semantics. Also removed the `EditorModelService.onWillSave`
|
||||
as it's pure convenience and unused in framework code.
|
||||
|
||||
## 1.61.0 - 4/29/2025
|
||||
|
||||
- [ai-anthropic] fix: do not set anthropic tool choice without tools [#15329](https://github.com/eclipse-theia/theia/pull/15329)
|
||||
- [ai-chat] correctly returned tool input when creating the message [#15451](https://github.com/eclipse-theia/theia/pull/15451)
|
||||
- [ai-chat] enhanced streaming content parsing for incomplete response content matches [#15387](https://github.com/eclipse-theia/theia/pull/15387)
|
||||
- [ai-chat] added agent prompt suggestions & chat summary [#15427](https://github.com/eclipse-theia/theia/pull/15427)
|
||||
- [ai-chat] added customizable welcome message [#15316](https://github.com/eclipse-theia/theia/pull/15316)
|
||||
- [ai-chat] collapsed label from right & no printed [#15344](https://github.com/eclipse-theia/theia/pull/15344)
|
||||
- [ai-chat] fixed context menu paste [#15222](https://github.com/eclipse-theia/theia/pull/15222)
|
||||
- [ai-chat] fixed space issue after variables and agent label in chat view [#15491](https://github.com/eclipse-theia/theia/pull/15491)
|
||||
- [ai-chat] improved style of code blocks in modern theme [#15351](https://github.com/eclipse-theia/theia/pull/15351)
|
||||
- [ai-chat] introduced editable chat requests [#15479](https://github.com/eclipse-theia/theia/pull/15479)
|
||||
- [ai-chat] made private functions and injections protected in chatviewtreewidget to make them overridable [#15297](https://github.com/eclipse-theia/theia/pull/15297) - Contributed by MVTec Software GmbH
|
||||
- [ai-chat] removed outline in the chat session settings editor [#15356](https://github.com/eclipse-theia/theia/pull/15356)
|
||||
- [ai-chat] consolidated widget labels [#15304](https://github.com/eclipse-theia/theia/pull/15304)
|
||||
- [ai-chat] fixed communication recording in orchestrator [#15328](https://github.com/eclipse-theia/theia/pull/15328)
|
||||
- [ai-code-completion] fixed typo in code completion prompt [#15383](https://github.com/eclipse-theia/theia/pull/15383)
|
||||
- [ai-code-completion] provided range to completion item to allow for correct inline display [#15398](https://github.com/eclipse-theia/theia/pull/15398)
|
||||
- [ai-code-completion] turned automatic inline code completion off by default [#15333](https://github.com/eclipse-theia/theia/pull/15333)
|
||||
- [ai-core] added shortcut for adding the current file to the ai chat context [#15252](https://github.com/eclipse-theia/theia/pull/15252)
|
||||
- [ai-core] fixed response content in language model utility [#15377](https://github.com/eclipse-theia/theia/pull/15377)
|
||||
- [ai-core] made parameters in ToolRequest mandatory [#15288](https://github.com/eclipse-theia/theia/pull/15288)
|
||||
- [ai-core] resolved unresolved variables to empty string [#15463](https://github.com/eclipse-theia/theia/pull/15463)
|
||||
- [ai-core] white label prompt templates [#15322](https://github.com/eclipse-theia/theia/pull/15322) - Contributed by MVTec Software GmbH
|
||||
- [ai-core] added initial support for tracking token usage [#15378](https://github.com/eclipse-theia/theia/pull/15378)
|
||||
- [ai-core] allowed project specific prompt additions [#15236](https://github.com/eclipse-theia/theia/pull/15236)
|
||||
- [ai-core] allowed workspace specific custom agents [#15457](https://github.com/eclipse-theia/theia/pull/15457)
|
||||
- [ai-core] ensured all tool providers bound to self [#15330](https://github.com/eclipse-theia/theia/pull/15330)
|
||||
- [ai-google] added gemini flash 2.5 to default models [#15487](https://github.com/eclipse-theia/theia/pull/15487)
|
||||
- [ai-google] added native gemini provider [#15334](https://github.com/eclipse-theia/theia/pull/15334)
|
||||
- [ai-history] more legible history entries [#15483](https://github.com/eclipse-theia/theia/pull/15483)
|
||||
- [ai-ide] added a new tool which allows to list and run tasks [#15504](https://github.com/eclipse-theia/theia/pull/15504)
|
||||
- [ai-ide] added a suggestion to architect to summarize the current session and continue with coder [#15512](https://github.com/eclipse-theia/theia/pull/15512)
|
||||
- [ai-ide] added project info prompt fragment [#15449](https://github.com/eclipse-theia/theia/pull/15449)
|
||||
- [ai-ide] clarified replace function description [#15442](https://github.com/eclipse-theia/theia/pull/15442)
|
||||
- [ai-ide] fixed getFileDiagnostics waits forever [#15305](https://github.com/eclipse-theia/theia/pull/15305)
|
||||
- [ai-ide] minor improvements mcp view [#15364](https://github.com/eclipse-theia/theia/pull/15364)
|
||||
- [ai-ide] modified link in AI chat instructions to show AI settings directly [#15326](https://github.com/eclipse-theia/theia/pull/15326)
|
||||
- [ai-ide] refined ai setting descriptions [#15250](https://github.com/eclipse-theia/theia/pull/15250)
|
||||
- [ai-ide] refined coder prompt [#15358](https://github.com/eclipse-theia/theia/pull/15358)
|
||||
- [ai-ide] used camelCase in React SVG [#15367](https://github.com/eclipse-theia/theia/pull/15367)
|
||||
- [ai-ide, ai-mcp] added MCP Server config view to AI Configuration [#15280](https://github.com/eclipse-theia/theia/pull/15280)
|
||||
- [ai-mcp] allowed to add all MCP functions via prompt fragment [#15270](https://github.com/eclipse-theia/theia/pull/15270)
|
||||
- [ai-ollama] fixed Ollama regression in Theia 1.60 [#15476](https://github.com/eclipse-theia/theia/pull/15476)
|
||||
- [ai-openai] added gpt-4.1 models to the list of default models [#15465](https://github.com/eclipse-theia/theia/pull/15465)
|
||||
- [ai-scanoss] fixed scanoss button/icon in chat ui [#15339](https://github.com/eclipse-theia/theia/pull/15339)
|
||||
- [api-samples] used `ElectronConnectionHandler` to connect updater services [#15430](https://github.com/eclipse-theia/theia/pull/15430)
|
||||
- [application-package] bumped VS Code API version to 1.98.2 [#15341](https://github.com/eclipse-theia/theia/pull/15341) - Contributed on behalf of STMicroelectronics
|
||||
- [console] added missing `editor` dependency to `console` [#15354](https://github.com/eclipse-theia/theia/pull/15354)
|
||||
- [console] waited for async creation of debug console widget [#15388](https://github.com/eclipse-theia/theia/pull/15388) - Contributed on behalf of STMicroelectronics
|
||||
- [core] clarified error for multiple occurrences during replace [#15481](https://github.com/eclipse-theia/theia/pull/15481)
|
||||
- [core] did not re-export the configuration folder as env variable [#15376](https://github.com/eclipse-theia/theia/pull/15376)
|
||||
- [core] fixed resolve from root [#15331](https://github.com/eclipse-theia/theia/pull/15331)
|
||||
- [core] fixed switching the localization language back to the default [#15445](https://github.com/eclipse-theia/theia/pull/15445)
|
||||
- [core] hid overflow in view container headers [#15321](https://github.com/eclipse-theia/theia/pull/15321) - contributed on behalf of STMicroelectronics
|
||||
- [core] hide overflow on sidebar-toolbar [#15492](https://github.com/eclipse-theia/theia/pull/15492) - contributed on behalf of STMicroelectronics
|
||||
- [core] limited the width of tab-bar rows to 100% of parent [#15260](https://github.com/eclipse-theia/theia/pull/15260) - contributed on behalf of STMicroelectronics
|
||||
- [core] made icons right-aligned [#15373](https://github.com/eclipse-theia/theia/pull/15373) - contributed on behalf of STMicroelectronics
|
||||
- [core] made preventTabbingOutsideDialog more easily overridable [#15460](https://github.com/eclipse-theia/theia/pull/15460)
|
||||
- [core] relayout dock panel when breadcrumbs became active [#15342](https://github.com/eclipse-theia/theia/pull/15342) - contributed on behalf of STMicroelectronics
|
||||
- [core] removed es6-promise & setImmediate [#15436](https://github.com/eclipse-theia/theia/pull/15436) - webperf contribution
|
||||
- [core] reverted #15331 to fix webviews [#15421](https://github.com/eclipse-theia/theia/pull/15421) - Contributed on behalf of STMicroelectronics
|
||||
- [core] set selection upon editor navigation only after editor was fully visible [#15302](https://github.com/eclipse-theia/theia/pull/15302) - contributed on behalf of STMicroelectronics
|
||||
- [core] theia 1.60.0 release [#15385](https://github.com/eclipse-theia/theia/pull/15385)
|
||||
- [core] translation update for version 1.60.0 [#15382](https://github.com/eclipse-theia/theia/pull/15382) - triggered by @sgraband
|
||||
- [core] used fixed version 1.5.5 of perfect-scrollbar [#15279](https://github.com/eclipse-theia/theia/pull/15279) - contributed on behalf of STMicroelectronics
|
||||
- [debug] fixed breakpoint editor shrinking in size [#15515](https://github.com/eclipse-theia/theia/pull/15515)
|
||||
- [debug] reacted to editor model changing [#15509](https://github.com/eclipse-theia/theia/pull/15509)
|
||||
- [debug] used editor widget as key for debug editor models [#15516](https://github.com/eclipse-theia/theia/pull/15516) - contributed on behalf of STMicroelectronics
|
||||
- [dev-container] added DOCKER_HOST support to devcontainer [#15350](https://github.com/eclipse-theia/theia/pull/15350)
|
||||
- [docs] fixed broken links in documentation [#15454](https://github.com/eclipse-theia/theia/pull/15454)
|
||||
- [getting-started] added news section with AI to welcome page [#15269](https://github.com/eclipse-theia/theia/pull/15269)
|
||||
- [monaco] avoided double registration of sticky scroll toggle [#15366](https://github.com/eclipse-theia/theia/pull/15366)
|
||||
- [monaco] disposed of child instantiation services in MonacoEditor [#15246](https://github.com/eclipse-theia/theia/pull/15246)
|
||||
- [monaco] ensured valid editor was constructed before attempting to use editor services [#15238](https://github.com/eclipse-theia/theia/pull/15238)
|
||||
- [monaco] fixed autocomplete content in chat view [#15240](https://github.com/eclipse-theia/theia/pull/15240)
|
||||
- [monaco] fixed issue with dirty state not correctly set when save operation is canceled [#15310](https://github.com/eclipse-theia/theia/pull/15310)
|
||||
- [monaco] passed multiple classnames as array of strings [#15244](https://github.com/eclipse-theia/theia/pull/15244)
|
||||
- [monaco] show context menu for editor minimap [#15220](https://github.com/eclipse-theia/theia/pull/15220)
|
||||
- [monaco] used simpleMonacoEditor for most inline editors [#15389](https://github.com/eclipse-theia/theia/pull/15389)
|
||||
- [notebook] fixed cell editor and notebook output selection [#15384](https://github.com/eclipse-theia/theia/pull/15384)
|
||||
- [plugin] made diagnosticcollection iterable [#15361](https://github.com/eclipse-theia/theia/pull/15361) - contributed on behalf of STMicroelectronics
|
||||
- [plugin] removed proposed API createFileSystemWatcher [#15265](https://github.com/eclipse-theia/theia/pull/15265) - contributed on behalf of STMicroelectronics
|
||||
- [plugin] renamed authenticationForceNewSessionOptions [#15264](https://github.com/eclipse-theia/theia/pull/15264) - contributed on behalf of STMicroelectronics
|
||||
- [plugin] supported sourceControlResourceGroup optional contextValue [#15219](https://github.com/eclipse-theia/theia/pull/15219) - contributed on behalf of STMicroelectronics
|
||||
- [plugin-ext] implemented the registerDiffInformationCommand to address issue #14144 [#15406](https://github.com/eclipse-theia/theia/pull/15406)
|
||||
- [plugin-ext] prevented plugin localization errors [#15268](https://github.com/eclipse-theia/theia/pull/15268)
|
||||
- [preferences] explicitly set scrolling element to avoid document scroll [#15315](https://github.com/eclipse-theia/theia/pull/15315)
|
||||
- [preferences] fixed issue where minimums of 0 for number preferences were ignored [#15230](https://github.com/eclipse-theia/theia/pull/15230)
|
||||
- [remote] basic ssh_config support [#15499](https://github.com/eclipse-theia/theia/pull/15499)
|
||||
- [scm] updated dirty diff when editor became visible [#15505](https://github.com/eclipse-theia/theia/pull/15505) - Contributed on behalf of STMicroelectronics
|
||||
- [search-in-workspace] fixed SiW height mismatch [#15287](https://github.com/eclipse-theia/theia/pull/15287)
|
||||
- [task] only called resolve() on tasks that have no execution [#15480](https://github.com/eclipse-theia/theia/pull/15480) - contributed on behalf of STMicroelectronics
|
||||
- [terminal] added terminal via "+" in terminal tool bar [#15470](https://github.com/eclipse-theia/theia/pull/15470)
|
||||
- [test] updated deprecated xterm dependency [#15523](https://github.com/eclipse-theia/theia/pull/15523) - contributed on behalf of STMicroelectronics
|
||||
|
||||
<a name="breaking_changes_1.61.0">[Breaking Changes:](#breaking_changes_1.61.0)</a>
|
||||
|
||||
- [core] allow to disable plugins. The PR includes a couple of renamings: `HostedPluginDeployerHandler` => `PluginDeployerHandlerImpl` and
|
||||
`PluginServerHandler` => `PluginServerImpl`. Also removed the ability of `HostedPluginProcess` to add extra deployed plugins. [#15205](https://github.com/eclipse-theia/theia/pull/15205) - contributed on behalf of STMicroelectronics
|
||||
- [core] removed version fix of `@types/express-serve-static-core` to `5.0.4`. Adopters might need to do this as well if they run into typing issues. [#15415](https://github.com/eclipse-theia/theia/pull/15415)
|
||||
- [git] stop publishing the `@theia/git` extension. This extension has been deprecated for a long time. Please use the built-in VS Code Git extension instead, which offers the same feature set. [#15471](https://github.com/eclipse-theia/theia/pull/15471)
|
||||
|
||||
## 1.60.0 - 04/03/2025
|
||||
|
||||
- [ai] add dummy preference descriptions to open AI config widget [#15166](https://github.com/eclipse-theia/theia/pull/15166)
|
||||
- [ai] add function to retrieve diagnostics [#14974](https://github.com/eclipse-theia/theia/pull/14974)
|
||||
- [ai] add gpt-4.5-preview as a default model [#15090](https://github.com/eclipse-theia/theia/pull/15090)
|
||||
- [ai] add MCP Server config view to AI Configuration [#15280](https://github.com/eclipse-theia/theia/pull/15280)
|
||||
- [ai] add native gemini provider [#15334](https://github.com/eclipse-theia/theia/pull/15334)
|
||||
- [ai] add schema for agent settings [#15175](https://github.com/eclipse-theia/theia/pull/15175)
|
||||
- [ai] allow project specific prompt additions [#15236](https://github.com/eclipse-theia/theia/pull/15236)
|
||||
- [ai] allow to add all MCP functions via prompt fragment [#15270](https://github.com/eclipse-theia/theia/pull/15270)
|
||||
- [ai] chore(chat): minor chat style improvements [#15112](https://github.com/eclipse-theia/theia/pull/15112)
|
||||
- [ai] chore(chat): pass pinned agent in frontend chat service [#15070](https://github.com/eclipse-theia/theia/pull/15070)
|
||||
- [ai] chore: improve style of code blocks in modern theme [#15351](https://github.com/eclipse-theia/theia/pull/15351)
|
||||
- [ai] chore: remove outline in the chat session settings editor [#15356](https://github.com/eclipse-theia/theia/pull/15356)
|
||||
- [ai] consider TerminalLinkProvider contributions recursively [#15177](https://github.com/eclipse-theia/theia/pull/15177)
|
||||
- [ai] consolidate widget labels [#15304](https://github.com/eclipse-theia/theia/pull/15304)
|
||||
- [ai] fix(ai-chat): add space after all autocompletions in AI chat [#15052](https://github.com/eclipse-theia/theia/pull/15052)
|
||||
- [ai] fix: Pin node-abi version to 3.x due to Node.js 22+ requirement in 4.x [#15212](https://github.com/eclipse-theia/theia/pull/15212)
|
||||
- [ai] fix: autocomplete content in chat view [#15240](https://github.com/eclipse-theia/theia/pull/15240)
|
||||
- [ai] fix: communication recording in Orchestrator [#15328](https://github.com/eclipse-theia/theia/pull/15328)
|
||||
- [ai] fix: do not set anthropic tool choice without tools [#15329](https://github.com/eclipse-theia/theia/pull/15329)
|
||||
- [ai] fix: fix response content in language model utility [#15377](https://github.com/eclipse-theia/theia/pull/15377)
|
||||
- [ai] fix: getFileDiagnostics waits forever [#15305](https://github.com/eclipse-theia/theia/pull/15305)
|
||||
- [ai] fix: prevent autocompletion from triggering incorrectly within words [#15030](https://github.com/eclipse-theia/theia/pull/15030)
|
||||
- [ai] fix(chat): fix context menu paste [#15222](https://github.com/eclipse-theia/theia/pull/15222)
|
||||
- [ai] feat(chat): add customizable welcome message [#15316](https://github.com/eclipse-theia/theia/pull/15316)
|
||||
- [ai] feat(chat): introduce LLM-based chat naming and last interaction date [#15116](https://github.com/eclipse-theia/theia/pull/15116)
|
||||
- [ai] fix: ensure that the dirty state is correctly set even when the current save operation is canceled (#15308). [#15310](https://github.com/eclipse-theia/theia/pull/15310)
|
||||
- [ai] initialize AIActivationService from preferences [#15044](https://github.com/eclipse-theia/theia/pull/15044) - Contributed by MVTec Software GmbH
|
||||
- [ai] make parameters in ToolRequest mandatory [#15288](https://github.com/eclipse-theia/theia/pull/15288)
|
||||
- [ai] make private functions and injections protected in ChatViewTreeWidget to make them overridable [#15297](https://github.com/eclipse-theia/theia/pull/15297) - Contributed by MVTec Software GmbH
|
||||
- [ai] modify link in AI chat instructions to show AI settings directly [#15326](https://github.com/eclipse-theia/theia/pull/15326)
|
||||
- [ai] put all prompts under MIT license [#15159](https://github.com/eclipse-theia/theia/pull/15159)
|
||||
- [ai] refine AI setting descriptions [#15250](https://github.com/eclipse-theia/theia/pull/15250)
|
||||
- [ai] refine coder prompt [#15358](https://github.com/eclipse-theia/theia/pull/15358)
|
||||
- [ai] set correct defaults for max tokens for anthropic models [#15198](https://github.com/eclipse-theia/theia/pull/15198)
|
||||
- [ai] set z-index of hovers to 1000 [#15172](https://github.com/eclipse-theia/theia/pull/15172)
|
||||
- [ai] show news section with AI on welcome page [#15269](https://github.com/eclipse-theia/theia/pull/15269)
|
||||
- [ai] turn automatic inline code completion off by default [#15333](https://github.com/eclipse-theia/theia/pull/15333)
|
||||
- [ai] use camelCase in React SVG [#15367](https://github.com/eclipse-theia/theia/pull/15367)
|
||||
- [ai] add shortcut for adding the current file to the AI chat context [#15252](https://github.com/eclipse-theia/theia/pull/15252)
|
||||
- [ai] add variable completion for {{}} syntax in prompttemplate [#15026](https://github.com/eclipse-theia/theia/pull/15026)
|
||||
- [console] fix: add missing editor dependency to console [#15354](https://github.com/eclipse-theia/theia/pull/15354)
|
||||
- [core] do not re-export the configuration folder as env variable [#15376](https://github.com/eclipse-theia/theia/pull/15376)
|
||||
- [core] fix resolve from root [#15331](https://github.com/eclipse-theia/theia/pull/15331)
|
||||
- [core] fixed node-abi version to 3.x due to Node.js 22+ requirement in 4.x [#15212](https://github.com/eclipse-theia/theia/pull/15212)
|
||||
- [core] hide overflow in view container headers [#15321](https://github.com/eclipse-theia/theia/pull/15321) - Contributed on behalf of STMicroelectronics
|
||||
- [core] limit the width of tab-bar rows to 100% of parent [#15260](https://github.com/eclipse-theia/theia/pull/15260) - Contributed on behalf of STMicroelectronics
|
||||
- [core] made icons right-aligned [#15373](https://github.com/eclipse-theia/theia/pull/15373) - Contributed on behalf of STMicroelectronics
|
||||
- [core] relayout dock panel when breadcrumbs become active [#15342](https://github.com/eclipse-theia/theia/pull/15342) - Contributed on behalf of STMicroelectronics
|
||||
- [core] set z-index of hovers to 1000 [#15172](https://github.com/eclipse-theia/theia/pull/15172)
|
||||
- [core] sync theia dark/light theme with electron nativeTheme setting [#15037](https://github.com/eclipse-theia/theia/pull/15037) - Contributed by MVTec Software GmbH
|
||||
- [core] use fixed version 1.5.5 of perfect-scrollbar [#15279](https://github.com/eclipse-theia/theia/pull/15279) - Contributed on behalf of STMicroelectronics
|
||||
- [debug] expand local variables by default [#15017](https://github.com/eclipse-theia/theia/pull/15017) - Contributed by MVTec Software GmbH
|
||||
- [debug] fix: clipping issue in debug hover (#15086) [#15154](https://github.com/eclipse-theia/theia/pull/15154)
|
||||
- [debug] fix: store original handle of debug adapter config [#15149](https://github.com/eclipse-theia/theia/pull/15149)
|
||||
- [debug] improve displaying inline frame decorator [#15097](https://github.com/eclipse-theia/theia/pull/15097) - Contributed by MVTec Software GmbH
|
||||
- [dev] chore: use shared packages in src-gen [#15185](https://github.com/eclipse-theia/theia/pull/15185) - Contributed on behalf of STMicroelectronics
|
||||
- [dev] improve error handling on optional dependencies [#14943](https://github.com/eclipse-theia/theia/pull/14943)
|
||||
- [filesystem] don't stop watching folder because of dropped events. [#15111](https://github.com/eclipse-theia/theia/pull/15111) - Contributed on behalf of STMicroelectronics
|
||||
- [memory-inspector] style: inputselect of memory inspector ui enhanced [#15032](https://github.com/eclipse-theia/theia/pull/15032)
|
||||
- [monaco] dispose of child instantiation services in MonacoEditor [#15246](https://github.com/eclipse-theia/theia/pull/15246)
|
||||
- [monaco] ensure valid editor constructed before attempting to use editor services [#15238](https://github.com/eclipse-theia/theia/pull/15238)
|
||||
- [monaco] ensure word-wrap respected when diff editors side by side [#15161](https://github.com/eclipse-theia/theia/pull/15161)
|
||||
- [monaco] handle visibility changes for diff editors [#15189](https://github.com/eclipse-theia/theia/pull/15189)
|
||||
- [monaco] set selection upon editor navigation only after editor is fully visible [#15302](https://github.com/eclipse-theia/theia/pull/15302) - Contributed on behalf of STMicroelectronics
|
||||
- [monaco] show context menu for editor minimap [#15220](https://github.com/eclipse-theia/theia/pull/15220)
|
||||
- [monaco] workspace Symbols: pass multiple classnames as array of strings [#15244](https://github.com/eclipse-theia/theia/pull/15244)
|
||||
- [notebook] fix: ensure NOTEBOOK_CELL_TYPE context key is set during initialization [#15182](https://github.com/eclipse-theia/theia/pull/15182)
|
||||
- [playwright] don't open context menu on Playwright explorer selection [#15143](https://github.com/eclipse-theia/theia/pull/15143)
|
||||
- [playwright] suggestion to fix missing lib folder in playwright package [#15122](https://github.com/eclipse-theia/theia/pull/15122)
|
||||
- [plugin] improve plugin package localization [#15142](https://github.com/eclipse-theia/theia/pull/15142)
|
||||
- [plugin] prevent plugin localization errors [#15268](https://github.com/eclipse-theia/theia/pull/15268)
|
||||
- [plugin] support "Save As" for custom editors [#14972](https://github.com/eclipse-theia/theia/pull/14972)
|
||||
- [preferences] ensure correct node expansion with short trailing sections [#15005](https://github.com/eclipse-theia/theia/pull/15005)
|
||||
- [preferences] explicitely set scrolling element to avoid document scroll [#15315](https://github.com/eclipse-theia/theia/pull/15315)
|
||||
- [preferences] fix issue where minimums of 0 for number preferences are ignored [#15230](https://github.com/eclipse-theia/theia/pull/15230)
|
||||
- [output] fix: manage channel addition without show usage [#15101](https://github.com/eclipse-theia/theia/pull/15101) - Contributed by STMicroelectronics
|
||||
- [search] fix SiW height mismatch [#15287](https://github.com/eclipse-theia/theia/pull/15287)
|
||||
- [terminal] add commandsToSkipShell preference for plugin support [#15099](https://github.com/eclipse-theia/theia/pull/15099)
|
||||
- [vscode] bump VS Code API version to 1.98.2 [#15341](https://github.com/eclipse-theia/theia/pull/15341) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] make DiagnosticCollection iterable [#15361](https://github.com/eclipse-theia/theia/pull/15361) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] remove duplicate declaration for DocumentDropEdit [#15126](https://github.com/eclipse-theia/theia/pull/15126) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] rename AuthenticationForceNewSessionOptions [#15264](https://github.com/eclipse-theia/theia/pull/15264) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] selection properties are now readonly [#15141](https://github.com/eclipse-theia/theia/pull/15141) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] support keepWhitespace in SnippetTextEdit and insertSnippet [#15176](https://github.com/eclipse-theia/theia/pull/15176) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] support SourceControlResourceGroup optional contextValue [#15219](https://github.com/eclipse-theia/theia/pull/15219) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] support command workbench.extensions.command.installFromVSIX [#15179](https://github.com/eclipse-theia/theia/pull/15179) - Contributed on behalf of STMicroelectronics
|
||||
|
||||
<a name="breaking_changes_1.60.0">[Breaking Changes:](#breaking_changes_1.60.0)</a>
|
||||
|
||||
- [core] fixed version `@types/express` to `^4.17.21` and `@types/express-serve-static-core` to `5.0.4`. This might be required for adopters as well if they run into typing issues. [#15147](https://github.com/eclipse-theia/theia/pull/15147)
|
||||
- [core] migration from deprecated `phosphorJs` to actively maintained fork `Lumino` [#14320](https://github.com/eclipse-theia/theia/pull/14320) - Contributed on behalf of STMicroelectronics
|
||||
Adopters importing `@phosphor` packages now need to import from `@lumino`. CSS selectors refering to `.p-` classes now need to refer to `.lm-` classes. There are also minor code adaptations, for example now using `iconClass` instead of `icon` in Lumino commands.
|
||||
- [core] Refactor menu nodes [#14676](https://github.com/eclipse-theia/theia/pull/14676) - Contributed on behalf of STMicroelectronics
|
||||
|
||||
<a name="breaking_changes_1.60.0">[Breaking Changes:](#breaking_changes_1.60.0)</a>
|
||||
|
||||
- [ai-chat] `ParsedChatRequest.variables` is now `ResolvedAIVariable[]` instead of a `Map<string, AIVariable>` [#15196](https://github.com/eclipse-theia/theia/pull/15196)
|
||||
- [ai-chat] `ChatRequestParser.parseChatRequest` is now asynchronous and expects an additional `ChatContext` parameter [#15196](https://github.com/eclipse-theia/theia/pull/15196)
|
||||
|
||||
## 1.59.0 - 02/27/2025
|
||||
|
||||
- [ai] added claude sonnet 3.7 to default models [#15023](https://github.com/eclipse-theia/theia/pull/15023)
|
||||
- [ai] added contextsummary variable to ai system [#14971](https://github.com/eclipse-theia/theia/pull/14971)
|
||||
- [ai] aligned ai chat toggle keybinding with vs code on macos [#14850](https://github.com/eclipse-theia/theia/pull/14850)
|
||||
- [ai] allowed multiple replacements in coder function [#14934](https://github.com/eclipse-theia/theia/pull/14934)
|
||||
- [ai] allowed to close chats again [#14992](https://github.com/eclipse-theia/theia/pull/14992)
|
||||
- [ai] chore: used fileservice.exist instead of trying to read the file [#14849](https://github.com/eclipse-theia/theia/pull/14849)
|
||||
- [ai] chore(chat): moved chat window to the right by default [#14970](https://github.com/eclipse-theia/theia/pull/14970)
|
||||
- [ai] consolidated the variables we provided in the chat [#15021](https://github.com/eclipse-theia/theia/pull/15021)
|
||||
- [ai] corrected description in workspace agent functions [#14898](https://github.com/eclipse-theia/theia/pull/14898)
|
||||
- [ai] correctly set the systempromptid in custom agents [#14988](https://github.com/eclipse-theia/theia/pull/14988)
|
||||
- [ai] feat(ai): enabled context variables for chat requests [#14787](https://github.com/eclipse-theia/theia/pull/14787)
|
||||
- [ai] fixed autocompletion for functions in chat input [#14838](https://github.com/eclipse-theia/theia/pull/14838)
|
||||
- [ai] fixed: provided open handler for quick file open [#15003](https://github.com/eclipse-theia/theia/pull/15003)
|
||||
- [ai] fixed(chat): avoided file suggestions on colons [#14965](https://github.com/eclipse-theia/theia/pull/14965)
|
||||
- [ai] fixed(chat): improved variable autocompletion [#15018](https://github.com/eclipse-theia/theia/pull/15018)
|
||||
- [ai] fixed(chat): prevented duplicate context element entries [#14979](https://github.com/eclipse-theia/theia/pull/14979)
|
||||
- [ai] fixed(chat): prevented focus outline color of ai chat [#15020](https://github.com/eclipse-theia/theia/pull/15020)
|
||||
- [ai] fixed closing changesets [#14994](https://github.com/eclipse-theia/theia/pull/14994)
|
||||
- [ai] fixed structured output dispatch and settings [#14811](https://github.com/eclipse-theia/theia/pull/14811)
|
||||
- [ai] fixed tool call prompt text replacement [#14830](https://github.com/eclipse-theia/theia/pull/14830)
|
||||
- [ai] fixed tool calling string in messages [#14906](https://github.com/eclipse-theia/theia/pull/14906)
|
||||
- [ai] fixed: quick input hover initialization [#15064](https://github.com/eclipse-theia/theia/pull/15064)
|
||||
- [ai] instructed coder to use replace when search and replace failed [#15061](https://github.com/eclipse-theia/theia/pull/15061)
|
||||
- [ai] implemented asynch iterator for open ai stream [#14920](https://github.com/eclipse-theia/theia/pull/14920)
|
||||
- [ai] improved integration between variableregistry and ai variableservice [#14827](https://github.com/eclipse-theia/theia/pull/14827)
|
||||
- [ai] introduced ai-ide package and moved ai configuration view [#14948](https://github.com/eclipse-theia/theia/pull/14948)
|
||||
- [ai] labeled ai as alpha [#14968](https://github.com/eclipse-theia/theia/pull/14968)
|
||||
- [ai] localized theia ai strings [#14857](https://github.com/eclipse-theia/theia/pull/14857)
|
||||
- [ai] made dependency on monaco explicit [#14907](https://github.com/eclipse-theia/theia/pull/14907)
|
||||
- [ai] made universal default prompt plain [#15007](https://github.com/eclipse-theia/theia/pull/15007)
|
||||
- [ai] made new code completion prompt default and turned on inline by default [#14822](https://github.com/eclipse-theia/theia/pull/14822)
|
||||
- [ai] pinned chat agent [#14716](https://github.com/eclipse-theia/theia/pull/14716)
|
||||
- [ai] refined coder prompt [#14887](https://github.com/eclipse-theia/theia/pull/14887)
|
||||
- [ai] refined search-replace prompt default of coder and made it default [#14870](https://github.com/eclipse-theia/theia/pull/14870)
|
||||
- [ai] refined system message settings [#14877](https://github.com/eclipse-theia/theia/pull/14877)
|
||||
- [ai] refactored chat agents into separate ide package [#14852](https://github.com/eclipse-theia/theia/pull/14852)
|
||||
- [ai] removed aieditormanager [#14912](https://github.com/eclipse-theia/theia/pull/14912)
|
||||
- [ai] renamed workspace agent to architect [#14963](https://github.com/eclipse-theia/theia/pull/14963)
|
||||
- [ai] set o1 to stream by default [#14947](https://github.com/eclipse-theia/theia/pull/14947)
|
||||
- [ai] streamlined the agent code [#14859](https://github.com/eclipse-theia/theia/pull/14859)
|
||||
- [ai] supported anyof in function parameters [#15012](https://github.com/eclipse-theia/theia/pull/15012)
|
||||
- [ai] updated chatmodel naming [#14913](https://github.com/eclipse-theia/theia/pull/14913)
|
||||
- [ai] updated default openai models [#14808](https://github.com/eclipse-theia/theia/pull/14808)
|
||||
- [ai] used content from monacoworkspaceservice for ai getfilecontent [#14885](https://github.com/eclipse-theia/theia/pull/14885)
|
||||
- [application-manager] used default import of fix-path package [#14812](https://github.com/eclipse-theia/theia/pull/14812)
|
||||
- [ci] fixed next build [#14981](https://github.com/eclipse-theia/theia/pull/14981)
|
||||
- [console] fixed: console text model used the language id [#14854](https://github.com/eclipse-theia/theia/pull/14854)
|
||||
- [core] added commands to toggle left and right panel [#15041](https://github.com/eclipse-theia/theia/pull/15041)
|
||||
- [core] fixed: removed files in editor tab when deleted [#14990](https://github.com/eclipse-theia/theia/pull/14990)
|
||||
- [core] fixed problems related with menu bar updates on focus change [#14959](https://github.com/eclipse-theia/theia/pull/14959) - Contributed on behalf of STMicroelectronics
|
||||
- [core] made context element mandatory when showing a context menu [#14982](https://github.com/eclipse-theia/theia/pull/14982) - Contributed on behalf of STMicroelectronics
|
||||
- [core] only sent visibility change notification when the visibility actually changed [#15040](https://github.com/eclipse-theia/theia/pull/15040) - Contributed by STMicroelectronics
|
||||
- [core] streamlined logging api [#14861](https://github.com/eclipse-theia/theia/pull/14861)
|
||||
- [core] supported manual override of text blocks [#14712](https://github.com/eclipse-theia/theia/pull/14712)
|
||||
- [debug] fixed: handled the breakpoint update event for id:0 [#14866](https://github.com/eclipse-theia/theia/pull/14866)
|
||||
- [debug] fixed: no watch evaluation if no current stack frame [#14874](https://github.com/eclipse-theia/theia/pull/14874)
|
||||
- [debug] fixed: warned user before starting the same debug session multiple times [#14862](https://github.com/eclipse-theia/theia/pull/14862)
|
||||
- [debug] handled the case where the editor model was set to null [#15013](https://github.com/eclipse-theia/theia/pull/15013) - Contributed on behalf of STMicroelectronics
|
||||
- [dev-container] devcontainer: added ability to use localenv for containerenv property [#14821](https://github.com/eclipse-theia/theia/pull/14821)
|
||||
- [dev-container] devcontainer: added simple containerenv contribution [#14816](https://github.com/eclipse-theia/theia/pull/14816)
|
||||
- [dev-container] fixed recent workspace tracking for devcontainer workspaces [#14925](https://github.com/eclipse-theia/theia/pull/14925)
|
||||
- [dev-packages] fixed webpack watching [#14844](https://github.com/eclipse-theia/theia/pull/14844)
|
||||
- [doc] updated build command in publishing.md [#14798](https://github.com/eclipse-theia/theia/pull/14798)
|
||||
- [doc] updated mcp readme with autostart option [#15046](https://github.com/eclipse-theia/theia/pull/15046)
|
||||
- [filesystem] deprioritized file resource resolver to avoid resolution delays [#14917](https://github.com/eclipse-theia/theia/pull/14917)
|
||||
- [monaco] chore: updated vscode-oniguruma+vscode-textmate [#14848](https://github.com/eclipse-theia/theia/pull/14848)
|
||||
- [monaco] did not create a model reference for inline editors [#14942](https://github.com/eclipse-theia/theia/pull/14942) - Contributed on behalf of STMicroelectronics
|
||||
- [monaco] emptied hidden editors [#14909](https://github.com/eclipse-theia/theia/pull/14909) - Contributed on behalf of STMicroelectronics
|
||||
- [monaco] fixed: contenthoverwidget respected theia styles [#14836](https://github.com/eclipse-theia/theia/pull/14836)
|
||||
- [monaco] fixed monaco editor localization [#15016](https://github.com/eclipse-theia/theia/pull/15016)
|
||||
- [monaco] fixed monaco model reference creation [#14957](https://github.com/eclipse-theia/theia/pull/14957)
|
||||
- [notebook] added an error for when a notebook editor was opened with a non existing file [#14891](https://github.com/eclipse-theia/theia/pull/14891)
|
||||
- [notebook] fixed new notebook cell editor outline and width with open right sidebar [#14800](https://github.com/eclipse-theia/theia/pull/14800)
|
||||
- [notebook] fixed notebook widget disposal [#14964](https://github.com/eclipse-theia/theia/pull/14964)
|
||||
- [plugin] added missing vs code json schemas [#14864](https://github.com/eclipse-theia/theia/pull/14864)
|
||||
- [plugin] passed code action provider metadata to editor [#14991](https://github.com/eclipse-theia/theia/pull/14991) - Contributed on behalf of STMicroelectronics
|
||||
- [plugin] refreshed root when change notification had no items [#14868](https://github.com/eclipse-theia/theia/pull/14868)
|
||||
- [plugin] sent plugin logs to the frontend [#14908](https://github.com/eclipse-theia/theia/pull/14908)
|
||||
- [plugin] supported snippet file edits [#15066](https://github.com/eclipse-theia/theia/pull/15066)
|
||||
- [scm] used diffeditor diffnavigator to navigate diffs [#14889](https://github.com/eclipse-theia/theia/pull/14889)
|
||||
- [terminal] fixed: exited shell process on terminal close [#14823](https://github.com/eclipse-theia/theia/pull/14823)
|
||||
- [vscode] bumped vs code api version [#15069](https://github.com/eclipse-theia/theia/pull/15069) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] introduced the commentingrange type [#15015](https://github.com/eclipse-theia/theia/pull/15015) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] made public the documentpaste proposed api [#14953](https://github.com/eclipse-theia/theia/pull/14953) - Contributed on behalf of STMicroelectronics
|
||||
- [vscode] shellexecution updated with undefined command [#15047](https://github.com/eclipse-theia/theia/pull/15047) - Contributed on behalf of STMicroelectronics
|
||||
|
||||
<a name="breaking_changes_1.59.0">[Breaking Changes:](#breaking_changes_1.59.0)</a>
|
||||
|
||||
- [ai] refined system message settings [#14877](https://github.com/eclipse-theia/theia/pull/14877)
|
||||
- [ai-chat] changed chat api by removing chatsetchangedeleteevent, updating changeset interface with added ondidchange event and dispose method (renamed accept to apply and discard to revert), modified changesetelement and changesetimpl accordingly [#14910](https://github.com/eclipse-theia/theia/pull/14910)
|
||||
- [ai-chat] abstractchatagent updated getsystemmessagedescription to require a context parameter [#14930](https://github.com/eclipse-theia/theia/pull/14930)
|
||||
- [ai-core] chatmodel interface was updated to include context and promptservice was updated with an optional context argument in getprompt [#14930](https://github.com/eclipse-theia/theia/pull/14930)
|
||||
- [ai-ide] content-replacer.ts moved from ai-ide/src/browser/ to core/src/common/ [#14930](https://github.com/eclipse-theia/theia/pull/14930)
|
||||
- [ai-scanoss] scanossdialog constructor accepted an array of results instead of a single result [#14930](https://github.com/eclipse-theia/theia/pull/14930)
|
||||
- [core] a context html element became mandatory when showing a context menu [#14982](https://github.com/eclipse-theia/theia/pull/14982) - Contributed on behalf of STMicroelectronics
|
||||
- [core] adjusted binding of named ilogger injections and instructed removal of duplicate ilogger bindings on ambiguous match errors
|
||||
- [core] streamlined logging api [#14861](https://github.com/eclipse-theia/theia/pull/14861)
|
||||
- [core] made context element mandatory when showing a context menu [#14982](https://github.com/eclipse-theia/theia/pull/14982) - Contributed on behalf of STMicroelectronics
|
||||
- [debug] fixed: handled the breakpoint update event for id:0 [#14866](https://github.com/eclipse-theia/theia/pull/14866)
|
||||
|
||||
## 1.58.0 - 01/30/2025
|
||||
|
||||
- [ai] added 'required' property to tool call parameters [#14673](https://github.com/eclipse-theia/theia/pull/14673)
|
||||
- [ai] added change set support in chat input and chat model [#14750](https://github.com/eclipse-theia/theia/pull/14750)
|
||||
- [ai] added logic to allow passing context to tool calls [#14751](https://github.com/eclipse-theia/theia/pull/14751)
|
||||
- [ai] added logic to allow to auto-start MCP servers on frontend start-up [#14736](https://github.com/eclipse-theia/theia/pull/14736)
|
||||
- [ai] added logic to override change elements on additional changes [#14792](https://github.com/eclipse-theia/theia/pull/14792)
|
||||
- [ai] added Ollama LLM provider tools support [#14623](https://github.com/eclipse-theia/theia/pull/14623)
|
||||
- [ai] added search and replace function to coder [#14774](https://github.com/eclipse-theia/theia/pull/14774)
|
||||
- [ai] added support for Azure OpenAI [#14722](https://github.com/eclipse-theia/theia/pull/14722)
|
||||
- [ai] added support for change sets via tool functions [#14715](https://github.com/eclipse-theia/theia/pull/14715)
|
||||
- [ai] added tool support for anthropic streaming [#14758](https://github.com/eclipse-theia/theia/pull/14758)
|
||||
- [ai] changed trigger of inline suggestion keybinding to Ctrl+Alt+Space [#14669](https://github.com/eclipse-theia/theia/pull/14669)
|
||||
- [ai] improved behavior of AI Changeset diff editor [#14786](https://github.com/eclipse-theia/theia/pull/14786) - Contributed on behalf of STMicroelectronics
|
||||
- [ai] improved cancel logic in openAi model [#14713](https://github.com/eclipse-theia/theia/pull/14713)
|
||||
- [ai] improved cancellation token handling in chat model [#14644](https://github.com/eclipse-theia/theia/pull/14644)
|
||||
- [ai] improved performance in AI request logging [#14769](https://github.com/eclipse-theia/theia/pull/14769)
|
||||
- [ai] updated logic to allow filerting backticks in AI code completion [#14777](https://github.com/eclipse-theia/theia/pull/14777)
|
||||
- [ai] updated logic to consistently handle OpenAI models not supporting system messages instead of using dedicated O1 chat agent [#14681](https://github.com/eclipse-theia/theia/pull/14681)
|
||||
- [ai] updated logic to manage AI bindings separately per connection [#14760](https://github.com/eclipse-theia/theia/pull/14760)
|
||||
- [ai] updated logic to not let ai chat submit empty messages [#14771](https://github.com/eclipse-theia/theia/pull/14771)
|
||||
- [ai] updated logic to register tool functions of mcp servers again after restart of the frontend [#14723](https://github.com/eclipse-theia/theia/pull/14723)
|
||||
- [ai] updated logic to show diff on click in ChangeSets [#14784](https://github.com/eclipse-theia/theia/pull/14784)
|
||||
- [application-manager] fixed error caused by bundling scanoss [#14650](https://github.com/eclipse-theia/theia/pull/14650)
|
||||
- [application-manager] improved bundling for hoisted dependencies [#14708](https://github.com/eclipse-theia/theia/pull/14708)
|
||||
- [console] fixed console scrolling [#14748](https://github.com/eclipse-theia/theia/pull/14748)
|
||||
- [core] added support for dragging files in browser [#14756](https://github.com/eclipse-theia/theia/pull/14756)
|
||||
- [core] fixed dragging file from outside the workspace [#14746](https://github.com/eclipse-theia/theia/pull/14746)
|
||||
- [core] fixed override of default key bindings [#14668](https://github.com/eclipse-theia/theia/pull/14668)
|
||||
- [core] fixed `workbench.action.files.newUntitledFile` command [#14754](https://github.com/eclipse-theia/theia/pull/14754)
|
||||
- [core] fixed z-index overlay issue in dock panels [#14695](https://github.com/eclipse-theia/theia/pull/14695)
|
||||
- [core] updated build scripts to use npm instead of yarn to build Theia [#14481](https://github.com/eclipse-theia/theia/pull/14481) - Contributed on behalf of STMicroelectronics
|
||||
- [core] updated keytar and drivelist [#14306](https://github.com/eclipse-theia/theia/pull/14306)
|
||||
- [core] updated logic to prevent tabbing outside of dialog overlay [#14647](https://github.com/eclipse-theia/theia/pull/14647)
|
||||
- [debug] added jump to cursor option to context menu [#14594](https://github.com/eclipse-theia/theia/pull/14594) - Contributed by MVTec Software GmbH
|
||||
- [debug] fixed updating breakpoints when debugging starts [#14645](https://github.com/eclipse-theia/theia/pull/14645) - Contributed by MVTec Software GmbH
|
||||
- [dev-container] updated logic to show more dev container info in title bar [#14571](https://github.com/eclipse-theia/theia/pull/14571)
|
||||
- [electron] bumped fix-path to ^4.0.0 to avoid cross-env <6.0.6 [#14781](https://github.com/eclipse-theia/theia/pull/14781) - Contributed on behalf of STMicroelectronics
|
||||
- [filesystem] added support for vscode file system provider scheme [#14778](https://github.com/eclipse-theia/theia/pull/14778)
|
||||
- [filesystem] fixed error handling in OPFSFileSystemProvider [#14790](https://github.com/eclipse-theia/theia/pull/14790)
|
||||
- [filesystem] fixed file data streaming for http polling [#14659](https://github.com/eclipse-theia/theia/pull/14659)
|
||||
- [getting-started] updated labels to mark DevContainers in recent workspaces [#14595](https://github.com/eclipse-theia/theia/pull/14595)
|
||||
- [git] added deprecation warning to theia/git readme [#14646](https://github.com/eclipse-theia/theia/pull/14646)
|
||||
- [monaco] updated monaco-editor-core to 1.96.3 [#14737](https://github.com/eclipse-theia/theia/pull/14737) - Contributed on behalf of STMicroelectronics
|
||||
- [notebook] fixed execute cell and below for last cell [#14795](https://github.com/eclipse-theia/theia/pull/14795)
|
||||
- [notebook] fixed issue with deleted cells when talking to output webview [#14649](https://github.com/eclipse-theia/theia/pull/14649)
|
||||
- [notebook] fixed race condition for outputs [#14789](https://github.com/eclipse-theia/theia/pull/14789)
|
||||
- [plugin] added support for property Text in DocumentDropOrPasteEditKind [#14605](https://github.com/eclipse-theia/theia/pull/14605) - Contributed on behalf of STMicroelectronics
|
||||
- [plugin] stubbed TerminalCompletionProvider proposed API [#14719](https://github.com/eclipse-theia/theia/pull/14719) - Contributed on behalf of STMicroelectronics
|
||||
- [plugin] updated code to properly mark chat and language model APIs as stubbed [#14734](https://github.com/eclipse-theia/theia/pull/14734) - Contributed on behalf of STMicroelectronics
|
||||
- [plugin] updated code to provide node-pty package for plugins [#14720](https://github.com/eclipse-theia/theia/pull/14720)
|
||||
- [plugin] updated logic to include ignored files in vscode.workspace.findFiles [#14365](https://github.com/eclipse-theia/theia/pull/14365)
|
||||
- [plugin] updated logic to only call refresh on given elements given by plugin [#14697](https://github.com/eclipse-theia/theia/pull/14697) - Contributed on behalf of STMicroelectronics
|
||||
- [process] updated node-pty to 1.1.0-beta27 [#14677](https://github.com/eclipse-theia/theia/pull/14677) - Contributed on behalf of STMicroelectronics
|
||||
- [scanoss] fixed scanoss error on Windows [#14653](https://github.com/eclipse-theia/theia/pull/14653)
|
||||
- [secondary-window] improved README of secondary window package [#14691](https://github.com/eclipse-theia/theia/pull/14691) - Contributed on behalf of STMicroelectronics
|
||||
- [task] added task related context keys [#14757](https://github.com/eclipse-theia/theia/pull/14757)
|
||||
- [vsx-registry] added logic to load plugin readme from file system [#14699](https://github.com/eclipse-theia/theia/pull/14699)
|
||||
85
CLAUDE.md
Normal file
85
CLAUDE.md
Normal file
@@ -0,0 +1,85 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Development Commands
|
||||
|
||||
**Essential commands:**
|
||||
- `npm install` - Install dependencies and run post-install hooks
|
||||
- `npm run build:browser` - Builds all packages, including example applications and bundles the Browser application (preferred during development)
|
||||
- `npm run compile` - Compile TypeScript packages only
|
||||
- `npm run lint` - Run ESLint across all packages
|
||||
- `npm run test` - Run all tests
|
||||
|
||||
**Application commands:**
|
||||
- `npm run start:browser` - Start browser example at localhost:3000
|
||||
- `npm run start:electron` - Start electron application
|
||||
- `npm run watch` - Watch mode for development
|
||||
|
||||
**Package-specific (using lerna):**
|
||||
- `npx lerna run compile --scope @theia/package-name` - Build specific package
|
||||
- `npx lerna run test --scope @theia/package-name` - Test specific package
|
||||
- `npx lerna run watch --scope @theia/package-name --include-filtered-dependencies --parallel` - Watch package with dependencies
|
||||
|
||||
## Architecture
|
||||
|
||||
**Monorepo Structure:**
|
||||
- Lerna-managed monorepo with 80+ packages
|
||||
- `/packages/` - Runtime packages (core + extensions)
|
||||
- `/dev-packages/` - Development tooling
|
||||
- `/examples/` - Sample applications and examples for API usage
|
||||
|
||||
**Platform-specific code organization:**
|
||||
- `package-name/src/common/*` - Basic JavaScript APIs, runs everywhere
|
||||
- `package-name/src/browser/*` - Browser/DOM APIs
|
||||
- `package-name/src/node/*` - Node.js APIs
|
||||
- `package-name/src/electron-browser/*` - Electron renderer process
|
||||
- `package-name/src/electron-main/*` - Electron main process
|
||||
|
||||
**Extension System:**
|
||||
- Dependency Injection via InversifyJS (property injection preferred)
|
||||
- Contribution Points pattern for extensibility
|
||||
- Three extension types: Theia extensions (build-time), VS Code extensions (runtime), Theia plugins (runtime)
|
||||
- `theiaExtensions` in package.json defines module entry points
|
||||
|
||||
## Key Patterns
|
||||
|
||||
For more information also look at:
|
||||
- @doc/coding-guidelines.md
|
||||
- @doc/Testing.md
|
||||
- @doc/Plugin-API.md (VS Code extension plugin API)
|
||||
|
||||
**Code Style:**
|
||||
- 4 spaces indentation, single quotes, undefined over null
|
||||
- PascalCase for types/enums, camelCase for functions/variables
|
||||
- Arrow functions preferred, explicit return types required
|
||||
- Property injection over constructor injection
|
||||
|
||||
**File Naming:**
|
||||
- kebab-case for files (e.g., `document-provider.ts`)
|
||||
- File name matches main exported type
|
||||
- Platform folders follow strict dependency rules
|
||||
|
||||
**Architecture Patterns:**
|
||||
- Main-Ext pattern for plugin API (browser Main ↔ plugin host Ext)
|
||||
- Services as classes with DI, avoid exported functions
|
||||
- ContributionProvider instead of @multiInject
|
||||
- URI strings for cross-platform file paths, never raw paths
|
||||
|
||||
**Testing:**
|
||||
- Unit tests: `*.spec.ts`
|
||||
- UI tests: `*.ui-spec.ts`
|
||||
- Slow tests: `*.slow-spec.ts`
|
||||
|
||||
## Technical Requirements
|
||||
|
||||
- Node.js ≥18.17.0, <21
|
||||
- TypeScript ~5.4.5 with strict settings
|
||||
- React 18.2.0 for UI components
|
||||
- Monaco Editor for code editing
|
||||
|
||||
**Key Technologies:**
|
||||
- Express.js for backend HTTP server
|
||||
- InversifyJS for dependency injection
|
||||
- Lerna for monorepo management
|
||||
- Webpack for application bundling
|
||||
62
CODE_OF_CONDUCT.md
Normal file
62
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,62 @@
|
||||
<div id="theia-logo" align="left">
|
||||
<br />
|
||||
<img src="https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/EF_GRY-OR_svg.svg?sanitize=true" alt="Eclipse Logo" width="300"/>
|
||||
</div>
|
||||
|
||||
# Community Code of Conduct
|
||||
|
||||
Version 1.1
|
||||
|
||||
October 21, 2019
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at <codeofconduct@eclipse.org>. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
|
||||
|
||||
For answers to common questions about this code of conduct, see <https://www.contributor-covenant.org/faq>
|
||||
|
||||
<div id="theia-logo" align="left">
|
||||
<br />
|
||||
<img src="https://www.eclipse.org/images/Eclipse_Code_of_Conduct.png" alt="Eclipse Logo" width="150"/>
|
||||
</div>
|
||||
|
||||
----
|
||||
Note: Please see [here](https://www.eclipse.org/org/documents/Community_Code_of_Conduct.php) for the latest version of this document, hosted at the Eclipse Foundation
|
||||
123
CONTRIBUTING.md
Normal file
123
CONTRIBUTING.md
Normal file
@@ -0,0 +1,123 @@
|
||||
# Contributing to Eclipse Theia
|
||||
|
||||
Theia is a young open-source project with a modular architecture. One of the
|
||||
goals is to make sure that we can customize and enhance any Theia application
|
||||
through extensions. So while the main Theia repository contains some common
|
||||
functionality for IDE-like applications, like a file system or a navigator
|
||||
view, most functionality doesn't necessarily need to be put into the core
|
||||
repository but can be developed separately.
|
||||
|
||||
## How Can I Contribute?
|
||||
|
||||
In the following some of the typical ways of contribution are described.
|
||||
|
||||
### Asking Questions
|
||||
|
||||
It's totally fine to ask questions by opening an issue in the Theia GitHub
|
||||
repository. We will close it once it's answered and tag it with the 'question'
|
||||
label. Please check if the question has been asked before there or on [Stack
|
||||
Overflow](https://stackoverflow.com).
|
||||
|
||||
### Reporting Bugs
|
||||
|
||||
If you have found a bug, you should first check if it has already been filed
|
||||
and maybe even fixed. If you find an existing unresolved issue, please add your
|
||||
case. If you could not find an existing bug report, please file a new one. In
|
||||
any case, please add all information you can share and that will help to
|
||||
reproduce and solve the problem.
|
||||
|
||||
### Reporting Feature Requests
|
||||
|
||||
You may want to see a feature or have an idea. You can file a request and we
|
||||
can discuss it. If such a feature request already exists, please add a comment
|
||||
or some other form of feedback to indicate you are interested too. Also in this
|
||||
case any concrete use case scenario is appreciated to understand the motivation
|
||||
behind it.
|
||||
|
||||
### Pull Requests
|
||||
|
||||
Before you get started investing significant time in something you want to get
|
||||
merged and maintained as part of Theia, you should talk with the team through
|
||||
an issue. Simply choose the issue you would want to work on, and tell everyone
|
||||
that you are willing to do so and how you would approach it. The team will be
|
||||
happy to guide you and give feedback.
|
||||
|
||||
We follow the contributing and reviewing pull request guidelines described
|
||||
[here](https://github.com/eclipse-theia/theia/blob/master/doc/pull-requests.md).
|
||||
|
||||
## Coding Guidelines
|
||||
|
||||
We follow the coding guidelines described
|
||||
[here](doc/coding-guidelines.md).
|
||||
|
||||
## Eclipse Contributor Agreement
|
||||
|
||||
Before your contribution can be accepted by the project team contributors must
|
||||
electronically sign the Eclipse Contributor Agreement (ECA).
|
||||
|
||||
* <https://www.eclipse.org/legal/ECA.php>
|
||||
|
||||
Commits that are provided by non-committers must have a Signed-off-by field in
|
||||
the footer indicating that the author is aware of the terms by which the
|
||||
contribution has been provided to the project. The non-committer must
|
||||
additionally have an Eclipse Foundation account and must have a signed Eclipse
|
||||
Contributor Agreement (ECA) on file.
|
||||
|
||||
For more information, please see the Eclipse Committer Handbook:
|
||||
<https://www.eclipse.org/projects/handbook/#resources-commit>
|
||||
|
||||
## Sign your work
|
||||
|
||||
The sign-off is a simple line at the end of the explanation for the patch. Your
|
||||
signature certifies that you wrote the patch or otherwise have the right to
|
||||
pass it on as an open-source patch. The rules are pretty simple: if you can
|
||||
certify the below (from
|
||||
[developercertificate.org](https://developercertificate.org/)):
|
||||
|
||||
```
|
||||
Developer Certificate of Origin
|
||||
Version 1.1
|
||||
|
||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
||||
1 Letterman Drive
|
||||
Suite D4700
|
||||
San Francisco, CA, 94129
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
```
|
||||
|
||||
Then you just add a line to every git commit message:
|
||||
|
||||
Signed-off-by: Joe Smith <joe.smith@email.com>
|
||||
|
||||
Use your real name (sorry, no pseudonyms or anonymous contributions.)
|
||||
|
||||
If you set your `user.name` and `user.email` git configs, you can sign your
|
||||
commit automatically with `git commit -s`.
|
||||
4
Dockerfile
Normal file
4
Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
||||
# Vibn IDE — pull the custom-compiled image built by Cloud Build
|
||||
# Cloud Build compiles all TypeScript (Gitea/Coolify tools, Code OS agent)
|
||||
# and pushes to Artifact Registry. Coolify just pulls that image.
|
||||
FROM northamerica-northeast1-docker.pkg.dev/master-ai-484822/vibn-ide/theia:latest
|
||||
56
Dockerfile.custom
Normal file
56
Dockerfile.custom
Normal file
@@ -0,0 +1,56 @@
|
||||
# Vibn IDE — compiled from source (matches local dev build)
|
||||
# Uses E2_HIGHCPU_32 in Cloud Build for the webpack step
|
||||
|
||||
FROM node:22-bullseye AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y libxkbfile-dev libsecret-1-dev python3 make g++ && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy dependency manifests first for better caching
|
||||
COPY package.json package-lock.json lerna.json ./
|
||||
COPY scripts/ scripts/
|
||||
COPY configs/ configs/
|
||||
COPY dev-packages/ dev-packages/
|
||||
COPY packages/ packages/
|
||||
COPY examples/ examples/
|
||||
|
||||
# Install all dependencies
|
||||
# electron is needed for type declarations during compilation (pulled by examples/electron
|
||||
# which is excluded by .dockerignore, so we add it manually)
|
||||
RUN npm install --legacy-peer-deps && npm install --no-save electron@38.4.0
|
||||
|
||||
# Compile TypeScript
|
||||
RUN npm run compile
|
||||
|
||||
# Build the browser webpack bundle (needs ~4GB RAM — Cloud Build E2_HIGHCPU_32 handles this)
|
||||
RUN cd examples/browser && npx theia build --mode production
|
||||
|
||||
# ── Runtime stage ─────────────────────────────────────────────────────────────
|
||||
FROM node:22-bullseye-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN useradd -m -s /bin/bash theia
|
||||
WORKDIR /home/theia/app
|
||||
|
||||
# Copy the built application from builder
|
||||
COPY --from=builder /app/examples/browser/lib ./lib
|
||||
COPY --from=builder /app/examples/browser/src-gen ./src-gen
|
||||
COPY --from=builder /app/examples/browser/package.json ./
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/packages ./packages
|
||||
|
||||
# Copy vibn.css into the frontend served directory
|
||||
COPY examples/browser/vibn.css ./lib/frontend/vibn.css
|
||||
|
||||
# Copy startup script
|
||||
COPY startup-custom.sh /startup.sh
|
||||
RUN chmod +x /startup.sh
|
||||
|
||||
RUN chown -R theia:theia /home/theia
|
||||
USER theia
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["/startup.sh"]
|
||||
31
Dockerfile.runtime
Normal file
31
Dockerfile.runtime
Normal file
@@ -0,0 +1,31 @@
|
||||
# Runtime-only image — expects Theia to already be compiled on the host.
|
||||
# Run `npm run build:local` first, then `docker build -f Dockerfile.runtime ...`
|
||||
|
||||
FROM node:20-bookworm-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
curl \
|
||||
libsecret-1-0 \
|
||||
libx11-6 \
|
||||
libxkbfile1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /home/node/workspace /home/node/.theia && \
|
||||
chown -R node:node /home/node
|
||||
|
||||
WORKDIR /home/node
|
||||
|
||||
# Copy the pre-compiled output from the host
|
||||
COPY --chown=node:node node_modules ./node_modules
|
||||
COPY --chown=node:node packages ./packages
|
||||
COPY --chown=node:node dev-packages ./dev-packages
|
||||
COPY --chown=node:node examples/browser ./examples/browser
|
||||
COPY --chown=node:node package.json ./package.json
|
||||
|
||||
COPY startup-custom.sh /startup.sh
|
||||
RUN chmod +x /startup.sh && chown node:node /startup.sh
|
||||
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT ["/startup.sh"]
|
||||
26
Dockerfile.vibn
Normal file
26
Dockerfile.vibn
Normal file
@@ -0,0 +1,26 @@
|
||||
# Vibn IDE — Custom Theia workspace image
|
||||
# Wraps the official Theia Blueprint with a startup script that:
|
||||
# 1. Clones the project's Gitea repo on first boot (using GITEA_REPO + GITEA_TOKEN)
|
||||
# 2. Starts Theia pre-loaded with the cloned folder open
|
||||
|
||||
FROM ghcr.io/eclipse-theia/theia-blueprint/theia-ide:latest
|
||||
|
||||
USER root
|
||||
|
||||
# git is needed for clone — install if not present
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends git && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Add startup script
|
||||
COPY startup.sh /startup.sh
|
||||
RUN chmod +x /startup.sh && \
|
||||
chown theia:theia /startup.sh
|
||||
|
||||
# Ensure workspace dir exists and is owned by theia
|
||||
RUN mkdir -p /home/project && chown -R theia:theia /home/project
|
||||
|
||||
USER theia
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["/startup.sh"]
|
||||
277
LICENSE-EPL
Normal file
277
LICENSE-EPL
Normal file
@@ -0,0 +1,277 @@
|
||||
Eclipse Public License - v 2.0
|
||||
|
||||
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
|
||||
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
|
||||
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial content
|
||||
Distributed under this Agreement, and
|
||||
|
||||
b) in the case of each subsequent Contributor:
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
where such changes and/or additions to the Program originate from
|
||||
and are Distributed by that particular Contributor. A Contribution
|
||||
"originates" from a Contributor if it was added to the Program by
|
||||
such Contributor itself or anyone acting on such Contributor's behalf.
|
||||
Contributions do not include changes or additions to the Program that
|
||||
are not Modified Works.
|
||||
|
||||
"Contributor" means any person or entity that Distributes the Program.
|
||||
|
||||
"Licensed Patents" mean patent claims licensable by a Contributor which
|
||||
are necessarily infringed by the use or sale of its Contribution alone
|
||||
or when combined with the Program.
|
||||
|
||||
"Program" means the Contributions Distributed in accordance with this
|
||||
Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement
|
||||
or any Secondary License (as applicable), including Contributors.
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source Code or other
|
||||
form, that is based on (or derived from) the Program and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship.
|
||||
|
||||
"Modified Works" shall mean any work in Source Code or other form that
|
||||
results from an addition to, deletion from, or modification of the
|
||||
contents of the Program, including, for purposes of clarity any new file
|
||||
in Source Code form that contains any contents of the Program. Modified
|
||||
Works shall not include works that contain only declarations,
|
||||
interfaces, types, classes, structures, or files of the Program solely
|
||||
in each case in order to link to, bind by name, or subclass the Program
|
||||
or Modified Works thereof.
|
||||
|
||||
"Distribute" means the acts of a) distributing or b) making available
|
||||
in any manner that enables the transfer of a copy.
|
||||
|
||||
"Source Code" means the form of a Program preferred for making
|
||||
modifications, including but not limited to software source code,
|
||||
documentation source, and configuration files.
|
||||
|
||||
"Secondary License" means either the GNU General Public License,
|
||||
Version 2.0, or any later versions of that license, including any
|
||||
exceptions or additional permissions as identified by the initial
|
||||
Contributor.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
|
||||
a) Subject to the terms of this Agreement, each Contributor hereby
|
||||
grants Recipient a non-exclusive, worldwide, royalty-free copyright
|
||||
license to reproduce, prepare Derivative Works of, publicly display,
|
||||
publicly perform, Distribute and sublicense the Contribution of such
|
||||
Contributor, if any, and such Derivative Works.
|
||||
|
||||
b) Subject to the terms of this Agreement, each Contributor hereby
|
||||
grants Recipient a non-exclusive, worldwide, royalty-free patent
|
||||
license under Licensed Patents to make, use, sell, offer to sell,
|
||||
import and otherwise transfer the Contribution of such Contributor,
|
||||
if any, in Source Code or other form. This patent license shall
|
||||
apply to the combination of the Contribution and the Program if, at
|
||||
the time the Contribution is added by the Contributor, such addition
|
||||
of the Contribution causes such combination to be covered by the
|
||||
Licensed Patents. The patent license shall not apply to any other
|
||||
combinations which include the Contribution. No hardware per se is
|
||||
licensed hereunder.
|
||||
|
||||
c) Recipient understands that although each Contributor grants the
|
||||
licenses to its Contributions set forth herein, no assurances are
|
||||
provided by any Contributor that the Program does not infringe the
|
||||
patent or other intellectual property rights of any other entity.
|
||||
Each Contributor disclaims any liability to Recipient for claims
|
||||
brought by any other entity based on infringement of intellectual
|
||||
property rights or otherwise. As a condition to exercising the
|
||||
rights and licenses granted hereunder, each Recipient hereby
|
||||
assumes sole responsibility to secure any other intellectual
|
||||
property rights needed, if any. For example, if a third party
|
||||
patent license is required to allow Recipient to Distribute the
|
||||
Program, it is Recipient's responsibility to acquire that license
|
||||
before distributing the Program.
|
||||
|
||||
d) Each Contributor represents that to its knowledge it has
|
||||
sufficient copyright rights in its Contribution, if any, to grant
|
||||
the copyright license set forth in this Agreement.
|
||||
|
||||
e) Notwithstanding the terms of any Secondary License, no
|
||||
Contributor makes additional grants to any Recipient (other than
|
||||
those set forth in this Agreement) as a result of such Recipient's
|
||||
receipt of the Program under the terms of a Secondary License
|
||||
(if permitted under the terms of Section 3).
|
||||
|
||||
3. REQUIREMENTS
|
||||
|
||||
3.1 If a Contributor Distributes the Program in any form, then:
|
||||
|
||||
a) the Program must also be made available as Source Code, in
|
||||
accordance with section 3.2, and the Contributor must accompany
|
||||
the Program with a statement that the Source Code for the Program
|
||||
is available under this Agreement, and informs Recipients how to
|
||||
obtain it in a reasonable manner on or through a medium customarily
|
||||
used for software exchange; and
|
||||
|
||||
b) the Contributor may Distribute the Program under a license
|
||||
different than this Agreement, provided that such license:
|
||||
i) effectively disclaims on behalf of all other Contributors all
|
||||
warranties and conditions, express and implied, including
|
||||
warranties or conditions of title and non-infringement, and
|
||||
implied warranties or conditions of merchantability and fitness
|
||||
for a particular purpose;
|
||||
|
||||
ii) effectively excludes on behalf of all other Contributors all
|
||||
liability for damages, including direct, indirect, special,
|
||||
incidental and consequential damages, such as lost profits;
|
||||
|
||||
iii) does not attempt to limit or alter the recipients' rights
|
||||
in the Source Code under section 3.2; and
|
||||
|
||||
iv) requires any subsequent distribution of the Program by any
|
||||
party to be under a license that satisfies the requirements
|
||||
of this section 3.
|
||||
|
||||
3.2 When the Program is Distributed as Source Code:
|
||||
|
||||
a) it must be made available under this Agreement, or if the
|
||||
Program (i) is combined with other material in a separate file or
|
||||
files made available under a Secondary License, and (ii) the initial
|
||||
Contributor attached to the Source Code the notice described in
|
||||
Exhibit A of this Agreement, then the Program may be made available
|
||||
under the terms of such Secondary Licenses, and
|
||||
|
||||
b) a copy of this Agreement must be included with each copy of
|
||||
the Program.
|
||||
|
||||
3.3 Contributors may not remove or alter any copyright, patent,
|
||||
trademark, attribution notices, disclaimers of warranty, or limitations
|
||||
of liability ("notices") contained within the Program from any copy of
|
||||
the Program which they Distribute, provided that Contributors may add
|
||||
their own appropriate notices.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
Commercial distributors of software may accept certain responsibilities
|
||||
with respect to end users, business partners and the like. While this
|
||||
license is intended to facilitate the commercial use of the Program,
|
||||
the Contributor who includes the Program in a commercial product
|
||||
offering should do so in a manner which does not create potential
|
||||
liability for other Contributors. Therefore, if a Contributor includes
|
||||
the Program in a commercial product offering, such Contributor
|
||||
("Commercial Contributor") hereby agrees to defend and indemnify every
|
||||
other Contributor ("Indemnified Contributor") against any losses,
|
||||
damages and costs (collectively "Losses") arising from claims, lawsuits
|
||||
and other legal actions brought by a third party against the Indemnified
|
||||
Contributor to the extent caused by the acts or omissions of such
|
||||
Commercial Contributor in connection with its distribution of the Program
|
||||
in a commercial product offering. The obligations in this section do not
|
||||
apply to any claims or Losses relating to any actual or alleged
|
||||
intellectual property infringement. In order to qualify, an Indemnified
|
||||
Contributor must: a) promptly notify the Commercial Contributor in
|
||||
writing of such claim, and b) allow the Commercial Contributor to control,
|
||||
and cooperate with the Commercial Contributor in, the defense and any
|
||||
related settlement negotiations. The Indemnified Contributor may
|
||||
participate in any such claim at its own expense.
|
||||
|
||||
For example, a Contributor might include the Program in a commercial
|
||||
product offering, Product X. That Contributor is then a Commercial
|
||||
Contributor. If that Commercial Contributor then makes performance
|
||||
claims, or offers warranties related to Product X, those performance
|
||||
claims and warranties are such Commercial Contributor's responsibility
|
||||
alone. Under this section, the Commercial Contributor would have to
|
||||
defend claims against the other Contributors related to those performance
|
||||
claims and warranties, and if a court requires any other Contributor to
|
||||
pay any damages as a result, the Commercial Contributor must pay
|
||||
those damages.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
||||
PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
|
||||
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
||||
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
|
||||
TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE. Each Recipient is solely responsible for determining the
|
||||
appropriateness of using and distributing the Program and assumes all
|
||||
risks associated with its exercise of rights under this Agreement,
|
||||
including but not limited to the risks and costs of program errors,
|
||||
compliance with applicable laws, damage to or loss of data, programs
|
||||
or equipment, and unavailability or interruption of operations.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
|
||||
PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
|
||||
SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
|
||||
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
|
||||
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
If any provision of this Agreement is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of
|
||||
the remainder of the terms of this Agreement, and without further
|
||||
action by the parties hereto, such provision shall be reformed to the
|
||||
minimum extent necessary to make such provision valid and enforceable.
|
||||
|
||||
If Recipient institutes patent litigation against any entity
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that the
|
||||
Program itself (excluding combinations of the Program with other software
|
||||
or hardware) infringes such Recipient's patent(s), then such Recipient's
|
||||
rights granted under Section 2(b) shall terminate as of the date such
|
||||
litigation is filed.
|
||||
|
||||
All Recipient's rights under this Agreement shall terminate if it
|
||||
fails to comply with any of the material terms or conditions of this
|
||||
Agreement and does not cure such failure in a reasonable period of
|
||||
time after becoming aware of such noncompliance. If all Recipient's
|
||||
rights under this Agreement terminate, Recipient agrees to cease use
|
||||
and distribution of the Program as soon as reasonably practicable.
|
||||
However, Recipient's obligations under this Agreement and any licenses
|
||||
granted by Recipient relating to the Program shall continue and survive.
|
||||
|
||||
Everyone is permitted to copy and distribute copies of this Agreement,
|
||||
but in order to avoid inconsistency the Agreement is copyrighted and
|
||||
may only be modified in the following manner. The Agreement Steward
|
||||
reserves the right to publish new versions (including revisions) of
|
||||
this Agreement from time to time. No one other than the Agreement
|
||||
Steward has the right to modify this Agreement. The Eclipse Foundation
|
||||
is the initial Agreement Steward. The Eclipse Foundation may assign the
|
||||
responsibility to serve as the Agreement Steward to a suitable separate
|
||||
entity. Each new version of the Agreement will be given a distinguishing
|
||||
version number. The Program (including Contributions) may always be
|
||||
Distributed subject to the version of the Agreement under which it was
|
||||
received. In addition, after a new version of the Agreement is published,
|
||||
Contributor may elect to Distribute the Program (including its
|
||||
Contributions) under the new version.
|
||||
|
||||
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
|
||||
receives no rights or licenses to the intellectual property of any
|
||||
Contributor under this Agreement, whether expressly, by implication,
|
||||
estoppel or otherwise. All rights in the Program not expressly granted
|
||||
under this Agreement are reserved. Nothing in this Agreement is intended
|
||||
to be enforceable by any entity that is not a Contributor or Recipient.
|
||||
No third-party beneficiary rights are created under this Agreement.
|
||||
|
||||
Exhibit A - Form of Secondary Licenses Notice
|
||||
|
||||
"This Source Code may also be made available under the following
|
||||
Secondary Licenses when the conditions for such availability set forth
|
||||
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
|
||||
version(s), and exceptions or additional permissions here}."
|
||||
|
||||
Simply including a copy of this Agreement, including this Exhibit A
|
||||
is not sufficient to license the Source Code under Secondary Licenses.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to
|
||||
look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
356
LICENSE-GPL-2.0-ONLY-CLASSPATH-EXCEPTION
Normal file
356
LICENSE-GPL-2.0-ONLY-CLASSPATH-EXCEPTION
Normal file
@@ -0,0 +1,356 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
Class Path Exception
|
||||
|
||||
Linking this library statically or dynamically with other modules is making
|
||||
a combined work based on this library. Thus, the terms and conditions of
|
||||
the GNU General Public License cover the whole combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent modules,
|
||||
and to copy and distribute the resulting executable under terms of your
|
||||
choice, provided that you also meet, for each linked independent module,
|
||||
the terms and conditions of the license of that module. An independent
|
||||
module is a module which is not derived from or based on this library. If
|
||||
you modify this library, you may extend this exception to your version of
|
||||
the library, but you are not obligated to do so. If you do not wish to do
|
||||
so, delete this exception statement from your version.
|
||||
34
LICENSE-MIT.txt
Normal file
34
LICENSE-MIT.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
This license covers code in the repository with the MIT license header:
|
||||
|
||||
// *****************************************************************************
|
||||
// Copyright (C) {year, original author} and others.
|
||||
//
|
||||
// This file is licensed under the MIT License.
|
||||
// See LICENSE-MIT.txt in the project root for license information.
|
||||
// https://opensource.org/license/mit.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
// *****************************************************************************
|
||||
|
||||
-----
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
29
LICENSE-vscode.txt
Normal file
29
LICENSE-vscode.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
Below is the full text of vscode's MIT license, copied from the link below (it has not changed except cosmetically, since the Theia project was started):
|
||||
|
||||
https://github.com/microsoft/vscode/blob/2dd03eaebe21473f3af6df2a229199b9aa138e97/LICENSE.txt
|
||||
|
||||
This license covers code originally copied from the vscode repository and integrated in this project.
|
||||
|
||||
-----
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2015 - present Microsoft Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
471
NOTICE.md
Normal file
471
NOTICE.md
Normal file
@@ -0,0 +1,471 @@
|
||||
# Notices for Eclipse Theia
|
||||
|
||||
This content is produced and maintained by the Eclipse Theia project.
|
||||
|
||||
* Project home: <https://projects.eclipse.org/projects/ecd.theia>
|
||||
|
||||
## Trademarks
|
||||
|
||||
Eclipse Theia is a trademark of the Eclipse Foundation.
|
||||
|
||||
## Copyright
|
||||
|
||||
All content is the property of the respective authors or their employers. For
|
||||
more information regarding authorship of content, please consult the listed
|
||||
source code repository logs.
|
||||
|
||||
## Declared Project Licenses
|
||||
|
||||
This program and the accompanying materials are made available under the terms
|
||||
of the Eclipse Public License v. 2.0 which is available at
|
||||
<https://www.eclipse.org/legal/epl-2.0>. This Source Code may also be made
|
||||
available under the following Secondary Licenses when the conditions for such
|
||||
availability set forth in the Eclipse Public License v. 2.0 are satisfied:
|
||||
(secondary) GPL-2.0 with Classpath-exception-2.0 which is available at GNU
|
||||
General Public License v2.0 w/Classpath exception',
|
||||
'<https://www.gnu.org/software/classpath/license.html>.
|
||||
|
||||
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
|
||||
## Source Code
|
||||
|
||||
The project maintains the following source code repositories:
|
||||
|
||||
* <https://github.com/eclipse-theia/theia>
|
||||
* <https://github.com/eclipse/theia-generator-plugin>
|
||||
* <https://github.com/eclipse/theia-yeoman-plugin>
|
||||
* <https://github.com/eclipse/theia-plugin-packager>
|
||||
* <https://github.com/eclipse-theia/theia-cpp-extensions>
|
||||
* <https://github.com/eclipse/theia-python-extension>
|
||||
* <https://github.com/eclipse/theia-java-extension>
|
||||
* <https://github.com/eclipse-theia/theia-example>
|
||||
* <https://github.com/eclipse-theia/cryptodetector>
|
||||
* <https://github.com/eclipse-theia/generator-theia-extension>
|
||||
|
||||
## Third-party Content
|
||||
|
||||
This project leverages the following third party content.
|
||||
|
||||
chalk (2.4.1)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/chalk/chalk>
|
||||
* Source: <https://github.com/chalk/chalk>
|
||||
|
||||
code copied from project cortex-debug (0.1.21)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from project Microsoft/vscode (1.31.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from project Microsoft/vscode (1.32.3)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://code.visualstudio.com/>
|
||||
* Source: <https://github.com/Microsoft/vscode>
|
||||
|
||||
Code copied from project Microsoft/vscode (1.32.3)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project microsoft/vscode (1.33.1)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from project Microsoft/vscode (1.33.1)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from project Microsoft/vscode (1.34.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from project microsoft/vscode (1.41.1)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project vscode (1.26.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project vscode (1.31.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project vscode (1.33.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project vscode (1.33.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project vscode (1.34.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project vscode (1.36.1)
|
||||
|
||||
code copied from project vscode (1.36.1)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project vscode (1.37.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project vscode (1.37.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
code copied from project vscode-browser-preview (0.4.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from VS Code (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from VSCode (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from vscode (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from VSCode (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Code copied from VSCode (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Copied code from project VSCode (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
CSS copied from VS Code (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
dugite (1.52.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
Electron (3.1.7)
|
||||
|
||||
* License: BSD-2-Clause AND BSD-3-Clause AND (MIT OR GPL-2.0) AND Apache-2.0
|
||||
AND (BSD-2-Clause OR MIT OR Apache-2.0) AND ISC AND MIT AND X11 AND
|
||||
BSD-2-Clause-FreeBSD AND Public-Domain AND Unlicense AND MPL-2.0 AND
|
||||
(BSD-3-Clause OR MPL-2.0) AND CC-BY-3.0 AND (AFL-2.0
|
||||
|
||||
Electron (4.2.11)
|
||||
|
||||
* License: MIT AND BSD-3-Clause AND LicenseRef-Public-Domain
|
||||
|
||||
Electron (9.0.2)
|
||||
|
||||
* License: MIT AND BSD-3-Clause AND LicenseRef-Public-Domain
|
||||
|
||||
electron@2.0.14 (2.0.14)
|
||||
|
||||
* License: MIT AND BSD-2-Clause AND Apache-2.0 AND (AFL-2.1 OR BSD-3-Clause)
|
||||
AND BSD-3-Clause AND ISC AND X11 AND Public-Domain AND (GPL-2.0 OR MIT) AND
|
||||
Unlicense AND IJG AND ICU AND UNICODE-TOU AND NTP AND (MIT OR BSD-3-Clause)
|
||||
AND Libpng AND MPL-2.0 AND LGPL-2.1+
|
||||
* Project: <https://github.com/electron/electron>
|
||||
* Source: <https://github.com/electron/electron/releases/tag/v2.0.14>
|
||||
|
||||
getmac (1.4.6)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/bevry/getmac>
|
||||
* Source: <https://github.com/bevry/getmac>
|
||||
|
||||
GH-3397: Implemented the HTTP-based authentication for Git in Electron. (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
glob promise (3.4.0)
|
||||
|
||||
* License: ISC
|
||||
* Project: <https://github.com/ahmadnassri/glob-promise>
|
||||
* Source: <https://github.com/ahmadnassri/glob-promise>
|
||||
|
||||
Icon configure-inverse.svg (n/a)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/Microsoft/vscode>
|
||||
* Source:
|
||||
<https://github.com/Microsoft/vscode/blob/1.35.1/src/vs/workbench/contrib/tasks/common/media/configure-inverse.svg#L1>
|
||||
|
||||
Icons copied from microsoft/vscode-icons version:
|
||||
b73945c70f1117c4e65939dd3e10bdd623cb4ef3 (n/a)
|
||||
|
||||
* License: CC-BY-4.0
|
||||
|
||||
inversify (5.0.1)
|
||||
|
||||
* License: MIT
|
||||
|
||||
jschardet (1.6.0)
|
||||
|
||||
* License: (LGPL-2.1 OR LGPL-2.1+) AND (MIT OR GPL-2.0)
|
||||
* Project: <https://www.npmjs.com/package/jschardet>
|
||||
* Source:
|
||||
<https://github.com/aadsm/jschardet/tree/28152dd8db5904dc2cf9aa12ef4f8783f713e79a>
|
||||
|
||||
jschardet (2.1.1)
|
||||
|
||||
* License: LGPL-2.1 OR LGPL-2.1+
|
||||
|
||||
libffmpeg (FFmpeg) Delivered with Electron (3.1.7)
|
||||
|
||||
* License: LGPL-2.1+
|
||||
|
||||
libffmpeg (FFmpeg) delivered with Electron (4.2.11)
|
||||
|
||||
* License: LGPG-2.1-or-later AND BSD-3-Clause AND MIT AND IJG
|
||||
|
||||
libffmpeg (FFmpeg) delivered with Electron (9.0.2)
|
||||
|
||||
* License: LGPG-2.1-or-later AND BSD-3-Clause AND MIT AND IJG
|
||||
|
||||
long.js (3.2.0)
|
||||
|
||||
* License: Apache-2.0
|
||||
|
||||
micromatch (3.1.10)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/micromatch/micromatch>
|
||||
* Source: <https://github.com/micromatch/micromatch>
|
||||
|
||||
monaco-typescript (2.3.0)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/Microsoft/monaco-typescript>
|
||||
* Source: <https://github.com/Microsoft/monaco-typescript.git>
|
||||
|
||||
native-keymap (1.2.5)
|
||||
|
||||
* License: BSD-3-Clause AND MIT
|
||||
* Project: <https://github.com/Microsoft/node-native-keymap>
|
||||
* Source: <https://github.com/Microsoft/node-native-keymap>
|
||||
|
||||
node-oniguruma (n/a)
|
||||
|
||||
* License: BSD-2-Clause AND GPL-2.0 WITH Autoconf-exception-2.0 AND
|
||||
GPL-2.0-or-later WITH libtool-exception AND X11 AND MIT AND Public-Domain
|
||||
|
||||
node.js dependencies for Theia (n/a)
|
||||
|
||||
* License: MIT AND BSD-3-Clause AND ISC AND Apache-2.0 AND BSD-2-Clause AND
|
||||
Zlib AND X11 AND (BSD-3-Clause OR AFL-2.1) AND CC-By-4.0 AND CC-by-2.5-SA AND
|
||||
CC0-1.0 AND (BSD-3-Clause OR MPL-2.0) AND Unlicense AND (MIT OR GPL-3.0) AND
|
||||
(MIT OR GPL-2.0) AND (Apache-2.0 OR
|
||||
|
||||
Preference code copied from vscode (n/a)
|
||||
|
||||
ps-list (5.0.1)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/sindresorhus/ps-list>
|
||||
* Source: <https://github.com/sindresorhus/ps-list>
|
||||
|
||||
react-perfect-scrollbar:1.5.3 (1.5.3)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/goldenyz/react-perfect-scrollbar>
|
||||
* Source: <https://github.com/goldenyz/react-perfect-scrollbar>
|
||||
|
||||
read-pkg (4.0.1)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/sindresorhus/read-pkg>
|
||||
* Source: <https://github.com/sindresorhus/read-pkg>
|
||||
|
||||
regular expressions and helper function copied from microsoft/vscode (1.33.1)
|
||||
|
||||
* License: MIT
|
||||
|
||||
requestretry (3.1.0)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/FGRibreau/node-request-retry>
|
||||
* Source: <https://github.com/FGRibreau/node-request-retry>
|
||||
|
||||
rimraf (2.6.2)
|
||||
|
||||
* License: ISC
|
||||
|
||||
textmate/tcl.tmbundle (n/a)
|
||||
|
||||
* License: LicenseRef-Php_Tmbundle
|
||||
|
||||
theia npm node (n/a)
|
||||
|
||||
* License: BSD-2-Clause OR (MIT OR Apache-2.0) AND (AFL-2.1 OR BSD-3-Clause)
|
||||
AND Apache-2.0 AND Artistic-2.0 AND BSD-3-Clause AND (BSD-3-Clause OR MIT)
|
||||
AND MPL-2.0 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-BY-SA-2.5 AND
|
||||
GPL-2.0 WITH Autoconf-exception
|
||||
|
||||
theia-cpp-extension npm node (n/a)
|
||||
|
||||
* License: BSD-2-Clause OR (MIT OR Apache-2.0) AND MIT AND BSD-3-Clause AND
|
||||
Zlib AND (MIT OR GPL-3.0) AND OFL-1.1 AND Apache-2.0 AND CC0-1.0 AND
|
||||
CC-BY-3.0 AND ISC AND MPL-2.0 AND License-Ref-Public-Domain AND BSL-1.0 AND
|
||||
(AFL-2.1 OR BSD-3.0) AND Unlicense AND Artist
|
||||
|
||||
tslint (5.10.0)
|
||||
|
||||
* License: Apache-2.0 AND MIT
|
||||
* Project: <http://palantir.github.io/tslint/>
|
||||
* Source: <https://github.com/palantir/tslint>
|
||||
|
||||
typefox/monaco-language-client (0.5.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
typescript-formatter (7.2.2)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/vvakame/typescript-formatter>
|
||||
* Source: <https://github.com/vvakame/typescript-formatter>
|
||||
|
||||
VS Code (1.33.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
VS Code built-in extensions (1.30.1)
|
||||
|
||||
* License: Apache-2.0 AND MIT AND Unicode-DFS-2016 AND CC-BY-4.0 AND W3C
|
||||
|
||||
vscode (1.26.0)
|
||||
|
||||
* License: MIT AND LicenseRef-Php_Tmbundle
|
||||
|
||||
vscode (1.26.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
vscode (1.31.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
vscode-debugadapter-node (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
vscode-icons (n/a)
|
||||
|
||||
* License: CC-BY-4.0 AND MIT
|
||||
|
||||
vscode-java (0.36.0)
|
||||
|
||||
* License: EPL-1.0
|
||||
|
||||
vscode-java (0.44.0)
|
||||
|
||||
* License: EPL-1.0
|
||||
|
||||
vscode-java-debug (0.15.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
webdriverio (n/a)
|
||||
|
||||
* License: MIT
|
||||
* Project: <http://webdriver.io/>
|
||||
* Source: <https://github.com/webdriverio/webdriverio.git>
|
||||
|
||||
when (3.7.8)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://github.com/cujojs/when>
|
||||
* Source: <https://github.com/cujojs/when>
|
||||
|
||||
wjordan/browser-path SHA6719d19077b1454bff8b802f9be79cb1b69ebe7e (n/a)
|
||||
|
||||
* License: MIT
|
||||
|
||||
xterm-addon-fit (0.3.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
xterm-addon-search (0.5.0)
|
||||
|
||||
* License: MIT
|
||||
|
||||
xterm.js (3.9.1)
|
||||
|
||||
* License: MIT
|
||||
* Project: <https://xtermjs.org/>
|
||||
* Source: <https://github.com/xtermjs/xterm.js>
|
||||
|
||||
xterm.js (4.4)
|
||||
|
||||
* License: MIT
|
||||
|
||||
yargs (12.0.1)
|
||||
|
||||
* License: MIT
|
||||
* Project: <http://yargs.js.org/>
|
||||
* Source: <https://github.com/yargs/yargs>
|
||||
|
||||
yeoman environment (2.3.0)
|
||||
|
||||
* License: BSD-2-Clause AND BSD-3-Clause
|
||||
* Project: <https://github.com/yeoman/environment>
|
||||
* Source: <https://github.com/yeoman/environment>
|
||||
|
||||
yeoman generator (3.0.0)
|
||||
|
||||
* License: BSD-2-Clause AND BSD-3-Clause
|
||||
* Project: <http://yeoman.io>
|
||||
* Source: <https://github.com/yeoman/generator>
|
||||
|
||||
yeoman-generator (2.0)
|
||||
|
||||
* License: BSD-2-Clause
|
||||
* Project: <http://yeoman.io/>
|
||||
* Source: <https://github.com/yeoman/generator>
|
||||
|
||||
yosay (2.0.2)
|
||||
|
||||
* License: BSD-2-Clause
|
||||
* Project: <https://github.com/yeoman/yosay>
|
||||
* Source: <https://github.com/yeoman/yosay>
|
||||
|
||||
## Cryptography
|
||||
|
||||
Content may contain encryption software. The country in which you are currently
|
||||
may have restrictions on the import, possession, and use, and/or re-export to
|
||||
another country, of encryption software. BEFORE using any encryption software,
|
||||
please check the country's laws, regulations and policies concerning the import,
|
||||
possession, or use, and re-export of encryption software, to see if this is
|
||||
permitted.
|
||||
|
||||
## Electron
|
||||
|
||||
NOTICE:
|
||||
|
||||
Please note Electron combines Chromium and Node.js into a single runtime.
|
||||
While Electron, Chromium and Node.js are generally licensed under very
|
||||
permissive MIT and BSD-3-Clause licenses, both Electron and Chromium distribute
|
||||
FFmpeg. While FFmpeg is under the LGPL-2.1-or-later license it incorporates
|
||||
several optional parts and optimizations that are covered by the
|
||||
GPL-2.0-or-later. We understand both Electron and Chromium do not distribute
|
||||
versions of FFmpeg with GPL content enabled; however, FFmpeg may be configured
|
||||
enabled to work with proprietary codecs. It is our understanding these
|
||||
proprietary codecs may be patented; and as a result, may be subject to
|
||||
licensing fees.
|
||||
|
||||
We strongly recommend downstream consumers verify the type of FFmpeg support
|
||||
configured and modify as required. More information on instructions to verify
|
||||
can be found here
|
||||
<https://github.com/electron/electron/blob/c75c3ef61689733cf422c2cc76d51ce05033be33/docs/development/upgrading-chromium.md#verify-ffmpeg-support>
|
||||
130
README.md
Normal file
130
README.md
Normal file
@@ -0,0 +1,130 @@
|
||||
<br/>
|
||||
<div id="theia-logo" align="center">
|
||||
<br />
|
||||
<img src="https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia-logo-gray.svg?sanitize=true" alt="Theia Logo" width="300"/>
|
||||
<h3>Cloud & Desktop IDE Framework</h3>
|
||||
</div>
|
||||
|
||||
<div id="badges" align="center">
|
||||
|
||||
[](https://github.com/eclipse-theia/theia/labels/help%20wanted)
|
||||
[](https://github.com/eclipse-theia/theia/actions/workflows/ci-cd.yml?query=branch%3Amaster)
|
||||
[](https://github.com/eclipse-theia/vscode-builtin-extensions/actions/workflows/build.yml?query=branch%3Amaster)
|
||||
[](https://github.com/eclipse-theia/theia/discussions/categories/q-a)
|
||||
[](https://github.com/eclipse-theia/theia/labels/bug)
|
||||
|
||||
Eclipse Theia is an extensible framework to develop full-fledged multi-language Cloud & Desktop IDEs and tools with state-of-the-art web technologies.
|
||||
|
||||
</div>
|
||||
|
||||
- [Website](#website)
|
||||
- [Repositories](#repositories)
|
||||
- [Releases](#releases)
|
||||
- [Scope](#scope)
|
||||
- [Roadmap](#roadmap)
|
||||
- [Getting Started](#getting-started)
|
||||
- [Contributing](#contributing)
|
||||
- [Feedback](#feedback)
|
||||
- [Documentation](#documentation)
|
||||
- [License](#license)
|
||||
- [Trademark](#trademark)
|
||||
|
||||
<div style='margin:0 auto;width:60%;'>
|
||||
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
## Website
|
||||
|
||||
[Visit the Eclipse Theia website](http://www.theia-ide.org) for more information and [the Theia documentation](http://www.theia-ide.org/docs).
|
||||
|
||||
## Repositories
|
||||
|
||||
This is the main repository for the Eclipse Theia project, containing the sources of the Theia Platform. Please open generic discussions, bug reports and feature requests about Theia on this repository. The Theia project also includes additional repositories, e.g. for the [artifacts building the Theia IDE](https://github.com/eclipse-theia/theia-blueprint) and the [Theia website](https://github.com/eclipse-theia/theia-website). Please also see the [overview of all Theia project repositories](https://github.com/eclipse-theia).
|
||||
|
||||
## Releases
|
||||
|
||||
- [All available releases](https://github.com/eclipse-theia/theia/releases) are available on GitHub including changelogs.
|
||||
- [Detailed release announcements](https://theia-ide.org/resources/) are linked on the Theia website.
|
||||
- [Community Releases](https://theia-ide.org/releases/) are listed on the Theia website.
|
||||
- [Visit the release website](https://theia-ide.org/releases/) for more information.
|
||||
|
||||
## Scope
|
||||
|
||||
- Support building browser-based and desktop IDEs and tools
|
||||
- Provide a highly flexible architecture for adopters
|
||||
- Support VS Code Extension protocol
|
||||
- Develop under vendor-neutral open-source governance
|
||||
|
||||
[More details on the project goals](https://theia-ide.org/docs/project_goals/) are available on the Theia website.
|
||||
|
||||
## Roadmap
|
||||
|
||||
See [our roadmap](https://github.com/eclipse-theia/theia/wiki/Eclipse-Theia-Roadmap) for an overview about the current project goals and the upcoming releases.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Here you can find guides and examples for common scenarios to adopt Theia:
|
||||
|
||||
- [Get an overview of how to get started](https://theia-ide.org/#gettingstarted) on the Theia website
|
||||
- [Develop a Theia application - your own IDE/Tool](https://theia-ide.org/docs/composing_applications/)
|
||||
- [Learn about Theia's extension mechanisms](https://theia-ide.org/docs/extensions/)
|
||||
- [Develop a VS Code like extension](https://theia-ide.org/docs/authoring_vscode_extensions/)
|
||||
- [Develop a Theia extension](https://theia-ide.org/docs/authoring_extensions/)
|
||||
- [Test a VS Code extension in Theia](https://github.com/eclipse-theia/theia/wiki/Testing-VS-Code-extensions)
|
||||
- [Package a desktop Theia application with Electron](https://theia-ide.org/docs/blueprint_documentation/)
|
||||
|
||||
## Contributing
|
||||
|
||||
Read below to learn how to take part in improving Theia:
|
||||
|
||||
- Fork the repository and [run the examples from source](doc/Developing.md#quick-start)
|
||||
- Get familiar with [the development workflow](doc/Developing.md), [Coding Guidelines](doc/coding-guidelines.md), [Code of Conduct](CODE_OF_CONDUCT.md) and [sign the Eclipse contributor agreement](CONTRIBUTING.md#eclipse-contributor-agreement)
|
||||
- Find an issue to work on and submit a pull request
|
||||
- First time contributing to open source? Pick a [good first issue](https://github.com/eclipse-theia/theia/labels/good%20first%20issue) to get you familiar with GitHub contributing process.
|
||||
- First time contributing to Theia? Pick a [beginner friendly issue](https://github.com/eclipse-theia/theia/labels/beginners) to get you familiar with codebase and our contributing process.
|
||||
- Want to become a Committer? Solve an issue showing that you understand Theia objectives and architecture. [Here](https://github.com/eclipse-theia/theia/labels/help%20wanted) is a good list to start. Further, have a look at our [roadmap](https://github.com/eclipse-theia/theia/wiki/Eclipse-Theia-Roadmap) to align your contributions with the current project goals.
|
||||
- Could not find an issue? Look for bugs, typos, and missing features.
|
||||
|
||||
## Feedback
|
||||
|
||||
Read below how to engage with Theia community:
|
||||
|
||||
- Join the discussion on [GitHub](https://github.com/eclipse-theia/theia/discussions).
|
||||
- Ask a question, request a new feature and file a bug with [GitHub issues](https://github.com/eclipse-theia/theia/issues/new/choose).
|
||||
- Vote on existing GitHub issues by reacting with a 👍. We regularly check issues with votes!
|
||||
- Star the repository to show your support.
|
||||
- Follow Theia on [X](https://x.com/theia_ide).
|
||||
- Join the [weekly developer call](https://github.com/eclipse-theia/theia/wiki/Dev-Meetings)
|
||||
|
||||
## Documentation
|
||||
|
||||
- [API Documentation](https://eclipse-theia.github.io/theia/docs/next/index.html)
|
||||
- [General Documentation](https://theia-ide.org/docs/)
|
||||
- [VS Code API Compatibility Report](https://eclipse-theia.github.io/vscode-theia-comparator/status.html)
|
||||
- Useful Links:
|
||||
- [Developing](doc/Developing.md)
|
||||
- [Testing](doc/Testing.md)
|
||||
- [Migration Guide](doc/Migration.md)
|
||||
- [API Integration Testing](doc/api-testing.md)
|
||||
- [Coding Guidelines](doc/coding-guidelines.md)
|
||||
- [Code Organization](doc/code-organization.md)
|
||||
- [Plugin and VSCode API](doc/Plugin-API.md)
|
||||
|
||||
## SBOM
|
||||
|
||||
To enhance supply chain security and offer users clear insight into project components, Eclipse Theia now generates a Software Bill of Materials (SBOM) for every release. These are published to the Eclipse Foundation SBOM registry, with access instructions and usage details available in this [documentation](https://eclipse-csi.github.io/security-handbook/sbom/registry.html).
|
||||
|
||||
## License
|
||||
|
||||
- [Eclipse Public License 2.0](LICENSE-EPL)
|
||||
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](LICENSE-GPL-2.0-ONLY-CLASSPATH-EXCEPTION)
|
||||
|
||||
## Trademark
|
||||
|
||||
"Theia" is a **trademark of the Eclipse Foundation**. [Learn More](https://www.eclipse.org/theia)
|
||||
|
||||
<!-- Webhook test: Tue Feb 17 12:26:25 PST 2026 -->
|
||||
|
||||
<!-- Auto-deploy test: Tue Feb 17 12:30:53 PST 2026 -->
|
||||
11
SECURITY.md
Normal file
11
SECURITY.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Eclipse Theia Vulnerability Reporting Policy
|
||||
|
||||
If you think or suspect that you have discovered a new security vulnerability
|
||||
in this project, please __do not__ disclose it on GitHub, e.g. in an issue, a
|
||||
PR, or a discussion. Any such disclosure will be removed/deleted on sight, to
|
||||
promote orderly disclosure, as per the Eclipse Foundation Security Policy (1).
|
||||
|
||||
Instead, please report any potential vulnerability to the Eclipse Foundation [Security Team](https://www.eclipse.org/security/). Make sure to provide a concise description of the issue, a CWE, and other supporting information.
|
||||
|
||||
(1) _Eclipse Foundation Vulnerability Reporting Policy_:
|
||||
[https://www.eclipse.org/security/policy.php](https://www.eclipse.org/security/policy.php)
|
||||
68
cloudbuild-custom.yaml
Normal file
68
cloudbuild-custom.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
availableSecrets:
|
||||
secretManager:
|
||||
- versionName: projects/master-ai-484822/secrets/gitea-token/versions/latest
|
||||
env: GITEA_TOKEN
|
||||
|
||||
steps:
|
||||
# Step 1: Clone the repo from Gitea (master branch has our startup script + vibn.css)
|
||||
- name: 'alpine/git'
|
||||
entrypoint: sh
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
git clone --depth=1 -b master \
|
||||
https://oauth2:$$GITEA_TOKEN@git.vibnai.com/mark/theia-code-os.git \
|
||||
/workspace/src && \
|
||||
echo "Cloned commit: $(git -C /workspace/src rev-parse --short HEAD)"
|
||||
secretEnv: ['GITEA_TOKEN']
|
||||
|
||||
# Step 2: Build image FROM upstream Theia Blueprint — no compilation needed
|
||||
# Just adds startup-custom.sh and vibn.css on top of the pre-built Blueprint image
|
||||
- name: 'gcr.io/cloud-builders/docker'
|
||||
args:
|
||||
- build
|
||||
- -f
|
||||
- /workspace/src/Dockerfile.custom
|
||||
- -t
|
||||
- northamerica-northeast1-docker.pkg.dev/master-ai-484822/vibn-ide/theia:latest
|
||||
- /workspace/src
|
||||
|
||||
# Step 3: Push to Artifact Registry
|
||||
- name: 'gcr.io/cloud-builders/docker'
|
||||
args:
|
||||
- push
|
||||
- northamerica-northeast1-docker.pkg.dev/master-ai-484822/vibn-ide/theia:latest
|
||||
|
||||
# Step 4: Roll out new image to all active Cloud Run workspace services
|
||||
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:slim'
|
||||
entrypoint: bash
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
IMAGE="northamerica-northeast1-docker.pkg.dev/master-ai-484822/vibn-ide/theia:latest"
|
||||
|
||||
SERVICES=$$(gcloud run services list \
|
||||
--project=master-ai-484822 \
|
||||
--region=northamerica-northeast1 \
|
||||
--format="value(name)" \
|
||||
--filter="metadata.name:theia-")
|
||||
|
||||
for svc in $$SERVICES; do
|
||||
echo "Rolling out new image to $$svc..."
|
||||
gcloud run services update $$svc \
|
||||
--project=master-ai-484822 \
|
||||
--region=northamerica-northeast1 \
|
||||
--image=$$IMAGE \
|
||||
--quiet
|
||||
done
|
||||
echo "Rollout complete."
|
||||
|
||||
images:
|
||||
- northamerica-northeast1-docker.pkg.dev/master-ai-484822/vibn-ide/theia:latest
|
||||
|
||||
options:
|
||||
machineType: E2_HIGHCPU_32
|
||||
logging: CLOUD_LOGGING_ONLY
|
||||
|
||||
# Full source compile + webpack — needs ~20 minutes on 32-vCPU machine
|
||||
timeout: 2400s
|
||||
12
cloudbuild.yaml
Normal file
12
cloudbuild.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
steps:
|
||||
- name: 'gcr.io/cloud-builders/docker'
|
||||
args:
|
||||
- build
|
||||
- -f
|
||||
- Dockerfile.vibn
|
||||
- -t
|
||||
- northamerica-northeast1-docker.pkg.dev/master-ai-484822/vibn-ide/theia:latest
|
||||
- .
|
||||
images:
|
||||
- northamerica-northeast1-docker.pkg.dev/master-ai-484822/vibn-ide/theia:latest
|
||||
timeout: 1200s
|
||||
29
configs/base.eslintrc.json
Normal file
29
configs/base.eslintrc.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"ecmaVersion": 6,
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
}
|
||||
},
|
||||
"plugins": [
|
||||
"@theia",
|
||||
"@typescript-eslint",
|
||||
"@typescript-eslint/tslint",
|
||||
"import",
|
||||
"no-null",
|
||||
"eslint-plugin-deprecation",
|
||||
"eslint-plugin-react",
|
||||
"eslint-plugin-no-unsanitized"
|
||||
],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"mocha": true,
|
||||
"node": true
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"node_modules",
|
||||
"lib"
|
||||
]
|
||||
}
|
||||
30
configs/base.tsconfig.json
Normal file
30
configs/base.tsconfig.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitOverride": true,
|
||||
"noEmitOnError": false,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"strictNullChecks": true,
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"importHelpers": true,
|
||||
"downlevelIteration": true,
|
||||
"resolveJsonModule": true,
|
||||
"useDefineForClassFields": false,
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "Node",
|
||||
"target": "ES2023",
|
||||
"jsx": "react",
|
||||
"lib": [
|
||||
"ES2023",
|
||||
"DOM",
|
||||
"DOM.AsyncIterable"
|
||||
],
|
||||
"sourceMap": true
|
||||
}
|
||||
}
|
||||
12
configs/build.eslintrc.json
Normal file
12
configs/build.eslintrc.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": [
|
||||
"./base.eslintrc.json",
|
||||
"./errors.eslintrc.json"
|
||||
],
|
||||
"parserOptions": {
|
||||
"lib": [
|
||||
"ES2023",
|
||||
"DOM"
|
||||
]
|
||||
}
|
||||
}
|
||||
179
configs/errors.eslintrc.json
Normal file
179
configs/errors.eslintrc.json
Normal file
@@ -0,0 +1,179 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/eslintrc",
|
||||
"rules": {
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/indent": "off",
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/quotes": [
|
||||
"error",
|
||||
"single",
|
||||
{
|
||||
"avoidEscape": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/semi": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"@typescript-eslint/type-annotation-spacing": "error",
|
||||
"arrow-body-style": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-parens": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"camelcase": "off",
|
||||
"comma-dangle": "off",
|
||||
"curly": "error",
|
||||
"eol-last": "error",
|
||||
"eqeqeq": [
|
||||
"error",
|
||||
"smart"
|
||||
],
|
||||
"guard-for-in": "error",
|
||||
"id-blacklist": "off",
|
||||
"id-denylist": [
|
||||
"error",
|
||||
"await"
|
||||
],
|
||||
"id-match": "off",
|
||||
"max-len": [
|
||||
"error",
|
||||
{
|
||||
"code": 180
|
||||
}
|
||||
],
|
||||
"no-duplicate-imports": "error",
|
||||
"no-magic-numbers": "off",
|
||||
"no-multiple-empty-lines": [
|
||||
"error",
|
||||
{
|
||||
"max": 1
|
||||
}
|
||||
],
|
||||
"no-new-wrappers": "error",
|
||||
"no-null/no-null": "error",
|
||||
"no-shadow": "off",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"@typescript-eslint/no-shadow": [
|
||||
"error",
|
||||
{
|
||||
"hoist": "all"
|
||||
}
|
||||
],
|
||||
"no-tabs": "error",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unreachable": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-var": "error",
|
||||
"no-void": "error",
|
||||
"one-var": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"prefer-const": [
|
||||
"error",
|
||||
{
|
||||
"destructuring": "all"
|
||||
}
|
||||
],
|
||||
"radix": "off",
|
||||
"space-before-function-paren": [
|
||||
"error",
|
||||
{
|
||||
"anonymous": "always",
|
||||
"named": "never",
|
||||
"asyncArrow": "always"
|
||||
}
|
||||
],
|
||||
"spaced-comment": [
|
||||
"error",
|
||||
"always",
|
||||
{
|
||||
"exceptions": [
|
||||
"*",
|
||||
"+",
|
||||
"-",
|
||||
"/"
|
||||
]
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/tslint/config": [
|
||||
"error",
|
||||
{
|
||||
"rules": {
|
||||
"file-header": [
|
||||
true,
|
||||
{
|
||||
"allow-single-line-comments": true,
|
||||
"match": "SPDX-License-Identifier: EPL-2\\.0 OR GPL-2\\.0-only WITH Classpath-exception-2\\.0"
|
||||
}
|
||||
],
|
||||
"jsdoc-format": [
|
||||
true,
|
||||
"check-multiline-start"
|
||||
],
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-whitespace"
|
||||
],
|
||||
"typedef": [
|
||||
true,
|
||||
"call-signature",
|
||||
"property-declaration"
|
||||
],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"@theia/annotation-check": "error",
|
||||
"@theia/localization-check": "error",
|
||||
"@theia/no-src-import": "error",
|
||||
"@theia/runtime-import-check": "error",
|
||||
"@theia/shared-dependencies": "error",
|
||||
"import/no-extraneous-dependencies": "error",
|
||||
"import/no-dynamic-require": "error",
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
".",
|
||||
"./",
|
||||
"..",
|
||||
"../"
|
||||
]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"**/*.{spec,espec,slow-spec}.{js,ts,tsx}"
|
||||
],
|
||||
"rules": {
|
||||
"@theia/runtime-import-check": "off",
|
||||
"@theia/shared-dependencies": "off",
|
||||
"import/no-extraneous-dependencies": "off",
|
||||
"no-unused-expressions": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"**/electron-{node,main}/**"
|
||||
],
|
||||
"rules": {
|
||||
"import/no-dynamic-require": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
7
configs/license-check-config.json
Normal file
7
configs/license-check-config.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"project": "ecd.theia",
|
||||
"inputFile": "package-lock.json",
|
||||
"batch": 50,
|
||||
"timeout": 240,
|
||||
"summary": "license-check-summary.txt"
|
||||
}
|
||||
32
configs/merge.typedoc.json
Normal file
32
configs/merge.typedoc.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"$schema": "https://typedoc.org/schema.json",
|
||||
"entryPointStrategy": "merge",
|
||||
"entryPoints": [
|
||||
"../gh-pages/packages/*.json"
|
||||
],
|
||||
"out": "../gh-pages/docs/next",
|
||||
"readme": "../README.md",
|
||||
"favicon": "../logo/favicon.png",
|
||||
"hideGenerator": true,
|
||||
"navigation": {
|
||||
"includeFolders": false,
|
||||
},
|
||||
"navigationLinks": {
|
||||
"Eclipse Theia Website": "https://theia-ide.org/",
|
||||
"GitHub": "https://github.com/eclipse-theia/theia"
|
||||
},
|
||||
"searchInDocuments": true,
|
||||
"projectDocuments": [
|
||||
"../doc/Migration.md",
|
||||
"../doc/Plugin-API.md",
|
||||
"../doc/api-management.md",
|
||||
"../doc/api-testing.md",
|
||||
"../doc/Developing.md",
|
||||
"../doc/Testing.md",
|
||||
"../doc/code-organization.md",
|
||||
"../doc/coding-guidelines.md",
|
||||
],
|
||||
"headings": {
|
||||
"document": true
|
||||
}
|
||||
}
|
||||
8
configs/mocharc.yml
Normal file
8
configs/mocharc.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
require:
|
||||
- 'ignore-styles'
|
||||
- 'reflect-metadata/Reflect'
|
||||
- '@theia/test-setup'
|
||||
reporter: 'spec'
|
||||
watch-files:
|
||||
- '**/*.js'
|
||||
exit: true
|
||||
17
configs/nyc.json
Normal file
17
configs/nyc.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"src/typings",
|
||||
"src/**/*.spec.ts"
|
||||
],
|
||||
"reporter": [
|
||||
"html",
|
||||
"lcov"
|
||||
],
|
||||
"extension": [
|
||||
".ts"
|
||||
],
|
||||
"all": true
|
||||
}
|
||||
18
configs/package.typedoc.json
Normal file
18
configs/package.typedoc.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"$schema": "https://typedoc.org/schema.json",
|
||||
"entryPointStrategy": "expand",
|
||||
"exclude": [
|
||||
"**/*spec.ts",
|
||||
"**/*spec.tsx",
|
||||
"**/*test.ts",
|
||||
"**/*test.tsx",
|
||||
"**/src/**/test/**",
|
||||
"**/src/**/tests/**",
|
||||
"**/src/**/typings/**",
|
||||
],
|
||||
"hideGenerator": true,
|
||||
"searchInComments": true,
|
||||
"skipErrorChecking": true,
|
||||
"commentStyle": "all",
|
||||
"logLevel": "Error"
|
||||
}
|
||||
10
configs/warnings.eslintrc.json
Normal file
10
configs/warnings.eslintrc.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"plugins": [
|
||||
"deprecation"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/await-thenable": "warn",
|
||||
"no-return-await": "warn",
|
||||
"deprecation/deprecation": "warn"
|
||||
}
|
||||
}
|
||||
29
configs/xss.eslintrc.json
Normal file
29
configs/xss.eslintrc.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"extends": ["plugin:no-unsanitized/DOM"],
|
||||
"plugins": ["no-unsanitized", "react"],
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"no-unsanitized/method": [
|
||||
"warn", {
|
||||
"escape": {
|
||||
"methods": ["DOMPurify.sanitize"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"no-unsanitized/property": [
|
||||
"warn", {
|
||||
"escape": {
|
||||
"methods": ["DOMPurify.sanitize"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"no-eval": "warn",
|
||||
"no-implied-eval": "warn",
|
||||
"react/no-danger-with-children": "warn",
|
||||
"react/no-danger": "warn"
|
||||
}
|
||||
}
|
||||
72
deploy.sh
Executable file
72
deploy.sh
Executable file
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
# deploy.sh — Build Theia locally then push to Cloud Run
|
||||
#
|
||||
# Usage:
|
||||
# ./deploy.sh # full build + push + deploy
|
||||
# ./deploy.sh --skip-compile # just repackage + push (if already compiled)
|
||||
# ./deploy.sh --service theia-my-proj # target a specific Cloud Run service
|
||||
|
||||
set -e
|
||||
|
||||
IMAGE="northamerica-northeast1-docker.pkg.dev/master-ai-484822/vibn-ide/theia:latest"
|
||||
PROJECT="master-ai-484822"
|
||||
REGION="northamerica-northeast1"
|
||||
SERVICE="${SERVICE:-}" # optional: set via --service flag or env var
|
||||
|
||||
SKIP_COMPILE=false
|
||||
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
--skip-compile) SKIP_COMPILE=true ;;
|
||||
--service=*) SERVICE="${arg#*=}" ;;
|
||||
--service) shift; SERVICE="$1" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "🔧 Vibn IDE Deploy"
|
||||
echo " Image: $IMAGE"
|
||||
echo " Project: $PROJECT"
|
||||
echo ""
|
||||
|
||||
# ── Step 1: Compile Theia on the Mac ──────────────────────────────────────────
|
||||
if [ "$SKIP_COMPILE" = false ]; then
|
||||
echo "▶ Step 1/3: Compiling Theia (TypeScript + webpack)..."
|
||||
npm install --legacy-peer-deps
|
||||
npm run compile
|
||||
npm run build:browser
|
||||
echo "✓ Compile done"
|
||||
else
|
||||
echo "⏭ Skipping compile (--skip-compile)"
|
||||
fi
|
||||
|
||||
# ── Step 2: Build runtime Docker image (no compile, just COPY) ─────────────
|
||||
echo "▶ Step 2/3: Building runtime Docker image..."
|
||||
docker build \
|
||||
--platform linux/amd64 \
|
||||
-f Dockerfile.runtime \
|
||||
-t "$IMAGE" \
|
||||
.
|
||||
echo "✓ Docker image built"
|
||||
|
||||
# ── Step 3: Push to Artifact Registry ─────────────────────────────────────────
|
||||
echo "▶ Step 3/3: Pushing to Artifact Registry..."
|
||||
docker push "$IMAGE"
|
||||
echo "✓ Pushed: $IMAGE"
|
||||
|
||||
# ── Optional: Update a specific Cloud Run service ──────────────────────────────
|
||||
if [ -n "$SERVICE" ]; then
|
||||
echo "▶ Updating Cloud Run service: $SERVICE"
|
||||
gcloud run services update "$SERVICE" \
|
||||
--project="$PROJECT" \
|
||||
--region="$REGION" \
|
||||
--image="$IMAGE"
|
||||
echo "✓ Service updated"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "✅ Done! New image is live."
|
||||
echo ""
|
||||
echo "To update a specific Cloud Run service:"
|
||||
echo " gcloud run services update <service-name> \\"
|
||||
echo " --project=$PROJECT --region=$REGION \\"
|
||||
echo " --image=$IMAGE"
|
||||
13
dev-packages/application-manager/.eslintrc.js
Normal file
13
dev-packages/application-manager/.eslintrc.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
extends: [
|
||||
'../../configs/build.eslintrc.json'
|
||||
],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: 'tsconfig.json'
|
||||
},
|
||||
rules: {
|
||||
'import/no-dynamic-require': 'off'
|
||||
}
|
||||
};
|
||||
26
dev-packages/application-manager/README.md
Normal file
26
dev-packages/application-manager/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<div align='center'>
|
||||
|
||||
<br />
|
||||
|
||||
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
||||
|
||||
<h2>ECLIPSE THEIA - APPLICATION-MANAGER</h2>
|
||||
|
||||
<hr />
|
||||
|
||||
</div>
|
||||
|
||||
## Additional Information
|
||||
|
||||
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
||||
- [Theia - Website](https://theia-ide.org/)
|
||||
|
||||
## License
|
||||
|
||||
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
||||
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
||||
|
||||
## Trademark
|
||||
|
||||
"Theia" is a trademark of the Eclipse Foundation
|
||||
<https://www.eclipse.org/theia>
|
||||
81
dev-packages/application-manager/package.json
Normal file
81
dev-packages/application-manager/package.json
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"name": "@theia/application-manager",
|
||||
"version": "1.68.0",
|
||||
"description": "Theia application manager API.",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/eclipse-theia/theia.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/eclipse-theia/theia/issues"
|
||||
},
|
||||
"homepage": "https://github.com/eclipse-theia/theia",
|
||||
"files": [
|
||||
"lib",
|
||||
"src"
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"typings": "lib/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "theiaext build",
|
||||
"clean": "theiaext clean",
|
||||
"compile": "theiaext compile",
|
||||
"lint": "theiaext lint",
|
||||
"test": "theiaext test",
|
||||
"watch": "theiaext watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.10.0",
|
||||
"@babel/plugin-transform-classes": "^7.10.0",
|
||||
"@babel/plugin-transform-runtime": "^7.10.0",
|
||||
"@babel/preset-env": "^7.10.0",
|
||||
"@theia/application-package": "1.68.0",
|
||||
"@theia/ffmpeg": "1.68.0",
|
||||
"@theia/native-webpack-plugin": "1.68.0",
|
||||
"@types/fs-extra": "^4.0.2",
|
||||
"@types/semver": "^7.5.0",
|
||||
"babel-loader": "^8.2.2",
|
||||
"buffer": "^6.0.3",
|
||||
"compression-webpack-plugin": "^9.0.0",
|
||||
"copy-webpack-plugin": "^8.1.1",
|
||||
"css-loader": "^6.2.0",
|
||||
"@electron/rebuild": "^3.7.2",
|
||||
"fs-extra": "^4.0.2",
|
||||
"http-server": "^14.1.1",
|
||||
"ignore-loader": "^0.1.2",
|
||||
"less": "^3.0.3",
|
||||
"mini-css-extract-plugin": "^2.6.1",
|
||||
"node-loader": "^2.0.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"semver": "^7.5.4",
|
||||
"source-map": "^0.6.1",
|
||||
"source-map-loader": "^2.0.1",
|
||||
"source-map-support": "^0.5.19",
|
||||
"style-loader": "^2.0.0",
|
||||
"tslib": "^2.6.2",
|
||||
"umd-compat-loader": "^2.1.2",
|
||||
"webpack": "^5.76.0",
|
||||
"webpack-cli": "4.7.0",
|
||||
"worker-loader": "^3.0.8",
|
||||
"yargs": "^15.3.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@theia/electron": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@theia/electron": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@theia/ext-scripts": "1.68.0"
|
||||
},
|
||||
"nyc": {
|
||||
"extends": "../../configs/nyc.json"
|
||||
},
|
||||
"gitHead": "21358137e41342742707f660b8e222f940a27652"
|
||||
}
|
||||
@@ -0,0 +1,263 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as cp from 'child_process';
|
||||
import * as semver from 'semver';
|
||||
import { ApplicationPackage, ApplicationPackageOptions } from '@theia/application-package';
|
||||
import { WebpackGenerator, FrontendGenerator, BackendGenerator } from './generator';
|
||||
import { ApplicationProcess } from './application-process';
|
||||
import { GeneratorOptions } from './generator/abstract-generator';
|
||||
import yargs = require('yargs');
|
||||
|
||||
// Declare missing exports from `@types/semver@7`
|
||||
declare module 'semver' {
|
||||
function minVersion(range: string): string;
|
||||
}
|
||||
|
||||
class AbortError extends Error {
|
||||
constructor(...args: Parameters<ErrorConstructor>) {
|
||||
super(...args);
|
||||
Object.setPrototypeOf(this, AbortError.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
export class ApplicationPackageManager {
|
||||
|
||||
static defineGeneratorOptions<T>(cli: yargs.Argv<T>): yargs.Argv<T & {
|
||||
mode: 'development' | 'production'
|
||||
splitFrontend?: boolean
|
||||
}> {
|
||||
return cli
|
||||
.option('mode', {
|
||||
description: 'Generation mode to use',
|
||||
choices: ['development', 'production'],
|
||||
default: 'production' as const,
|
||||
})
|
||||
.option('split-frontend', {
|
||||
description: 'Split frontend modules into separate chunks. By default enabled in the `development` mode and disabled in the `production` mode.',
|
||||
type: 'boolean'
|
||||
});
|
||||
}
|
||||
|
||||
readonly pck: ApplicationPackage;
|
||||
/** application process */
|
||||
readonly process: ApplicationProcess;
|
||||
/** manager process */
|
||||
protected readonly __process: ApplicationProcess;
|
||||
|
||||
constructor(options: ApplicationPackageOptions) {
|
||||
this.pck = new ApplicationPackage(options);
|
||||
this.process = new ApplicationProcess(this.pck, options.projectPath);
|
||||
this.__process = new ApplicationProcess(this.pck, path.join(__dirname, '..'));
|
||||
}
|
||||
|
||||
protected async remove(fsPath: string): Promise<void> {
|
||||
if (await fs.pathExists(fsPath)) {
|
||||
await fs.remove(fsPath);
|
||||
}
|
||||
}
|
||||
|
||||
async clean(): Promise<void> {
|
||||
const webpackGenerator = new WebpackGenerator(this.pck);
|
||||
await Promise.all([
|
||||
this.remove(this.pck.lib()),
|
||||
this.remove(this.pck.srcGen()),
|
||||
this.remove(webpackGenerator.genConfigPath),
|
||||
this.remove(webpackGenerator.genNodeConfigPath)
|
||||
]);
|
||||
}
|
||||
|
||||
async prepare(): Promise<void> {
|
||||
if (this.pck.isElectron()) {
|
||||
await this.prepareElectron();
|
||||
}
|
||||
}
|
||||
|
||||
async generate(options: GeneratorOptions = {}): Promise<void> {
|
||||
try {
|
||||
await this.prepare();
|
||||
} catch (error) {
|
||||
if (error instanceof AbortError) {
|
||||
console.warn(error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
await Promise.all([
|
||||
new WebpackGenerator(this.pck, options).generate(),
|
||||
new BackendGenerator(this.pck, options).generate(),
|
||||
new FrontendGenerator(this.pck, options).generate(),
|
||||
]);
|
||||
}
|
||||
|
||||
async copy(): Promise<void> {
|
||||
await fs.ensureDir(this.pck.lib('frontend'));
|
||||
await fs.copy(this.pck.frontend('index.html'), this.pck.lib('frontend', 'index.html'));
|
||||
}
|
||||
|
||||
async build(args: string[] = [], options: GeneratorOptions = {}): Promise<void> {
|
||||
await this.generate(options);
|
||||
await this.copy();
|
||||
return this.__process.run('webpack', args);
|
||||
}
|
||||
|
||||
start(args: string[] = []): cp.ChildProcess {
|
||||
if (this.pck.isElectron()) {
|
||||
return this.startElectron(args);
|
||||
} else if (this.pck.isBrowserOnly()) {
|
||||
return this.startBrowserOnly(args);
|
||||
}
|
||||
return this.startBrowser(args);
|
||||
}
|
||||
|
||||
startBrowserOnly(args: string[]): cp.ChildProcess {
|
||||
const { command, mainArgs, options } = this.adjustBrowserOnlyArgs(args);
|
||||
return this.__process.spawnBin(command, mainArgs, options);
|
||||
}
|
||||
|
||||
adjustBrowserOnlyArgs(args: string[]): Readonly<{ command: string, mainArgs: string[]; options: cp.SpawnOptions }> {
|
||||
let { mainArgs, options } = this.adjustArgs(args);
|
||||
|
||||
// first parameter: path to generated frontend
|
||||
// second parameter: disable cache to support watching
|
||||
mainArgs = ['lib/frontend', '-c-1', ...mainArgs];
|
||||
|
||||
const portIndex = mainArgs.findIndex(v => v.startsWith('--port'));
|
||||
if (portIndex === -1) {
|
||||
mainArgs.push('--port=3000');
|
||||
}
|
||||
|
||||
return { command: 'http-server', mainArgs, options };
|
||||
}
|
||||
|
||||
startElectron(args: string[]): cp.ChildProcess {
|
||||
// If possible, pass the project root directory to electron rather than the script file so that Electron
|
||||
// can determine the app name. This requires that the package.json has a main field.
|
||||
let appPath = this.pck.projectPath;
|
||||
|
||||
if (!this.pck.pck.main) {
|
||||
// Try the bundled electron app first
|
||||
appPath = this.pck.lib('backend', 'electron-main.js');
|
||||
if (!fs.existsSync(appPath)) {
|
||||
// Fallback to the generated electron app in src-gen
|
||||
appPath = this.pck.backend('electron-main.js');
|
||||
}
|
||||
|
||||
console.warn(
|
||||
`WARNING: ${this.pck.packagePath} does not have a "main" entry.\n` +
|
||||
'Please add the following line:\n' +
|
||||
' "main": "lib/backend/electron-main.js"'
|
||||
);
|
||||
}
|
||||
|
||||
const { mainArgs, options } = this.adjustArgs([appPath, ...args]);
|
||||
const electronCli = require.resolve('electron/cli.js', { paths: [this.pck.projectPath] });
|
||||
return this.__process.fork(electronCli, mainArgs, options);
|
||||
}
|
||||
|
||||
startBrowser(args: string[]): cp.ChildProcess {
|
||||
const { mainArgs, options } = this.adjustArgs(args);
|
||||
// The backend must be a process group leader on UNIX in order to kill the tree later.
|
||||
// See https://nodejs.org/api/child_process.html#child_process_options_detached
|
||||
options.detached = process.platform !== 'win32';
|
||||
// Try the bundled backend app first
|
||||
let mainPath = this.pck.lib('backend', 'main.js');
|
||||
if (!fs.existsSync(mainPath)) {
|
||||
// Fallback to the generated backend file in src-gen
|
||||
mainPath = this.pck.backend('main.js');
|
||||
}
|
||||
return this.__process.fork(mainPath, mainArgs, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject Theia's Electron-specific dependencies into the application's package.json.
|
||||
*
|
||||
* Only overwrite the Electron range if the current minimum supported version is lower than the recommended one.
|
||||
*/
|
||||
protected async prepareElectron(): Promise<void> {
|
||||
let theiaElectron;
|
||||
try {
|
||||
theiaElectron = await import('@theia/electron');
|
||||
} catch (error) {
|
||||
if (error.code === 'ERR_MODULE_NOT_FOUND') {
|
||||
throw new AbortError('Please install @theia/electron as part of your Theia Electron application');
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
const expectedRange = theiaElectron.electronRange;
|
||||
const appPackageJsonPath = this.pck.path('package.json');
|
||||
const appPackageJson = await fs.readJSON(appPackageJsonPath) as { devDependencies?: Record<string, string> };
|
||||
if (!appPackageJson.devDependencies) {
|
||||
appPackageJson.devDependencies = {};
|
||||
}
|
||||
const currentRange: string | undefined = appPackageJson.devDependencies.electron;
|
||||
if (!currentRange || semver.compare(semver.minVersion(currentRange), semver.minVersion(expectedRange)) < 0) {
|
||||
// Update the range with the recommended one and write it on disk.
|
||||
appPackageJson.devDependencies = this.insertAlphabetically(appPackageJson.devDependencies, 'electron', expectedRange);
|
||||
await fs.writeJSON(appPackageJsonPath, appPackageJson, { spaces: 2 });
|
||||
throw new AbortError('Updated dependencies, please run "install" again');
|
||||
}
|
||||
if (!theiaElectron.electronVersion || !semver.satisfies(theiaElectron.electronVersion, currentRange)) {
|
||||
throw new AbortError('Dependencies are out of sync, please run "install" again');
|
||||
}
|
||||
const ffmpeg = await import('@theia/ffmpeg');
|
||||
await ffmpeg.replaceFfmpeg();
|
||||
await ffmpeg.checkFfmpeg();
|
||||
}
|
||||
|
||||
protected insertAlphabetically<T extends Record<string, string>>(object: T, key: string, value: string): T {
|
||||
const updated: Record<string, unknown> = {};
|
||||
for (const property of Object.keys(object)) {
|
||||
if (property.localeCompare(key) > 0) {
|
||||
updated[key] = value;
|
||||
}
|
||||
updated[property] = object[property];
|
||||
}
|
||||
if (!(key in updated)) {
|
||||
updated[key] = value;
|
||||
}
|
||||
return updated as T;
|
||||
}
|
||||
|
||||
private adjustArgs(args: string[], forkOptions: cp.ForkOptions = {}): Readonly<{ mainArgs: string[]; options: cp.ForkOptions }> {
|
||||
const options = {
|
||||
...this.forkOptions,
|
||||
forkOptions
|
||||
};
|
||||
const mainArgs = [...args];
|
||||
const inspectIndex = mainArgs.findIndex(v => v.startsWith('--inspect'));
|
||||
if (inspectIndex !== -1) {
|
||||
const inspectArg = mainArgs.splice(inspectIndex, 1)[0];
|
||||
options.execArgv = ['--nolazy', inspectArg];
|
||||
}
|
||||
return {
|
||||
mainArgs,
|
||||
options
|
||||
};
|
||||
}
|
||||
|
||||
private get forkOptions(): cp.ForkOptions {
|
||||
return {
|
||||
stdio: [0, 1, 2, 'ipc'],
|
||||
env: {
|
||||
...process.env,
|
||||
THEIA_PARENT_PID: String(process.pid)
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
100
dev-packages/application-manager/src/application-process.ts
Normal file
100
dev-packages/application-manager/src/application-process.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as cp from 'child_process';
|
||||
import { ApplicationPackage } from '@theia/application-package';
|
||||
|
||||
export class ApplicationProcess {
|
||||
|
||||
protected readonly defaultOptions = {
|
||||
cwd: this.pck.projectPath,
|
||||
env: process.env
|
||||
};
|
||||
|
||||
constructor(
|
||||
protected readonly pck: ApplicationPackage,
|
||||
protected readonly binProjectPath: string
|
||||
) { }
|
||||
|
||||
spawn(command: string, args?: string[], options?: cp.SpawnOptions): cp.ChildProcess {
|
||||
return cp.spawn(command, args || [], Object.assign({}, this.defaultOptions, {
|
||||
...options,
|
||||
shell: true
|
||||
}));
|
||||
}
|
||||
|
||||
fork(modulePath: string, args?: string[], options?: cp.ForkOptions): cp.ChildProcess {
|
||||
return cp.fork(modulePath, args, Object.assign({}, this.defaultOptions, options));
|
||||
}
|
||||
|
||||
canRun(command: string): boolean {
|
||||
const binPath = this.resolveBin(this.binProjectPath, command);
|
||||
return !!binPath && fs.existsSync(binPath);
|
||||
}
|
||||
|
||||
run(command: string, args: string[], options?: cp.SpawnOptions): Promise<void> {
|
||||
const commandProcess = this.spawnBin(command, args, options);
|
||||
return this.promisify(command, commandProcess);
|
||||
}
|
||||
|
||||
spawnBin(command: string, args: string[], options?: cp.SpawnOptions): cp.ChildProcess {
|
||||
const binPath = this.resolveBin(this.binProjectPath, command);
|
||||
if (!binPath) {
|
||||
throw new Error(`Could not resolve ${command} relative to ${this.binProjectPath}`);
|
||||
}
|
||||
return this.spawn(binPath, args, {
|
||||
...options,
|
||||
shell: true
|
||||
});
|
||||
}
|
||||
|
||||
protected resolveBin(rootPath: string, command: string): string | undefined {
|
||||
let commandPath = path.resolve(rootPath, 'node_modules', '.bin', command);
|
||||
if (process.platform === 'win32') {
|
||||
commandPath = commandPath + '.cmd';
|
||||
}
|
||||
if (fs.existsSync(commandPath)) {
|
||||
return commandPath;
|
||||
}
|
||||
const parentDir = path.dirname(rootPath);
|
||||
if (parentDir === rootPath) {
|
||||
return undefined;
|
||||
}
|
||||
return this.resolveBin(parentDir, command);
|
||||
}
|
||||
|
||||
protected promisify(command: string, p: cp.ChildProcess): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
p.stdout!.on('data', data => this.pck.log(data.toString()));
|
||||
p.stderr!.on('data', data => this.pck.error(data.toString()));
|
||||
p.on('error', reject);
|
||||
p.on('close', (code, signal) => {
|
||||
if (signal) {
|
||||
reject(new Error(`${command} exited with an unexpected signal: ${signal}.`));
|
||||
return;
|
||||
}
|
||||
if (code === 0) {
|
||||
resolve();
|
||||
} else {
|
||||
reject(new Error(`${command} exited with an unexpected code: ${code}.`));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
80
dev-packages/application-manager/src/expose-loader.ts
Normal file
80
dev-packages/application-manager/src/expose-loader.ts
Normal file
@@ -0,0 +1,80 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2020 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import type { RawSourceMap } from 'source-map';
|
||||
import { ApplicationPackage } from '@theia/application-package/lib/application-package';
|
||||
|
||||
const modulePackages: { dir: string, name?: string }[] = [];
|
||||
for (const extensionPackage of new ApplicationPackage({ projectPath: process.cwd() }).extensionPackages) {
|
||||
modulePackages.push({
|
||||
name: extensionPackage.name,
|
||||
dir: path.dirname(extensionPackage.raw.installed!.packagePath)
|
||||
});
|
||||
}
|
||||
|
||||
function exposeModule(modulePackage: { dir: string, name?: string }, resourcePath: string, source: string): string {
|
||||
if (!modulePackage.name) {
|
||||
return source;
|
||||
}
|
||||
const { dir, name } = path.parse(resourcePath);
|
||||
let moduleName = path.join(modulePackage.name, dir.substring(modulePackage.dir.length));
|
||||
if (name !== 'index') {
|
||||
moduleName = path.join(moduleName, name);
|
||||
}
|
||||
if (path.sep !== '/') {
|
||||
moduleName = moduleName.split(path.sep).join('/');
|
||||
}
|
||||
return source + `\n;(globalThis['theia'] = globalThis['theia'] || {})['${moduleName}'] = this;\n`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose bundled modules on window.theia.moduleName namespace, e.g.
|
||||
* window['theia']['@theia/core/lib/common/uri'].
|
||||
* Such syntax can be used by external code, for instance, for testing.
|
||||
*/
|
||||
// TODO: webpack@5.36.2 is missing a `LoaderContext` interface so we'll use any in the meantime
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export = function (this: any, source: string, sourceMap?: RawSourceMap): string | undefined {
|
||||
if (this.cacheable) {
|
||||
this.cacheable();
|
||||
}
|
||||
let modulePackage = modulePackages.find(({ dir }) => this.resourcePath.startsWith(dir + path.sep));
|
||||
if (modulePackage) {
|
||||
this.callback(undefined, exposeModule(modulePackage, this.resourcePath, source), sourceMap);
|
||||
return;
|
||||
}
|
||||
const searchString = path.sep + 'node_modules';
|
||||
const index = this.resourcePath.lastIndexOf(searchString);
|
||||
if (index !== -1) {
|
||||
const nodeModulesPath = this.resourcePath.substring(0, index + searchString.length);
|
||||
let dir = this.resourcePath;
|
||||
while ((dir = path.dirname(dir)) !== nodeModulesPath) {
|
||||
try {
|
||||
const { name } = fs.readJSONSync(path.join(dir, 'package.json'));
|
||||
modulePackage = { name, dir };
|
||||
modulePackages.push(modulePackage);
|
||||
this.callback(undefined, exposeModule(modulePackage, this.resourcePath, source), sourceMap);
|
||||
return;
|
||||
} catch {
|
||||
/** no-op */
|
||||
}
|
||||
}
|
||||
}
|
||||
this.callback(undefined, source, sourceMap);
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import * as fs from 'fs-extra';
|
||||
import { ApplicationPackage } from '@theia/application-package';
|
||||
|
||||
export interface GeneratorOptions {
|
||||
mode?: 'development' | 'production'
|
||||
splitFrontend?: boolean
|
||||
}
|
||||
|
||||
export abstract class AbstractGenerator {
|
||||
|
||||
constructor(
|
||||
protected readonly pck: ApplicationPackage,
|
||||
protected options: GeneratorOptions = {}
|
||||
) { }
|
||||
|
||||
protected ifBrowser(value: string, defaultValue: string = ''): string {
|
||||
return this.pck.ifBrowser(value, defaultValue);
|
||||
}
|
||||
|
||||
protected ifElectron(value: string, defaultValue: string = ''): string {
|
||||
return this.pck.ifElectron(value, defaultValue);
|
||||
}
|
||||
|
||||
protected ifBrowserOnly(value: string, defaultValue: string = ''): string {
|
||||
return this.pck.ifBrowserOnly(value, defaultValue);
|
||||
}
|
||||
|
||||
protected async write(path: string, content: string): Promise<void> {
|
||||
await fs.ensureFile(path);
|
||||
await fs.writeFile(path, content);
|
||||
}
|
||||
|
||||
protected ifMonaco(value: () => string, defaultValue: () => string = () => ''): string {
|
||||
return this.ifPackage([
|
||||
'@theia/monaco',
|
||||
'@theia/monaco-editor-core'
|
||||
], value, defaultValue);
|
||||
}
|
||||
|
||||
protected ifPackage(packageName: string | string[], value: string | (() => string), defaultValue: string | (() => string) = ''): string {
|
||||
const packages = Array.isArray(packageName) ? packageName : [packageName];
|
||||
if (this.pck.extensionPackages.some(e => packages.includes(e.name))) {
|
||||
return typeof value === 'string' ? value : value();
|
||||
} else {
|
||||
return typeof defaultValue === 'string' ? defaultValue : defaultValue();
|
||||
}
|
||||
}
|
||||
|
||||
protected prettyStringify(object: object): string {
|
||||
return JSON.stringify(object, undefined, 4);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import { EOL } from 'os';
|
||||
import { AbstractGenerator } from './abstract-generator';
|
||||
|
||||
export class BackendGenerator extends AbstractGenerator {
|
||||
|
||||
async generate(): Promise<void> {
|
||||
if (this.pck.isBrowserOnly()) {
|
||||
// no backend generation in case of browser-only target
|
||||
return;
|
||||
}
|
||||
const backendModules = this.pck.targetBackendModules;
|
||||
await this.write(this.pck.backend('server.js'), this.compileServer(backendModules));
|
||||
await this.write(this.pck.backend('main.js'), this.compileMain(backendModules));
|
||||
if (this.pck.isElectron()) {
|
||||
await this.write(this.pck.backend('electron-main.js'), this.compileElectronMain(this.pck.targetElectronMainModules));
|
||||
}
|
||||
}
|
||||
|
||||
protected compileElectronMain(electronMainModules?: Map<string, string>): string {
|
||||
return `// @ts-check
|
||||
|
||||
require('@theia/core/shared/reflect-metadata');
|
||||
|
||||
// Workaround for https://github.com/electron/electron/issues/9225. Chrome has an issue where
|
||||
// in certain locales (e.g. PL), image metrics are wrongly computed. We explicitly set the
|
||||
// LC_NUMERIC to prevent this from happening (selects the numeric formatting category of the
|
||||
// C locale, http://en.cppreference.com/w/cpp/locale/LC_categories).
|
||||
if (process.env.LC_ALL) {
|
||||
process.env.LC_ALL = 'C';
|
||||
}
|
||||
process.env.LC_NUMERIC = 'C';
|
||||
|
||||
(async () => {
|
||||
// Useful for Electron/NW.js apps as GUI apps on macOS doesn't inherit the \`$PATH\` define
|
||||
// in your dotfiles (.bashrc/.bash_profile/.zshrc/etc).
|
||||
// https://github.com/electron/electron/issues/550#issuecomment-162037357
|
||||
// https://github.com/eclipse-theia/theia/pull/3534#issuecomment-439689082
|
||||
(await require('@theia/core/electron-shared/fix-path')).default();
|
||||
|
||||
const { resolve } = require('path');
|
||||
const theiaAppProjectPath = resolve(__dirname, '..', '..');
|
||||
process.env.THEIA_APP_PROJECT_PATH = theiaAppProjectPath;
|
||||
const { default: electronMainApplicationModule } = require('@theia/core/lib/electron-main/electron-main-application-module');
|
||||
const { ElectronMainApplication, ElectronMainApplicationGlobals } = require('@theia/core/lib/electron-main/electron-main-application');
|
||||
const { Container } = require('@theia/core/shared/inversify');
|
||||
const { app } = require('electron');
|
||||
|
||||
const config = ${this.prettyStringify(this.pck.props.frontend.config)};
|
||||
const isSingleInstance = ${this.pck.props.backend.config.singleInstance === true ? 'true' : 'false'};
|
||||
|
||||
if (isSingleInstance && !app.requestSingleInstanceLock(process.argv)) {
|
||||
// There is another instance running, exit now. The other instance will request focus.
|
||||
app.quit();
|
||||
return;
|
||||
}
|
||||
|
||||
const container = new Container();
|
||||
container.load(electronMainApplicationModule);
|
||||
container.bind(ElectronMainApplicationGlobals).toConstantValue({
|
||||
THEIA_APP_PROJECT_PATH: theiaAppProjectPath,
|
||||
THEIA_BACKEND_MAIN_PATH: resolve(__dirname, 'main.js'),
|
||||
THEIA_FRONTEND_HTML_PATH: resolve(__dirname, '..', '..', 'lib', 'frontend', 'index.html'),
|
||||
THEIA_SECONDARY_WINDOW_HTML_PATH: resolve(__dirname, '..', '..', 'lib', 'frontend', 'secondary-window.html')
|
||||
});
|
||||
|
||||
function load(raw) {
|
||||
return Promise.resolve(raw.default).then(module =>
|
||||
container.load(module)
|
||||
);
|
||||
}
|
||||
|
||||
async function start() {
|
||||
const application = container.get(ElectronMainApplication);
|
||||
await application.start(config);
|
||||
}
|
||||
|
||||
try {
|
||||
${Array.from(electronMainModules?.values() ?? [], jsModulePath => `\
|
||||
await load(require('${jsModulePath}'));`).join(EOL)}
|
||||
await start();
|
||||
} catch (reason) {
|
||||
if (typeof reason !== 'number') {
|
||||
console.error('Failed to start the electron application.');
|
||||
if (reason) {
|
||||
console.error(reason);
|
||||
}
|
||||
}
|
||||
app.quit();
|
||||
};
|
||||
})();
|
||||
`;
|
||||
}
|
||||
|
||||
protected compileServer(backendModules: Map<string, string>): string {
|
||||
return `// @ts-check
|
||||
require('reflect-metadata');${this.ifElectron(`
|
||||
|
||||
// Patch electron version if missing, see https://github.com/eclipse-theia/theia/pull/7361#pullrequestreview-377065146
|
||||
if (typeof process.versions.electron === 'undefined' && typeof process.env.THEIA_ELECTRON_VERSION === 'string') {
|
||||
process.versions.electron = process.env.THEIA_ELECTRON_VERSION;
|
||||
}`)}
|
||||
|
||||
// Erase the ELECTRON_RUN_AS_NODE variable from the environment, else Electron apps started using Theia will pick it up.
|
||||
if ('ELECTRON_RUN_AS_NODE' in process.env) {
|
||||
delete process.env.ELECTRON_RUN_AS_NODE;
|
||||
}
|
||||
|
||||
const path = require('path');
|
||||
process.env.THEIA_APP_PROJECT_PATH = path.resolve(__dirname, '..', '..')
|
||||
const express = require('@theia/core/shared/express');
|
||||
const { Container } = require('@theia/core/shared/inversify');
|
||||
const { BackendApplication, BackendApplicationServer, CliManager } = require('@theia/core/lib/node');
|
||||
const { backendApplicationModule } = require('@theia/core/lib/node/backend-application-module');
|
||||
const { messagingBackendModule } = require('@theia/core/lib/node/messaging/messaging-backend-module');
|
||||
const { loggerBackendModule } = require('@theia/core/lib/node/logger-backend-module');
|
||||
|
||||
const container = new Container();
|
||||
container.load(backendApplicationModule);
|
||||
container.load(messagingBackendModule);
|
||||
container.load(loggerBackendModule);
|
||||
|
||||
function defaultServeStatic(app) {
|
||||
app.use(express.static(path.resolve(__dirname, '../../lib/frontend')))
|
||||
}
|
||||
|
||||
function load(raw) {
|
||||
return Promise.resolve(raw).then(
|
||||
module => container.load(module.default)
|
||||
);
|
||||
}
|
||||
|
||||
async function start(port, host, argv = process.argv) {
|
||||
if (!container.isBound(BackendApplicationServer)) {
|
||||
container.bind(BackendApplicationServer).toConstantValue({ configure: defaultServeStatic });
|
||||
}
|
||||
let result = undefined;
|
||||
await container.get(CliManager).initializeCli(argv.slice(2),
|
||||
() => container.get(BackendApplication).configured,
|
||||
async () => {
|
||||
result = container.get(BackendApplication).start(port, host);
|
||||
});
|
||||
if (result) {
|
||||
return result;
|
||||
} else {
|
||||
return Promise.reject(0);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = async (port, host, argv) => {
|
||||
try {
|
||||
${Array.from(backendModules.values(), jsModulePath => `\
|
||||
await load(require('${jsModulePath}'));`).join(EOL)}
|
||||
return await start(port, host, argv);
|
||||
} catch (error) {
|
||||
if (typeof error !== 'number') {
|
||||
console.error('Failed to start the backend application:');
|
||||
console.error(error);
|
||||
process.exitCode = 1;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
protected compileMain(backendModules: Map<string, string>): string {
|
||||
return `// @ts-check
|
||||
const { BackendApplicationConfigProvider } = require('@theia/core/lib/node/backend-application-config-provider');
|
||||
const main = require('@theia/core/lib/node/main');
|
||||
|
||||
BackendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.backend.config)});
|
||||
|
||||
globalThis.extensionInfo = ${this.prettyStringify(this.pck.extensionPackages.map(({ name, version }) => ({ name, version })))};
|
||||
|
||||
const serverModule = require('./server');
|
||||
const serverAddress = main.start(serverModule());
|
||||
|
||||
serverAddress.then((addressInfo) => {
|
||||
if (process && process.send && addressInfo) {
|
||||
process.send(addressInfo);
|
||||
}
|
||||
});
|
||||
|
||||
globalThis.serverAddress = serverAddress;
|
||||
`;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
/* eslint-disable @typescript-eslint/indent */
|
||||
|
||||
import { EOL } from 'os';
|
||||
import { AbstractGenerator, GeneratorOptions } from './abstract-generator';
|
||||
import { existsSync, readFileSync } from 'fs';
|
||||
|
||||
export class FrontendGenerator extends AbstractGenerator {
|
||||
|
||||
async generate(options?: GeneratorOptions): Promise<void> {
|
||||
await this.write(this.pck.frontend('index.html'), this.compileIndexHtml(this.pck.targetFrontendModules));
|
||||
await this.write(this.pck.frontend('index.js'), this.compileIndexJs(this.pck.targetFrontendModules, this.pck.targetFrontendPreloadModules));
|
||||
await this.write(this.pck.frontend('secondary-window.html'), this.compileSecondaryWindowHtml());
|
||||
await this.write(this.pck.frontend('secondary-index.js'), this.compileSecondaryIndexJs(this.pck.secondaryWindowModules));
|
||||
if (this.pck.isElectron()) {
|
||||
await this.write(this.pck.frontend('preload.js'), this.compilePreloadJs());
|
||||
}
|
||||
}
|
||||
|
||||
protected compileIndexPreload(frontendModules: Map<string, string>): string {
|
||||
const template = this.pck.props.generator.config.preloadTemplate;
|
||||
if (!template) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Support path to html file
|
||||
if (existsSync(template)) {
|
||||
return readFileSync(template).toString();
|
||||
}
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
protected compileIndexHtml(frontendModules: Map<string, string>): string {
|
||||
return `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>${this.compileIndexHead(frontendModules)}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="theia-preload">${this.compileIndexPreload(frontendModules)}</div>
|
||||
<script type="text/javascript" src="./bundle.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
||||
</html>`;
|
||||
}
|
||||
|
||||
protected compileIndexHead(frontendModules: Map<string, string>): string {
|
||||
return `
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<title>${this.pck.props.frontend.config.applicationName}</title>
|
||||
<link rel="stylesheet" href="./vibn.css">`;
|
||||
}
|
||||
|
||||
protected compileIndexJs(frontendModules: Map<string, string>, frontendPreloadModules: Map<string, string>): string {
|
||||
return `\
|
||||
// @ts-check
|
||||
require('reflect-metadata');
|
||||
const { Container } = require('@theia/core/shared/inversify');
|
||||
const { FrontendApplicationConfigProvider } = require('@theia/core/lib/browser/frontend-application-config-provider');
|
||||
|
||||
FrontendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.frontend.config)});
|
||||
|
||||
${this.ifMonaco(() => `
|
||||
self.MonacoEnvironment = {
|
||||
getWorkerUrl: function (moduleId, label) {
|
||||
return './editor.worker.js';
|
||||
}
|
||||
}`)}
|
||||
|
||||
function load(container, jsModule) {
|
||||
return Promise.resolve(jsModule)
|
||||
.then(containerModule => container.load(containerModule.default));
|
||||
}
|
||||
|
||||
async function preload(container) {
|
||||
try {
|
||||
${Array.from(frontendPreloadModules.values(), jsModulePath => `\
|
||||
await load(container, ${this.importOrRequire()}('${jsModulePath}'));`).join(EOL)}
|
||||
const { Preloader } = require('@theia/core/lib/browser/preload/preloader');
|
||||
const preloader = container.get(Preloader);
|
||||
await preloader.initialize();
|
||||
} catch (reason) {
|
||||
console.error('Failed to run preload scripts.');
|
||||
if (reason) {
|
||||
console.error(reason);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = (async () => {
|
||||
const { messagingFrontendModule } = require('@theia/core/lib/${this.pck.isBrowser() || this.pck.isBrowserOnly()
|
||||
? 'browser/messaging/messaging-frontend-module'
|
||||
: 'electron-browser/messaging/electron-messaging-frontend-module'}');
|
||||
const container = new Container();
|
||||
container.load(messagingFrontendModule);
|
||||
${this.ifBrowserOnly(`const { messagingFrontendOnlyModule } = require('@theia/core/lib/browser-only/messaging/messaging-frontend-only-module');
|
||||
container.load(messagingFrontendOnlyModule);`)}
|
||||
|
||||
await preload(container);
|
||||
|
||||
${this.ifMonaco(() => `
|
||||
const { MonacoInit } = require('@theia/monaco/lib/browser/monaco-init');
|
||||
`)};
|
||||
|
||||
const { FrontendApplication } = require('@theia/core/lib/browser');
|
||||
const { frontendApplicationModule } = require('@theia/core/lib/browser/frontend-application-module');
|
||||
const { loggerFrontendModule } = require('@theia/core/lib/browser/logger-frontend-module');
|
||||
|
||||
container.load(frontendApplicationModule);
|
||||
${this.pck.ifBrowserOnly(`const { frontendOnlyApplicationModule } = require('@theia/core/lib/browser-only/frontend-only-application-module');
|
||||
container.load(frontendOnlyApplicationModule);`)}
|
||||
|
||||
container.load(loggerFrontendModule);
|
||||
${this.ifBrowserOnly(`const { loggerFrontendOnlyModule } = require('@theia/core/lib/browser-only/logger-frontend-only-module');
|
||||
container.load(loggerFrontendOnlyModule);`)}
|
||||
|
||||
try {
|
||||
${Array.from(frontendModules.values(), jsModulePath => `\
|
||||
await load(container, ${this.importOrRequire()}('${jsModulePath}'));`).join(EOL)}
|
||||
${this.ifMonaco(() => `
|
||||
MonacoInit.init(container);
|
||||
`)};
|
||||
await start();
|
||||
} catch (reason) {
|
||||
console.error('Failed to start the frontend application.');
|
||||
if (reason) {
|
||||
console.error(reason);
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
(window['theia'] = window['theia'] || {}).container = container;
|
||||
return container.get(FrontendApplication).start();
|
||||
}
|
||||
})();
|
||||
`;
|
||||
}
|
||||
|
||||
protected importOrRequire(): string {
|
||||
return this.options.mode !== 'production' ? 'import' : 'require';
|
||||
}
|
||||
|
||||
/** HTML for secondary windows that contain an extracted widget. */
|
||||
protected compileSecondaryWindowHtml(): string {
|
||||
return `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Theia — Secondary Window</title>
|
||||
<style>
|
||||
html, body {
|
||||
overflow: hidden;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
html,
|
||||
head,
|
||||
body,
|
||||
.secondary-widget-root,
|
||||
#widget-host {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="./secondary-window.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="widget-host"></div>
|
||||
</body>
|
||||
|
||||
</html>`;
|
||||
}
|
||||
|
||||
protected compileSecondaryIndexJs(secondaryWindowModules: Map<string, string>): string {
|
||||
return `\
|
||||
// @ts-check
|
||||
require('reflect-metadata');
|
||||
const { Container } = require('@theia/core/shared/inversify');
|
||||
|
||||
module.exports = Promise.resolve().then(() => {
|
||||
const { frontendApplicationModule } = require('@theia/core/lib/browser/frontend-application-module');
|
||||
const container = new Container();
|
||||
container.load(frontendApplicationModule);
|
||||
${Array.from(secondaryWindowModules.values(), jsModulePath => `\
|
||||
container.load(require('${jsModulePath}').default);`).join(EOL)}
|
||||
});
|
||||
`;
|
||||
}
|
||||
|
||||
compilePreloadJs(): string {
|
||||
return `\
|
||||
// @ts-check
|
||||
${Array.from(this.pck.preloadModules.values(), path => `require('${path}').preload();`).join(EOL)}
|
||||
`;
|
||||
}
|
||||
}
|
||||
19
dev-packages/application-manager/src/generator/index.ts
Normal file
19
dev-packages/application-manager/src/generator/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
export * from './webpack-generator';
|
||||
export * from './frontend-generator';
|
||||
export * from './backend-generator';
|
||||
@@ -0,0 +1,529 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import * as paths from 'path';
|
||||
import * as fs from 'fs-extra';
|
||||
import { AbstractGenerator } from './abstract-generator';
|
||||
|
||||
export class WebpackGenerator extends AbstractGenerator {
|
||||
|
||||
async generate(): Promise<void> {
|
||||
await this.write(this.genConfigPath, this.compileWebpackConfig());
|
||||
if (!this.pck.isBrowserOnly()) {
|
||||
await this.write(this.genNodeConfigPath, this.compileNodeWebpackConfig());
|
||||
}
|
||||
if (await this.shouldGenerateUserWebpackConfig()) {
|
||||
await this.write(this.configPath, this.compileUserWebpackConfig());
|
||||
}
|
||||
}
|
||||
|
||||
protected async shouldGenerateUserWebpackConfig(): Promise<boolean> {
|
||||
if (!(await fs.pathExists(this.configPath))) {
|
||||
return true;
|
||||
}
|
||||
const content = await fs.readFile(this.configPath, 'utf8');
|
||||
return content.indexOf('gen-webpack') === -1;
|
||||
}
|
||||
|
||||
get configPath(): string {
|
||||
return this.pck.path('webpack.config.js');
|
||||
}
|
||||
|
||||
get genConfigPath(): string {
|
||||
return this.pck.path('gen-webpack.config.js');
|
||||
}
|
||||
|
||||
get genNodeConfigPath(): string {
|
||||
return this.pck.path('gen-webpack.node.config.js');
|
||||
}
|
||||
|
||||
protected compileWebpackConfig(): string {
|
||||
return `/**
|
||||
* Don't touch this file. It will be regenerated by theia build.
|
||||
* To customize webpack configuration change ${this.configPath}
|
||||
*/
|
||||
// @ts-check
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const yargs = require('yargs');
|
||||
const resolvePackagePath = require('resolve-package-path');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const CompressionPlugin = require('compression-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const { MonacoWebpackPlugin } = require('@theia/native-webpack-plugin/lib/monaco-webpack-plugins.js');
|
||||
|
||||
const outputPath = path.resolve(__dirname, 'lib', 'frontend');
|
||||
const { mode, staticCompression } = yargs.option('mode', {
|
||||
description: "Mode to use",
|
||||
choices: ["development", "production"],
|
||||
default: "production"
|
||||
}).option('static-compression', {
|
||||
description: 'Controls whether to enable compression of static artifacts.',
|
||||
type: 'boolean',
|
||||
default: true
|
||||
}).argv;
|
||||
const development = mode === 'development';
|
||||
|
||||
const plugins = [
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
// copy secondary window html file to lib folder
|
||||
from: path.resolve(__dirname, 'src-gen/frontend/secondary-window.html')
|
||||
}${this.ifPackage('@theia/plugin-ext', `,
|
||||
{
|
||||
// copy webview files to lib folder
|
||||
from: path.join(resolvePackagePath('@theia/plugin-ext', __dirname), '..', 'src', 'main', 'browser', 'webview', 'pre'),
|
||||
to: path.resolve(__dirname, 'lib', 'webview', 'pre')
|
||||
}`)}
|
||||
${this.ifPackage('@theia/plugin-ext-vscode', `,
|
||||
{
|
||||
// copy frontend plugin host files
|
||||
from: path.join(resolvePackagePath('@theia/plugin-ext-vscode', __dirname), '..', 'lib', 'node', 'context', 'plugin-vscode-init-fe.js'),
|
||||
to: path.resolve(__dirname, 'lib', 'frontend', 'context', 'plugin-vscode-init-fe.js')
|
||||
}`)}
|
||||
]
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
// the Buffer class doesn't exist in the browser but some dependencies rely on it
|
||||
Buffer: ['buffer', 'Buffer']
|
||||
}),
|
||||
new MonacoWebpackPlugin()
|
||||
];
|
||||
// it should go after copy-plugin in order to compress monaco as well
|
||||
if (staticCompression) {
|
||||
plugins.push(new CompressionPlugin({}));
|
||||
}
|
||||
|
||||
module.exports = [{
|
||||
mode,
|
||||
plugins,
|
||||
devtool: 'source-map',
|
||||
entry: {
|
||||
bundle: path.resolve(__dirname, 'src-gen/frontend/index.js'),
|
||||
${this.ifMonaco(() => "'editor.worker': '@theia/monaco-editor-core/esm/vs/editor/editor.worker.js'")}
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: outputPath,
|
||||
devtoolModuleFilenameTemplate: 'webpack:///[resource-path]?[loaders]',
|
||||
globalObject: 'self'
|
||||
},
|
||||
target: 'web',
|
||||
cache: staticCompression,
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\\.css$/,
|
||||
exclude: /materialcolors\\.css$|\\.useable\\.css$/,
|
||||
use: ['style-loader', 'css-loader']
|
||||
},
|
||||
{
|
||||
test: /materialcolors\\.css$|\\.useable\\.css$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader',
|
||||
options: {
|
||||
esModule: false,
|
||||
injectType: 'lazySingletonStyleTag',
|
||||
attributes: {
|
||||
id: 'theia-theme'
|
||||
}
|
||||
}
|
||||
},
|
||||
'css-loader'
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\\.(ttf|eot|svg)(\\?v=\\d+\\.\\d+\\.\\d+)?$/,
|
||||
type: 'asset',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
maxSize: 10000,
|
||||
}
|
||||
},
|
||||
generator: {
|
||||
dataUrl: {
|
||||
mimetype: 'image/svg+xml'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\\.(jpg|png|gif)$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
filename: '[hash].[ext]'
|
||||
}
|
||||
},
|
||||
{
|
||||
// see https://github.com/eclipse-theia/theia/issues/556
|
||||
test: /source-map-support/,
|
||||
loader: 'ignore-loader'
|
||||
},
|
||||
{
|
||||
test: /\\.d\\.ts$/,
|
||||
loader: 'ignore-loader'
|
||||
},
|
||||
{
|
||||
test: /\\.js$/,
|
||||
enforce: 'pre',
|
||||
loader: 'source-map-loader',
|
||||
exclude: /jsonc-parser|fast-plist|onigasm/
|
||||
},
|
||||
{
|
||||
test: /\\.woff(2)?(\\?v=[0-9]\\.[0-9]\\.[0-9])?$/,
|
||||
type: 'asset',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
maxSize: 10000,
|
||||
}
|
||||
},
|
||||
generator: {
|
||||
dataUrl: {
|
||||
mimetype: 'image/svg+xml'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /node_modules[\\\\|\/](vscode-languageserver-types|vscode-uri|jsonc-parser|vscode-languageserver-protocol)/,
|
||||
loader: 'umd-compat-loader'
|
||||
},
|
||||
{
|
||||
test: /\\.wasm$/,
|
||||
type: 'asset/resource'
|
||||
},
|
||||
{
|
||||
test: /\\.plist$/,
|
||||
type: 'asset/resource'
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
fallback: {
|
||||
'child_process': false,
|
||||
'crypto': false,
|
||||
'net': false,
|
||||
'path': require.resolve('path-browserify'),
|
||||
'process': false,
|
||||
'os': false,
|
||||
'timers': false
|
||||
},
|
||||
extensions: ['.js']
|
||||
},
|
||||
stats: {
|
||||
warnings: true,
|
||||
children: true
|
||||
},
|
||||
ignoreWarnings: [
|
||||
// Some packages do not have source maps, that's ok
|
||||
/Failed to parse source map/,
|
||||
{
|
||||
// Monaco uses 'require' in a non-standard way
|
||||
module: /@theia\\/monaco-editor-core/,
|
||||
message: /require function is used in a way in which dependencies cannot be statically extracted/
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
mode,
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({
|
||||
// Options similar to the same options in webpackOptions.output
|
||||
// both options are optional
|
||||
filename: "[name].css",
|
||||
chunkFilename: "[id].css",
|
||||
}),
|
||||
new MonacoWebpackPlugin(),
|
||||
],
|
||||
devtool: 'source-map',
|
||||
entry: {
|
||||
"secondary-window": path.resolve(__dirname, 'src-gen/frontend/secondary-index.js'),
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: outputPath,
|
||||
devtoolModuleFilenameTemplate: 'webpack:///[resource-path]?[loaders]',
|
||||
globalObject: 'self'
|
||||
},
|
||||
target: 'web',
|
||||
cache: staticCompression,
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: [MiniCssExtractPlugin.loader, "css-loader"]
|
||||
},
|
||||
{
|
||||
test: /\.wasm$/,
|
||||
type: 'asset/resource'
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
fallback: {
|
||||
'child_process': false,
|
||||
'crypto': false,
|
||||
'net': false,
|
||||
'path': require.resolve('path-browserify'),
|
||||
'process': false,
|
||||
'os': false,
|
||||
'timers': false
|
||||
},
|
||||
extensions: ['.js']
|
||||
},
|
||||
stats: {
|
||||
warnings: true,
|
||||
children: true
|
||||
},
|
||||
ignoreWarnings: [
|
||||
{
|
||||
// Monaco uses 'require' in a non-standard way
|
||||
module: /@theia\\/monaco-editor-core/,
|
||||
message: /require function is used in a way in which dependencies cannot be statically extracted/
|
||||
}
|
||||
]
|
||||
}${this.ifElectron(`, {
|
||||
mode,
|
||||
devtool: 'source-map',
|
||||
entry: {
|
||||
"preload": path.resolve(__dirname, 'src-gen/frontend/preload.js'),
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: outputPath,
|
||||
devtoolModuleFilenameTemplate: 'webpack:///[resource-path]?[loaders]',
|
||||
globalObject: 'self'
|
||||
},
|
||||
target: 'electron-preload',
|
||||
cache: staticCompression,
|
||||
stats: {
|
||||
warnings: true,
|
||||
children: true
|
||||
}
|
||||
}`)}];`;
|
||||
}
|
||||
|
||||
protected compileUserWebpackConfig(): string {
|
||||
return `/**
|
||||
* This file can be edited to customize webpack configuration.
|
||||
* To reset delete this file and rerun theia build again.
|
||||
*/
|
||||
// @ts-check
|
||||
const configs = require('./${paths.basename(this.genConfigPath)}');
|
||||
${this.ifBrowserOnly('', `const nodeConfig = require('./${paths.basename(this.genNodeConfigPath)}');`)}
|
||||
|
||||
/**
|
||||
* Expose bundled modules on window.theia.moduleName namespace, e.g.
|
||||
* window['theia']['@theia/core/lib/common/uri'].
|
||||
* Such syntax can be used by external code, for instance, for testing.
|
||||
configs[0].module.rules.push({
|
||||
test: /\\.js$/,
|
||||
loader: require.resolve('@theia/application-manager/lib/expose-loader')
|
||||
}); */
|
||||
|
||||
${this.ifBrowserOnly('module.exports = configs;', `module.exports = [
|
||||
...configs,
|
||||
nodeConfig.config
|
||||
];`)}
|
||||
`;
|
||||
}
|
||||
|
||||
protected compileNodeWebpackConfig(): string {
|
||||
return `/**
|
||||
* Don't touch this file. It will be regenerated by theia build.
|
||||
* To customize webpack configuration change ${this.configPath}
|
||||
*/
|
||||
// @ts-check
|
||||
const path = require('path');
|
||||
const yargs = require('yargs');
|
||||
const webpack = require('webpack');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const NativeWebpackPlugin = require('@theia/native-webpack-plugin');
|
||||
const { MonacoWebpackPlugin } = require('@theia/native-webpack-plugin/lib/monaco-webpack-plugins.js');
|
||||
|
||||
const { mode } = yargs.option('mode', {
|
||||
description: "Mode to use",
|
||||
choices: ["development", "production"],
|
||||
default: "production"
|
||||
}).argv;
|
||||
|
||||
const production = mode === 'production';
|
||||
|
||||
/** @type {import('webpack').EntryObject} */
|
||||
const commonJsLibraries = {};
|
||||
for (const [entryPointName, entryPointPath] of Object.entries({
|
||||
${this.ifPackage('@theia/plugin-ext', "'backend-init-theia': '@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia',")}
|
||||
${this.ifPackage('@theia/filesystem', "'parcel-watcher': '@theia/filesystem/lib/node/parcel-watcher',")}
|
||||
${this.ifPackage('@theia/plugin-ext-vscode', "'plugin-vscode-init': '@theia/plugin-ext-vscode/lib/node/plugin-vscode-init',")}
|
||||
${this.ifPackage('@theia/api-provider-sample', "'gotd-api-init': '@theia/api-provider-sample/lib/plugin/gotd-api-init',")}
|
||||
${this.ifPackage('@theia/git', "'git-locator-host': '@theia/git/lib/node/git-locator/git-locator-host',")}
|
||||
})) {
|
||||
commonJsLibraries[entryPointName] = {
|
||||
import: require.resolve(entryPointPath),
|
||||
library: {
|
||||
type: 'commonjs2',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const ignoredResources = new Set();
|
||||
|
||||
if (process.platform !== 'win32') {
|
||||
ignoredResources.add('@vscode/windows-ca-certs');
|
||||
ignoredResources.add('@vscode/windows-ca-certs/build/Release/crypt32.node');
|
||||
}
|
||||
|
||||
const nativePlugin = new NativeWebpackPlugin({
|
||||
out: 'native',
|
||||
trash: ${this.ifPackage('@theia/filesystem', 'true', 'false')},
|
||||
ripgrep: ${this.ifPackage(['@theia/search-in-workspace', '@theia/file-search'], 'true', 'false')},
|
||||
pty: ${this.ifPackage('@theia/process', 'true', 'false')},
|
||||
nativeBindings: {
|
||||
drivelist: 'drivelist/build/Release/drivelist.node'
|
||||
}
|
||||
});
|
||||
|
||||
${this.ifPackage('@theia/process', () => `// Ensure that node-pty is correctly hoisted
|
||||
try {
|
||||
require.resolve('node-pty');
|
||||
} catch {
|
||||
console.error('"node-pty" dependency is not installed correctly. Ensure that it is available in the root node_modules directory.');
|
||||
console.error('Exiting webpack build process.');
|
||||
process.exit(1);
|
||||
}`)}
|
||||
|
||||
/** @type {import('webpack').Configuration} */
|
||||
const config = {
|
||||
mode,
|
||||
devtool: mode === 'development' ? 'source-map' : false,
|
||||
target: 'node',
|
||||
node: {
|
||||
global: false,
|
||||
__filename: false,
|
||||
__dirname: false
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.json', '.wasm', '.node'],
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: path.resolve(__dirname, 'lib', 'backend'),
|
||||
devtoolModuleFilenameTemplate: 'webpack:///[absolute-resource-path]?[loaders]',
|
||||
},${this.ifElectron(`
|
||||
externals: {
|
||||
electron: 'require("electron")'
|
||||
},`)}
|
||||
entry: {
|
||||
// Main entry point of the Theia application backend:
|
||||
'main': require.resolve('./src-gen/backend/main'),
|
||||
// Theia's IPC mechanism:
|
||||
'ipc-bootstrap': require.resolve('@theia/core/lib/node/messaging/ipc-bootstrap'),
|
||||
${this.ifPackage('@theia/plugin-ext', () => `// VS Code extension support:
|
||||
'plugin-host': require.resolve('@theia/plugin-ext/lib/hosted/node/plugin-host'),`)}
|
||||
${this.ifPackage('@theia/plugin-ext-headless', () => `// Theia Headless Plugin support:
|
||||
'plugin-host-headless': require.resolve('@theia/plugin-ext-headless/lib/hosted/node/plugin-host-headless'),`)}
|
||||
${this.ifPackage('@theia/process', () => `// Make sure the node-pty thread worker can be executed:
|
||||
'worker/conoutSocketWorker': require.resolve('node-pty/lib/worker/conoutSocketWorker'),`)}
|
||||
${this.ifElectron("'electron-main': require.resolve('./src-gen/backend/electron-main'),")}
|
||||
${this.ifPackage('@theia/dev-container', () => `// VS Code Dev-Container communication:
|
||||
'dev-container-server': require.resolve('@theia/dev-container/lib/dev-container-server/dev-container-server'),`)}
|
||||
...commonJsLibraries
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
// Make sure we can still find and load our native addons.
|
||||
{
|
||||
test: /\\.node$/,
|
||||
loader: 'node-loader',
|
||||
options: {
|
||||
name: 'native/[name].[ext]'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\\.d\\.ts$/,
|
||||
loader: 'ignore-loader'
|
||||
},
|
||||
{
|
||||
test: /\\.js$/,
|
||||
enforce: 'pre',
|
||||
loader: 'source-map-loader'
|
||||
},
|
||||
// jsonc-parser exposes its UMD implementation by default, which
|
||||
// confuses Webpack leading to missing js in the bundles.
|
||||
{
|
||||
test: /node_modules[\\/](jsonc-parser)/,
|
||||
loader: 'umd-compat-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
// Some native dependencies need special handling
|
||||
nativePlugin,
|
||||
// Optional node dependencies can be safely ignored
|
||||
new webpack.IgnorePlugin({
|
||||
checkResource: resource => ignoredResources.has(resource)
|
||||
}),
|
||||
new MonacoWebpackPlugin()
|
||||
],
|
||||
optimization: {
|
||||
// Split and reuse code across the various entry points
|
||||
splitChunks: {
|
||||
chunks: 'all'
|
||||
},
|
||||
// Only minimize if we run webpack in production mode
|
||||
minimize: production,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
exclude: /^(lib|builtins)\\//${this.ifPackage(['@theia/scanoss', '@theia/ai-anthropic', '@theia/ai-openai'], () => `,
|
||||
terserOptions: {
|
||||
keep_classnames: /AbortSignal/
|
||||
}`)}
|
||||
})
|
||||
]
|
||||
},
|
||||
ignoreWarnings: [
|
||||
// Some packages do not have source maps, that's ok
|
||||
/Failed to parse source map/,
|
||||
// require with expressions are not supported
|
||||
/the request of a dependency is an expression/,
|
||||
// Some packages use dynamic requires, we can safely ignore them (they are handled by the native webpack plugin)
|
||||
/require function is used in a way in which dependencies cannot be statically extracted/, {
|
||||
module: /yargs/
|
||||
}, {
|
||||
module: /node-pty/
|
||||
}, {
|
||||
module: /require-main-filename/
|
||||
}, {
|
||||
module: /ws/
|
||||
}, {
|
||||
module: /express/
|
||||
}, {
|
||||
module: /cross-spawn/
|
||||
}, {
|
||||
module: /@parcel\\/watcher/
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
config,
|
||||
nativePlugin,
|
||||
ignoredResources
|
||||
};
|
||||
`;
|
||||
}
|
||||
|
||||
}
|
||||
19
dev-packages/application-manager/src/index.ts
Normal file
19
dev-packages/application-manager/src/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2018 Ericsson and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
export * from './rebuild';
|
||||
export * from './application-package-manager';
|
||||
export * from './application-process';
|
||||
28
dev-packages/application-manager/src/package.spec.ts
Normal file
28
dev-packages/application-manager/src/package.spec.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2018 Ericsson and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
/* note: this bogus test file is required so that
|
||||
we are able to run mocha unit tests on this
|
||||
package, without having any actual unit tests in it.
|
||||
This way a coverage report will be generated,
|
||||
showing 0% coverage, instead of no report.
|
||||
This file can be removed once we have real unit
|
||||
tests in place. */
|
||||
|
||||
describe('application-manager package', () => {
|
||||
|
||||
it('should support code coverage statistics', () => true);
|
||||
});
|
||||
349
dev-packages/application-manager/src/rebuild.ts
Normal file
349
dev-packages/application-manager/src/rebuild.ts
Normal file
@@ -0,0 +1,349 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import cp = require('child_process');
|
||||
import fs = require('fs-extra');
|
||||
import path = require('path');
|
||||
import os = require('os');
|
||||
|
||||
export type RebuildTarget = 'electron' | 'browser' | 'browser-only';
|
||||
|
||||
const EXIT_SIGNALS: NodeJS.Signals[] = ['SIGINT', 'SIGTERM'];
|
||||
|
||||
interface ExitToken {
|
||||
getLastSignal(): NodeJS.Signals | undefined
|
||||
onSignal(callback: (signal: NodeJS.Signals) => void): void
|
||||
}
|
||||
|
||||
type NodeABI = string | number;
|
||||
|
||||
export const DEFAULT_MODULES = [
|
||||
'node-pty',
|
||||
'native-keymap',
|
||||
'find-git-repositories',
|
||||
'drivelist',
|
||||
'keytar',
|
||||
'ssh2',
|
||||
'cpu-features'
|
||||
];
|
||||
|
||||
export interface RebuildOptions {
|
||||
/**
|
||||
* What modules to rebuild.
|
||||
*/
|
||||
modules?: string[]
|
||||
/**
|
||||
* Folder where the module cache will be created/read from.
|
||||
*/
|
||||
cacheRoot?: string
|
||||
/**
|
||||
* In the event that `node-abi` doesn't recognize the current Electron version,
|
||||
* you can specify the Node ABI to rebuild for.
|
||||
*/
|
||||
forceAbi?: NodeABI
|
||||
}
|
||||
|
||||
/**
|
||||
* @param target What to rebuild for.
|
||||
* @param options
|
||||
*/
|
||||
export function rebuild(target: RebuildTarget, options: RebuildOptions = {}): void {
|
||||
const {
|
||||
modules = DEFAULT_MODULES,
|
||||
cacheRoot = process.cwd(),
|
||||
forceAbi,
|
||||
} = options;
|
||||
const cache = path.resolve(cacheRoot, '.browser_modules');
|
||||
const cacheExists = folderExists(cache);
|
||||
guardExit(async token => {
|
||||
if (target === 'electron' && !cacheExists) {
|
||||
process.exitCode = await rebuildElectronModules(cache, modules, forceAbi, token);
|
||||
} else if (target === 'browser' && cacheExists) {
|
||||
process.exitCode = await revertBrowserModules(cache, modules);
|
||||
} else {
|
||||
console.log(`native node modules are already rebuilt for ${target}`);
|
||||
}
|
||||
}).catch(errorOrSignal => {
|
||||
if (typeof errorOrSignal === 'string' && errorOrSignal in os.constants.signals) {
|
||||
process.kill(process.pid, errorOrSignal);
|
||||
} else {
|
||||
throw errorOrSignal;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function folderExists(folder: string): boolean {
|
||||
if (fs.existsSync(folder)) {
|
||||
if (fs.statSync(folder).isDirectory()) {
|
||||
return true;
|
||||
} else {
|
||||
throw new Error(`"${folder}" exists but it is not a directory`);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Schema for `<browserModuleCache>/modules.json`.
|
||||
*/
|
||||
interface ModulesJson {
|
||||
[moduleName: string]: ModuleBackup
|
||||
}
|
||||
interface ModuleBackup {
|
||||
originalLocation: string
|
||||
}
|
||||
|
||||
async function rebuildElectronModules(browserModuleCache: string, modules: string[], forceAbi: NodeABI | undefined, token: ExitToken): Promise<number> {
|
||||
const modulesJsonPath = path.join(browserModuleCache, 'modules.json');
|
||||
const modulesJson: ModulesJson = await fs.access(modulesJsonPath).then(
|
||||
() => fs.readJson(modulesJsonPath),
|
||||
() => ({})
|
||||
);
|
||||
let success = true;
|
||||
// Backup already built browser modules.
|
||||
await Promise.all(modules.map(async module => {
|
||||
let modulePath;
|
||||
try {
|
||||
modulePath = require.resolve(`${module}/package.json`, {
|
||||
paths: [process.cwd()],
|
||||
});
|
||||
} catch (_) {
|
||||
console.debug(`Module not found: ${module}`);
|
||||
return; // Skip current module.
|
||||
}
|
||||
const src = path.dirname(modulePath);
|
||||
const dest = path.join(browserModuleCache, module);
|
||||
try {
|
||||
await fs.remove(dest);
|
||||
await fs.copy(src, dest, { overwrite: true });
|
||||
modulesJson[module] = {
|
||||
originalLocation: src,
|
||||
};
|
||||
console.debug(`Processed "${module}"`);
|
||||
} catch (error) {
|
||||
console.error(`Error while doing a backup for "${module}": ${error}`);
|
||||
success = false;
|
||||
}
|
||||
}));
|
||||
if (Object.keys(modulesJson).length === 0) {
|
||||
console.debug('No module to rebuild.');
|
||||
return 0;
|
||||
}
|
||||
// Update manifest tracking the backups' original locations.
|
||||
await fs.writeJson(modulesJsonPath, modulesJson, { spaces: 2 });
|
||||
// If we failed to process a module then exit now.
|
||||
if (!success) {
|
||||
return 1;
|
||||
}
|
||||
const todo = modules.map(m => {
|
||||
// electron-rebuild ignores the module namespace...
|
||||
const slash = m.indexOf('/');
|
||||
return m.startsWith('@') && slash !== -1
|
||||
? m.substring(slash + 1)
|
||||
: m;
|
||||
});
|
||||
let exitCode: number | undefined;
|
||||
try {
|
||||
if (process.env.THEIA_REBUILD_NO_WORKAROUND) {
|
||||
exitCode = await runElectronRebuild(todo, forceAbi, token);
|
||||
} else {
|
||||
exitCode = await electronRebuildExtraModulesWorkaround(process.cwd(), todo, () => runElectronRebuild(todo, forceAbi, token), token);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
// If code is undefined or different from zero we need to revert back to the browser modules.
|
||||
if (exitCode !== 0) {
|
||||
await revertBrowserModules(browserModuleCache, modules);
|
||||
}
|
||||
return exitCode ?? 1;
|
||||
}
|
||||
}
|
||||
|
||||
async function revertBrowserModules(browserModuleCache: string, modules: string[]): Promise<number> {
|
||||
let exitCode = 0;
|
||||
const modulesJsonPath = path.join(browserModuleCache, 'modules.json');
|
||||
const modulesJson: ModulesJson = await fs.readJson(modulesJsonPath);
|
||||
await Promise.all(Object.entries(modulesJson).map(async ([moduleName, entry]) => {
|
||||
if (!modules.includes(moduleName)) {
|
||||
return; // Skip modules that weren't requested.
|
||||
}
|
||||
const src = path.join(browserModuleCache, moduleName);
|
||||
if (!await fs.pathExists(src)) {
|
||||
delete modulesJson[moduleName];
|
||||
console.error(`Missing backup for ${moduleName}!`);
|
||||
exitCode = 1;
|
||||
return;
|
||||
}
|
||||
const dest = entry.originalLocation;
|
||||
try {
|
||||
await fs.remove(dest);
|
||||
await fs.copy(src, dest, { overwrite: false });
|
||||
await fs.remove(src);
|
||||
delete modulesJson[moduleName];
|
||||
console.debug(`Reverted "${moduleName}"`);
|
||||
} catch (error) {
|
||||
console.error(`Error while reverting "${moduleName}": ${error}`);
|
||||
exitCode = 1;
|
||||
}
|
||||
}));
|
||||
if (Object.keys(modulesJson).length === 0) {
|
||||
// We restored everything, so we can delete the cache.
|
||||
await fs.remove(browserModuleCache);
|
||||
} else {
|
||||
// Some things were not restored, so we update the manifest.
|
||||
await fs.writeJson(modulesJsonPath, modulesJson, { spaces: 2 });
|
||||
}
|
||||
return exitCode;
|
||||
}
|
||||
|
||||
async function runElectronRebuild(modules: string[], forceAbi: NodeABI | undefined, token: ExitToken): Promise<number> {
|
||||
const todo = modules.join(',');
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let command = `npx --no-install electron-rebuild -f -w=${todo} -o=${todo}`;
|
||||
if (forceAbi) {
|
||||
command += ` --force-abi ${forceAbi}`;
|
||||
}
|
||||
const electronRebuild = cp.spawn(command, {
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
});
|
||||
token.onSignal(signal => electronRebuild.kill(signal));
|
||||
electronRebuild.on('error', reject);
|
||||
electronRebuild.on('close', (code, signal) => {
|
||||
if (signal) {
|
||||
reject(new Error(`electron-rebuild exited with "${signal}"`));
|
||||
} else {
|
||||
resolve(code!);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* `electron-rebuild` is supposed to accept a list of modules to build, even when not part of the dependencies.
|
||||
* But there is a bug that causes `electron-rebuild` to not correctly process this list of modules.
|
||||
*
|
||||
* This workaround will temporarily modify the current package.json file.
|
||||
*
|
||||
* PR with fix: https://github.com/electron/electron-rebuild/pull/888
|
||||
*
|
||||
* TODO: Remove this workaround.
|
||||
*/
|
||||
async function electronRebuildExtraModulesWorkaround<T>(cwd: string, extraModules: string[], run: (token: ExitToken) => Promise<T>, token: ExitToken): Promise<T> {
|
||||
const packageJsonPath = path.resolve(cwd, 'package.json');
|
||||
if (await fs.pathExists(packageJsonPath)) {
|
||||
// package.json exists: We back it up before modifying it then revert it.
|
||||
const packageJsonCopyPath = `${packageJsonPath}.copy`;
|
||||
const packageJson = await fs.readJson(packageJsonPath);
|
||||
await fs.copy(packageJsonPath, packageJsonCopyPath);
|
||||
await throwIfSignal(token, async () => {
|
||||
await fs.unlink(packageJsonCopyPath);
|
||||
});
|
||||
if (typeof packageJson.dependencies !== 'object') {
|
||||
packageJson.dependencies = {};
|
||||
}
|
||||
for (const extraModule of extraModules) {
|
||||
if (!packageJson.dependencies[extraModule]) {
|
||||
packageJson.dependencies[extraModule] = '*';
|
||||
}
|
||||
}
|
||||
try {
|
||||
await fs.writeJson(packageJsonPath, packageJson, { spaces: 2 });
|
||||
await throwIfSignal(token);
|
||||
return await run(token);
|
||||
} finally {
|
||||
await fs.move(packageJsonCopyPath, packageJsonPath, { overwrite: true });
|
||||
}
|
||||
} else {
|
||||
// package.json does not exist: We create one then remove it.
|
||||
const packageJson = {
|
||||
name: 'theia-rebuild-workaround',
|
||||
version: '0.0.0',
|
||||
dependencies: {} as Record<string, string>,
|
||||
};
|
||||
for (const extraModule of extraModules) {
|
||||
packageJson.dependencies[extraModule] = '*';
|
||||
}
|
||||
try {
|
||||
await fs.writeJson(packageJsonPath, packageJson);
|
||||
await throwIfSignal(token);
|
||||
return await run(token);
|
||||
} finally {
|
||||
await fs.unlink(packageJsonPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporarily install hooks to **try** to prevent the process from exiting while `run` is running.
|
||||
*
|
||||
* Note that it is still possible to kill the process and prevent cleanup logic (e.g. SIGKILL, computer forced shutdown, etc).
|
||||
*/
|
||||
async function guardExit<T>(run: (token: ExitToken) => Promise<T>): Promise<T> {
|
||||
const token = new ExitTokenImpl();
|
||||
const signalListener = (signal: NodeJS.Signals) => token._emitSignal(signal);
|
||||
for (const signal of EXIT_SIGNALS) {
|
||||
process.on(signal, signalListener);
|
||||
}
|
||||
try {
|
||||
return await run(token);
|
||||
} finally {
|
||||
for (const signal of EXIT_SIGNALS) {
|
||||
// FIXME we have a type clash here between Node, Electron and Mocha.
|
||||
// Typescript is resolving here to Electron's Process interface which extends the NodeJS.EventEmitter interface
|
||||
// However instead of the actual NodeJS.EventEmitter interface it resolves to an empty stub of Mocha
|
||||
// Therefore it can't find the correct "off" signature and throws an error
|
||||
// By casting to the NodeJS.EventEmitter ourselves, we short circuit the resolving and it succeeds
|
||||
(process as NodeJS.EventEmitter).off(signal, signalListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ExitTokenImpl implements ExitToken {
|
||||
|
||||
protected _listeners = new Set<(signal: NodeJS.Signals) => void>();
|
||||
protected _lastSignal?: NodeJS.Signals;
|
||||
|
||||
onSignal(callback: (signal: NodeJS.Signals) => void): void {
|
||||
this._listeners.add(callback);
|
||||
}
|
||||
|
||||
getLastSignal(): NodeJS.Signals | undefined {
|
||||
return this._lastSignal;
|
||||
}
|
||||
|
||||
_emitSignal(signal: NodeJS.Signals): void {
|
||||
this._lastSignal = signal;
|
||||
for (const listener of this._listeners) {
|
||||
listener(signal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw `signal` if one was received, runs `cleanup` before doing so.
|
||||
*/
|
||||
async function throwIfSignal(token: ExitToken, cleanup?: () => Promise<void>): Promise<void> {
|
||||
if (token.getLastSignal()) {
|
||||
try {
|
||||
await cleanup?.();
|
||||
} finally {
|
||||
// eslint-disable-next-line no-throw-literal
|
||||
throw token.getLastSignal()!;
|
||||
}
|
||||
}
|
||||
}
|
||||
22
dev-packages/application-manager/tsconfig.json
Normal file
22
dev-packages/application-manager/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"extends": "../../configs/base.tsconfig",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../application-package"
|
||||
},
|
||||
{
|
||||
"path": "../ffmpeg"
|
||||
},
|
||||
{
|
||||
"path": "../native-webpack-plugin"
|
||||
}
|
||||
]
|
||||
}
|
||||
10
dev-packages/application-package/.eslintrc.js
Normal file
10
dev-packages/application-package/.eslintrc.js
Normal file
@@ -0,0 +1,10 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
extends: [
|
||||
'../../configs/build.eslintrc.json'
|
||||
],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: 'tsconfig.json'
|
||||
}
|
||||
};
|
||||
26
dev-packages/application-package/README.md
Normal file
26
dev-packages/application-package/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<div align='center'>
|
||||
|
||||
<br />
|
||||
|
||||
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
||||
|
||||
<h2>ECLIPSE THEIA - APPLICATION-PACKAGE</h2>
|
||||
|
||||
<hr />
|
||||
|
||||
</div>
|
||||
|
||||
## Additional Information
|
||||
|
||||
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
||||
- [Theia - Website](https://theia-ide.org/)
|
||||
|
||||
## License
|
||||
|
||||
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
||||
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
||||
|
||||
## Trademark
|
||||
|
||||
"Theia" is a trademark of the Eclipse Foundation
|
||||
<https://www.eclipse.org/theia>
|
||||
52
dev-packages/application-package/package.json
Normal file
52
dev-packages/application-package/package.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "@theia/application-package",
|
||||
"version": "1.68.0",
|
||||
"description": "Theia application package API.",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/eclipse-theia/theia.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/eclipse-theia/theia/issues"
|
||||
},
|
||||
"homepage": "https://github.com/eclipse-theia/theia",
|
||||
"files": [
|
||||
"lib",
|
||||
"src"
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"typings": "lib/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "theiaext build",
|
||||
"clean": "theiaext clean",
|
||||
"compile": "theiaext compile",
|
||||
"lint": "theiaext lint",
|
||||
"test": "theiaext test",
|
||||
"watch": "theiaext watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@theia/request": "1.68.0",
|
||||
"@types/fs-extra": "^4.0.2",
|
||||
"@types/semver": "^7.5.0",
|
||||
"@types/write-json-file": "^2.2.1",
|
||||
"deepmerge": "^4.2.2",
|
||||
"fs-extra": "^4.0.2",
|
||||
"is-electron": "^2.1.0",
|
||||
"nano": "^10.1.3",
|
||||
"resolve-package-path": "^4.0.3",
|
||||
"semver": "^7.5.4",
|
||||
"tslib": "^2.6.2",
|
||||
"write-json-file": "^2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@theia/ext-scripts": "1.68.0"
|
||||
},
|
||||
"nyc": {
|
||||
"extends": "../../configs/nyc.json"
|
||||
},
|
||||
"gitHead": "21358137e41342742707f660b8e222f940a27652"
|
||||
}
|
||||
21
dev-packages/application-package/src/api.ts
Normal file
21
dev-packages/application-package/src/api.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2021 Ericsson and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
/**
|
||||
* The default supported API version the framework supports.
|
||||
* The version should be in the format `x.y.z`.
|
||||
*/
|
||||
export const DEFAULT_SUPPORTED_API_VERSION = '1.108.0';
|
||||
@@ -0,0 +1,62 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2020 Maksim Ryzhikov and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import * as assert from 'assert';
|
||||
import * as temp from 'temp';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import { ApplicationPackage } from './application-package';
|
||||
import { ApplicationProps } from './application-props';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
const track = temp.track();
|
||||
const sandbox = sinon.createSandbox();
|
||||
|
||||
describe('application-package', function (): void {
|
||||
after((): void => {
|
||||
sandbox.restore();
|
||||
track.cleanupSync();
|
||||
});
|
||||
|
||||
it('should print warning if user set unknown target in package.json and use browser as a default value', function (): void {
|
||||
const warn = sandbox.stub(console, 'warn');
|
||||
const root = createProjectWithTarget('foo');
|
||||
const applicationPackage = new ApplicationPackage({ projectPath: root });
|
||||
assert.deepStrictEqual(applicationPackage.target, ApplicationProps.ApplicationTarget.browser);
|
||||
assert.deepStrictEqual(warn.called, true);
|
||||
});
|
||||
|
||||
it('should set target from package.json', function (): void {
|
||||
const target = 'electron';
|
||||
const root = createProjectWithTarget(target);
|
||||
const applicationPackage = new ApplicationPackage({ projectPath: root });
|
||||
assert.deepStrictEqual(applicationPackage.target, target);
|
||||
});
|
||||
|
||||
it('should prefer target from passed options over target from package.json', function (): void {
|
||||
const pckTarget = 'electron';
|
||||
const optTarget = 'browser';
|
||||
const root = createProjectWithTarget(pckTarget);
|
||||
const applicationPackage = new ApplicationPackage({ projectPath: root, appTarget: optTarget });
|
||||
assert.deepStrictEqual(applicationPackage.target, optTarget);
|
||||
});
|
||||
|
||||
function createProjectWithTarget(target: string): string {
|
||||
const root = track.mkdirSync('foo-project');
|
||||
fs.writeFileSync(path.join(root, 'package.json'), `{"theia": {"target": "${target}"}}`);
|
||||
return root;
|
||||
}
|
||||
});
|
||||
328
dev-packages/application-package/src/application-package.ts
Normal file
328
dev-packages/application-package/src/application-package.ts
Normal file
@@ -0,0 +1,328 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import * as paths from 'path';
|
||||
import { readJsonFile, writeJsonFile } from './json-file';
|
||||
import { NpmRegistry, NodePackage, PublishedNodePackage, sortByKey } from './npm-registry';
|
||||
import { Extension, ExtensionPackage, ExtensionPackageOptions, RawExtensionPackage } from './extension-package';
|
||||
import { ExtensionPackageCollector } from './extension-package-collector';
|
||||
import { ApplicationProps } from './application-props';
|
||||
import deepmerge = require('deepmerge');
|
||||
import resolvePackagePath = require('resolve-package-path');
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export type ApplicationLog = (message?: any, ...optionalParams: any[]) => void;
|
||||
export class ApplicationPackageOptions {
|
||||
readonly projectPath: string;
|
||||
readonly log?: ApplicationLog;
|
||||
readonly error?: ApplicationLog;
|
||||
readonly registry?: NpmRegistry;
|
||||
readonly appTarget?: ApplicationProps.Target;
|
||||
}
|
||||
|
||||
export type ApplicationModuleResolver = (parentPackagePath: string, modulePath: string) => string;
|
||||
|
||||
export class ApplicationPackage {
|
||||
readonly projectPath: string;
|
||||
readonly log: ApplicationLog;
|
||||
readonly error: ApplicationLog;
|
||||
|
||||
constructor(
|
||||
protected readonly options: ApplicationPackageOptions
|
||||
) {
|
||||
this.projectPath = options.projectPath;
|
||||
this.log = options.log || console.log.bind(console);
|
||||
this.error = options.error || console.error.bind(console);
|
||||
}
|
||||
|
||||
protected _registry: NpmRegistry | undefined;
|
||||
get registry(): NpmRegistry {
|
||||
if (this._registry) {
|
||||
return this._registry;
|
||||
}
|
||||
this._registry = this.options.registry || new NpmRegistry();
|
||||
this._registry.updateProps(this.props);
|
||||
return this._registry;
|
||||
}
|
||||
|
||||
get target(): ApplicationProps.Target {
|
||||
return this.props.target;
|
||||
}
|
||||
|
||||
protected _props: ApplicationProps | undefined;
|
||||
get props(): ApplicationProps {
|
||||
if (this._props) {
|
||||
return this._props;
|
||||
}
|
||||
const theia = this.pck.theia || {};
|
||||
|
||||
if (this.options.appTarget) {
|
||||
theia.target = this.options.appTarget;
|
||||
}
|
||||
|
||||
if (theia.target && !(Object.values(ApplicationProps.ApplicationTarget).includes(theia.target))) {
|
||||
const defaultTarget = ApplicationProps.ApplicationTarget.browser;
|
||||
console.warn(`Unknown application target '${theia.target}', '${defaultTarget}' to be used instead`);
|
||||
theia.target = defaultTarget;
|
||||
}
|
||||
|
||||
return this._props = deepmerge(ApplicationProps.DEFAULT, theia);
|
||||
}
|
||||
|
||||
protected _pck: NodePackage | undefined;
|
||||
get pck(): NodePackage {
|
||||
if (this._pck) {
|
||||
return this._pck;
|
||||
}
|
||||
return this._pck = readJsonFile(this.packagePath);
|
||||
}
|
||||
|
||||
protected _frontendModules: Map<string, string> | undefined;
|
||||
protected _frontendPreloadModules: Map<string, string> | undefined;
|
||||
protected _frontendElectronModules: Map<string, string> | undefined;
|
||||
protected _secondaryWindowModules: Map<string, string> | undefined;
|
||||
protected _backendModules: Map<string, string> | undefined;
|
||||
protected _backendElectronModules: Map<string, string> | undefined;
|
||||
protected _electronMainModules: Map<string, string> | undefined;
|
||||
protected _preloadModules: Map<string, string> | undefined;
|
||||
protected _extensionPackages: ReadonlyArray<ExtensionPackage> | undefined;
|
||||
|
||||
/**
|
||||
* Extension packages in the topological order.
|
||||
*/
|
||||
get extensionPackages(): ReadonlyArray<ExtensionPackage> {
|
||||
if (!this._extensionPackages) {
|
||||
const collector = new ExtensionPackageCollector(
|
||||
(raw: PublishedNodePackage, options: ExtensionPackageOptions = {}) => this.newExtensionPackage(raw, options),
|
||||
this.resolveModule
|
||||
);
|
||||
this._extensionPackages = collector.collect(this.packagePath, this.pck);
|
||||
}
|
||||
return this._extensionPackages;
|
||||
}
|
||||
|
||||
getExtensionPackage(extension: string): ExtensionPackage | undefined {
|
||||
return this.extensionPackages.find(pck => pck.name === extension);
|
||||
}
|
||||
|
||||
async findExtensionPackage(extension: string): Promise<ExtensionPackage | undefined> {
|
||||
return this.getExtensionPackage(extension) || this.resolveExtensionPackage(extension);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve an extension name to its associated package
|
||||
* @param extension the name of the extension's package as defined in "dependencies" (might be aliased)
|
||||
* @returns the extension package
|
||||
*/
|
||||
async resolveExtensionPackage(extension: string): Promise<ExtensionPackage | undefined> {
|
||||
const raw = await RawExtensionPackage.view(this.registry, extension);
|
||||
return raw ? this.newExtensionPackage(raw, { alias: extension }) : undefined;
|
||||
}
|
||||
|
||||
protected newExtensionPackage(raw: PublishedNodePackage, options: ExtensionPackageOptions = {}): ExtensionPackage {
|
||||
return new ExtensionPackage(raw, this.registry, options);
|
||||
}
|
||||
|
||||
get frontendPreloadModules(): Map<string, string> {
|
||||
return this._frontendPreloadModules ??= this.computeModules('frontendPreload');
|
||||
}
|
||||
|
||||
get frontendOnlyPreloadModules(): Map<string, string> {
|
||||
if (!this._frontendPreloadModules) {
|
||||
this._frontendPreloadModules = this.computeModules('frontendOnlyPreload', 'frontendPreload');
|
||||
}
|
||||
return this._frontendPreloadModules;
|
||||
}
|
||||
|
||||
get frontendModules(): Map<string, string> {
|
||||
return this._frontendModules ??= this.computeModules('frontend');
|
||||
}
|
||||
|
||||
get frontendOnlyModules(): Map<string, string> {
|
||||
if (!this._frontendModules) {
|
||||
this._frontendModules = this.computeModules('frontendOnly', 'frontend');
|
||||
}
|
||||
return this._frontendModules;
|
||||
}
|
||||
|
||||
get frontendElectronModules(): Map<string, string> {
|
||||
return this._frontendElectronModules ??= this.computeModules('frontendElectron', 'frontend');
|
||||
}
|
||||
|
||||
get secondaryWindowModules(): Map<string, string> {
|
||||
return this._secondaryWindowModules ??= this.computeModules('secondaryWindow');
|
||||
}
|
||||
|
||||
get backendModules(): Map<string, string> {
|
||||
return this._backendModules ??= this.computeModules('backend');
|
||||
}
|
||||
|
||||
get backendElectronModules(): Map<string, string> {
|
||||
return this._backendElectronModules ??= this.computeModules('backendElectron', 'backend');
|
||||
}
|
||||
|
||||
get electronMainModules(): Map<string, string> {
|
||||
return this._electronMainModules ??= this.computeModules('electronMain');
|
||||
}
|
||||
|
||||
get preloadModules(): Map<string, string> {
|
||||
return this._preloadModules ??= this.computeModules('preload');
|
||||
}
|
||||
|
||||
protected computeModules<P extends keyof Extension, S extends keyof Extension = P>(primary: P, secondary?: S): Map<string, string> {
|
||||
const result = new Map<string, string>();
|
||||
let moduleIndex = 1;
|
||||
for (const extensionPackage of this.extensionPackages) {
|
||||
const extensions = extensionPackage.theiaExtensions;
|
||||
if (extensions) {
|
||||
for (const extension of extensions) {
|
||||
const modulePath = extension[primary] || (secondary && extension[secondary]);
|
||||
if (typeof modulePath === 'string') {
|
||||
const extensionPath = paths.join(extensionPackage.name, modulePath).split(paths.sep).join('/');
|
||||
result.set(`${primary}_${moduleIndex}`, extensionPath);
|
||||
moduleIndex = moduleIndex + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
relative(path: string): string {
|
||||
return paths.relative(this.projectPath, path);
|
||||
}
|
||||
|
||||
path(...segments: string[]): string {
|
||||
return paths.resolve(this.projectPath, ...segments);
|
||||
}
|
||||
|
||||
get packagePath(): string {
|
||||
return this.path('package.json');
|
||||
}
|
||||
|
||||
lib(...segments: string[]): string {
|
||||
return this.path('lib', ...segments);
|
||||
}
|
||||
|
||||
srcGen(...segments: string[]): string {
|
||||
return this.path('src-gen', ...segments);
|
||||
}
|
||||
|
||||
backend(...segments: string[]): string {
|
||||
return this.srcGen('backend', ...segments);
|
||||
}
|
||||
|
||||
bundledBackend(...segments: string[]): string {
|
||||
return this.path('backend', 'bundle', ...segments);
|
||||
}
|
||||
|
||||
frontend(...segments: string[]): string {
|
||||
return this.srcGen('frontend', ...segments);
|
||||
}
|
||||
|
||||
isBrowser(): boolean {
|
||||
return this.target === ApplicationProps.ApplicationTarget.browser;
|
||||
}
|
||||
|
||||
isElectron(): boolean {
|
||||
return this.target === ApplicationProps.ApplicationTarget.electron;
|
||||
}
|
||||
|
||||
isBrowserOnly(): boolean {
|
||||
return this.target === ApplicationProps.ApplicationTarget.browserOnly;
|
||||
}
|
||||
|
||||
ifBrowser<T>(value: T): T | undefined;
|
||||
ifBrowser<T>(value: T, defaultValue: T): T;
|
||||
ifBrowser<T>(value: T, defaultValue?: T): T | undefined {
|
||||
return this.isBrowser() ? value : defaultValue;
|
||||
}
|
||||
|
||||
ifElectron<T>(value: T): T | undefined;
|
||||
ifElectron<T>(value: T, defaultValue: T): T;
|
||||
ifElectron<T>(value: T, defaultValue?: T): T | undefined {
|
||||
return this.isElectron() ? value : defaultValue;
|
||||
}
|
||||
|
||||
ifBrowserOnly<T>(value: T): T | undefined;
|
||||
ifBrowserOnly<T>(value: T, defaultValue: T): T;
|
||||
ifBrowserOnly<T>(value: T, defaultValue?: T): T | undefined {
|
||||
return this.isBrowserOnly() ? value : defaultValue;
|
||||
}
|
||||
|
||||
get targetBackendModules(): Map<string, string> {
|
||||
if (this.isBrowserOnly()) {
|
||||
return new Map();
|
||||
}
|
||||
return this.ifBrowser(this.backendModules, this.backendElectronModules);
|
||||
}
|
||||
|
||||
get targetFrontendModules(): Map<string, string> {
|
||||
if (this.isBrowserOnly()) {
|
||||
return this.frontendOnlyModules;
|
||||
}
|
||||
return this.ifBrowser(this.frontendModules, this.frontendElectronModules);
|
||||
}
|
||||
|
||||
get targetFrontendPreloadModules(): Map<string, string> {
|
||||
if (this.isBrowserOnly()) {
|
||||
return this.frontendOnlyPreloadModules;
|
||||
}
|
||||
return this.frontendPreloadModules;
|
||||
}
|
||||
|
||||
get targetElectronMainModules(): Map<string, string> {
|
||||
return this.ifElectron(this.electronMainModules, new Map());
|
||||
}
|
||||
|
||||
setDependency(name: string, version: string | undefined): boolean {
|
||||
const dependencies = this.pck.dependencies || {};
|
||||
const currentVersion = dependencies[name];
|
||||
if (currentVersion === version) {
|
||||
return false;
|
||||
}
|
||||
if (version) {
|
||||
dependencies[name] = version;
|
||||
} else {
|
||||
delete dependencies[name];
|
||||
}
|
||||
this.pck.dependencies = sortByKey(dependencies);
|
||||
return true;
|
||||
}
|
||||
|
||||
save(): Promise<void> {
|
||||
return writeJsonFile(this.packagePath, this.pck, {
|
||||
detectIndent: true
|
||||
});
|
||||
}
|
||||
|
||||
protected _moduleResolver: undefined | ApplicationModuleResolver;
|
||||
/**
|
||||
* A node module resolver in the context of the application package.
|
||||
*/
|
||||
get resolveModule(): ApplicationModuleResolver {
|
||||
if (!this._moduleResolver) {
|
||||
this._moduleResolver = (parentPackagePath, modulePath) => {
|
||||
const resolved = resolvePackagePath(modulePath, parentPackagePath);
|
||||
if (!resolved) {
|
||||
throw new Error(`Cannot resolve package ${modulePath} relative to ${parentPackagePath}`);
|
||||
}
|
||||
return resolved;
|
||||
};
|
||||
}
|
||||
return this._moduleResolver!;
|
||||
}
|
||||
}
|
||||
314
dev-packages/application-package/src/application-props.ts
Normal file
314
dev-packages/application-package/src/application-props.ts
Normal file
@@ -0,0 +1,314 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2018 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import type { BrowserWindowConstructorOptions } from 'electron';
|
||||
export import deepmerge = require('deepmerge');
|
||||
|
||||
export type RequiredRecursive<T> = {
|
||||
[K in keyof T]-?: T[K] extends object ? RequiredRecursive<T[K]> : T[K]
|
||||
};
|
||||
|
||||
/**
|
||||
* Base configuration for the Theia application.
|
||||
*/
|
||||
export interface ApplicationConfig {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
readonly [key: string]: any;
|
||||
}
|
||||
|
||||
export type ElectronFrontendApplicationConfig = RequiredRecursive<ElectronFrontendApplicationConfig.Partial>;
|
||||
export namespace ElectronFrontendApplicationConfig {
|
||||
export const DEFAULT: ElectronFrontendApplicationConfig = {
|
||||
windowOptions: {},
|
||||
showWindowEarly: true,
|
||||
splashScreenOptions: {},
|
||||
uriScheme: 'theia'
|
||||
};
|
||||
export interface SplashScreenOptions {
|
||||
/**
|
||||
* Initial width of the splash screen. Defaults to 640.
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* Initial height of the splash screen. Defaults to 480.
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* Minimum amount of time in milliseconds to show the splash screen before main window is shown.
|
||||
* Defaults to 0, i.e. the splash screen will be shown until the frontend application is ready.
|
||||
*/
|
||||
minDuration?: number;
|
||||
/**
|
||||
* Maximum amount of time in milliseconds before splash screen is removed and main window is shown.
|
||||
* Defaults to 30000.
|
||||
*/
|
||||
maxDuration?: number;
|
||||
/**
|
||||
* The content to load in the splash screen.
|
||||
* Will be resolved from application root.
|
||||
*
|
||||
* Mandatory attribute.
|
||||
*/
|
||||
content?: string;
|
||||
}
|
||||
export interface Partial {
|
||||
|
||||
/**
|
||||
* Override or add properties to the electron `windowOptions`.
|
||||
*
|
||||
* Defaults to `{}`.
|
||||
*/
|
||||
readonly windowOptions?: BrowserWindowConstructorOptions;
|
||||
|
||||
/**
|
||||
* Whether or not to show an empty Electron window as early as possible.
|
||||
*
|
||||
* Defaults to `true`.
|
||||
*/
|
||||
readonly showWindowEarly?: boolean;
|
||||
|
||||
/**
|
||||
* Configuration options for splash screen.
|
||||
*
|
||||
* Defaults to `{}` which results in no splash screen being displayed.
|
||||
*/
|
||||
readonly splashScreenOptions?: SplashScreenOptions;
|
||||
|
||||
/**
|
||||
* The custom uri scheme the application registers to in the operating system.
|
||||
*/
|
||||
readonly uriScheme: string;
|
||||
}
|
||||
}
|
||||
|
||||
export type DefaultTheme = string | Readonly<{ light: string, dark: string }>;
|
||||
export namespace DefaultTheme {
|
||||
export function defaultForOSTheme(theme: DefaultTheme): string {
|
||||
if (typeof theme === 'string') {
|
||||
return theme;
|
||||
}
|
||||
if (
|
||||
typeof window !== 'undefined' &&
|
||||
window.matchMedia &&
|
||||
window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
) {
|
||||
return theme.dark;
|
||||
}
|
||||
return theme.light;
|
||||
}
|
||||
export function defaultBackgroundColor(dark?: boolean): string {
|
||||
// The default light background color is based on the `colors#editor.background` value from
|
||||
// `packages/monaco/data/monaco-themes/vscode/dark_vs.json` and the dark background comes from the `light_vs.json`.
|
||||
return dark ? '#1E1E1E' : '#FFFFFF';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Application configuration for the frontend. The following properties will be injected into the `index.html`.
|
||||
*/
|
||||
export type FrontendApplicationConfig = RequiredRecursive<FrontendApplicationConfig.Partial>;
|
||||
export namespace FrontendApplicationConfig {
|
||||
export const DEFAULT: FrontendApplicationConfig = {
|
||||
applicationName: 'Eclipse Theia',
|
||||
defaultTheme: { light: 'light', dark: 'dark' },
|
||||
defaultIconTheme: 'theia-file-icons',
|
||||
electron: ElectronFrontendApplicationConfig.DEFAULT,
|
||||
defaultLocale: '',
|
||||
validatePreferencesSchema: true,
|
||||
reloadOnReconnect: false,
|
||||
uriScheme: 'theia'
|
||||
};
|
||||
export interface Partial extends ApplicationConfig {
|
||||
|
||||
/**
|
||||
* The default theme for the application.
|
||||
*
|
||||
* Defaults to `dark` if the OS's theme is dark. Otherwise `light`.
|
||||
*/
|
||||
readonly defaultTheme?: DefaultTheme;
|
||||
|
||||
/**
|
||||
* The default icon theme for the application.
|
||||
*
|
||||
* Defaults to `none`.
|
||||
*/
|
||||
readonly defaultIconTheme?: string;
|
||||
|
||||
/**
|
||||
* The name of the application.
|
||||
*
|
||||
* Defaults to `Eclipse Theia`.
|
||||
*/
|
||||
readonly applicationName?: string;
|
||||
|
||||
/**
|
||||
* Electron specific configuration.
|
||||
*
|
||||
* Defaults to `ElectronFrontendApplicationConfig.DEFAULT`.
|
||||
*/
|
||||
readonly electron?: ElectronFrontendApplicationConfig.Partial;
|
||||
|
||||
/**
|
||||
* The default locale for the application.
|
||||
*
|
||||
* Defaults to "".
|
||||
*/
|
||||
readonly defaultLocale?: string;
|
||||
|
||||
/**
|
||||
* When `true`, the application will validate the JSON schema of the preferences on start
|
||||
* and log warnings to the console if the schema is not valid.
|
||||
*
|
||||
* Defaults to `true`.
|
||||
*/
|
||||
readonly validatePreferencesSchema?: boolean;
|
||||
|
||||
/**
|
||||
* When 'true', the window will reload in case the front end reconnects to a back-end,
|
||||
* but the back end does not have a connection context for this front end anymore.
|
||||
*/
|
||||
readonly reloadOnReconnect?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Application configuration for the backend.
|
||||
*/
|
||||
export type BackendApplicationConfig = RequiredRecursive<BackendApplicationConfig.Partial>;
|
||||
export namespace BackendApplicationConfig {
|
||||
export const DEFAULT: BackendApplicationConfig = {
|
||||
singleInstance: true,
|
||||
frontendConnectionTimeout: 0,
|
||||
configurationFolder: '.theia'
|
||||
};
|
||||
export interface Partial extends ApplicationConfig {
|
||||
|
||||
/**
|
||||
* If true and in Electron mode, only one instance of the application is allowed to run at a time.
|
||||
*
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
readonly singleInstance?: boolean;
|
||||
|
||||
/**
|
||||
* The time in ms the connection context will be preserved for reconnection after a front end disconnects.
|
||||
*/
|
||||
readonly frontendConnectionTimeout?: number;
|
||||
|
||||
/**
|
||||
* Configuration folder within the home user folder
|
||||
*
|
||||
* Defaults to `.theia`
|
||||
*/
|
||||
readonly configurationFolder?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configuration for the generator.
|
||||
*/
|
||||
export type GeneratorConfig = RequiredRecursive<GeneratorConfig.Partial>;
|
||||
export namespace GeneratorConfig {
|
||||
export const DEFAULT: GeneratorConfig = {
|
||||
preloadTemplate: ''
|
||||
};
|
||||
export interface Partial {
|
||||
|
||||
/**
|
||||
* Template to use for extra preload content markup (file path or HTML).
|
||||
*
|
||||
* Defaults to `''`.
|
||||
*/
|
||||
readonly preloadTemplate?: string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface NpmRegistryProps {
|
||||
|
||||
/**
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
readonly next: boolean;
|
||||
|
||||
/**
|
||||
* Defaults to `https://registry.npmjs.org/`.
|
||||
*/
|
||||
readonly registry: string;
|
||||
|
||||
}
|
||||
export namespace NpmRegistryProps {
|
||||
export const DEFAULT: NpmRegistryProps = {
|
||||
next: false,
|
||||
registry: 'https://registry.npmjs.org/'
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Representation of all backend and frontend related Theia extension and application properties.
|
||||
*/
|
||||
export interface ApplicationProps extends NpmRegistryProps {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
readonly [key: string]: any;
|
||||
|
||||
/**
|
||||
* Whether the extension targets the browser or electron. Defaults to `browser`.
|
||||
*/
|
||||
readonly target: ApplicationProps.Target;
|
||||
|
||||
/**
|
||||
* Frontend related properties.
|
||||
*/
|
||||
readonly frontend: {
|
||||
readonly config: FrontendApplicationConfig
|
||||
};
|
||||
|
||||
/**
|
||||
* Backend specific properties.
|
||||
*/
|
||||
readonly backend: {
|
||||
readonly config: BackendApplicationConfig
|
||||
};
|
||||
|
||||
/**
|
||||
* Generator specific properties.
|
||||
*/
|
||||
readonly generator: {
|
||||
readonly config: GeneratorConfig
|
||||
};
|
||||
}
|
||||
export namespace ApplicationProps {
|
||||
export type Target = `${ApplicationTarget}`;
|
||||
export enum ApplicationTarget {
|
||||
browser = 'browser',
|
||||
electron = 'electron',
|
||||
browserOnly = 'browser-only'
|
||||
};
|
||||
export const DEFAULT: ApplicationProps = {
|
||||
...NpmRegistryProps.DEFAULT,
|
||||
target: 'browser',
|
||||
backend: {
|
||||
config: BackendApplicationConfig.DEFAULT
|
||||
},
|
||||
frontend: {
|
||||
config: FrontendApplicationConfig.DEFAULT
|
||||
},
|
||||
generator: {
|
||||
config: GeneratorConfig.DEFAULT
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
76
dev-packages/application-package/src/environment.ts
Normal file
76
dev-packages/application-package/src/environment.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2018 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
const isElectron: () => boolean = require('is-electron');
|
||||
|
||||
/**
|
||||
* The electron specific environment.
|
||||
*/
|
||||
class ElectronEnv {
|
||||
|
||||
/**
|
||||
* Environment variable that can be accessed on the `process` to check if running in electron or not.
|
||||
*/
|
||||
readonly THEIA_ELECTRON_VERSION = 'THEIA_ELECTRON_VERSION';
|
||||
|
||||
/**
|
||||
* `true` if running in electron. Otherwise, `false`.
|
||||
*
|
||||
* Can be called from both the `main` and the render process. Also works for forked cluster workers.
|
||||
*/
|
||||
is(): boolean {
|
||||
return isElectron();
|
||||
}
|
||||
|
||||
/**
|
||||
* `true` if running in Electron in development mode. Otherwise, `false`.
|
||||
*
|
||||
* Cannot be used from the browser. From the browser, it is always `false`.
|
||||
*/
|
||||
isDevMode(): boolean {
|
||||
return this.is()
|
||||
&& typeof process !== 'undefined'
|
||||
// `defaultApp` does not exist on the Node.js API, but on electron (`electron.d.ts`).
|
||||
&& ((process as any).defaultApp || /node_modules[/\\]electron[/\\]/.test(process.execPath)); // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and return with a new environment object which always contains the `ELECTRON_RUN_AS_NODE: 1` property pair.
|
||||
* This should be used to `spawn` and `fork` a new Node.js process from the Node.js shipped with Electron. Otherwise, a new Electron
|
||||
* process will be spawned which [has side-effects](https://github.com/eclipse-theia/theia/issues/5385).
|
||||
*
|
||||
* If called from the backend and the `env` argument is not defined, it falls back to `process.env` such as Node.js behaves
|
||||
* with the [`SpawnOptions`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options).
|
||||
* If `env` is defined, it will be shallow-copied.
|
||||
*
|
||||
* Calling this function from the frontend does not make any sense, hence throw an error.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
runAsNodeEnv(env?: any): any & { ELECTRON_RUN_AS_NODE: 1 } {
|
||||
if (typeof process === 'undefined') {
|
||||
throw new Error("'process' cannot be undefined.");
|
||||
}
|
||||
return {
|
||||
...(env === undefined ? process.env : env),
|
||||
ELECTRON_RUN_AS_NODE: 1
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const electron = new ElectronEnv();
|
||||
const environment: Readonly<{ electron: ElectronEnv }> = { electron };
|
||||
export { environment };
|
||||
@@ -0,0 +1,88 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import { readJsonFile } from './json-file';
|
||||
import { NodePackage, PublishedNodePackage } from './npm-registry';
|
||||
import { ExtensionPackage, ExtensionPackageOptions, RawExtensionPackage } from './extension-package';
|
||||
|
||||
export class ExtensionPackageCollector {
|
||||
|
||||
protected readonly sorted: ExtensionPackage[] = [];
|
||||
protected readonly visited = new Set<string>();
|
||||
|
||||
constructor(
|
||||
protected readonly extensionPackageFactory: (raw: PublishedNodePackage, options?: ExtensionPackageOptions) => ExtensionPackage,
|
||||
protected readonly resolveModule: (packagepath: string, modulePath: string) => string
|
||||
) { }
|
||||
|
||||
protected root: NodePackage;
|
||||
collect(packagePath: string, pck: NodePackage): ReadonlyArray<ExtensionPackage> {
|
||||
this.root = pck;
|
||||
this.collectPackages(packagePath, pck);
|
||||
return this.sorted;
|
||||
}
|
||||
|
||||
protected collectPackages(packagePath: string, pck: NodePackage): void {
|
||||
for (const [dependency, versionRange] of [
|
||||
...Object.entries(pck.dependencies ?? {}),
|
||||
...Object.entries(pck.peerDependencies ?? {})
|
||||
]) {
|
||||
const optional = pck.peerDependenciesMeta?.[dependency]?.optional || false;
|
||||
this.collectPackage(packagePath, dependency, versionRange!, optional);
|
||||
}
|
||||
}
|
||||
|
||||
protected parent: ExtensionPackage | undefined;
|
||||
protected collectPackagesWithParent(packagePath: string, pck: NodePackage, parent: ExtensionPackage): void {
|
||||
const current = this.parent;
|
||||
this.parent = parent;
|
||||
this.collectPackages(packagePath, pck);
|
||||
this.parent = current;
|
||||
}
|
||||
|
||||
protected collectPackage(parentPackagePath: string, name: string, versionRange: string, optional: boolean): void {
|
||||
if (this.visited.has(name)) {
|
||||
return;
|
||||
}
|
||||
this.visited.add(name);
|
||||
|
||||
let packagePath: string | undefined;
|
||||
try {
|
||||
packagePath = this.resolveModule(parentPackagePath, name);
|
||||
} catch (err) {
|
||||
if (optional) {
|
||||
console.log(`Could not resolve optional peer dependency '${name}'. Skipping...`);
|
||||
} else {
|
||||
console.error(err.message);
|
||||
}
|
||||
}
|
||||
if (!packagePath) {
|
||||
return;
|
||||
}
|
||||
const pck: NodePackage = readJsonFile(packagePath);
|
||||
if (RawExtensionPackage.is(pck)) {
|
||||
const parent = this.parent;
|
||||
const version = pck.version;
|
||||
const transitive = !(name in this.root.dependencies!);
|
||||
pck.installed = { packagePath, version, parent, transitive };
|
||||
pck.version = versionRange;
|
||||
const extensionPackage = this.extensionPackageFactory(pck, { alias: name });
|
||||
this.collectPackagesWithParent(packagePath, pck, extensionPackage);
|
||||
this.sorted.push(extensionPackage);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
223
dev-packages/application-package/src/extension-package.ts
Normal file
223
dev-packages/application-package/src/extension-package.ts
Normal file
@@ -0,0 +1,223 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import * as fs from 'fs-extra';
|
||||
import * as paths from 'path';
|
||||
import * as semver from 'semver';
|
||||
import { NpmRegistry, PublishedNodePackage, NodePackage } from './npm-registry';
|
||||
|
||||
export interface Extension {
|
||||
frontendPreload?: string;
|
||||
frontendOnlyPreload?: string;
|
||||
frontend?: string;
|
||||
frontendOnly?: string;
|
||||
frontendElectron?: string;
|
||||
secondaryWindow?: string;
|
||||
backend?: string;
|
||||
backendElectron?: string;
|
||||
electronMain?: string;
|
||||
preload?: string;
|
||||
}
|
||||
|
||||
export interface ExtensionPackageOptions {
|
||||
/**
|
||||
* Alias to use in place of the original package's name.
|
||||
*/
|
||||
alias?: string
|
||||
}
|
||||
|
||||
export class ExtensionPackage {
|
||||
|
||||
protected _name: string;
|
||||
|
||||
constructor(
|
||||
readonly raw: PublishedNodePackage & Partial<RawExtensionPackage>,
|
||||
protected readonly registry: NpmRegistry,
|
||||
options: ExtensionPackageOptions = {}
|
||||
) {
|
||||
this._name = options.alias ?? raw.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the extension's package as defined in "dependencies" (might be aliased)
|
||||
*/
|
||||
get name(): string {
|
||||
return this._name;
|
||||
}
|
||||
|
||||
get version(): string {
|
||||
if (this.raw.installed) {
|
||||
return this.raw.installed.version;
|
||||
}
|
||||
if (this.raw.view) {
|
||||
const latestVersion = this.raw.view.latestVersion;
|
||||
if (latestVersion) {
|
||||
return latestVersion;
|
||||
}
|
||||
}
|
||||
return this.raw.version;
|
||||
}
|
||||
|
||||
get description(): string {
|
||||
return this.raw.description || '';
|
||||
}
|
||||
|
||||
get theiaExtensions(): Extension[] {
|
||||
return this.raw.theiaExtensions || [];
|
||||
}
|
||||
|
||||
get installed(): boolean {
|
||||
return !!this.raw.installed;
|
||||
}
|
||||
|
||||
get dependent(): string | undefined {
|
||||
if (!this.transitive) {
|
||||
return undefined;
|
||||
}
|
||||
let current = this.parent!;
|
||||
let parent = current.parent;
|
||||
while (parent !== undefined) {
|
||||
current = parent;
|
||||
parent = current.parent;
|
||||
}
|
||||
return current.name;
|
||||
}
|
||||
|
||||
get transitive(): boolean {
|
||||
return !!this.raw.installed && this.raw.installed.transitive;
|
||||
}
|
||||
|
||||
get parent(): ExtensionPackage | undefined {
|
||||
if (this.raw.installed) {
|
||||
return this.raw.installed.parent;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
protected async view(): Promise<RawExtensionPackage.ViewState> {
|
||||
if (this.raw.view === undefined) {
|
||||
const raw = await RawExtensionPackage.view(this.registry, this.name, this.version);
|
||||
this.raw.view = raw ? raw.view : new RawExtensionPackage.ViewState(this.registry);
|
||||
}
|
||||
return this.raw.view!;
|
||||
}
|
||||
|
||||
protected readme?: string;
|
||||
async getReadme(): Promise<string> {
|
||||
if (this.readme === undefined) {
|
||||
this.readme = await this.resolveReadme();
|
||||
}
|
||||
return this.readme;
|
||||
}
|
||||
protected async resolveReadme(): Promise<string> {
|
||||
const raw = await this.view();
|
||||
if (raw && raw.readme) {
|
||||
return raw.readme;
|
||||
}
|
||||
if (this.raw.installed) {
|
||||
const readmePath = paths.resolve(this.raw.installed.packagePath, '..', 'README.md');
|
||||
if (await fs.pathExists(readmePath)) {
|
||||
return fs.readFile(readmePath, { encoding: 'utf8' });
|
||||
}
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
getAuthor(): string {
|
||||
if (this.raw.publisher) {
|
||||
return this.raw.publisher.username;
|
||||
}
|
||||
if (typeof this.raw.author === 'string') {
|
||||
return this.raw.author;
|
||||
}
|
||||
if (this.raw.author && this.raw.author.name) {
|
||||
return this.raw.author.name;
|
||||
}
|
||||
if (!!this.raw.maintainers && this.raw.maintainers.length > 0) {
|
||||
return this.raw.maintainers[0].username;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export interface RawExtensionPackage extends PublishedNodePackage {
|
||||
installed?: RawExtensionPackage.InstalledState
|
||||
view?: RawExtensionPackage.ViewState
|
||||
theiaExtensions: Extension[];
|
||||
}
|
||||
export namespace RawExtensionPackage {
|
||||
export interface InstalledState {
|
||||
version: string;
|
||||
packagePath: string;
|
||||
transitive: boolean;
|
||||
parent?: ExtensionPackage;
|
||||
}
|
||||
export class ViewState {
|
||||
readme?: string;
|
||||
tags?: {
|
||||
[tag: string]: string
|
||||
};
|
||||
constructor(
|
||||
protected readonly registry: NpmRegistry
|
||||
) { }
|
||||
get latestVersion(): string | undefined {
|
||||
if (this.tags) {
|
||||
if (this.registry.props.next) {
|
||||
const next = this.tags['next'];
|
||||
if (next !== undefined) {
|
||||
return next;
|
||||
}
|
||||
}
|
||||
const latest = this.tags['latest'];
|
||||
if (this.registry.props.next || !semver.prerelease(latest)) {
|
||||
return latest;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
export function is(pck: NodePackage | undefined): pck is RawExtensionPackage {
|
||||
return PublishedNodePackage.is(pck) && !!pck.theiaExtensions;
|
||||
}
|
||||
export async function view(registry: NpmRegistry, name: string, version?: string): Promise<RawExtensionPackage | undefined> {
|
||||
const result = await registry.view(name).catch(() => undefined);
|
||||
if (!result) {
|
||||
return undefined;
|
||||
}
|
||||
const tags = result['dist-tags'];
|
||||
const versions = [tags['latest']];
|
||||
if (registry.props.next) {
|
||||
versions.push(tags['next']);
|
||||
}
|
||||
if (version) {
|
||||
versions.push(tags[version], version);
|
||||
}
|
||||
for (const current of versions.reverse()) {
|
||||
const raw = result.versions[current];
|
||||
if (is(raw)) {
|
||||
const viewState = new ViewState(registry);
|
||||
viewState.readme = result.readme;
|
||||
viewState.tags = tags;
|
||||
raw.view = viewState;
|
||||
return raw;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
22
dev-packages/application-package/src/index.ts
Normal file
22
dev-packages/application-package/src/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
export * from './npm-registry';
|
||||
export * from './extension-package';
|
||||
export * from './application-package';
|
||||
export * from './application-props';
|
||||
export * from './environment';
|
||||
export * from './api';
|
||||
25
dev-packages/application-package/src/json-file.ts
Normal file
25
dev-packages/application-package/src/json-file.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
import * as fs from 'fs';
|
||||
import writeJsonFile = require('write-json-file');
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
function readJsonFile(path: string): any {
|
||||
return JSON.parse(fs.readFileSync(path, { encoding: 'utf-8' }));
|
||||
}
|
||||
|
||||
export { writeJsonFile, readJsonFile };
|
||||
166
dev-packages/application-package/src/npm-registry.ts
Normal file
166
dev-packages/application-package/src/npm-registry.ts
Normal file
@@ -0,0 +1,166 @@
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2017 TypeFox and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import * as nano from 'nano';
|
||||
import { RequestContext } from '@theia/request';
|
||||
import { NodeRequestService } from '@theia/request/lib/node-request-service';
|
||||
import { NpmRegistryProps } from './application-props';
|
||||
|
||||
export interface IChangeStream {
|
||||
on(event: 'data', cb: (change: { id: string }) => void): void;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
export interface Author {
|
||||
name: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
export interface Maintainer {
|
||||
username: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
export interface Dependencies {
|
||||
[name: string]: string | undefined;
|
||||
}
|
||||
|
||||
export interface PeerDependenciesMeta {
|
||||
[name: string]: { optional: boolean } | undefined;
|
||||
}
|
||||
|
||||
export interface NodePackage {
|
||||
name?: string;
|
||||
version?: string;
|
||||
description?: string;
|
||||
publisher?: Maintainer;
|
||||
author?: string | Author;
|
||||
maintainers?: Maintainer[];
|
||||
keywords?: string[];
|
||||
dependencies?: Dependencies;
|
||||
peerDependencies?: Dependencies;
|
||||
peerDependenciesMeta?: PeerDependenciesMeta;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
export interface PublishedNodePackage extends NodePackage {
|
||||
name: string;
|
||||
version: string;
|
||||
}
|
||||
export namespace PublishedNodePackage {
|
||||
export function is(pck: NodePackage | undefined): pck is PublishedNodePackage {
|
||||
return !!pck && !!pck.name && !!pck.version;
|
||||
}
|
||||
}
|
||||
|
||||
export interface ViewResult {
|
||||
'dist-tags': {
|
||||
[tag: string]: string
|
||||
}
|
||||
'versions': {
|
||||
[version: string]: NodePackage
|
||||
},
|
||||
'readme': string;
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
export function sortByKey(object: { [key: string]: any }): {
|
||||
[key: string]: any;
|
||||
} {
|
||||
return Object.keys(object).sort().reduce((sorted, key) => {
|
||||
sorted[key] = object[key];
|
||||
return sorted;
|
||||
}, {} as { [key: string]: any });
|
||||
}
|
||||
|
||||
export class NpmRegistryOptions {
|
||||
/**
|
||||
* Default: false.
|
||||
*/
|
||||
readonly watchChanges: boolean;
|
||||
}
|
||||
|
||||
export class NpmRegistry {
|
||||
|
||||
readonly props: NpmRegistryProps = { ...NpmRegistryProps.DEFAULT };
|
||||
protected readonly options: NpmRegistryOptions;
|
||||
|
||||
protected changes?: nano.ChangesReaderScope;
|
||||
protected readonly index = new Map<string, Promise<ViewResult>>();
|
||||
|
||||
protected request: NodeRequestService;
|
||||
|
||||
constructor(options?: Partial<NpmRegistryOptions>) {
|
||||
this.options = {
|
||||
watchChanges: false,
|
||||
...options
|
||||
};
|
||||
this.resetIndex();
|
||||
this.request = new NodeRequestService();
|
||||
}
|
||||
|
||||
updateProps(props?: Partial<NpmRegistryProps>): void {
|
||||
const oldRegistry = this.props.registry;
|
||||
Object.assign(this.props, props);
|
||||
const newRegistry = this.props.registry;
|
||||
if (oldRegistry !== newRegistry) {
|
||||
this.resetIndex();
|
||||
}
|
||||
}
|
||||
protected resetIndex(): void {
|
||||
this.index.clear();
|
||||
if (this.options.watchChanges && this.props.registry === NpmRegistryProps.DEFAULT.registry) {
|
||||
if (this.changes) {
|
||||
this.changes.stop();
|
||||
}
|
||||
// Invalidate index with NPM registry web hooks
|
||||
this.changes = nano('https://replicate.npmjs.com').use('registry').changesReader;
|
||||
this.changes.get({}).on('change', change => this.invalidate(change.id));
|
||||
}
|
||||
}
|
||||
protected invalidate(name: string): void {
|
||||
if (this.index.delete(name)) {
|
||||
this.view(name);
|
||||
}
|
||||
}
|
||||
|
||||
view(name: string): Promise<ViewResult> {
|
||||
const indexed = this.index.get(name);
|
||||
if (indexed) {
|
||||
return indexed;
|
||||
}
|
||||
const result = this.doView(name);
|
||||
this.index.set(name, result);
|
||||
result.catch(() => this.index.delete(name));
|
||||
return result;
|
||||
}
|
||||
|
||||
protected async doView(name: string): Promise<ViewResult> {
|
||||
let url = this.props.registry;
|
||||
if (name[0] === '@') {
|
||||
url += '@' + encodeURIComponent(name.substring(1));
|
||||
} else {
|
||||
url += encodeURIComponent(name);
|
||||
}
|
||||
const response = await this.request.request({ url });
|
||||
if (response.res.statusCode !== 200) {
|
||||
throw new Error(`HTTP ${response.res.statusCode}: for ${url}`);
|
||||
}
|
||||
return RequestContext.asJson<ViewResult>(response);
|
||||
}
|
||||
|
||||
}
|
||||
16
dev-packages/application-package/tsconfig.json
Normal file
16
dev-packages/application-package/tsconfig.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": "../../configs/base.tsconfig",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../request"
|
||||
}
|
||||
]
|
||||
}
|
||||
13
dev-packages/cli/.eslintrc.js
Normal file
13
dev-packages/cli/.eslintrc.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
extends: [
|
||||
'../../configs/build.eslintrc.json'
|
||||
],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: 'tsconfig.json'
|
||||
},
|
||||
rules: {
|
||||
'import/no-dynamic-require': 'off'
|
||||
}
|
||||
};
|
||||
370
dev-packages/cli/README.md
Normal file
370
dev-packages/cli/README.md
Normal file
@@ -0,0 +1,370 @@
|
||||
<div align='center'>
|
||||
|
||||
<br />
|
||||
|
||||
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
||||
|
||||
<h2>ECLIPSE THEIA - CLI</h2>
|
||||
|
||||
<hr />
|
||||
|
||||
</div>
|
||||
|
||||
## Outline
|
||||
|
||||
- [Outline](#outline)
|
||||
- [Description](#description)
|
||||
- [Getting Started](#getting-started)
|
||||
- [Configure](#configure)
|
||||
- [Application Properties](#application-properties)
|
||||
- [Default Preferences](#default-preferences)
|
||||
- [Default Theme](#default-theme)
|
||||
- [Build Target](#build-target)
|
||||
- [Electron Frontend Application Config](#electron-frontend-application-config)
|
||||
- [Using Latest Builds](#using-latest-builds)
|
||||
- [Building](#building)
|
||||
- [Build](#build)
|
||||
- [Watch](#watch)
|
||||
- [Clean](#clean)
|
||||
- [Rebuilding Native Modules](#rebuilding-native-modules)
|
||||
- [Running](#running)
|
||||
- [Debugging](#debugging)
|
||||
- [Testing](#testing)
|
||||
- [Enabling Tests](#enabling-tests)
|
||||
- [Writing Tests](#writing-tests)
|
||||
- [Running Tests](#running-tests)
|
||||
- [Configuring Tests](#configuring-tests)
|
||||
- [Inspecting Tests](#inspecting-tests)
|
||||
- [Reporting Test Coverage](#reporting-test-coverage)
|
||||
- [Downloading Plugins](#downloading-plugins)
|
||||
- [Autogenerated Application](#autogenerated-application)
|
||||
- [Additional Information](#additional-information)
|
||||
- [License](#license)
|
||||
- [Trademark](#trademark)
|
||||
|
||||
## Description
|
||||
|
||||
The `@theia/cli` package provides helpful scripts and commands for extension and application development.
|
||||
The contributed `theia`, is a command line tool to manage Theia-based applications.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Install `@theia/cli` as a dev dependency in your application.
|
||||
|
||||
With yarn:
|
||||
|
||||
```bash
|
||||
yarn add @theia/cli@next --dev
|
||||
```
|
||||
|
||||
With npm:
|
||||
|
||||
```bash
|
||||
npm install @theia/cli@next --save-dev
|
||||
```
|
||||
|
||||
## Configure
|
||||
|
||||
A Theia-based application can be configured via the `theia` property as described in the application's `package.json`.
|
||||
|
||||
### Application Properties
|
||||
|
||||
It is possible `Application Properties` for a given application.\
|
||||
For example, an application can define it's `applicationName` using the following syntax:
|
||||
|
||||
```json
|
||||
"theia": {
|
||||
"frontend": {
|
||||
"config": {
|
||||
"applicationName": "Custom Application Name",
|
||||
}
|
||||
}
|
||||
},
|
||||
```
|
||||
|
||||
### Default Preferences
|
||||
|
||||
If required, an application can define for a given preference, the default value.
|
||||
For example, an application can update the preference value for `files.enableTrash` based on it's requirements:
|
||||
|
||||
```json
|
||||
|
||||
"theia": {
|
||||
"frontend": {
|
||||
"config": {
|
||||
"preferences": {
|
||||
"files.enableTrash": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
```
|
||||
|
||||
### Default Theme
|
||||
|
||||
Default color and icon themes can be configured in `theia.frontend.config` section:
|
||||
|
||||
```json
|
||||
"theia": {
|
||||
"frontend": {
|
||||
"config": {
|
||||
"defaultTheme": "light",
|
||||
"defaultIconTheme": "vs-seti"
|
||||
}
|
||||
}
|
||||
},
|
||||
```
|
||||
|
||||
### Build Target
|
||||
|
||||
The following targets are supported: `browser` and `electron`. By default `browser` target is used.
|
||||
The target can be configured in the `package.json` via `theia/target` property, e.g:
|
||||
|
||||
```json
|
||||
{
|
||||
"theia": {
|
||||
"target": "electron"
|
||||
},
|
||||
"dependencies": {
|
||||
"@theia/electron": "latest"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For `electron` target applications, is it mandatory to include **Electron** runtime dependencies. The `@theia/electron` package is the easiest way to install the necessary dependencies.
|
||||
|
||||
### Electron Frontend Application Config
|
||||
|
||||
The `electron` frontend application configuration provides configuration options for the `electron` target.\
|
||||
The currently supported configurations are:
|
||||
|
||||
- `disallowReloadKeybinding`: if set to `true`, reloading the current browser window won't be possible with the <kbd>Ctrl/Cmd</kbd> + <kbd>r</kbd> keybinding. It is `false` by default. Has no effect if not in an electron environment.
|
||||
- `windowOptions`: override or add properties to the electron `windowOptions`.
|
||||
|
||||
```json
|
||||
{
|
||||
"theia": {
|
||||
"target": "electron",
|
||||
"frontend": {
|
||||
"config": {
|
||||
"electron": {
|
||||
"disallowReloadKeybinding": true,
|
||||
"windowOptions": {
|
||||
"titleBarStyle": "hidden",
|
||||
"webPreferences": {
|
||||
"webSecurity": false,
|
||||
"nodeIntegration": true,
|
||||
"webviewTag": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Using Latest Builds
|
||||
|
||||
If you set `next` in your theia config, then Theia will prefer `next` over `latest` as the latest tag.
|
||||
|
||||
```json
|
||||
{
|
||||
"theia": {
|
||||
"next": "true"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
### Build
|
||||
|
||||
The following command can be used to build the application:
|
||||
|
||||
**Development**
|
||||
|
||||
theia build --mode development
|
||||
|
||||
**Production**
|
||||
|
||||
theia build
|
||||
|
||||
### Watch
|
||||
|
||||
The following command can be used to rebuild the application on each change:
|
||||
|
||||
theia build --watch --mode development
|
||||
|
||||
### Clean
|
||||
|
||||
The following command can be used to clean up the build result:
|
||||
|
||||
In order to clean up the build result:
|
||||
|
||||
theia clean
|
||||
|
||||
Arguments are passed directly to [webpack](https://webpack.js.org/). Use `--help` to learn which options are supported.
|
||||
|
||||
## Rebuilding Native Modules
|
||||
|
||||
In order to run Electron targets, one should rebuild native node modules for an electron version:
|
||||
|
||||
theia rebuild
|
||||
|
||||
To rollback native modules, change the target to `browser` and run the command again.
|
||||
|
||||
## Running
|
||||
|
||||
To run the backend server:
|
||||
|
||||
theia start
|
||||
|
||||
For the browser target a server is started on <http://localhost:3000> by default.
|
||||
For the electron target a server is started on `localhost` host with the dynamically allocated port by default.
|
||||
|
||||
Arguments are passed directly to a server, use `--help` to learn which options are supported.
|
||||
|
||||
## Debugging
|
||||
|
||||
To debug the backend server:
|
||||
|
||||
theia start --inspect
|
||||
|
||||
Theia CLI accepts `--inspect` node flag: <https://nodejs.org/en/docs/inspector/#command-line-options>.
|
||||
|
||||
## Testing
|
||||
|
||||
### Enabling Tests
|
||||
|
||||
First enable `expose-loader` in `webpack.config.js`
|
||||
to expose modules from bundled code to tests
|
||||
by un-commenting:
|
||||
|
||||
```js
|
||||
/**
|
||||
* Expose bundled modules on window.theia.moduleName namespace, e.g.
|
||||
* window['theia']['@theia/core/lib/common/uri'].
|
||||
* Such syntax can be used by external code, for instance, for testing.
|
||||
config.module.rules.push({
|
||||
test: /\.js$/,
|
||||
loader: require.resolve('@theia/application-manager/lib/expose-loader')
|
||||
}); */
|
||||
```
|
||||
|
||||
After that run `theia build` again to expose modules in generated bundle files.
|
||||
|
||||
### Writing Tests
|
||||
|
||||
See [API Integration Testing](../../doc/api-testing.md) docs.
|
||||
|
||||
### Running Tests
|
||||
|
||||
To start the backend server and run API tests against it:
|
||||
|
||||
theia test
|
||||
|
||||
After running test this command terminates. It accepts the same arguments as `start` command,
|
||||
but as well additional arguments to specify test files, enable inspection or generate test coverage.
|
||||
|
||||
### Configuring Tests
|
||||
|
||||
To specify test files:
|
||||
|
||||
theia test . --test-spec=./test/*.spec.js --plugins=./plugins
|
||||
|
||||
This command starts the application with a current directory as a workspace,
|
||||
load VS Code extensions from `./plugins`
|
||||
and run test files matching `./test/*.spec.js` glob.
|
||||
|
||||
Use `theia test --help` to learn more options. Test specific options start with `--test-`.
|
||||
|
||||
### Inspecting Tests
|
||||
|
||||
To inspect tests:
|
||||
|
||||
theia test . --test-spec=./test/*.spec.js --test-inspect --inspect
|
||||
|
||||
This command starts the application server in the debug mode
|
||||
as well as open the Chrome devtools to debug frontend code and test files.
|
||||
One can reload/rerun code and tests by simply reloading the page.
|
||||
|
||||
> Important! Since tests are relying on focus, while running tests keep the page focused.
|
||||
|
||||
### Reporting Test Coverage
|
||||
|
||||
To report test coverage:
|
||||
|
||||
theia test . --test-spec=./test/*.spec.js --test-coverage
|
||||
|
||||
This command executes tests and generate test coverage files consumable by [Istanbul](https://github.com/istanbuljs/istanbuljs).
|
||||
|
||||
## Downloading Plugins
|
||||
|
||||
The `@theia/cli` package provides a utility for applications to define and download a list of plugins it requires as part of their application using the command:
|
||||
|
||||
theia download:plugins
|
||||
|
||||
This utility works by declaring in the `package.json` a location to store downloaded plugins, as well as defining each plugin the application wishes to download.
|
||||
|
||||
The property `theiaPluginsDir` describes the location of which to download plugins (relative to the `package.json`), for example:
|
||||
|
||||
```json
|
||||
"theiaPluginsDir": "plugins",
|
||||
```
|
||||
|
||||
The property `theiaPlugins` describes the list of plugins to download, for example:
|
||||
|
||||
```json
|
||||
"theiaPlugins": {
|
||||
"vscode.theme-defaults": "https://open-vsx.org/api/vscode/theme-defaults/1.62.3/file/vscode.theme-defaults-1.62.3.vsix",
|
||||
"vscode-builtin-extension-pack": "https://open-vsx.org/api/eclipse-theia/builtin-extension-pack/1.50.0/file/eclipse-theia.builtin-extension-pack-1.50.0.vsix",
|
||||
"vscode-editorconfig": "https://open-vsx.org/api/EditorConfig/EditorConfig/0.14.4/file/EditorConfig.EditorConfig-0.14.4.vsix",
|
||||
"vscode-eslint": "https://open-vsx.org/api/dbaeumer/vscode-eslint/2.1.1/file/dbaeumer.vscode-eslint-2.1.1.vsix",
|
||||
"rust-analyzer": "https://open-vsx.org/api/rust-lang/rust-analyzer/${targetPlatform}/0.4.1473/file/rust-lang.rust-analyzer-0.4.1473@${targetPlatform}.vsix"
|
||||
}
|
||||
```
|
||||
|
||||
As seen in the `rust-analyzer` entry we can use placeholders in the URLs. Supported placeholders are:
|
||||
|
||||
- The `${targetPlatform}` Placeholder, which resolves to a string like `win32-x64` describing the local system and architecture. This is useful for adding non-universal plugins.
|
||||
|
||||
Please note that in order to use `extensionPacks` properly you should use `namespace.name` as the `id` you give extensions so that when resolving the pack we do not re-download an existing plugin under a different name.
|
||||
|
||||
The property `theiaPluginsExcludeIds` can be used to declare the list of plugin `ids` to exclude when using extension-packs.
|
||||
The `ids` referenced by the property will not be downloaded when resolving extension-packs, and can be used to omit extensions which are problematic or unwanted. The format of the property is as follows:
|
||||
|
||||
```json
|
||||
"theiaPluginsExcludeIds": [
|
||||
"vscode.cpp"
|
||||
]
|
||||
```
|
||||
|
||||
## Autogenerated Application
|
||||
|
||||
This package can auto-generate application code for both the backend and frontend, as well as webpack configuration files.
|
||||
|
||||
When targeting Electron, the `electron-main.js` script will spawn the backend process in a Node.js sub-process, where Electron's API won't be available. To prevent the generated application from forking the backend, you can pass a `--no-cluster` flag. This flag is mostly useful/used for debugging.
|
||||
|
||||
```sh
|
||||
# when developing a Theia application with @theia/cli:
|
||||
yarn theia start --no-cluster
|
||||
|
||||
# when starting a bundled application made using @theia/cli:
|
||||
bundled-application.exe --no-cluster
|
||||
```
|
||||
|
||||
## Additional Information
|
||||
|
||||
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
||||
- [Theia - Website](https://theia-ide.org/)
|
||||
|
||||
## License
|
||||
|
||||
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
||||
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
||||
|
||||
## Trademark
|
||||
|
||||
"Theia" is a trademark of the Eclipse Foundation
|
||||
<https://www.eclipse.org/theia>
|
||||
37
dev-packages/cli/bin/theia-patch.js
Executable file
37
dev-packages/cli/bin/theia-patch.js
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// *****************************************************************************
|
||||
// Copyright (C) 2024 STMicroelectronics and others.
|
||||
//
|
||||
// This program and the accompanying materials are made available under the
|
||||
// terms of the Eclipse Public License v. 2.0 which is available at
|
||||
// http://www.eclipse.org/legal/epl-2.0.
|
||||
//
|
||||
// This Source Code may also be made available under the following Secondary
|
||||
// Licenses when the conditions for such availability set forth in the Eclipse
|
||||
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
||||
// with the GNU Classpath Exception which is available at
|
||||
// https://www.gnu.org/software/classpath/license.html.
|
||||
//
|
||||
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
||||
// *****************************************************************************
|
||||
// @ts-check
|
||||
const path = require('path');
|
||||
const cp = require('child_process');
|
||||
|
||||
const patchPackage = require.resolve('patch-package');
|
||||
console.log(`patch-package = ${patchPackage}`);
|
||||
|
||||
const patchesDir = path.join('.', 'node_modules', '@theia', 'cli', 'patches');
|
||||
|
||||
console.log(`patchesdir = ${patchesDir}`);
|
||||
|
||||
const env = Object.assign({}, process.env);
|
||||
|
||||
const scriptProcess = cp.exec(`node "${patchPackage}" --patch-dir "${patchesDir}"`, {
|
||||
cwd: process.cwd(),
|
||||
env
|
||||
});
|
||||
|
||||
scriptProcess.stdout.pipe(process.stdout);
|
||||
scriptProcess.stderr.pipe(process.stderr);
|
||||
2
dev-packages/cli/bin/theia.js
Executable file
2
dev-packages/cli/bin/theia.js
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('../lib/theia')
|
||||
68
dev-packages/cli/package.json
Normal file
68
dev-packages/cli/package.json
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"name": "@theia/cli",
|
||||
"version": "1.68.0",
|
||||
"description": "Theia CLI.",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"license": "EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/eclipse-theia/theia.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/eclipse-theia/theia/issues"
|
||||
},
|
||||
"homepage": "https://github.com/eclipse-theia/theia",
|
||||
"files": [
|
||||
"bin",
|
||||
"lib",
|
||||
"src",
|
||||
"patches"
|
||||
],
|
||||
"bin": {
|
||||
"theia": "./bin/theia.js",
|
||||
"theia-patch": "./bin/theia-patch.js"
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "theiaext compile",
|
||||
"lint": "theiaext lint",
|
||||
"build": "theiaext build",
|
||||
"watch": "theiaext watch",
|
||||
"clean": "theiaext clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@theia/application-manager": "1.68.0",
|
||||
"@theia/application-package": "1.68.0",
|
||||
"@theia/ffmpeg": "1.68.0",
|
||||
"@theia/localization-manager": "1.68.0",
|
||||
"@theia/ovsx-client": "1.68.0",
|
||||
"@theia/request": "1.68.0",
|
||||
"@types/chai": "^4.2.7",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"chai": "^4.3.10",
|
||||
"chalk": "4.0.0",
|
||||
"decompress": "^4.2.1",
|
||||
"escape-string-regexp": "4.0.0",
|
||||
"glob": "^8.0.3",
|
||||
"http-server": "^14.1.1",
|
||||
"limiter": "^2.1.0",
|
||||
"log-update": "^4.0.0",
|
||||
"mocha": "^10.1.0",
|
||||
"patch-package": "^8.0.0",
|
||||
"puppeteer": "23.1.0",
|
||||
"puppeteer-core": "23.1.0",
|
||||
"puppeteer-to-istanbul": "1.4.0",
|
||||
"temp": "^0.9.1",
|
||||
"tslib": "^2.6.2",
|
||||
"yargs": "^15.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.2.7",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"@types/proxy-from-env": "^1.0.1"
|
||||
},
|
||||
"gitHead": "21358137e41342742707f660b8e222f940a27652"
|
||||
}
|
||||
449
dev-packages/cli/patches/@lumino+widgets+2.7.2.patch
Normal file
449
dev-packages/cli/patches/@lumino+widgets+2.7.2.patch
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user