From e098064ca659b16f4e466ca3dae44485296c3cfc Mon Sep 17 00:00:00 2001 From: Marcel Kloubert Date: Fri, 8 Jun 2018 02:34:18 +0200 Subject: [PATCH] file search (preview 1) --- CHANGELOG.md | 12 + package-lock.json | 606 +++++++++---------------------------------- package.json | 25 +- src/fs/azure.ts | 10 +- src/fs/dropbox.ts | 10 +- src/fs/ftp.ts | 10 +- src/fs/ftps.ts | 10 +- src/fs/s3.ts | 10 +- src/fs/sftp.ts | 10 +- src/fs/slack.ts | 10 +- src/fs/webdav.ts | 11 +- src/search.ts | 400 ++++++++++++++++++++++++++++ vscode.proposed.d.ts | 492 +++++++++++++++++++++++++++++++++++ 13 files changed, 1097 insertions(+), 519 deletions(-) create mode 100644 src/search.ts create mode 100644 vscode.proposed.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b09482..0e86bfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ [![Share via Facebook](https://raw.githubusercontent.com/mkloubert/vscode-remote-workspace/master/img/share/Facebook.png)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace"e=Remote%20Workspace) [![Share via Twitter](https://raw.githubusercontent.com/mkloubert/vscode-remote-workspace/master/img/share/Twitter.png)](https://twitter.com/intent/tweet?source=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace&text=Remote%20Workspace:%20https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace&via=mjkloubert) [![Share via Google+](https://raw.githubusercontent.com/mkloubert/vscode-remote-workspace/master/img/share/Google+.png)](https://plus.google.com/share?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace) [![Share via Pinterest](https://raw.githubusercontent.com/mkloubert/vscode-remote-workspace/master/img/share/Pinterest.png)](http://pinterest.com/pin/create/button/?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace&description=Visual%20Studio%20Code%20extension%2C%20which%20receives%20and%20shows%20git%20events%20from%20webhooks.) [![Share via Reddit](https://raw.githubusercontent.com/mkloubert/vscode-remote-workspace/master/img/share/Reddit.png)](http://www.reddit.com/submit?url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace&title=Remote%20Workspace) [![Share via LinkedIn](https://raw.githubusercontent.com/mkloubert/vscode-remote-workspace/master/img/share/LinkedIn.png)](http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace&title=Remote%20Workspace&summary=Visual%20Studio%20Code%20extension%2C%20which%20receives%20and%20shows%20git%20events%20from%20webhooks.&source=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace) [![Share via Wordpress](https://raw.githubusercontent.com/mkloubert/vscode-remote-workspace/master/img/share/Wordpress.png)](http://wordpress.com/press-this.php?u=https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace"e=Remote%20Workspace&s=Visual%20Studio%20Code%20extension%2C%20which%20receives%20and%20shows%20git%20events%20from%20webhooks.) [![Share via Email](https://raw.githubusercontent.com/mkloubert/vscode-remote-workspace/master/img/share/Email.png)](mailto:?subject=Remote%20Workspace&body=Visual%20Studio%20Code%20extension%2C%20which%20receives%20and%20shows%20git%20events%20from%20webhooks.:%20https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmkloubert.vscode-remote-workspace) +## 0.25.0 (????? ???, ????; file search) + +* implemented file search ... s. [issue #8](https://github.com/mkloubert/vscode-remote-workspace/issues/8) +* code cleanups and improvements +* bugfixes +* updated the following [npm](https://www.npmjs.com/) modules: + * [@slack/client](https://www.npmjs.com/package/@slack/client) `^4.3.1` + * [aws-sdk](https://www.npmjs.com/package/aws-sdk) `^2.252.1` + * [azure-storage](https://www.npmjs.com/package/azure-storage) `^2.8.3` + * [moment](https://www.npmjs.com/package/moment) `^2.22.2` + * [vscode-helpers](https://www.npmjs.com/package/vscode-helpers) `^2.6.2` + ## 0.24.1 (June 6th, 2018; FTPS connections) * implemented support for secure `ftps` protocol ... s. [issue #6](https://github.com/mkloubert/vscode-remote-workspace/issues/6) diff --git a/package-lock.json b/package-lock.json index 49e2c49..4654977 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vscode-remote-workspace", - "version": "0.24.1", + "version": "0.25.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -18,9 +18,9 @@ "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==" }, "@slack/client": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@slack/client/-/client-4.2.2.tgz", - "integrity": "sha512-fxEIKykNLN//hIS+9KTWadS9sKcVqAjIYM2RbkSqB6SJQfR05ymDhXYd5n+UHIPhHKij6JJ+EkZI/q9UxhA/UA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@slack/client/-/client-4.3.1.tgz", + "integrity": "sha512-4tA//6EWBjXNIVViKlQxAi1MU0l/kMUC/DO/JdEJNwnNyVKdimAcBrOvMLlRaxk1Cqc12iQmHjmoKyavhvnC5Q==", "requires": { "@types/delay": "^2.0.1", "@types/form-data": "^2.2.1", @@ -33,7 +33,7 @@ "@types/p-retry": "^1.0.1", "@types/retry": "^0.10.2", "@types/url-join": "^0.8.2", - "@types/ws": "^4.0.1", + "@types/ws": "^5.1.1", "delay": "^2.0.0", "eventemitter3": "^3.0.0", "finity": "^0.5.4", @@ -49,13 +49,13 @@ "p-retry": "^1.0.0", "retry": "^0.10.1", "url-join": "^4.0.0", - "ws": "^4.1.0" + "ws": "^5.2.0" }, "dependencies": { "@types/node": { - "version": "9.6.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.15.tgz", - "integrity": "sha512-16zIiQkIZBc1ZpfrOZZZ/6LKDixPiAIZq5q1YE1stxG4Ic1VmQlkNNWGBydqBFcX8eS+m/Dd4z5HzDa+q0b2Xg==" + "version": "9.6.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-9.6.20.tgz", + "integrity": "sha512-mIMXUbH2MmJAQQjzFUIRpxa+FtA27IaHMrIgoJ1fyu/EfpVN/UZw3ISMNnwVec4lau8R8SM4pNFXSCZpJFX2Bw==" } } }, @@ -162,9 +162,9 @@ } }, "@types/moment-timezone": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@types/moment-timezone/-/moment-timezone-0.5.4.tgz", - "integrity": "sha512-GXWxTNJaN6A6CSa7+8a0ZGN5yGozW3So7fFHrXE/1c976Nx4hv2470Bx/q6/nmNNOYbcuKT61P0kRNf4cQTirw==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@types/moment-timezone/-/moment-timezone-0.5.6.tgz", + "integrity": "sha512-rMZjLmXs9sly1UbwxckyAEvQkrwrGqR24nFAjFrndRJBBnUooCCD0LPmdRcf9haHXFnckI9E3ko0oC6LEDk7dw==", "requires": { "moment": ">=2.14.0" } @@ -245,9 +245,9 @@ } }, "@types/ws": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-4.0.2.tgz", - "integrity": "sha512-tlDVFHCcJdNqYgjGNDPDCo4tNqhFMymIAdJCcykFbdhYr4X6vD7IlMxY0t3/k6Pfup68YNkMTpRfLKTRuKDmnQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-5.1.1.tgz", + "integrity": "sha512-zf12eIggrJKYkOXood4EbQOsMFaVR8e5W8azkesRH1yFg4GhocS7j4sqE+FesLbvf1FLws4HenWUG6YZQ/LTJQ==", "requires": { "@types/events": "*", "@types/node": "*" @@ -273,15 +273,6 @@ "ansi-wrap": "0.1.0" } }, - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, "ansi-red": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", @@ -400,9 +391,9 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "aws-sdk": { - "version": "2.243.1", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.243.1.tgz", - "integrity": "sha1-xHsFQxY3xXIXehgUxyTK6KXuP0k=", + "version": "2.252.1", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.252.1.tgz", + "integrity": "sha1-TORbFtxAiIPiClZL2GJwxn8lu2A=", "requires": { "buffer": "4.9.1", "events": "1.1.1", @@ -433,16 +424,16 @@ "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" }, "azure-storage": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/azure-storage/-/azure-storage-2.8.2.tgz", - "integrity": "sha1-GctjKx5WMK6uVEUaZNrBYLFlyEg=", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/azure-storage/-/azure-storage-2.8.3.tgz", + "integrity": "sha512-gcbdUY0tLivJvjUZD9BAxWrRDcige4OLFHhN3kY0p9oZYAFNNNqwgO7rBXvV+zdoX9HajeMOEog9/S/wxabeGg==", "requires": { "browserify-mime": "~1.2.9", "extend": "~1.2.1", "json-edm-parser": "0.1.2", "md5.js": "1.3.4", "readable-stream": "~2.0.0", - "request": "~2.83.0", + "request": "^2.86.0", "underscore": "~1.8.3", "uuid": "^3.0.0", "validator": "~9.4.1", @@ -450,11 +441,6 @@ "xmlbuilder": "0.4.3" }, "dependencies": { - "extend": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-1.2.1.tgz", - "integrity": "sha1-oPX9bPyDpf5J72mNYOyKYk3UV2w=" - }, "process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", @@ -473,42 +459,6 @@ "util-deprecate": "~1.0.1" } }, - "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "hawk": "~6.0.2", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "stringstream": "~0.0.5", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - }, - "dependencies": { - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - } - } - }, "sax": { "version": "0.5.8", "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", @@ -579,12 +529,6 @@ "tweetnacl": "^0.14.3" } }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", @@ -594,14 +538,6 @@ "inherits": "~2.0.0" } }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.x.x" - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -650,9 +586,9 @@ "dev": true }, "buffer-from": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", "dev": true }, "builtin-modules": { @@ -797,12 +733,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, "combined-stream": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", @@ -833,24 +763,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.x.x" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "requires": { - "hoek": "4.x.x" - } - } - } - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -859,12 +771,6 @@ "assert-plus": "^1.0.0" } }, - "dateformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", - "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", - "dev": true - }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -948,41 +854,6 @@ "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -1027,9 +898,9 @@ } }, "es-abstract": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", - "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", "requires": { "es-to-primitive": "^1.1.1", "function-bind": "^1.1.1", @@ -1110,9 +981,9 @@ } }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-1.2.1.tgz", + "integrity": "sha1-oPX9bPyDpf5J72mNYOyKYk3UV2w=" }, "extend-shallow": { "version": "1.1.4", @@ -1145,17 +1016,6 @@ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, - "fancy-log": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", - "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", - "dev": true, - "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "time-stamp": "^1.0.0" - } - }, "fast-deep-equal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", @@ -1167,9 +1027,9 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "dev": true, "requires": { "pend": "~1.2.0" @@ -1441,6 +1301,12 @@ "unique-stream": "^2.0.2" }, "dependencies": { + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, "glob": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", @@ -1490,15 +1356,6 @@ } } }, - "glogg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", - "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, "got": { "version": "8.3.1", "resolved": "https://registry.npmjs.org/got/-/got-8.3.1.tgz", @@ -1701,75 +1558,24 @@ } }, "gulp-untar": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/gulp-untar/-/gulp-untar-0.0.6.tgz", - "integrity": "sha1-1r3v3n6ajgVMnxYjhaB4LEvnQAA=", + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/gulp-untar/-/gulp-untar-0.0.7.tgz", + "integrity": "sha512-0QfbCH2a1k2qkTLWPqTX+QO4qNsHn3kC546YhAP3/n0h+nvtyGITDuDrYBMDZeW4WnFijmkOvBWa5HshTic1tw==", "dev": true, "requires": { "event-stream": "~3.3.4", - "gulp-util": "~3.0.8", "streamifier": "~0.1.1", "tar": "^2.2.1", - "through2": "~2.0.3" - } - }, - "gulp-util": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", - "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-uniq": "^1.0.2", - "beeper": "^1.0.0", - "chalk": "^1.0.0", - "dateformat": "^2.0.0", - "fancy-log": "^1.1.0", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash._reescape": "^3.0.0", - "lodash._reevaluate": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.template": "^3.0.0", - "minimist": "^1.1.0", - "multipipe": "^0.1.2", - "object-assign": "^3.0.0", - "replace-ext": "0.0.1", - "through2": "^2.0.0", - "vinyl": "^0.5.0" + "through2": "~2.0.3", + "vinyl": "^1.2.0" }, "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, "clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", "dev": true }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, "replace-ext": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", @@ -1777,9 +1583,9 @@ "dev": true }, "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", "dev": true, "requires": { "clone": "^1.0.0", @@ -1841,15 +1647,6 @@ } } }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -1865,11 +1662,11 @@ } }, "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "requires": { - "function-bind": "^1.0.2" + "function-bind": "^1.1.1" } }, "has-ansi": { @@ -1887,15 +1684,6 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, "has-symbol-support-x": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", @@ -1918,27 +1706,16 @@ "safe-buffer": "^5.0.1" } }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", - "requires": { - "boom": "4.x.x", - "cryptiles": "3.x.x", - "hoek": "4.x.x", - "sntp": "2.x.x" - } - }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, - "hoek": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", - "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" + "header-case-normalizer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/header-case-normalizer/-/header-case-normalizer-1.0.3.tgz", + "integrity": "sha1-+x1MjQxhadyrT3x+IbGGpqIqwME=" }, "http-cache-semantics": { "version": "3.8.1", @@ -2343,131 +2120,12 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "^3.0.0" - } - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, "lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true, - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash._basetostring": "^3.0.0", - "lodash._basevalues": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0", - "lodash.keys": "^3.0.0", - "lodash.restparam": "^3.0.0", - "lodash.templatesettings": "^3.0.0" - } - }, - "lodash.templatesettings": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" - } - }, "loglevel": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", @@ -2700,9 +2358,9 @@ } }, "moment": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz", - "integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==" + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" }, "moment-timezone": { "version": "0.5.17", @@ -2729,15 +2387,6 @@ "minimatch": "^3.0.0" } }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "0.0.2" - } - }, "node-enumerable": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/node-enumerable/-/node-enumerable-3.9.0.tgz", @@ -3022,9 +2671,9 @@ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" }, "qs": { "version": "6.5.2", @@ -3134,9 +2783,9 @@ "dev": true }, "request": { - "version": "2.85.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", - "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.6.0", @@ -3146,7 +2795,6 @@ "forever-agent": "~0.6.1", "form-data": "~2.3.1", "har-validator": "~5.0.3", - "hawk": "~6.0.2", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -3156,10 +2804,16 @@ "performance-now": "^2.1.0", "qs": "~6.5.1", "safe-buffer": "^5.1.1", - "stringstream": "~0.0.5", "tough-cookie": "~2.3.3", "tunnel-agent": "^0.6.0", "uuid": "^3.1.0" + }, + "dependencies": { + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + } } }, "requires-port": { @@ -3245,14 +2899,6 @@ } } }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", - "requires": { - "hoek": "4.x.x" - } - }, "sort-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", @@ -3268,21 +2914,15 @@ "dev": true }, "source-map-support": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.5.tgz", - "integrity": "sha512-mR7/Nd5l1z6g99010shcXJiNEaf3fEtmLhRB/sBcQVJGodcHCULPp2y4Sfa43Kv2zq7T+Izmfp/WHCR6dYkQCA==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "dev": true, "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, - "sparkles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", - "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", - "dev": true - }, "split": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", @@ -3325,9 +2965,9 @@ } }, "sshpk": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", - "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -3336,6 +2976,7 @@ "ecc-jsbn": "~0.1.1", "getpass": "^0.1.1", "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" } }, @@ -3393,11 +3034,6 @@ "safe-buffer": "~5.1.0" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -3468,12 +3104,6 @@ "xtend": "~4.0.0" } }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -3513,6 +3143,13 @@ "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } } }, "tslib": { @@ -3565,9 +3202,9 @@ "optional": true }, "typescript": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.8.3.tgz", - "integrity": "sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.1.tgz", + "integrity": "sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA==", "dev": true }, "underscore": { @@ -3602,13 +3239,6 @@ "requires": { "punycode": "1.3.2", "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - } } }, "url-join": { @@ -3617,9 +3247,9 @@ "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=" }, "url-parse": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.0.tgz", - "integrity": "sha512-ERuGxDiQ6Xw/agN4tuoCRbmwRuZP0cJ1lJxJubXr5Q/5cDa78+Dc4wfvtxzhzhkm5VvmW6Mf8EVj9SPGN4l8Lg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.1.tgz", + "integrity": "sha512-x95Td74QcvICAA0+qERaVkRpTGKyBHHYdwL2LXZm5t/gBtCB9KQSO/0zQgSTYEV1p0WcvSg79TLNPSvd5IDJMQ==", "dev": true, "requires": { "querystringify": "^2.0.0", @@ -3741,9 +3371,9 @@ } }, "vscode": { - "version": "1.1.17", - "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.17.tgz", - "integrity": "sha512-yNMyrgEua2qyW7+trNNYhA6PeldRrBcwtLtlazkdtzcmkHMKECM/08bPF8HF2ZFuwHgD+8FQsdqd/DvJYQYjJg==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.18.tgz", + "integrity": "sha512-SyDw4qFwZ+WthZX7RWp71PNiWLF7VhpM65j2oryY/6jtSORd8qH6J8vclwWZJ6Jvu0EH7JamO2RWNfBfsMR9Zw==", "dev": true, "requires": { "glob": "^7.1.2", @@ -3752,7 +3382,7 @@ "gulp-gunzip": "1.0.0", "gulp-remote-src-vscode": "^0.5.0", "gulp-symdest": "^1.1.0", - "gulp-untar": "^0.0.6", + "gulp-untar": "^0.0.7", "gulp-vinyl-zip": "^2.1.0", "mocha": "^4.0.1", "request": "^2.83.0", @@ -3763,21 +3393,22 @@ } }, "vscode-helpers": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vscode-helpers/-/vscode-helpers-2.2.0.tgz", - "integrity": "sha512-zvFrXuzN6+4+JIeByMCqoay2xlq9uxeSXVSJ802mwmUqS5innlpmMX3Z592CUgraGl40Zn8/l8+eSh8gsmMO5Q==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/vscode-helpers/-/vscode-helpers-2.6.2.tgz", + "integrity": "sha512-g4hcFwyDMatKdp7rKk+cz54ZeHKwOgYBO73CnujMAV7X3wvY4faKFafFCwCkiAt+E/b4+6KW/fJwQeMmu5iIKA==", "requires": { "@types/fs-extra": "^5.0.2", "@types/glob": "^5.0.35", "@types/is-stream": "^1.1.0", - "@types/lodash": "^4.14.108", + "@types/lodash": "^4.14.109", "@types/marked": "^0.3.0", "@types/minimatch": "^3.0.3", - "@types/moment-timezone": "^0.5.4", - "@types/node": "^7.0.64", + "@types/moment-timezone": "^0.5.5", + "@types/node": "^7.0.65", "@types/tmp": "0.0.33", "fs-extra": "^5.0.0", "glob": "^7.1.2", + "header-case-normalizer": "^1.0.3", "is-stream": "^1.1.0", "isbinaryfile": "^3.0.2", "lodash": "^4.17.10", @@ -3785,15 +3416,15 @@ "merge-deep": "^3.0.1", "minimatch": "^3.0.4", "moment": "^2.22.1", - "moment-timezone": "^0.5.16", + "moment-timezone": "^0.5.17", "node-enumerable": "^3.9.0", "tmp": "0.0.33" } }, "webdav-client": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/webdav-client/-/webdav-client-1.4.1.tgz", - "integrity": "sha512-PS/tUVIP3CSZ8gbScUZbBwmmPE7RmRMrjahzGz88+97ph6w+yDHIxb8uDz19knnqQbE5AYJNlBYXg0C5NHRxbw==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/webdav-client/-/webdav-client-1.4.2.tgz", + "integrity": "sha512-acdokHLddXJfMBdZhpLYXNxXocImhDPEdL6RMoQ1ZTtM/myShH/5HKwouakhqAAjbYZyBZNmiEUAwl+KaiiU/Q==", "requires": { "request": "^2.81.0", "xml-js-builder": "^1.0.1" @@ -3810,18 +3441,17 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-4.1.0.tgz", - "integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.0.tgz", + "integrity": "sha512-c18dMeW+PEQdDFzkhDsnBAlS4Z8KGStBQQUcQ5mf7Nf689jyGk0594L+i9RaQuf4gog6SvWLJorz2NfSaqxZ7w==", "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0" + "async-limiter": "~1.0.0" } }, "xml-js": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.2.tgz", - "integrity": "sha512-7SyYB9qfahPf+0eu0W2dZbFzcjk9dDiKRMbQGwSsaTCCiUG0NOawi3CjSJRPOGsS6C6poOoMfYaLc4HZJWjlLw==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.4.tgz", + "integrity": "sha512-ZJ4DPgx97LzSdZ0NAbd0J5gWeSgWTpL2hIH1j1bOmk6QMyppee0S+vQAv/H+oYY1923kck5msPWOuSs0BDUh/w==", "requires": { "sax": "^1.2.4" }, @@ -3870,13 +3500,13 @@ "dev": true }, "yauzl": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.9.1.tgz", - "integrity": "sha1-qBmB6nCleUYTOIPwKcWCGok1mn8=", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.9.2.tgz", + "integrity": "sha1-T7G8euH8L1cDe1SvasyP4QMcW3c=", "dev": true, "requires": { "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.0.1" + "fd-slicer": "~1.1.0" } }, "yazl": { diff --git a/package.json b/package.json index 574f83f..3911b7c 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,12 @@ "name": "vscode-remote-workspace", "displayName": "Remote Workspace", "description": "Multi protocol support (like Azure, Dropbox, S3, (S)FTP or Slack) for handling remote files like local ones.", - "version": "0.24.1", + "version": "0.25.0", "publisher": "mkloubert", "engines": { - "vscode": "^1.23.0" + "vscode": "^1.24.0" }, + "enableProposedApi": true, "categories": [ "Azure", "Other" @@ -92,32 +93,32 @@ "@types/mime-types": "^2.1.0", "@types/mocha": "^2.2.42", "@types/moment": "^2.13.0", - "@types/moment-timezone": "^0.5.4", + "@types/moment-timezone": "^0.5.6", "@types/node": "^7.0.65", "@types/ssh2-sftp-client": "^2.0.1", "@types/uuid": "^3.4.3", "tslint": "^5.8.0", - "typescript": "^2.6.1", - "vscode": "^1.1.6" + "typescript": "^2.9.1", + "vscode": "^1.1.18" }, "dependencies": { "@icetee/ftp": "^1.0.2", - "@slack/client": "^4.2.2", - "aws-sdk": "^2.243.1", - "azure-storage": "^2.8.2", - "dropbox": "4.0.4", + "@slack/client": "^4.3.1", + "aws-sdk": "^2.252.1", + "azure-storage": "^2.8.3", + "dropbox": "^4.0.4", "ftp": "^0.3.10", "isomorphic-fetch": "^2.2.1", "jsftp": "^2.1.3", "lodash": "^4.17.10", "mime-types": "^2.1.18", - "moment": "^2.22.1", + "moment": "^2.22.2", "moment-timezone": "^0.5.17", "node-simple-socket": "^2.8.1", "parse-listing": "^1.1.3", "ssh2-sftp-client": "^2.2.1", "uuid": "^3.2.1", - "vscode-helpers": "^2.2.0", - "webdav-client": "^1.4.1" + "vscode-helpers": "^2.6.2", + "webdav-client": "^1.4.2" } } diff --git a/src/fs/azure.ts b/src/fs/azure.ts index be9d96c..f6f12d6 100644 --- a/src/fs/azure.ts +++ b/src/fs/azure.ts @@ -27,6 +27,7 @@ import * as vscode from 'vscode'; import * as vscode_helpers from 'vscode-helpers'; import * as vscrw from '../extension'; import * as vscrw_fs from '../fs'; +import * as vscrw_search from '../search'; interface AzureBlobConnection { account: string; @@ -407,10 +408,15 @@ export class AzureBlobFileSystem extends vscrw_fs.FileSystemBase { * @param {vscode.ExtensionContext} context The extension context. */ public static register(context: vscode.ExtensionContext) { + const FS_PROVIDER = new AzureBlobFileSystem(); + context.subscriptions.push( vscode.workspace.registerFileSystemProvider(AzureBlobFileSystem.scheme, - new AzureBlobFileSystem(), - { isCaseSensitive: true }) + FS_PROVIDER, + { isCaseSensitive: true }), + + vscode.workspace.registerSearchProvider(AzureBlobFileSystem.scheme, + new vscrw_search.FileSystemSearchProvider(FS_PROVIDER)), ); } diff --git a/src/fs/dropbox.ts b/src/fs/dropbox.ts index 64aced2..527a6d1 100644 --- a/src/fs/dropbox.ts +++ b/src/fs/dropbox.ts @@ -23,6 +23,7 @@ import * as vscode from 'vscode'; import * as vscode_helpers from 'vscode-helpers'; import * as vscrw from '../extension'; import * as vscrw_fs from '../fs'; +import * as vscrw_search from '../search'; interface DropboxConnection { client: Dropbox.Dropbox; @@ -257,10 +258,15 @@ export class DropboxFileSystem extends vscrw_fs.FileSystemBase { * @param {vscode.ExtensionContext} context The extension context. */ public static register(context: vscode.ExtensionContext) { + const FS_PROVIDER = new DropboxFileSystem(); + context.subscriptions.push( vscode.workspace.registerFileSystemProvider(DropboxFileSystem.scheme, - new DropboxFileSystem(), - { isCaseSensitive: false }) + FS_PROVIDER, + { isCaseSensitive: false }), + + vscode.workspace.registerSearchProvider(DropboxFileSystem.scheme, + new vscrw_search.FileSystemSearchProvider(FS_PROVIDER)), ); } diff --git a/src/fs/ftp.ts b/src/fs/ftp.ts index 2eb126f..25f075e 100644 --- a/src/fs/ftp.ts +++ b/src/fs/ftp.ts @@ -24,6 +24,7 @@ import * as vscode from 'vscode'; import * as vscode_helpers from 'vscode-helpers'; import * as vscrw from '../extension'; import * as vscrw_fs from '../fs'; +import * as vscrw_search from '../search'; interface FTPConnection { cache: FTPConnectionCache; @@ -406,14 +407,15 @@ export class FTPFileSystem extends vscrw_fs.FileSystemBase { * @param {vscode.ExtensionContext} context The extension context. */ public static register(context: vscode.ExtensionContext) { - const NEW_FS = new FTPFileSystem(); + const FS_PROVIDER = new FTPFileSystem(); context.subscriptions.push( - NEW_FS, - vscode.workspace.registerFileSystemProvider(FTPFileSystem.scheme, - NEW_FS, + FS_PROVIDER, { isCaseSensitive: true }), + + vscode.workspace.registerSearchProvider(FTPFileSystem.scheme, + new vscrw_search.FileSystemSearchProvider(FS_PROVIDER)), ); } diff --git a/src/fs/ftps.ts b/src/fs/ftps.ts index c7550fb..4fdd31d 100644 --- a/src/fs/ftps.ts +++ b/src/fs/ftps.ts @@ -27,6 +27,7 @@ import * as vscode from 'vscode'; import * as vscode_helpers from 'vscode-helpers'; import * as vscrw from '../extension'; import * as vscrw_fs from '../fs'; +import * as vscrw_search from '../search'; interface FTPsConnection { cache: FTPsConnectionCache; @@ -313,10 +314,15 @@ export class FTPsFileSystem extends vscrw_fs.FileSystemBase { * @param {vscode.ExtensionContext} context The extension context. */ public static register(context: vscode.ExtensionContext) { + const FS_PROVIDER = new FTPsFileSystem(); + context.subscriptions.push( vscode.workspace.registerFileSystemProvider(FTPsFileSystem.scheme, - new FTPsFileSystem(), - { isCaseSensitive: false }) + FS_PROVIDER, + { isCaseSensitive: true }), + + vscode.workspace.registerSearchProvider(FTPsFileSystem.scheme, + new vscrw_search.FileSystemSearchProvider(FS_PROVIDER)), ); } diff --git a/src/fs/s3.ts b/src/fs/s3.ts index 945ca13..7bbc6f6 100644 --- a/src/fs/s3.ts +++ b/src/fs/s3.ts @@ -24,6 +24,7 @@ import * as vscode from 'vscode'; import * as vscode_helpers from 'vscode-helpers'; import * as vscrw from '../extension'; import * as vscrw_fs from '../fs'; +import * as vscrw_search from '../search'; interface S3Connection { client: AWS.S3; @@ -407,10 +408,15 @@ export class S3FileSystem extends vscrw_fs.FileSystemBase { * @param {vscode.ExtensionContext} context The extension context. */ public static register(context: vscode.ExtensionContext) { + const FS_PROVIDER = new S3FileSystem(); + context.subscriptions.push( vscode.workspace.registerFileSystemProvider(S3FileSystem.scheme, - new S3FileSystem(), - { isCaseSensitive: true }) + FS_PROVIDER, + { isCaseSensitive: true }), + + vscode.workspace.registerSearchProvider(S3FileSystem.scheme, + new vscrw_search.FileSystemSearchProvider(FS_PROVIDER)), ); } diff --git a/src/fs/sftp.ts b/src/fs/sftp.ts index f07f7a6..0216d72 100644 --- a/src/fs/sftp.ts +++ b/src/fs/sftp.ts @@ -24,6 +24,7 @@ import * as vscode from 'vscode'; import * as vscode_helpers from 'vscode-helpers'; import * as vscrw from '../extension'; import * as vscrw_fs from '../fs'; +import * as vscrw_search from '../search'; type FileModeMapper = { [mode: string]: string | string[] }; @@ -449,10 +450,15 @@ export class SFTPFileSystem extends vscrw_fs.FileSystemBase { * @param {vscode.ExtensionContext} context The extension context. */ public static register(context: vscode.ExtensionContext) { + const FS_PROVIDER = new SFTPFileSystem(); + context.subscriptions.push( vscode.workspace.registerFileSystemProvider(SFTPFileSystem.scheme, - new SFTPFileSystem(), - { isCaseSensitive: true }) + FS_PROVIDER, + { isCaseSensitive: true }), + + vscode.workspace.registerSearchProvider(SFTPFileSystem.scheme, + new vscrw_search.FileSystemSearchProvider(FS_PROVIDER)), ); } diff --git a/src/fs/slack.ts b/src/fs/slack.ts index 561fde4..cd43b1f 100644 --- a/src/fs/slack.ts +++ b/src/fs/slack.ts @@ -25,6 +25,7 @@ import * as vscode from 'vscode'; import * as vscode_helpers from 'vscode-helpers'; import * as vscrw from '../extension'; import * as vscrw_fs from '../fs'; +import * as vscrw_search from '../search'; interface SlackConnection { channel: string; @@ -275,10 +276,15 @@ export class SlackFileSystem extends vscrw_fs.FileSystemBase { * @param {vscode.ExtensionContext} context The extension context. */ public static register(context: vscode.ExtensionContext) { + const FS_PROVIDER = new SlackFileSystem(); + context.subscriptions.push( vscode.workspace.registerFileSystemProvider(SlackFileSystem.scheme, - new SlackFileSystem(), - { isCaseSensitive: false }) + FS_PROVIDER, + { isCaseSensitive: false }), + + vscode.workspace.registerSearchProvider(SlackFileSystem.scheme, + new vscrw_search.FileSystemSearchProvider(FS_PROVIDER)), ); } diff --git a/src/fs/webdav.ts b/src/fs/webdav.ts index 1e8d86c..8ca3cd5 100644 --- a/src/fs/webdav.ts +++ b/src/fs/webdav.ts @@ -16,7 +16,6 @@ */ import * as _ from 'lodash'; -import * as FSExtra from 'fs-extra'; import * as Moment from 'moment'; import * as MomentTZ from 'moment-timezone'; // REQUIRED EXTENSION FOR moment MODULE!!! import * as Path from 'path'; @@ -24,6 +23,7 @@ import * as vscode from 'vscode'; import * as vscode_helpers from 'vscode-helpers'; import * as vscrw from '../extension'; import * as vscrw_fs from '../fs'; +import * as vscrw_search from '../search'; const WebDAV = require('webdav-client'); interface WebDAVConnection { @@ -410,10 +410,15 @@ export class WebDAVFileSystem extends vscrw_fs.FileSystemBase { * @param {vscode.ExtensionContext} context The extension context. */ public static register(context: vscode.ExtensionContext) { + const FS_PROVIDER = new WebDAVFileSystem(); + context.subscriptions.push( vscode.workspace.registerFileSystemProvider(WebDAVFileSystem.scheme, - new WebDAVFileSystem(), - { isCaseSensitive: true }) + FS_PROVIDER, + { isCaseSensitive: true }), + + vscode.workspace.registerSearchProvider(WebDAVFileSystem.scheme, + new vscrw_search.FileSystemSearchProvider(FS_PROVIDER)), ); } diff --git a/src/search.ts b/src/search.ts new file mode 100644 index 0000000..52b832d --- /dev/null +++ b/src/search.ts @@ -0,0 +1,400 @@ +/** + * This file is part of the vscode-remote-workspace distribution. + * Copyright (c) Marcel Joachim Kloubert. + * + * vscode-remote-workspace is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, version 3. + * + * vscode-remote-workspace is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +import * as Path from 'path'; +import * as vscode_helpers from 'vscode-helpers'; +import * as vscode from 'vscode'; +import * as vscrw from './extension'; +import * as vscrw_fs from './fs'; + +interface SearchFilesAndFoldersOptions { + readonly checkIfPathMatches: (path: string, report?: boolean) => boolean; + folder: vscode.Uri; + readonly isCancellationRequested: boolean; + readonly rootFolder: vscode.Uri; +} + +interface SearchFolderForTextOptions { + readonly doesPathMatch: (path: string) => boolean; + readonly encoding: string; + folder: vscode.Uri; + readonly isCancellationRequested: boolean; + readonly isCaseSensitive: boolean; + readonly pattern: string; + readonly rootFolder: vscode.Uri; + readonly searchLine: (line: string, path: string, lineNr: number, report?: boolean) => number[]; +} + +/** + * A generic search provider for a file system. + */ +export class FileSystemSearchProvider extends vscode_helpers.DisposableBase implements vscode.SearchProvider { + /** + * Initializes a new instance of that class. + * + * @param {vscrw_fs.FileSystemBase} provider The underlying provider to use. + */ + constructor(public readonly provider: vscrw_fs.FileSystemBase) { + super(); + } + + /** + * Gets the underlying logger. + */ + public get logger() { + return this.provider.logger; + } + + /** @inheritdoc */ + public async provideFileSearchResults( + options: vscode.FileSearchOptions, + progress: vscode.Progress, + token: vscode.CancellationToken, + ) { + const FILES_TO_INCLUDE = vscode_helpers.asArray(options.includes).map(x => { + return vscode_helpers.toStringSafe(x); + }).filter(x => { + return !vscode_helpers.isEmptyString(x); + }); + + const FILES_TO_EXCLUDE = vscode_helpers.asArray(options.excludes).map(x => { + return vscode_helpers.toStringSafe(x); + }).filter(x => { + return !vscode_helpers.isEmptyString(x); + }); + + const OPTS: SearchFilesAndFoldersOptions = { + checkIfPathMatches: function (path, report?) { + report = vscode_helpers.toBooleanSafe(report, true); + + const ROOT_PATH = vscrw.normalizePath( + this.rootFolder.path + ); + + if (doesPathMatch(path, FILES_TO_INCLUDE, FILES_TO_EXCLUDE)) { + if (report) { + progress.report( + vscrw.normalizePath( + path.substr(ROOT_PATH.length) + ) + ); + } + + return true; + } + + return false; + }, + folder: options.folder, + isCancellationRequested: undefined, + rootFolder: options.folder, + }; + + // OPTS.isCancellationRequested + Object.defineProperty(OPTS, 'isCancellationRequested', { + get: () => { + return token.isCancellationRequested; + } + }); + + try { + await this.searchFilesAndFolders( OPTS ); + } catch (e) { + vscrw.showError(e); + } + } + + /** @inheritdoc */ + public async provideTextSearchResults( + query: vscode.TextSearchQuery, + options: vscode.TextSearchOptions, + progress: vscode.Progress, + token: vscode.CancellationToken + ) { + let enc = vscode_helpers.normalizeString(options.encoding); + if ('' === enc) { + enc = 'utf8'; + } + + const FILES_TO_INCLUDE = vscode_helpers.asArray(options.includes).map(x => { + return vscode_helpers.toStringSafe(x); + }).filter(x => { + return !vscode_helpers.isEmptyString(x); + }); + + const FILES_TO_EXCLUDE = vscode_helpers.asArray(options.excludes).map(x => { + return vscode_helpers.toStringSafe(x); + }).filter(x => { + return !vscode_helpers.isEmptyString(x); + }); + + const OPTS: SearchFolderForTextOptions = { + doesPathMatch: (path: string) => { + return doesPathMatch( + path, + FILES_TO_INCLUDE, FILES_TO_EXCLUDE, + ); + }, + encoding: enc, + folder: options.folder, + isCancellationRequested: undefined, + isCaseSensitive: undefined, + pattern: vscode_helpers.toStringSafe(query.pattern), + rootFolder: options.folder, + searchLine: function(line, path, lineNr, report?) { + report = vscode_helpers.toBooleanSafe(report, true); + + const ROOT_PATH = vscrw.normalizePath( + this.rootFolder.path + ); + + const IS_CASE: boolean = this.isCaseSensitive; + + line = vscode_helpers.toStringSafe(line); + if (!IS_CASE) { + line = line.toLowerCase(); + } + + let searchPattern: string = this.pattern; + if (!IS_CASE) { + searchPattern = searchPattern.toLowerCase(); + } + + const COLUMNS: number[] = []; + + const REPORT_MATCH = (column: number) => { + if (!report) { + return; + } + + progress.report({ + path: vscrw.normalizePath( + path.substr(ROOT_PATH.length) + ), + range: new vscode.Range(new vscode.Position(lineNr, foundAt), + new vscode.Position(lineNr, foundAt + this.pattern.length)), + + preview: { + text: line, + match: new vscode.Range(new vscode.Position(0, foundAt), + new vscode.Position(0, foundAt + this.pattern.length)), + } + }); + }; + + let startAtColumn = 0; + let foundAt = -1; + while ((foundAt = line.indexOf(searchPattern, startAtColumn)) > -1) { + COLUMNS.push(foundAt); + REPORT_MATCH(foundAt); + + startAtColumn = foundAt + 1; + } + + return COLUMNS; + } + }; + + // OPTS.isCancellationRequested + Object.defineProperty(OPTS, 'isCancellationRequested', { + get: () => { + return token.isCancellationRequested; + } + }); + + // OPTS.isCaseSensitive + Object.defineProperty(OPTS, 'isCaseSensitive', { + get: () => { + return vscode_helpers.toBooleanSafe(query.isCaseSensitive); + } + }); + + try { + await this.searchFolderForText(OPTS); + } catch (e) { + vscrw.showError(e); + } + } + + private async searchFilesAndFolders(opts: SearchFilesAndFoldersOptions) { + if (opts.isCancellationRequested) { + return; + } + + const FOLDER = opts.folder; + const FOLDER_PATH = vscrw.normalizePath(FOLDER.path); + + const LIST = vscode_helpers.from( await this.provider.readDirectory(FOLDER) ).select(x => { + return { + name: x[0], + type: x[1], + }; + }).orderBy(x => { + switch (x.type) { + case vscode.FileType.File: + return -2; + + case vscode.FileType.Directory: + return -1; + } + + return 0; + }).toArray(); + + for (const ITEM of LIST) { + if (opts.isCancellationRequested) { + break; + } + + try { + const ITEM_PATH = vscrw.normalizePath( + Path.join( + FOLDER_PATH, ITEM.name + ) + ); + + const ITEM_URI = uriWithNewPath(FOLDER, ITEM_PATH); + + if (ITEM.type === vscode.FileType.Directory) { + opts.folder = ITEM_URI; + + await this.searchFilesAndFolders( opts ); + } else { + opts.checkIfPathMatches( ITEM_PATH, true ); + } + } catch (e) { + this.logger + .trace(e, 'search.FileSystemSearchProvider.searchFilesAndFolders(1)'); + } + } + } + + private async searchFolderForText(opts: SearchFolderForTextOptions) { + if (opts.isCancellationRequested) { + return; + } + + const ROOT_FOLDER = opts.rootFolder; + const ROOT_FOLDER_PATH = vscrw.normalizePath(ROOT_FOLDER.path); + + const FOLDER = opts.folder; + const FOLDER_PATH = vscrw.normalizePath(FOLDER.path); + + const LIST = vscode_helpers.from( await this.provider.readDirectory(FOLDER) ).select(x => { + return { + name: x[0], + type: x[1], + }; + }).orderBy(x => { + switch (x.type) { + case vscode.FileType.File: + return -2; + + case vscode.FileType.Directory: + return -1; + } + + return 0; + }).toArray(); + + for (const ITEM of LIST) { + if (opts.isCancellationRequested) { + break; + } + + try { + const ITEM_PATH = vscrw.normalizePath( + Path.join( + FOLDER_PATH, ITEM.name + ) + ); + + const ITEM_URI = uriWithNewPath(FOLDER, ITEM_PATH); + + if (ITEM.type === vscode.FileType.File) { + if (!opts.doesPathMatch( ITEM_PATH.substr(ROOT_FOLDER_PATH.length) )) { + continue; + } + + const STAT = await this.provider.stat( ITEM_URI ); + + if (STAT.size > 0 && STAT.size <= (1024 * 1024)) { + const FILE_DATA = vscrw.asBuffer( + await this.provider.readFile( ITEM_URI ) + ); + + if (!(await vscode_helpers.isBinaryContent(FILE_DATA))) { + const TXT = FILE_DATA.toString(opts.encoding); + const TXT_LINES = TXT.split("\n"); + + for (let i = 0; i < TXT_LINES.length; i++) { + opts.searchLine(TXT_LINES[i], + ITEM_PATH, i, + true); + } + } + } + } else if (ITEM.type === vscode.FileType.Directory) { + opts.folder = ITEM_URI; + + await this.searchFolderForText(opts); + } + } catch (e) { + this.logger + .trace(e, 'search.FileSystemSearchProvider.searchFolderForText(1)'); + } + } + } +} + +function doesPathMatch(path: any, filesToInclude: string[], filesToExclude: string[]) { + const MIMIMATCH_OPTS = { + dot: true, + nocase: true, + nonull: false, + }; + + let includePatterns = filesToInclude.map(x => toMiniMatchP(x)); + if (includePatterns.length < 1) { + includePatterns = [ '/**' ]; + } + + const EXCLUDE_PATTERNS = filesToExclude.map(x => toMiniMatchP(x)); + if (EXCLUDE_PATTERNS.length > 0) { + if (vscode_helpers.doesMatch(path, EXCLUDE_PATTERNS, MIMIMATCH_OPTS)) { + return false; + } + } + + return vscode_helpers.doesMatch(path, + includePatterns, MIMIMATCH_OPTS); +} + +function toMiniMatchP(p: string) { + p = vscode_helpers.toStringSafe(p); + if (!p.trim().startsWith('/')) { + p = '/' + p; + } + + return p; +} + +function uriWithNewPath(uri: vscode.Uri, newPath: string): vscode.Uri { + if (uri) { + return vscode.Uri.parse(`${ uri.scheme }://${ uri.authority }${ vscode_helpers.toStringSafe(newPath) }${ vscode_helpers.isEmptyString(uri.query) ? '' : ('?' + uri.query) }`); + } +} diff --git a/vscode.proposed.d.ts b/vscode.proposed.d.ts new file mode 100644 index 0000000..9c122fa --- /dev/null +++ b/vscode.proposed.d.ts @@ -0,0 +1,492 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +// This is the place for API experiments and proposal. + +declare module 'vscode' { + + export namespace window { + export function sampleFunction(): Thenable; + } + + //#region Joh: remote, search provider + + export interface TextSearchQuery { + pattern: string; + isRegExp?: boolean; + isCaseSensitive?: boolean; + isWordMatch?: boolean; + } + + export interface SearchOptions { + folder: Uri; + includes: string[]; // paths relative to folder + excludes: string[]; + useIgnoreFiles?: boolean; + followSymlinks?: boolean; + } + + export interface TextSearchOptions extends SearchOptions { + previewOptions?: any; // total length? # of context lines? leading and trailing # of chars? + maxFileSize?: number; + encoding?: string; + } + + export interface FileSearchOptions extends SearchOptions { } + + export interface TextSearchResult { + path: string; + range: Range; + + // For now, preview must be a single line of text + preview: { text: string, match: Range }; + } + + export interface SearchProvider { + provideFileSearchResults?(options: FileSearchOptions, progress: Progress, token: CancellationToken): Thenable; + provideTextSearchResults?(query: TextSearchQuery, options: TextSearchOptions, progress: Progress, token: CancellationToken): Thenable; + } + + export namespace workspace { + export function registerSearchProvider(scheme: string, provider: SearchProvider): Disposable; + } + + //#endregion + + //#region Joao: diff command + + /** + * The contiguous set of modified lines in a diff. + */ + export interface LineChange { + readonly originalStartLineNumber: number; + readonly originalEndLineNumber: number; + readonly modifiedStartLineNumber: number; + readonly modifiedEndLineNumber: number; + } + + export namespace commands { + + /** + * Registers a diff information command that can be invoked via a keyboard shortcut, + * a menu item, an action, or directly. + * + * Diff information commands are different from ordinary [commands](#commands.registerCommand) as + * they only execute when there is an active diff editor when the command is called, and the diff + * information has been computed. Also, the command handler of an editor command has access to + * the diff information. + * + * @param command A unique identifier for the command. + * @param callback A command handler function with access to the [diff information](#LineChange). + * @param thisArg The `this` context used when invoking the handler function. + * @return Disposable which unregisters this command on disposal. + */ + export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable; + } + + //#endregion + + //#region Joh: decorations + + //todo@joh -> make class + export interface DecorationData { + priority?: number; + title?: string; + bubble?: boolean; + abbreviation?: string; + color?: ThemeColor; + source?: string; + } + + export interface SourceControlResourceDecorations { + source?: string; + letter?: string; + color?: ThemeColor; + } + + export interface DecorationProvider { + onDidChangeDecorations: Event; + provideDecoration(uri: Uri, token: CancellationToken): ProviderResult; + } + + export namespace window { + export function registerDecorationProvider(provider: DecorationProvider): Disposable; + } + + //#endregion + + //#region André: debug + + /** + * Represents a debug adapter executable and optional arguments passed to it. + */ + export class DebugAdapterExecutable { + /** + * The command path of the debug adapter executable. + * A command must be either an absolute path or the name of an executable looked up via the PATH environment variable. + * The special value 'node' will be mapped to VS Code's built-in node runtime. + */ + readonly command: string; + + /** + * Optional arguments passed to the debug adapter executable. + */ + readonly args: string[]; + + /** + * Create a new debug adapter specification. + */ + constructor(command: string, args?: string[]); + } + + export interface DebugConfigurationProvider { + /** + * This optional method is called just before a debug adapter is started to determine its executable path and arguments. + * Registering more than one debugAdapterExecutable for a type results in an error. + * @param folder The workspace folder from which the configuration originates from or undefined for a folderless setup. + * @param token A cancellation token. + * @return a [debug adapter's executable and optional arguments](#DebugAdapterExecutable) or undefined. + */ + debugAdapterExecutable?(folder: WorkspaceFolder | undefined, token?: CancellationToken): ProviderResult; + } + + //#endregion + + //#region Rob, Matt: logging + + /** + * The severity level of a log message + */ + export enum LogLevel { + Trace = 1, + Debug = 2, + Info = 3, + Warning = 4, + Error = 5, + Critical = 6, + Off = 7 + } + + /** + * A logger for writing to an extension's log file, and accessing its dedicated log directory. + */ + export interface Logger { + trace(message: string, ...args: any[]): void; + debug(message: string, ...args: any[]): void; + info(message: string, ...args: any[]): void; + warn(message: string, ...args: any[]): void; + error(message: string | Error, ...args: any[]): void; + critical(message: string | Error, ...args: any[]): void; + } + + export interface ExtensionContext { + /** + * This extension's logger + */ + logger: Logger; + + /** + * Path where an extension can write log files. + * + * Extensions must create this directory before writing to it. The parent directory will always exist. + */ + readonly logDirectory: string; + } + + export namespace env { + /** + * Current logging level. + * + * @readonly + */ + export const logLevel: LogLevel; + } + + //#endregion + + //#region Joao: SCM validation + + /** + * Represents the validation type of the Source Control input. + */ + export enum SourceControlInputBoxValidationType { + + /** + * Something not allowed by the rules of a language or other means. + */ + Error = 0, + + /** + * Something suspicious but allowed. + */ + Warning = 1, + + /** + * Something to inform about but not a problem. + */ + Information = 2 + } + + export interface SourceControlInputBoxValidation { + + /** + * The validation message to display. + */ + readonly message: string; + + /** + * The validation type. + */ + readonly type: SourceControlInputBoxValidationType; + } + + /** + * Represents the input box in the Source Control viewlet. + */ + export interface SourceControlInputBox { + + /** + * A validation function for the input box. It's possible to change + * the validation provider simply by setting this property to a different function. + */ + validateInput?(value: string, cursorPosition: number): ProviderResult; + } + + //#endregion + + //#region Comments + /** + * Comments provider related APIs are still in early stages, they may be changed significantly during our API experiments. + */ + + interface CommentInfo { + threads: CommentThread[]; + commentingRanges?: Range[]; + } + + export enum CommentThreadCollapsibleState { + /** + * Determines an item is collapsed + */ + Collapsed = 0, + /** + * Determines an item is expanded + */ + Expanded = 1 + } + + interface CommentThread { + threadId: string; + resource: Uri; + range: Range; + comments: Comment[]; + collapsibleState?: CommentThreadCollapsibleState; + } + + interface Comment { + commentId: string; + body: MarkdownString; + userName: string; + gravatar: string; + command?: Command; + } + + export interface CommentThreadChangedEvent { + /** + * Added comment threads. + */ + readonly added: CommentThread[]; + + /** + * Removed comment threads. + */ + readonly removed: CommentThread[]; + + /** + * Changed comment threads. + */ + readonly changed: CommentThread[]; + } + + interface DocumentCommentProvider { + provideDocumentComments(document: TextDocument, token: CancellationToken): Promise; + createNewCommentThread?(document: TextDocument, range: Range, text: string, token: CancellationToken): Promise; + replyToCommentThread?(document: TextDocument, range: Range, commentThread: CommentThread, text: string, token: CancellationToken): Promise; + onDidChangeCommentThreads?: Event; + } + + interface WorkspaceCommentProvider { + provideWorkspaceComments(token: CancellationToken): Promise; + createNewCommentThread?(document: TextDocument, range: Range, text: string, token: CancellationToken): Promise; + replyToCommentThread?(document: TextDocument, range: Range, commentThread: CommentThread, text: string, token: CancellationToken): Promise; + + onDidChangeCommentThreads?: Event; + } + + namespace workspace { + export function registerDocumentCommentProvider(provider: DocumentCommentProvider): Disposable; + export function registerWorkspaceCommentProvider(provider: WorkspaceCommentProvider): Disposable; + } + //#endregion + + //#region Terminal + + export interface Terminal { + /** + * Fires when the terminal's pty slave pseudo-device is written to. In other words, this + * provides access to the raw data stream from the process running within the terminal, + * including ANSI sequences. + */ + onData: Event; + } + + export namespace window { + /** + * The currently opened terminals or an empty array. + * + * @readonly + */ + export let terminals: Terminal[]; + + /** + * An [event](#Event) which fires when a terminal has been created, either through the + * [createTerminal](#window.createTerminal) API or commands. + */ + export const onDidOpenTerminal: Event; + } + + //#endregion + + //#region URLs + + export interface ProtocolHandler { + handleUri(uri: Uri): void; + } + + export namespace window { + + /** + * Registers a protocol handler capable of handling system-wide URIs. + */ + export function registerProtocolHandler(handler: ProtocolHandler): Disposable; + } + + //#endregion + + //#region Joh: hierarchical document symbols, https://github.com/Microsoft/vscode/issues/34968 + + export class SymbolInformation2 extends SymbolInformation { + definingRange: Range; + children: SymbolInformation2[]; + } + + export interface DocumentSymbolProvider { + provideDocumentSymbols(document: TextDocument, token: CancellationToken): ProviderResult; + } + + //#endregion + + //#region Joh -> exclusive document filters + + export interface DocumentFilter { + exclusive?: boolean; + } + + //#endregion + + //#region mjbvz: Unused diagnostics + /** + * Additional metadata about the type of diagnostic. + */ + export enum DiagnosticTag { + /** + * Unused or unnecessary code. + */ + Unnecessary = 1, + } + + export interface Diagnostic { + /** + * Additional metadata about the type of the diagnostic. + */ + customTags?: DiagnosticTag[]; + } + + //#endregion + + //#region mjbvz: File rename events + export interface ResourceRenamedEvent { + readonly oldResource: Uri; + readonly newResource: Uri; + } + + export namespace workspace { + export const onDidRenameResource: Event; + } + //#endregion + + //#region mjbvz: Code action trigger + + /** + * How a [code action provider](#CodeActionProvider) was triggered + */ + export enum CodeActionTrigger { + /** + * Provider was triggered automatically by VS Code. + */ + Automatic = 1, + + /** + * User requested code actions. + */ + Manual = 2, + } + + interface CodeActionContext { + /** + * How the code action provider was triggered. + */ + triggerKind?: CodeActionTrigger; + } + + //#endregion + + + //#region Matt: WebView Serializer + + /** + * Restore webview panels that have been persisted when vscode shuts down. + */ + interface WebviewPanelSerializer { + /** + * Restore a webview panel from its seriailzed `state`. + * + * Called when a serialized webview first becomes visible. + * + * @param webviewPanel Webview panel to restore. The serializer should take ownership of this panel. + * @param state Persisted state. + * + * @return Thanble indicating that the webview has been fully restored. + */ + deserializeWebviewPanel(webviewPanel: WebviewPanel, state: any): Thenable; + } + + namespace window { + /** + * Registers a webview panel serializer. + * + * Extensions that support reviving should have an `"onWebviewPanel:viewType"` activation method and + * make sure that [registerWebviewPanelSerializer](#registerWebviewPanelSerializer) is called during activation. + * + * Only a single serializer may be registered at a time for a given `viewType`. + * + * @param viewType Type of the webview panel that can be serialized. + * @param serializer Webview serializer. + */ + export function registerWebviewPanelSerializer(viewType: string, serializer: WebviewPanelSerializer): Disposable; + } + + //#endregion +}