Compare commits

...
Author SHA1 Message Date
Ruben Fiszel e3472192f2 merge 2025-06-28 12:01:27 +02:00
Ruben Fiszel 25f3b6e431 tests 2025-06-28 11:59:45 +02:00
Ruben Fiszel 5fbf95fb26 Update jobs.rs 2025-03-12 15:05:20 +01:00
Ruben Fiszel f1c61614ad use more cpus 2025-03-11 10:58:06 +01:00
Ruben Fiszel 89f0bee990 Merge branch 'main' into rf/migrateFromDepot 2025-03-11 09:57:42 +01:00
Ruben Fiszel a0104262fa add proxy logs 2025-02-24 12:26:59 +01:00
Ruben Fiszel 735ce547ee update bun to 1.2.3 2025-02-23 23:08:56 +01:00
Ruben Fiszel dea4e4f732 test 2025-02-23 11:52:11 +01:00
Ruben Fiszel d14060b855 test 2025-02-23 11:38:32 +01:00
Ruben Fiszel 498c9bd6c8 upload artifacts 2025-02-23 11:13:36 +01:00
Ruben Fiszel 95812a8d9f upload artifacts 2025-02-23 10:52:55 +01:00
Ruben Fiszel dc698a0506 add back oauth2 2025-02-23 10:35:57 +01:00
Ruben Fiszel c3b5a1db65 add back oauth2 2025-02-23 10:31:38 +01:00
Ruben Fiszel 7ffefddad4 update 2025-02-23 10:25:08 +01:00
Ruben Fiszel 80f88c414f test with cache 2025-02-23 10:23:27 +01:00
Ruben Fiszel 863ab39b95 Merge branch 'main' into rf/migrateFromDepot 2025-02-23 09:55:45 +01:00
Ruben Fiszel 7e4c63b972 all 2025-01-24 00:04:06 +01:00
Ruben Fiszel 0f6092cca9 all 2025-01-24 00:00:00 +01:00
Ruben Fiszel 30737fa604 all 2025-01-23 23:08:42 +01:00
Ruben Fiszel 6644597677 all 2025-01-23 23:04:50 +01:00
Ruben Fiszel ca91939c41 all 2025-01-23 22:59:17 +01:00
Ruben Fiszel d9bc8ae181 all 2025-01-23 22:53:38 +01:00
Ruben Fiszel 34b51f8718 all 2025-01-23 22:50:54 +01:00
Ruben Fiszel edddf7ed3a all 2025-01-23 22:49:00 +01:00
Ruben Fiszel effb0b6cb0 all 2025-01-23 22:47:23 +01:00
356 changed files with 136707 additions and 58 deletions
+101 -56
View File
@@ -7,7 +7,7 @@ env:
name: Build windmill:main
on:
push:
branches: [main]
branches: [main, rf/migrateFromDepot]
tags: ["*"]
pull_request:
types: [opened, synchronize, reopened]
@@ -35,69 +35,113 @@ concurrency:
permissions: write-all
# build:
jobs:
build:
runs-on: ubicloud
if: (github.event_name != 'workflow_dispatch') || (github.event.inputs &&
!github.event.inputs.ee)
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
uses: ./.github/workflows/multi-build-arch.yml
with:
registry: ghcr.io
name: windmill
image_name:
${{ github.event_name != 'pull_request' && github.event_name !=
'workflow_dispatch' && github.repository ||
'windmill-labs/windmill-test' }}
fetch_depth: 0
push_image: true
build_runner_cpus: 16
metadata_flavor: |
latest=false
metadata_labels: |
org.opencontainers.image.licenses=AGPLv3
build_args: |
features=embedding,parquet,jemalloc,deno_core,license,http_trigger,zip,dind,php,mysql,websocket,oauth2,python,smtp,csharp,static_frontend,rust
checkout_ee: true
secrets: inherit # that makes secrets available to the called workflow
- name: Read EE repo commit hash
run: |
echo "ee_repo_ref=$(cat ./backend/ee-repo-ref.txt)" >> "$GITHUB_ENV"
# runs-on: ubicloud
# if:
# (github.event_name != 'workflow_dispatch') || (github.event.inputs &&
# !github.event.inputs.ee)
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
- uses: actions/checkout@v4
with:
repository: windmill-labs/windmill-ee-private
path: ./windmill-ee-private
ref: ${{ env.ee_repo_ref }}
token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }}
fetch-depth: 0
# - name: Read EE repo commit hash
# run: |
# echo "ee_repo_ref=$(cat ./backend/ee-repo-ref.txt)" >> "$GITHUB_ENV"
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
- uses: depot/setup-action@v1
# - uses: actions/checkout@v4
# with:
# repository: windmill-labs/windmill-ee-private
# path: ./windmill-ee-private
# ref: ${{ env.ee_repo_ref }}
# token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }}
# fetch-depth: 0
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# # - name: Set up Docker Buildx
# # uses: docker/setup-buildx-action@v2
# - uses: depot/setup-action@v1
- name: Substitute EE code (EE logic is behind feature flag)
run: |
./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private
# - name: Login to registry
# uses: docker/login-action@v3
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta-public
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=false
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
# - name: Substitute EE code (EE logic is behind feature flag)
# run: |
# ./backend/substitute_ee_code.sh --copy --dir ./windmill-ee-private
- name: Build and push publicly
uses: depot/build-push-action@v1
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
build-args: |
features=embedding,parquet,openidconnect,jemalloc,license,http_trigger,zip,oauth2,dind,postgres_trigger,mqtt_trigger,websocket,smtp,static_frontend,agent_worker_server,all_languages,deno_core,mcp,private
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEV_SHA }}
${{ steps.meta-public.outputs.tags }}
labels: |
${{ steps.meta-public.outputs.labels }}
# - name: Docker meta
# id: meta-public
# uses: docker/metadata-action@v5
# with:
# images: |
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# flavor: |
# latest=false
# tags: |
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
# - name: Build and push publicly
# uses: depot/build-push-action@v1
# with:
# context: .
# platforms: linux/amd64,linux/arm64
# push: true
# build-args: |
# features=embedding,parquet,openidconnect,jemalloc,deno_core,license,http_trigger,zip,oauth2,dind,php,mysql,mssql,bigquery,oracledb,websocket,python,smtp,csharp,static_frontend,rust
# tags: |
# ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEV_SHA }}
# ${{ steps.meta-public.outputs.tags }}
# labels: |
# ${{ steps.meta-public.outputs.labels }}
# org.opencontainers.image.licenses=AGPLv3
build_ee_ubi:
uses: ./.github/workflows/multi-build-arch.yml
with:
registry: ghcr.io
name: windmill-ee
image_name:
${{ github.event_name != 'pull_request' && github.event_name !=
'workflow_dispatch' && github.repository ||
'windmill-labs/windmill-ee-test' }}
fetch_depth: 0
push_image: true
build_runner_cpus: 16
metadata_flavor: |
latest=false
metadata_labels: |
org.opencontainers.image.licenses=AGPLv3
build_args: |
features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,tantivy,deno_core,license,http_trigger,zip,oauth2,kafka,nats,otel,dind,php,mysql,mssql,bigquery,oracledb,websocket,python,smtp,csharp,static_frontend,rust
checkout_ee: true
secrets: inherit # that makes secrets available to the called workflow
build_ee:
runs-on: ubicloud
@@ -451,7 +495,8 @@ jobs:
needs: [build_ee_nsjail]
runs-on: ubicloud-standard-2-arm
if: (github.event_name != 'pull_request') && (github.event_name !=
'workflow_dispatch')
'workflow_dispatch') && (github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/tags/v'))
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+177
View File
@@ -0,0 +1,177 @@
name: Build multi-platform Docker image
on:
workflow_call:
inputs:
registry:
required: true
type: string
image_name:
required: true
type: string
name:
required: true
type: string
metadata_flavor:
default: |
latest=auto
type: string
metadata_tags:
type: string
default: |
type=schedule
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
type=sha
metadata_labels:
type: string
default: |
org.opencontainers.image.licenses=Windmill-Enterprise-License
build_args:
type: string
default: ""
push_image:
default: false
type: boolean
checkout_ee:
default: false
type: boolean
fetch_depth:
default: 1
type: number
after_checkout_command:
default: ""
type: string
build_runner_cpus:
default: 4
type: number
jobs:
docker:
name: Docker ${{ matrix.platform }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: ubicloud-standard-${{ inputs.build_runner_cpus }}
platform: linux/amd64
- runner: ubicloud-standard-${{ inputs.build_runner_cpus }}-arm
platform: linux/arm64
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: ${{ inputs.fetch_depth }}
- name: Read EE repo commit hash
run: |
echo "ee_repo_ref=$(cat ./backend/ee-repo-ref.txt)" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
if: ${{ inputs.checkout_ee }}
with:
repository: windmill-labs/windmill-ee-private
path: ./windmill-ee-private
ref: ${{ env.ee_repo_ref }}
token: ${{ secrets.WINDMILL_EE_PRIVATE_ACCESS }}
fetch-depth: ${{ inputs.fetch_depth }}
- name: Run command after checkout
if: ${{ inputs.after_checkout_command }}
run: ${{ inputs.after_checkout_command }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ inputs.registry }}/${{ inputs.image_name }}
tags: ${{ inputs.metadata_tags }}
labels: ${{ inputs.metadata_labels }}
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
context: .
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
build-args: ${{ inputs.build_args }}
cache-from: type=gha,scope=ubicloud-${{ matrix.runner }}-${{ inputs.name }}
cache-to: type=gha,mode=max,scope=ubicloud-${{ matrix.runner }}-${{ inputs.name }}
outputs: type=image,name=${{ inputs.registry }}/${{ inputs.image_name
}},push-by-digest=true,name-canonical=true,push=true
- name: Print cache proxy logs
run: sudo cat /var/log/cacheproxy.log
if: always()
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
if: ${{ inputs.push_image }}
uses: actions/upload-artifact@v4
with:
name: digests-${{ matrix.runner }}-${{ inputs.name }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge:
if: ${{ inputs.push_image }}
runs-on: ubicloud
needs:
- docker
steps:
- name: Download digests
uses: actions/download-artifact@v4
with:
pattern: digests-*
merge-multiple: true
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ inputs.registry }}/${{ inputs.image_name }}
tags: ${{ inputs.metadata_tags }}
labels: ${{ inputs.metadata_labels }}
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ inputs.registry }}/${{ inputs.image_name }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ inputs.registry }}/${{ inputs.image_name }}:${{ steps.meta.outputs.version }}
+1 -1
View File
@@ -80,7 +80,7 @@ COPY .git/ .git/
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=$SCCACHE_DIR,sharing=locked \
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --release --features "$features"
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --jobs $(nproc) --release --features "$features"
FROM ${DEBIAN_IMAGE}
+1
View File
@@ -0,0 +1 @@
/home/rubenfiszel/windmill/../windmill-ee-private/windmill-api/src/agent_workers_ee.rs
+1
View File
@@ -0,0 +1 @@
/home/rubenfiszel/windmill/../windmill-ee-private/windmill-api/src/gcp_triggers_ee.rs
+1
View File
@@ -0,0 +1 @@
/home/rubenfiszel/windmill/../windmill-ee-private/windmill-api/src/git_sync_ee.rs
+1
View File
@@ -0,0 +1 @@
/home/rubenfiszel/windmill/../windmill-ee-private/windmill-api/src/inkeep_ee.rs
+1
View File
@@ -0,0 +1 @@
/home/rubenfiszel/windmill/../windmill-ee-private/windmill-api/src/teams_approvals_ee.rs
+1 -1
View File
@@ -159,7 +159,7 @@ impl QueuedJob {
impl Default for QueuedJob {
fn default() -> Self {
Self {
workspace_id: "".to_string(),
workspace_id: "w".to_string(),
id: Uuid::default(),
parent_job: None,
created_by: "".to_string(),
+1
View File
@@ -0,0 +1 @@
/home/rubenfiszel/windmill/../windmill-ee-private/windmill-common/src/oidc_ee.rs
+1
View File
@@ -0,0 +1 @@
/home/rubenfiszel/windmill/../windmill-ee-private/windmill-queue/src/jobs_ee.rs
+1
View File
@@ -0,0 +1 @@
/home/rubenfiszel/windmill/../windmill-ee-private/windmill-worker/src/otel_ee.rs
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<!-- <script src="https://cdn.tailwindcss.com"></script> -->
<!-- <script src="http://localhost:8097"></script> -->
</head>
<body>
<script>
// Listen for messages from the parent window
window.addEventListener("message", (event) => {
// Get the CSS and JS content from the event
const { type, css, js } = event.data;
if (type == 'preview') {
document.head.querySelectorAll("style").forEach(style => style.remove());
// Inject CSS into the document
const styleElement = document.createElement("style");
styleElement.textContent = css;
document.head.appendChild(styleElement);
document.body.innerHTML = `
<div id="root">
</div>
`;
// const addProxy = document.createElement("script");
// addProxy.textContent = `if (window.parent !== window) { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__ }`;
// document.body.appendChild(addProxy);
// Inject and execute JavaScript in the document
const scriptElement = document.createElement("script");
scriptElement.textContent = js;
document.body.appendChild(scriptElement);
}
});
</script>
</body>
</html>
@@ -0,0 +1 @@
{"information_for_contributors":["This file has been converted from https://github.com/microsoft/vscode-JSON.tmLanguage/blob/master/JSON.tmLanguage","If you want to provide a fix or improvement, please create a pull request against the original repository.","Once accepted there, we are happy to receive an update request."],"version":"https://github.com/microsoft/vscode-JSON.tmLanguage/commit/9bd83f1c252b375e957203f21793316203f61f70","name":"JSON with Comments","scopeName":"source.json.comments","patterns":[{"include":"#value"}],"repository":{"array":{"begin":"\\[","beginCaptures":{"0":{"name":"punctuation.definition.array.begin.json.comments"}},"end":"\\]","endCaptures":{"0":{"name":"punctuation.definition.array.end.json.comments"}},"name":"meta.structure.array.json.comments","patterns":[{"include":"#value"},{"match":",","name":"punctuation.separator.array.json.comments"},{"match":"[^\\s\\]]","name":"invalid.illegal.expected-array-separator.json.comments"}]},"comments":{"patterns":[{"begin":"/\\*\\*(?!/)","captures":{"0":{"name":"punctuation.definition.comment.json.comments"}},"end":"\\*/","name":"comment.block.documentation.json.comments"},{"begin":"/\\*","captures":{"0":{"name":"punctuation.definition.comment.json.comments"}},"end":"\\*/","name":"comment.block.json.comments"},{"captures":{"1":{"name":"punctuation.definition.comment.json.comments"}},"match":"(//).*$\\n?","name":"comment.line.double-slash.js"}]},"constant":{"match":"\\b(?:true|false|null)\\b","name":"constant.language.json.comments"},"number":{"match":"(?x) # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional","name":"constant.numeric.json.comments"},"object":{"begin":"\\{","beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.json.comments"}},"end":"\\}","endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.json.comments"}},"name":"meta.structure.dictionary.json.comments","patterns":[{"comment":"the JSON object key","include":"#objectkey"},{"include":"#comments"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.dictionary.key-value.json.comments"}},"end":"(,)|(?=\\})","endCaptures":{"1":{"name":"punctuation.separator.dictionary.pair.json.comments"}},"name":"meta.structure.dictionary.value.json.comments","patterns":[{"comment":"the JSON object value","include":"#value"},{"match":"[^\\s,]","name":"invalid.illegal.expected-dictionary-separator.json.comments"}]},{"match":"[^\\s\\}]","name":"invalid.illegal.expected-dictionary-separator.json.comments"}]},"string":{"begin":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.json.comments"}},"end":"\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.json.comments"}},"name":"string.quoted.double.json.comments","patterns":[{"include":"#stringcontent"}]},"objectkey":{"begin":"\"","beginCaptures":{"0":{"name":"punctuation.support.type.property-name.begin.json.comments"}},"end":"\"","endCaptures":{"0":{"name":"punctuation.support.type.property-name.end.json.comments"}},"name":"string.json.comments support.type.property-name.json.comments","patterns":[{"include":"#stringcontent"}]},"stringcontent":{"patterns":[{"match":"(?x) # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4}) # and four hex digits","name":"constant.character.escape.json.comments"},{"match":"\\\\.","name":"invalid.illegal.unrecognized-string-escape.json.comments"}]},"value":{"patterns":[{"include":"#constant"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"},{"include":"#comments"}]}}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,237 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array/>
<key>hideFromUser</key>
<true/>
<key>name</key>
<string>Regular Expressions (JavaScript)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>regex-character-class</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\[wWsSdD]|\.</string>
<key>name</key>
<string>constant.character.character-class.regexp</string>
</dict>
<dict>
<key>match</key>
<string>\\([0-7]{3}|x\h\h|u\h\h\h\h)</string>
<key>name</key>
<string>constant.character.numeric.regexp</string>
</dict>
<dict>
<key>match</key>
<string>\\c[A-Z]</string>
<key>name</key>
<string>constant.character.control.regexp</string>
</dict>
<dict>
<key>match</key>
<string>\\.</string>
<key>name</key>
<string>constant.character.escape.backslash.regexp</string>
</dict>
</array>
</dict>
<key>regexp</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\[bB]|\^|\$</string>
<key>name</key>
<string>keyword.control.anchor.regexp</string>
</dict>
<dict>
<key>match</key>
<string>\\[1-9]\d*</string>
<key>name</key>
<string>keyword.other.back-reference.regexp</string>
</dict>
<dict>
<key>match</key>
<string>[?+*]|\{(\d+,\d+|\d+,|,\d+|\d+)\}\??</string>
<key>name</key>
<string>keyword.operator.quantifier.regexp</string>
</dict>
<dict>
<key>match</key>
<string>\|</string>
<key>name</key>
<string>keyword.operator.or.regexp</string>
</dict>
<dict>
<key>begin</key>
<string>(\()((\?=)|(\?!))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.group.regexp</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>meta.assertion.look-ahead.regexp</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>meta.assertion.negative-look-ahead.regexp</string>
</dict>
</dict>
<key>end</key>
<string>(\))</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.group.regexp</string>
</dict>
</dict>
<key>name</key>
<string>meta.group.assertion.regexp</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\((\?:)?</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.group.regexp</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.group.regexp</string>
</dict>
</dict>
<key>name</key>
<string>meta.group.regexp</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(\[)(\^)?</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.character-class.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.negation.regexp</string>
</dict>
</dict>
<key>end</key>
<string>(\])</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.character-class.regexp</string>
</dict>
</dict>
<key>name</key>
<string>constant.other.character-class.set.regexp</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>constant.character.numeric.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>constant.character.control.regexp</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>constant.character.escape.backslash.regexp</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>constant.character.numeric.regexp</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>constant.character.control.regexp</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>constant.character.escape.backslash.regexp</string>
</dict>
</dict>
<key>match</key>
<string>(?:.|(\\(?:[0-7]{3}|x\h\h|u\h\h\h\h))|(\\c[A-Z])|(\\.))\-(?:[^\]\\]|(\\(?:[0-7]{3}|x\h\h|u\h\h\h\h))|(\\c[A-Z])|(\\.))</string>
<key>name</key>
<string>constant.other.character-class.range.regexp</string>
</dict>
<dict>
<key>include</key>
<string>#regex-character-class</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#regex-character-class</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.js.regexp</string>
<key>uuid</key>
<string>AC8679DE-3AC7-4056-84F9-69A7ADC29DDD</string>
</dict>
</plist>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021-present Johnson Chu
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.
@@ -0,0 +1 @@
For a full change history, refer to the [CHANGELOG](https://github.com/vuejs/language-tools/blob/master/CHANGELOG.md) on the GitHub site.
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
try {
module.exports = require('./out/nodeClientMain');
} catch {
module.exports = require('./dist/client');
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,56 @@
{
"autoClosingPairs": [
// html
{
"open": "{",
"close": "}"
},
{
"open": "[",
"close": "]"
},
{
"open": "(",
"close": ")"
},
{
"open": "'",
"close": "'"
},
{
"open": "\"",
"close": "\""
},
{
"open": "<!--",
"close": "-->",
"notIn": [
"comment",
"string"
]
},
// javascript
// commented to fix https://github.com/vuejs/language-tools/issues/1428
// {
// "open": "`",
// "close": "`",
// "notIn": [
// "string",
// "comment"
// ]
// },
{
"open": "/**",
"close": " */",
"notIn": [
"string"
]
}
],
"colorizedBracketPairs": [
[
"{{",
"}}"
],
]
}
@@ -0,0 +1,40 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"fileTypes": [],
"injectionSelector": "L:text.html.markdown",
"patterns": [
{
"include": "#vue-code-block"
}
],
"repository": {
"vue-code-block": {
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vue)((\\s+|:|,|\\{|\\?)[^`~]*)?$)",
"name": "markup.fenced_code.block.markdown",
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
"beginCaptures": {
"3": {
"name": "punctuation.definition.markdown"
},
"4": {
"name": "fenced_code.block.language.markdown"
},
"5": {
"name": "fenced_code.block.language.attributes.markdown",
"patterns": []
}
},
"endCaptures": {
"3": {
"name": "punctuation.definition.markdown"
}
},
"patterns": [
{
"include": "source.vue"
}
]
}
},
"scopeName": "markdown.vue.codeblock"
}
@@ -0,0 +1,64 @@
{
"fileTypes": [ ],
"scopeName": "mdx.vue.codeblock",
"injectionSelector": "L:source.mdx",
"patterns": [
{
"include": "#vue-code-block"
}
],
"repository": {
"vue-code-block": {
"patterns": [
{
"begin": "(?:^|\\G)[\\t ]*(`{3,})(?:[\\t ]*((?i:(?:.*\\.)?vue))(?:[\\t ]+((?:[^\\n\\r`])+))?)(?:[\\t ]*$)",
"beginCaptures": {
"1": {
"name": "string.other.begin.code.fenced.mdx"
},
"2": {
"name": "entity.name.function.mdx"
}
},
"contentName": "meta.embedded.vue",
"end": "(\\1)(?:[\\t ]*$)",
"endCaptures": {
"1": {
"name": "string.other.end.code.fenced.mdx"
}
},
"name": "markup.code.vue.mdx",
"patterns": [
{
"include": "source.vue"
}
]
},
{
"begin": "(?:^|\\G)[\\t ]*(~{3,})(?:[\\t ]*((?i:(?:.*\\.)?vue))(?:[\\t ]+((?:[^\\n\\r])+))?)(?:[\\t ]*$)",
"beginCaptures": {
"1": {
"name": "string.other.begin.code.fenced.mdx"
},
"2": {
"name": "entity.name.function.mdx"
}
},
"contentName": "meta.embedded.vue",
"end": "(\\1)(?:[\\t ]*$)",
"endCaptures": {
"1": {
"name": "string.other.end.code.fenced.mdx"
}
},
"name": "markup.code.vue.mdx",
"patterns": [
{
"include": "source.vue"
}
]
}
]
}
}
}
@@ -0,0 +1,580 @@
{
"private": true,
"name": "volar",
"version": "2.2.0",
"repository": {
"type": "git",
"url": "https://github.com/vuejs/language-tools.git",
"directory": "packages/vscode"
},
"categories": [
"Programming Languages"
],
"sponsor": {
"url": "https://github.com/sponsors/johnsoncodehk"
},
"icon": "images/icon.png",
"displayName": "Vue - Official",
"description": "Language Support for Vue",
"author": "johnsoncodehk",
"publisher": "Vue",
"engines": {
"vscode": "^1.88.0"
},
"activationEvents": [
"onLanguage:vue",
"onLanguage:markdown",
"onLanguage:html"
],
"main": "./client.js",
"browser": "./web.js",
"capabilities": {
"virtualWorkspaces": {
"supported": "limited",
"description": "Install https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-web to have IntelliSense for .vue files in Web IDE."
}
},
"contributes": {
"jsonValidation": [
{
"fileMatch": "tsconfig.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "tsconfig-*.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "tsconfig.*.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "jsconfig.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "jsconfig-*.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
},
{
"fileMatch": "jsconfig.*.json",
"url": "./dist/schemas/vue-tsconfig.schema.json"
}
],
"languages": [
{
"id": "vue",
"extensions": [
".vue"
],
"configuration": "./languages/vue-language-configuration.json"
},
{
"id": "markdown",
"configuration": "./languages/markdown-language-configuration.json"
},
{
"id": "html",
"configuration": "./languages/sfc-template-language-configuration.json"
},
{
"id": "jade",
"configuration": "./languages/sfc-template-language-configuration.json"
},
{
"id": "plaintext",
"configuration": "./languages/sfc-template-language-configuration.json"
}
],
"typescriptServerPlugins": [
{
"name": "vue-typescript-plugin-pack",
"enableForWorkspaceTypeScriptVersions": true,
"configNamespace": "typescript"
}
],
"grammars": [
{
"language": "vue",
"scopeName": "source.vue",
"path": "./syntaxes/vue.tmLanguage.json",
"embeddedLanguages": {
"source.vue": "vue",
"text": "plaintext",
"text.html.derivative": "html",
"text.html.markdown": "markdown",
"text.pug": "jade",
"source.css": "css",
"source.css.scss": "scss",
"source.css.less": "less",
"source.sass": "sass",
"source.stylus": "stylus",
"source.postcss": "postcss",
"source.js": "javascript",
"source.ts": "typescript",
"source.js.jsx": "javascriptreact",
"source.tsx": "typescriptreact",
"source.coffee": "coffeescript",
"meta.tag.js": "jsx-tags",
"meta.tag.tsx": "jsx-tags",
"meta.tag.without-attributes.js": "jsx-tags",
"meta.tag.without-attributes.tsx": "jsx-tags",
"source.json": "json",
"source.json.comments": "jsonc",
"source.json5": "json5",
"source.yaml": "yaml",
"source.toml": "toml",
"source.graphql": "graphql"
},
"unbalancedBracketScopes": [
"keyword.operator.relational",
"storage.type.function.arrow",
"keyword.operator.bitwise.shift",
"meta.brace.angle",
"punctuation.definition.tag"
]
},
{
"scopeName": "markdown.vue.codeblock",
"path": "./syntaxes/markdown-vue.json",
"injectTo": [
"text.html.markdown"
],
"embeddedLanguages": {
"meta.embedded.block.vue": "vue",
"source.vue": "vue",
"text": "plaintext",
"text.html.derivative": "html",
"text.html.markdown": "markdown",
"text.pug": "jade",
"source.css": "css",
"source.css.scss": "scss",
"source.css.less": "less",
"source.sass": "sass",
"source.stylus": "stylus",
"source.postcss": "postcss",
"source.js": "javascript",
"source.ts": "typescript",
"source.js.jsx": "javascriptreact",
"source.tsx": "typescriptreact",
"source.coffee": "coffeescript",
"meta.tag.js": "jsx-tags",
"meta.tag.tsx": "jsx-tags",
"meta.tag.without-attributes.js": "jsx-tags",
"meta.tag.without-attributes.tsx": "jsx-tags",
"source.json": "json",
"source.json.comments": "jsonc",
"source.json5": "json5",
"source.yaml": "yaml",
"source.toml": "toml",
"source.graphql": "graphql"
}
},
{
"scopeName": "mdx.vue.codeblock",
"path": "./syntaxes/mdx-vue.json",
"injectTo": [
"source.mdx"
],
"embeddedLanguages": {
"mdx.embedded.vue": "vue",
"source.vue": "vue",
"text": "plaintext",
"text.html.derivative": "html",
"text.html.markdown": "markdown",
"text.pug": "jade",
"source.css": "css",
"source.css.scss": "scss",
"source.css.less": "less",
"source.sass": "sass",
"source.stylus": "stylus",
"source.postcss": "postcss",
"source.js": "javascript",
"source.ts": "typescript",
"source.js.jsx": "javascriptreact",
"source.tsx": "typescriptreact",
"source.coffee": "coffeescript",
"meta.tag.js": "jsx-tags",
"meta.tag.tsx": "jsx-tags",
"meta.tag.without-attributes.js": "jsx-tags",
"meta.tag.without-attributes.tsx": "jsx-tags",
"source.json": "json",
"source.json.comments": "jsonc",
"source.json5": "json5",
"source.yaml": "yaml",
"source.toml": "toml",
"source.graphql": "graphql"
}
},
{
"scopeName": "vue.directives",
"path": "./syntaxes/vue-directives.json",
"injectTo": [
"source.vue",
"text.html.markdown",
"text.html.derivative",
"text.pug"
]
},
{
"scopeName": "vue.interpolations",
"path": "./syntaxes/vue-interpolations.json",
"injectTo": [
"source.vue",
"text.html.markdown",
"text.html.derivative",
"text.pug"
]
},
{
"scopeName": "vue.sfc.style.variable.injection",
"path": "./syntaxes/vue-sfc-style-variable-injection.json",
"injectTo": [
"source.vue"
]
}
],
"breakpoints": [
{
"language": "vue"
}
],
"configuration": {
"type": "object",
"title": "Vue",
"properties": {
"vue.trace.server": {
"scope": "window",
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"description": "Traces the communication between VS Code and the language server."
},
"vue.server.hybridMode": {
"type": [
"boolean",
"string"
],
"default": "auto",
"enum": [
"auto",
"typeScriptPluginOnly",
true,
false
],
"enumDescriptions": [
"Automatically detect and enable TypeScript Plugin/Hybrid Mode in a safe environment.",
"Only enable Vue TypeScript Plugin but disable Hybrid Mode.",
"Enable TypeScript Plugin/Hybrid Mode.",
"Disable TypeScript Plugin/Hybrid Mode."
],
"description": "Vue language server only handles CSS and HTML language support, and tsserver takes over TS language support via TS plugin."
},
"vue.server.compatibleExtensions": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Set compatible extensions to skip automatic detection of Hybrid Mode."
},
"vue.server.includeLanguages": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"vue"
]
},
"vue.server.maxOldSpaceSize": {
"type": [
"number",
"null"
],
"default": null,
"description": "Set --max-old-space-size option on server process. If you have problem on frequently \"Request textDocument/** failed.\" error, try setting higher memory(MB) on it."
},
"vue.doctor.status": {
"type": "boolean",
"default": true,
"description": "Show known problems in status bar."
},
"vue.splitEditors.icon": {
"type": "boolean",
"default": false,
"description": "Show split editor icon in title area of editor."
},
"vue.splitEditors.layout.left": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"script",
"scriptSetup",
"styles"
]
},
"vue.splitEditors.layout.right": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"template",
"customBlocks"
]
},
"vue.updateImportsOnFileMove.enabled": {
"type": "boolean",
"default": true,
"description": "Enabled update imports on file move."
},
"vue.codeActions.enabled": {
"type": "boolean",
"default": true,
"description": "Enabled code actions."
},
"vue.codeActions.askNewComponentName": {
"type": "boolean",
"default": true,
"description": "Ask for new component name when extract component."
},
"vue.codeLens.enabled": {
"type": "boolean",
"default": true,
"description": "Enabled code lens."
},
"vue.complete.casing.tags": {
"type": "string",
"enum": [
"autoKebab",
"autoPascal",
"kebab",
"pascal"
],
"enumDescriptions": [
"Auto Detect from Content (Fallback to <kebab-case> if detect failed)",
"Auto Detect from Content (Fallback to <PascalCase> if detect failed)",
"<kebab-case>",
"<PascalCase>"
],
"default": "autoPascal",
"description": "Preferred tag name case."
},
"vue.complete.casing.props": {
"type": "string",
"enum": [
"autoKebab",
"autoCamel",
"kebab",
"camel"
],
"enumDescriptions": [
"Auto Detect from Content (Fallback to :kebab-case=\"...\" if detect failed)",
"Auto Detect from Content (Fallback to :camelCase=\"...\" if detect failed)",
":kebab-case=\"...\"",
":camelCase=\"...\""
],
"default": "autoKebab",
"description": "Preferred attr name case."
},
"vue.complete.defineAssignment": {
"type": "boolean",
"default": true,
"description": "Auto add `const props = ` before `defineProps` when selecting the completion item `props`. (also `emit` and `slots`)"
},
"vue.autoInsert.dotValue": {
"type": "boolean",
"default": false,
"description": "Auto-complete Ref value with `.value`."
},
"vue.autoInsert.bracketSpacing": {
"type": "boolean",
"default": true,
"description": "Auto add space between double curly brackets: {{|}} -> {{ | }}"
},
"vue.inlayHints.destructuredProps": {
"type": "boolean",
"default": false,
"markdownDescription": "Show inlay hints for destructured props:\n\n```ts\nwatch(() => /* props. */foo, () => { ... });\n```"
},
"vue.inlayHints.missingProps": {
"type": "boolean",
"default": false,
"markdownDescription": "Show inlay hints for missing required props:\n\n```html\n<Comp />\n<!-- ^ foo! -->\n```"
},
"vue.inlayHints.inlineHandlerLeading": {
"type": "boolean",
"default": false,
"markdownDescription": "Show inlay hints for event argument in inline handlers:\n\n```html\n<Comp @foo=\"/* $event => */console.log($event)\" />\n```"
},
"vue.inlayHints.optionsWrapper": {
"type": "boolean",
"default": false,
"markdownDescription": "Show inlay hints for component options wrapper for type support:\n\n```vue\n<script lang=\"ts\">\nexport default /* (await import('vue')).defineComponent( */{}/* ) */;\n</script>\n```"
},
"vue.inlayHints.vBindShorthand": {
"type": "boolean",
"default": false,
"markdownDescription": "Show inlay hints for v-bind shorthand:\n\n```html\n<Comp :foo />\n <!-- ^ =\"foo\" -->\n```"
},
"vue.format.template.initialIndent": {
"type": "boolean",
"default": true
},
"vue.format.style.initialIndent": {
"type": "boolean",
"default": false
},
"vue.format.script.initialIndent": {
"type": "boolean",
"default": false
},
"vue.format.wrapAttributes": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"force",
"force-aligned",
"force-expand-multiline",
"aligned-multiple",
"preserve",
"preserve-aligned"
]
}
}
},
"commands": [
{
"command": "vue.action.restartServer",
"title": "Restart Vue and TS servers",
"category": "Vue"
},
{
"command": "vue.action.doctor",
"title": "Doctor",
"category": "Vue"
},
{
"command": "vue.action.writeVirtualFiles",
"title": "Write Virtual Files",
"category": "Vue (Debug)"
},
{
"command": "vue.action.splitEditors",
"title": "Split <script>, <template>, <style> Editors",
"category": "Vue",
"icon": "images/split-editors.png"
},
{
"command": "vue.findAllFileReferences",
"title": "Find File References via Vue Language Server",
"category": "Vue"
}
],
"menus": {
"editor/context": [
{
"command": "typescript.goToSourceDefinition",
"when": "vueHybridMode && tsSupportsSourceDefinition && resourceLangId == vue",
"group": "navigation@9"
}
],
"explorer/context": [
{
"command": "typescript.findAllFileReferences",
"when": "vueHybridMode && tsSupportsFileReferences && resourceLangId == vue",
"group": "4_search"
},
{
"command": "vue.findAllFileReferences",
"when": "!vueHybridMode && resourceLangId == vue",
"group": "4_search"
}
],
"editor/title/context": [
{
"command": "typescript.findAllFileReferences",
"when": "vueHybridMode && tsSupportsFileReferences && resourceLangId == vue"
}
],
"commandPalette": [
{
"command": "typescript.reloadProjects",
"when": "vueHybridMode && editorLangId == vue && typescript.isManagedFile"
},
{
"command": "typescript.goToProjectConfig",
"when": "vueHybridMode && editorLangId == vue"
},
{
"command": "vue.action.doctor",
"when": "vue.activated"
},
{
"command": "vue.action.writeVirtualFiles",
"when": "vue.activated"
},
{
"command": "vue.action.splitEditors",
"when": "editorLangId == vue"
}
],
"editor/title": [
{
"command": "vue.action.splitEditors",
"when": "resourceLangId == vue && config.vue.splitEditors.icon",
"group": "navigation"
}
]
},
"problemMatchers": [
{
"name": "vite",
"label": "Vite problems",
"pattern": {
"regexp": ""
},
"background": {
"activeOnStart": true,
"beginsPattern": "restarting server...$",
"endsPattern": "\\s*ready in|server restarted."
}
}
]
},
"scripts": {
"prebuild": "pnpm run postinstall && pnpm -C ../.. run build",
"build": "node scripts/build",
"build:minify": "pnpm run build -- --minify",
"watch": "pnpm run build -- --watch",
"pack": "pnpm run build:minify && vsce package",
"pack:next": "pnpm run build && vsce package",
"release": "pnpm run build:minify && vsce publish",
"release:next": "pnpm run build && vsce publish --pre-release",
"size": "pnpm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html",
"postinstall": "vscode-ext-gen --scope vue"
},
"devDependencies": {
"@types/semver": "^7.5.3",
"@types/vscode": "^1.82.0",
"@volar/vscode": "~2.4.11",
"@vscode/vsce": "latest",
"@vue/language-core": "2.2.0",
"@vue/language-server": "2.2.0",
"@vue/typescript-plugin": "2.2.0",
"esbuild": "latest",
"esbuild-visualizer": "latest",
"reactive-vscode": "^0.2.9",
"semver": "^7.5.4",
"vscode-ext-gen": "^0.5.0",
"vscode-tmlanguage-snapshot": "latest"
}
}
@@ -0,0 +1,256 @@
# Vue - Official
## Quick Start
- [create-vue](https://github.com/vuejs/create-vue)
- [Vitesse](https://github.com/antfu/vitesse)
- [petite](https://github.com/JessicaSachs/petite)
- [volar-starter](https://github.com/johnsoncodehk/volar-starter) (For bug report and experiment features testing)
## Insiders Program 🚀
This project is community-driven. If you would like to support this project, consider joining the [Insiders Program](https://github.com/vuejs/language-tools/wiki/Get-Insiders-Edition) to improve the sustainability of this project and unlock more features.
<!--
## Usage
<details>
<summary>Setup for Vue 2</summary>
1. Add `@vue/runtime-dom`
This extension requires Vue 3 types from the `@vue/runtime-dom`.
Vue 3 and Vue 2.7 has built-in JSX types. For Vue version \<= 2.6.14 you need to add JSX types by install `@vue/runtime-dom`:
```jsonc
// package.json
{
"devDependencies": {
"@vue/runtime-dom": "latest"
}
}
```
2. Remove `Vue.extend`
Template type-checking is not supported with `Vue.extend`. You can use [composition-api](https://github.com/vuejs/composition-api), [vue-class-component](https://github.com/vuejs/vue-class-component), or `export default { ... }` instead of `export default Vue.extend`.
Here is a compatibility table for different ways of writing the script blocks:
| | Component options type-checking in `<script>` | Interpolation type-checking in `<template>` | Cross-component props type-checking |
|:-----------------------------------------|:----------------------------------------------|:--------------------------------------------|:------------------------------------|
| `export default { ... }` with JS | Not supported | Not supported | Not supported |
| `export default { ... }` with TS | Not supported | Supported but deprecated | Supported but deprecated |
| `export default Vue.extend({ ... })` with JS | Not supported | Not supported | Not supported |
| `export default Vue.extend({ ... })` with TS | Limited (supports `data` types but not `props` types) | Limited | Not supported |
| `export default defineComponent({ ... })` | Supported | Supported | Supported |
| Class component | Supported | Supported with additional code ([#21](https://github.com/vuejs/language-tools/issues/21)) | Supported with [additional code](https://github.com/vuejs/language-tools/pull/750#issuecomment-1023947885) |
Note that you can use `defineComponent` even for components that are using the `Options API`.
3. Support for Vue 2 template
Volar preferentially supports Vue 3. Vue 3 and Vue 2 templates have some differences. You need to set the `target` option to support the Vue 2 templates.
```jsonc
// tsconfig.json
{
"compilerOptions": {
// ...
},
"vueCompilerOptions": {
"target": 2.7,
// "target": 2, // For Vue version <= 2.6.14
}
}
```
4. remove `.d.ts` files if they exist.
For projects generated by the [Vue CLI](https://cli.vuejs.org/), `.d.ts` files are included. Remove these files.
```
rm src/shims-tsx.d.ts src/shims-vue.d.ts
```
</details>
<details>
<summary>Define Global Components</summary>
PR: https://github.com/vuejs/vue-next/pull/3399
Local components, Built-in components, native HTML elements Type-Checking is available with no configuration.
For Global components, you need to define `GlobalComponents` interface, for example:
```typescript
// components.d.ts
declare module 'vue' { // Vue >= 2.7
// declare module '@vue/runtime-dom' { // Vue <= 2.6.14
export interface GlobalComponents {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
}
export {}
```
</details>
## Notes
### Vetur
You need to disable Vetur to avoid conflicts.
Recommended use css / less / scss as `<style>` language, because these base on [vscode-css-languageservice](https://github.com/microsoft/vscode-css-languageservice) to provide reliable language support.
If use postcss / stylus / sass, you need to install additional extension for syntax highlighting. I tried these and it works, you can also choose others.
- postcss: [language-postcss](https://marketplace.visualstudio.com/items?itemName=cpylua.language-postcss).
- stylus: [language-stylus](https://marketplace.visualstudio.com/items?itemName=sysoev.language-stylus)
- sass: [Sass](https://marketplace.visualstudio.com/items?itemName=Syler.sass-indented)
Volar does not include ESLint and Prettier, but the official [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extensions support Vue, so you could install these yourself if needed.
If using Vetur's [Customizable Scaffold Snippets](https://vuejs.github.io/vetur/guide/snippet.html#customizable-scaffold-snippets), recommend use [Snippet Generator](https://marketplace.visualstudio.com/items?itemName=wenfangdu.snippet-generator) convert to VSCode Snippets. There are also snippets on the VSCode Marketplace, such as Sarah Drasner's [Vue VSCode Snippets](https://marketplace.visualstudio.com/items?itemName=sdras.vue-vscode-snippets), if you prefer ready-made snippets without customization.
If VSCode gives an error for `class` and `slot` like this:
<kbd><img width="483" src="https://user-images.githubusercontent.com/3253920/145134536-7bb090e9-9dcd-4a61-8096-3c47d6c1a699.png" /></kbd>
This is because one of the packages installed in your project uses `@types/react` which breaks some parts of Volar.
Please see the following solutions:
- https://github.com/vuejs/language-tools/discussions/592
- https://github.com/vuejs/language-tools/discussions/592#discussioncomment-1763880
### Recursive components
Volar can't typecheck recursive components out of the box due to TS limitation.
But there's a workaround, you can explicitly specify component's props like so:
`Bar.vue`
```vue
<template>
<Bar :a="'wrong'" />
</template>
<script setup lang="ts">
import { defineAsyncComponent, type DefineComponent } from 'vue'
interface Props {
a: number
}
const Bar = defineAsyncComponent<DefineComponent<Props>>(
() => import('./Bar.vue') as any
)
defineProps<Props>()
</script>
```
### Custom File Extensions
Syntax highlighting and intellisense can be applied to additional file extensions beyond just `vue`. This will need to be configured in three different places for full support.
In VS Code settings for the Volar extension add any additional extensions you need to `Additional Extensions`. Such as `ext`.
In your tsconfig.json file you will need to make sure your custom extension is included by TypeScript. If you have an include value for `./src/*.vue` then you would want to add an include for `./src/*.ext` as well.
```json
"include": [
"./src/*.ts",
"./src/*.vue",
"./src/*.ext",
]
```
Finally you need to make VS Code recognize your new extension and automatically associate it with the Vue language format. To do this you need to configure your File Associations setting to map `*.ext` to the language value `vue`. This can be done under Text Editor &gt; Files, or with the key `files.associations`.
-->
## Sponsors
<!-- <table>
<tbody>
<tr>
<td align="center" valign="middle" colspan="2">
<b>Special Sponsor</b>
</td>
</tr>
<tr>
<td align="center" valign="middle" colspan="2">
<a href="https://stackblitz.com/">
<img src="https://raw.githubusercontent.com/johnsoncodehk/sponsors/master/logos/StackBlitz.svg" height="80" />
</a>
<p>Stay in the flow with instant dev experiences.<br>No more hours stashing/pulling/installing locally</p>
<p><b> — just click, and start coding.</b></p>
</td>
</tr>
<tr>
<td align="center" valign="middle" colspan="2">
<b>Platinum Sponsors</b>
</td>
</tr>
<tr>
<td align="center" valign="middle" width="50%">
<a href="https://vuejs.org/">
<img src="https://raw.githubusercontent.com/johnsoncodehk/sponsors/master/logos/Vue.svg" height="80" />
</a>
<p>An approachable, performant and versatile framework for building web user interfaces.</p>
</td>
<td align="center" valign="middle" width="50%">
<a href="https://astro.build/">
<img src="https://raw.githubusercontent.com/johnsoncodehk/sponsors/master/logos/Astro.svg" height="80" />
</a>
<p>Astro powers the world's fastest websites, client-side web apps, dynamic API endpoints, and everything in-between.</p>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://www.jetbrains.com/">
<img src="https://raw.githubusercontent.com/johnsoncodehk/sponsors/master/logos/JetBrains.svg" height="80" />
</a>
<p>Essential tools for software developers and teams.</p>
</td>
<td align="center" valign="middle">
</td>
</tr>
<tr>
<td align="center" valign="middle" colspan="2">
<b>Silver Sponsors</b>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://www.prefect.io/"><img src="https://raw.githubusercontent.com/johnsoncodehk/sponsors/master/logos/Prefect.svg" height="50" /></a>
</td>
<td align="center" valign="middle">
<a href="https://www.techjobasia.com/"><img src="https://raw.githubusercontent.com/johnsoncodehk/sponsors/master/logos/TechJobAsia.svg" height="50" /></a>
</td>
</tr>
</tbody>
</table> -->
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/johnsoncodehk/sponsors/sponsors.svg">
<img src="https://cdn.jsdelivr.net/gh/johnsoncodehk/sponsors/sponsors.png"/>
</a>
</p>
<p align="center">
<a href="https://github.com/sponsors/johnsoncodehk">Become a sponsor</a>
</p>
## Credits
- [vscode-extension-samples](https://github.com/microsoft/vscode-extension-samples) shows all the knowledge required to develop the extension.
- [angular](https://github.com/angular/angular) shows how TS server plugin working with language service.
- Syntax highlight is rewritten base on [vue-syntax-highlight](https://github.com/vuejs/vue-syntax-highlight).
- [vscode-fenced-code-block-grammar-injection-example](https://github.com/mjbvz/vscode-fenced-code-block-grammar-injection-example) shows how to inject vue syntax highlight to markdown.
@@ -0,0 +1,5 @@
try {
module.exports = require('@vue/language-server/bin/vue-language-server');
} catch {
module.exports = require('./dist/server');
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
{
"colorizedBracketPairs": [
[
"{{",
"}}"
],
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"fileTypes": [],
"injectionSelector": "L:meta.tag -meta.attribute -meta.ng-binding -entity.name.tag.pug -attribute_value -source.tsx -source.js.jsx, L:meta.element -meta.attribute",
"patterns": [
{
"include": "source.vue#vue-directives"
}
],
"scopeName": "vue.directives"
}
@@ -0,0 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"fileTypes": [],
"injectionSelector": "L:text.pug -comment -string.comment, L:text.html.derivative -comment.block, L:text.html.markdown -comment.block",
"patterns": [
{
"include": "source.vue#vue-interpolations"
}
],
"scopeName": "vue.interpolations"
}
@@ -0,0 +1,145 @@
{
"comments": {
"blockComment": [
"<!--",
"-->"
]
},
"brackets": [
[
"<!--",
"-->"
],
[
"<",
">"
],
[
"{",
"}"
],
[
"(",
")"
]
],
"autoClosingPairs": [
// html
{
"open": "{",
"close": "}"
},
{
"open": "[",
"close": "]"
},
{
"open": "(",
"close": ")"
},
{
"open": "'",
"close": "'"
},
{
"open": "\"",
"close": "\""
},
{
"open": "<!--",
"close": "-->",
"notIn": [
"comment",
"string"
]
},
// javascript
{
"open": "`",
"close": "`",
"notIn": [
"string",
"comment"
]
},
{
"open": "/**",
"close": " */",
"notIn": [
"string"
]
}
],
"autoCloseBefore": ";:.,=}])><`'\" \n\t",
"surroundingPairs": [
// html
{
"open": "'",
"close": "'"
},
{
"open": "\"",
"close": "\""
},
{
"open": "{",
"close": "}"
},
{
"open": "[",
"close": "]"
},
{
"open": "(",
"close": ")"
},
{
"open": "<",
"close": ">"
},
// javascript
[
"`",
"`"
],
],
"colorizedBracketPairs": [],
"folding": {
"markers": {
"start": "^\\s*<!--\\s*#region\\b.*-->",
"end": "^\\s*<!--\\s*#endregion\\b.*-->"
}
},
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\$\\^\\&\\*\\(\\)\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\s]+)",
"onEnterRules": [
{
"beforeText": {
"pattern": "<(?!(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr|script|style))([_:\\w][_:\\w-.\\d]*)(?:(?:[^'\"/>]|\"[^\"]*\"|'[^']*')*?(?!\\/)>)[^<]*$",
"flags": "i"
},
"afterText": {
"pattern": "^<\\/([_:\\w][_:\\w-.\\d]*)\\s*>",
"flags": "i"
},
"action": {
"indent": "indentOutdent"
}
},
{
"beforeText": {
"pattern": "<(?!(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr|script|style))([_:\\w][_:\\w-.\\d]*)(?:(?:[^'\"/>]|\"[^\"]*\"|'[^']*')*?(?!\\/)>)[^<]*$",
"flags": "i"
},
"action": {
"indent": "indent"
}
}
],
// https://github.com/vuejs/language-tools/issues/1762
"indentationRules": {
// "increaseIndentPattern": "<(?!\\?|(?:area|base|br|col|frame|hr|html|img|input|keygen|link|menuitem|meta|param|source|track|wbr|script|style)\\b|[^>]*\\/>)([-_\\.A-Za-z0-9]+)(?=\\s|>)\\b[^>]*>(?!.*<\\/\\1>)|<!--(?!.*-->)|\\{[^}\"']*$",
// add (?!\\s*\\() to fix https://github.com/vuejs/language-tools/issues/1847#issuecomment-1246101071
"increaseIndentPattern": "<(?!\\?|(?:area|base|br|col|frame|hr|html|img|input|keygen|link|menuitem|meta|param|source|track|wbr|script|style)\\b|[^>]*\\/>)([-_\\.A-Za-z0-9]+)(?=\\s|>)\\b[^>]*>(?!\\s*\\()(?!.*<\\/\\1>)|<!--(?!.*-->)|\\{[^}\"']*$",
"decreaseIndentPattern": "^\\s*(<\\/(?!html)[-_\\.A-Za-z0-9]+\\b[^>]*>|-->|\\})"
}
}
@@ -0,0 +1,48 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"fileTypes": [],
"injectionSelector": "L:source.css -comment, L:source.postcss -comment, L:source.sass -comment, L:source.stylus -comment",
"patterns": [
{
"include": "#vue-sfc-style-variable-injection"
}
],
"repository": {
"vue-sfc-style-variable-injection": {
"begin": "\\b(v-bind)\\s*\\(",
"name": "vue.sfc.style.variable.injection.v-bind",
"end": "\\)",
"beginCaptures": {
"1": {
"name": "entity.name.function"
}
},
"patterns": [
{
"begin": "('|\")",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
}
},
"end": "(\\1)",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.end.html"
}
},
"name": "source.ts.embedded.html.vue",
"patterns": [
{
"include": "source.js"
}
]
},
{
"include": "source.js"
}
]
}
},
"scopeName": "vue.sfc.style.variable.injection"
}
@@ -0,0 +1,134 @@
{
"properties": {
"vueCompilerOptions": {
"type": "object",
"additionalProperties": false,
"properties": {
"target": {
"default": "auto",
"enum": [
"auto",
2,
2.7,
3,
3.3,
3.5
],
"markdownDescription": "Target version of Vue."
},
"extensions": {
"type": "array",
"default": [ ".vue" ],
"markdownDescription": "Valid file extensions that should be considered as regular Vue SFC, please note that you should not use this option separately for additional file extensions IDE support, see https://github.com/vuejs/language-tools/tree/master/extensions/vscode/README.md#custom-file-extensions."
},
"vitePressExtensions": {
"type": "array",
"default": [ ".md" ],
"markdownDescription": "Valid file extensions that should be considered as regular VitePress SFC."
},
"petiteVueExtensions": {
"type": "array",
"default": [ ".html" ],
"markdownDescription": "Valid file extensions that should be considered as regular PetiteVue SFC."
},
"lib": {
"default": "vue",
"markdownDescription": "Specify module name for import regular types."
},
"jsxSlots": {
"type": "boolean",
"default": false,
"markdownDescription": "Generate slots type for `JSX.ElementChildrenAttribute`."
},
"strictTemplates": {
"type": "boolean",
"default": false,
"markdownDescription": "Strict props, component type-checking in templates."
},
"skipTemplateCodegen": {
"type": "boolean",
"default": false,
"markdownDescription": "https://github.com/vuejs/language-tools/issues/577"
},
"fallthroughAttributes": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable to support typed fallthrough attributes. Please note that enabling may significantly slow down type checking."
},
"dataAttributes": {
"type": "array",
"default": [ ],
"markdownDescription": "A glob matcher array that should always avoid recognized as HTML Attributes and Component props."
},
"htmlAttributes": {
"type": "array",
"default": [ "aria-*" ],
"markdownDescription": "A glob matcher array that should always be recognizing as HTML Attributes rather than Component props. Attribute name will never convert to camelize case."
},
"plugins": {
"type": "array",
"default": [ ],
"markdownDescription": "Plugins to be used in the SFC compiler."
},
"optionsWrapper": {
"type": "array",
"default": [
"(await import('vue')).defineComponent(",
")"
],
"markdownDescription": "How to wrap option of `export default { ... }`? Default: `[\"(await import('vue')).default.extend(\", \")\"]` for target < 2.7, `[\"(await import('vue')).defineComponent(\", \")\"]` for target >= 2.7."
},
"macros": {
"type": "object",
"default": {
"defineProps": [ "defineProps" ],
"defineModel": [ "defineModel" ],
"defineEmits": [ "defineEmits" ],
"defineSlots": [ "defineSlots" ],
"defineExpose": [ "defineExpose" ],
"defineOptions": [ "defineOptions" ],
"withDefaults": [ "withDefaults" ]
}
},
"composables": {
"type": "object",
"default": {
"useAttrs": [ "useAttrs" ],
"useCssModule": [ "useCssModule" ],
"useSlots": [ "useSlots" ],
"useTemplateRef": [ "useTemplateRef", "templateRef" ]
}
},
"experimentalResolveStyleCssClasses": {
"enum": [
"scoped",
"always",
"never"
],
"markdownDescription": "https://github.com/vuejs/language-tools/issues/1038, https://github.com/vuejs/language-tools/issues/1121"
},
"experimentalModelPropName": {
"type": "object",
"default": {
"": {
"input": true
},
"value": {
"input": { "type": "text" },
"textarea": true,
"select": true
}
},
"markdownDescription": "https://github.com/vuejs/language-tools/issues/1969"
},
"experimentalDefinePropProposal": {
"enum": [
"kevinEdition",
"johnsonEdition",
false
]
}
}
}
}
}
@@ -0,0 +1,15 @@
const vscode = require("vscode");
exports.activate = async function () {
const tsWeb = vscode.extensions.getExtension('johnsoncodehk.vscode-typescript-web');
if (!tsWeb) {
const select = await vscode.window.showInformationMessage(
'Install "TypeScript IntelliSense for Web" to enable Vue IntelliSense.',
'Install',
'Cancel',
);
if (select === 'Install') {
vscode.commands.executeCommand('workbench.extensions.search', 'johnsoncodehk.vscode-typescript-web');
}
}
};
@@ -0,0 +1 @@
const s=class s{get layoutInfos(){return this._layoutInfos}constructor(){this._layoutInfos=[]}registerKeyboardLayout(a){this._layoutInfos.push(a)}};s.INSTANCE=new s;let t=s;export{t as K};
@@ -0,0 +1 @@
function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}export{e as g};
@@ -0,0 +1,17 @@
# Change Log
<!-- ## [Unreleased] -->
## [0.3.2]
- merged latest language tools (Nov 6. 2021, v0.14.11)
- e2e tests
## [0.2.1]
- goto defenition/declartion - fix in vscode.dev vfs
## [0.2.0]
- tsconfig lib support - project base 'tsconfig.json' should now be parsed and matching lib decalation files added
- goto defenition/declartion
## [0.1.0]
- typescript virtual filesystem and module resultion
@@ -0,0 +1,21 @@
(MIT LICENSE)
Copyright (c) 2021 Asaf Amrami and others
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.
@@ -0,0 +1,63 @@
# Svelte VSCode Web Extension
This is an unofficial port of the Svelte VSCode extension to VSCode web.
Web extensions can run in both standalone vscode and browser-based web vscode (used in e.g. github.dev, github1s.com, vscode.dev...).
[Web extensions have some limitations](https://code.visualstudio.com/api/extension-guides/web-extensions).
## Supported features
- All builtin language features should be working - syntax highlighting, definition navigation, auto completions...
- Typescript 4.4.4 bundled in with autocompletion across files
- Prettier formatter
## Unsupported features
Templating engines (pug, cofeescript...) and styling engines (sass, less...) aren't currently supported.
Importing Svelte components from typescript isn't supported either.
<br>
<br>
See it in action in github.dev [here](https://github.dev/asafamr/svelte-web-preview) (Install the recommended extension when asked)
<br>
<br>
This is still a work in progress, feel free to create issues in the project [repo](https://github.com/asafamr/svelte-vscode-web).
repo readme:
![E2E Tests](https://github.com/asafamr/svelte-vscode-web/actions/workflows/tests.yml/badge.svg)
I started from the web extension starter template but switched to esbuild.
The official language tools repo is vendored ~~but currently unmodified~~ and has some small changes marked with a `WEBEXT` comment
Typescript support is preconfigured
Marketplace extension url: https://marketplace.visualstudio.com/items?itemName=asafamr.svelte-web
<br/>
<br/>
<br/>
bootstrap with
```bash
npm install
npm run bootstrap
```
start esbuild watch with `npm run dev-watch`
then either:
run in vscode with `F5` (debug with electron dev tools - ctrl+shift+I) or
run in browser with `npm run run-in-browser` (debug with browser dev tools)
compile minified with `npm run compile` - this also writes some bundle size info to txt files
LICENSE: MIT
File diff suppressed because one or more lines are too long
@@ -0,0 +1,24 @@
import * as esbuild from "esbuild";
esbuild
.build({
entryPoints: ["src/web/test/suite/index.ts"],
outdir: "dist/web/test/suite/",
bundle: true,
format: "cjs",
minify:false,
external: ["vscode"],
sourcemap:"inline",
platform: "browser",
treeShaking: false,
sourcesContent: true,
// plugins: [moduleShimmer],
// watch: {
// onRebuild(error, result) {
// if (error) console.error("watch build test failed:", JSON.stringify(error));
// else console.log("watch build test succeeded:", JSON.stringify(result));
// },
// },
})
File diff suppressed because one or more lines are too long
@@ -0,0 +1,36 @@
{
"comments": {
"blockComment": ["<!--", "-->"]
},
"brackets": [
["<!--", "-->"],
["<", ">"],
["{", "}"],
["(", ")"],
["[", "]"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'" },
{ "open": "\"", "close": "\"" },
{ "open": "<!--", "close": "-->", "notIn": ["comment", "string"] },
{ "open": "/**", "close": "*/", "notIn": ["string"] }
],
"surroundingPairs": [
{ "open": "'", "close": "'" },
{ "open": "\"", "close": "\"" },
{ "open": "`", "close": "`" },
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "<", "close": ">" }
],
"folding": {
"markers": {
"start": "^\\s*//\\s*#?region\\b|^<(template|style|script)[^>]*>",
"end": "^\\s*//\\s*#?endregion\\b|^</(template|style|script)>"
}
}
}
@@ -0,0 +1,5 @@
# inital was
# git subtree add --prefix vendored/langauge-tools https://github.com/sveltejs/language-tools.git master --squash
git subtree pull --prefix vendored/langauge-tools https://github.com/sveltejs/language-tools.git master --squash
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@@ -0,0 +1,179 @@
{
"name": "svelte-web",
"description": "",
"version": "0.3.5",
"engines": {
"vscode": "^1.60.0"
},
"license": "MIT",
"repository": "https://github.com/asafamr/svelte-vscode-web",
"browser": "./dist/web/extension.js",
"displayName": "Svelte for VS Code Web",
"publisher": "asafamr",
"icon": "static/logo.png",
"galleryBanner": {
"color": "#004D5E",
"theme": "dark"
},
"categories": [
"Programming Languages",
"Formatters"
],
"activationEvents": [
"onLanguage:svelte",
"onCommand:svelte.restartLanguageServer"
],
"capabilities": {
"untrustedWorkspaces": {
"supported": true
}
},
"contributes": {
"configuration": {
"type": "object",
"title": "Svelte",
"properties": {}
},
"languages": [
{
"id": "svelte",
"aliases": [
"Svelte",
"svelte"
],
"extensions": [
".svelte"
],
"configuration": "./dist/language-configuration.json"
},
{
"id": "json",
"filenames": [
".prettierrc"
]
}
],
"jsonValidation": [],
"grammars": [
{
"language": "svelte",
"scopeName": "source.svelte",
"path": "./dist/svelte.tmLanguage.json",
"embeddedLanguages": {
"text.html.basic": "html",
"source.css": "css",
"source.js": "javascript",
"source.ts": "typescript"
}
}
],
"commands": [
{
"command": "svelte.restartLanguageServer",
"title": "Svelte: Restart Language Server"
},
{
"command": "svelte.showCompiledCodeToSide",
"title": "Svelte: Show Compiled Code",
"icon": {
"light": "./static/preview-right-light.svg",
"dark": "./static/preview-right-dark.svg"
}
},
{
"command": "svelte.extractComponent",
"title": "Svelte: Extract Component"
}
],
"menus": {
"commandPalette": [
{
"command": "svelte.showCompiledCodeToSide",
"when": "editorLangId == svelte"
}
],
"editor/title": [
{
"command": "svelte.showCompiledCodeToSide",
"when": "editorLangId == svelte",
"group": "navigation"
}
],
"editor/context": [
{
"command": "svelte.extractComponent",
"when": "editorLangId == svelte",
"group": "1_modification"
}
]
},
"breakpoints": [
{
"language": "svelte"
}
]
},
"scripts": {
"dev-watch": "node -r esbuild-register build.ts --dev",
"compile": "npm run bootstrap && rm -rf ./dist && node -r esbuild-register build.ts",
"bootstrap": "cd vendored/langauge-tools/packages/svelte-vscode && npm run build:grammar",
"run-in-browser": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=. test",
"run-in-browser:ff": "vscode-test-web --browserType=firefox --extensionDevelopmentPath=. test",
"vscode:prepublish": "npm run compile",
"vspub": "vsce publish",
"build:test": "node -r esbuild-register build-test.ts",
"test": "npm run build:test && vscode-test-web --browserType=chromium --extensionDevelopmentPath=. --extensionTestsPath=dist/web/test/suite/index.js test",
"test:full-headless": "npm run build:test && vscode-test-web --headless --browserType=chromium --extensionDevelopmentPath=. --extensionTestsPath=dist/web/test/suite/index.js test && vscode-test-web --headless --browserType=firefox --extensionDevelopmentPath=. --extensionTestsPath=dist/web/test/suite/index.js test",
"test-cleaner-output": "npm run test | grep -v \"GET /\""
},
"devDependencies": {
"@babel/core": "^7.15.8",
"@tsconfig/node12": "^1.0.9",
"@types/chai": "^4.2.22",
"@types/fs-extra": "^9.0.13",
"@types/lz-string": "^1.3.34",
"@types/mocha": "^9.0.0",
"@types/prettier": "^2.4.1",
"@types/vscode": "^1.60.0",
"@types/webpack-env": "^1.16.2",
"@typescript-eslint/eslint-plugin": "^4.31.1",
"@typescript-eslint/parser": "^4.31.1",
"@typescript/vfs": "^1.3.5",
"@vscode/test-web": "^0.0.13",
"assert": "^2.0.0",
"buffer": "^5.7.1",
"chai": "^4.3.4",
"dedent": "^0.7.0",
"esbuild": "^0.13.4",
"esbuild-register": "^3.0.0",
"eslint": "^7.32.0",
"estree-walker": "^2.0.1",
"fast-glob": "^3.2.7",
"fs-extra": "^10.0.0",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"lz-string": "^1.4.4",
"mocha": "^9.1.1",
"path-browserify": "^1.0.1",
"postcss": "^8.3.9",
"prettier": "^2.3.2",
"prettier-plugin-svelte": "~2.4.0",
"process": "^0.11.10",
"source-map": "^0.7.3",
"stream-browserify": "^3.0.0",
"svelte": "~3.38.2",
"svelte-preprocess": "~4.7.3",
"svelte2tsx": "^0.4.7",
"ts-loader": "^9.2.5",
"typescript": "^4.4.4",
"vscode-css-languageservice": "5.0.0",
"vscode-emmet-helper": "2.1.2",
"vscode-html-languageservice": "4.0.0",
"vscode-languageclient": "^7.0.0",
"vscode-languageserver": "7.1.0-next.4",
"vscode-languageserver-types": "3.16.0",
"vscode-uri": "2.1.2",
"webpack": "^5.52.1",
"webpack-cli": "^4.8.0"
}
}
@@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.219 8.35484C11.6063 8.12309 12.049 8.00047 12.5003 8C12.8904 7.99939 13.2753 8.0901 13.6241 8.26486C13.9729 8.43963 14.276 8.6936 14.5091 9.00646C14.7421 9.31933 14.8987 9.6824 14.9664 10.0666C15.034 10.4509 15.0108 10.8456 14.8985 11.2192C14.7863 11.5929 14.5882 11.9351 14.32 12.2184C14.0518 12.5018 13.7211 12.7185 13.3542 12.8511C12.9873 12.9837 12.5944 13.0287 12.207 12.9823C11.8197 12.9359 11.4485 12.7995 11.1233 12.584L8.7683 14.9399L8.06055 14.2322L10.4163 11.877C10.1677 11.5003 10.0258 11.0634 10.0054 10.6126C9.98511 10.1618 10.0872 9.71384 10.3009 9.31634C10.5145 8.91885 10.8318 8.58659 11.219 8.35484ZM11.667 11.7472C11.9136 11.912 12.2036 12 12.5003 12C12.8981 12 13.2797 11.842 13.561 11.5607C13.8423 11.2794 14.0003 10.8978 14.0003 10.5C14.0003 10.2033 13.9123 9.91332 13.7475 9.66665C13.5827 9.41997 13.3484 9.22772 13.0743 9.11418C12.8002 9.00065 12.4986 8.97095 12.2077 9.02883C11.9167 9.0867 11.6494 9.22956 11.4396 9.43934C11.2299 9.64912 11.087 9.9164 11.0291 10.2074C10.9712 10.4983 11.001 10.7999 11.1145 11.074C11.228 11.3481 11.4203 11.5824 11.667 11.7472Z" fill="#C5C5C5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 1L14 2V7.33573C13.6829 7.18584 13.3457 7.08481 13 7.03533V2L8 2L8 12.8787L6.87837 14H2L1 13V2L2 1H13ZM9.70794 14H9.70785L10 13.7077V13.7079L9.70794 14ZM13 10.5174C13.0002 10.5116 13.0003 10.5058 13.0003 10.5C13.0003 10.4942 13.0002 10.4884 13 10.4826V10.5174ZM2 2L7 2L7 13H2L2 2Z" fill="#C5C5C5"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.219 8.35484C11.6063 8.12309 12.049 8.00047 12.5003 8C12.8904 7.99939 13.2753 8.0901 13.6241 8.26486C13.9729 8.43963 14.276 8.6936 14.5091 9.00646C14.7421 9.31933 14.8987 9.6824 14.9664 10.0666C15.034 10.4509 15.0108 10.8456 14.8985 11.2192C14.7863 11.5929 14.5882 11.9351 14.32 12.2184C14.0518 12.5018 13.7211 12.7185 13.3542 12.8511C12.9873 12.9837 12.5944 13.0287 12.207 12.9823C11.8197 12.9359 11.4485 12.7995 11.1233 12.584L8.7683 14.9399L8.06055 14.2322L10.4163 11.877C10.1677 11.5003 10.0258 11.0634 10.0054 10.6126C9.98511 10.1618 10.0872 9.71384 10.3009 9.31634C10.5145 8.91885 10.8318 8.58659 11.219 8.35484ZM11.667 11.7472C11.9136 11.912 12.2036 12 12.5003 12C12.8981 12 13.2797 11.842 13.561 11.5607C13.8423 11.2794 14.0003 10.8978 14.0003 10.5C14.0003 10.2033 13.9123 9.91332 13.7475 9.66665C13.5827 9.41997 13.3484 9.22772 13.0743 9.11418C12.8002 9.00065 12.4986 8.97095 12.2077 9.02883C11.9167 9.0867 11.6494 9.22956 11.4396 9.43934C11.2299 9.64912 11.087 9.9164 11.0291 10.2074C10.9712 10.4983 11.001 10.7999 11.1145 11.074C11.228 11.3481 11.4203 11.5824 11.667 11.7472Z" fill="#424242"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 1L14 2V7.33573C13.6829 7.18584 13.3457 7.08481 13 7.03533V2L8 2L8 12.8787L6.87837 14H2L1 13V2L2 1H13ZM9.70794 14H9.70785L10 13.7077V13.7079L9.70794 14ZM13 10.5174C13.0002 10.5116 13.0003 10.5058 13.0003 10.5C13.0003 10.4942 13.0002 10.4884 13 10.4826V10.5174ZM2 2L7 2L7 13H2L2 2Z" fill="#424242"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
npm install
rm -rf dist
npm run compile
npm run test:full-headless
rm -rf dist
npm run compile
newver=$(npm version patch -m "[ci skip] %s")
git push
git push --tags
vsce publish
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"$schema":"vscode://schemas/color-theme","name":"Default Dark Modern","include":"./dark_plus.json","colors":{"activityBar.activeBorder":"#0078D4","activityBar.background":"#181818","activityBar.border":"#2B2B2B","activityBar.foreground":"#D7D7D7","activityBar.inactiveForeground":"#868686","activityBarBadge.background":"#0078D4","activityBarBadge.foreground":"#FFFFFF","badge.background":"#616161","badge.foreground":"#F8F8F8","button.background":"#0078D4","button.border":"#FFFFFF12","button.foreground":"#FFFFFF","button.hoverBackground":"#026EC1","button.secondaryBackground":"#313131","button.secondaryForeground":"#CCCCCC","button.secondaryHoverBackground":"#3C3C3C","chat.slashCommandBackground":"#34414B","chat.slashCommandForeground":"#40A6FF","chat.editedFileForeground":"#E2C08D","checkbox.background":"#313131","checkbox.border":"#3C3C3C","debugToolBar.background":"#181818","descriptionForeground":"#9D9D9D","dropdown.background":"#313131","dropdown.border":"#3C3C3C","dropdown.foreground":"#CCCCCC","dropdown.listBackground":"#1F1F1F","editor.background":"#1F1F1F","editor.findMatchBackground":"#9E6A03","editor.foreground":"#CCCCCC","editorGroup.border":"#FFFFFF17","editorGroupHeader.tabsBackground":"#181818","editorGroupHeader.tabsBorder":"#2B2B2B","editorGutter.addedBackground":"#2EA043","editorGutter.deletedBackground":"#F85149","editorGutter.modifiedBackground":"#0078D4","editorLineNumber.activeForeground":"#CCCCCC","editorLineNumber.foreground":"#6E7681","editorOverviewRuler.border":"#010409","editorWidget.background":"#202020","errorForeground":"#F85149","focusBorder":"#0078D4","foreground":"#CCCCCC","icon.foreground":"#CCCCCC","input.background":"#313131","input.border":"#3C3C3C","input.foreground":"#CCCCCC","input.placeholderForeground":"#989898","inputOption.activeBackground":"#2489DB82","inputOption.activeBorder":"#2488DB","keybindingLabel.foreground":"#CCCCCC","menu.background":"#1F1F1F","menu.selectionBackground":"#0078d4","notificationCenterHeader.background":"#1F1F1F","notificationCenterHeader.foreground":"#CCCCCC","notifications.background":"#1F1F1F","notifications.border":"#2B2B2B","notifications.foreground":"#CCCCCC","panel.background":"#181818","panel.border":"#2B2B2B","panelInput.border":"#2B2B2B","panelTitle.activeBorder":"#0078D4","panelTitle.activeForeground":"#CCCCCC","panelTitle.inactiveForeground":"#9D9D9D","peekViewEditor.background":"#1F1F1F","peekViewEditor.matchHighlightBackground":"#BB800966","peekViewResult.background":"#1F1F1F","peekViewResult.matchHighlightBackground":"#BB800966","pickerGroup.border":"#3C3C3C","progressBar.background":"#0078D4","quickInput.background":"#222222","quickInput.foreground":"#CCCCCC","settings.dropdownBackground":"#313131","settings.dropdownBorder":"#3C3C3C","settings.headerForeground":"#FFFFFF","settings.modifiedItemIndicator":"#BB800966","sideBar.background":"#181818","sideBar.border":"#2B2B2B","sideBar.foreground":"#CCCCCC","sideBarSectionHeader.background":"#181818","sideBarSectionHeader.border":"#2B2B2B","sideBarSectionHeader.foreground":"#CCCCCC","sideBarTitle.foreground":"#CCCCCC","statusBar.background":"#181818","statusBar.border":"#2B2B2B","statusBar.debuggingBackground":"#0078D4","statusBar.debuggingForeground":"#FFFFFF","statusBar.focusBorder":"#0078D4","statusBar.foreground":"#CCCCCC","statusBar.noFolderBackground":"#1F1F1F","statusBarItem.focusBorder":"#0078D4","statusBarItem.prominentBackground":"#6E768166","statusBarItem.remoteBackground":"#0078D4","statusBarItem.remoteForeground":"#FFFFFF","tab.activeBackground":"#1F1F1F","tab.activeBorder":"#1F1F1F","tab.activeBorderTop":"#0078D4","tab.activeForeground":"#FFFFFF","tab.selectedBorderTop":"#6caddf","tab.border":"#2B2B2B","tab.hoverBackground":"#1F1F1F","tab.inactiveBackground":"#181818","tab.inactiveForeground":"#9D9D9D","tab.unfocusedActiveBorder":"#1F1F1F","tab.unfocusedActiveBorderTop":"#2B2B2B","tab.unfocusedHoverBackground":"#1F1F1F","terminal.foreground":"#CCCCCC","terminal.tab.activeBorder":"#0078D4","textBlockQuote.background":"#2B2B2B","textBlockQuote.border":"#616161","textCodeBlock.background":"#2B2B2B","textLink.activeForeground":"#4daafc","textLink.foreground":"#4daafc","textPreformat.foreground":"#D0D0D0","textPreformat.background":"#3C3C3C","textSeparator.foreground":"#21262D","titleBar.activeBackground":"#181818","titleBar.activeForeground":"#CCCCCC","titleBar.border":"#2B2B2B","titleBar.inactiveBackground":"#1F1F1F","titleBar.inactiveForeground":"#9D9D9D","welcomePage.tileBackground":"#2B2B2B","welcomePage.progress.foreground":"#0078D4","widget.border":"#313131"}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fake</title>
</head>
<body>
</body>
</html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{a4 as o,d8 as d,fU as u,fV as p,bO as c,fW as G,fX as g,fY as l,fZ as v,f_ as t,cm as e,f$ as a,g0 as s,ea as h,bl as D,j as S,l as m,$ as f}from"./index-DopNzxpa.js";class N{constructor(){this.onWillDispose=e.None,this.hasMaximizedGroup=()=>!1,this.windowId=D.vscodeWindowId,this.onDidLayout=e.None,this.onDidScroll=e.None,this.isReady=!0,this.whenReady=Promise.resolve(),this.whenRestored=Promise.resolve(),this.hasRestorableState=!1,this.centerLayout=t,this.isLayoutCentered=t,this.enforcePartOptions=t,this.onDidChangeActiveGroup=e.None,this.onDidAddGroup=e.None,this.onDidRemoveGroup=e.None,this.onDidMoveGroup=e.None,this.onDidActivateGroup=e.None,this.onDidChangeGroupIndex=e.None,this.onDidChangeGroupLocked=e.None,this.onDidChangeGroupMaximized=e.None,this.activeGroup=s,this.groups=[s],this.count=0,this.orientation=h.HORIZONTAL,this.getGroups=()=>[],this.getGroup=()=>{},this.activateGroup=t,this.getSize=t,this.setSize=t,this.arrangeGroups=t,this.toggleMaximizeGroup=t,this.toggleExpandGroup=t,this.applyLayout=t,this.getLayout=t,this.setGroupOrientation=t,this.findGroup=()=>{},this.addGroup=t,this.removeGroup=t,this.moveGroup=t,this.mergeGroup=t,this.mergeAllGroups=t,this.copyGroup=t,this.partOptions=a,this.onDidChangeEditorPartOptions=e.None,this.createEditorDropTarget=t}get contentDimension(){return t()}get sideGroup(){return t()}}class y{constructor(){this.getScopedInstantiationService=t,this.registerContextKeyProvider=t,this.saveWorkingSet=t,this.getWorkingSets=t,this.applyWorkingSet=t,this.deleteWorkingSet=t,this.onDidCreateAuxiliaryEditorPart=e.None,this.mainPart=new N,this.activePart=this.mainPart,this.parts=[this.mainPart],this.getPart=t,this.createAuxiliaryEditorPart=t,this.onDidChangeGroupMaximized=e.None,this.toggleMaximizeGroup=t,this.toggleExpandGroup=t,this.partOptions=a,this.createEditorDropTarget=t,this._serviceBrand=void 0,this.getLayout=t,this.onDidChangeActiveGroup=e.None,this.onDidAddGroup=e.None,this.onDidRemoveGroup=e.None,this.onDidMoveGroup=e.None,this.onDidActivateGroup=e.None,this.onDidLayout=e.None,this.onDidScroll=e.None,this.onDidChangeGroupIndex=e.None,this.onDidChangeGroupLocked=e.None,this.activeGroup=s,this.groups=[s],this.count=0,this.orientation=h.HORIZONTAL,this.isReady=!1,this.whenReady=Promise.resolve(),this.whenRestored=Promise.resolve(),this.hasRestorableState=!1,this.getGroups=()=>[],this.getGroup=()=>{},this.activateGroup=t,this.getSize=t,this.setSize=t,this.arrangeGroups=t,this.applyLayout=t,this.centerLayout=t,this.isLayoutCentered=()=>!1,this.setGroupOrientation=t,this.findGroup=()=>{},this.addGroup=t,this.removeGroup=t,this.moveGroup=t,this.mergeGroup=t,this.mergeAllGroups=t,this.copyGroup=t,this.onDidChangeEditorPartOptions=e.None,this.enforcePartOptions=t}get contentDimension(){return t()}get sideGroup(){return t()}}let r=class extends v{constructor(n){super(n.createInstance(y),!0,n)}};r=S([m(0,f)],r);function O(i){return{[g.toString()]:new o(l,void 0,!0),[c.toString()]:new o(G,[i,()=>!1],!0),[u.toString()]:new o(p,[],!1),[d.toString()]:new o(r)}}export{G as MonacoEditorService,O as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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