@lvce-editor/extension-host-worker 8.20.0 → 8.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extension-api/index.js +938 -33
- package/dist/extension-api/parts/Activation/Activation.js +4 -2
- package/dist/extension-api/parts/CommandRegistry/CommandRegistry.js +3 -1
- package/dist/extension-api/parts/CompletionProviderRegistry/CompletionProviderRegistry.js +29 -2
- package/dist/extension-api/parts/DiagnosticProviderRegistry/DiagnosticProviderRegistry.js +4 -1
- package/dist/extension-api/parts/ExecuteCommand/ExecuteCommand.js +2 -2
- package/dist/extension-api/parts/ExtensionApiCommandMap/ExtensionApiCommandMap.js +17 -1
- package/dist/extension-api/parts/FormattingProviderRegistry/FormattingProviderRegistry.js +4 -1
- package/dist/extension-api/parts/HoverProviderRegistry/HoverProviderRegistry.js +4 -1
- package/dist/extension-api/parts/NotifyStatusBarChange/NotifyStatusBarChange.js +2 -2
- package/dist/extension-api/parts/OutputChannel/OutputChannel.js +71 -0
- package/dist/extension-api/parts/OutputChannelHandle/OutputChannelHandle.js +0 -0
- package/dist/extension-api/parts/OutputChannelRegistrySnapshot/OutputChannelRegistrySnapshot.js +0 -0
- package/dist/extension-api/parts/QuickPick/QuickPick.js +2 -2
- package/dist/extension-api/parts/RegisteredOutputChannel/RegisteredOutputChannel.js +0 -0
- package/dist/extension-api/parts/StatusBarItemProviderRegistry/StatusBarItemProviderRegistry.js +3 -1
- package/dist/extension-api/parts/View/View.js +0 -0
- package/dist/extension-api/parts/ViewRegistry/ViewRegistry.js +148 -0
- package/dist/extensionHostWorkerMain.js +112 -41
- package/extension-api/dist/index.d.ts +6 -0
- package/extension-api/dist/index.js +2 -0
- package/extension-api/dist/parts/Activation/Activation.js +4 -2
- package/extension-api/dist/parts/CommandMap/CommandMap.d.ts +7 -0
- package/extension-api/dist/parts/CommandRegistry/CommandRegistry.js +3 -1
- package/extension-api/dist/parts/CommandRegistrySnapshot/CommandRegistrySnapshot.d.ts +3 -2
- package/extension-api/dist/parts/CompletionProviderRegistry/CompletionProviderRegistry.js +30 -2
- package/extension-api/dist/parts/CompletionProviderRegistrySnapshot/CompletionProviderRegistrySnapshot.d.ts +4 -2
- package/extension-api/dist/parts/DiagnosticProviderRegistry/DiagnosticProviderRegistry.js +4 -1
- package/extension-api/dist/parts/DiagnosticProviderRegistrySnapshot/DiagnosticProviderRegistrySnapshot.d.ts +4 -2
- package/extension-api/dist/parts/ExecuteCommand/ExecuteCommand.js +2 -2
- package/extension-api/dist/parts/ExtensionApiCommandMap/ExtensionApiCommandMap.d.ts +7 -0
- package/extension-api/dist/parts/ExtensionApiCommandMap/ExtensionApiCommandMap.js +9 -0
- package/extension-api/dist/parts/ExtensionApiWorkerCommandMap/ExtensionApiWorkerCommandMap.d.ts +7 -0
- package/extension-api/dist/parts/FormattingProviderRegistry/FormattingProviderRegistry.js +4 -1
- package/extension-api/dist/parts/FormattingProviderRegistrySnapshot/FormattingProviderRegistrySnapshot.d.ts +4 -2
- package/extension-api/dist/parts/HoverProviderRegistry/HoverProviderRegistry.js +4 -1
- package/extension-api/dist/parts/HoverProviderRegistrySnapshot/HoverProviderRegistrySnapshot.d.ts +4 -2
- package/extension-api/dist/parts/NotifyStatusBarChange/NotifyStatusBarChange.js +2 -2
- package/extension-api/dist/parts/OutputChannel/OutputChannel.d.ts +9 -0
- package/extension-api/dist/parts/OutputChannel/OutputChannel.js +64 -0
- package/extension-api/dist/parts/OutputChannelHandle/OutputChannelHandle.d.ts +6 -0
- package/extension-api/dist/parts/OutputChannelHandle/OutputChannelHandle.js +1 -0
- package/extension-api/dist/parts/OutputChannelRegistrySnapshot/OutputChannelRegistrySnapshot.d.ts +4 -0
- package/extension-api/dist/parts/OutputChannelRegistrySnapshot/OutputChannelRegistrySnapshot.js +1 -0
- package/extension-api/dist/parts/QuickPick/QuickPick.js +2 -2
- package/extension-api/dist/parts/RegisteredOutputChannel/RegisteredOutputChannel.d.ts +3 -0
- package/extension-api/dist/parts/RegisteredOutputChannel/RegisteredOutputChannel.js +1 -0
- package/extension-api/dist/parts/StatusBarItemProviderRegistry/StatusBarItemProviderRegistry.js +3 -1
- package/extension-api/dist/parts/StatusBarItemProviderRegistrySnapshot/StatusBarItemProviderRegistrySnapshot.d.ts +3 -2
- package/extension-api/dist/parts/View/View.d.ts +43 -0
- package/extension-api/dist/parts/View/View.js +1 -0
- package/extension-api/dist/parts/ViewRegistry/ViewRegistry.d.ts +10 -0
- package/extension-api/dist/parts/ViewRegistry/ViewRegistry.js +138 -0
- package/extension-api/package.json +4 -2
- package/extension-api/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/extension-api/parts/Rpc/Rpc.js +0 -14
- package/extension-api/dist/parts/Rpc/Rpc.d.ts +0 -3
- package/extension-api/dist/parts/Rpc/Rpc.js +0 -10
|
@@ -1407,7 +1407,7 @@ const ensureError = input => {
|
|
|
1407
1407
|
return input;
|
|
1408
1408
|
};
|
|
1409
1409
|
|
|
1410
|
-
const state$
|
|
1410
|
+
const state$c = {
|
|
1411
1411
|
/** @type{any[]} */
|
|
1412
1412
|
onDidChangeTextDocumentListeners: [],
|
|
1413
1413
|
/** @type{any[]} */
|
|
@@ -1417,19 +1417,19 @@ const state$b = {
|
|
|
1417
1417
|
textDocuments: Object.create(null)
|
|
1418
1418
|
};
|
|
1419
1419
|
const setDocument = (textDocumentId, textDocument) => {
|
|
1420
|
-
state$
|
|
1420
|
+
state$c.textDocuments[textDocumentId] = textDocument;
|
|
1421
1421
|
};
|
|
1422
1422
|
const getDidOpenListeners = () => {
|
|
1423
|
-
return state$
|
|
1423
|
+
return state$c.onDidSaveTextDocumentListeners;
|
|
1424
1424
|
};
|
|
1425
1425
|
const getWillChangeListeners = () => {
|
|
1426
|
-
return state$
|
|
1426
|
+
return state$c.onWillChangeEditorListeners;
|
|
1427
1427
|
};
|
|
1428
1428
|
const getDidChangeListeners = () => {
|
|
1429
|
-
return state$
|
|
1429
|
+
return state$c.onDidChangeTextDocumentListeners;
|
|
1430
1430
|
};
|
|
1431
1431
|
const getDocument = textDocumentId => {
|
|
1432
|
-
return state$
|
|
1432
|
+
return state$c.textDocuments[textDocumentId];
|
|
1433
1433
|
};
|
|
1434
1434
|
|
|
1435
1435
|
const getOffset$1 = (textDocument, position) => {
|
|
@@ -1926,7 +1926,7 @@ const executeOrganizeImports = async uid => {
|
|
|
1926
1926
|
return edits;
|
|
1927
1927
|
};
|
|
1928
1928
|
|
|
1929
|
-
const state$
|
|
1929
|
+
const state$b = {
|
|
1930
1930
|
commands: Object.create(null)
|
|
1931
1931
|
};
|
|
1932
1932
|
const getCommandDisplay = command => {
|
|
@@ -1949,10 +1949,10 @@ const registerCommand = command => {
|
|
|
1949
1949
|
if (!command.execute) {
|
|
1950
1950
|
throw new Error('command is missing execute function');
|
|
1951
1951
|
}
|
|
1952
|
-
if (command.id in state$
|
|
1952
|
+
if (command.id in state$b.commands) {
|
|
1953
1953
|
throw new Error(`command cannot be registered multiple times`);
|
|
1954
1954
|
}
|
|
1955
|
-
state$
|
|
1955
|
+
state$b.commands[command.id] = command;
|
|
1956
1956
|
} catch (error) {
|
|
1957
1957
|
const commandDisplayId = getCommandDisplay(command);
|
|
1958
1958
|
throw new VError(error, `Failed to register command${commandDisplayId}`);
|
|
@@ -1960,7 +1960,7 @@ const registerCommand = command => {
|
|
|
1960
1960
|
};
|
|
1961
1961
|
const executeCommand$1 = async (id, ...args) => {
|
|
1962
1962
|
try {
|
|
1963
|
-
const command = state$
|
|
1963
|
+
const command = state$b.commands[id];
|
|
1964
1964
|
if (!command) {
|
|
1965
1965
|
throw new Error(`command ${id} not found`);
|
|
1966
1966
|
}
|
|
@@ -1975,7 +1975,7 @@ const executeCommand$1 = async (id, ...args) => {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
};
|
|
1977
1977
|
const getRegisteredCommandIds$1 = () => {
|
|
1978
|
-
return Object.values(state$
|
|
1978
|
+
return Object.values(state$b.commands).map(command => command.id);
|
|
1979
1979
|
};
|
|
1980
1980
|
|
|
1981
1981
|
const {
|
|
@@ -2015,25 +2015,25 @@ const getRegisteredCompletionProviderIds$1 = () => {
|
|
|
2015
2015
|
return getProviders$3().map(provider => provider.id);
|
|
2016
2016
|
};
|
|
2017
2017
|
|
|
2018
|
-
const state$
|
|
2018
|
+
const state$a = {
|
|
2019
2019
|
configuration: Object.create(null)
|
|
2020
2020
|
};
|
|
2021
2021
|
const getConfiguration = key => {
|
|
2022
|
-
return state$
|
|
2022
|
+
return state$a.configuration[key] ?? '';
|
|
2023
2023
|
};
|
|
2024
2024
|
const setConfigurations = preferences => {
|
|
2025
|
-
state$
|
|
2025
|
+
state$a.configuration = preferences;
|
|
2026
2026
|
};
|
|
2027
2027
|
|
|
2028
2028
|
const {
|
|
2029
2029
|
invoke: invoke$2
|
|
2030
2030
|
} = DebugWorker;
|
|
2031
2031
|
|
|
2032
|
-
const state$
|
|
2032
|
+
const state$9 = {
|
|
2033
2033
|
debugProviderMap: Object.create(null)
|
|
2034
2034
|
};
|
|
2035
2035
|
const getDebugProvider = id => {
|
|
2036
|
-
const provider = state$
|
|
2036
|
+
const provider = state$9.debugProviderMap[id];
|
|
2037
2037
|
if (!provider) {
|
|
2038
2038
|
// @ts-ignore
|
|
2039
2039
|
throw new VError(`no debug provider "${id}" found`);
|
|
@@ -2044,7 +2044,7 @@ const registerDebugProvider = debugProvider => {
|
|
|
2044
2044
|
if (!debugProvider.id) {
|
|
2045
2045
|
throw new Error('Failed to register debug system provider: missing id');
|
|
2046
2046
|
}
|
|
2047
|
-
state$
|
|
2047
|
+
state$9.debugProviderMap[debugProvider.id] = debugProvider;
|
|
2048
2048
|
};
|
|
2049
2049
|
const handlePaused = async params => {
|
|
2050
2050
|
// @ts-ignore
|
|
@@ -3081,23 +3081,25 @@ const getRemoteUrlForWebView = async (uri, options = {}) => {
|
|
|
3081
3081
|
const isFileProtocol = protocol => {
|
|
3082
3082
|
return !protocol || protocol === 'file';
|
|
3083
3083
|
};
|
|
3084
|
+
const getRemotePath = uri => {
|
|
3085
|
+
const withoutPrefix = uri.startsWith('file://') ? uri.slice('file://'.length) : uri;
|
|
3086
|
+
const normalized = withoutPrefix.replaceAll('\\', '/');
|
|
3087
|
+
if (normalized.startsWith('/')) {
|
|
3088
|
+
return normalized;
|
|
3089
|
+
}
|
|
3090
|
+
return `/${normalized}`;
|
|
3091
|
+
};
|
|
3084
3092
|
const getRemoteUrlSync = uri => {
|
|
3085
3093
|
const protocol = getProtocol(uri);
|
|
3086
3094
|
if (protocol === 'http' || protocol === 'https') {
|
|
3087
3095
|
return uri;
|
|
3088
3096
|
}
|
|
3089
|
-
const
|
|
3097
|
+
const remotePath = getRemotePath(uri);
|
|
3090
3098
|
if (platform === Remote && isFileProtocol(protocol)) {
|
|
3091
|
-
|
|
3092
|
-
return `/remote${withoutPrefix}`;
|
|
3093
|
-
}
|
|
3094
|
-
return `/remote/${withoutPrefix}`;
|
|
3099
|
+
return `/remote${remotePath}`;
|
|
3095
3100
|
}
|
|
3096
3101
|
if (platform === Electron && isFileProtocol(protocol)) {
|
|
3097
|
-
|
|
3098
|
-
return `/remote${withoutPrefix}`;
|
|
3099
|
-
}
|
|
3100
|
-
return `/remote/${withoutPrefix}`;
|
|
3102
|
+
return `/remote${remotePath}`;
|
|
3101
3103
|
}
|
|
3102
3104
|
return '';
|
|
3103
3105
|
};
|
|
@@ -3194,14 +3196,14 @@ const getExtensions = () => {
|
|
|
3194
3196
|
return get$6();
|
|
3195
3197
|
};
|
|
3196
3198
|
|
|
3197
|
-
const state$
|
|
3199
|
+
const state$8 = {
|
|
3198
3200
|
providers: Object.create(null)
|
|
3199
3201
|
};
|
|
3200
3202
|
const registerSourceControlProvider = provider => {
|
|
3201
|
-
state$
|
|
3203
|
+
state$8.providers[provider.id] = provider;
|
|
3202
3204
|
};
|
|
3203
3205
|
const getProvider$1 = providerId => {
|
|
3204
|
-
const provider = state$
|
|
3206
|
+
const provider = state$8.providers[providerId];
|
|
3205
3207
|
if (!provider) {
|
|
3206
3208
|
throw new Error('no source control provider found');
|
|
3207
3209
|
}
|
|
@@ -3269,7 +3271,7 @@ const getFeatures = async providerId => {
|
|
|
3269
3271
|
return {};
|
|
3270
3272
|
};
|
|
3271
3273
|
const add = async path => {
|
|
3272
|
-
const provider = Object.values(state$
|
|
3274
|
+
const provider = Object.values(state$8.providers)[0];
|
|
3273
3275
|
if (!provider) {
|
|
3274
3276
|
return;
|
|
3275
3277
|
}
|
|
@@ -3277,7 +3279,7 @@ const add = async path => {
|
|
|
3277
3279
|
await provider.add(path);
|
|
3278
3280
|
};
|
|
3279
3281
|
const discard = async path => {
|
|
3280
|
-
const provider = Object.values(state$
|
|
3282
|
+
const provider = Object.values(state$8.providers)[0];
|
|
3281
3283
|
if (!provider) {
|
|
3282
3284
|
return;
|
|
3283
3285
|
}
|
|
@@ -3287,7 +3289,7 @@ const discard = async path => {
|
|
|
3287
3289
|
const getEnabledProviderIds = async (scheme, root) => {
|
|
3288
3290
|
string(scheme);
|
|
3289
3291
|
string(root);
|
|
3290
|
-
const providers = Object.values(state$
|
|
3292
|
+
const providers = Object.values(state$8.providers);
|
|
3291
3293
|
const enabledIds = [];
|
|
3292
3294
|
for (const provider of providers) {
|
|
3293
3295
|
// @ts-ignore
|
|
@@ -3321,7 +3323,7 @@ const getIconDefinitions = async providerId => {
|
|
|
3321
3323
|
return [];
|
|
3322
3324
|
};
|
|
3323
3325
|
const getFileDecorations = async (providerId, uris) => {
|
|
3324
|
-
const provider = state$
|
|
3326
|
+
const provider = state$8.providers[providerId];
|
|
3325
3327
|
// @ts-ignore
|
|
3326
3328
|
if (!provider || !provider.getFileDecorations) {
|
|
3327
3329
|
return [];
|
|
@@ -3332,7 +3334,7 @@ const getFileDecorations = async (providerId, uris) => {
|
|
|
3332
3334
|
};
|
|
3333
3335
|
|
|
3334
3336
|
const getStatusBarItems = async () => {
|
|
3335
|
-
const providers = Object.values(state$
|
|
3337
|
+
const providers = Object.values(state$8.providers);
|
|
3336
3338
|
const statusBarItems = [];
|
|
3337
3339
|
for (const provider of providers) {
|
|
3338
3340
|
// @ts-ignore
|
|
@@ -3344,7 +3346,7 @@ const getStatusBarItems = async () => {
|
|
|
3344
3346
|
return statusBarItems;
|
|
3345
3347
|
};
|
|
3346
3348
|
const getStatusBarItems2 = async () => {
|
|
3347
|
-
const sourceProviders = Object.values(state$
|
|
3349
|
+
const sourceProviders = Object.values(state$8.providers);
|
|
3348
3350
|
const statusBarItems = [];
|
|
3349
3351
|
for (const provider of sourceProviders) {
|
|
3350
3352
|
// @ts-ignore
|
|
@@ -3458,7 +3460,7 @@ const {
|
|
|
3458
3460
|
}
|
|
3459
3461
|
});
|
|
3460
3462
|
|
|
3461
|
-
const state$
|
|
3463
|
+
const state$7 = {
|
|
3462
3464
|
textSearchProviders: Object.create(null)
|
|
3463
3465
|
};
|
|
3464
3466
|
const registerTextSearchProvider = textSearchProvider => {
|
|
@@ -3469,14 +3471,14 @@ const registerTextSearchProvider = textSearchProvider => {
|
|
|
3469
3471
|
if (!textSearchProvider.scheme) {
|
|
3470
3472
|
throw new Error('textSearchProvider is missing scheme');
|
|
3471
3473
|
}
|
|
3472
|
-
state$
|
|
3474
|
+
state$7.textSearchProviders[textSearchProvider.scheme] = textSearchProvider;
|
|
3473
3475
|
} catch (error) {
|
|
3474
3476
|
throw new VError(error, 'Failed to register text search provider');
|
|
3475
3477
|
}
|
|
3476
3478
|
};
|
|
3477
3479
|
const executeTextSearchProvider = async (scheme, query) => {
|
|
3478
3480
|
try {
|
|
3479
|
-
const textSearchProvider = state$
|
|
3481
|
+
const textSearchProvider = state$7.textSearchProviders[scheme];
|
|
3480
3482
|
if (!textSearchProvider) {
|
|
3481
3483
|
throw new Error(`No text search provider for ${scheme} found`);
|
|
3482
3484
|
}
|
|
@@ -3508,6 +3510,45 @@ const {
|
|
|
3508
3510
|
}
|
|
3509
3511
|
});
|
|
3510
3512
|
|
|
3513
|
+
const state$6 = {
|
|
3514
|
+
views: Object.create(null)
|
|
3515
|
+
};
|
|
3516
|
+
const getViewDisplay = view => {
|
|
3517
|
+
if (view && typeof view.id === 'string') {
|
|
3518
|
+
return ` ${view.id}`;
|
|
3519
|
+
}
|
|
3520
|
+
return '';
|
|
3521
|
+
};
|
|
3522
|
+
const registerView = view => {
|
|
3523
|
+
try {
|
|
3524
|
+
if (!view) {
|
|
3525
|
+
throw new Error('view is not defined');
|
|
3526
|
+
}
|
|
3527
|
+
if (!view.id) {
|
|
3528
|
+
throw new Error('view is missing id');
|
|
3529
|
+
}
|
|
3530
|
+
if (!view.create) {
|
|
3531
|
+
throw new Error('view is missing create function');
|
|
3532
|
+
}
|
|
3533
|
+
if (view.id in state$6.views) {
|
|
3534
|
+
throw new Error('view cannot be registered multiple times');
|
|
3535
|
+
}
|
|
3536
|
+
state$6.views[view.id] = view;
|
|
3537
|
+
} catch (error) {
|
|
3538
|
+
throw new VError(error, `Failed to register view${getViewDisplay(view)}`);
|
|
3539
|
+
}
|
|
3540
|
+
};
|
|
3541
|
+
const executeViewProvider = async id => {
|
|
3542
|
+
const view = state$6.views[id];
|
|
3543
|
+
if (!view) {
|
|
3544
|
+
throw new Error(`view ${id} not found`);
|
|
3545
|
+
}
|
|
3546
|
+
return view.create();
|
|
3547
|
+
};
|
|
3548
|
+
const getRegisteredViewIds$1 = () => {
|
|
3549
|
+
return Object.values(state$6.views).map(view => view.id);
|
|
3550
|
+
};
|
|
3551
|
+
|
|
3511
3552
|
const webViews = Object.create(null);
|
|
3512
3553
|
const webViewProviders = Object.create(null);
|
|
3513
3554
|
const getProvider = providerId => {
|
|
@@ -3666,6 +3707,7 @@ const api = {
|
|
|
3666
3707
|
executeTabCompletionProvider: executeTabCompletionProvider,
|
|
3667
3708
|
executeTextSearchProvider: executeTextSearchProvider,
|
|
3668
3709
|
executeTypeDefinitionProvider: executeTypeDefinitionProvider,
|
|
3710
|
+
executeViewProvider: executeViewProvider,
|
|
3669
3711
|
exists: existsExternal,
|
|
3670
3712
|
// Errors
|
|
3671
3713
|
FormattingError,
|
|
@@ -3730,6 +3772,8 @@ const api = {
|
|
|
3730
3772
|
registerTextSearchProvider: registerTextSearchProvider,
|
|
3731
3773
|
// Type Definition
|
|
3732
3774
|
registerTypeDefinitionProvider: registerTypeDefinitionProvider,
|
|
3775
|
+
// View
|
|
3776
|
+
registerView: registerView,
|
|
3733
3777
|
// Webview
|
|
3734
3778
|
registerWebViewProvider: registerWebViewProvider,
|
|
3735
3779
|
remove: removeExternal,
|
|
@@ -4264,6 +4308,12 @@ const getManifestDiagnosticProviderIds = extension => {
|
|
|
4264
4308
|
}
|
|
4265
4309
|
return extension.diagnosticProviders.map(provider => provider.id).filter(id => typeof id === 'string');
|
|
4266
4310
|
};
|
|
4311
|
+
const getManifestViewIds = extension => {
|
|
4312
|
+
if (!Array.isArray(extension.views)) {
|
|
4313
|
+
return [];
|
|
4314
|
+
}
|
|
4315
|
+
return extension.views.map(view => view.id).filter(id => typeof id === 'string');
|
|
4316
|
+
};
|
|
4267
4317
|
const assertUniqueIds = (ids, label) => {
|
|
4268
4318
|
const seen = new Set();
|
|
4269
4319
|
for (const id of ids) {
|
|
@@ -4293,6 +4343,10 @@ const getNewRegisteredDiagnosticProviderIds = beforeDiagnosticProviderIds => {
|
|
|
4293
4343
|
const before = new Set(beforeDiagnosticProviderIds);
|
|
4294
4344
|
return getRegisteredDiagnosticProviderIds$1().filter(providerId => !before.has(providerId));
|
|
4295
4345
|
};
|
|
4346
|
+
const getNewRegisteredViewIds = beforeViewIds => {
|
|
4347
|
+
const before = new Set(beforeViewIds);
|
|
4348
|
+
return getRegisteredViewIds$1().filter(viewId => !before.has(viewId));
|
|
4349
|
+
};
|
|
4296
4350
|
const getRegisteredCommandIds = () => {
|
|
4297
4351
|
return getRegisteredCommandIds$1();
|
|
4298
4352
|
};
|
|
@@ -4308,6 +4362,9 @@ const getRegisteredHoverProviderIds = () => {
|
|
|
4308
4362
|
const getRegisteredDiagnosticProviderIds = () => {
|
|
4309
4363
|
return getRegisteredDiagnosticProviderIds$1();
|
|
4310
4364
|
};
|
|
4365
|
+
const getRegisteredViewIds = () => {
|
|
4366
|
+
return getRegisteredViewIds$1();
|
|
4367
|
+
};
|
|
4311
4368
|
const validateIsolatedExtensionContribution = (label, manifestIds, registeredIds) => {
|
|
4312
4369
|
assertUniqueIds(manifestIds, label);
|
|
4313
4370
|
const manifestIdSet = new Set(manifestIds);
|
|
@@ -4363,6 +4420,14 @@ const validateIsolatedExtensionDiagnosticProviders = (extension, beforeDiagnosti
|
|
|
4363
4420
|
const registeredDiagnosticProviderIds = getNewRegisteredDiagnosticProviderIds(beforeDiagnosticProviderIds);
|
|
4364
4421
|
validateIsolatedExtensionContribution('diagnostic provider', manifestDiagnosticProviderIds, registeredDiagnosticProviderIds);
|
|
4365
4422
|
};
|
|
4423
|
+
const validateIsolatedExtensionViews = (extension, beforeViewIds) => {
|
|
4424
|
+
if (!extension.isolated) {
|
|
4425
|
+
return;
|
|
4426
|
+
}
|
|
4427
|
+
const manifestViewIds = getManifestViewIds(extension);
|
|
4428
|
+
const registeredViewIds = getNewRegisteredViewIds(beforeViewIds);
|
|
4429
|
+
validateIsolatedExtensionContribution('view', manifestViewIds, registeredViewIds);
|
|
4430
|
+
};
|
|
4366
4431
|
|
|
4367
4432
|
// TODO make activation timeout configurable or remove it.
|
|
4368
4433
|
// some extension might do workspace indexing which could take some time
|
|
@@ -4389,12 +4454,14 @@ const activateExtension2 = async (extensionId, extension, absolutePath) => {
|
|
|
4389
4454
|
const beforeDiagnosticProviderIds = getRegisteredDiagnosticProviderIds();
|
|
4390
4455
|
const beforeFormattingProviderIds = getRegisteredFormattingProviderIds();
|
|
4391
4456
|
const beforeHoverProviderIds = getRegisteredHoverProviderIds();
|
|
4457
|
+
const beforeViewIds = getRegisteredViewIds();
|
|
4392
4458
|
await Promise.race([activate(extension), rejectAfterTimeout$1(activationTimeout$1, token)]);
|
|
4393
4459
|
validateIsolatedExtensionCommands(extension, beforeCommandIds);
|
|
4394
4460
|
validateIsolatedExtensionCompletionProviders(extension, beforeCompletionProviderIds);
|
|
4395
4461
|
validateIsolatedExtensionDiagnosticProviders(extension, beforeDiagnosticProviderIds);
|
|
4396
4462
|
validateIsolatedExtensionFormattingProviders(extension, beforeFormattingProviderIds);
|
|
4397
4463
|
validateIsolatedExtensionHoverProviders(extension, beforeHoverProviderIds);
|
|
4464
|
+
validateIsolatedExtensionViews(extension, beforeViewIds);
|
|
4398
4465
|
const endTime = performance.now();
|
|
4399
4466
|
const time = endTime - startTime;
|
|
4400
4467
|
update(extensionId, {
|
|
@@ -5322,6 +5389,7 @@ const TextDocumentSyncFull = 'ExtensionHostTextDocument.syncFull';
|
|
|
5322
5389
|
const TextDocumentSyncIncremental = 'ExtensionHostTextDocument.syncIncremental';
|
|
5323
5390
|
const TextSearchExecuteTextSearchProvider = 'ExtensionHostTextSearch.executeTextSearchProvider';
|
|
5324
5391
|
const TypeDefinitionExecuteTypeDefinitionProvider = 'ExtensionHostTypeDefinition.executeTypeDefinitionProvider';
|
|
5392
|
+
const ViewExecute = 'ExtensionHostView.execute';
|
|
5325
5393
|
const WorkspaceSetPath = 'Workspace.setWorkspacePath';
|
|
5326
5394
|
|
|
5327
5395
|
class ExecError extends Error {
|
|
@@ -5792,10 +5860,12 @@ const getWebViewInfo2 = providerId => {
|
|
|
5792
5860
|
};
|
|
5793
5861
|
|
|
5794
5862
|
const getRemoteUrl = uri => {
|
|
5795
|
-
|
|
5796
|
-
|
|
5863
|
+
const withoutPrefix = uri.startsWith('file://') ? uri.slice('file://'.length) : uri;
|
|
5864
|
+
const normalized = withoutPrefix.replaceAll('\\', '/');
|
|
5865
|
+
if (normalized.startsWith('/')) {
|
|
5866
|
+
return `/remote${normalized}`;
|
|
5797
5867
|
}
|
|
5798
|
-
return `/remote/${
|
|
5868
|
+
return `/remote/${normalized}`;
|
|
5799
5869
|
};
|
|
5800
5870
|
|
|
5801
5871
|
const getWebViewsFromExtensions = extensions => {
|
|
@@ -6537,6 +6607,7 @@ const commandMap = {
|
|
|
6537
6607
|
[TextDocumentSyncIncremental]: syncIncremental,
|
|
6538
6608
|
[TextSearchExecuteTextSearchProvider]: executeTextSearchProvider,
|
|
6539
6609
|
[TypeDefinitionExecuteTypeDefinitionProvider]: executeTypeDefinitionProvider,
|
|
6610
|
+
[ViewExecute]: executeViewProvider,
|
|
6540
6611
|
[WorkspaceSetPath]: setWorkspacePath,
|
|
6541
6612
|
'ExtensionHostDebug.evaluate': evaluate,
|
|
6542
6613
|
'ExtensionHostDebug.getCallStack': getCallStack,
|
|
@@ -6,7 +6,10 @@ export { executeCompletionProvider, executeResolveCompletionItemProvider, getCom
|
|
|
6
6
|
export { executeDiagnosticProvider, getDiagnosticProviderRegistrySnapshot, registerDiagnosticProvider, resetDiagnosticProviderRegistry, } from './parts/Diagnostic/Diagnostic.ts';
|
|
7
7
|
export { executeFormattingProvider, getFormattingProviderRegistrySnapshot, registerFormattingProvider, resetFormattingProviderRegistry, } from './parts/Formatting/Formatting.ts';
|
|
8
8
|
export { executeHoverProvider, getHoverProviderRegistrySnapshot, registerHoverProvider, resetHoverProviderRegistry } from './parts/Hover/Hover.ts';
|
|
9
|
+
export { createViewInstance, dispatchViewEvent, disposeViewInstance, executeViewProvider, getViewRegistrySnapshot, registerView, resetViewRegistry, saveViewInstanceState, } from './parts/ViewRegistry/ViewRegistry.ts';
|
|
10
|
+
export { createOutputChannel, getOutputChannelRegistrySnapshot, resetOutputChannelRegistry } from './parts/OutputChannel/OutputChannel.ts';
|
|
9
11
|
export { getStatusBarItemProviderRegistrySnapshot, registerStatusBarItemProvider, resetStatusBarItemProviderRegistry, } from './parts/StatusBar/StatusBar.ts';
|
|
12
|
+
export type { RegisteredView, View, ViewContext, ViewEvent, ViewKind, ViewRegistrySnapshot, ViewRenderResult, VirtualDomViewInstance, } from './parts/View/View.ts';
|
|
10
13
|
export { handleExtensionManagementMessagePort } from './parts/HandleExtensionManagementMessagePort/HandleExtensionManagementMessagePort.ts';
|
|
11
14
|
export type { Command } from './parts/Command/Command.ts';
|
|
12
15
|
export type { CommandCallback } from './parts/CommandCallback/CommandCallback.ts';
|
|
@@ -17,6 +20,9 @@ export type { Disposable } from './parts/Disposable/Disposable.ts';
|
|
|
17
20
|
export type { FormattingEdit, FormattingProvider, FormattingProviderRegistrySnapshot, RegisteredFormattingProvider, } from './parts/Formatting/Formatting.ts';
|
|
18
21
|
export type { HandleExtensionManagementMessagePortOptions } from './parts/HandleExtensionManagementMessagePort/HandleExtensionManagementMessagePort.ts';
|
|
19
22
|
export type { HoverProvider, HoverProviderRegistrySnapshot, HoverResult, RegisteredHoverProvider } from './parts/Hover/Hover.ts';
|
|
23
|
+
export type { OutputChannel } from './parts/OutputChannelHandle/OutputChannelHandle.ts';
|
|
24
|
+
export type { OutputChannelRegistrySnapshot } from './parts/OutputChannelRegistrySnapshot/OutputChannelRegistrySnapshot.ts';
|
|
25
|
+
export type { RegisteredOutputChannel } from './parts/RegisteredOutputChannel/RegisteredOutputChannel.ts';
|
|
20
26
|
export type { QuickPickItem } from './parts/QuickPickItem/QuickPickItem.ts';
|
|
21
27
|
export type { ShowQuickPickOptions } from './parts/ShowQuickPickOptions/ShowQuickPickOptions.ts';
|
|
22
28
|
export type { StatusBarItem, StatusBarItemProvider, StatusBarItemProviderHandle, StatusBarItemProviderRegistrySnapshot, } from './parts/StatusBar/StatusBar.ts';
|
|
@@ -6,5 +6,7 @@ export { executeCompletionProvider, executeResolveCompletionItemProvider, getCom
|
|
|
6
6
|
export { executeDiagnosticProvider, getDiagnosticProviderRegistrySnapshot, registerDiagnosticProvider, resetDiagnosticProviderRegistry, } from "./parts/Diagnostic/Diagnostic.js";
|
|
7
7
|
export { executeFormattingProvider, getFormattingProviderRegistrySnapshot, registerFormattingProvider, resetFormattingProviderRegistry, } from "./parts/Formatting/Formatting.js";
|
|
8
8
|
export { executeHoverProvider, getHoverProviderRegistrySnapshot, registerHoverProvider, resetHoverProviderRegistry } from "./parts/Hover/Hover.js";
|
|
9
|
+
export { createViewInstance, dispatchViewEvent, disposeViewInstance, executeViewProvider, getViewRegistrySnapshot, registerView, resetViewRegistry, saveViewInstanceState, } from "./parts/ViewRegistry/ViewRegistry.js";
|
|
10
|
+
export { createOutputChannel, getOutputChannelRegistrySnapshot, resetOutputChannelRegistry } from "./parts/OutputChannel/OutputChannel.js";
|
|
9
11
|
export { getStatusBarItemProviderRegistrySnapshot, registerStatusBarItemProvider, resetStatusBarItemProviderRegistry, } from "./parts/StatusBar/StatusBar.js";
|
|
10
12
|
export { handleExtensionManagementMessagePort } from "./parts/HandleExtensionManagementMessagePort/HandleExtensionManagementMessagePort.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { ExtensionManagementWorker } from '@lvce-editor/rpc-registry';
|
|
1
2
|
import { listen } from "../ExtensionApiWorkerListen/ExtensionApiWorkerListen.js";
|
|
2
|
-
import
|
|
3
|
+
import { activateOutputChannels } from "../OutputChannel/OutputChannel.js";
|
|
3
4
|
let rpcPromise;
|
|
4
5
|
export const activate = async () => {
|
|
5
6
|
if (!rpcPromise) {
|
|
6
7
|
rpcPromise = listen();
|
|
7
8
|
}
|
|
8
9
|
const rpc = await rpcPromise;
|
|
9
|
-
|
|
10
|
+
ExtensionManagementWorker.set(rpc);
|
|
11
|
+
activateOutputChannels();
|
|
10
12
|
};
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
export declare const commandMap: {
|
|
2
2
|
initialize(type: string, port: MessagePort): Promise<void>;
|
|
3
|
+
'ExtensionApi.createViewInstance': (viewId: string, uid: number, context?: import("../View/View.ts").ViewContext) => Promise<import("../View/View.ts").ViewRenderResult>;
|
|
4
|
+
'ExtensionApi.dispatchViewEvent': (uid: number, event: import("../View/View.ts").ViewEvent) => Promise<import("../View/View.ts").ViewRenderResult>;
|
|
5
|
+
'ExtensionApi.disposeViewInstance': (uid: number) => Promise<void>;
|
|
3
6
|
'ExtensionApi.executeCommand': (id: string, ...args: readonly unknown[]) => Promise<unknown>;
|
|
4
7
|
'ExtensionApi.executeCompletionProvider': (textDocument: import("../CompletionTextDocument/CompletionTextDocument.ts").TextDocument, offset: number, ...args: readonly unknown[]) => Promise<readonly import("../CompletionItem/CompletionItem.ts").CompletionItem[]>;
|
|
5
8
|
'ExtensionApi.executeDiagnosticProvider': (textDocument: import("../DiagnosticTextDocument/DiagnosticTextDocument.ts").TextDocument, ...args: readonly unknown[]) => Promise<readonly import("../DiagnosticResult/DiagnosticResult.ts").Diagnostic[]>;
|
|
6
9
|
'ExtensionApi.executeFormattingProvider': (textDocument: import("../FormattingTextDocument/FormattingTextDocument.ts").TextDocument, ...args: readonly unknown[]) => Promise<readonly import("../FormattingEdit/FormattingEdit.ts").FormattingEdit[]>;
|
|
7
10
|
'ExtensionApi.executeHoverProvider': (textDocument: import("../HoverTextDocument/HoverTextDocument.ts").TextDocument, offset: number, ...args: readonly unknown[]) => Promise<import("../HoverResult/HoverResult.ts").HoverResult | undefined>;
|
|
8
11
|
'ExtensionApi.executeResolveCompletionItemProvider': (textDocument: import("../CompletionTextDocument/CompletionTextDocument.ts").TextDocument, offset: number, name: string, completionItem: import("../CompletionItem/CompletionItem.ts").CompletionItem, ...args: readonly unknown[]) => Promise<import("../CompletionItem/CompletionItem.ts").CompletionItem | undefined>;
|
|
12
|
+
'ExtensionApi.executeViewProvider': (id: string) => unknown;
|
|
9
13
|
'ExtensionApi.getCommandRegistrySnapshot': () => import("../CommandRegistrySnapshot/CommandRegistrySnapshot.ts").CommandRegistrySnapshot;
|
|
10
14
|
'ExtensionApi.getCompletionProviderRegistrySnapshot': () => import("../CompletionProviderRegistrySnapshot/CompletionProviderRegistrySnapshot.ts").CompletionProviderRegistrySnapshot;
|
|
11
15
|
'ExtensionApi.getDiagnosticProviderRegistrySnapshot': () => import("../DiagnosticProviderRegistrySnapshot/DiagnosticProviderRegistrySnapshot.ts").DiagnosticProviderRegistrySnapshot;
|
|
12
16
|
'ExtensionApi.getFormattingProviderRegistrySnapshot': () => import("../FormattingProviderRegistrySnapshot/FormattingProviderRegistrySnapshot.ts").FormattingProviderRegistrySnapshot;
|
|
13
17
|
'ExtensionApi.getHoverProviderRegistrySnapshot': () => import("../HoverProviderRegistrySnapshot/HoverProviderRegistrySnapshot.ts").HoverProviderRegistrySnapshot;
|
|
18
|
+
'ExtensionApi.getOutputChannelRegistrySnapshot': () => import("../OutputChannelRegistrySnapshot/OutputChannelRegistrySnapshot.ts").OutputChannelRegistrySnapshot;
|
|
14
19
|
'ExtensionApi.getStatusBarItems': () => readonly import("../StatusBarItem/StatusBarItem.ts").StatusBarItem[];
|
|
20
|
+
'ExtensionApi.getViewRegistrySnapshot': () => import("../View/View.ts").ViewRegistrySnapshot;
|
|
21
|
+
'ExtensionApi.saveViewInstanceState': (uid: number) => Promise<unknown>;
|
|
15
22
|
};
|
|
@@ -30,7 +30,9 @@ export const registerCommand = (command) => {
|
|
|
30
30
|
};
|
|
31
31
|
export const getCommandRegistrySnapshot = () => {
|
|
32
32
|
return {
|
|
33
|
-
commands: Object.values(commands)
|
|
33
|
+
commands: Object.values(commands).map((command) => ({
|
|
34
|
+
id: command.id,
|
|
35
|
+
})),
|
|
34
36
|
};
|
|
35
37
|
};
|
|
36
38
|
export const executeCommand = async (id, ...args) => {
|
|
@@ -9,16 +9,41 @@ const getType = (value) => {
|
|
|
9
9
|
}
|
|
10
10
|
return typeof value;
|
|
11
11
|
};
|
|
12
|
+
const sanitizeCompletionItem = (item) => {
|
|
13
|
+
const sanitizedItem = {};
|
|
14
|
+
for (const [key, value] of Object.entries(item)) {
|
|
15
|
+
if (typeof value !== 'function') {
|
|
16
|
+
sanitizedItem[key] = value;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const { kind: itemKind, type } = item;
|
|
20
|
+
let kind = 0;
|
|
21
|
+
if (typeof itemKind === 'number') {
|
|
22
|
+
kind = itemKind;
|
|
23
|
+
}
|
|
24
|
+
else if (typeof type === 'number') {
|
|
25
|
+
kind = type;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
...sanitizedItem,
|
|
29
|
+
flags: typeof item.flags === 'number' ? item.flags : 0,
|
|
30
|
+
kind,
|
|
31
|
+
label: typeof item.label === 'string' ? item.label : '',
|
|
32
|
+
matches: Array.isArray(item.matches) ? item.matches : [],
|
|
33
|
+
};
|
|
34
|
+
};
|
|
12
35
|
const validateCompletionResult = (completion) => {
|
|
13
36
|
if (!Array.isArray(completion)) {
|
|
14
37
|
throw new ExtensionApiError(`invalid completion result: completion must be of type array but is ${getType(completion)}`);
|
|
15
38
|
}
|
|
39
|
+
const completionItems = [];
|
|
16
40
|
for (const item of completion) {
|
|
17
41
|
if (!item || typeof item !== 'object' || Array.isArray(item)) {
|
|
18
42
|
throw new ExtensionApiError(`invalid completion result: expected completion item to be of type object but was of type ${getType(item)}`);
|
|
19
43
|
}
|
|
44
|
+
completionItems.push(sanitizeCompletionItem(item));
|
|
20
45
|
}
|
|
21
|
-
return
|
|
46
|
+
return completionItems;
|
|
22
47
|
};
|
|
23
48
|
const registry = createProviderRegistry({
|
|
24
49
|
mapProvider(provider) {
|
|
@@ -60,7 +85,10 @@ export const executeResolveCompletionItemProvider = async (textDocument, offset,
|
|
|
60
85
|
export const getCompletionProviders = registry.getProviders;
|
|
61
86
|
export const getCompletionProviderRegistrySnapshot = () => {
|
|
62
87
|
return {
|
|
63
|
-
providers: registry.getProviders()
|
|
88
|
+
providers: registry.getProviders().map((provider) => ({
|
|
89
|
+
id: provider.id,
|
|
90
|
+
languageId: provider.languageId,
|
|
91
|
+
})),
|
|
64
92
|
};
|
|
65
93
|
};
|
|
66
94
|
export const resetCompletionProviderRegistry = registry.reset;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { RegisteredCompletionProvider } from '../RegisteredCompletionProvider/RegisteredCompletionProvider.ts';
|
|
2
1
|
export interface CompletionProviderRegistrySnapshot {
|
|
3
|
-
readonly providers: readonly
|
|
2
|
+
readonly providers: readonly {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly languageId: string;
|
|
5
|
+
}[];
|
|
4
6
|
}
|
|
@@ -52,7 +52,10 @@ export const executeDiagnosticProvider = async (textDocument, ...args) => {
|
|
|
52
52
|
export const getDiagnosticProviders = registry.getProviders;
|
|
53
53
|
export const getDiagnosticProviderRegistrySnapshot = () => {
|
|
54
54
|
return {
|
|
55
|
-
providers: registry.getProviders()
|
|
55
|
+
providers: registry.getProviders().map((provider) => ({
|
|
56
|
+
id: provider.id,
|
|
57
|
+
languageId: provider.languageId,
|
|
58
|
+
})),
|
|
56
59
|
};
|
|
57
60
|
};
|
|
58
61
|
export const resetDiagnosticProviderRegistry = registry.reset;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { RegisteredDiagnosticProvider } from '../RegisteredDiagnosticProvider/RegisteredDiagnosticProvider.ts';
|
|
2
1
|
export interface DiagnosticProviderRegistrySnapshot {
|
|
3
|
-
readonly providers: readonly
|
|
2
|
+
readonly providers: readonly {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly languageId: string;
|
|
5
|
+
}[];
|
|
4
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ExtensionManagementWorker } from '@lvce-editor/rpc-registry';
|
|
2
2
|
export const executeCommand = async (id, ...args) => {
|
|
3
|
-
return
|
|
3
|
+
return ExtensionManagementWorker.invoke('Extensions.executeCommand', id, ...args);
|
|
4
4
|
};
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
export declare const commandMap: {
|
|
2
|
+
'ExtensionApi.createViewInstance': (viewId: string, uid: number, context?: import("../View/View.ts").ViewContext) => Promise<import("../View/View.ts").ViewRenderResult>;
|
|
3
|
+
'ExtensionApi.dispatchViewEvent': (uid: number, event: import("../View/View.ts").ViewEvent) => Promise<import("../View/View.ts").ViewRenderResult>;
|
|
4
|
+
'ExtensionApi.disposeViewInstance': (uid: number) => Promise<void>;
|
|
2
5
|
'ExtensionApi.executeCommand': (id: string, ...args: readonly unknown[]) => Promise<unknown>;
|
|
3
6
|
'ExtensionApi.executeCompletionProvider': (textDocument: import("../CompletionTextDocument/CompletionTextDocument.ts").TextDocument, offset: number, ...args: readonly unknown[]) => Promise<readonly import("../CompletionItem/CompletionItem.ts").CompletionItem[]>;
|
|
4
7
|
'ExtensionApi.executeDiagnosticProvider': (textDocument: import("../DiagnosticTextDocument/DiagnosticTextDocument.ts").TextDocument, ...args: readonly unknown[]) => Promise<readonly import("../DiagnosticResult/DiagnosticResult.ts").Diagnostic[]>;
|
|
5
8
|
'ExtensionApi.executeFormattingProvider': (textDocument: import("../FormattingTextDocument/FormattingTextDocument.ts").TextDocument, ...args: readonly unknown[]) => Promise<readonly import("../FormattingEdit/FormattingEdit.ts").FormattingEdit[]>;
|
|
6
9
|
'ExtensionApi.executeHoverProvider': (textDocument: import("../HoverTextDocument/HoverTextDocument.ts").TextDocument, offset: number, ...args: readonly unknown[]) => Promise<import("../HoverResult/HoverResult.ts").HoverResult | undefined>;
|
|
7
10
|
'ExtensionApi.executeResolveCompletionItemProvider': (textDocument: import("../CompletionTextDocument/CompletionTextDocument.ts").TextDocument, offset: number, name: string, completionItem: import("../CompletionItem/CompletionItem.ts").CompletionItem, ...args: readonly unknown[]) => Promise<import("../CompletionItem/CompletionItem.ts").CompletionItem | undefined>;
|
|
11
|
+
'ExtensionApi.executeViewProvider': (id: string) => unknown;
|
|
8
12
|
'ExtensionApi.getCommandRegistrySnapshot': () => import("../CommandRegistrySnapshot/CommandRegistrySnapshot.ts").CommandRegistrySnapshot;
|
|
9
13
|
'ExtensionApi.getCompletionProviderRegistrySnapshot': () => import("../CompletionProviderRegistrySnapshot/CompletionProviderRegistrySnapshot.ts").CompletionProviderRegistrySnapshot;
|
|
10
14
|
'ExtensionApi.getDiagnosticProviderRegistrySnapshot': () => import("../DiagnosticProviderRegistrySnapshot/DiagnosticProviderRegistrySnapshot.ts").DiagnosticProviderRegistrySnapshot;
|
|
11
15
|
'ExtensionApi.getFormattingProviderRegistrySnapshot': () => import("../FormattingProviderRegistrySnapshot/FormattingProviderRegistrySnapshot.ts").FormattingProviderRegistrySnapshot;
|
|
12
16
|
'ExtensionApi.getHoverProviderRegistrySnapshot': () => import("../HoverProviderRegistrySnapshot/HoverProviderRegistrySnapshot.ts").HoverProviderRegistrySnapshot;
|
|
17
|
+
'ExtensionApi.getOutputChannelRegistrySnapshot': () => import("../OutputChannelRegistrySnapshot/OutputChannelRegistrySnapshot.ts").OutputChannelRegistrySnapshot;
|
|
13
18
|
'ExtensionApi.getStatusBarItems': () => readonly import("../StatusBarItem/StatusBarItem.ts").StatusBarItem[];
|
|
19
|
+
'ExtensionApi.getViewRegistrySnapshot': () => import("../View/View.ts").ViewRegistrySnapshot;
|
|
20
|
+
'ExtensionApi.saveViewInstanceState': (uid: number) => Promise<unknown>;
|
|
14
21
|
};
|
|
@@ -4,17 +4,26 @@ import { executeDiagnosticProvider, getDiagnosticProviderRegistrySnapshot } from
|
|
|
4
4
|
import { executeFormattingProvider, getFormattingProviderRegistrySnapshot } from "../Formatting/Formatting.js";
|
|
5
5
|
import { getStatusBarItems } from "../GetStatusBarItems/GetStatusBarItems.js";
|
|
6
6
|
import { executeHoverProvider, getHoverProviderRegistrySnapshot } from "../Hover/Hover.js";
|
|
7
|
+
import { getOutputChannelRegistrySnapshot } from "../OutputChannel/OutputChannel.js";
|
|
8
|
+
import { createViewInstance, dispatchViewEvent, disposeViewInstance, executeViewProvider, getViewRegistrySnapshot, saveViewInstanceState, } from "../ViewRegistry/ViewRegistry.js";
|
|
7
9
|
export const commandMap = {
|
|
10
|
+
'ExtensionApi.createViewInstance': createViewInstance,
|
|
11
|
+
'ExtensionApi.dispatchViewEvent': dispatchViewEvent,
|
|
12
|
+
'ExtensionApi.disposeViewInstance': disposeViewInstance,
|
|
8
13
|
'ExtensionApi.executeCommand': executeCommand,
|
|
9
14
|
'ExtensionApi.executeCompletionProvider': executeCompletionProvider,
|
|
10
15
|
'ExtensionApi.executeDiagnosticProvider': executeDiagnosticProvider,
|
|
11
16
|
'ExtensionApi.executeFormattingProvider': executeFormattingProvider,
|
|
12
17
|
'ExtensionApi.executeHoverProvider': executeHoverProvider,
|
|
13
18
|
'ExtensionApi.executeResolveCompletionItemProvider': executeResolveCompletionItemProvider,
|
|
19
|
+
'ExtensionApi.executeViewProvider': executeViewProvider,
|
|
14
20
|
'ExtensionApi.getCommandRegistrySnapshot': getCommandRegistrySnapshot,
|
|
15
21
|
'ExtensionApi.getCompletionProviderRegistrySnapshot': getCompletionProviderRegistrySnapshot,
|
|
16
22
|
'ExtensionApi.getDiagnosticProviderRegistrySnapshot': getDiagnosticProviderRegistrySnapshot,
|
|
17
23
|
'ExtensionApi.getFormattingProviderRegistrySnapshot': getFormattingProviderRegistrySnapshot,
|
|
18
24
|
'ExtensionApi.getHoverProviderRegistrySnapshot': getHoverProviderRegistrySnapshot,
|
|
25
|
+
'ExtensionApi.getOutputChannelRegistrySnapshot': getOutputChannelRegistrySnapshot,
|
|
19
26
|
'ExtensionApi.getStatusBarItems': getStatusBarItems,
|
|
27
|
+
'ExtensionApi.getViewRegistrySnapshot': getViewRegistrySnapshot,
|
|
28
|
+
'ExtensionApi.saveViewInstanceState': saveViewInstanceState,
|
|
20
29
|
};
|