
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@codingame/monaco-vscode-extensions-service-override
Advanced tools
VSCode public API plugged on the monaco editor - extensions service-override
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6'; import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls'; import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions'; import { MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol'; import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js'; import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service'; import { NotificationPriority } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification'; import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service'; import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event'; import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service'; import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
var MainThreadMessageService_1;
let MainThreadMessageService = class MainThreadMessageService {
static { MainThreadMessageService_1 = this; }
static { this.URGENT_NOTIFICATION_SOURCES = [
'vscode.github-authentication',
'vscode.microsoft-authentication'
]; }
constructor(extHostContext, _notificationService, _commandService, _dialogService, extensionService) {
this._notificationService = _notificationService;
this._commandService = _commandService;
this._dialogService = _dialogService;
this.extensionsListener = extensionService.onDidChangeExtensions(e => {
for (const extension of e.removed) {
this._notificationService.removeFilter(extension.identifier.value);
}
});
}
dispose() {
this.extensionsListener.dispose();
}
$showMessage(severity, message, options, commands) {
if (options.modal) {
return this._showModalMessage(severity, message, options.detail, commands, options.useCustom);
}
else {
return this._showMessage(severity, message, commands, options);
}
}
_showMessage(severity, message, commands, options) {
return (new Promise(resolve => {
const primaryActions = ( commands.map(command => toAction({
id: _extension_message_handle_${command.handle}
,
label: command.title,
enabled: true,
run: () => {
resolve(command.handle);
return Promise.resolve();
}
})));
let source;
let sourceIsUrgent = false;
if (options.source) {
source = {
label: options.source.label,
id: options.source.identifier.value
};
sourceIsUrgent = MainThreadMessageService_1.URGENT_NOTIFICATION_SOURCES.includes(source.id);
}
if (!source) {
source = ( localize(2461, "Extension"));
}
const secondaryActions = [];
if (options.source) {
secondaryActions.push(toAction({
id: options.source.identifier.value,
label: ( localize(2462, "Manage Extension")),
run: () => {
return this._commandService.executeCommand('_extensions.manage', options.source.identifier.value);
}
}));
}
const messageHandle = this._notificationService.notify({
severity,
message,
actions: { primary: primaryActions, secondary: secondaryActions },
source,
priority: sourceIsUrgent ? NotificationPriority.URGENT : NotificationPriority.DEFAULT,
sticky: sourceIsUrgent
});
Event.once(messageHandle.onDidClose)(() => {
resolve(undefined);
});
}));
}
async _showModalMessage(severity, message, detail, commands, useCustom) {
const buttons = [];
let cancelButton = undefined;
for (const command of commands) {
const button = {
label: command.title,
run: () => command.handle
};
if (command.isCloseAffordance) {
cancelButton = button;
}
else {
buttons.push(button);
}
}
if (!cancelButton) {
if (buttons.length > 0) {
cancelButton = {
label: ( localize(2463, "Cancel")),
run: () => undefined
};
}
else {
cancelButton = {
label: ( localize(2464, "&&OK")),
run: () => undefined
};
}
}
const { result } = await this._dialogService.prompt({
type: severity,
message,
detail,
buttons,
cancelButton,
custom: useCustom
});
return result;
}
};
MainThreadMessageService = MainThreadMessageService_1 = __decorate([
extHostNamedCustomer(MainContext.MainThreadMessageService),
( __param(1, INotificationService)),
( __param(2, ICommandService)),
( __param(3, IDialogService)),
( __param(4, IExtensionService))
], MainThreadMessageService);
export { MainThreadMessageService };
FAQs
VSCode public API plugged on the monaco editor - extensions service-override
The npm package @codingame/monaco-vscode-extensions-service-override receives a total of 45,451 weekly downloads. As such, @codingame/monaco-vscode-extensions-service-override popularity was classified as popular.
We found that @codingame/monaco-vscode-extensions-service-override demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.