🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

@codingame/monaco-vscode-dialogs-service-override

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codingame/monaco-vscode-dialogs-service-override - npm Package Compare versions

Comparing version

to
14.0.0

{
"name": "@codingame/monaco-vscode-dialogs-service-override",
"version": "13.1.7",
"version": "14.0.0",
"private": false,

@@ -18,6 +18,6 @@ "description": "VSCode public API plugged on the monaco editor - dialogs service-override",

"dependencies": {
"@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "13.1.7",
"@codingame/monaco-vscode-44b92f80-48ea-5562-a8d0-18a015f8d845-common": "13.1.7",
"@codingame/monaco-vscode-api": "13.1.7",
"@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common": "13.1.7"
"@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "14.0.0",
"@codingame/monaco-vscode-44b92f80-48ea-5562-a8d0-18a015f8d845-common": "14.0.0",
"@codingame/monaco-vscode-api": "14.0.0",
"@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common": "14.0.0"
},

@@ -24,0 +24,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

import { IConfirmation, IConfirmationResult, IInputResult, IInput, AbstractDialogHandler, IPrompt, IAsyncPromptResult } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
import { IConfirmation, IConfirmationResult, IInputResult, IInput, AbstractDialogHandler, IPrompt, IAsyncPromptResult } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service";

@@ -3,0 +3,0 @@ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";

import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
import { AbstractDialogHandler } from '@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs';
import { AbstractDialogHandler } from '@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs';
import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service';

@@ -62,3 +62,3 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';

return localize(
2747,
2793,
"Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",

@@ -74,4 +74,4 @@ this.productService.version || 'Unknown',

const { button } = await this.doShow(Severity.Info, this.productService.nameLong, [
( localize(2748, "&&Copy")),
( localize(2749, "OK"))
( localize(2794, "&&Copy")),
( localize(2795, "OK"))
], detail, 1);

@@ -82,3 +82,3 @@ if (button === 0) {

}
async doShow(type, message, buttons, detail, cancelId, checkbox, inputs, customOptions, cancellationToken) {
async doShow(type, message, buttons, detail, cancelId, checkbox, inputs, customOptions) {
const dialogDisposables = ( new DisposableStore());

@@ -85,0 +85,0 @@ const renderBody = customOptions ? (parent) => {

import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
import { IDialogArgs, IDialogResult } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
import { IDialogArgs, IDialogResult } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
export interface IDialogViewItem {

@@ -5,0 +5,0 @@ readonly args: IDialogArgs;

@@ -93,5 +93,5 @@

tags: ['experimental'],
description: ( localize(10733, "When enabled, a welcome widget is shown in the editor"))
description: ( localize(10930, "When enabled, a welcome widget is shown in the editor"))
}
}
});

@@ -75,3 +75,3 @@

const actionBar = this._register(( new ActionBar(this.element, {})));
const action = this._register(( new Action('dialog.close', ( localize(10734, "Close Dialog")), ThemeIcon.asClassName(Codicon.dialogClose), true, async () => {
const action = this._register(( new Action('dialog.close', ( localize(10931, "Close Dialog")), ThemeIcon.asClassName(Codicon.dialogClose), true, async () => {
this._hide();

@@ -78,0 +78,0 @@ })));

@@ -1,2 +0,2 @@

import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions, ConfirmResult } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions, ConfirmResult } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";

@@ -3,0 +3,0 @@ import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";

@@ -5,3 +5,3 @@

import { isWorkspaceToOpen, isFileToOpen } from '@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window';
import { ConfirmResult, getFileNamesMessage } from '@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs';
import { ConfirmResult, getFileNamesMessage } from '@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs';
import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';

@@ -125,6 +125,6 @@ import { WorkbenchState, isSavedWorkspace, isTemporaryWorkspace, WORKSPACE_EXTENSION } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';

let message;
let detail = ( localize(11359, "Your changes will be lost if you don't save them."));
let detail = ( localize(11556, "Your changes will be lost if you don't save them."));
if (fileNamesOrResources.length === 1) {
message = ( localize(
11360,
11557,
"Do you want to save the changes you made to {0}?",

@@ -136,3 +136,3 @@ typeof fileNamesOrResources[0] === 'string' ? fileNamesOrResources[0] : basename(fileNamesOrResources[0])

message = ( localize(
11361,
11558,
"Do you want to save the changes to the following {0} files?",

@@ -150,8 +150,8 @@ fileNamesOrResources.length

label: fileNamesOrResources.length > 1 ?
( localize(11362, "&&Save All")) :
( localize(11363, "&&Save")),
( localize(11559, "&&Save All")) :
( localize(11560, "&&Save")),
run: () => ConfirmResult.SAVE
},
{
label: ( localize(11364, "Do&&n't Save")),
label: ( localize(11561, "Do&&n't Save")),
run: () => ConfirmResult.DONT_SAVE

@@ -170,3 +170,3 @@ }

async pickFileFolderAndOpenSimplified(schema, options, preferNewWindow) {
const title = ( localize(11365, 'Open File or Folder'));
const title = ( localize(11562, 'Open File or Folder'));
const availableFileSystems = this.addFileSchemaIfNeeded(schema);

@@ -189,3 +189,3 @@ const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });

async pickFileAndOpenSimplified(schema, options, preferNewWindow) {
const title = ( localize(11366, 'Open File'));
const title = ( localize(11563, 'Open File'));
const availableFileSystems = this.addFileSchemaIfNeeded(schema);

@@ -204,6 +204,6 @@ const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });

addFileToRecentlyOpened(uri) {
this.workspacesService.addRecentlyOpened([{ fileUri: uri, label: this.labelService.getUriLabel(uri) }]);
this.workspacesService.addRecentlyOpened([{ fileUri: uri, label: this.labelService.getUriLabel(uri, { appendWorkspaceSuffix: true }) }]);
}
async pickFolderAndOpenSimplified(schema, options) {
const title = ( localize(11367, 'Open Folder'));
const title = ( localize(11564, 'Open Folder'));
const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);

@@ -216,4 +216,4 @@ const uri = await this.pickResource({ canSelectFiles: false, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });

async pickWorkspaceAndOpenSimplified(schema, options) {
const title = ( localize(11368, 'Open Workspace from File'));
const filters = [{ name: ( localize(11369, 'Workspace')), extensions: [WORKSPACE_EXTENSION] }];
const title = ( localize(11565, 'Open Workspace from File'));
const filters = [{ name: ( localize(11566, 'Workspace')), extensions: [WORKSPACE_EXTENSION] }];
const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);

@@ -229,3 +229,3 @@ const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, filters, availableFileSystems });

}
options.title = ( localize(11370, 'Save As'));
options.title = ( localize(11567, 'Save As'));
const uri = await this.saveRemoteResource(options);

@@ -281,3 +281,3 @@ if (uri) {

defaultUri,
title: ( localize(11371, "Save As")),
title: ( localize(11568, "Save As")),
availableFileSystems

@@ -309,6 +309,6 @@ };

options.filters = coalesce([
{ name: ( localize(11372, "All Files")), extensions: ['*'] },
{ name: ( localize(11569, "All Files")), extensions: ['*'] },
matchingFilter,
...registeredLanguageFilters,
{ name: ( localize(11373, "No Extension")), extensions: [''] }
{ name: ( localize(11570, "No Extension")), extensions: [''] }
]);

@@ -315,0 +315,0 @@ return options;

@@ -1,2 +0,2 @@

import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";

@@ -3,0 +3,0 @@ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";

@@ -31,3 +31,3 @@

}
throw ( new Error(( localize(11374, "Can't open folders, try adding a folder to the workspace instead."))));
throw ( new Error(( localize(11571, "Can't open folders, try adding a folder to the workspace instead."))));
}

@@ -72,3 +72,3 @@ addFileSchemaIfNeeded(schema, isFolder) {

}
throw ( new Error(( localize(11374, "Can't open folders, try adding a folder to the workspace instead."))));
throw ( new Error(( localize(11571, "Can't open folders, try adding a folder to the workspace instead."))));
}

