@difizen/libro-language-client 0.1.18
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/LICENSE +21 -0
- package/README.md +0 -0
- package/es/common/api.d.ts +38 -0
- package/es/common/api.d.ts.map +1 -0
- package/es/common/api.js +9 -0
- package/es/common/callHierarchy.d.ts +39 -0
- package/es/common/callHierarchy.d.ts.map +1 -0
- package/es/common/callHierarchy.js +139 -0
- package/es/common/client.d.ts +482 -0
- package/es/common/client.d.ts.map +1 -0
- package/es/common/client.js +2731 -0
- package/es/common/codeAction.d.ts +22 -0
- package/es/common/codeAction.d.ts.map +1 -0
- package/es/common/codeAction.js +149 -0
- package/es/common/codeConverter.d.ts +81 -0
- package/es/common/codeConverter.d.ts.map +1 -0
- package/es/common/codeConverter.js +1040 -0
- package/es/common/codeLens.d.ts +26 -0
- package/es/common/codeLens.d.ts.map +1 -0
- package/es/common/codeLens.js +125 -0
- package/es/common/colorProvider.d.ts +27 -0
- package/es/common/colorProvider.d.ts.map +1 -0
- package/es/common/colorProvider.js +104 -0
- package/es/common/completion.d.ts +22 -0
- package/es/common/completion.d.ts.map +1 -0
- package/es/common/completion.js +130 -0
- package/es/common/configuration.d.ts +71 -0
- package/es/common/configuration.d.ts.map +1 -0
- package/es/common/configuration.js +292 -0
- package/es/common/declaration.d.ts +18 -0
- package/es/common/declaration.d.ts.map +1 -0
- package/es/common/declaration.js +88 -0
- package/es/common/definition.d.ts +18 -0
- package/es/common/definition.d.ts.map +1 -0
- package/es/common/definition.js +80 -0
- package/es/common/diagnostic.d.ts +125 -0
- package/es/common/diagnostic.d.ts.map +1 -0
- package/es/common/diagnostic.js +1442 -0
- package/es/common/documentHighlight.d.ts +17 -0
- package/es/common/documentHighlight.d.ts.map +1 -0
- package/es/common/documentHighlight.js +73 -0
- package/es/common/documentLink.d.ts +21 -0
- package/es/common/documentLink.d.ts.map +1 -0
- package/es/common/documentLink.js +90 -0
- package/es/common/documentSymbol.d.ts +20 -0
- package/es/common/documentSymbol.d.ts.map +1 -0
- package/es/common/documentSymbol.js +134 -0
- package/es/common/executeCommand.d.ts +22 -0
- package/es/common/executeCommand.d.ts.map +1 -0
- package/es/common/executeCommand.js +117 -0
- package/es/common/features.d.ts +421 -0
- package/es/common/features.d.ts.map +1 -0
- package/es/common/features.js +576 -0
- package/es/common/fileOperations.d.ts +118 -0
- package/es/common/fileOperations.d.ts.map +1 -0
- package/es/common/fileOperations.js +705 -0
- package/es/common/fileSystemWatcher.d.ts +19 -0
- package/es/common/fileSystemWatcher.d.ts.map +1 -0
- package/es/common/fileSystemWatcher.js +173 -0
- package/es/common/foldingRange.d.ts +22 -0
- package/es/common/foldingRange.d.ts.map +1 -0
- package/es/common/foldingRange.js +127 -0
- package/es/common/formatting.d.ts +41 -0
- package/es/common/formatting.d.ts.map +1 -0
- package/es/common/formatting.js +233 -0
- package/es/common/hover.d.ts +18 -0
- package/es/common/hover.d.ts.map +1 -0
- package/es/common/hover.js +80 -0
- package/es/common/implementation.d.ts +18 -0
- package/es/common/implementation.d.ts.map +1 -0
- package/es/common/implementation.js +88 -0
- package/es/common/inlayHint.d.ts +23 -0
- package/es/common/inlayHint.d.ts.map +1 -0
- package/es/common/inlayHint.js +187 -0
- package/es/common/inlineCompletion.d.ts +20 -0
- package/es/common/inlineCompletion.d.ts.map +1 -0
- package/es/common/inlineCompletion.js +74 -0
- package/es/common/inlineValue.d.ts +21 -0
- package/es/common/inlineValue.d.ts.map +1 -0
- package/es/common/inlineValue.js +124 -0
- package/es/common/linkedEditingRange.d.ts +23 -0
- package/es/common/linkedEditingRange.d.ts.map +1 -0
- package/es/common/linkedEditingRange.js +94 -0
- package/es/common/notebook.d.ts +97 -0
- package/es/common/notebook.d.ts.map +1 -0
- package/es/common/notebook.js +1444 -0
- package/es/common/progress.d.ts +12 -0
- package/es/common/progress.d.ts.map +1 -0
- package/es/common/progress.js +75 -0
- package/es/common/progressPart.d.ts +25 -0
- package/es/common/progressPart.d.ts.map +1 -0
- package/es/common/progressPart.js +147 -0
- package/es/common/protocolCallHierarchyItem.d.ts +9 -0
- package/es/common/protocolCallHierarchyItem.d.ts.map +1 -0
- package/es/common/protocolCallHierarchyItem.js +34 -0
- package/es/common/protocolCodeAction.d.ts +7 -0
- package/es/common/protocolCodeAction.d.ts.map +1 -0
- package/es/common/protocolCodeAction.js +32 -0
- package/es/common/protocolCodeLens.d.ts +7 -0
- package/es/common/protocolCodeLens.d.ts.map +1 -0
- package/es/common/protocolCodeLens.js +29 -0
- package/es/common/protocolCompletionItem.d.ts +13 -0
- package/es/common/protocolCompletionItem.d.ts.map +1 -0
- package/es/common/protocolCompletionItem.js +29 -0
- package/es/common/protocolConverter.d.ts +174 -0
- package/es/common/protocolConverter.d.ts.map +1 -0
- package/es/common/protocolConverter.js +1982 -0
- package/es/common/protocolDiagnostic.d.ts +20 -0
- package/es/common/protocolDiagnostic.d.ts.map +1 -0
- package/es/common/protocolDiagnostic.js +46 -0
- package/es/common/protocolDocumentLink.d.ts +8 -0
- package/es/common/protocolDocumentLink.d.ts.map +1 -0
- package/es/common/protocolDocumentLink.js +29 -0
- package/es/common/protocolInlayHint.d.ts +8 -0
- package/es/common/protocolInlayHint.d.ts.map +1 -0
- package/es/common/protocolInlayHint.js +29 -0
- package/es/common/protocolTypeHierarchyItem.d.ts +9 -0
- package/es/common/protocolTypeHierarchyItem.d.ts.map +1 -0
- package/es/common/protocolTypeHierarchyItem.js +34 -0
- package/es/common/protocolWorkspaceSymbol.d.ts +9 -0
- package/es/common/protocolWorkspaceSymbol.d.ts.map +1 -0
- package/es/common/protocolWorkspaceSymbol.js +36 -0
- package/es/common/reference.d.ts +22 -0
- package/es/common/reference.d.ts.map +1 -0
- package/es/common/reference.js +78 -0
- package/es/common/rename.d.ts +29 -0
- package/es/common/rename.d.ts.map +1 -0
- package/es/common/rename.js +132 -0
- package/es/common/selectionRange.d.ts +18 -0
- package/es/common/selectionRange.d.ts.map +1 -0
- package/es/common/selectionRange.js +108 -0
- package/es/common/semanticTokens.d.ts +36 -0
- package/es/common/semanticTokens.d.ts.map +1 -0
- package/es/common/semanticTokens.js +226 -0
- package/es/common/signatureHelp.d.ts +18 -0
- package/es/common/signatureHelp.d.ts.map +1 -0
- package/es/common/signatureHelp.js +103 -0
- package/es/common/textSynchronization.d.ts +104 -0
- package/es/common/textSynchronization.d.ts.map +1 -0
- package/es/common/textSynchronization.js +771 -0
- package/es/common/typeDefinition.d.ts +18 -0
- package/es/common/typeDefinition.d.ts.map +1 -0
- package/es/common/typeDefinition.js +89 -0
- package/es/common/typeHierarchy.d.ts +33 -0
- package/es/common/typeHierarchy.d.ts.map +1 -0
- package/es/common/typeHierarchy.js +138 -0
- package/es/common/utils/async.d.ts +42 -0
- package/es/common/utils/async.d.ts.map +1 -0
- package/es/common/utils/async.js +441 -0
- package/es/common/utils/is.d.ts +13 -0
- package/es/common/utils/is.d.ts.map +1 -0
- package/es/common/utils/is.js +52 -0
- package/es/common/utils/uuid.d.ts +23 -0
- package/es/common/utils/uuid.d.ts.map +1 -0
- package/es/common/utils/uuid.js +85 -0
- package/es/common/vscodeAdaptor/convertor.d.ts +7 -0
- package/es/common/vscodeAdaptor/convertor.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/convertor.js +66 -0
- package/es/common/vscodeAdaptor/diagnosticCollection.d.ts +33 -0
- package/es/common/vscodeAdaptor/diagnosticCollection.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/diagnosticCollection.js +310 -0
- package/es/common/vscodeAdaptor/extHostTypes.d.ts +1496 -0
- package/es/common/vscodeAdaptor/extHostTypes.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/extHostTypes.js +3825 -0
- package/es/common/vscodeAdaptor/fileWatcher.d.ts +19 -0
- package/es/common/vscodeAdaptor/fileWatcher.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/fileWatcher.js +45 -0
- package/es/common/vscodeAdaptor/hostTypeUtil.d.ts +192 -0
- package/es/common/vscodeAdaptor/hostTypeUtil.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/hostTypeUtil.js +566 -0
- package/es/common/vscodeAdaptor/libro-fs.d.ts +21 -0
- package/es/common/vscodeAdaptor/libro-fs.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/libro-fs.js +64 -0
- package/es/common/vscodeAdaptor/libroWindow.d.ts +21 -0
- package/es/common/vscodeAdaptor/libroWindow.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/libroWindow.js +75 -0
- package/es/common/vscodeAdaptor/libroWorkspace.d.ts +33 -0
- package/es/common/vscodeAdaptor/libroWorkspace.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/libroWorkspace.js +250 -0
- package/es/common/vscodeAdaptor/lspEnv.d.ts +8 -0
- package/es/common/vscodeAdaptor/lspEnv.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/lspEnv.js +31 -0
- package/es/common/vscodeAdaptor/monaco-converter.d.ts +229 -0
- package/es/common/vscodeAdaptor/monaco-converter.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/monaco-converter.js +1613 -0
- package/es/common/vscodeAdaptor/monacoLanguages.d.ts +48 -0
- package/es/common/vscodeAdaptor/monacoLanguages.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/monacoLanguages.js +484 -0
- package/es/common/vscodeAdaptor/services.d.ts +85 -0
- package/es/common/vscodeAdaptor/services.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/services.js +3 -0
- package/es/common/vscodeAdaptor/typings.d.ts +10 -0
- package/es/common/vscodeAdaptor/util.d.ts +3 -0
- package/es/common/vscodeAdaptor/util.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/util.js +6 -0
- package/es/common/vscodeAdaptor/vscodeAdaptor.d.ts +77 -0
- package/es/common/vscodeAdaptor/vscodeAdaptor.d.ts.map +1 -0
- package/es/common/vscodeAdaptor/vscodeAdaptor.js +124 -0
- package/es/common/workspaceFolder.d.ts +32 -0
- package/es/common/workspaceFolder.d.ts.map +1 -0
- package/es/common/workspaceFolder.js +204 -0
- package/es/common/workspaceSymbol.d.ts +21 -0
- package/es/common/workspaceSymbol.d.ts.map +1 -0
- package/es/common/workspaceSymbol.js +101 -0
- package/es/constants.d.ts +2 -0
- package/es/constants.d.ts.map +1 -0
- package/es/constants.js +1 -0
- package/es/index.d.ts +6 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +5 -0
- package/es/libro-language-client-contribution.d.ts +10 -0
- package/es/libro-language-client-contribution.d.ts.map +1 -0
- package/es/libro-language-client-contribution.js +143 -0
- package/es/libro-language-client-manager.d.ts +34 -0
- package/es/libro-language-client-manager.d.ts.map +1 -0
- package/es/libro-language-client-manager.js +277 -0
- package/es/libro-language-client.d.ts +27 -0
- package/es/libro-language-client.d.ts.map +1 -0
- package/es/libro-language-client.js +141 -0
- package/es/module.d.ts +3 -0
- package/es/module.d.ts.map +1 -0
- package/es/module.js +13 -0
- package/package.json +69 -0
- package/src/common/api.ts +155 -0
- package/src/common/callHierarchy.ts +269 -0
- package/src/common/client.ts +3192 -0
- package/src/common/codeAction.ts +237 -0
- package/src/common/codeConverter.ts +1409 -0
- package/src/common/codeLens.ts +188 -0
- package/src/common/colorProvider.ts +192 -0
- package/src/common/completion.ts +281 -0
- package/src/common/configuration.ts +338 -0
- package/src/common/declaration.ts +140 -0
- package/src/common/definition.ts +138 -0
- package/src/common/diagnostic.ts +1408 -0
- package/src/common/documentHighlight.ts +140 -0
- package/src/common/documentLink.ts +180 -0
- package/src/common/documentSymbol.ts +186 -0
- package/src/common/executeCommand.ts +129 -0
- package/src/common/features.ts +1157 -0
- package/src/common/fileOperations.ts +635 -0
- package/src/common/fileSystemWatcher.ts +184 -0
- package/src/common/foldingRange.ts +160 -0
- package/src/common/formatting.ts +465 -0
- package/src/common/hover.ts +133 -0
- package/src/common/implementation.ts +142 -0
- package/src/common/inlayHint.ts +201 -0
- package/src/common/inlineCompletion.ts +160 -0
- package/src/common/inlineValue.ts +158 -0
- package/src/common/linkedEditingRange.ts +141 -0
- package/src/common/notebook.ts +1443 -0
- package/src/common/progress.ts +61 -0
- package/src/common/progressPart.ts +151 -0
- package/src/common/protocolCallHierarchyItem.ts +29 -0
- package/src/common/protocolCodeAction.ts +17 -0
- package/src/common/protocolCodeLens.ts +15 -0
- package/src/common/protocolCompletionItem.ts +22 -0
- package/src/common/protocolConverter.ts +2627 -0
- package/src/common/protocolDiagnostic.ts +47 -0
- package/src/common/protocolDocumentLink.ts +17 -0
- package/src/common/protocolInlayHint.ts +21 -0
- package/src/common/protocolTypeHierarchyItem.ts +29 -0
- package/src/common/protocolWorkspaceSymbol.ts +39 -0
- package/src/common/reference.ts +144 -0
- package/src/common/rename.ts +230 -0
- package/src/common/selectionRange.ts +136 -0
- package/src/common/semanticTokens.ts +383 -0
- package/src/common/signatureHelp.ts +170 -0
- package/src/common/textSynchronization.ts +819 -0
- package/src/common/typeDefinition.ts +146 -0
- package/src/common/typeHierarchy.ts +248 -0
- package/src/common/utils/async.ts +354 -0
- package/src/common/utils/is.ts +63 -0
- package/src/common/utils/uuid.ts +136 -0
- package/src/common/vscodeAdaptor/convertor.ts +73 -0
- package/src/common/vscodeAdaptor/diagnosticCollection.ts +238 -0
- package/src/common/vscodeAdaptor/extHostTypes.ts +4498 -0
- package/src/common/vscodeAdaptor/fileWatcher.ts +36 -0
- package/src/common/vscodeAdaptor/hostTypeUtil.ts +539 -0
- package/src/common/vscodeAdaptor/libro-fs.ts +51 -0
- package/src/common/vscodeAdaptor/libroWindow.ts +85 -0
- package/src/common/vscodeAdaptor/libroWorkspace.ts +261 -0
- package/src/common/vscodeAdaptor/lspEnv.ts +16 -0
- package/src/common/vscodeAdaptor/monaco-converter.ts +1800 -0
- package/src/common/vscodeAdaptor/monacoLanguages.ts +511 -0
- package/src/common/vscodeAdaptor/services.ts +278 -0
- package/src/common/vscodeAdaptor/typings.d.ts +10 -0
- package/src/common/vscodeAdaptor/util.ts +7 -0
- package/src/common/vscodeAdaptor/vscodeAdaptor.ts +122 -0
- package/src/common/workspaceFolder.ts +236 -0
- package/src/common/workspaceSymbol.ts +166 -0
- package/src/constants.ts +1 -0
- package/src/index.spec.ts +7 -0
- package/src/index.ts +5 -0
- package/src/libro-language-client-contribution.ts +49 -0
- package/src/libro-language-client-manager.ts +131 -0
- package/src/libro-language-client.ts +100 -0
- package/src/module.ts +19 -0
|
@@ -0,0 +1,705 @@
|
|
|
1
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
2
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
3
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
7
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
9
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
15
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function (_e) { function e(_x12) { return _e.apply(this, arguments); } e.toString = function () { return _e.toString(); }; return e; }(function (e) { throw e; }), f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function (_e2) { function e(_x13) { return _e2.apply(this, arguments); } e.toString = function () { return _e2.toString(); }; return e; }(function (e) { didErr = true; err = e; }), f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
19
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
20
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
22
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
24
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
25
|
+
/* --------------------------------------------------------------------------------------------
|
|
26
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
27
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
28
|
+
* ------------------------------------------------------------------------------------------ */
|
|
29
|
+
|
|
30
|
+
import * as proto from '@difizen/vscode-languageserver-protocol';
|
|
31
|
+
import * as minimatch from 'minimatch';
|
|
32
|
+
import * as UUID from "./utils/uuid.js";
|
|
33
|
+
import { FileType } from "./vscodeAdaptor/vscodeAdaptor.js";
|
|
34
|
+
import { workspace } from "./vscodeAdaptor/vscodeAdaptor.js";
|
|
35
|
+
function ensure(target, key) {
|
|
36
|
+
if (target[key] === void 0) {
|
|
37
|
+
target[key] = {};
|
|
38
|
+
}
|
|
39
|
+
return target[key];
|
|
40
|
+
}
|
|
41
|
+
function access(target, key) {
|
|
42
|
+
return target[key];
|
|
43
|
+
}
|
|
44
|
+
function assign(target, key, value) {
|
|
45
|
+
target[key] = value;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* File operation middleware
|
|
50
|
+
*
|
|
51
|
+
* @since 3.16.0
|
|
52
|
+
*/
|
|
53
|
+
var FileOperationFeature = /*#__PURE__*/function () {
|
|
54
|
+
// This property must stay private. Otherwise the type `minimatch.IMinimatch` becomes public and as a consequence we would need to
|
|
55
|
+
// ship the d.ts files for minimatch to make the compiler happy when compiling against the vscode-languageclient library
|
|
56
|
+
|
|
57
|
+
function FileOperationFeature(client, event, registrationType, clientCapability, serverCapability) {
|
|
58
|
+
_classCallCheck(this, FileOperationFeature);
|
|
59
|
+
this._client = client;
|
|
60
|
+
this._event = event;
|
|
61
|
+
this._registrationType = registrationType;
|
|
62
|
+
this._clientCapability = clientCapability;
|
|
63
|
+
this._serverCapability = serverCapability;
|
|
64
|
+
this._filters = new Map();
|
|
65
|
+
}
|
|
66
|
+
_createClass(FileOperationFeature, [{
|
|
67
|
+
key: "getState",
|
|
68
|
+
value: function getState() {
|
|
69
|
+
return {
|
|
70
|
+
kind: 'workspace',
|
|
71
|
+
id: this._registrationType.method,
|
|
72
|
+
registrations: this._filters.size > 0
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
key: "filterSize",
|
|
77
|
+
value: function filterSize() {
|
|
78
|
+
return this._filters.size;
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
key: "registrationType",
|
|
82
|
+
get: function get() {
|
|
83
|
+
return this._registrationType;
|
|
84
|
+
}
|
|
85
|
+
}, {
|
|
86
|
+
key: "fillClientCapabilities",
|
|
87
|
+
value: function fillClientCapabilities(capabilities) {
|
|
88
|
+
var value = ensure(ensure(capabilities, 'workspace'), 'fileOperations');
|
|
89
|
+
// this happens n times but it is the same value so we tolerate this.
|
|
90
|
+
assign(value, 'dynamicRegistration', true);
|
|
91
|
+
assign(value, this._clientCapability, true);
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
key: "initialize",
|
|
95
|
+
value: function initialize(capabilities) {
|
|
96
|
+
var _capabilities$workspa;
|
|
97
|
+
var options = (_capabilities$workspa = capabilities.workspace) === null || _capabilities$workspa === void 0 ? void 0 : _capabilities$workspa.fileOperations;
|
|
98
|
+
var capability = options !== undefined ? access(options, this._serverCapability) : undefined;
|
|
99
|
+
if ((capability === null || capability === void 0 ? void 0 : capability.filters) !== undefined) {
|
|
100
|
+
try {
|
|
101
|
+
this.register({
|
|
102
|
+
id: UUID.generateUuid(),
|
|
103
|
+
registerOptions: {
|
|
104
|
+
filters: capability.filters
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
} catch (e) {
|
|
108
|
+
this._client.warn("Ignoring invalid glob pattern for ".concat(this._serverCapability, " registration: ").concat(e));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "register",
|
|
114
|
+
value: function register(data) {
|
|
115
|
+
if (!this._listener) {
|
|
116
|
+
this._listener = this._event(this.send, this);
|
|
117
|
+
}
|
|
118
|
+
var minimatchFilter = data.registerOptions.filters.map(function (filter) {
|
|
119
|
+
var matcher = new minimatch.Minimatch(filter.pattern.glob, FileOperationFeature.asMinimatchOptions(filter.pattern.options));
|
|
120
|
+
if (!matcher.makeRe()) {
|
|
121
|
+
throw new Error("Invalid pattern ".concat(filter.pattern.glob, "!"));
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
scheme: filter.scheme,
|
|
125
|
+
matcher: matcher,
|
|
126
|
+
kind: filter.pattern.matches
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
this._filters.set(data.id, minimatchFilter);
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
key: "unregister",
|
|
133
|
+
value: function unregister(id) {
|
|
134
|
+
this._filters.delete(id);
|
|
135
|
+
if (this._filters.size === 0 && this._listener) {
|
|
136
|
+
this._listener.dispose();
|
|
137
|
+
this._listener = undefined;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}, {
|
|
141
|
+
key: "clear",
|
|
142
|
+
value: function clear() {
|
|
143
|
+
this._filters.clear();
|
|
144
|
+
if (this._listener) {
|
|
145
|
+
this._listener.dispose();
|
|
146
|
+
this._listener = undefined;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}, {
|
|
150
|
+
key: "getFileType",
|
|
151
|
+
value: function getFileType(uri) {
|
|
152
|
+
return FileOperationFeature.getFileType(uri);
|
|
153
|
+
}
|
|
154
|
+
}, {
|
|
155
|
+
key: "filter",
|
|
156
|
+
value: function () {
|
|
157
|
+
var _filter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(event, prop) {
|
|
158
|
+
var _this = this;
|
|
159
|
+
var fileMatches, files;
|
|
160
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
161
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
162
|
+
case 0:
|
|
163
|
+
_context2.next = 2;
|
|
164
|
+
return Promise.all(event.files.map( /*#__PURE__*/function () {
|
|
165
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(item) {
|
|
166
|
+
var uri, path, _iterator, _step, filters, _iterator2, _step2, _filter2, fileType, _fileType;
|
|
167
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
168
|
+
while (1) switch (_context.prev = _context.next) {
|
|
169
|
+
case 0:
|
|
170
|
+
uri = prop(item); // Use fsPath to make this consistent with file system watchers but help
|
|
171
|
+
// minimatch to use '/' instead of `\\` if present.
|
|
172
|
+
path = uri.fsPath.replace(/\\/g, '/');
|
|
173
|
+
_iterator = _createForOfIteratorHelper(_this._filters.values());
|
|
174
|
+
_context.prev = 3;
|
|
175
|
+
_iterator.s();
|
|
176
|
+
case 5:
|
|
177
|
+
if ((_step = _iterator.n()).done) {
|
|
178
|
+
_context.next = 45;
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
filters = _step.value;
|
|
182
|
+
_iterator2 = _createForOfIteratorHelper(filters);
|
|
183
|
+
_context.prev = 8;
|
|
184
|
+
_iterator2.s();
|
|
185
|
+
case 10:
|
|
186
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
187
|
+
_context.next = 35;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
_filter2 = _step2.value;
|
|
191
|
+
if (!(_filter2.scheme !== undefined && _filter2.scheme !== uri.scheme)) {
|
|
192
|
+
_context.next = 14;
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
return _context.abrupt("continue", 33);
|
|
196
|
+
case 14:
|
|
197
|
+
if (!_filter2.matcher.match(path)) {
|
|
198
|
+
_context.next = 27;
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
if (!(_filter2.kind === undefined)) {
|
|
202
|
+
_context.next = 17;
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
return _context.abrupt("return", true);
|
|
206
|
+
case 17:
|
|
207
|
+
_context.next = 19;
|
|
208
|
+
return _this.getFileType(uri);
|
|
209
|
+
case 19:
|
|
210
|
+
fileType = _context.sent;
|
|
211
|
+
if (!(fileType === undefined)) {
|
|
212
|
+
_context.next = 23;
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
_this._client.error("Failed to determine file type for ".concat(uri.toString(), "."));
|
|
216
|
+
return _context.abrupt("return", true);
|
|
217
|
+
case 23:
|
|
218
|
+
if (!(fileType === FileType.File && _filter2.kind === proto.FileOperationPatternKind.file || fileType === FileType.Directory && _filter2.kind === proto.FileOperationPatternKind.folder)) {
|
|
219
|
+
_context.next = 25;
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
return _context.abrupt("return", true);
|
|
223
|
+
case 25:
|
|
224
|
+
_context.next = 33;
|
|
225
|
+
break;
|
|
226
|
+
case 27:
|
|
227
|
+
if (!(_filter2.kind === proto.FileOperationPatternKind.folder)) {
|
|
228
|
+
_context.next = 33;
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
_context.next = 30;
|
|
232
|
+
return FileOperationFeature.getFileType(uri);
|
|
233
|
+
case 30:
|
|
234
|
+
_fileType = _context.sent;
|
|
235
|
+
if (!(_fileType === FileType.Directory && _filter2.matcher.match("".concat(path, "/")))) {
|
|
236
|
+
_context.next = 33;
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
return _context.abrupt("return", true);
|
|
240
|
+
case 33:
|
|
241
|
+
_context.next = 10;
|
|
242
|
+
break;
|
|
243
|
+
case 35:
|
|
244
|
+
_context.next = 40;
|
|
245
|
+
break;
|
|
246
|
+
case 37:
|
|
247
|
+
_context.prev = 37;
|
|
248
|
+
_context.t0 = _context["catch"](8);
|
|
249
|
+
_iterator2.e(_context.t0);
|
|
250
|
+
case 40:
|
|
251
|
+
_context.prev = 40;
|
|
252
|
+
_iterator2.f();
|
|
253
|
+
return _context.finish(40);
|
|
254
|
+
case 43:
|
|
255
|
+
_context.next = 5;
|
|
256
|
+
break;
|
|
257
|
+
case 45:
|
|
258
|
+
_context.next = 50;
|
|
259
|
+
break;
|
|
260
|
+
case 47:
|
|
261
|
+
_context.prev = 47;
|
|
262
|
+
_context.t1 = _context["catch"](3);
|
|
263
|
+
_iterator.e(_context.t1);
|
|
264
|
+
case 50:
|
|
265
|
+
_context.prev = 50;
|
|
266
|
+
_iterator.f();
|
|
267
|
+
return _context.finish(50);
|
|
268
|
+
case 53:
|
|
269
|
+
return _context.abrupt("return", false);
|
|
270
|
+
case 54:
|
|
271
|
+
case "end":
|
|
272
|
+
return _context.stop();
|
|
273
|
+
}
|
|
274
|
+
}, _callee, null, [[3, 47, 50, 53], [8, 37, 40, 43]]);
|
|
275
|
+
}));
|
|
276
|
+
return function (_x3) {
|
|
277
|
+
return _ref.apply(this, arguments);
|
|
278
|
+
};
|
|
279
|
+
}()));
|
|
280
|
+
case 2:
|
|
281
|
+
fileMatches = _context2.sent;
|
|
282
|
+
// Filter the files to those that matched.
|
|
283
|
+
files = event.files.filter(function (_, index) {
|
|
284
|
+
return fileMatches[index];
|
|
285
|
+
});
|
|
286
|
+
return _context2.abrupt("return", _objectSpread(_objectSpread({}, event), {}, {
|
|
287
|
+
files: files
|
|
288
|
+
}));
|
|
289
|
+
case 5:
|
|
290
|
+
case "end":
|
|
291
|
+
return _context2.stop();
|
|
292
|
+
}
|
|
293
|
+
}, _callee2);
|
|
294
|
+
}));
|
|
295
|
+
function filter(_x, _x2) {
|
|
296
|
+
return _filter.apply(this, arguments);
|
|
297
|
+
}
|
|
298
|
+
return filter;
|
|
299
|
+
}()
|
|
300
|
+
}], [{
|
|
301
|
+
key: "getFileType",
|
|
302
|
+
value: function () {
|
|
303
|
+
var _getFileType = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(uri) {
|
|
304
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
305
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
306
|
+
case 0:
|
|
307
|
+
_context3.prev = 0;
|
|
308
|
+
_context3.next = 3;
|
|
309
|
+
return workspace.fs.stat(uri);
|
|
310
|
+
case 3:
|
|
311
|
+
return _context3.abrupt("return", _context3.sent.type);
|
|
312
|
+
case 6:
|
|
313
|
+
_context3.prev = 6;
|
|
314
|
+
_context3.t0 = _context3["catch"](0);
|
|
315
|
+
return _context3.abrupt("return", undefined);
|
|
316
|
+
case 9:
|
|
317
|
+
case "end":
|
|
318
|
+
return _context3.stop();
|
|
319
|
+
}
|
|
320
|
+
}, _callee3, null, [[0, 6]]);
|
|
321
|
+
}));
|
|
322
|
+
function getFileType(_x4) {
|
|
323
|
+
return _getFileType.apply(this, arguments);
|
|
324
|
+
}
|
|
325
|
+
return getFileType;
|
|
326
|
+
}()
|
|
327
|
+
}, {
|
|
328
|
+
key: "asMinimatchOptions",
|
|
329
|
+
value: function asMinimatchOptions(options) {
|
|
330
|
+
// The spec doesn't state that dot files don't match. So we make
|
|
331
|
+
// matching those the default.
|
|
332
|
+
var result = {
|
|
333
|
+
dot: true
|
|
334
|
+
};
|
|
335
|
+
if ((options === null || options === void 0 ? void 0 : options.ignoreCase) === true) {
|
|
336
|
+
result.nocase = true;
|
|
337
|
+
}
|
|
338
|
+
return result;
|
|
339
|
+
}
|
|
340
|
+
}]);
|
|
341
|
+
return FileOperationFeature;
|
|
342
|
+
}();
|
|
343
|
+
var NotificationFileOperationFeature = /*#__PURE__*/function (_FileOperationFeature) {
|
|
344
|
+
_inherits(NotificationFileOperationFeature, _FileOperationFeature);
|
|
345
|
+
var _super = _createSuper(NotificationFileOperationFeature);
|
|
346
|
+
function NotificationFileOperationFeature(client, event, notificationType, clientCapability, serverCapability, accessUri, createParams) {
|
|
347
|
+
var _this2;
|
|
348
|
+
_classCallCheck(this, NotificationFileOperationFeature);
|
|
349
|
+
_this2 = _super.call(this, client, event, notificationType, clientCapability, serverCapability);
|
|
350
|
+
_this2._notificationType = notificationType;
|
|
351
|
+
_this2._accessUri = accessUri;
|
|
352
|
+
_this2._createParams = createParams;
|
|
353
|
+
return _this2;
|
|
354
|
+
}
|
|
355
|
+
_createClass(NotificationFileOperationFeature, [{
|
|
356
|
+
key: "send",
|
|
357
|
+
value: function () {
|
|
358
|
+
var _send = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(originalEvent) {
|
|
359
|
+
var _this3 = this;
|
|
360
|
+
var filteredEvent, _next2;
|
|
361
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
362
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
363
|
+
case 0:
|
|
364
|
+
_context5.next = 2;
|
|
365
|
+
return this.filter(originalEvent, this._accessUri);
|
|
366
|
+
case 2:
|
|
367
|
+
filteredEvent = _context5.sent;
|
|
368
|
+
if (!filteredEvent.files.length) {
|
|
369
|
+
_context5.next = 6;
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
_next2 = /*#__PURE__*/function () {
|
|
373
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(event) {
|
|
374
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
375
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
376
|
+
case 0:
|
|
377
|
+
return _context4.abrupt("return", _this3._client.sendNotification(_this3._notificationType, _this3._createParams(event)));
|
|
378
|
+
case 1:
|
|
379
|
+
case "end":
|
|
380
|
+
return _context4.stop();
|
|
381
|
+
}
|
|
382
|
+
}, _callee4);
|
|
383
|
+
}));
|
|
384
|
+
return function _next2(_x6) {
|
|
385
|
+
return _ref2.apply(this, arguments);
|
|
386
|
+
};
|
|
387
|
+
}();
|
|
388
|
+
return _context5.abrupt("return", this.doSend(filteredEvent, _next2));
|
|
389
|
+
case 6:
|
|
390
|
+
case "end":
|
|
391
|
+
return _context5.stop();
|
|
392
|
+
}
|
|
393
|
+
}, _callee5, this);
|
|
394
|
+
}));
|
|
395
|
+
function send(_x5) {
|
|
396
|
+
return _send.apply(this, arguments);
|
|
397
|
+
}
|
|
398
|
+
return send;
|
|
399
|
+
}()
|
|
400
|
+
}]);
|
|
401
|
+
return NotificationFileOperationFeature;
|
|
402
|
+
}(FileOperationFeature);
|
|
403
|
+
var CachingNotificationFileOperationFeature = /*#__PURE__*/function (_NotificationFileOper) {
|
|
404
|
+
_inherits(CachingNotificationFileOperationFeature, _NotificationFileOper);
|
|
405
|
+
var _super2 = _createSuper(CachingNotificationFileOperationFeature);
|
|
406
|
+
function CachingNotificationFileOperationFeature() {
|
|
407
|
+
var _this4;
|
|
408
|
+
_classCallCheck(this, CachingNotificationFileOperationFeature);
|
|
409
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
410
|
+
args[_key] = arguments[_key];
|
|
411
|
+
}
|
|
412
|
+
_this4 = _super2.call.apply(_super2, [this].concat(args));
|
|
413
|
+
_this4._fsPathFileTypes = new Map();
|
|
414
|
+
return _this4;
|
|
415
|
+
}
|
|
416
|
+
_createClass(CachingNotificationFileOperationFeature, [{
|
|
417
|
+
key: "getFileType",
|
|
418
|
+
value: function () {
|
|
419
|
+
var _getFileType2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(uri) {
|
|
420
|
+
var fsPath, type;
|
|
421
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
422
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
423
|
+
case 0:
|
|
424
|
+
fsPath = uri.fsPath;
|
|
425
|
+
if (!this._fsPathFileTypes.has(fsPath)) {
|
|
426
|
+
_context6.next = 3;
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
return _context6.abrupt("return", this._fsPathFileTypes.get(fsPath));
|
|
430
|
+
case 3:
|
|
431
|
+
_context6.next = 5;
|
|
432
|
+
return FileOperationFeature.getFileType(uri);
|
|
433
|
+
case 5:
|
|
434
|
+
type = _context6.sent;
|
|
435
|
+
if (type) {
|
|
436
|
+
this._fsPathFileTypes.set(fsPath, type);
|
|
437
|
+
}
|
|
438
|
+
return _context6.abrupt("return", type);
|
|
439
|
+
case 8:
|
|
440
|
+
case "end":
|
|
441
|
+
return _context6.stop();
|
|
442
|
+
}
|
|
443
|
+
}, _callee6, this);
|
|
444
|
+
}));
|
|
445
|
+
function getFileType(_x7) {
|
|
446
|
+
return _getFileType2.apply(this, arguments);
|
|
447
|
+
}
|
|
448
|
+
return getFileType;
|
|
449
|
+
}()
|
|
450
|
+
}, {
|
|
451
|
+
key: "cacheFileTypes",
|
|
452
|
+
value: function () {
|
|
453
|
+
var _cacheFileTypes = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(event, prop) {
|
|
454
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
455
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
456
|
+
case 0:
|
|
457
|
+
_context7.next = 2;
|
|
458
|
+
return this.filter(event, prop);
|
|
459
|
+
case 2:
|
|
460
|
+
case "end":
|
|
461
|
+
return _context7.stop();
|
|
462
|
+
}
|
|
463
|
+
}, _callee7, this);
|
|
464
|
+
}));
|
|
465
|
+
function cacheFileTypes(_x8, _x9) {
|
|
466
|
+
return _cacheFileTypes.apply(this, arguments);
|
|
467
|
+
}
|
|
468
|
+
return cacheFileTypes;
|
|
469
|
+
}()
|
|
470
|
+
}, {
|
|
471
|
+
key: "clearFileTypeCache",
|
|
472
|
+
value: function clearFileTypeCache() {
|
|
473
|
+
this._fsPathFileTypes.clear();
|
|
474
|
+
}
|
|
475
|
+
}, {
|
|
476
|
+
key: "unregister",
|
|
477
|
+
value: function unregister(id) {
|
|
478
|
+
_get(_getPrototypeOf(CachingNotificationFileOperationFeature.prototype), "unregister", this).call(this, id);
|
|
479
|
+
if (this.filterSize() === 0 && this._willListener) {
|
|
480
|
+
this._willListener.dispose();
|
|
481
|
+
this._willListener = undefined;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}, {
|
|
485
|
+
key: "clear",
|
|
486
|
+
value: function clear() {
|
|
487
|
+
_get(_getPrototypeOf(CachingNotificationFileOperationFeature.prototype), "clear", this).call(this);
|
|
488
|
+
if (this._willListener) {
|
|
489
|
+
this._willListener.dispose();
|
|
490
|
+
this._willListener = undefined;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}]);
|
|
494
|
+
return CachingNotificationFileOperationFeature;
|
|
495
|
+
}(NotificationFileOperationFeature);
|
|
496
|
+
export var DidCreateFilesFeature = /*#__PURE__*/function (_NotificationFileOper2) {
|
|
497
|
+
_inherits(DidCreateFilesFeature, _NotificationFileOper2);
|
|
498
|
+
var _super3 = _createSuper(DidCreateFilesFeature);
|
|
499
|
+
function DidCreateFilesFeature(client) {
|
|
500
|
+
_classCallCheck(this, DidCreateFilesFeature);
|
|
501
|
+
return _super3.call(this, client, workspace.onDidCreateFiles, proto.DidCreateFilesNotification.type, 'didCreate', 'didCreate', function (i) {
|
|
502
|
+
return i;
|
|
503
|
+
}, client.code2ProtocolConverter.asDidCreateFilesParams);
|
|
504
|
+
}
|
|
505
|
+
_createClass(DidCreateFilesFeature, [{
|
|
506
|
+
key: "doSend",
|
|
507
|
+
value: function doSend(event, next) {
|
|
508
|
+
var middleware = this._client.middleware.workspace;
|
|
509
|
+
return middleware !== null && middleware !== void 0 && middleware.didCreateFiles ? middleware.didCreateFiles(event, next) : next(event);
|
|
510
|
+
}
|
|
511
|
+
}]);
|
|
512
|
+
return DidCreateFilesFeature;
|
|
513
|
+
}(NotificationFileOperationFeature);
|
|
514
|
+
export var DidRenameFilesFeature = /*#__PURE__*/function (_CachingNotificationF) {
|
|
515
|
+
_inherits(DidRenameFilesFeature, _CachingNotificationF);
|
|
516
|
+
var _super4 = _createSuper(DidRenameFilesFeature);
|
|
517
|
+
function DidRenameFilesFeature(client) {
|
|
518
|
+
_classCallCheck(this, DidRenameFilesFeature);
|
|
519
|
+
return _super4.call(this, client, workspace.onDidRenameFiles, proto.DidRenameFilesNotification.type, 'didRename', 'didRename', function (i) {
|
|
520
|
+
return i.oldUri;
|
|
521
|
+
}, client.code2ProtocolConverter.asDidRenameFilesParams);
|
|
522
|
+
}
|
|
523
|
+
_createClass(DidRenameFilesFeature, [{
|
|
524
|
+
key: "register",
|
|
525
|
+
value: function register(data) {
|
|
526
|
+
if (!this._willListener) {
|
|
527
|
+
this._willListener = workspace.onWillRenameFiles(this.willRename, this);
|
|
528
|
+
}
|
|
529
|
+
_get(_getPrototypeOf(DidRenameFilesFeature.prototype), "register", this).call(this, data);
|
|
530
|
+
}
|
|
531
|
+
}, {
|
|
532
|
+
key: "willRename",
|
|
533
|
+
value: function willRename(e) {
|
|
534
|
+
e.waitUntil(this.cacheFileTypes(e, function (i) {
|
|
535
|
+
return i.oldUri;
|
|
536
|
+
}));
|
|
537
|
+
}
|
|
538
|
+
}, {
|
|
539
|
+
key: "doSend",
|
|
540
|
+
value: function doSend(event, next) {
|
|
541
|
+
this.clearFileTypeCache();
|
|
542
|
+
var middleware = this._client.middleware.workspace;
|
|
543
|
+
return middleware !== null && middleware !== void 0 && middleware.didRenameFiles ? middleware.didRenameFiles(event, next) : next(event);
|
|
544
|
+
}
|
|
545
|
+
}]);
|
|
546
|
+
return DidRenameFilesFeature;
|
|
547
|
+
}(CachingNotificationFileOperationFeature);
|
|
548
|
+
export var DidDeleteFilesFeature = /*#__PURE__*/function (_CachingNotificationF2) {
|
|
549
|
+
_inherits(DidDeleteFilesFeature, _CachingNotificationF2);
|
|
550
|
+
var _super5 = _createSuper(DidDeleteFilesFeature);
|
|
551
|
+
function DidDeleteFilesFeature(client) {
|
|
552
|
+
_classCallCheck(this, DidDeleteFilesFeature);
|
|
553
|
+
return _super5.call(this, client, workspace.onDidDeleteFiles, proto.DidDeleteFilesNotification.type, 'didDelete', 'didDelete', function (i) {
|
|
554
|
+
return i;
|
|
555
|
+
}, client.code2ProtocolConverter.asDidDeleteFilesParams);
|
|
556
|
+
}
|
|
557
|
+
_createClass(DidDeleteFilesFeature, [{
|
|
558
|
+
key: "register",
|
|
559
|
+
value: function register(data) {
|
|
560
|
+
if (!this._willListener) {
|
|
561
|
+
this._willListener = workspace.onWillDeleteFiles(this.willDelete, this);
|
|
562
|
+
}
|
|
563
|
+
_get(_getPrototypeOf(DidDeleteFilesFeature.prototype), "register", this).call(this, data);
|
|
564
|
+
}
|
|
565
|
+
}, {
|
|
566
|
+
key: "willDelete",
|
|
567
|
+
value: function willDelete(e) {
|
|
568
|
+
e.waitUntil(this.cacheFileTypes(e, function (i) {
|
|
569
|
+
return i;
|
|
570
|
+
}));
|
|
571
|
+
}
|
|
572
|
+
}, {
|
|
573
|
+
key: "doSend",
|
|
574
|
+
value: function doSend(event, next) {
|
|
575
|
+
this.clearFileTypeCache();
|
|
576
|
+
var middleware = this._client.middleware.workspace;
|
|
577
|
+
return middleware !== null && middleware !== void 0 && middleware.didDeleteFiles ? middleware.didDeleteFiles(event, next) : next(event);
|
|
578
|
+
}
|
|
579
|
+
}]);
|
|
580
|
+
return DidDeleteFilesFeature;
|
|
581
|
+
}(CachingNotificationFileOperationFeature);
|
|
582
|
+
var RequestFileOperationFeature = /*#__PURE__*/function (_FileOperationFeature2) {
|
|
583
|
+
_inherits(RequestFileOperationFeature, _FileOperationFeature2);
|
|
584
|
+
var _super6 = _createSuper(RequestFileOperationFeature);
|
|
585
|
+
function RequestFileOperationFeature(client, event, requestType, clientCapability, serverCapability, accessUri, createParams) {
|
|
586
|
+
var _this5;
|
|
587
|
+
_classCallCheck(this, RequestFileOperationFeature);
|
|
588
|
+
_this5 = _super6.call(this, client, event, requestType, clientCapability, serverCapability);
|
|
589
|
+
_this5._requestType = requestType;
|
|
590
|
+
_this5._accessUri = accessUri;
|
|
591
|
+
_this5._createParams = createParams;
|
|
592
|
+
return _this5;
|
|
593
|
+
}
|
|
594
|
+
_createClass(RequestFileOperationFeature, [{
|
|
595
|
+
key: "send",
|
|
596
|
+
value: function () {
|
|
597
|
+
var _send2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(originalEvent) {
|
|
598
|
+
var waitUntil;
|
|
599
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
600
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
601
|
+
case 0:
|
|
602
|
+
waitUntil = this.waitUntil(originalEvent);
|
|
603
|
+
originalEvent.waitUntil(waitUntil);
|
|
604
|
+
case 2:
|
|
605
|
+
case "end":
|
|
606
|
+
return _context8.stop();
|
|
607
|
+
}
|
|
608
|
+
}, _callee8, this);
|
|
609
|
+
}));
|
|
610
|
+
function send(_x10) {
|
|
611
|
+
return _send2.apply(this, arguments);
|
|
612
|
+
}
|
|
613
|
+
return send;
|
|
614
|
+
}()
|
|
615
|
+
}, {
|
|
616
|
+
key: "waitUntil",
|
|
617
|
+
value: function () {
|
|
618
|
+
var _waitUntil = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(originalEvent) {
|
|
619
|
+
var _this6 = this;
|
|
620
|
+
var filteredEvent, _next3;
|
|
621
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
622
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
623
|
+
case 0:
|
|
624
|
+
_context9.next = 2;
|
|
625
|
+
return this.filter(originalEvent, this._accessUri);
|
|
626
|
+
case 2:
|
|
627
|
+
filteredEvent = _context9.sent;
|
|
628
|
+
if (!filteredEvent.files.length) {
|
|
629
|
+
_context9.next = 8;
|
|
630
|
+
break;
|
|
631
|
+
}
|
|
632
|
+
_next3 = function _next3(event) {
|
|
633
|
+
return _this6._client.sendRequest(_this6._requestType, _this6._createParams(event), event.token).then(_this6._client.protocol2CodeConverter.asWorkspaceEdit);
|
|
634
|
+
};
|
|
635
|
+
return _context9.abrupt("return", this.doSend(filteredEvent, _next3));
|
|
636
|
+
case 8:
|
|
637
|
+
return _context9.abrupt("return", undefined);
|
|
638
|
+
case 9:
|
|
639
|
+
case "end":
|
|
640
|
+
return _context9.stop();
|
|
641
|
+
}
|
|
642
|
+
}, _callee9, this);
|
|
643
|
+
}));
|
|
644
|
+
function waitUntil(_x11) {
|
|
645
|
+
return _waitUntil.apply(this, arguments);
|
|
646
|
+
}
|
|
647
|
+
return waitUntil;
|
|
648
|
+
}()
|
|
649
|
+
}]);
|
|
650
|
+
return RequestFileOperationFeature;
|
|
651
|
+
}(FileOperationFeature);
|
|
652
|
+
export var WillCreateFilesFeature = /*#__PURE__*/function (_RequestFileOperation) {
|
|
653
|
+
_inherits(WillCreateFilesFeature, _RequestFileOperation);
|
|
654
|
+
var _super7 = _createSuper(WillCreateFilesFeature);
|
|
655
|
+
function WillCreateFilesFeature(client) {
|
|
656
|
+
_classCallCheck(this, WillCreateFilesFeature);
|
|
657
|
+
return _super7.call(this, client, workspace.onWillCreateFiles, proto.WillCreateFilesRequest.type, 'willCreate', 'willCreate', function (i) {
|
|
658
|
+
return i;
|
|
659
|
+
}, client.code2ProtocolConverter.asWillCreateFilesParams);
|
|
660
|
+
}
|
|
661
|
+
_createClass(WillCreateFilesFeature, [{
|
|
662
|
+
key: "doSend",
|
|
663
|
+
value: function doSend(event, next) {
|
|
664
|
+
var middleware = this._client.middleware.workspace;
|
|
665
|
+
return middleware !== null && middleware !== void 0 && middleware.willCreateFiles ? middleware.willCreateFiles(event, next) : next(event);
|
|
666
|
+
}
|
|
667
|
+
}]);
|
|
668
|
+
return WillCreateFilesFeature;
|
|
669
|
+
}(RequestFileOperationFeature);
|
|
670
|
+
export var WillRenameFilesFeature = /*#__PURE__*/function (_RequestFileOperation2) {
|
|
671
|
+
_inherits(WillRenameFilesFeature, _RequestFileOperation2);
|
|
672
|
+
var _super8 = _createSuper(WillRenameFilesFeature);
|
|
673
|
+
function WillRenameFilesFeature(client) {
|
|
674
|
+
_classCallCheck(this, WillRenameFilesFeature);
|
|
675
|
+
return _super8.call(this, client, workspace.onWillRenameFiles, proto.WillRenameFilesRequest.type, 'willRename', 'willRename', function (i) {
|
|
676
|
+
return i.oldUri;
|
|
677
|
+
}, client.code2ProtocolConverter.asWillRenameFilesParams);
|
|
678
|
+
}
|
|
679
|
+
_createClass(WillRenameFilesFeature, [{
|
|
680
|
+
key: "doSend",
|
|
681
|
+
value: function doSend(event, next) {
|
|
682
|
+
var middleware = this._client.middleware.workspace;
|
|
683
|
+
return middleware !== null && middleware !== void 0 && middleware.willRenameFiles ? middleware.willRenameFiles(event, next) : next(event);
|
|
684
|
+
}
|
|
685
|
+
}]);
|
|
686
|
+
return WillRenameFilesFeature;
|
|
687
|
+
}(RequestFileOperationFeature);
|
|
688
|
+
export var WillDeleteFilesFeature = /*#__PURE__*/function (_RequestFileOperation3) {
|
|
689
|
+
_inherits(WillDeleteFilesFeature, _RequestFileOperation3);
|
|
690
|
+
var _super9 = _createSuper(WillDeleteFilesFeature);
|
|
691
|
+
function WillDeleteFilesFeature(client) {
|
|
692
|
+
_classCallCheck(this, WillDeleteFilesFeature);
|
|
693
|
+
return _super9.call(this, client, workspace.onWillDeleteFiles, proto.WillDeleteFilesRequest.type, 'willDelete', 'willDelete', function (i) {
|
|
694
|
+
return i;
|
|
695
|
+
}, client.code2ProtocolConverter.asWillDeleteFilesParams);
|
|
696
|
+
}
|
|
697
|
+
_createClass(WillDeleteFilesFeature, [{
|
|
698
|
+
key: "doSend",
|
|
699
|
+
value: function doSend(event, next) {
|
|
700
|
+
var middleware = this._client.middleware.workspace;
|
|
701
|
+
return middleware !== null && middleware !== void 0 && middleware.willDeleteFiles ? middleware.willDeleteFiles(event, next) : next(event);
|
|
702
|
+
}
|
|
703
|
+
}]);
|
|
704
|
+
return WillDeleteFilesFeature;
|
|
705
|
+
}(RequestFileOperationFeature);
|