diff --git a/.ncurc.json b/.ncurc.json
index 5d845ea7..92cebcf8 100644
--- a/.ncurc.json
+++ b/.ncurc.json
@@ -7,6 +7,7 @@
"@types/vscode",
"@types/vscode-marked",
"@types/vscode-semver",
+ "@vscode/iconv-lite-umd",
"@vscode/proxy-agent",
"@vscode/ripgrep",
"@vscode/spdlog",
@@ -22,6 +23,7 @@
"@xterm/headless",
"@xterm/xterm",
"cookie",
+ "jschardet",
"kerberos",
"node-pty",
"vscode-marked",
diff --git a/demo/package-lock.json b/demo/package-lock.json
index dddd8889..d47d1796 100644
--- a/demo/package-lock.json
+++ b/demo/package-lock.json
@@ -154,6 +154,7 @@
"@codingame/monaco-vscode-user-data-sync-service-override": "file:../dist/service-override-user-data-sync",
"@codingame/monaco-vscode-vb-default-extension": "file:../dist/default-extension-vb",
"@codingame/monaco-vscode-view-banner-service-override": "file:../dist/service-override-view-banner",
+ "@codingame/monaco-vscode-view-common-service-override": "file:../dist/service-override-view-common",
"@codingame/monaco-vscode-view-status-bar-service-override": "file:../dist/service-override-view-status-bar",
"@codingame/monaco-vscode-view-title-bar-service-override": "file:../dist/service-override-view-title-bar",
"@codingame/monaco-vscode-views-service-override": "file:../dist/service-override-views",
@@ -819,7 +820,9 @@
"@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
"@codingame/monaco-vscode-host-service-override": "0.0.0-semantic-release",
"@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release"
+ "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release",
+ "@vscode/iconv-lite-umd": "0.7.0",
+ "jschardet": "3.0.0"
}
},
"../dist/rollup-vsix-plugin": {
@@ -828,11 +831,7 @@
"dev": true,
"license": "MIT",
"dependencies": {
- "css-url-parser": "^1.1.3",
- "memfs": "^4.8.1",
- "mime-types": "^2.1.35",
- "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release",
- "yauzl": "^3.0.0"
+ "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
"../dist/service-override-accessibility": {
@@ -851,15 +850,6 @@
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
- "../dist/service-override-audio-cue": {
- "name": "@codingame/monaco-vscode-audio-cue-service-override",
- "version": "0.0.0-semantic-release",
- "extraneous": true,
- "license": "MIT",
- "dependencies": {
- "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
- }
- },
"../dist/service-override-authentication": {
"name": "@codingame/monaco-vscode-authentication-service-override",
"version": "0.0.0-semantic-release",
@@ -905,13 +895,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-base-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-environment-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-extensions-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-host-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -976,7 +959,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -985,7 +967,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -1026,13 +1007,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-base-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-environment-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-extensions-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-host-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -1050,7 +1024,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -1083,7 +1056,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-environment-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -1181,7 +1153,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-environment-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -1222,7 +1193,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -1278,12 +1248,7 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@xterm/addon-canvas": "0.7.0-beta.12",
- "@xterm/addon-image": "0.8.0-beta.12",
- "@xterm/addon-search": "0.15.0-beta.12",
- "@xterm/addon-serialize": "0.13.0-beta.12",
- "@xterm/addon-unicode11": "0.8.0-beta.12",
- "@xterm/addon-webgl": "0.18.0-beta.12",
+ "@codingame/monaco-vscode-terminal-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -1292,7 +1257,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release",
"vscode-oniguruma": "1.7.0",
"vscode-textmate": "9.0.0"
@@ -1303,7 +1267,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -1339,6 +1302,15 @@
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
+ "../dist/service-override-view-common": {
+ "name": "@codingame/monaco-vscode-view-common-service-override",
+ "version": "0.0.0-semantic-release",
+ "license": "MIT",
+ "dependencies": {
+ "@codingame/monaco-vscode-bulk-edit-service-override": "0.0.0-semantic-release",
+ "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
+ }
+ },
"../dist/service-override-view-status-bar": {
"name": "@codingame/monaco-vscode-view-status-bar-service-override",
"version": "0.0.0-semantic-release",
@@ -1360,21 +1332,11 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-base-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-bulk-edit-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-environment-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-extensions-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-host-service-override": "0.0.0-semantic-release",
"@codingame/monaco-vscode-keybindings-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release",
+ "@codingame/monaco-vscode-view-common-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
- "../dist/service-override-walk-through": {
- "extraneous": true
- },
"../dist/service-override-walkthrough": {
"name": "@codingame/monaco-vscode-walkthrough-service-override",
"version": "0.0.0-semantic-release",
@@ -1396,19 +1358,9 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-base-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-bulk-edit-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-environment-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-extensions-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-host-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-keybindings-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-layout-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-quickaccess-service-override": "0.0.0-semantic-release",
"@codingame/monaco-vscode-view-banner-service-override": "0.0.0-semantic-release",
"@codingame/monaco-vscode-view-status-bar-service-override": "0.0.0-semantic-release",
"@codingame/monaco-vscode-view-title-bar-service-override": "0.0.0-semantic-release",
- "@codingame/monaco-vscode-views-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -1417,7 +1369,6 @@
"version": "0.0.0-semantic-release",
"license": "MIT",
"dependencies": {
- "@codingame/monaco-vscode-files-service-override": "0.0.0-semantic-release",
"vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release"
}
},
@@ -2144,6 +2095,10 @@
"resolved": "../dist/service-override-view-banner",
"link": true
},
+ "node_modules/@codingame/monaco-vscode-view-common-service-override": {
+ "resolved": "../dist/service-override-view-common",
+ "link": true
+ },
"node_modules/@codingame/monaco-vscode-view-status-bar-service-override": {
"resolved": "../dist/service-override-view-status-bar",
"link": true
@@ -2565,9 +2520,9 @@
}
},
"node_modules/@jridgewell/resolve-uri": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
- "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"dev": true,
"engines": {
"node": ">=6.0.0"
@@ -2590,9 +2545,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz",
- "integrity": "sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.3.tgz",
+ "integrity": "sha512-X9alQ3XM6I9IlSlmC8ddAvMSyG1WuHk5oUnXGw+yUBs3BFoTizmG1La/Gr8fVJvDWAq+zlYTZ9DBgrlKRVY06g==",
"cpu": [
"arm"
],
@@ -2603,9 +2558,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz",
- "integrity": "sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.3.tgz",
+ "integrity": "sha512-eQK5JIi+POhFpzk+LnjKIy4Ks+pwJ+NXmPxOCSvOKSNRPONzKuUvWE+P9JxGZVxrtzm6BAYMaL50FFuPe0oWMQ==",
"cpu": [
"arm64"
],
@@ -2616,9 +2571,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz",
- "integrity": "sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.3.tgz",
+ "integrity": "sha512-Od4vE6f6CTT53yM1jgcLqNfItTsLt5zE46fdPaEmeFHvPs5SjZYlLpHrSiHEKR1+HdRfxuzXHjDOIxQyC3ptBA==",
"cpu": [
"arm64"
],
@@ -2629,9 +2584,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz",
- "integrity": "sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.3.tgz",
+ "integrity": "sha512-0IMAO21axJeNIrvS9lSe/PGthc8ZUS+zC53O0VhF5gMxfmcKAP4ESkKOCwEi6u2asUrt4mQv2rjY8QseIEb1aw==",
"cpu": [
"x64"
],
@@ -2642,9 +2597,22 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz",
- "integrity": "sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.3.tgz",
+ "integrity": "sha512-ge2DC7tHRHa3caVEoSbPRJpq7azhG+xYsd6u2MEnJ6XzPSzQsTKyXvh6iWjXRf7Rt9ykIUWHtl0Uz3T6yXPpKw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.14.3.tgz",
+ "integrity": "sha512-ljcuiDI4V3ySuc7eSk4lQ9wU8J8r8KrOUvB2U+TtK0TiW6OFDmJ+DdIjjwZHIw9CNxzbmXY39wwpzYuFDwNXuw==",
"cpu": [
"arm"
],
@@ -2655,9 +2623,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz",
- "integrity": "sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.3.tgz",
+ "integrity": "sha512-Eci2us9VTHm1eSyn5/eEpaC7eP/mp5n46gTRB3Aar3BgSvDQGJZuicyq6TsH4HngNBgVqC5sDYxOzTExSU+NjA==",
"cpu": [
"arm64"
],
@@ -2668,9 +2636,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz",
- "integrity": "sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.3.tgz",
+ "integrity": "sha512-UrBoMLCq4E92/LCqlh+blpqMz5h1tJttPIniwUgOFJyjWI1qrtrDhhpHPuFxULlUmjFHfloWdixtDhSxJt5iKw==",
"cpu": [
"arm64"
],
@@ -2680,10 +2648,23 @@
"linux"
]
},
+ "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.3.tgz",
+ "integrity": "sha512-5aRjvsS8q1nWN8AoRfrq5+9IflC3P1leMoy4r2WjXyFqf3qcqsxRCfxtZIV58tCxd+Yv7WELPcO9mY9aeQyAmw==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz",
- "integrity": "sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.3.tgz",
+ "integrity": "sha512-sk/Qh1j2/RJSX7FhEpJn8n0ndxy/uf0kI/9Zc4b1ELhqULVdTfN6HL31CDaTChiBAOgLcsJ1sgVZjWv8XNEsAQ==",
"cpu": [
"riscv64"
],
@@ -2693,10 +2674,23 @@
"linux"
]
},
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.3.tgz",
+ "integrity": "sha512-jOO/PEaDitOmY9TgkxF/TQIjXySQe5KVYB57H/8LRP/ux0ZoO8cSHCX17asMSv3ruwslXW/TLBcxyaUzGRHcqg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
"node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz",
- "integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.3.tgz",
+ "integrity": "sha512-8ybV4Xjy59xLMyWo3GCfEGqtKV5M5gCSrZlxkPGvEPCGDLNla7v48S662HSGwRd6/2cSneMQWiv+QzcttLrrOA==",
"cpu": [
"x64"
],
@@ -2707,9 +2701,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz",
- "integrity": "sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.3.tgz",
+ "integrity": "sha512-s+xf1I46trOY10OqAtZ5Rm6lzHre/UiLA1J2uOhCFXWkbZrJRkYBPO6FhvGfHmdtQ3Bx793MNa7LvoWFAm93bg==",
"cpu": [
"x64"
],
@@ -2720,9 +2714,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz",
- "integrity": "sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.3.tgz",
+ "integrity": "sha512-+4h2WrGOYsOumDQ5S2sYNyhVfrue+9tc9XcLWLh+Kw3UOxAvrfOrSMFon60KspcDdytkNDh7K2Vs6eMaYImAZg==",
"cpu": [
"arm64"
],
@@ -2733,9 +2727,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz",
- "integrity": "sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.3.tgz",
+ "integrity": "sha512-T1l7y/bCeL/kUwh9OD4PQT4aM7Bq43vX05htPJJ46RTI4r5KNt6qJRzAfNfM+OYMNEVBWQzR2Gyk+FXLZfogGw==",
"cpu": [
"ia32"
],
@@ -2746,9 +2740,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz",
- "integrity": "sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.3.tgz",
+ "integrity": "sha512-/BypzV0H1y1HzgYpxqRaXGBRqfodgoBBCcsrujT6QRcakDQdfU+Lq9PENPh5jB4I44YWq+0C2eHsHya+nZY1sA==",
"cpu": [
"x64"
],
@@ -2759,9 +2753,9 @@
]
},
"node_modules/@tsconfig/node10": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
- "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz",
+ "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==",
"dev": true
},
"node_modules/@tsconfig/node12": {
@@ -2841,9 +2835,9 @@
}
},
"node_modules/@types/express-serve-static-core": {
- "version": "4.17.42",
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.42.tgz",
- "integrity": "sha512-ckM3jm2bf/MfB3+spLPWYPUH573plBFwpOhqQ2WottxYV85j1HQFlxmnTq57X1yHY9awZPig06hL/cLMgNWHIQ==",
+ "version": "4.19.0",
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.0.tgz",
+ "integrity": "sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==",
"dev": true,
"dependencies": {
"@types/node": "*",
@@ -2865,18 +2859,18 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "20.11.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.4.tgz",
- "integrity": "sha512-6I0fMH8Aoy2lOejL3s4LhyIYX34DPwY8bl5xlNjBvUEk8OHrcuzsFt+Ied4LvJihbtXPM+8zUqdydfIti86v9g==",
+ "version": "20.12.7",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz",
+ "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@types/qs": {
- "version": "6.9.11",
- "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz",
- "integrity": "sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==",
+ "version": "6.9.15",
+ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.15.tgz",
+ "integrity": "sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==",
"dev": true
},
"node_modules/@types/range-parser": {
@@ -2896,29 +2890,29 @@
}
},
"node_modules/@types/serve-static": {
- "version": "1.15.5",
- "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz",
- "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==",
+ "version": "1.15.7",
+ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz",
+ "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==",
"dev": true,
"dependencies": {
"@types/http-errors": "*",
- "@types/mime": "*",
- "@types/node": "*"
+ "@types/node": "*",
+ "@types/send": "*"
}
},
"node_modules/@types/ssh2": {
- "version": "1.11.19",
- "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.11.19.tgz",
- "integrity": "sha512-ydbQAqEcdNVy2t1w7dMh6eWMr+iOgtEkqM/3K9RMijMaok/ER7L8GW6PwsOypHCN++M+c8S/UR9SgMqNIFstbA==",
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.15.0.tgz",
+ "integrity": "sha512-YcT8jP5F8NzWeevWvcyrrLB3zcneVjzYY9ZDSMAMboI+2zR1qYWFhwsyOFVzT7Jorn67vqxC0FRiw8YyG9P1ww==",
"dev": true,
"dependencies": {
"@types/node": "^18.11.18"
}
},
"node_modules/@types/ssh2/node_modules/@types/node": {
- "version": "18.19.10",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.10.tgz",
- "integrity": "sha512-IZD8kAM02AW1HRDTPOlz3npFava678pr8Ie9Vp8uRhBROXAv8MXT2pCnGZZAKYdromsNQLHQcfWQ6EOatVLtqA==",
+ "version": "18.19.31",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz",
+ "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
@@ -3553,9 +3547,9 @@
}
},
"node_modules/hasown": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz",
- "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"dependencies": {
"function-bind": "^1.1.2"
},
@@ -3703,9 +3697,9 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/nan": {
- "version": "2.18.0",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
- "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==",
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz",
+ "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==",
"optional": true
},
"node_modules/nanoid": {
@@ -3879,9 +3873,9 @@
}
},
"node_modules/rollup": {
- "version": "4.13.0",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz",
- "integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==",
+ "version": "4.14.3",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.3.tgz",
+ "integrity": "sha512-ag5tTQKYsj1bhrFC9+OEWqb5O6VYgtQDO9hPDBMmIbePwhfSr+ExlcU741t8Dhw5DkPCQf6noz0jb36D6W9/hw==",
"dev": true,
"dependencies": {
"@types/estree": "1.0.5"
@@ -3894,19 +3888,22 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.13.0",
- "@rollup/rollup-android-arm64": "4.13.0",
- "@rollup/rollup-darwin-arm64": "4.13.0",
- "@rollup/rollup-darwin-x64": "4.13.0",
- "@rollup/rollup-linux-arm-gnueabihf": "4.13.0",
- "@rollup/rollup-linux-arm64-gnu": "4.13.0",
- "@rollup/rollup-linux-arm64-musl": "4.13.0",
- "@rollup/rollup-linux-riscv64-gnu": "4.13.0",
- "@rollup/rollup-linux-x64-gnu": "4.13.0",
- "@rollup/rollup-linux-x64-musl": "4.13.0",
- "@rollup/rollup-win32-arm64-msvc": "4.13.0",
- "@rollup/rollup-win32-ia32-msvc": "4.13.0",
- "@rollup/rollup-win32-x64-msvc": "4.13.0",
+ "@rollup/rollup-android-arm-eabi": "4.14.3",
+ "@rollup/rollup-android-arm64": "4.14.3",
+ "@rollup/rollup-darwin-arm64": "4.14.3",
+ "@rollup/rollup-darwin-x64": "4.14.3",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.14.3",
+ "@rollup/rollup-linux-arm-musleabihf": "4.14.3",
+ "@rollup/rollup-linux-arm64-gnu": "4.14.3",
+ "@rollup/rollup-linux-arm64-musl": "4.14.3",
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.14.3",
+ "@rollup/rollup-linux-riscv64-gnu": "4.14.3",
+ "@rollup/rollup-linux-s390x-gnu": "4.14.3",
+ "@rollup/rollup-linux-x64-gnu": "4.14.3",
+ "@rollup/rollup-linux-x64-musl": "4.14.3",
+ "@rollup/rollup-win32-arm64-msvc": "4.14.3",
+ "@rollup/rollup-win32-ia32-msvc": "4.14.3",
+ "@rollup/rollup-win32-x64-msvc": "4.14.3",
"fsevents": "~2.3.2"
}
},
@@ -3990,16 +3987,16 @@
}
},
"node_modules/set-function-length": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz",
- "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==",
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
"dependencies": {
- "define-data-property": "^1.1.2",
+ "define-data-property": "^1.1.4",
"es-errors": "^1.3.0",
"function-bind": "^1.1.2",
- "get-intrinsic": "^1.2.3",
+ "get-intrinsic": "^1.2.4",
"gopd": "^1.0.1",
- "has-property-descriptors": "^1.0.1"
+ "has-property-descriptors": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
@@ -4169,9 +4166,9 @@
}
},
"node_modules/typescript": {
- "version": "5.4.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz",
- "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==",
+ "version": "5.4.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
+ "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -4223,9 +4220,9 @@
}
},
"node_modules/vite": {
- "version": "5.2.8",
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz",
- "integrity": "sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==",
+ "version": "5.2.9",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.9.tgz",
+ "integrity": "sha512-uOQWfuZBlc6Y3W/DTuQ1Sr+oIXWvqljLvS881SVmAj00d5RdgShLcuXWxseWPd4HXwiYBFW/vXHfKFeqj9uQnw==",
"dev": true,
"dependencies": {
"esbuild": "^0.20.1",
diff --git a/demo/package.json b/demo/package.json
index c4e8449d..2500e9c5 100644
--- a/demo/package.json
+++ b/demo/package.json
@@ -183,6 +183,7 @@
"@codingame/monaco-vscode-workspace-trust-service-override": "file:../dist/service-override-workspace-trust",
"@codingame/monaco-vscode-xml-default-extension": "file:../dist/default-extension-xml",
"@codingame/monaco-vscode-yaml-default-extension": "file:../dist/default-extension-yaml",
+ "@codingame/monaco-vscode-view-common-service-override": "file:../dist/service-override-view-common",
"ansi-colors": "^4.1.3",
"dockerode": "^4.0.2",
"express": "^4.19.2",
diff --git a/demo/src/setup.common.ts b/demo/src/setup.common.ts
index 56b1f915..a1da8878 100644
--- a/demo/src/setup.common.ts
+++ b/demo/src/setup.common.ts
@@ -92,82 +92,82 @@ if (useHtmlFileSystemProvider) {
const fileSystemProvider = new RegisteredFileSystemProvider(false)
fileSystemProvider.registerFile(new RegisteredMemoryFile(vscode.Uri.file('/tmp/test.js'), `// import anotherfile
- let variable = 1
- function inc () {
- variable++
- }
+let variable = 1
+function inc () {
+ variable++
+}
- while (variable < 5000) {
- inc()
- console.log('Hello world', variable);
- }`
+while (variable < 5000) {
+ inc()
+ console.log('Hello world', variable);
+}`
))
fileSystemProvider.registerFile(new RegisteredReadOnlyFile(vscode.Uri.file('/tmp/test_readonly.js'), async () => 'This is a readonly static file'))
fileSystemProvider.registerFile(new RegisteredMemoryFile(vscode.Uri.file('/tmp/jsconfig.json'), `{
- "compilerOptions": {
- "target": "es2020",
- "module": "esnext",
- "lib": [
- "es2021",
- "DOM"
- ]
- }
- }`
+ "compilerOptions": {
+ "target": "es2020",
+ "module": "esnext",
+ "lib": [
+ "es2021",
+ "DOM"
+ ]
+ }
+}`
))
fileSystemProvider.registerFile(new RegisteredMemoryFile(vscode.Uri.file('/tmp/index.html'), `
-
-
-
-
- monaco-vscode-api demo
-
-
-
-
+
+
+
+
+ monaco-vscode-api demo
+
+
+
+
- Hello, world!
-
- `
+ Hello, world!
+
+`
))
fileSystemProvider.registerFile(new RegisteredMemoryFile(vscode.Uri.file('/tmp/test.md'), `
- ***Hello World***
+***Hello World***
- Math block:
- $$
- \\displaystyle
- \\left( \\sum_{k=1}^n a_k b_k \\right)^2
- \\leq
- \\left( \\sum_{k=1}^n a_k^2 \\right)
- \\left( \\sum_{k=1}^n b_k^2 \\right)
- $$
+Math block:
+$$
+\\displaystyle
+\\left( \\sum_{k=1}^n a_k b_k \\right)^2
+\\leq
+\\left( \\sum_{k=1}^n a_k^2 \\right)
+\\left( \\sum_{k=1}^n b_k^2 \\right)
+$$
- # Easy Math
+# Easy Math
- 2 + 2 = 4 // this test will pass
- 2 + 2 = 5 // this test will fail
+2 + 2 = 4 // this test will pass
+2 + 2 = 5 // this test will fail
- # Harder Math
+# Harder Math
- 230230 + 5819123 = 6049353
- `
+230230 + 5819123 = 6049353
+`
))
fileSystemProvider.registerFile(new RegisteredMemoryFile(vscode.Uri.file('/tmp/test.customeditor'), `
- Custom Editor!`
+Custom Editor!`
))
fileSystemProvider.registerFile(new RegisteredMemoryFile(vscode.Uri.file('/tmp/test.css'), `
- h1 {
- color: DeepSkyBlue;
- }`
+h1 {
+ color: DeepSkyBlue;
+}`
))
// Use a workspace file to be able to add another folder later (for the "Attach filesystem" button)
diff --git a/demo/src/user/configuration.json b/demo/src/user/configuration.json
index 129be39c..fcce34de 100644
--- a/demo/src/user/configuration.json
+++ b/demo/src/user/configuration.json
@@ -11,8 +11,12 @@
"editor.semanticHighlighting.enabled": true,
"editor.bracketPairColorization.enabled": false,
"editor.fontSize": 12,
- "audioCues.lineHasError": "on",
- "audioCues.onDebugBreak": "on",
+ "accessibility.signals.lineHasError": {
+ "sound": "on"
+ },
+ "accessibility.signals.onDebugBreak": {
+ "sound": "on"
+ },
"files.autoSave": "off",
"debug.toolBarLocation": "docked",
"editor.experimental.asyncTokenization": true,
diff --git a/package-lock.json b/package-lock.json
index 33521f0e..a3231762 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,6 +12,7 @@
"@microsoft/1ds-core-js": "^3.2.13",
"@microsoft/1ds-post-js": "^3.2.13",
"@parcel/watcher": "2.1.0",
+ "@vscode/iconv-lite-umd": "0.7.0",
"@vscode/proxy-agent": "^0.19.0",
"@vscode/ripgrep": "^1.15.9",
"@vscode/spdlog": "^0.15.0",
@@ -28,6 +29,7 @@
"@xterm/xterm": "5.5.0-beta.12",
"cookie": "^0.4.0",
"css-url-parser": "^1.1.3",
+ "jschardet": "3.0.0",
"kerberos": "^2.0.1",
"keytar": "^7.9.0",
"memfs": "^4.8.1",
@@ -66,7 +68,6 @@
"@types/yauzl": "^2.10.3",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
- "@vscode/iconv-lite-umd": "^0.7.0",
"@web/rollup-plugin-import-meta-assets": "^2.2.1",
"change-package-name": "^1.0.5",
"eslint": "^8.57.0",
@@ -79,7 +80,6 @@
"graceful-fs": "^4.2.11",
"is-builtin-module": "^3.2.1",
"js-cleanup": "^1.2.0",
- "jschardet": "^3.1.2",
"package-json": "^10.0.0",
"param-case": "^3.0.4",
"pascal-case": "^3.1.2",
@@ -3843,8 +3843,7 @@
"node_modules/@vscode/iconv-lite-umd": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz",
- "integrity": "sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg==",
- "dev": true
+ "integrity": "sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg=="
},
"node_modules/@vscode/proxy-agent": {
"version": "0.19.1",
@@ -7816,10 +7815,9 @@
"integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
},
"node_modules/jschardet": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-3.1.2.tgz",
- "integrity": "sha512-mw3CBZGzW8nUBPYhFU2ztZ/kJ6NClQUQVpyzvFMfznZsoC///ZQ30J2RCUanNsr5yF22LqhgYr/lj807/ZleWA==",
- "dev": true,
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-3.0.0.tgz",
+ "integrity": "sha512-lJH6tJ77V8Nzd5QWRkFYCLc13a3vADkh3r/Fi8HupZGWk2OVVDfnZP8V/VgQgZ+lzW0kG2UGb5hFgt3V3ndotQ==",
"engines": {
"node": ">=0.1.90"
}
diff --git a/package.json b/package.json
index d8de3501..343dcef0 100644
--- a/package.json
+++ b/package.json
@@ -67,7 +67,6 @@
"@types/yauzl": "^2.10.3",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "^7.6.0",
- "@vscode/iconv-lite-umd": "^0.7.0",
"@web/rollup-plugin-import-meta-assets": "^2.2.1",
"change-package-name": "^1.0.5",
"eslint": "^8.57.0",
@@ -80,7 +79,6 @@
"graceful-fs": "^4.2.11",
"is-builtin-module": "^3.2.1",
"js-cleanup": "^1.2.0",
- "jschardet": "^3.1.2",
"package-json": "^10.0.0",
"param-case": "^3.0.4",
"pascal-case": "^3.1.2",
@@ -130,7 +128,9 @@
"vscode-regexpp": "^3.1.0",
"vscode-textmate": "9.0.0",
"yauzl": "^3.0.0",
- "yazl": "^2.4.3"
+ "yazl": "^2.4.3",
+ "@vscode/iconv-lite-umd": "0.7.0",
+ "jschardet": "3.0.0"
},
"overrides": {
"typescript": "$typescript",
diff --git a/rollup/rollup-metadata-plugin.ts b/rollup/rollup-metadata-plugin.ts
index 2f6bfaa8..54d1b7de 100644
--- a/rollup/rollup-metadata-plugin.ts
+++ b/rollup/rollup-metadata-plugin.ts
@@ -4,21 +4,32 @@ import path from 'path'
interface Group {
name: string
- dependencies: Set
modules: Set
entrypoints: Set
+ dependencies: Set
+ groupDependencies: Set
+ // A greater priority means the that this group will be chosen for module present in multiple groups
+ priority: number
+}
+
+interface GroupResult {
+ name: string
+ directDependencies: Set
+ exclusiveModules: Set
+ entrypoints: Set
}
interface Options {
stage?: 'generateBundle' | 'writeBundle'
- getGroup?: (entryPoint: string, options: OutputOptions) => string
- handle (this: PluginContext, groupName: string, dependencies: Set, entrypoints: Set, exclusiveModules: Set, options: OutputOptions, bundle: OutputBundle): void | Promise
+ getGroup?: (entryPoint: string, options: OutputOptions) => { name: string, publicName?: string, priority?: number }
+ handle (this: PluginContext, group: GroupResult, moduleGroupName: Map, options: OutputOptions, bundle: OutputBundle): void | Promise
}
-export default ({ handle, getGroup = () => 'main', stage = 'generateBundle' }: Options): Plugin => ({
+export default ({ handle, getGroup = () => ({ name: 'main' }), stage = 'generateBundle' }: Options): Plugin => ({
name: 'generate-metadata',
[stage]: async function (this: PluginContext, options: OutputOptions, bundle: OutputBundle) {
- const dependencyCache = new Map, internals: Set }>()
+ const dependencyCache = new Map>()
+ const externalDependencyCache = new Map>()
const inputToOutput = Object.fromEntries(Object.values(bundle)
.filter((chunk): chunk is OutputChunk => 'code' in chunk)
@@ -26,69 +37,108 @@ export default ({ handle, getGroup = () => 'main', stage = 'generateBundle' }: O
chunk.facadeModuleId,
path.resolve(options.dir!, chunk.preliminaryFileName)
]))
- const getModuleDependencies = (id: string, path: string[]): { externals: Set, internals: Set } => {
- if (path.includes(id)) {
+
+ const moduleExternalDependencies = new Map>()
+ const getModuleDependencies = (id: string, paths: string[]): { internal: Set, external: Set } => {
+ if (paths.includes(id)) {
// Break recursive imports
- return {
- externals: new Set(),
- internals: new Set()
- }
+ return { internal: new Set(), external: new Set() }
}
- if (!dependencyCache.has(id)) {
- const moduleInfo = this.getModuleInfo(id)!
- if (moduleInfo.isExternal) {
- const match = /^(?:@[^/]*\/)?[^/]*/.exec(id)
- dependencyCache.set(id, {
- externals: new Set(match != null && !builtinModules.includes(match[0]) ? [match[0]] : []),
- internals: new Set([])
- })
+ const moduleInfo = this.getModuleInfo(id)!
+ if (moduleInfo.isExternal) {
+ const match = /^(?:@[^/]*\/)?[^/]*/.exec(id)
+ if (match != null && !builtinModules.includes(match[0])) {
+ const caller = paths[paths.length - 1]!
+ const dependencyList = moduleExternalDependencies.get(caller) ?? new Set()
+ dependencyList.add(match[0])
+ moduleExternalDependencies.set(caller, dependencyList)
+ externalDependencyCache.set(id, new Set([match[0]]))
} else {
- const dependencies = [...moduleInfo.importedIds, ...moduleInfo.dynamicallyImportedIds].map(depId => {
- return getModuleDependencies(depId, [...path, id])
- })
- dependencyCache.set(id, {
- externals: new Set(dependencies.map(t => t.externals).flatMap(map => Array.from(map))),
- internals: new Set([inputToOutput[id] ?? id, ...dependencies.map(t => t.internals).flatMap(map => Array.from(map))])
- })
+ externalDependencyCache.set(id, new Set([]))
}
+ dependencyCache.set(id, new Set())
+ } else if (!dependencyCache.has(id)) {
+ const dependencies = [...moduleInfo.importedIds, ...moduleInfo.dynamicallyImportedIds].map(depId => {
+ return getModuleDependencies(depId, [...paths, id])
+ })
+ dependencyCache.set(id, new Set([inputToOutput[id] ?? id, ...dependencies.flatMap(d => Array.from(d.internal))]))
+ externalDependencyCache.set(id, new Set(dependencies.flatMap(d => Array.from(d.external))))
}
- return dependencyCache.get(id)!
+ return {
+ internal: dependencyCache.get(id)!,
+ external: externalDependencyCache.get(id)!
+ }
}
const groups = new Map()
+ const groupByPublicName = new Map()
for (const id of this.getModuleIds()) {
const moduleInfo = this.getModuleInfo(id)!
if (!moduleInfo.isEntry) {
continue
}
- const groupName = getGroup(id, options)
- const dependencies = getModuleDependencies(moduleInfo.id, [])
+ const { name: groupName, publicName, priority } = getGroup(id, options)
+ const { internal: internalDependencies, external: externalDependencies } = getModuleDependencies(moduleInfo.id, [])
if (!groups.has(groupName)) {
groups.set(groupName, {
- dependencies: new Set(),
entrypoints: new Set(),
name: groupName,
- modules: new Set()
+ modules: new Set(),
+ dependencies: new Set(),
+ groupDependencies: new Set(),
+ priority: priority ?? 0
})
}
const group = groups.get(groupName)!
- dependencies.externals.forEach(d => group.dependencies.add(d))
- dependencies.internals.forEach(d => group.modules.add(d))
+ internalDependencies.forEach(d => group.modules.add(d))
+ externalDependencies.forEach(d => group.dependencies.add(d))
group.entrypoints.add(id)
+
+ if (publicName != null) {
+ groupByPublicName.set(publicName, group)
+ }
+ }
+
+ for (const group of groups.values()) {
+ group.groupDependencies = new Set(Array.from(group.dependencies).map(d => groupByPublicName.get(d)?.name).filter((g): g is string => g != null))
}
- const moduleUseCount = new Map()
+ const moduleGroups = new Map()
for (const [_, group] of groups.entries()) {
for (const module of group.modules) {
- moduleUseCount.set(module, (moduleUseCount.get(module) ?? 0) + 1)
+ if (!moduleGroups.has(module)) {
+ moduleGroups.set(module, [])
+ }
+ moduleGroups.get(module)!.push(group)
}
}
- await Promise.all(Array.from(groups.entries()).map(async ([name, group]) => {
- const exclusiveModules = new Set(Array.from(group.modules).filter(module => moduleUseCount.get(module)! <= 1))
- await handle.call(this, name, group.dependencies, exclusiveModules, group.entrypoints, options, bundle)
+ const moduleGroup = new Map()
+ for (const [id, groups] of moduleGroups.entries()) {
+ // Find a group that everyone depends on
+ const greatestPriority = Math.max(...groups.map(g => g.priority))
+ const priorityGroups = groups.filter(g => g.priority >= greatestPriority)
+ moduleGroup.set(id, priorityGroups.find(group => priorityGroups.filter(ogroup => ogroup !== group).every(ogroup => ogroup.groupDependencies.has(group.name))) ?? null)
+ }
+
+ const moduleGroupName = new Map(Array.from(moduleGroup.entries()).map(([module, group]) => [module, group?.name]))
+
+ const groupResults = Array.from(groups.entries()).map(([name, group]) => {
+ const exclusiveModules = new Set(Array.from(group.modules).filter(module => moduleGroup.get(module) === group))
+ const directDependencies = new Set(Array.from(exclusiveModules).flatMap(module => Array.from(moduleExternalDependencies.get(module) ?? new Set())))
+
+ return {
+ directDependencies,
+ entrypoints: group.entrypoints,
+ exclusiveModules,
+ name
+ }
+ })
+
+ await Promise.all(groupResults.map(async (group) => {
+ await handle.call(this, group, moduleGroupName, options, bundle)
}))
}
})
diff --git a/rollup/rollup.config.ts b/rollup/rollup.config.ts
index a676a231..36210293 100644
--- a/rollup/rollup.config.ts
+++ b/rollup/rollup.config.ts
@@ -297,12 +297,6 @@ function transformVSCodeCode (id: string, code: string) {
}
function resolveVscode (importee: string, importer?: string) {
- if (importee === '@vscode/iconv-lite-umd') {
- return path.resolve(OVERRIDE_PATH, 'iconv.ts')
- }
- if (importee === 'jschardet') {
- return path.resolve(OVERRIDE_PATH, 'jschardet.ts')
- }
if (importer != null && importee.startsWith('.')) {
importee = path.resolve(path.dirname(importer), importee)
}
@@ -359,11 +353,11 @@ const input = {
}
const workerGroups: Record = {
- languageDetection: 'service-override:language-detection-worker',
- outputLinkComputer: 'service-override:output',
- textmate: 'service-override:textmate',
- notebook: 'service-override:notebook',
- localFileSearch: 'service-override:search'
+ languageDetection: 'language-detection-worker',
+ outputLinkComputer: 'output',
+ textmate: 'textmate',
+ notebook: 'notebook',
+ localFileSearch: 'search'
}
const externals = Object.keys({ ...pkg.dependencies })
@@ -693,18 +687,33 @@ export default (args: Record): rollup.RollupOptions[] => {
const workersDir = path.resolve(options.dir!, 'workers')
if (id.startsWith(serviceOverrideDir)) {
- return `service-override:${paramCase(path.basename(id, '.js'))}`
+ const name = paramCase(path.basename(id, '.js'))
+ return {
+ name: `service-override:${name}`,
+ publicName: `@codingame/monaco-vscode-${name}-service-override`
+ }
}
if (id.startsWith(workersDir)) {
- return workerGroups[path.basename(id, '.worker.js')] ?? 'main'
+ const name = workerGroups[path.basename(id, '.worker.js')]
+ return {
+ name: name != null ? `service-override:${name}` : 'main',
+ publicName: name != null ? `@codingame/monaco-vscode-${name}-service-override` : 'vscode'
+ }
}
if (id === path.resolve(options.dir!, 'editor.api.js')) {
- return 'editor.api'
+ return {
+ name: 'editor.api',
+ publicName: '@codngame/monaco-vscode-editor-api'
+ }
+ }
+ return {
+ name: 'main',
+ publicName: 'vscode',
+ priority: 1
}
- return 'main'
},
- async handle (groupName, dependencies, exclusiveModules, entrypoints, options, bundle) {
- if (groupName === 'main') {
+ async handle (group, moduleGroupName, options, bundle) {
+ if (group.name === 'main') {
// Generate package.json
const packageJson: PackageJson = {
...Object.fromEntries(Object.entries(pkg).filter(([key]) => ['name', 'description', 'version', 'keywords', 'author', 'license', 'repository', 'type'].includes(key))),
@@ -792,8 +801,8 @@ export default (args: Record): rollup.RollupOptions[] => {
}
},
dependencies: {
- ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key))),
- ...Object.fromEntries(Array.from(dependencies).filter(dep => dep.startsWith('@codingame/monaco-vscode-')).map(dep => [dep, pkg.version]))
+ ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => group.directDependencies.has(key))),
+ ...Object.fromEntries(Array.from(group.directDependencies).filter(dep => dep.startsWith('@codingame/monaco-vscode-')).map(dep => [dep, pkg.version]))
}
}
this.emitFile({
@@ -802,7 +811,7 @@ export default (args: Record): rollup.RollupOptions[] => {
source: JSON.stringify(packageJson, null, 2),
type: 'asset'
})
- } else if (groupName === 'editor.api') {
+ } else if (group.name === 'editor.api') {
const directory = path.resolve(DIST_DIR, 'editor-api')
await fsPromise.mkdir(directory, {
@@ -852,6 +861,7 @@ export default (args: Record): rollup.RollupOptions[] => {
'esm/vs/editor/editor.api': 'entrypoint'
},
external,
+ treeshake: false,
plugins: [
nodeResolve({
extensions: EXTENSIONS
@@ -873,7 +883,7 @@ export default (args: Record): rollup.RollupOptions[] => {
const isVscodeFile = resolved.startsWith(VSCODE_SRC_DIST_DIR)
const isServiceOverride = path.dirname(resolved) === DIST_SERVICE_OVERRIDE_DIR_MAIN
- const isExclusive = exclusiveModules.has(resolvedWithExtension)
+ const isExclusive = group.exclusiveModules.has(resolvedWithExtension)
const pathFromRoot = path.relative(DIST_DIR_MAIN, resolvedWithExtension)
const shouldBeShared = SHARED_ROOT_FILES_BETWEEN_PACKAGES.includes(path.relative(DIST_DIR_MAIN, resolvedWithExtension))
if (pathFromRoot.startsWith('external/') && !isExclusive) {
@@ -883,8 +893,17 @@ export default (args: Record): rollup.RollupOptions[] => {
}
}
if (((isVscodeFile || isServiceOverride) && !isExclusive) || shouldBeShared) {
+ function getPackageFromGroupName (groupName: string) {
+ if (groupName === 'main') {
+ return 'vscode'
+ }
+ const [_, category, name] = /^(.*):(.*)$/.exec(groupName)!
+ return `@codingame/monaco-vscode-${name}-${category}`
+ }
+ const importFromGroup = isVscodeFile ? moduleGroupName.get(resolved) ?? 'main' : 'main'
+ const importFromModule = getPackageFromGroupName(importFromGroup)
// Those modules will be imported from external monaco-vscode-api
- let externalResolved = resolved.startsWith(VSCODE_SRC_DIST_DIR) ? `vscode/vscode/${path.relative(VSCODE_SRC_DIST_DIR, resolved)}` : `vscode/${path.relative(DIST_DIR_MAIN, resolved)}`
+ let externalResolved = resolved.startsWith(VSCODE_SRC_DIST_DIR) ? `${importFromModule}/vscode/${path.relative(VSCODE_SRC_DIST_DIR, resolved)}` : `${importFromModule}/${path.relative(DIST_DIR_MAIN, resolved)}`
if (externalResolved.endsWith('.js')) {
externalResolved = externalResolved.slice(0, -3)
}
@@ -898,7 +917,7 @@ export default (args: Record): rollup.RollupOptions[] => {
},
load (id) {
if (id === 'entrypoint') {
- return `export * from '${Array.from(entrypoints)[0]!.slice(0, -3)}'`
+ return `export * from '${Array.from(group.entrypoints)[0]!.slice(0, -3)}'`
}
if (id.startsWith('vscode/')) {
return (bundle[path.relative('vscode', id)] as rollup.OutputChunk | undefined)?.code
@@ -952,19 +971,19 @@ export default (args: Record): rollup.RollupOptions[] => {
})
await groupBundle.close()
// remove exclusive files from main bundle to prevent them from being duplicated
- for (const exclusiveModule of exclusiveModules) {
+ for (const exclusiveModule of group.exclusiveModules) {
delete bundle[path.relative(DIST_DIR_MAIN, exclusiveModule)]
}
} else {
- const [_, category, name] = /^(.*):(.*)$/.exec(groupName)!
+ const [_, category, name] = /^(.*):(.*)$/.exec(group.name)!
const directory = path.resolve(DIST_DIR, `${category}-${name}`)
await fsPromise.mkdir(directory, {
recursive: true
})
- const serviceOverrideEntryPoint = Array.from(entrypoints).find(e => e.includes('/service-override/'))!
- const workerEntryPoint = Array.from(entrypoints).find(e => e.includes('/workers/'))
+ const serviceOverrideEntryPoint = Array.from(group.entrypoints).find(e => e.includes('/service-override/'))!
+ const workerEntryPoint = Array.from(group.entrypoints).find(e => e.includes('/workers/'))
const packageJson: PackageJson = {
name: `@codingame/monaco-vscode-${name}-${category}`,
@@ -974,20 +993,25 @@ export default (args: Record): rollup.RollupOptions[] => {
main: 'index.js',
module: 'index.js',
types: 'index.d.ts',
- dependencies: {
- vscode: `npm:${pkg.name}@^${pkg.version}`,
- ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key))),
- ...Object.fromEntries(Array.from(dependencies).filter(dep => dep.startsWith('@codingame/monaco-vscode-')).map(dep => [dep, pkg.version]))
- }
- }
- if (workerEntryPoint != null) {
- packageJson.exports = {
+ exports: {
'.': {
default: './index.js'
},
- './worker': {
- default: './worker.js'
- }
+ './vscode/*': {
+ default: './vscode/src/*.js'
+ },
+ ...(workerEntryPoint != null
+ ? {
+ './worker': {
+ default: './worker.js'
+ }
+ }
+ : {})
+ },
+ dependencies: {
+ vscode: `npm:${pkg.name}@^${pkg.version}`,
+ ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => group.directDependencies.has(key))),
+ ...Object.fromEntries(Array.from(group.directDependencies).filter(dep => dep.startsWith('@codingame/monaco-vscode-')).map(dep => [dep, pkg.version]))
}
}
@@ -1003,6 +1027,7 @@ export default (args: Record): rollup.RollupOptions[] => {
: {})
},
external,
+ treeshake: false,
plugins: [
importMetaAssets({
include: ['**/*.ts', '**/*.js'],
@@ -1029,7 +1054,7 @@ export default (args: Record): rollup.RollupOptions[] => {
const isVscodeFile = resolved.startsWith(VSCODE_SRC_DIST_DIR)
const isServiceOverride = path.dirname(resolved) === DIST_SERVICE_OVERRIDE_DIR_MAIN
- const isExclusive = exclusiveModules.has(resolvedWithExtension)
+ const isExclusive = group.exclusiveModules.has(resolvedWithExtension)
const pathFromRoot = path.relative(DIST_DIR_MAIN, resolvedWithExtension)
const shouldBeShared = SHARED_ROOT_FILES_BETWEEN_PACKAGES.includes(path.relative(DIST_DIR_MAIN, resolvedWithExtension))
if (pathFromRoot.startsWith('external/') && !isExclusive) {
@@ -1040,8 +1065,17 @@ export default (args: Record): rollup.RollupOptions[] => {
}
if (((isVscodeFile || isServiceOverride) && !isExclusive) || shouldBeShared) {
+ function getPackageFromGroupName (groupName: string) {
+ if (groupName === 'main') {
+ return 'vscode'
+ }
+ const [_, category, name] = /^(.*):(.*)$/.exec(groupName)!
+ return `@codingame/monaco-vscode-${name}-${category}`
+ }
+ const importFromGroup = isVscodeFile ? moduleGroupName.get(resolved) ?? 'main' : 'main'
+ const importFromModule = getPackageFromGroupName(importFromGroup)
// Those modules will be imported from external monaco-vscode-api
- let externalResolved = resolved.startsWith(VSCODE_SRC_DIST_DIR) ? `vscode/vscode/${path.relative(VSCODE_SRC_DIST_DIR, resolved)}` : `vscode/${path.relative(DIST_DIR_MAIN, resolved)}`
+ let externalResolved = resolved.startsWith(VSCODE_SRC_DIST_DIR) ? `${importFromModule}/vscode/${path.relative(VSCODE_SRC_DIST_DIR, resolved)}` : `${importFromModule}/${path.relative(DIST_DIR_MAIN, resolved)}`
if (externalResolved.endsWith('.js')) {
externalResolved = externalResolved.slice(0, -3)
}
@@ -1106,7 +1140,7 @@ export default (args: Record): rollup.RollupOptions[] => {
await groupBundle.close()
// remove exclusive files from main bundle to prevent them from being duplicated
- for (const exclusiveModule of exclusiveModules) {
+ for (const exclusiveModule of group.exclusiveModules) {
delete bundle[path.relative(DIST_DIR_MAIN, exclusiveModule)]
}
diff --git a/rollup/rollup.default-extensions.ts b/rollup/rollup.default-extensions.ts
index 284c2a5a..1f7aa1e8 100644
--- a/rollup/rollup.default-extensions.ts
+++ b/rollup/rollup.default-extensions.ts
@@ -89,7 +89,7 @@ export default rollup.defineConfig([
}
}),
metadataPlugin({
- handle (_, dependencies, entrypoints, exclusiveModules, options, bundle) {
+ handle ({ directDependencies }, moduleGroupName, options, bundle) {
const entrypoint = Object.values(bundle).filter(v => (v as rollup.OutputChunk).isEntry)[0]!.fileName
const packageJson: PackageJson = {
name: `@codingame/monaco-vscode-${name}-default-extension`,
@@ -101,7 +101,7 @@ export default rollup.defineConfig([
types: 'index.d.ts',
dependencies: {
vscode: `npm:${pkg.name}@^${pkg.version}`,
- ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => dependencies.has(key)))
+ ...Object.fromEntries(Object.entries(pkg.dependencies).filter(([key]) => directDependencies.has(key)))
}
}
@@ -158,7 +158,7 @@ ${extensions.map(name => ` whenReady${pascalCase(name)}()`).join(',\n')}
}
},
metadataPlugin({
- handle (_, dependencies, entrypoints, exclusiveModules, options, bundle) {
+ handle ({ directDependencies }, moduleGroupName, options, bundle) {
const entrypoint = Object.values(bundle).filter(v => (v as rollup.OutputChunk).isEntry)[0]!.fileName
const packageJson: PackageJson = {
name,
@@ -168,7 +168,7 @@ ${extensions.map(name => ` whenReady${pascalCase(name)}()`).join(',\n')}
main: entrypoint,
module: entrypoint,
types: 'index.d.ts',
- dependencies: Object.fromEntries(Array.from(dependencies).map(name => [
+ dependencies: Object.fromEntries(Array.from(directDependencies).map(name => [
name,
pkg.version
]))
diff --git a/rollup/rollup.types.config.ts b/rollup/rollup.types.config.ts
index 455e616b..b608f047 100644
--- a/rollup/rollup.types.config.ts
+++ b/rollup/rollup.types.config.ts
@@ -104,14 +104,25 @@ export default rollup.defineConfig((<{input: Record, output: str
stage: 'writeBundle', // rollup-plugin-dts needs the file to exist on the disk
getGroup (id: string) {
if (id.startsWith(SERVICE_OVERRIDE_DIR)) {
- return `service-override/${path.basename(id, '.d.ts')}`
+ const name = path.basename(id, '.d.ts')
+ return {
+ name: `service-override/${name}`,
+ publicName: `@codingame/monaco-vscode-${name}-service-override`
+ }
}
if (id === path.resolve(TYPES_SRC_DIR, 'editor.api.d.ts')) {
- return 'editor.api'
+ return {
+ name: 'editor.api',
+ publicName: '@codngame/monaco-vscode-editor-api'
+ }
+ }
+ return {
+ name: 'main',
+ publicName: 'vscode',
+ priority: 1
}
- return 'main'
},
- async handle (groupName, dependencies, exclusiveModules, entrypoints, options, bundle) {
+ async handle ({ name: groupName, exclusiveModules, entrypoints }, moduleGroupName, options, bundle) {
if (groupName === 'main') {
return
}
@@ -148,11 +159,22 @@ export default rollup.defineConfig((<{input: Record, output: str
const resolvedWithoutExtension = resolved.endsWith('.js') ? resolved.slice(0, -3) : resolved
const resolvedWithExtension = resolvedWithoutExtension.endsWith('.d.ts') ? resolvedWithoutExtension : `${resolvedWithoutExtension}.d.ts`
- const isNotExclusive = (resolved.startsWith(path.resolve(DIST_DIR_MAIN, 'vscode')) || path.dirname(resolved) === path.resolve(DIST_DIR_MAIN, 'service-override')) && !exclusiveModules.has(resolvedWithExtension)
+ const isVscodeFile = resolved.startsWith(path.resolve(DIST_DIR_MAIN, 'vscode'))
+ const isServiceOverride = path.dirname(resolved) === path.resolve(DIST_DIR_MAIN, 'service-override')
+ const isExclusive = exclusiveModules.has(resolvedWithExtension)
- if (isNotExclusive) {
+ if ((isVscodeFile || isServiceOverride) && !isExclusive) {
+ function getPackageFromGroupName (groupName: string) {
+ if (groupName === 'main') {
+ return 'vscode'
+ }
+ const [_, category, name] = /^(.*):(.*)$/.exec(groupName)!
+ return `@codingame/monaco-vscode-${name}-${category}`
+ }
+ const importFromGroup = isVscodeFile ? moduleGroupName.get(resolved) ?? 'main' : 'main'
+ const importFromModule = getPackageFromGroupName(importFromGroup)
+ const externalResolved = resolved.startsWith(DIST_DIR_VSCODE_SRC_MAIN) ? `${importFromModule}/vscode/${path.relative(DIST_DIR_VSCODE_SRC_MAIN, resolvedWithoutExtension)}` : `${importFromModule}/${path.relative(DIST_DIR_MAIN, resolvedWithoutExtension)}`
// Those modules will be imported from external monaco-vscode-api
- const externalResolved = resolved.startsWith(DIST_DIR_VSCODE_SRC_MAIN) ? `vscode/vscode/${path.relative(DIST_DIR_VSCODE_SRC_MAIN, resolvedWithoutExtension)}` : `vscode/${path.relative(DIST_DIR_MAIN, resolvedWithoutExtension)}`
return {
id: externalResolved,
external: true
diff --git a/src/override/iconv.ts b/src/override/iconv.ts
deleted file mode 100644
index 466ccdde..00000000
--- a/src/override/iconv.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import type { EncoderStream, DecoderStream, getEncoder as _getEncoder, getDecoder as _getDecoder, encodingExists as _encodingExists, decode as _decode, encode as _encode } from '@vscode/iconv-lite-umd'
-
-const textDecoder = new TextEncoder()
-const textEncoder = new TextDecoder()
-const encoder: EncoderStream = {
- write (str: string) {
- return textDecoder.encode(str)
- },
- end () {
- return undefined
- }
-}
-const decoder: DecoderStream = {
- write (str: Uint8Array) {
- return textEncoder.decode(str)
- },
- end () {
- return undefined
- }
-}
-
-function checkEncoding (encoding: string) {
- if (!encodingExists(encoding)) {
- throw new Error(`Encoding not found: ${encoding}`)
- }
-}
-
-export const getEncoder: typeof _getEncoder = (encoding) => {
- checkEncoding(encoding)
- return encoder
-}
-
-export const getDecoder: typeof _getDecoder = (encoding) => {
- checkEncoding(encoding)
- return decoder
-}
-
-export const encodingExists: typeof _encodingExists = (encoding) => {
- return encoding === 'utf8'
-}
-
-export const decode: typeof _decode = (buffer, encoding) => {
- checkEncoding(encoding)
- return decoder.write(buffer)
-}
-
-export const encode: typeof _encode = (buffer, encoding) => {
- checkEncoding(encoding)
- return encoder.write(buffer)
-}
diff --git a/src/override/jschardet.ts b/src/override/jschardet.ts
deleted file mode 100644
index 6d461815..00000000
--- a/src/override/jschardet.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import type { detect as _detect } from 'jschardet'
-
-export const detect: typeof _detect = () => {
- return {
- encoding: 'utf8',
- confidence: 1
- }
-}
diff --git a/src/override/vs/platform/dialogs/common/dialogs.ts b/src/override/vs/platform/dialogs/common/dialogs.ts
deleted file mode 100644
index ae7bfac2..00000000
--- a/src/override/vs/platform/dialogs/common/dialogs.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export * from 'vscode/src/vs/platform/dialogs/common/dialogs'
-
-// export it as non-const enum (because const enum should never be exported: https://ncjamieson.com/dont-export-const-enums/)
-export enum ConfirmResult {
- SAVE,
- DONT_SAVE,
- CANCEL
-}
diff --git a/src/override/vs/platform/userDataSync/common/extensionsSync.js b/src/override/vs/platform/userDataSync/common/extensionsSync.js
deleted file mode 100644
index 2754f342..00000000
--- a/src/override/vs/platform/userDataSync/common/extensionsSync.js
+++ /dev/null
@@ -1,5 +0,0 @@
-export * from 'vscode/src/vs/platform/userDataSync/common/extensionsSync'
-
-export class ExtensionsSynchroniser {}
-
-export class AbstractExtensionsInitializer {}
diff --git a/src/override/vs/platform/userDataSync/common/globalStateSync.js b/src/override/vs/platform/userDataSync/common/globalStateSync.js
deleted file mode 100644
index 9709b8eb..00000000
--- a/src/override/vs/platform/userDataSync/common/globalStateSync.js
+++ /dev/null
@@ -1,7 +0,0 @@
-export * from 'vscode/src/vs/platform/userDataSync/common/globalStateSync'
-
-export class GlobalStateSynchroniser {}
-
-export class UserDataSyncStoreTypeSynchronizer {}
-
-export class GlobalStateInitializer {}
diff --git a/src/service-override/testing.ts b/src/service-override/testing.ts
index d09396fa..303fa589 100644
--- a/src/service-override/testing.ts
+++ b/src/service-override/testing.ts
@@ -12,11 +12,13 @@ import { ITestingContinuousRunService, TestingContinuousRunService } from 'vs/wo
import { ITestExplorerFilterState, TestExplorerFilterState } from 'vs/workbench/contrib/testing/common/testExplorerFilterState'
import { TestingPeekOpener } from 'vs/workbench/contrib/testing/browser/testingOutputPeek'
import { ITestCoverageService, TestCoverageService } from 'vs/workbench/contrib/testing/common/testCoverageService'
+import getTerminalServiceOverride from './terminal'
import 'vs/workbench/contrib/testing/browser/testing.contribution'
import 'vs/workbench/contrib/testing/browser/testingConfigurationUi'
export default function getServiceOverride (): IEditorOverrideServices {
return {
+ ...getTerminalServiceOverride(),
[ITestService.toString()]: new SyncDescriptor(TestService, [], true),
[ITestResultStorage.toString()]: new SyncDescriptor(TestResultStorage, [], true),
[ITestProfileService.toString()]: new SyncDescriptor(TestProfileService, [], true),
diff --git a/src/service-override/viewCommon.ts b/src/service-override/viewCommon.ts
new file mode 100644
index 00000000..0df8963b
--- /dev/null
+++ b/src/service-override/viewCommon.ts
@@ -0,0 +1,104 @@
+import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standaloneServices'
+import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'
+import { IViewDescriptorService } from 'vs/workbench/common/views'
+import { ViewDescriptorService } from 'vs/workbench/services/views/browser/viewDescriptorService'
+import { IActivityService } from 'vs/workbench/services/activity/common/activity'
+import { ActivityService } from 'vs/workbench/services/activity/browser/activityService'
+import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite'
+import { IEditorResolverService } from 'vs/workbench/services/editor/common/editorResolverService'
+import { EditorResolverService } from 'vs/workbench/services/editor/browser/editorResolverService'
+import { BreadcrumbsService, IBreadcrumbsService } from 'vs/workbench/browser/parts/editor/breadcrumbs'
+import { IContextViewService } from 'vs/platform/contextview/browser/contextView'
+import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'
+import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'
+import { ITextEditorService, TextEditorService } from 'vs/workbench/services/textfile/common/textEditorService'
+import { CodeEditorService } from 'vs/workbench/services/editor/browser/codeEditorService'
+import { IUntitledTextEditorService, UntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService'
+import { IHistoryService } from 'vs/workbench/services/history/common/history'
+import { HistoryService } from 'vs/workbench/services/history/browser/historyService'
+import { ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor'
+import { CustomEditorService } from 'vs/workbench/contrib/customEditor/browser/customEditors'
+import { WebviewService } from 'vs/workbench/contrib/webview/browser/webviewService'
+import { IWebviewWorkbenchService, WebviewEditorService } from 'vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService'
+import { IWebviewService } from 'vs/workbench/contrib/webview/browser/webview'
+import { IWebviewViewService, WebviewViewService } from 'vs/workbench/contrib/webviewView/browser/webviewViewService'
+import { IProgressService } from 'vs/platform/progress/common/progress'
+import { ProgressService } from 'vs/workbench/services/progress/browser/progressService'
+import { PaneCompositePartService } from 'vs/workbench/browser/parts/paneCompositePartService'
+import { BrowserAuxiliaryWindowService, IAuxiliaryWindowService } from 'vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService'
+import { IViewsService } from 'vs/workbench/services/views/common/viewsService'
+import { ViewsService } from 'vs/workbench/services/views/browser/viewsService'
+import { IHoverService } from 'vs/platform/hover/browser/hover'
+import { IEditorPaneService } from 'vs/workbench/services/editor/common/editorPaneService'
+import { EditorPaneService } from 'vs/workbench/services/editor/browser/editorPaneService'
+import { HoverService } from 'vs/editor/browser/services/hoverService/hoverService'
+import { CustomEditorLabelService, ICustomEditorLabelService } from 'vs/workbench/services/editor/common/customEditorLabelService'
+import getBulkEditServiceOverride from './bulkEdit'
+import { changeUrlDomain } from './tools/url'
+import { registerAssets } from '../assets'
+import 'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution'
+import 'vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution'
+import 'vs/workbench/browser/actions/listCommands'
+import 'vscode/src/vs/workbench/browser/parts/views/media/views.css'
+import 'vs/workbench/api/browser/viewsExtensionPoint'
+import 'vs/workbench/browser/parts/editor/editor.contribution'
+import 'vs/workbench/browser/workbench.contribution'
+import 'vs/workbench/contrib/customEditor/browser/customEditor.contribution'
+import 'vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution'
+import 'vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution'
+import 'vs/workbench/contrib/languageStatus/browser/languageStatus.contribution'
+import 'vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution'
+import 'vs/workbench/contrib/webview/browser/webview.contribution'
+import 'vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution'
+import 'vs/workbench/contrib/sash/browser/sash.contribution'
+import 'vs/workbench/contrib/preferences/browser/keyboardLayoutPicker'
+import 'vs/workbench/browser/parts/editor/editor.autosave.contribution'
+import 'vs/workbench/contrib/files/browser/files.editorPane.contribution'
+import 'vs/workbench/contrib/files/browser/fileCommands.save'
+import 'vs/workbench/browser/actions/navigationActions'
+import 'vs/workbench/browser/style'
+import './tools/editorAssets'
+
+// Import it from here to force the bundler to put it in this service-override package
+import 'vs/workbench/browser/parts/editor/editorParts'
+
+let webviewIframeAlternateDomains: string | undefined
+registerAssets({
+ 'vs/workbench/contrib/webview/browser/pre/service-worker.js': () => changeUrlDomain(new URL('../../vscode/src/vs/workbench/contrib/webview/browser/pre/service-worker.js', import.meta.url).href, webviewIframeAlternateDomains),
+ 'vs/workbench/contrib/webview/browser/pre/index.html': () => changeUrlDomain(new URL('../assets/webview/index.html', import.meta.url).href, webviewIframeAlternateDomains),
+ 'vs/workbench/contrib/webview/browser/pre/index-no-csp.html': () => changeUrlDomain(new URL('../assets/webview/index-no-csp.html', import.meta.url).href, webviewIframeAlternateDomains),
+ 'vs/workbench/contrib/webview/browser/pre/fake.html': () => changeUrlDomain(new URL('../../vscode/src/vs/workbench/contrib/webview/browser/pre/fake.html', import.meta.url).href, webviewIframeAlternateDomains)
+})
+
+function getServiceOverride (_webviewIframeAlternateDomains?: string): IEditorOverrideServices {
+ if (_webviewIframeAlternateDomains != null) {
+ webviewIframeAlternateDomains = _webviewIframeAlternateDomains
+ }
+
+ return {
+ ...getBulkEditServiceOverride(),
+ [IViewsService.toString()]: new SyncDescriptor(ViewsService, [], false),
+ [IViewDescriptorService.toString()]: new SyncDescriptor(ViewDescriptorService, [], true),
+ [IActivityService.toString()]: new SyncDescriptor(ActivityService, [], true),
+ [IPaneCompositePartService.toString()]: new SyncDescriptor(PaneCompositePartService, [], true),
+ [IHoverService.toString()]: new SyncDescriptor(HoverService, [], true),
+
+ [ICodeEditorService.toString()]: new SyncDescriptor(CodeEditorService, [], true),
+ [ITextEditorService.toString()]: new SyncDescriptor(TextEditorService, [], false),
+ [IEditorResolverService.toString()]: new SyncDescriptor(EditorResolverService, [], false),
+ [IBreadcrumbsService.toString()]: new SyncDescriptor(BreadcrumbsService, [], true),
+ [IContextViewService.toString()]: new SyncDescriptor(ContextViewService, [], true),
+ [IUntitledTextEditorService.toString()]: new SyncDescriptor(UntitledTextEditorService, [], true),
+ [IHistoryService.toString()]: new SyncDescriptor(HistoryService, [], false),
+ [ICustomEditorService.toString()]: new SyncDescriptor(CustomEditorService, [], true),
+ [IWebviewService.toString()]: new SyncDescriptor(WebviewService, [], true),
+ [IWebviewViewService.toString()]: new SyncDescriptor(WebviewViewService, [], true),
+ [IWebviewWorkbenchService.toString()]: new SyncDescriptor(WebviewEditorService, [], true),
+ [IProgressService.toString()]: new SyncDescriptor(ProgressService, [], true),
+ [IAuxiliaryWindowService.toString()]: new SyncDescriptor(BrowserAuxiliaryWindowService, [], true),
+ [IEditorPaneService.toString()]: new SyncDescriptor(EditorPaneService, [], true),
+ [ICustomEditorLabelService.toString()]: new SyncDescriptor(CustomEditorLabelService, [], true)
+ }
+}
+
+export default getServiceOverride
diff --git a/src/service-override/views.ts b/src/service-override/views.ts
index f952dbbb..bdc0adf3 100644
--- a/src/service-override/views.ts
+++ b/src/service-override/views.ts
@@ -3,8 +3,6 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'
import { IViewDescriptorService, ViewContainerLocation } from 'vs/workbench/common/views'
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'
import { SidebarPart } from 'vs/workbench/browser/parts/sidebar/sidebarPart'
-import { ViewDescriptorService } from 'vs/workbench/services/views/browser/viewDescriptorService'
-import { IActivityService } from 'vs/workbench/services/activity/common/activity'
import { ActivityService } from 'vs/workbench/services/activity/browser/activityService'
import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite'
import { ActivitybarPart } from 'vs/workbench/browser/parts/activitybar/activitybarPart'
@@ -15,32 +13,13 @@ import { Part } from 'vs/workbench/browser/part'
import { EditorPart } from 'vs/workbench/browser/parts/editor/editorPart'
import { GroupOrientation, GroupsOrder, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'
import { IEditorService } from 'vs/workbench/services/editor/common/editorService'
-import { IEditorResolverService } from 'vs/workbench/services/editor/common/editorResolverService'
-import { EditorResolverService } from 'vs/workbench/services/editor/browser/editorResolverService'
-import { BreadcrumbsService, IBreadcrumbsService } from 'vs/workbench/browser/parts/editor/breadcrumbs'
-import { IContextViewService } from 'vs/platform/contextview/browser/contextView'
-import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'
-import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'
import { GroupIdentifier, IUntypedEditorInput, isResourceEditorInput, pathsToEditors } from 'vs/workbench/common/editor'
import { IEditorOptions } from 'vs/platform/editor/common/editor'
import { IResolvedTextEditorModel } from 'vs/editor/common/services/resolverService'
-import { ITextEditorService, TextEditorService } from 'vs/workbench/services/textfile/common/textEditorService'
-import { CodeEditorService } from 'vs/workbench/services/editor/browser/codeEditorService'
-import { IUntitledTextEditorService, UntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService'
-import { IHistoryService } from 'vs/workbench/services/history/common/history'
-import { HistoryService } from 'vs/workbench/services/history/browser/historyService'
-import { ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor'
-import { CustomEditorService } from 'vs/workbench/contrib/customEditor/browser/customEditors'
-import { WebviewService } from 'vs/workbench/contrib/webview/browser/webviewService'
-import { IWebviewWorkbenchService, WebviewEditorService } from 'vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService'
-import { IWebviewService } from 'vs/workbench/contrib/webview/browser/webview'
-import { IWebviewViewService, WebviewViewService } from 'vs/workbench/contrib/webviewView/browser/webviewViewService'
import { Parts, Position, positionToString } from 'vs/workbench/services/layout/browser/layoutService'
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'
import { IFileService } from 'vs/platform/files/common/files'
import { ILayoutService } from 'vs/platform/layout/browser/layoutService'
-import { IProgressService } from 'vs/platform/progress/common/progress'
-import { ProgressService } from 'vs/workbench/services/progress/browser/progressService'
import { ILifecycleService, StartupKind } from 'vs/workbench/services/lifecycle/common/lifecycle'
import { AuxiliaryBarPart } from 'vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart'
import { ILogService } from 'vs/platform/log/common/log'
@@ -55,46 +34,14 @@ import { IWorkspaceContextService, WorkbenchState, isTemporaryWorkspace } from '
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'
import { coalesce } from 'vs/base/common/arrays'
import { IWorkingCopyBackupService } from 'vs/workbench/services/workingCopy/common/workingCopyBackup'
-import { PaneCompositePartService } from 'vs/workbench/browser/parts/paneCompositePartService'
import { EditorParts } from 'vs/workbench/browser/parts/editor/editorParts'
-import { BrowserAuxiliaryWindowService, IAuxiliaryWindowService } from 'vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService'
-import { IViewsService } from 'vs/workbench/services/views/common/viewsService'
-import { ViewsService } from 'vs/workbench/services/views/browser/viewsService'
-import { IHoverService } from 'vs/platform/hover/browser/hover'
-import { IEditorPaneService } from 'vs/workbench/services/editor/common/editorPaneService'
-import { EditorPaneService } from 'vs/workbench/services/editor/browser/editorPaneService'
import { HoverService } from 'vs/editor/browser/services/hoverService/hoverService'
-import { CustomEditorLabelService, ICustomEditorLabelService } from 'vs/workbench/services/editor/common/customEditorLabelService'
import { MonacoDelegateEditorGroupsService, MonacoEditorService, OpenEditor } from './tools/editor'
-import getBulkEditServiceOverride from './bulkEdit'
import { LayoutService } from './layout'
import getQuickAccessOverride from './quickaccess'
import getKeybindingsOverride from './keybindings'
-import { changeUrlDomain } from './tools/url'
+import getViewCommonServiceOverride from './viewCommon'
import { onRenderWorkbench } from '../lifecycle'
-import { registerAssets } from '../assets'
-import 'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution'
-import 'vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution'
-import 'vs/workbench/browser/actions/listCommands'
-import 'vscode/src/vs/workbench/browser/parts/views/media/views.css'
-import 'vs/workbench/api/browser/viewsExtensionPoint'
-import 'vs/workbench/browser/parts/editor/editor.contribution'
-import 'vs/workbench/browser/workbench.contribution'
-import 'vs/workbench/contrib/customEditor/browser/customEditor.contribution'
-import 'vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution'
-import 'vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution'
-import 'vs/workbench/contrib/languageStatus/browser/languageStatus.contribution'
-import 'vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution'
-import 'vs/workbench/contrib/webview/browser/webview.contribution'
-import 'vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution'
-import 'vs/workbench/contrib/sash/browser/sash.contribution'
-import 'vs/workbench/contrib/preferences/browser/keyboardLayoutPicker'
-import 'vs/workbench/browser/parts/editor/editor.autosave.contribution'
-import 'vs/workbench/contrib/files/browser/files.editorPane.contribution'
-import 'vs/workbench/contrib/files/browser/fileCommands.save'
-import 'vs/workbench/browser/actions/navigationActions'
-import 'vs/workbench/browser/style'
-import './tools/editorAssets'
export * from './tools/views'
function createPart (id: string, role: string, classes: string[]): HTMLElement {
@@ -240,14 +187,6 @@ class MonacoEditorParts extends MonacoDelegateEditorGroupsService i
}
}
-let webviewIframeAlternateDomains: string | undefined
-registerAssets({
- 'vs/workbench/contrib/webview/browser/pre/service-worker.js': () => changeUrlDomain(new URL('../../vscode/src/vs/workbench/contrib/webview/browser/pre/service-worker.js', import.meta.url).href, webviewIframeAlternateDomains),
- 'vs/workbench/contrib/webview/browser/pre/index.html': () => changeUrlDomain(new URL('../assets/webview/index.html', import.meta.url).href, webviewIframeAlternateDomains),
- 'vs/workbench/contrib/webview/browser/pre/index-no-csp.html': () => changeUrlDomain(new URL('../assets/webview/index-no-csp.html', import.meta.url).href, webviewIframeAlternateDomains),
- 'vs/workbench/contrib/webview/browser/pre/fake.html': () => changeUrlDomain(new URL('../../vscode/src/vs/workbench/contrib/webview/browser/pre/fake.html', import.meta.url).href, webviewIframeAlternateDomains)
-})
-
type InitializationStateTransformer = (state: ILayoutInitializationState) => ILayoutInitializationState
let transformInitializationState: InitializationStateTransformer = state => state
@@ -698,10 +637,6 @@ function getServiceOverride (openEditorFallback?: OpenEditor, _webviewIframeAlte
function getServiceOverride (openEditorFallback?: OpenEditor, _webviewIframeAlternateDomains?: string, restoreEditors?: boolean): IEditorOverrideServices
function getServiceOverride (openEditorFallback?: OpenEditor, _webviewIframeAlternateDomains?: string, initializationState?: InitializationStateTransformer): IEditorOverrideServices
function getServiceOverride (openEditorFallback?: OpenEditor, _webviewIframeAlternateDomains?: string, initializationStateOrRestoreEditors?: boolean | InitializationStateTransformer): IEditorOverrideServices {
- if (_webviewIframeAlternateDomains != null) {
- webviewIframeAlternateDomains = _webviewIframeAlternateDomains
- }
-
if (initializationStateOrRestoreEditors != null) {
transformInitializationState = typeof initializationStateOrRestoreEditors === 'boolean'
? (state: ILayoutInitializationState) => ({
@@ -715,7 +650,7 @@ function getServiceOverride (openEditorFallback?: OpenEditor, _webviewIframeAlte
}
return {
- ...getBulkEditServiceOverride(),
+ ...getViewCommonServiceOverride(_webviewIframeAlternateDomains),
...getQuickAccessOverride({
isKeybindingConfigurationVisible: isEditorPartVisible,
shouldUseGlobalPicker: isEditorPartVisible
@@ -723,29 +658,8 @@ function getServiceOverride (openEditorFallback?: OpenEditor, _webviewIframeAlte
...getKeybindingsOverride({
shouldUseGlobalKeybindings: isEditorPartVisible
}),
- [IViewsService.toString()]: new SyncDescriptor(ViewsService, [], false),
- [IViewDescriptorService.toString()]: new SyncDescriptor(ViewDescriptorService, [], true),
- [IActivityService.toString()]: new SyncDescriptor(ActivityService, [], true),
- [IPaneCompositePartService.toString()]: new SyncDescriptor(PaneCompositePartService, [], true),
- [IHoverService.toString()]: new SyncDescriptor(HoverService, [], true),
-
- [ICodeEditorService.toString()]: new SyncDescriptor(CodeEditorService, [], true),
- [ITextEditorService.toString()]: new SyncDescriptor(TextEditorService, [], false),
[IEditorGroupsService.toString()]: new SyncDescriptor(MonacoEditorParts, [], false),
- [IEditorService.toString()]: new SyncDescriptor(MonacoEditorService, [openEditorFallback, isEditorPartVisible], false),
- [IEditorResolverService.toString()]: new SyncDescriptor(EditorResolverService, [], false),
- [IBreadcrumbsService.toString()]: new SyncDescriptor(BreadcrumbsService, [], true),
- [IContextViewService.toString()]: new SyncDescriptor(ContextViewService, [], true),
- [IUntitledTextEditorService.toString()]: new SyncDescriptor(UntitledTextEditorService, [], true),
- [IHistoryService.toString()]: new SyncDescriptor(HistoryService, [], false),
- [ICustomEditorService.toString()]: new SyncDescriptor(CustomEditorService, [], true),
- [IWebviewService.toString()]: new SyncDescriptor(WebviewService, [], true),
- [IWebviewViewService.toString()]: new SyncDescriptor(WebviewViewService, [], true),
- [IWebviewWorkbenchService.toString()]: new SyncDescriptor(WebviewEditorService, [], true),
- [IProgressService.toString()]: new SyncDescriptor(ProgressService, [], true),
- [IAuxiliaryWindowService.toString()]: new SyncDescriptor(BrowserAuxiliaryWindowService, [], true),
- [IEditorPaneService.toString()]: new SyncDescriptor(EditorPaneService, [], true),
- [ICustomEditorLabelService.toString()]: new SyncDescriptor(CustomEditorLabelService, [], true)
+ [IEditorService.toString()]: new SyncDescriptor(MonacoEditorService, [openEditorFallback, isEditorPartVisible], false)
}
}
diff --git a/src/service-override/workbench.ts b/src/service-override/workbench.ts
index 837f45b2..56bb7181 100644
--- a/src/service-override/workbench.ts
+++ b/src/service-override/workbench.ts
@@ -5,37 +5,8 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService'
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'
-import { IViewsService } from 'vs/workbench/services/views/common/viewsService'
-import { IViewDescriptorService } from 'vs/workbench/common/views'
-import { ViewDescriptorService } from 'vs/workbench/services/views/browser/viewDescriptorService'
-import { IActivityService } from 'vs/workbench/services/activity/common/activity'
-import { ActivityService } from 'vs/workbench/services/activity/browser/activityService'
-import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite'
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'
import { IEditorService } from 'vs/workbench/services/editor/common/editorService'
-import { IEditorResolverService } from 'vs/workbench/services/editor/common/editorResolverService'
-import { EditorResolverService } from 'vs/workbench/services/editor/browser/editorResolverService'
-import { BreadcrumbsService, IBreadcrumbsService } from 'vs/workbench/browser/parts/editor/breadcrumbs'
-import { IContextViewService } from 'vs/platform/contextview/browser/contextView'
-import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'
-import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService'
-import { ITextEditorService, TextEditorService } from 'vs/workbench/services/textfile/common/textEditorService'
-import { CodeEditorService } from 'vs/workbench/services/editor/browser/codeEditorService'
-import { IUntitledTextEditorService, UntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService'
-import { IHistoryService } from 'vs/workbench/services/history/common/history'
-import { HistoryService } from 'vs/workbench/services/history/browser/historyService'
-import { ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor'
-import { CustomEditorService } from 'vs/workbench/contrib/customEditor/browser/customEditors'
-import { WebviewService } from 'vs/workbench/contrib/webview/browser/webviewService'
-import { IWebviewWorkbenchService, WebviewEditorService } from 'vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService'
-import { IWebviewService } from 'vs/workbench/contrib/webview/browser/webview'
-import { IWebviewViewService, WebviewViewService } from 'vs/workbench/contrib/webviewView/browser/webviewViewService'
-import { IProgressService } from 'vs/platform/progress/common/progress'
-import { ProgressService } from 'vs/workbench/services/progress/browser/progressService'
-import { PaneCompositePartService } from 'vs/workbench/browser/parts/paneCompositePartService'
-import { BrowserAuxiliaryWindowService, IAuxiliaryWindowService } from 'vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService'
-import { ViewsService } from 'vs/workbench/services/views/browser/viewsService'
-import { IHoverService } from 'vs/platform/hover/browser/hover'
import { EditorService } from 'vs/workbench/services/editor/browser/editorService'
import { EditorParts } from 'vs/workbench/browser/parts/editor/editorParts'
import { onUnexpectedError } from 'vs/base/common/errors'
@@ -43,52 +14,16 @@ import { BrowserWindow } from 'vs/workbench/browser/window'
import { detectFullscreen } from 'vs/base/browser/dom'
import { mainWindow } from 'vs/base/browser/window'
import { setFullscreen } from 'vs/base/browser/browser'
-import { EditorPaneService } from 'vs/workbench/services/editor/browser/editorPaneService'
-import { IEditorPaneService } from 'vs/workbench/services/editor/common/editorPaneService'
-import { CustomEditorLabelService, ICustomEditorLabelService } from 'vs/workbench/services/editor/common/customEditorLabelService'
-import { HoverService } from './views'
import getKeybindingsOverride from './keybindings'
import getQuickAccessOverride from './quickaccess'
-import getBulkEditServiceOverride from './bulkEdit'
-import { changeUrlDomain } from './tools/url'
import getTitleBarServiceOverride from './viewTitleBar'
import getStatusBarServiceOverride from './viewStatusBar'
import getBannerServiceOverride from './viewBanner'
+import getViewCommonServiceOverride from './viewCommon'
import { getWorkbenchContainer } from '../workbench'
import { onLayout, onRenderWorkbench } from '../lifecycle'
-import { registerAssets } from '../assets'
-import 'vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution'
-import 'vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution'
-import 'vs/workbench/browser/actions/listCommands'
-import 'vscode/src/vs/workbench/browser/parts/views/media/views.css'
-import 'vs/workbench/api/browser/viewsExtensionPoint'
-import 'vs/workbench/browser/parts/editor/editor.contribution'
-import 'vs/workbench/browser/workbench.contribution'
-import 'vs/workbench/contrib/customEditor/browser/customEditor.contribution'
-import 'vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution'
-import 'vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution'
-import 'vs/workbench/contrib/languageStatus/browser/languageStatus.contribution'
-import 'vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution'
-import 'vs/workbench/contrib/webview/browser/webview.contribution'
-import 'vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution'
-import 'vs/workbench/contrib/sash/browser/sash.contribution'
-import 'vs/workbench/contrib/preferences/browser/keyboardLayoutPicker'
-import 'vs/workbench/browser/parts/editor/editor.autosave.contribution'
-import 'vs/workbench/contrib/files/browser/files.editorPane.contribution'
-import 'vs/workbench/contrib/files/browser/fileCommands.save'
-import 'vs/workbench/browser/actions/navigationActions'
-import 'vs/workbench/browser/style'
-import './tools/editorAssets'
export * from './tools/views'
-let webviewIframeAlternateDomains: string | undefined
-registerAssets({
- 'vs/workbench/contrib/webview/browser/pre/service-worker.js': () => changeUrlDomain(new URL('../../vscode/src/vs/workbench/contrib/webview/browser/pre/service-worker.js', import.meta.url).href, webviewIframeAlternateDomains),
- 'vs/workbench/contrib/webview/browser/pre/index.html': () => changeUrlDomain(new URL('../assets/webview/index.html', import.meta.url).href, webviewIframeAlternateDomains),
- 'vs/workbench/contrib/webview/browser/pre/index-no-csp.html': () => changeUrlDomain(new URL('../assets/webview/index-no-csp.html', import.meta.url).href, webviewIframeAlternateDomains),
- 'vs/workbench/contrib/webview/browser/pre/fake.html': () => changeUrlDomain(new URL('../../vscode/src/vs/workbench/contrib/webview/browser/pre/fake.html', import.meta.url).href, webviewIframeAlternateDomains)
-})
-
class CustomWorkbench extends Workbench {
constructor (
options: IWorkbenchOptions | undefined,
@@ -133,12 +68,8 @@ onRenderWorkbench(async accessor => {
})
function getServiceOverride (options?: IWorkbenchOptions, _webviewIframeAlternateDomains?: string): IEditorOverrideServices {
- if (_webviewIframeAlternateDomains != null) {
- webviewIframeAlternateDomains = _webviewIframeAlternateDomains
- }
-
return {
- ...getBulkEditServiceOverride(),
+ ...getViewCommonServiceOverride(_webviewIframeAlternateDomains),
...getQuickAccessOverride({
isKeybindingConfigurationVisible: () => true,
shouldUseGlobalPicker: () => true
@@ -147,28 +78,8 @@ function getServiceOverride (options?: IWorkbenchOptions, _webviewIframeAlternat
shouldUseGlobalKeybindings: () => true
}),
[IWorkbenchLayoutService.toString()]: new SyncDescriptor(CustomWorkbench, [options], false),
- [IViewsService.toString()]: new SyncDescriptor(ViewsService, [], false),
- [IViewDescriptorService.toString()]: new SyncDescriptor(ViewDescriptorService, [], true),
- [IActivityService.toString()]: new SyncDescriptor(ActivityService, [], true),
- [IPaneCompositePartService.toString()]: new SyncDescriptor(PaneCompositePartService, [], false),
- [IHoverService.toString()]: new SyncDescriptor(HoverService, [], true),
- [ICodeEditorService.toString()]: new SyncDescriptor(CodeEditorService, [], true),
- [ITextEditorService.toString()]: new SyncDescriptor(TextEditorService, [], false),
[IEditorGroupsService.toString()]: new SyncDescriptor(EditorParts, [], false),
[IEditorService.toString()]: new SyncDescriptor(EditorService, [undefined], false),
- [IEditorResolverService.toString()]: new SyncDescriptor(EditorResolverService, [], false),
- [IBreadcrumbsService.toString()]: new SyncDescriptor(BreadcrumbsService, [], true),
- [IContextViewService.toString()]: new SyncDescriptor(ContextViewService, [], true),
- [IUntitledTextEditorService.toString()]: new SyncDescriptor(UntitledTextEditorService, [], true),
- [IHistoryService.toString()]: new SyncDescriptor(HistoryService, [], false),
- [ICustomEditorService.toString()]: new SyncDescriptor(CustomEditorService, [], true),
- [IWebviewService.toString()]: new SyncDescriptor(WebviewService, [], true),
- [IWebviewViewService.toString()]: new SyncDescriptor(WebviewViewService, [], true),
- [IWebviewWorkbenchService.toString()]: new SyncDescriptor(WebviewEditorService, [], true),
- [IProgressService.toString()]: new SyncDescriptor(ProgressService, [], true),
- [IAuxiliaryWindowService.toString()]: new SyncDescriptor(BrowserAuxiliaryWindowService, [], true),
- [IEditorPaneService.toString()]: new SyncDescriptor(EditorPaneService, [], true),
- [ICustomEditorLabelService.toString()]: new SyncDescriptor(CustomEditorLabelService, [], true),
...getTitleBarServiceOverride(),
...getStatusBarServiceOverride(),
...getBannerServiceOverride()