@microsoft/vscode-azext-utils
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -0,0 +0,0 @@ import { AzureResourcesExtensionApi } from '@microsoft/vscode-azureresources-api'; |
@@ -0,0 +0,0 @@ MIT License |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -16,3 +16,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ReadOnlyContent = exports.openReadOnlyContent = exports.openReadOnlyJson = void 0; | ||
exports.ReadOnlyContent = exports.disposeReadOnlyContent = exports.disposeReadOnlyContents = exports.openReadOnlyContent = exports.stashReadOnlyContent = exports.openReadOnlyJson = void 0; | ||
const util_1 = require("util"); | ||
@@ -56,2 +56,9 @@ const vscode_1 = require("vscode"); | ||
exports.openReadOnlyJson = openReadOnlyJson; | ||
function stashReadOnlyContent(node, content, fileExtension) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const contentProvider = getContentProvider(); | ||
return yield contentProvider.stashReadOnlyContent(node, content, fileExtension); | ||
}); | ||
} | ||
exports.stashReadOnlyContent = stashReadOnlyContent; | ||
function openReadOnlyContent(node, content, fileExtension, options) { | ||
@@ -64,7 +71,21 @@ return __awaiter(this, void 0, void 0, function* () { | ||
exports.openReadOnlyContent = openReadOnlyContent; | ||
function disposeReadOnlyContents() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const contentProvider = getContentProvider(); | ||
contentProvider.disposeAll(); | ||
}); | ||
} | ||
exports.disposeReadOnlyContents = disposeReadOnlyContents; | ||
function disposeReadOnlyContent(uri) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const contentProvider = getContentProvider(); | ||
contentProvider.dispose(uri); | ||
}); | ||
} | ||
exports.disposeReadOnlyContent = disposeReadOnlyContent; | ||
class ReadOnlyContent { | ||
constructor(uri, emitter, content) { | ||
this._uri = uri; | ||
this._emitter = emitter; | ||
this._content = content; | ||
this.uri = uri; | ||
} | ||
@@ -77,3 +98,3 @@ get content() { | ||
this._content += content; | ||
this._emitter.fire(this._uri); | ||
this._emitter.fire(this.uri); | ||
}); | ||
@@ -83,3 +104,3 @@ } | ||
this._content = ''; | ||
this._emitter.fire(this._uri); | ||
this._emitter.fire(this.uri); | ||
} | ||
@@ -96,3 +117,3 @@ } | ||
} | ||
openReadOnlyContent(node, content, fileExtension, options) { | ||
stashReadOnlyContent(node, content, fileExtension) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -106,7 +127,13 @@ const scheme = getScheme(); | ||
this._contentMap.set(uri.toString(), readOnlyContent); | ||
yield vscode_1.window.showTextDocument(uri, options); | ||
this._onDidChangeEmitter.fire(uri); | ||
return readOnlyContent; | ||
}); | ||
} | ||
openReadOnlyContent(node, content, fileExtension, options) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const readOnlyContent = yield this.stashReadOnlyContent(node, content, fileExtension); | ||
yield vscode_1.window.showTextDocument(readOnlyContent.uri, options); | ||
this._onDidChangeEmitter.fire(readOnlyContent.uri); | ||
return readOnlyContent; | ||
}); | ||
} | ||
provideTextDocumentContent(uri, _token) { | ||
@@ -118,3 +145,9 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
dispose(uri) { | ||
this._contentMap.delete(uri.toString()); | ||
} | ||
disposeAll() { | ||
this._contentMap.clear(); | ||
} | ||
} | ||
//# sourceMappingURL=openReadOnlyContent.js.map |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "@microsoft/vscode-azext-utils", | ||
"author": "Microsoft Corporation", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Common UI tools for developing Azure extensions for VS Code", | ||
@@ -6,0 +6,0 @@ "tags": [ |
@@ -0,0 +0,0 @@ # VSCode Azure SDK for Node.js - UI Tools (Preview) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
436438
8319
2