Skip to content

Commit

Permalink
copy-paste -> clipboardy (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
PrashanthCorp authored and ejizba committed Dec 7, 2018
1 parent b771027 commit 51e2d9c
Show file tree
Hide file tree
Showing 9 changed files with 216 additions and 123 deletions.
228 changes: 155 additions & 73 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -662,7 +662,7 @@
"all": "npm i && npm run lint && npm test"
},
"devDependencies": {
"@types/copy-paste": "^1.1.30",
"@types/clipboardy": "^1.1.0",
"@types/fs-extra": "=5.0.2",
"@types/glob": "^5.0.35",
"@types/mocha": "^5.2.5",
Expand All @@ -688,7 +688,7 @@
"azure-arm-resource": "^3.1.1-preview",
"azure-arm-storage": "^5.1.1-preview",
"azure-storage": "^2.10.0",
"copy-paste": "^1.3.0",
"clipboardy": "^1.2.3",
"fs-extra": "^4.0.2",
"glob": "^7.1.2",
"ms-rest": "^2.2.2",
Expand Down
6 changes: 3 additions & 3 deletions src/azureStorageExplorer/blobContainers/blobContainerNode.ts
Expand Up @@ -4,12 +4,12 @@
*--------------------------------------------------------------------------------------------*/

import * as azureStorage from "azure-storage";
import * as copypaste from 'copy-paste';
import * as clipboardy from 'clipboardy';
import * as fse from 'fs-extra';
import * as glob from 'glob';
import * as path from 'path';
import { ProgressLocation, Uri } from 'vscode';
import * as vscode from 'vscode';
import { ProgressLocation, Uri } from 'vscode';
import { AzureParentTreeItem, AzureTreeItem, DialogResponses, IActionContext, parseError, TelemetryProperties, UserCancelledError } from 'vscode-azureextensionui';
import { awaitWithProgress } from '../../components/progress';
import { ext } from "../../extensionVariables";
Expand Down Expand Up @@ -132,7 +132,7 @@ export class BlobContainerTreeItem extends AzureParentTreeItem<IStorageRoot> imp
public async copyUrl(): Promise<void> {
let blobService = this.root.createBlobService();
let url = blobService.getUrl(this.container.name);
copypaste.copy(url);
await clipboardy.write(url);
ext.outputChannel.show();
ext.outputChannel.appendLine(`Container URL copied to clipboard: ${url}`);
}
Expand Down
4 changes: 2 additions & 2 deletions src/azureStorageExplorer/blobContainers/blobNode.ts
Expand Up @@ -4,7 +4,7 @@
**/

import * as azureStorage from "azure-storage";
import * as copypaste from 'copy-paste';
import * as clipboardy from 'clipboardy';
import * as path from 'path';
import { SaveDialogOptions, Uri, window } from 'vscode';
import { AzureParentTreeItem, AzureTreeItem, DialogResponses, UserCancelledError } from 'vscode-azureextensionui';
Expand Down Expand Up @@ -33,7 +33,7 @@ export class BlobTreeItem extends AzureTreeItem<IStorageRoot> implements ICopyUr
public async copyUrl(): Promise<void> {
let blobService = this.root.createBlobService();
let url = blobService.getUrl(this.container.name, this.blob.name);
copypaste.copy(url);
await clipboardy.write(url);
ext.outputChannel.show();
ext.outputChannel.appendLine(`Blob URL copied to clipboard: ${url}`);
}
Expand Down
4 changes: 2 additions & 2 deletions src/azureStorageExplorer/fileShares/directoryNode.ts
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import * as azureStorage from "azure-storage";
import * as copypaste from 'copy-paste';
import * as clipboardy from 'clipboardy';
import * as path from 'path';
import { Uri, window } from 'vscode';
import { AzureParentTreeItem, DialogResponses, UserCancelledError } from 'vscode-azureextensionui';
Expand Down Expand Up @@ -63,7 +63,7 @@ export class DirectoryTreeItem extends AzureParentTreeItem<IStorageRoot> impleme
public async copyUrl(): Promise<void> {
let fileService = this.root.createFileService();
let url = fileService.getUrl(this.share.name, this.fullPath);
copypaste.copy(url);
await clipboardy.write(url);
ext.outputChannel.show();
ext.outputChannel.appendLine(`Directory URL copied to clipboard: ${url}`);
}
Expand Down
4 changes: 2 additions & 2 deletions src/azureStorageExplorer/fileShares/fileNode.ts
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import * as azureStorage from "azure-storage";
import * as copypaste from 'copy-paste';
import * as clipboardy from 'clipboardy';
import * as path from 'path';
import { Uri, window } from 'vscode';
import { AzureParentTreeItem, AzureTreeItem, DialogResponses, UserCancelledError } from 'vscode-azureextensionui';
Expand Down Expand Up @@ -35,7 +35,7 @@ export class FileTreeItem extends AzureTreeItem<IStorageRoot> implements ICopyUr
public async copyUrl(): Promise<void> {
let fileService = this.root.createFileService();
let url = fileService.getUrl(this.share.name, this.directoryPath, this.file.name);
copypaste.copy(url);
await clipboardy.write(url);
ext.outputChannel.show();
ext.outputChannel.appendLine(`File URL copied to clipboard: ${url}`);
}
Expand Down
4 changes: 2 additions & 2 deletions src/azureStorageExplorer/fileShares/fileShareNode.ts
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import * as azureStorage from "azure-storage";
import * as copypaste from 'copy-paste';
import * as clipboardy from 'clipboardy';
import * as path from 'path';
import { Uri, window } from 'vscode';
import { AzureParentTreeItem, DialogResponses, UserCancelledError } from 'vscode-azureextensionui';
Expand Down Expand Up @@ -57,7 +57,7 @@ export class FileShareTreeItem extends AzureParentTreeItem<IStorageRoot> impleme
public async copyUrl(): Promise<void> {
let fileService = this.root.createFileService();
let url = fileService.getUrl(this.share.name, "");
copypaste.copy(url);
await clipboardy.write(url);
ext.outputChannel.show();
ext.outputChannel.appendLine(`Share URL copied to clipboard: ${url}`);
}
Expand Down
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as copypaste from 'copy-paste';
import * as clipboardy from 'clipboardy';
import * as vscode from "vscode";
import { IActionContext, registerCommand, TelemetryProperties } from 'vscode-azureextensionui';
import * as ext from "../../constants";
Expand All @@ -27,12 +27,12 @@ async function openStorageAccountInStorageExplorer(treeItem: StorageAccountTreeI
}

async function copyPrimaryKey(treeItem: StorageAccountTreeItem): Promise<void> {
copypaste.copy(treeItem.key.value);
await clipboardy.write(treeItem.key.value);
}

async function copyConnectionString(treeItem: StorageAccountTreeItem): Promise<void> {
let connectionString = await treeItem.getConnectionString();
copypaste.copy(connectionString);
await clipboardy.write(connectionString);
}

async function deployStaticWebsite(this: IActionContext, target?: vscode.Uri | StorageAccountTreeItem | BlobContainerTreeItem): Promise<void> {
Expand Down
79 changes: 45 additions & 34 deletions thirdpartynotices.txt
Expand Up @@ -7,9 +7,9 @@ are grateful to these developers for their contribution to open source.

1. node-winreg (https://github.com/fresc81/node-winreg)
2. fs-extra (https://github.com/jprichardson/node-fs-extra)
3. copy-paste (https://github.com/xavi-/node-copy-paste)
4. glob (https://github.com/isaacs/node-glob)
5. opn (https://github.com/sindresorhus/opn)
3. glob (https://github.com/isaacs/node-glob)
4. opn (https://github.com/sindresorhus/opn)
5. clipboardy(https://github.com/sindresorhus/clipboardy/)

node-winreg NOTICES BEGIN HERE
=============================
Expand All @@ -33,8 +33,8 @@ Copyright (c) 2011-2017 JP Richardson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Expand All @@ -46,34 +46,6 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE
END OF fs-extra NOTICES AND INFORMATION
==================================

copy-paste NOTICES BEGIN HERE
=============================

The MIT License (MIT)

Copyright (c) 2014

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

END OF copy-paste NOTICES AND INFORMATION
==================================

glob NOTICES BEGIN HERE
=============================

Expand All @@ -99,5 +71,44 @@ END OF glob NOTICES AND INFORMATION
opn NOTICES BEGIN HERE
=============================

END OF glob NOTICES AND INFORMATION
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

END OF opn NOTICES AND INFORMATION
==================================


clipboardy NOTICES BEGIN HERE
=============================

MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

END OF clipboardy NOTICES AND INFORMATION
==================================

0 comments on commit 51e2d9c

Please sign in to comment.