@@ -85,3 +85,3 @@ async pickWorkspaceAndOpen(options) {

throw ( new Error(( localize(
11375,
11572,
"Can't open workspaces, try adding a folder to the workspace instead."

@@ -188,7 +188,7 @@ ))));

{
label: ( localize(11376, "&&Open Remote...")),
label: ( localize(11573, "&&Open Remote...")),
run: async () => { await this.commandService.executeCommand('workbench.action.remote.showMenu'); }
},
{
label: ( localize(11377, "&&Learn More")),
label: ( localize(11574, "&&Learn More")),
run: async () => { await this.openerService.open('https://aka.ms/VSCodeWebLocalFileSystemAccess'); }

@@ -199,3 +199,3 @@ }

buttons.push({
label: ( localize(11378, "Open &&Files...")),
label: ( localize(11575, "Open &&Files...")),
run: async () => {

@@ -220,5 +220,5 @@ const files = await triggerUpload();

type: Severity.Warning,
message: ( localize(11379, "Opening Local Folders is Unsupported")),
message: ( localize(11576, "Opening Local Folders is Unsupported")),
detail: ( localize(
11380,
11577,
"Your browser doesn't support opening local folders.\nYou can either open single files or open a remote repository."

@@ -225,0 +225,0 @@ )),

import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
import { ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
import { ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";

@@ -101,2 +101,3 @@ import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";

private root;
private canTildaEscapeHatch;
private tildaReplace;

@@ -103,0 +104,0 @@ private tryAddTrailingSeparatorToDirectory;

@@ -40,3 +40,3 @@

OpenLocalFileCommand.ID = 'workbench.action.files.openLocalFile';
OpenLocalFileCommand.LABEL = ( localize(11381, "Open Local File..."));
OpenLocalFileCommand.LABEL = ( localize(11578, "Open Local File..."));
function handler() {

@@ -53,3 +53,3 @@ return accessor => {

SaveLocalFileCommand.ID = 'workbench.action.files.saveLocalFile';
SaveLocalFileCommand.LABEL = ( localize(11382, "Save Local File..."));
SaveLocalFileCommand.LABEL = ( localize(11579, "Save Local File..."));
function handler() {

@@ -70,3 +70,3 @@ return accessor => {

OpenLocalFolderCommand.ID = 'workbench.action.files.openLocalFolder';
OpenLocalFolderCommand.LABEL = ( localize(11383, "Open Local Folder..."));
OpenLocalFolderCommand.LABEL = ( localize(11580, "Open Local Folder..."));
function handler() {

@@ -83,3 +83,3 @@ return accessor => {

OpenLocalFileFolderCommand.ID = 'workbench.action.files.openLocalFileFolder';
OpenLocalFileFolderCommand.LABEL = ( localize(11384, "Open Local..."));
OpenLocalFileFolderCommand.LABEL = ( localize(11581, "Open Local..."));
function handler() {

@@ -184,3 +184,3 @@ return accessor => {

this.notificationService.info(( localize(
11385,
11582,
'File system provider for {0} is not available.',

@@ -256,5 +256,6 @@ (defaultUri.toString())

this.filePickBox.ok = true;
this.filePickBox.okLabel = this.options.openLabel;
if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
this.filePickBox.customButton = true;
this.filePickBox.customLabel = ( localize(11386, 'Show Local'));
this.filePickBox.customLabel = ( localize(11583, 'Show Local'));
let action;

@@ -384,3 +385,3 @@ if (isSave) {

if (this.isValueChangeFromUser()) {
if (!equalsIgnoreCase(value, this.constructFullUserPath()) && !this.isBadSubpath(value)) {
if (!equalsIgnoreCase(value, this.constructFullUserPath()) && (!this.isBadSubpath(value) || this.canTildaEscapeHatch(value))) {
this.filePickBox.validationMessage = undefined;

@@ -457,3 +458,3 @@ const filePickBoxUri = this.filePickBoxValue();

this.busy = true;
if (this.filePickBox.activeItems.length === 1) {
if (!this.updatingPromise && this.filePickBox.activeItems.length === 1) {
const item = this.filePickBox.selectedItems[0];

@@ -482,3 +483,3 @@ if (item.isFolder) {

}
else {
else if (!this.updatingPromise) {
if ((await this.tryUpdateItems(this.filePickBox.value, this.filePickBoxValue())) !== UpdateResult.NotUpdated) {

@@ -515,2 +516,5 @@ this.filePickBox.busy = false;

}
canTildaEscapeHatch(value) {
return !!(value.endsWith('~') && this.isBadSubpath(value));
}
tildaReplace(value) {

@@ -521,2 +525,5 @@ const home = this.trueHome;

}
else if (this.canTildaEscapeHatch(value)) {
return home;
}
return this.remoteUriFrom(value);

@@ -533,3 +540,3 @@ }

async tryUpdateItems(value, valueUri) {
if ((value.length > 0) && (value[0] === '~')) {
if ((value.length > 0) && ((value[0] === '~') || this.canTildaEscapeHatch(value))) {
const newDir = this.tildaReplace(value);

@@ -560,3 +567,3 @@ return (await this.updateItems(newDir, true)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;

else if (this.endsWithSlash(value)) {
this.filePickBox.validationMessage = ( localize(11387, 'The path does not exist.'));
this.filePickBox.validationMessage = ( localize(11584, 'The path does not exist. Use ~ to go to your home directory.'));
this.badPath = value;

@@ -719,3 +726,3 @@ return UpdateResult.InvalidPath;

prompt.customButton = true;
prompt.customLabel = ( localize(11388, 'Cancel'));
prompt.customLabel = ( localize(11585, 'Cancel'));
prompt.value = this.pathFromUri(uri);

@@ -748,3 +755,3 @@ let isResolving = false;

if (uri === undefined) {
this.filePickBox.validationMessage = ( localize(11389, 'Please enter a valid path.'));
this.filePickBox.validationMessage = ( localize(11586, 'Please enter a valid path.'));
return Promise.resolve(false);

@@ -762,3 +769,3 @@ }

if (stat && stat.isDirectory) {
this.filePickBox.validationMessage = ( localize(11390, 'The folder already exists. Please use a new file name.'));
this.filePickBox.validationMessage = ( localize(11587, 'The folder already exists. Please use a new file name.'));
return Promise.resolve(false);

@@ -768,3 +775,3 @@ }

const message = ( localize(
11391,
11588,
'{0} already exists. Are you sure you want to overwrite it?',

@@ -776,3 +783,3 @@ basename(uri)

else if (!(isValidBasename(basename(uri), this.isWindows))) {
this.filePickBox.validationMessage = ( localize(11392, 'Please enter a valid file name.'));
this.filePickBox.validationMessage = ( localize(11589, 'Please enter a valid file name.'));
return Promise.resolve(false);

@@ -782,3 +789,3 @@ }

const message = ( localize(
11393,
11590,
'The folder {0} does not exist. Would you like to create it?',

@@ -790,3 +797,3 @@ basename(dirname(uri))

else if (!statDirname.isDirectory) {
this.filePickBox.validationMessage = ( localize(11394, 'Please enter a path that exists.'));
this.filePickBox.validationMessage = ( localize(11591, 'Please enter a path that exists.'));
return Promise.resolve(false);

@@ -796,3 +803,3 @@ }

this.filePickBox.validationMessage = ( localize(
11395,
11592,
'This folder cannot be used as a save destination. Please choose another folder'

@@ -805,15 +812,15 @@ ));

if (!stat) {
this.filePickBox.validationMessage = ( localize(11394, 'Please enter a path that exists.'));
this.filePickBox.validationMessage = ( localize(11591, 'Please enter a path that exists.'));
return Promise.resolve(false);
}
else if (uri.path === '/' && this.isWindows) {
this.filePickBox.validationMessage = ( localize(11396, 'Please start the path with a drive letter.'));
this.filePickBox.validationMessage = ( localize(11593, 'Please start the path with a drive letter.'));
return Promise.resolve(false);
}
else if (stat.isDirectory && !this.allowFolderSelection) {
this.filePickBox.validationMessage = ( localize(11397, 'Please select a file.'));
this.filePickBox.validationMessage = ( localize(11594, 'Please select a file.'));
return Promise.resolve(false);
}
else if (!stat.isDirectory && !this.allowFileSelection) {
this.filePickBox.validationMessage = ( localize(11398, 'Please select a folder.'));
this.filePickBox.validationMessage = ( localize(11595, 'Please select a folder.'));
return Promise.resolve(false);

@@ -827,2 +834,4 @@ }

this.autoCompletePathSegment = '';
const wasDotDot = trailing === '..';
trailing = wasDotDot ? undefined : trailing;
const isSave = !!trailing;

@@ -853,3 +862,3 @@ let result = false;

this.filePickBox.items = items;
if (!equalsIgnoreCase(this.filePickBox.value, newValue) && force) {
if (!equalsIgnoreCase(this.filePickBox.value, newValue) && (force || wasDotDot)) {
this.filePickBox.valueSelection = [0, this.filePickBox.value.length];

@@ -856,0 +865,0 @@ this.insertText(newValue, newValue);

import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
import { IConfirmation, IConfirmationResult, IInput, IInputResult, IPrompt, IPromptResult, IPromptResultWithCancel, IPromptWithCustomCancel, IPromptWithDefaultCancel } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
import { IConfirmation, IConfirmationResult, IInput, IInputResult, IPrompt, IPromptResult, IPromptResultWithCancel, IPromptWithCustomCancel, IPromptWithDefaultCancel } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";

@@ -4,0 +4,0 @@ import { DialogsModel } from "../../../common/dialogs.js";