From 67fb477d5e154a521cab6f061a1be8987460fa5e Mon Sep 17 00:00:00 2001 From: Jesse Houwing Date: Mon, 3 Oct 2016 11:21:28 +0200 Subject: [PATCH] Added task to repo --- PingTask/.taskkey | 1 + PingTask/icon.png | Bin 0 -> 26031 bytes PingTask/node_modules/vsts-task-lib/LICENSE | 22 + PingTask/node_modules/vsts-task-lib/README.md | 43 + .../resources.resjson/de-de/resources.resjson | 20 + .../resources.resjson/en-US/resources.resjson | 24 + .../resources.resjson/es-es/resources.resjson | 20 + .../resources.resjson/fr-fr/resources.resjson | 20 + .../resources.resjson/it-IT/resources.resjson | 20 + .../resources.resjson/ja-jp/resources.resjson | 20 + .../resources.resjson/ko-KR/resources.resjson | 20 + .../resources.resjson/ru-RU/resources.resjson | 20 + .../resources.resjson/zh-CN/resources.resjson | 20 + .../resources.resjson/zh-TW/resources.resjson | 20 + .../vsts-task-lib/extensions.d.ts | 6 + .../node_modules/vsts-task-lib/extensions.js | 14 + PingTask/node_modules/vsts-task-lib/lib.json | 26 + .../vsts-task-lib/mock-answer.d.ts | 33 + .../node_modules/vsts-task-lib/mock-answer.js | 29 + .../node_modules/vsts-task-lib/mock-run.d.ts | 13 + .../node_modules/vsts-task-lib/mock-run.js | 28 + .../node_modules/vsts-task-lib/mock-task.d.ts | 115 + .../node_modules/vsts-task-lib/mock-task.js | 408 ++ .../node_modules/vsts-task-lib/mock-test.d.ts | 18 + .../node_modules/vsts-task-lib/mock-test.js | 84 + .../vsts-task-lib/mock-toolrunner.d.ts | 38 + .../vsts-task-lib/mock-toolrunner.js | 244 ++ .../vsts-task-lib/node_modules/.bin/semver | 15 + .../node_modules/.bin/semver.cmd | 7 + .../vsts-task-lib/node_modules/.bin/shjs | 15 + .../vsts-task-lib/node_modules/.bin/shjs.cmd | 7 + .../vsts-task-lib/node_modules/.bin/uuid | 15 + .../vsts-task-lib/node_modules/.bin/uuid.cmd | 7 + .../vsts-task-lib/node_modules/glob/LICENSE | 15 + .../vsts-task-lib/node_modules/glob/README.md | 359 ++ .../vsts-task-lib/node_modules/glob/common.js | 226 ++ .../vsts-task-lib/node_modules/glob/glob.js | 765 ++++ .../glob/node_modules/inflight/LICENSE | 15 + .../glob/node_modules/inflight/README.md | 37 + .../glob/node_modules/inflight/inflight.js | 44 + .../inflight/node_modules/wrappy/LICENSE | 15 + .../inflight/node_modules/wrappy/README.md | 36 + .../inflight/node_modules/wrappy/package.json | 63 + .../inflight/node_modules/wrappy/wrappy.js | 33 + .../glob/node_modules/inflight/package.json | 72 + .../glob/node_modules/inherits/LICENSE | 16 + .../glob/node_modules/inherits/README.md | 42 + .../glob/node_modules/inherits/inherits.js | 7 + .../node_modules/inherits/inherits_browser.js | 23 + .../glob/node_modules/inherits/package.json | 63 + .../glob/node_modules/once/LICENSE | 15 + .../glob/node_modules/once/README.md | 79 + .../once/node_modules/wrappy/LICENSE | 15 + .../once/node_modules/wrappy/README.md | 36 + .../once/node_modules/wrappy/package.json | 63 + .../once/node_modules/wrappy/wrappy.js | 33 + .../glob/node_modules/once/once.js | 42 + .../glob/node_modules/once/package.json | 67 + .../node_modules/path-is-absolute/index.js | 20 + .../node_modules/path-is-absolute/license | 21 + .../path-is-absolute/package.json | 77 + .../node_modules/path-is-absolute/readme.md | 59 + .../node_modules/glob/package.json | 73 + .../vsts-task-lib/node_modules/glob/sync.js | 460 +++ .../node_modules/minimatch/LICENSE | 15 + .../node_modules/minimatch/README.md | 209 + .../node_modules/minimatch/minimatch.js | 923 +++++ .../node_modules/brace-expansion/README.md | 122 + .../node_modules/brace-expansion/index.js | 201 + .../node_modules/balanced-match/.npmignore | 5 + .../node_modules/balanced-match/LICENSE.md | 21 + .../node_modules/balanced-match/README.md | 91 + .../node_modules/balanced-match/index.js | 58 + .../node_modules/balanced-match/package.json | 77 + .../node_modules/concat-map/.travis.yml | 4 + .../node_modules/concat-map/LICENSE | 18 + .../node_modules/concat-map/README.markdown | 62 + .../node_modules/concat-map/example/map.js | 6 + .../node_modules/concat-map/index.js | 13 + .../node_modules/concat-map/package.json | 84 + .../node_modules/concat-map/test/map.js | 39 + .../node_modules/brace-expansion/package.json | 79 + .../node_modules/minimatch/package.json | 64 + .../node_modules/mockery/.npmignore | 2 + .../node_modules/mockery/.travis.yml | 15 + .../node_modules/mockery/LICENSE | 24 + .../node_modules/mockery/README.md | 247 ++ .../node_modules/mockery/examples/example1.js | 123 + .../node_modules/mockery/mockery.js | 347 ++ .../node_modules/mockery/package.json | 96 + .../node_modules/mockery/test/1-general.js | 41 + .../mockery/test/allowable-unhook.js | 71 + .../mockery/test/fixtures/fake_module.js | 5 + .../mockery/test/fixtures/fake_module_2.js | 5 + .../mockery/test/fixtures/intermediary.js | 7 + .../test/fixtures/substitute_fake_module.js | 5 + .../node_modules/mockery/test/intermediary.js | 61 + .../mockery/test/logging-allow-array.js | 61 + .../mockery/test/logging-allowable.js | 52 + .../node_modules/mockery/test/logging.js | 71 + .../node_modules/mockery/test/registered.js | 39 + .../mockery/test/self-register.js | 36 + .../node_modules/mockery/test/substitute.js | 96 + .../node_modules/mockery/test/warn-replace.js | 52 + .../node_modules/node-uuid/.npmignore | 4 + .../node_modules/node-uuid/LICENSE.md | 21 + .../node_modules/node-uuid/README.md | 254 ++ .../node-uuid/benchmark/README.md | 53 + .../node-uuid/benchmark/bench.gnu | 174 + .../node_modules/node-uuid/benchmark/bench.sh | 34 + .../node-uuid/benchmark/benchmark-native.c | 34 + .../node-uuid/benchmark/benchmark.js | 84 + .../node_modules/node-uuid/bin/uuid | 26 + .../node_modules/node-uuid/bower.json | 23 + .../node_modules/node-uuid/component.json | 25 + .../node_modules/node-uuid/package.json | 81 + .../node_modules/node-uuid/test/compare_v1.js | 63 + .../node_modules/node-uuid/test/test.html | 17 + .../node_modules/node-uuid/test/test.js | 231 ++ .../node_modules/node-uuid/uuid.js | 272 ++ .../vsts-task-lib/node_modules/q/CHANGES.md | 786 ++++ .../vsts-task-lib/node_modules/q/LICENSE | 18 + .../vsts-task-lib/node_modules/q/README.md | 881 ++++ .../vsts-task-lib/node_modules/q/package.json | 120 + .../vsts-task-lib/node_modules/q/q.js | 2048 ++++++++++ .../vsts-task-lib/node_modules/q/queue.js | 35 + .../vsts-task-lib/node_modules/semver/LICENSE | 15 + .../node_modules/semver/README.md | 350 ++ .../node_modules/semver/bin/semver | 133 + .../node_modules/semver/package.json | 60 + .../node_modules/semver/range.bnf | 16 + .../node_modules/semver/semver.js | 1203 ++++++ .../node_modules/shelljs/.documentup.json | 6 + .../node_modules/shelljs/.jshintrc | 7 + .../node_modules/shelljs/.npmignore | 2 + .../node_modules/shelljs/.travis.yml | 5 + .../node_modules/shelljs/LICENSE | 26 + .../node_modules/shelljs/README.md | 569 +++ .../node_modules/shelljs/bin/shjs | 51 + .../node_modules/shelljs/global.js | 3 + .../node_modules/shelljs/make.js | 47 + .../node_modules/shelljs/package.json | 62 + .../shelljs/scripts/generate-docs.js | 21 + .../node_modules/shelljs/scripts/run-tests.js | 50 + .../node_modules/shelljs/shell.js | 157 + .../node_modules/shelljs/src/cat.js | 43 + .../node_modules/shelljs/src/cd.js | 19 + .../node_modules/shelljs/src/chmod.js | 208 + .../node_modules/shelljs/src/common.js | 203 + .../node_modules/shelljs/src/cp.js | 201 + .../node_modules/shelljs/src/dirs.js | 191 + .../node_modules/shelljs/src/echo.js | 20 + .../node_modules/shelljs/src/error.js | 10 + .../node_modules/shelljs/src/exec.js | 181 + .../node_modules/shelljs/src/find.js | 51 + .../node_modules/shelljs/src/grep.js | 52 + .../node_modules/shelljs/src/ln.js | 53 + .../node_modules/shelljs/src/ls.js | 126 + .../node_modules/shelljs/src/mkdir.js | 68 + .../node_modules/shelljs/src/mv.js | 80 + .../node_modules/shelljs/src/popd.js | 1 + .../node_modules/shelljs/src/pushd.js | 1 + .../node_modules/shelljs/src/pwd.js | 11 + .../node_modules/shelljs/src/rm.js | 145 + .../node_modules/shelljs/src/sed.js | 43 + .../node_modules/shelljs/src/tempdir.js | 56 + .../node_modules/shelljs/src/test.js | 85 + .../node_modules/shelljs/src/to.js | 29 + .../node_modules/shelljs/src/toEnd.js | 29 + .../node_modules/shelljs/src/which.js | 83 + .../node_modules/vso-node-api/BuildApi.js | 1516 +++++++ .../vso-node-api/ClientApiBases.js | 44 + .../node_modules/vso-node-api/CoreApi.js | 639 +++ .../vso-node-api/FileContainerApi.js | 238 ++ .../node_modules/vso-node-api/GalleryApi.js | 989 +++++ .../node_modules/vso-node-api/GitApi.js | 1490 +++++++ .../node_modules/vso-node-api/HttpClient.js | 141 + .../node_modules/vso-node-api/README.md | 16 + .../vso-node-api/ReleaseManagementApi.js | 1195 ++++++ .../node_modules/vso-node-api/RestClient.js | 161 + .../vso-node-api/Serialization.js | 236 ++ .../node_modules/vso-node-api/TaskAgentApi.js | 195 + .../vso-node-api/TaskAgentApiBase.js | 1386 +++++++ .../node_modules/vso-node-api/TaskApi.js | 603 +++ .../node_modules/vso-node-api/TestApi.js | 2061 ++++++++++ .../node_modules/vso-node-api/TfvcApi.js | 865 ++++ .../node_modules/vso-node-api/VsoClient.js | 219 + .../node_modules/vso-node-api/WebApi.js | 146 + .../vso-node-api/WorkItemTrackingApi.js | 1376 +++++++ .../vso-node-api/handlers/apiversion.js | 14 + .../vso-node-api/handlers/basiccreds.js | 14 + .../vso-node-api/handlers/bearertoken.js | 13 + .../interfaces/BuildInterfaces.js | 1189 ++++++ .../vso-node-api/interfaces/CoreInterfaces.js | 194 + .../interfaces/FileContainerInterfaces.js | 73 + .../interfaces/GalleryInterfaces.js | 421 ++ .../vso-node-api/interfaces/GitInterfaces.js | 1104 +++++ .../interfaces/ReleaseManagementInterfaces.js | 702 ++++ .../interfaces/TaskAgentInterfaces.js | 642 +++ .../vso-node-api/interfaces/TestInterfaces.js | 1048 +++++ .../vso-node-api/interfaces/TfvcInterfaces.js | 1108 +++++ .../interfaces/WorkItemTrackingInterfaces.js | 521 +++ .../interfaces/common/FormInputInterfaces.js | 134 + .../interfaces/common/OperationsInterfaces.js | 39 + .../interfaces/common/SystemDataInterfaces.js | 74 + .../interfaces/common/TfsInterfaces.js | 24 + .../interfaces/common/VSSInterfaces.js | 67 + .../interfaces/common/VsoBaseInterfaces.js | 3 + .../node_modules/vso-node-api/package.json | 68 + .../node_modules/vsts-task-lib/package.json | 74 + PingTask/node_modules/vsts-task-lib/task.d.ts | 408 ++ PingTask/node_modules/vsts-task-lib/task.js | 1290 ++++++ .../vsts-task-lib/taskcommand.d.ts | 10 + .../node_modules/vsts-task-lib/taskcommand.js | 69 + .../vsts-task-lib/toolrunner.d.ts | 101 + .../node_modules/vsts-task-lib/toolrunner.js | 350 ++ .../node_modules/vsts-task-lib/typings.json | 8 + .../node_modules/vsts-task-lib/vault.d.ts | 10 + PingTask/node_modules/vsts-task-lib/vault.js | 61 + PingTask/ping.js | 46 + PingTask/ping.js.map | 1 + PingTask/ping.ps1 | 24 + PingTask/ping.ts | 44 + .../ps_modules/VstsTaskSdk/FindFunctions.ps1 | 292 ++ .../ps_modules/VstsTaskSdk/InputFunctions.ps1 | 425 ++ .../VstsTaskSdk/LocalizationFunctions.ps1 | 150 + .../VstsTaskSdk/LoggingCommandFunctions.ps1 | 506 +++ .../VstsTaskSdk/LongPathFunctions.ps1 | 368 ++ .../ps_modules/VstsTaskSdk/OutFunctions.ps1 | 79 + .../VstsTaskSdk/ServerOMFunctions.ps1 | 549 +++ .../resources.resjson/de-de/resources.resjson | 17 + .../resources.resjson/en-US/resources.resjson | 17 + .../resources.resjson/es-es/resources.resjson | 17 + .../resources.resjson/fr-fr/resources.resjson | 17 + .../resources.resjson/it-IT/resources.resjson | 17 + .../resources.resjson/ja-jp/resources.resjson | 17 + .../resources.resjson/ko-KR/resources.resjson | 17 + .../resources.resjson/ru-RU/resources.resjson | 17 + .../resources.resjson/zh-CN/resources.resjson | 17 + .../resources.resjson/zh-TW/resources.resjson | 17 + .../ps_modules/VstsTaskSdk/ToolFunctions.ps1 | 99 + .../ps_modules/VstsTaskSdk/TraceFunctions.ps1 | 139 + .../ps_modules/VstsTaskSdk/VstsTaskSdk.psd1 | Bin 0 -> 1678 bytes .../ps_modules/VstsTaskSdk/VstsTaskSdk.psm1 | 155 + PingTask/ps_modules/VstsTaskSdk/lib.json | 19 + PingTask/task.json | 41 + PingTask/tsconfig.json | 7 + PingTask/typings.json | 6 + PingTask/typings/globals/node/index.d.ts | 3614 +++++++++++++++++ PingTask/typings/globals/node/typings.json | 8 + PingTask/typings/globals/q/index.d.ts | 361 ++ PingTask/typings/globals/q/typings.json | 8 + PingTask/typings/index.d.ts | 2 + ...ing.jessehouwing-vsts-ping-task-0.0.0.vsix | Bin 0 -> 421762 bytes vss-extension.json | 57 + 255 files changed, 48405 insertions(+) create mode 100644 PingTask/.taskkey create mode 100644 PingTask/icon.png create mode 100644 PingTask/node_modules/vsts-task-lib/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/de-de/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/en-US/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/es-es/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/fr-fr/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/it-IT/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/ja-jp/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/ko-KR/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/ru-RU/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/zh-CN/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/Strings/resources.resjson/zh-TW/resources.resjson create mode 100644 PingTask/node_modules/vsts-task-lib/extensions.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/extensions.js create mode 100644 PingTask/node_modules/vsts-task-lib/lib.json create mode 100644 PingTask/node_modules/vsts-task-lib/mock-answer.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/mock-answer.js create mode 100644 PingTask/node_modules/vsts-task-lib/mock-run.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/mock-run.js create mode 100644 PingTask/node_modules/vsts-task-lib/mock-task.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/mock-task.js create mode 100644 PingTask/node_modules/vsts-task-lib/mock-test.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/mock-test.js create mode 100644 PingTask/node_modules/vsts-task-lib/mock-toolrunner.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/mock-toolrunner.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/.bin/semver create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/.bin/semver.cmd create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/.bin/shjs create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/.bin/shjs.cmd create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/.bin/uuid create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/.bin/uuid.cmd create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/common.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/glob.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/inflight.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/inherits.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/inherits_browser.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/once.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/index.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/license create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/readme.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/glob/sync.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/minimatch.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/index.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/minimatch/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/.npmignore create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/.travis.yml create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/examples/example1.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/mockery.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/1-general.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/allowable-unhook.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/fake_module.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/fake_module_2.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/intermediary.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/substitute_fake_module.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/intermediary.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging-allow-array.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging-allowable.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/registered.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/self-register.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/substitute.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/warn-replace.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/.npmignore create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/LICENSE.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/bench.gnu create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/bench.sh create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/benchmark-native.c create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/benchmark.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/bin/uuid create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/bower.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/component.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/compare_v1.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/test.html create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/test.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/uuid.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/q/CHANGES.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/q/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/q/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/q/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/q/q.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/q/queue.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/semver/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/semver/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/semver/bin/semver create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/semver/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/semver/range.bnf create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/semver/semver.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/.documentup.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/.jshintrc create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/.npmignore create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/.travis.yml create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/LICENSE create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/bin/shjs create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/global.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/make.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/scripts/generate-docs.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/scripts/run-tests.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/shell.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/cat.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/cd.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/chmod.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/common.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/cp.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/dirs.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/echo.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/error.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/exec.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/find.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/grep.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/ln.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/ls.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/mkdir.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/mv.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/popd.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/pushd.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/pwd.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/rm.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/sed.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/tempdir.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/test.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/to.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/toEnd.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/shelljs/src/which.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/BuildApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/ClientApiBases.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/CoreApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/FileContainerApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/GalleryApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/GitApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/HttpClient.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/README.md create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/ReleaseManagementApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/RestClient.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/Serialization.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/TaskAgentApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/TaskAgentApiBase.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/TaskApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/TestApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/TfvcApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/VsoClient.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/WebApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/WorkItemTrackingApi.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/handlers/apiversion.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/handlers/basiccreds.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/handlers/bearertoken.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/BuildInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/CoreInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/FileContainerInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/GalleryInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/GitInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/ReleaseManagementInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/TaskAgentInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/TestInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/TfvcInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/WorkItemTrackingInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/common/FormInputInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/common/OperationsInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/common/SystemDataInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/common/TfsInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/common/VSSInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/interfaces/common/VsoBaseInterfaces.js create mode 100644 PingTask/node_modules/vsts-task-lib/node_modules/vso-node-api/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/package.json create mode 100644 PingTask/node_modules/vsts-task-lib/task.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/task.js create mode 100644 PingTask/node_modules/vsts-task-lib/taskcommand.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/taskcommand.js create mode 100644 PingTask/node_modules/vsts-task-lib/toolrunner.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/toolrunner.js create mode 100644 PingTask/node_modules/vsts-task-lib/typings.json create mode 100644 PingTask/node_modules/vsts-task-lib/vault.d.ts create mode 100644 PingTask/node_modules/vsts-task-lib/vault.js create mode 100644 PingTask/ping.js create mode 100644 PingTask/ping.js.map create mode 100644 PingTask/ping.ps1 create mode 100644 PingTask/ping.ts create mode 100644 PingTask/ps_modules/VstsTaskSdk/FindFunctions.ps1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/InputFunctions.ps1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/LocalizationFunctions.ps1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/LoggingCommandFunctions.ps1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/LongPathFunctions.ps1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/OutFunctions.ps1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/ServerOMFunctions.ps1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/de-de/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/es-es/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/fr-fr/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/it-IT/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/ja-jp/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/ko-KR/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/ru-RU/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-CN/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-TW/resources.resjson create mode 100644 PingTask/ps_modules/VstsTaskSdk/ToolFunctions.ps1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/TraceFunctions.ps1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/VstsTaskSdk.psd1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/VstsTaskSdk.psm1 create mode 100644 PingTask/ps_modules/VstsTaskSdk/lib.json create mode 100644 PingTask/task.json create mode 100644 PingTask/tsconfig.json create mode 100644 PingTask/typings.json create mode 100644 PingTask/typings/globals/node/index.d.ts create mode 100644 PingTask/typings/globals/node/typings.json create mode 100644 PingTask/typings/globals/q/index.d.ts create mode 100644 PingTask/typings/globals/q/typings.json create mode 100644 PingTask/typings/index.d.ts create mode 100644 jessehouwing.jessehouwing-vsts-ping-task-0.0.0.vsix create mode 100644 vss-extension.json diff --git a/PingTask/.taskkey b/PingTask/.taskkey new file mode 100644 index 0000000..3c3bfb3 --- /dev/null +++ b/PingTask/.taskkey @@ -0,0 +1 @@ +6761fd90-8946-11e6-b1ce-93f1c6ad6961 \ No newline at end of file diff --git a/PingTask/icon.png b/PingTask/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..86399033e9609174af166061f4a73474dd44634a GIT binary patch literal 26031 zcmeI5WmH|s)~<0jZowhA1$PPV8a#N=jXN6)5L`oW4el0P65JhvyE`N}1POLYcb{%f zpFSVoz2p95jV+U^ch0KyRMlKH)?h)f!Yc_RcszJ8Ffb%3Nl~TyZ@ph{0L=a8YJxM@ z{TH0Aq=o|+7y`zxH#peGWE?Os$XhcJ5d{TP8<35Isf{hMl!yqit-X!0nI#Ym%w_gN z%#h79AWpYH{mIu)a9ps;;O|?51-v4JYxE*ugq-X9YZUs8=M3f&683iI7RtwFj#6fh z$@uI>@bf*rLI`*hTv%Fl(HL5UAmM~WEG1>RVlK!;(HR29+hv_$O*_v|2TtCl9h_hB z9z=T&Y^g3ek6{hG%_xjHp1kPDj;$5?XreB{X;J93yw$fs;#GK1&uhPbBMZMgdlq|e zck-#AwcV1z5yw$d6#bVM(N&JSt^Fdbz@USv?g zh_rx_c1soh1fJ2RcWQxXQ)&-UW%d&y^ zPORh5);hxF*_MRIPcV@?G{AEx~%qX zotLyr+!D?5vd`OvkS}SFNxOj$no%D@E&imqg*8o`)gYU2intRZKHbr_=g`!>Q; zDt#d|{AkeF6QV;(dlo`cF29TBp}xv~R5#5CPfGis{Ks{hsrH10;uvyy(H(s2f%{zALjc%d_*q+=kVds_?4Ps)Op%YMUye@~V?r=snoI z%(I*`tJUJyOW|j8(J~;~qu0sR9qcEY;wR9Rdi*9$M#zpA13!#Qx%I4>5jMNd>M4Fi zHFC)=*W}ezy!OLyZ(pHC7Zb$94qrpr^VFv22!6wSF+91C<|a0mqsRs?j@&K3NzGs8c=m#@2kOPlmQ!v7)Ihpzg2*a5v4|@j)V9sf?pS3Tzsawb zXPC5GS0z<2d~Ooqs*XA`+&{!|)TLpR2770byQnCOx3N7w3&Tqm*N^u4+q5(_3)au} z%GE5t2b*l3@3qib3DV#sJ9RVr6@uH^9Jn1zc?P z4K08mVgsOwnKd8jL47kRv6&GcsT#W+lbo#x(9}%wtvyir?JE_-w-$!nMx+A#@VqWO z_W`VcAbnyND@$t!9v42+-{SJz+rNq#Nr``xfGqe(g?=?itS+ZOEMj91BxYyepf_Y@ zWg+I|W?*LLX5nI^BW7V@=3r!EV`S#0XJ+NOf3YzU|8bD=!{1xH_D04$N}}R_GATQdJCOYz?_fewcD zX0{+R8*AcUarF&s96@}fq`w;a^Z4VutZe^m$lBo#cJ~w+UG!}knHiWE|H;Y7@J}CG zM|;cPx@Kg^2($!R0j)s}_kPU(=x6({T>Yo}zcu-1^?z;neoW-#{@M9o{k5|C$EF=X zVovu6{y_R~&Hl^NLB-V;$fyK#uyM3E1d2J`p9vZAUHP{dayCY0#;*Sq zBSRiz8+$8#5Wks~z6p@g*4l)Z@vp)M%0K57 zkBE(>js1PMfc&hyjQ>>pk6!m13x(hJ75oxFYoNWEA+eH#F!3K{4+A|=K8W<&tmToi zb^z&H8v><7`R@xD%*>2<42=yqISkmj>465E`t&S7Ha2=Lc0=a-6k*88Wnj$8ZNS0) z+i=LqJ#_z%(4sbmj=xskAEAx@FGD|Y|Buk}_Gb54Q{VD|=2!3kZ=3jsF#pk%q?yD0 zTz7r22JTnFZ+TG}X!q}>|EjPw`z^oO>f1X2f303V(tj=AKNI4g`R{pSGWH3{KL)c|8)R=kN?2^zqjFR3bg*8mgeuFepCJTAPzRhAZLAh zppeP^ocQ16jo;(`yW`&*;AQ-EEwMEF_o4W`^xsG5Uvu_9N0j$hisZSU4fj3M|7{eQ zc^Uts?5~!8*Q@^;RZGX;^qeeA_Xi{Mug^bRA6Ea}RpWnleOUc>*S|bft<6CEEPu52 zx8et0zw-F+DMtBz%K_x)U}tB&U%!7Z{=0{QnG4WTUDWJ;1v~tjm)snG`24-%A00LR zo8yCuKOBD_st22c-$wHH()+E){jP`c&u!1Y5AvT&;s3Mo*BSkP4*W3OQzH*)JZeAT zdKA$^!4s~BG#<5|a6O9Xq2LMELmH3TPq-dM^ic4G>miLt?I&E1B6=uz!u62GqxKW7 zM-e>~JmGps<5Bww*Q1CY3Z8I1r17ZzgzHg64+T%S9@2Q!e!}%AqKASfTn}kHYCqw6 z6wyP$6Rw9e9<`rvJ&Nd|;0f158jspfxE@9HQ1FE7A&p1vCtQyrdMJ3p^^nG+_7kp0 z5j_+<;d)5pQTqwkqlg{~o^U;+@u>ZT>rq4x1y8sh(s3D-j!kJ?YT9!2y}@Pz9jjYsYO5f}Vl4-x{c@1GuYzJE** zLrlEj{t-iBLrEn$FfgkGFffNOFtB4cFfhMaFfi*FFt80gFfdjsFfd%~L@5GKFfi(3 zDN!L6m)YGE=NKI|$2)=0cJaqMg}_lt=XW=Qga!mXSzYb)_}+5aldnCJ}%m5?`aeute{|8U6{q&;{jSidMjT@jzj?&^Udh=-|wE;w#4#RMxCEsW{{@< zdU7BESpt3;+1l@!b>4$RbgR)@ ziiGwEy^%1K?YeRemhqs736XF@A=b1&Rjx6GSh1S$4Q4p_kTfRH1b)K+)Ltl4f61JP zT7rw)gZhH3^};YY=mhG)m_e_?n4oKJ2z}y6h4nf2VbpMcQ1x5&Hsa8*>&62w78UcT zj9{o|5|VFRNM=4aA~oP$2(7=RL%;~=aUno^FVYxRFhvG^37((Zm6XPZC(UI{-x8$< zS4JrI0?mMJaDsj~W4+TP#?;1Q*;I~YlK44-VxLb)dk96l_E|_uOuv+@sV_2<5Kggm zF=eS1BoVg<{ zDi(n5um+j-?(uIuXB+^CLl037-v}1XAJRhkVbYdmJ@l6n9p$-!#x2!|vbT zlzr~#ALU*~v$;!Im=Lbu#Kfu8{~$wh_GKW#x-^&FH+^9ylJMu=+y=uWVAnCcV;4m2K2r zQa{N0r9;Kq#iw%fTO~&5jjp(Ep&VaVN4p=^Z48qVGqiY>a4KM60Q$SezjwsZi{*|1 zro5TF%%NAA$ER_`{VRRsI!vHT&*3|Sy`D*sQxYT*N1&!-`axjAW1WsCFnoc6XsgTi z2ot7GQ)<z3{_*M-?ZH5ZfG?xrIqjquoJ7xWqVQ; z<3YJXJSCnIXFC&Xo=4{%>tcod$asrBY2)PxCpTN*iuC0AzfW$lsj2 zP#O|IX+tfl#9(C#n&5-YYZf@Ziu3QuZmlp;YdVmSj({NPh<+zAeMTgS$V92BC_I2A z)a6xXM?sgWYi!Far=uacr%aQ}1q23TV7pl^%}6^se|-PdJ)!j0B9ZgMQVW^0X3&UR z%Ll`pXq?ipiJ36GBrpMD7lW5a(XS1i9nlaG(Gii+d7E%&mVAeKl$w^nO0l4UBG3Ht z^0Kx-$=lrROm8O>PeHi}Zj|0X6N12{N!FM}KWRjA(5f_``rt+DBk(yqyA<_JKXRrr zhMzCw7ph_syJIQ6xdbI#9UDFK=M}|-MWrZw?9es-wuJK&MQG*f z9;u(scc(y02E(;&cM{+ivYWCI#~EK{!k^6c?apknZe_pP{Isp7ziZd0ACN@!1$83- zF!pX7 zVBXJjsFh6-nbH7DidGAh26Dq%&tPq5!ElkRLaINR$$?I!k*-k-fB+LuW#6bl^ zyW3y&C*J-5JDL|EXLO@KyUvMe`awSr?IGEp)%1?f+?~Jxu0i*X621&D0HV>Xc2lbj zhFUq>8z*{~a8Y1UfQY2u)deV2EbrQ;w(o>j$$@{vS4iQ5%BPcBoM19PVuu0wQJCoi zSo8p?pIF;cJBB}l3QK2S3E?OA4Rj7{H6~5dGLLrSl6Pu8p3PVd!HOmBZg5wzj9DA8 zTj^8*5tsbegW<|cW!}f1n|+b*&(11AoKUGiW2upop(-a%EvR(C&miV#Nxz500dXf8XpY}Y zVA~ovQ5p2oWcxtu8AI}2LgaZIi;FjqrZs<~gz4*-GHz9!g-x0FN*KZ{aX@ehIlu?X)j>A|FEaehjr!`=-(nSKtCL#o04Lj8#3{ zX}kaj@xo}8?pO>lpWeh9DoUi>hDkmDIbmGU|7z3IT6f@L0ly#^8RvztwvY^RD9TYs zq!?{=mw9hS0}mq7T8VmC{%gPsRav?)TT4&@Z_zgHRHbwCieQ{AorYJ79^Cf!XcZ8X zp8?^u5g-8eveTJ8pLbm(2VBK+g>O3- zGb|Z}KF(Jk5n)klMnKvdI3D-?N@DL;r_6J?9CmPqaNbXXW;OGC(7A-0(o9IG$O@j5 z-!LMjS8CQ3A=Zt+k7lPxw}vFhjCrY4;tp+lp}1R$5?UDvVa9h?wbe;<4Ut7VY89@-@M=fWTH~2Fo-dE?w?X zAPjRk)XUGvOjJuDACpB@Ez%Js5%k|v<44K0SX0vSc;WN3`A;ju=@4Wo@wdcEGv5sR z?$)peZ{(HpqE%RLK-3)I3hge6RbxeH^P;e7bkr0ZTLA^}=MykAF2*{2+F{qu)?S~X zUD#2dHkJ+tesv`epgOdsPp!(ky$v?kg$%iy;Cm)gMwd;|x=jt00Qq?k znH7n>yEy^{G=Y~L&qxe_z-#t+HY$bw{wEwBQd@>%P;HPAdI9FwWQJ=cOg=usA83~N z+JTfghRtT%N1dTb%o|E@0Rehb3^)WqN=;c^w#qJ!zR`VS&XeY%&iISV)P#Gk_9t#x zqIHWc03r2+P#ml-y&tEY(zPQFIEFFL%Pp0CW8C zr5NwC@~8@~Fk!xt?A1c`Z+$-L@eBMe3YHAA0;LbX3j)!}W(iro5imCo>AJWWjrDntoK%`LMC(}v*((r_%il8tn+gENz4H;*S?nbQu z*C~nH5Q&2?;hH$dk>?(0e0dlz_l5H#g!L+L8p#0S|q20I( z++Dexp9lr0K>DT?mP|Qbg5(p$>aM#xXH!hWO>yaR{M15^QGs-ULIwkUmjsp6hVpcY zNTW6+l*48fDVTtQ!g+?ew~E11%xS_-5L`JUiUW+)d?oDpCHC-{nrBFJBUU-Sc6{%U zj>L~iEk%C_Q(sdn|H;W97JHTXbU$%H6N%?VT!Ol~sli70eLk5H`BZ1a4sF_&-K43Z zBB&AJ-DRjT5>8{ymd`EJ=-1so&yQL1_maVh0gzqsLre|${UH!Ph)XAEwCaPE$m~}L zz<}qX5i8qK@*lz7=TCsS3zs=PB?e9@PrnkErm7upFy3NcG5@Ex{rKB`U0_L7ekB_x zIC!Z>26{e%0LjjoDvzMnR=ZCih|+ylF70U>AYED|CL@%rY|GbTbq|lKce^)VXw}-L zO-~aI&@6tKuhOcaA-hdG*sECABOG+$>+SbZf02`Go#v8_&zxWkU;RFfmE`nn+j@xk znL67y@OSzlJ0mp10o)!bT$gMw0Qpnyf}%I83H=w_0Cd8Gvrz&Wk z?Y@x|KTZh<`J0j9DjX7Z35-C_iD&|(Zk?=lqBx{F*qqU#*zUHOXXdE+fK(^T z1VGJVKYS`5^t6+T;0F{kY(@&Vjo576GnV8=!)B990=2T?Xg2e_kx5=L*VCD2`$JSw-@=Aswme8eD|X z!aa8dY@YFxz3qt(7DN?4Y(-@EAfi=pvF1eC{}e4nHB#cQb)JyQf$EU?F$3-;4j(Pn zR5hG1;f)-x+KpE)&2CP=Y5mU+Ju0cT=>e8@5w&#UG@)wk`(M#@>*y+;88WeI`B#an znXkX`q`Bn0!>z+(@3AG=Eg=x6!At6nGock}eQRg@Q0#L^d8+9O z!=P4S|A0~1512TFNud{+tXM|IceFDgA3J9oIF#gV3z6Ocf# zo~rw1XvU<}K(C=kV(Ci!cK_fmrBi0p?rUPv_P(jUG`Xi|^ zgIC`NPC>hnZ+o8&opTBnZ?(Rm@QZTsLhbF1+z`UnAc?~)y^O!q!F_WZ z<=Aix#4dB}$I$+fI+XSP<(K6KftBEt_T&nCG_{+X?u*sHrLK<%1kbNKO>pp1p!$Yq zJ9~?;&^YkMzateY=k!3Fog>$@*g>h53N6zT%#j*vjDO=7$~VSd5n7Ish)ZB6yD))( zL)@jjjf!VEuS3b?Q;1$(a9~_Z`^n`ZhpbQlQO(kUK0EXP6x z9E1zH!0l20IOK7}XN1AvdF5?^>t+D93F7TE$3lgXoDw2dV6CTygzi<3>Eq#0fH#ej*yEYSXD5)k&9wr8Kas^N#U&%)f{eqEB@Tn)A95E~1OcqXdVaAIC*N%+91T9nGX1inyvJkAl~a;+>DAD`UHK}o3wdRXAbTsPDvq=}*Zi_uXC2CHtlS)?>Kg@ku{xs17al7KMw35qsLthqD{4&Wb zKd1Ko){+99s>=fHT}+8G!!n`gG5Y$va_x^mXZ!D;J&{k|3i1q3v0F6iyR>{7VoN$0 zjZ&`>g@%V(ccAI3<|)iT=^5ZR5c<;FW%`!b;gFe3g-JC)8mX?HB!2Dm{m@F*)HP%# zTGaPFy|L1gjD6VaDfT5ujAKrsx>QzqjW)jXrS4AbWcZd*?9`z_-OJ}-Q}4dx)yyA> zSzouNZ1dG$&YtfttJ>V*WMi?`0lm)eCc2NzF%#y%Jr*h%ZK+KQQE?1O2fA?#N(O6m z$ozy{6sj)Tm0RA(J}X@r23S6mmxGw5qF{${+V^QytcyQAIXiEHmYKf3NFv&Vy}NYg z+CVqHVCKKbC<^K%VBoo$&~_gD4AvWdFfBOXc(KCBY1?In&CJ0(C^yxB-$1B+{voa0 zdQXY}wsdLPF8E#+_?JaFn}(`Z1sxObX~bP|6?Ff%l+FditVi#Rg_JC<&R*YlFRVY zXp8=GL)#eL#al3oA@2A=c|=i6U?z5hkim%>>*+;F&(tQmODy>9QedgcCEQJfMwiyo zB@Ol4^lyR!h!icaqBO>r+gJl#R{WJM=aN^I)Aj-;4};iGvQhOU0z>k}ae%_Gb_aPV zZ7@vmiLZRuG7+Lj1bALW-{c(jGmv8GX`uc@fBC!^29sBg?hKD>2kP!(Qmx`FnZ3bu z!CZ8eHy`EjTT#jSOI;U~rA8}08`rDugvB$itWGyOy4D+KE4}?F*JRKpX2bm)L+huk zUHSf5xE47B#^QNC3_#8)c(tJ#^VOSgN26QuE{n4--p#b_9m2sQ?;o?vxd;)7AA_?& z>>43vv^tSX<6q-K6F_x%EYnHS+~3`tm<%YG7=DAKQz%xC3yf2xeIcuA2_vDjY;Nf; z%i<63E$(qg$pDP0*nbP9iLDPWu(B#}1^BFer#d^C+||)lYCmz+)RC-`Y_oJs8{mX| zG{e{sZ^SWJedmZFaJzHE^af0+McdZgX!A1JSu?isRiRxk!h5=pTVy#x>$I}rMwe+x z$Ma5FshrJb$?=UwAsg5XCS!ye3E%I#ozV-7R<98&P$5$(bY&WEJ;y=b^|8d)Dan+< z6s7zy3={b(O1(OCwh@J;x>AyF5yB53gBrjv4w*f?o#(@4thd^P$yAoamj%6ez7=oV z|6?ip@Q}m$w)5tCte#Agm3>D(5h7NGdiau~c5n2Jqe1bnwW&RRP4W1b#z)EzowI=?>DVYo!L1qA8jroygSpd&-0ONc+hH%SV#ViMHD z;Q)fAE2&f!C5NpWnq%ba1zqHmefcvcjf#sdD(54UyI~2d`Hib3mlz#+Bd#9}8%$KD zFE&tV?}+U=M{81>w%>L!m>yK38w(cT&TE;8_EDTK^w9&)Bbrb=vik z#TtogCr*2wtORfCg@`zrRMa48Tt4KQ*N#hDlw6(LrIDu+>^K3IwwE+}*@0chz2*ws z{~|C*l%lx;IpuU*i2Z8pqbi$wYo5ST`<}qNAo?U$?Mv@BUC$SL##3=n1Y$Pl1wI-r zN0OiDx{zwZNq%b|@IxGp8o@*Qfi_RE13T^Tvcmn>g(%5er`|dg}OM7 zcf0&*rSZ;Xf#Yj~5e<=BH}%%t2r6TfCHs*A%LHn2O>WoxSFg!XgRxC0&+A#Z*J&(p z9n`x)teR!6rWVPi3*&7z9J$mgz$y;pdOQ}zS?=gC`)mU*pje)i{|o7T;F!KN@g}j7 znebfeE`iZS<&@nLiguraeD2j~{McodP1%M{TKdJ_fzZbq&dpP$RK30y{3Pa zUmY+ZwZgUgYLjG)gvfIUwU+xiWEL`~XR)t*nu_7zC=Uv6a)-4|j_0cunXmLmqX^R1 zXWq}ge`OG(#BKWtJL-Osh2Ux{<1@D}$6Cz?(?r-P!taGu%~*MBE0Za*EkeYFFiQC? z@@vdyMX-}JJ_%A63aa&|+C6~)Nll!ojPqmcH5ZbXO^1X%6lXSZs=-xA<|n@MP0X#a zp4Ab~O&)#+cck50ORODK&6BSNn6Iy>YHUYxXnS#_$Z{{%u;os&<|;nDQQVT(6=*%J z^54L5vV4CuClNJY$=q2=B+GInN`S|aPLfBQ)xxitxAPoA>?FN{SY`lT7d7!?Rm7f# z(Ly^EQq|sSiMr1buP`Cum+~#;DRhDRJIn46h*q$iHECFB;s+roGo@80xtz#ldaj&# z^re+RiDWI$SRo4`eryPityGn@Z?s(iuQKDKZW|o)rYe~}yF@z82*r!kPL$?FaAs&i zlIhka2!XCJmN-}wEmmfdj&16x*f*FP>;MZAaadC-?`Ahd4ZL>qXUw&iF3J>9v4kVN zs`8kSUb>5ExfELtT_Jc=cV+(J+I*7b%eFrY@rW+J>$j{Pls<0>!|#I*lx^TNRItgjM5dYK^=)(nel| z^Z9XZxKWv4j->k8Ok=mgKrtooog#Qq%BCw*bLqTj&jJc%>(HV1`CbOkZj|{E_l_$j z16Q$dqruVH`M{d)ty7S^XRWUsic#&Vm5Ajc*47p0XNP@Ph8NG=H)tJ9_e$+YYJr;e zA;K#c(?9hDFbwTvA+6kn4HcwOJzM>!FX~wXpiQ{-4SP@=rH{GLgn;qB^|gF3Zid?PU~X*7CXG(W$O!!@+}tp_NWV^+O-$fxISK7^I{ldX&R* z=dk0?X*-+Ix;x7g*qC+%?HAddCIVCa*NZSa*~T+0DD;S(QJu#*s_@FlC#JDnFVpG+!7gW2(*R2MS4fsXV+8@F5V7 zAgpGWS0^?f3bAhfwo)$nyp4I7c^E>uVw!a`9SN%IaM(~voRT1yHfqH#P`Edf$%>g} zrOaf&xXy9~c9nbeod6`~sqEXfE4|l)%p{78Uo>LOMEcBz(a*~d3+nb%3OQ2tRIxS! zE;j-gLNOsT(r#z?dS|OufBwV|MXC>#otBl=ig|$*L!U1NfHJK;z|H~ByNp&|{&>@M zV<-m>yX8aYOG8fT{n>T84>cs8O0O0MC;^-O8Xi1WC8}2DZ9bA(YpDo}n5R79d22+# zE3cfiH~rk5KVMdSI;SghB$t$s@cDo%$(}^L3T7=%M8vSY{LL$>y?_m6>dt#$$Yg zytn53yiwppI8-xKf}(q$mB)5NQ^{D<&AL#~+EaO=3JbWi^0FDk5#xoB2`Br>4M#|h z2*Pq)_{68O4@5D9d){oq8C~(tRs?u6$Cpu(U~%|f+`aO?vqt3yIaLLP;f-aq#=(b* z&BF!P;w?!|+E`~bR(5SMxFsJ+C7m}L)7Iybi@em#YClUITdxn^o@~euwBXe6V7-~A z;#4Nsh}K0;B(w^`TkIl+A~%5VpS+mO{5EGvD96OImyUYecG5_Rl_Nw+?j%7K935}qY<$RJ*}23WTEdZe zl0pAH0&h2P)dzV7g05drW8{Lm7)n!0TWf^}e#CNwLJ7QoOXV<+B%am%G(=*@rc`i- zua8zoFiVOu8Y^x*Thp*ZYwb%M%4-78DX@*SMJc9S$<*q&@kE(&O)XS$64qYRCA%!U zag&gl!15+RFDo+$3L)WYYr`r*E*?BS)z34$iP>D3NU!U+g5U6BNPKCHv=fFCtXk^&DZx4l8EP8KyaH#$ z)?iOl6qT-SvEh$DwtF~nX7RQhJ!eF6i&Er1#~(Skh62kK_KnS7 zguxsa+;95YsEJorfmg%#c}V(`EX3aTo+$w-YU9__KE`j~J~M1tu^eUfvc^&o7KMxv zp-_}w?PAY}vz&`1$3#gi>Fn*qq<#IYeDp+vM^~`VCM*%!9UK!|JW2s1S#3J0!zLxu zB&7MmGDE7H?Z$ymTSht6$8ywQX4+#Nf2>C~Rn`v0%3(}Bg)l~3Arp3(-Du7JAfGST##UMZAYpwiG&w$C z;02C~-U`o0>{K3jZ|?;f9Qnur_0z#3+x^RSZO2Put#>t%;WryhC74k%fuG(e0jC6` zM&Odl&3)c(M|@P?OtaqIw7A+2>g8MB{ii6~$GJoyRWWsG063W(rlfiiV7A zuwkzVo=YY@7%f2p@Q#2;lq6mY_Hb?{igs*~Wu`=|3m&YmAst31lmt+Ws(vXU-IS@* z{I2adW6iNIT@IA+>E;C1ZYQ&lCL1mAB)J%J(g#afFH|K5EcNwmJiou)ma4lHYdCoF zVs{?1-H|;GZCs>1vx(zoWhX@TC?N=BbQxqdB8@|8_4Ks1EWoliI z=`?&Sh$PqcF zd_=!LxxvQ~AN-U^eKBU54&gwUDO%CFpoNQFQ%zi;1(bf(r98l|iivd#5jRu%q8I0o zj(XWPoQ^dYPVs%dRY9nrsU#&NK{u)jg^;Pf1`IklSv#DxU3@|j&4eX``y5S`qbb(c zVuiw*a*%hrN@OS|Mf*#g01NtTg4Q~9l4mJ6qFZf}iCy|hB++s@aiS8GG`b6^G^kooQf^?xXpICo z)EW0tW(^N>d-Py5< zkf9cbwF>FvLQr!tVj)3UN^6rg^RpVpD`XF>N$yr*4;Zb`2xro&mbM!hLl2(?L{q1V z5vx;Tr^jUT?kN;&L1l;ztrvyC=qG&oGTzT&wdWW>W$84zI+FUKPL5&E(2sm4U|MQW zlv&(VaQ0`f&bQ{kAMNFg*I8!Z^0@^#qcr~DeL#~*-ZRoc_!d71I+1xeGr!lBx};?W zc&bro)-eWgJ523CfTRJqux>0W3D=--Ffynd+}4B6e(Ww$Gg@M!_0JB8U;+_Ag1kGg zVi-v{`X$lr&)i1%!tY@26!&;=#; +export declare function execSync(tool: string, args: any, options?: trm.IExecOptions): trm.IExecResult; +export declare function tool(tool: string): trm.ToolRunner; +export interface MatchOptions { + debug?: boolean; + nobrace?: boolean; + noglobstar?: boolean; + dot?: boolean; + noext?: boolean; + nocase?: boolean; + nonull?: boolean; + matchBase?: boolean; + nocomment?: boolean; + nonegate?: boolean; + flipNegate?: boolean; +} +export declare function match(list: string[], pattern: string, options?: MatchOptions): string[]; +export declare function match(list: string[], patterns: string[], options?: MatchOptions): string[]; +export declare function matchFile(list: any, pattern: any, options: any): string[]; +export declare function filter(pattern: any, options: any): any; +export declare class TestPublisher { + constructor(testRunner: any); + testRunner: string; + publish(resultFiles: any, mergeResults: any, platform: any, config: any, runTitle: any, publishRunAttachments: any): void; +} +export declare class CodeCoveragePublisher { + constructor(); + publish(codeCoverageTool: any, summaryFileLocation: any, reportDirectory: any, additionalCodeCoverageFiles: any): void; +} +export declare class CodeCoverageEnabler { + private buildTool; + private ccTool; + constructor(buildTool: string, ccTool: string); + enableCodeCoverage(buildProps: { + [key: string]: string; + }): void; +} diff --git a/PingTask/node_modules/vsts-task-lib/mock-task.js b/PingTask/node_modules/vsts-task-lib/mock-task.js new file mode 100644 index 0000000..a36120f --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/mock-task.js @@ -0,0 +1,408 @@ +"use strict"; +var path = require('path'); +var os = require('os'); +var task = require('./task'); +var tcm = require('./taskcommand'); +var trm = require('./mock-toolrunner'); +var ma = require('./mock-answer'); +var mock = new ma.MockAnswers(); +function setAnswers(answers) { + mock.initialize(answers); + trm.setAnswers(answers); +} +exports.setAnswers = setAnswers; +(function (TaskResult) { + TaskResult[TaskResult["Succeeded"] = 0] = "Succeeded"; + TaskResult[TaskResult["Failed"] = 1] = "Failed"; +})(exports.TaskResult || (exports.TaskResult = {})); +var TaskResult = exports.TaskResult; +//----------------------------------------------------- +// String convenience +//----------------------------------------------------- +function startsWith(str, start) { + return str.slice(0, start.length) == start; +} +function endsWith(str, start) { + return str.slice(-str.length) == str; +} +//----------------------------------------------------- +// General Helpers +//----------------------------------------------------- +exports._outStream = process.stdout; +exports._errStream = process.stderr; +function _writeError(str) { + exports._errStream.write(str + os.EOL); +} +exports._writeError = _writeError; +function _writeLine(str) { + exports._outStream.write(str + os.EOL); +} +exports._writeLine = _writeLine; +function setStdStream(stdStream) { + exports._outStream = stdStream; +} +exports.setStdStream = setStdStream; +function setErrStream(errStream) { + exports._errStream = errStream; +} +exports.setErrStream = setErrStream; +//----------------------------------------------------- +// Results and Exiting +//----------------------------------------------------- +module.exports.setResult = task.setResult; +// +// Catching all exceptions +// +process.on('uncaughtException', function (err) { + module.exports.setResult(TaskResult.Failed, 'Unhandled:' + err.message); +}); +//----------------------------------------------------- +// Loc Helpers +//----------------------------------------------------- +function setResourcePath(path) { + // nothing in mock +} +exports.setResourcePath = setResourcePath; +function loc(key) { + return 'loc_mock_' + key; +} +exports.loc = loc; +//----------------------------------------------------- +// Input Helpers +//----------------------------------------------------- +module.exports.getVariable = task.getVariable; +module.exports.setVariable = task.setVariable; +module.exports.getInput = task.getInput; +module.exports.getBoolInput = task.getBoolInput; +module.exports.setEnvVar = task.setEnvVar; +module.exports.getDelimitedInput = task.getDelimitedInput; +module.exports.filePathSupplied = task.filePathSupplied; +function getPathInput(name, required, check) { + var inval = module.exports.getInput(name, required); + if (inval) { + if (check) { + checkPath(inval, name); + } + } + return inval; +} +module.exports.getPathInput = getPathInput; +//----------------------------------------------------- +// Endpoint Helpers +//----------------------------------------------------- +module.exports.getEndpointUrl = task.getEndpointUrl; +module.exports.getEndpointDataParameter = task.getEndpointDataParameter; +module.exports.getEndpointAuthorizationScheme = task.getEndpointAuthorizationScheme; +module.exports.getEndpointAuthorizationParameter = task.getEndpointAuthorizationParameter; +module.exports.getEndpointAuthorization = task.getEndpointAuthorization; +//----------------------------------------------------- +// Fs Helpers +//----------------------------------------------------- +var FsStats = (function () { + function FsStats() { + } + FsStats.prototype.setAnswers = function (mockResponses) { + this.m_isFile = mockResponses['isFile'] || false; + this.m_isDirectory = mockResponses['isDirectory'] || false; + this.m_isBlockDevice = mockResponses['isBlockDevice'] || false; + this.m_isCharacterDevice = mockResponses['isCharacterDevice'] || false; + this.m_isSymbolicLink = mockResponses['isSymbolicLink'] || false; + this.m_isFIFO = mockResponses['isFIFO'] || false; + this.m_isSocket = mockResponses['isSocket'] || false; + this.dev = mockResponses['dev']; + this.ino = mockResponses['ino']; + this.mode = mockResponses['mode']; + this.nlink = mockResponses['nlink']; + this.uid = mockResponses['uid']; + this.gid = mockResponses['gid']; + this.rdev = mockResponses['rdev']; + this.size = mockResponses['size']; + this.blksize = mockResponses['blksize']; + this.blocks = mockResponses['blocks']; + this.atime = mockResponses['atime']; + this.mtime = mockResponses['mtime']; + this.ctime = mockResponses['ctime']; + this.m_isSocket = mockResponses['isSocket']; + }; + FsStats.prototype.isFile = function () { + return this.m_isFile; + }; + FsStats.prototype.isDirectory = function () { + return this.m_isDirectory; + }; + FsStats.prototype.isBlockDevice = function () { + return this.m_isBlockDevice; + }; + FsStats.prototype.isCharacterDevice = function () { + return this.m_isCharacterDevice; + }; + FsStats.prototype.isSymbolicLink = function () { + return this.m_isSymbolicLink; + }; + FsStats.prototype.isFIFO = function () { + return this.m_isFIFO; + }; + FsStats.prototype.isSocket = function () { + return this.m_isSocket; + }; + return FsStats; +}()); +exports.FsStats = FsStats; +function stats(path) { + var fsStats = new FsStats(); + fsStats.setAnswers(mock.getResponse('stats', path) || {}); + return fsStats; +} +exports.stats = stats; +function exist(path) { + return mock.getResponse('exist', path) || false; +} +exports.exist = exist; +function writeFile(file, data, options) { + //do nothing +} +exports.writeFile = writeFile; +function osType() { + return mock.getResponse('osType', 'osType'); +} +exports.osType = osType; +function cwd() { + return mock.getResponse('cwd', 'cwd'); +} +exports.cwd = cwd; +//----------------------------------------------------- +// Cmd Helpers +//----------------------------------------------------- +module.exports.command = task.command; +module.exports.warning = task.warning; +module.exports.error = task.error; +module.exports.debug = task.debug; +function cd(path) { + // do nothing. TODO: keep stack with asserts +} +exports.cd = cd; +function pushd(path) { + // do nothing. TODO: keep stack with asserts +} +exports.pushd = pushd; +function popd() { + // do nothing. TODO: keep stack with asserts +} +exports.popd = popd; +//------------------------------------------------ +// Validation Helpers +//------------------------------------------------ +function checkPath(p, name) { + module.exports.debug('check path : ' + p); + if (!p || !mock.getResponse('checkPath', p)) { + throw new Error('Not found ' + p); + } +} +exports.checkPath = checkPath; +//----------------------------------------------------- +// Shell/File I/O Helpers +// Abstract these away so we can +// - default to good error handling +// - inject system.debug info +// - have option to switch internal impl (shelljs now) +//----------------------------------------------------- +function mkdirP(p) { + module.exports.debug('creating path: ' + p); +} +exports.mkdirP = mkdirP; +function resolve() { + // we can't do ...param if we target ES6 and node 5. This is what <=ES5 compiles down to. + //return the posix implementation in the mock, so paths will be consistent when L0 tests are run on Windows or Mac/Linux + var absolutePath = path.posix.resolve.apply(this, arguments); + module.exports.debug('Absolute path for pathSegments: ' + arguments + ' = ' + absolutePath); + return absolutePath; +} +exports.resolve = resolve; +function which(tool, check) { + var response = mock.getResponse('which', tool); + if (check) { + checkPath(response, tool); + } + return response; +} +exports.which = which; +function ls(options, paths) { + var response = mock.getResponse('ls', paths[0]); + if (!response) { + return []; + } + return response; +} +exports.ls = ls; +function cp(options, source, dest) { + console.log('###copying###'); + module.exports.debug('copying ' + source + ' to ' + dest); +} +exports.cp = cp; +function find(findPath) { + return mock.getResponse('find', findPath); +} +exports.find = find; +function rmRF(path) { + var response = mock.getResponse('rmRF', path); + if (!response['success']) { + module.exports.setResult(1, response['message']); + } +} +exports.rmRF = rmRF; +function mv(source, dest, force, continueOnError) { + module.exports.debug('moving ' + source + ' to ' + dest); + return true; +} +exports.mv = mv; +function glob(pattern) { + module.exports.debug('glob ' + pattern); + var matches = mock.getResponse('glob', pattern); + module.exports.debug('found ' + matches.length + ' matches'); + if (matches.length > 0) { + var m = Math.min(matches.length, 10); + module.exports.debug('matches:'); + if (m == 10) { + module.exports.debug('listing first 10 matches as samples'); + } + for (var i = 0; i < m; i++) { + module.exports.debug(matches[i]); + } + } + return matches; +} +exports.glob = glob; +function globFirst(pattern) { + module.exports.debug('globFirst ' + pattern); + var matches = glob(pattern); + if (matches.length > 1) { + module.exports.warning('multiple workspace matches. using first.'); + } + module.exports.debug('found ' + matches.length + ' matches'); + return matches[0]; +} +exports.globFirst = globFirst; +//----------------------------------------------------- +// Exec convenience wrapper +//----------------------------------------------------- +function exec(tool, args, options) { + var toolPath = which(tool, true); + var tr = this.tool(toolPath); + if (args) { + tr.arg(args); + } + return tr.exec(options); +} +exports.exec = exec; +function execSync(tool, args, options) { + var toolPath = which(tool, true); + var tr = this.tool(toolPath); + if (args) { + tr.arg(args); + } + return tr.execSync(options); +} +exports.execSync = execSync; +function tool(tool) { + var tr = new trm.ToolRunner(tool); + tr.on('debug', function (message) { + module.exports.debug(message); + }); + return tr; +} +exports.tool = tool; +function match(list, pattern, options) { + return mock.getResponse('match', pattern) || []; +} +exports.match = match; +function matchFile(list, pattern, options) { + return mock.getResponse('match', pattern) || []; +} +exports.matchFile = matchFile; +function filter(pattern, options) { + var filterList = mock.getResponse('filter', pattern) || []; + return function (pattern, i, arr) { + return filterList.indexOf(pattern) >= 0; + }; +} +exports.filter = filter; +//----------------------------------------------------- +// Test Publisher +//----------------------------------------------------- +var TestPublisher = (function () { + function TestPublisher(testRunner) { + this.testRunner = testRunner; + } + TestPublisher.prototype.publish = function (resultFiles, mergeResults, platform, config, runTitle, publishRunAttachments) { + var properties = {}; + properties['type'] = this.testRunner; + if (mergeResults) { + properties['mergeResults'] = mergeResults; + } + if (platform) { + properties['platform'] = platform; + } + if (config) { + properties['config'] = config; + } + if (runTitle) { + properties['runTitle'] = runTitle; + } + if (publishRunAttachments) { + properties['publishRunAttachments'] = publishRunAttachments; + } + if (resultFiles) { + properties['resultFiles'] = resultFiles; + } + module.exports.command('results.publish', properties, ''); + }; + return TestPublisher; +}()); +exports.TestPublisher = TestPublisher; +//----------------------------------------------------- +// Code Coverage Publisher +//----------------------------------------------------- +var CodeCoveragePublisher = (function () { + function CodeCoveragePublisher() { + } + CodeCoveragePublisher.prototype.publish = function (codeCoverageTool, summaryFileLocation, reportDirectory, additionalCodeCoverageFiles) { + var properties = {}; + if (codeCoverageTool) { + properties['codecoveragetool'] = codeCoverageTool; + } + if (summaryFileLocation) { + properties['summaryfile'] = summaryFileLocation; + } + if (reportDirectory) { + properties['reportdirectory'] = reportDirectory; + } + if (additionalCodeCoverageFiles) { + properties['additionalcodecoveragefiles'] = additionalCodeCoverageFiles; + } + module.exports.command('codecoverage.publish', properties, ""); + }; + return CodeCoveragePublisher; +}()); +exports.CodeCoveragePublisher = CodeCoveragePublisher; +//----------------------------------------------------- +// Code coverage Publisher +//----------------------------------------------------- +var CodeCoverageEnabler = (function () { + function CodeCoverageEnabler(buildTool, ccTool) { + this.buildTool = buildTool; + this.ccTool = ccTool; + } + CodeCoverageEnabler.prototype.enableCodeCoverage = function (buildProps) { + buildProps['buildtool'] = this.buildTool; + buildProps['codecoveragetool'] = this.ccTool; + module.exports.command('codecoverage.enable', buildProps, ""); + }; + return CodeCoverageEnabler; +}()); +exports.CodeCoverageEnabler = CodeCoverageEnabler; +//----------------------------------------------------- +// Tools +//----------------------------------------------------- +exports.TaskCommand = tcm.TaskCommand; +exports.commandFromString = tcm.commandFromString; +exports.ToolRunner = trm.ToolRunner; diff --git a/PingTask/node_modules/vsts-task-lib/mock-test.d.ts b/PingTask/node_modules/vsts-task-lib/mock-test.d.ts new file mode 100644 index 0000000..045209b --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/mock-test.d.ts @@ -0,0 +1,18 @@ +export declare class MockTestRunner { + constructor(testPath: string); + private _testPath; + stdout: string; + stderr: string; + cmdlines: any; + invokedToolCount: number; + succeeded: boolean; + errorIssues: string[]; + warningIssues: string[]; + failed: boolean; + ran(cmdline: string): boolean; + createdErrorIssue(message: string): boolean; + createdWarningIssue(message: string): boolean; + stdOutContained(message: string): boolean; + stdErrContained(message: string): boolean; + run(): void; +} diff --git a/PingTask/node_modules/vsts-task-lib/mock-test.js b/PingTask/node_modules/vsts-task-lib/mock-test.js new file mode 100644 index 0000000..0140faa --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/mock-test.js @@ -0,0 +1,84 @@ +"use strict"; +var cp = require('child_process'); +var os = require('os'); +var cmdm = require('./taskcommand'); +var shelljs = require('shelljs'); +var COMMAND_TAG = '[command]'; +var COMMAND_LENGTH = COMMAND_TAG.length; +var MockTestRunner = (function () { + function MockTestRunner(testPath) { + this._testPath = testPath; + } + Object.defineProperty(MockTestRunner.prototype, "failed", { + get: function () { + return !this.succeeded; + }, + enumerable: true, + configurable: true + }); + MockTestRunner.prototype.ran = function (cmdline) { + return this.cmdlines.hasOwnProperty(cmdline.trim()); + }; + MockTestRunner.prototype.createdErrorIssue = function (message) { + return this.errorIssues.indexOf(message.trim()) >= 0; + }; + MockTestRunner.prototype.createdWarningIssue = function (message) { + return this.warningIssues.indexOf(message.trim()) >= 0; + }; + MockTestRunner.prototype.stdOutContained = function (message) { + return this.stdout && this.stdout.indexOf(message) > 0; + }; + MockTestRunner.prototype.stdErrContained = function (message) { + return this.stderr && this.stderr.indexOf(message) > 0; + }; + MockTestRunner.prototype.run = function () { + var _this = this; + this.cmdlines = {}; + this.invokedToolCount = 0; + this.succeeded = true; + this.errorIssues = []; + this.warningIssues = []; + // we use node in the path. + // if you want to test with a specific node, ensure it's in the path + var nodePath = shelljs.which('node'); + if (!nodePath) { + console.error('Could not find node in path'); + return; + } + var spawn = cp.spawnSync(nodePath, [this._testPath]); + if (spawn.error) { + console.error('Running test failed'); + console.error(spawn.error.message); + return; + } + this.stdout = spawn.stdout.toString(); + this.stderr = spawn.stderr.toString(); + var lines = this.stdout.split(os.EOL); + lines.forEach(function (line) { + if (process.env['TASK_TEST_TRACE']) { + console.log(line); + } + var ci = line.indexOf('##vso'); + var cmi = line.indexOf(COMMAND_TAG); + if (ci >= 0) { + var cmd = cmdm.commandFromString(line.substring(ci)); + if (cmd.command === 'task.complete' && cmd.properties['result'] === 'Failed') { + _this.succeeded = false; + } + if (cmd.command === 'task.issue' && cmd.properties['type'] === 'error') { + _this.errorIssues.push(cmd.message.trim()); + } + if (cmd.command === 'task.issue' && cmd.properties['type'] === 'warning') { + _this.warningIssues.push(cmd.message.trim()); + } + } + else if (cmi == 0 && line.length > COMMAND_LENGTH) { + var cmdline = line.substr(COMMAND_LENGTH).trim(); + _this.cmdlines[cmdline] = true; + _this.invokedToolCount++; + } + }); + }; + return MockTestRunner; +}()); +exports.MockTestRunner = MockTestRunner; diff --git a/PingTask/node_modules/vsts-task-lib/mock-toolrunner.d.ts b/PingTask/node_modules/vsts-task-lib/mock-toolrunner.d.ts new file mode 100644 index 0000000..ce546fd --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/mock-toolrunner.d.ts @@ -0,0 +1,38 @@ +import Q = require('q'); +import events = require('events'); +import ma = require('./mock-answer'); +export declare function setAnswers(answers: ma.TaskLibAnswers): void; +export interface IExecOptions { + cwd: string; + env: { + [key: string]: string; + }; + silent: boolean; + failOnStdErr: boolean; + ignoreReturnCode: boolean; + outStream: NodeJS.WritableStream; + errStream: NodeJS.WritableStream; +} +export interface IExecResult { + stdout: string; + stderr: string; + code: number; + error: Error; +} +export declare function debug(message: any): void; +export declare class ToolRunner extends events.EventEmitter { + constructor(toolPath: any); + toolPath: string; + args: string[]; + silent: boolean; + private pipeOutputToTool; + private _debug(message); + private _argStringToArray(argString); + arg(val: any): ToolRunner; + argIf(condition: any, val: any): ToolRunner; + line(val: string): ToolRunner; + pipeExecOutputToTool(tool: ToolRunner): ToolRunner; + private ignoreTempPath(cmdString); + exec(options: IExecOptions): Q.Promise; + execSync(options: IExecOptions): IExecResult; +} diff --git a/PingTask/node_modules/vsts-task-lib/mock-toolrunner.js b/PingTask/node_modules/vsts-task-lib/mock-toolrunner.js new file mode 100644 index 0000000..40fb47f --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/mock-toolrunner.js @@ -0,0 +1,244 @@ +"use strict"; +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var Q = require('q'); +var os = require('os'); +var events = require('events'); +var ma = require('./mock-answer'); +var mock = new ma.MockAnswers(); +function setAnswers(answers) { + mock.initialize(answers); +} +exports.setAnswers = setAnswers; +var run = function (cmd, callback) { + console.log('running: ' + cmd); + var output = ''; + try { + } + catch (err) { + console.log(err.message); + } +}; +; +function debug(message) { + // do nothing, overridden +} +exports.debug = debug; +; +var ToolRunner = (function (_super) { + __extends(ToolRunner, _super); + function ToolRunner(toolPath) { + debug('toolRunner toolPath: ' + toolPath); + _super.call(this); + this.toolPath = toolPath; + this.args = []; + this.silent = false; + } + ToolRunner.prototype._debug = function (message) { + if (!this.silent) { + debug(message); + } + this.emit('debug', message); + }; + ToolRunner.prototype._argStringToArray = function (argString) { + var args = []; + var inQuotes = false; + var escaped = false; + var arg = ''; + var append = function (c) { + // we only escape double quotes. + if (escaped && c !== '"') { + arg += '\\'; + } + arg += c; + escaped = false; + }; + for (var i = 0; i < argString.length; i++) { + var c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } + else { + append(c); + } + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === ' ' && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ''; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + }; + ToolRunner.prototype.arg = function (val) { + if (!val) { + return; + } + if (val instanceof Array) { + this._debug(this.toolPath + ' arg: ' + JSON.stringify(val)); + this.args = this.args.concat(val); + } + else if (typeof (val) === 'string') { + this._debug(this.toolPath + ' arg: ' + val); + this.args = this.args.concat(val.trim()); + } + return this; + }; + ToolRunner.prototype.argIf = function (condition, val) { + if (condition) { + this.arg(val); + } + return this; + }; + ToolRunner.prototype.line = function (val) { + if (!val) { + return; + } + this._debug(this.toolPath + ' arg: ' + val); + this.args = this.args.concat(this._argStringToArray(val)); + return this; + }; + ToolRunner.prototype.pipeExecOutputToTool = function (tool) { + this.pipeOutputToTool = tool; + return this; + }; + ToolRunner.prototype.ignoreTempPath = function (cmdString) { + this._debug('ignoreTempPath=' + process.env['MOCK_IGNORE_TEMP_PATH']); + this._debug('tempPath=' + process.env['MOCK_TEMP_PATH']); + if (process.env['MOCK_IGNORE_TEMP_PATH'] === 'true') { + // Using split/join to replace the temp path + cmdString = cmdString.split(process.env['MOCK_TEMP_PATH']).join(''); + } + return cmdString; + }; + // + // Exec - use for long running tools where you need to stream live output as it runs + // returns a promise with return code. + // + ToolRunner.prototype.exec = function (options) { + var _this = this; + var defer = Q.defer(); + this._debug('exec tool: ' + this.toolPath); + this._debug('Arguments:'); + this.args.forEach(function (arg) { + _this._debug(' ' + arg); + }); + var success = true; + options = options || {}; + var ops = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + outStream: options.outStream || process.stdout, + errStream: options.errStream || process.stderr, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false + }; + var argString = this.args.join(' ') || ''; + var cmdString = this.toolPath; + if (argString) { + cmdString += (' ' + argString); + } + // Using split/join to replace the temp path + cmdString = this.ignoreTempPath(cmdString); + if (!ops.silent) { + if (this.pipeOutputToTool) { + var pipeToolArgString = this.pipeOutputToTool.args.join(' ') || ''; + var pipeToolCmdString = this.ignoreTempPath(this.pipeOutputToTool.toolPath); + if (pipeToolArgString) { + pipeToolCmdString += (' ' + pipeToolArgString); + } + cmdString += ' | ' + pipeToolCmdString; + } + ops.outStream.write('[command]' + cmdString + os.EOL); + } + // TODO: filter process.env + var res = mock.getResponse('exec', cmdString); + if (res.stdout) { + this.emit('stdout', res.stdout); + if (!ops.silent) { + ops.outStream.write(res.stdout + os.EOL); + } + } + if (res.stderr) { + this.emit('stderr', res.stderr); + success = !ops.failOnStdErr; + if (!ops.silent) { + var s = ops.failOnStdErr ? ops.errStream : ops.outStream; + s.write(res.stderr + os.EOL); + } + } + var code = res.code; + ops.outStream.write('rc:' + res.code + os.EOL); + if (code != 0 && !ops.ignoreReturnCode) { + success = false; + } + ops.outStream.write('success:' + success + os.EOL); + if (success) { + defer.resolve(code); + } + else { + defer.reject(new Error(this.toolPath + ' failed with return code: ' + code)); + } + return defer.promise; + }; + // + // ExecSync - use for short running simple commands. Simple and convenient (synchronous) + // but also has limits. For example, no live output and limited to max buffer + // + ToolRunner.prototype.execSync = function (options) { + var _this = this; + var defer = Q.defer(); + this._debug('exec tool: ' + this.toolPath); + this._debug('Arguments:'); + this.args.forEach(function (arg) { + _this._debug(' ' + arg); + }); + var success = true; + options = options || {}; + var ops = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + outStream: options.outStream || process.stdout, + errStream: options.errStream || process.stderr, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false + }; + var argString = this.args.join(' ') || ''; + var cmdString = this.toolPath; + // Using split/join to replace the temp path + cmdString = this.ignoreTempPath(cmdString); + if (argString) { + cmdString += (' ' + argString); + } + if (!ops.silent) { + ops.outStream.write('[command]' + cmdString + os.EOL); + } + var r = mock.getResponse('exec', cmdString); + if (r.stdout && r.stdout.length > 0) { + ops.outStream.write(r.stdout); + } + if (r.stderr && r.stderr.length > 0) { + ops.errStream.write(r.stderr); + } + return { code: r.code, stdout: (r.stdout) ? r.stdout.toString() : null, stderr: (r.stderr) ? r.stderr.toString() : null }; + }; + return ToolRunner; +}(events.EventEmitter)); +exports.ToolRunner = ToolRunner; diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/.bin/semver b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/semver new file mode 100644 index 0000000..ac1ea9f --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/semver @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../semver/bin/semver" "$@" + ret=$? +else + node "$basedir/../semver/bin/semver" "$@" + ret=$? +fi +exit $ret diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/.bin/semver.cmd b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/semver.cmd new file mode 100644 index 0000000..37c00a4 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/semver.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\semver\bin\semver" %* +) \ No newline at end of file diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/.bin/shjs b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/shjs new file mode 100644 index 0000000..9908675 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/shjs @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../shelljs/bin/shjs" "$@" + ret=$? +else + node "$basedir/../shelljs/bin/shjs" "$@" + ret=$? +fi +exit $ret diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/.bin/shjs.cmd b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/shjs.cmd new file mode 100644 index 0000000..3d98b0b --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/shjs.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\shelljs\bin\shjs" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\shelljs\bin\shjs" %* +) \ No newline at end of file diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/.bin/uuid b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/uuid new file mode 100644 index 0000000..ca9624d --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/uuid @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=`dirname "$0"` + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../node-uuid/bin/uuid" "$@" + ret=$? +else + node "$basedir/../node-uuid/bin/uuid" "$@" + ret=$? +fi +exit $ret diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/.bin/uuid.cmd b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/uuid.cmd new file mode 100644 index 0000000..9f2abd0 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/.bin/uuid.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\node-uuid\bin\uuid" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\node-uuid\bin\uuid" %* +) \ No newline at end of file diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/LICENSE b/PingTask/node_modules/vsts-task-lib/node_modules/glob/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/glob/README.md new file mode 100644 index 0000000..6960483 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/README.md @@ -0,0 +1,359 @@ +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master) + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![](oh-my-glob.gif) + +## Usage + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* `cb` `{Function}` + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` `{String}` Pattern to be matched +* `options` `{Object}` +* return: `{Array}` filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` `{String}` pattern to search for +* `options` `{Object}` +* `cb` `{Function}` Called when an error occurs, or matches are found + * `err` `{Error | null}` + * `matches` `{Array}` filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'FILE'` - Path exists, and is not a directory + * `'DIR'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the specific + thing that matched. It is not deduplicated or resolved to a realpath. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of glob patterns to exclude matches. + Note: `ignore` patterns are *always* in `dot:true` mode, regardless + of any other settings. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +Previously, this module let you mark a pattern as a "comment" if it +started with a `#` character, or a "negated" pattern if it started +with a `!` character. + +These options were deprecated in version 5, and removed in version 6. + +To specify things that should not match, use the `ignore` option. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/common.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/common.js new file mode 100644 index 0000000..c9127eb --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/common.js @@ -0,0 +1,226 @@ +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = options.cwd + self.changedCwd = path.resolve(options.cwd) !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + return !(/\/$/.test(e)) + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/glob.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/glob.js new file mode 100644 index 0000000..a62da27 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/glob.js @@ -0,0 +1,765 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + var n = this.minimatch.set.length + this._processing = 0 + this.matches = new Array(n) + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + + function done () { + --self._processing + if (self._processing <= 0) + self._finish() + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + fs.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (this.matches[index][e]) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = this._makeAbs(e) + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + if (this.mark) + e = this._mark(e) + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er) + return cb() + + var isSym = lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && !stat.isDirectory()) + return cb(null, false, stat) + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return cb() + + return cb(null, c, stat) +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/LICENSE b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/LICENSE new file mode 100644 index 0000000..05eeeb8 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/README.md new file mode 100644 index 0000000..6dc8929 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/README.md @@ -0,0 +1,37 @@ +# inflight + +Add callbacks to requests in flight to avoid async duplication + +## USAGE + +```javascript +var inflight = require('inflight') + +// some request that does some stuff +function req(key, callback) { + // key is any random string. like a url or filename or whatever. + // + // will return either a falsey value, indicating that the + // request for this key is already in flight, or a new callback + // which when called will call all callbacks passed to inflightk + // with the same key + callback = inflight(key, callback) + + // If we got a falsey value back, then there's already a req going + if (!callback) return + + // this is where you'd fetch the url or whatever + // callback is also once()-ified, so it can safely be assigned + // to multiple events etc. First call wins. + setTimeout(function() { + callback(null, key) + }, 100) +} + +// only assigns a single setTimeout +// when it dings, all cbs get called +req('foo', cb1) +req('foo', cb2) +req('foo', cb3) +req('foo', cb4) +``` diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/inflight.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/inflight.js new file mode 100644 index 0000000..8bc96cb --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/inflight.js @@ -0,0 +1,44 @@ +var wrappy = require('wrappy') +var reqs = Object.create(null) +var once = require('once') + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md new file mode 100644 index 0000000..98eab25 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json new file mode 100644 index 0000000..de3bfd5 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json @@ -0,0 +1,63 @@ +{ + "name": "wrappy", + "version": "1.0.2", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "files": [ + "wrappy.js" + ], + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^2.3.1" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy", + "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", + "_id": "wrappy@1.0.2", + "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "_from": "wrappy@>=1.0.0 <2.0.0", + "_npmVersion": "3.9.1", + "_nodeVersion": "5.10.1", + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "dist": { + "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" + }, + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js new file mode 100644 index 0000000..bb7e7d6 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/package.json new file mode 100644 index 0000000..077c122 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inflight/package.json @@ -0,0 +1,72 @@ +{ + "name": "inflight", + "version": "1.0.5", + "description": "Add callbacks to requests in flight to avoid async duplication", + "main": "inflight.js", + "files": [ + "inflight.js" + ], + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^1.2.0" + }, + "scripts": { + "test": "tap test.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/inflight.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "gitHead": "559e37b4f6327fca797fe8d7fe8ed6d9cae08821", + "_id": "inflight@1.0.5", + "_shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a", + "_from": "inflight@>=1.0.4 <2.0.0", + "_npmVersion": "3.9.1", + "_nodeVersion": "5.10.1", + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "dist": { + "shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a", + "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz" + }, + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/inflight-1.0.5.tgz_1463529611443_0.00041943578980863094" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/LICENSE b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/inherits.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/inherits.js new file mode 100644 index 0000000..3b94763 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/inherits.js @@ -0,0 +1,7 @@ +try { + var util = require('util'); + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + module.exports = require('./inherits_browser.js'); +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/inherits_browser.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..c1e78a7 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/package.json new file mode 100644 index 0000000..ecb5a35 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/inherits/package.json @@ -0,0 +1,63 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.3", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, + "license": "ISC", + "scripts": { + "test": "node test" + }, + "devDependencies": { + "tap": "^7.1.0" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ], + "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "homepage": "https://github.com/isaacs/inherits#readme", + "_id": "inherits@2.0.3", + "_shasum": "633c2c83e3da42a502f52466022480f4208261de", + "_from": "inherits@>=2.0.0 <3.0.0", + "_npmVersion": "3.10.7", + "_nodeVersion": "6.5.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "633c2c83e3da42a502f52466022480f4208261de", + "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/LICENSE b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/README.md new file mode 100644 index 0000000..1f1ffca --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/README.md @@ -0,0 +1,79 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` + +## `once.strict(func)` + +Throw an error if the function is called twice. + +Some functions are expected to be called only once. Using `once` for them would +potentially hide logical errors. + +In the example below, the `greet` function has to call the callback only once: + +```javascript +function greet (name, cb) { + // return is missing from the if statement + // when no name is passed, the callback is called twice + if (!name) cb('Hello anonymous') + cb('Hello ' + name) +} + +function log (msg) { + console.log(msg) +} + +// this will print 'Hello anonymous' but the logical error will be missed +greet(null, once(msg)) + +// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time +greet(null, once.strict(msg)) +``` diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/README.md new file mode 100644 index 0000000..98eab25 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/package.json new file mode 100644 index 0000000..de3bfd5 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/package.json @@ -0,0 +1,63 @@ +{ + "name": "wrappy", + "version": "1.0.2", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "files": [ + "wrappy.js" + ], + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^2.3.1" + }, + "scripts": { + "test": "tap --coverage test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy", + "gitHead": "71d91b6dc5bdeac37e218c2cf03f9ab55b60d214", + "_id": "wrappy@1.0.2", + "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "_from": "wrappy@>=1.0.0 <2.0.0", + "_npmVersion": "3.9.1", + "_nodeVersion": "5.10.1", + "_npmUser": { + "name": "zkat", + "email": "kat@sykosomatic.org" + }, + "dist": { + "shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", + "tarball": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/wrappy-1.0.2.tgz_1463527848281_0.037129373755306005" + }, + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js new file mode 100644 index 0000000..bb7e7d6 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/once.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/once.js new file mode 100644 index 0000000..2354067 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/once.js @@ -0,0 +1,42 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/package.json new file mode 100644 index 0000000..9800997 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/once/package.json @@ -0,0 +1,67 @@ +{ + "name": "once", + "version": "1.4.0", + "description": "Run a function exactly one time", + "main": "once.js", + "directories": { + "test": "test" + }, + "dependencies": { + "wrappy": "1" + }, + "devDependencies": { + "tap": "^7.0.1" + }, + "scripts": { + "test": "tap test/*.js" + }, + "files": [ + "once.js" + ], + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "keywords": [ + "once", + "function", + "one", + "single" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "gitHead": "0e614d9f5a7e6f0305c625f6b581f6d80b33b8a6", + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "homepage": "https://github.com/isaacs/once#readme", + "_id": "once@1.4.0", + "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", + "_from": "once@>=1.3.0 <2.0.0", + "_npmVersion": "3.10.7", + "_nodeVersion": "6.5.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", + "tarball": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/once-1.4.0.tgz_1473196269128_0.537820661207661" + }, + "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/index.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/index.js new file mode 100644 index 0000000..22aa6c3 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +} + +function win32(path) { + // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = Boolean(device && device.charAt(1) !== ':'); + + // UNC paths are always absolute + return Boolean(result[2] || isUnc); +} + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/license b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/package.json new file mode 100644 index 0000000..851195e --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/package.json @@ -0,0 +1,77 @@ +{ + "name": "path-is-absolute", + "version": "1.0.1", + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-is-absolute.git" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "devDependencies": { + "xo": "^0.16.0" + }, + "gitHead": "edc91d348b21dac2ab65ea2fbec2868e2eff5eb6", + "bugs": { + "url": "https://github.com/sindresorhus/path-is-absolute/issues" + }, + "homepage": "https://github.com/sindresorhus/path-is-absolute#readme", + "_id": "path-is-absolute@1.0.1", + "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", + "_from": "path-is-absolute@>=1.0.0 <2.0.0", + "_npmVersion": "3.10.3", + "_nodeVersion": "6.6.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "dist": { + "shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", + "tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/path-is-absolute-1.0.1.tgz_1475210523565_0.9876507974695414" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/readme.md b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/readme.md new file mode 100644 index 0000000..8dbdf5f --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/node_modules/path-is-absolute/readme.md @@ -0,0 +1,59 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +const pathIsAbsolute = require('path-is-absolute'); + +// Running on Linux +pathIsAbsolute('/home/foo'); +//=> true +pathIsAbsolute('C:/Users/foo'); +//=> false + +// Running on Windows +pathIsAbsolute('C:/Users/foo'); +//=> true +pathIsAbsolute('/home/foo'); +//=> false + +// Running on any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +pathIsAbsolute.posix('C:/Users/foo'); +//=> false +pathIsAbsolute.win32('C:/Users/foo'); +//=> true +pathIsAbsolute.win32('/home/foo'); +//=> false +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +POSIX specific version. + +### pathIsAbsolute.win32(path) + +Windows specific version. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/glob/package.json new file mode 100644 index 0000000..54709b6 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/package.json @@ -0,0 +1,73 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "glob", + "description": "a little globber", + "version": "6.0.4", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "engines": { + "node": "*" + }, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^5.0.0", + "tick": "0.0.6" + }, + "scripts": { + "prepublish": "npm run benchclean", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" + }, + "license": "ISC", + "gitHead": "3bd419c538737e56fda7e21c21ff52ca0c198df6", + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "homepage": "https://github.com/isaacs/node-glob#readme", + "_id": "glob@6.0.4", + "_shasum": "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22", + "_from": "glob@>=6.0.1 <7.0.0", + "_npmVersion": "2.14.15", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22", + "tarball": "http://registry.npmjs.org/glob/-/glob-6.0.4.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/glob/sync.js b/PingTask/node_modules/vsts-task-lib/node_modules/glob/sync.js new file mode 100644 index 0000000..09883d2 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/glob/sync.js @@ -0,0 +1,460 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = fs.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this.matches[index][e] = true + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + var abs = this._makeAbs(e) + if (this.mark) + e = this._mark(e) + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[this._makeAbs(e)] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + // lstat failed, doesn't exist + return null + } + + var isSym = lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this.matches[index][prefix] = true +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + return false + } + + if (lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/LICENSE b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/README.md new file mode 100644 index 0000000..ad72b81 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/README.md @@ -0,0 +1,209 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instantiating the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/minimatch.js b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000..5b5f8cf --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/minimatch.js @@ -0,0 +1,923 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/README.md new file mode 100644 index 0000000..1793929 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/README.md @@ -0,0 +1,122 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/index.js b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/index.js new file mode 100644 index 0000000..955f27c --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = /^(.*,)+(.+)?$/.test(m.body); + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore new file mode 100644 index 0000000..ae5d8c3 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore @@ -0,0 +1,5 @@ +test +.gitignore +.travis.yml +Makefile +example.js diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md new file mode 100644 index 0000000..2cdc8e4 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md new file mode 100644 index 0000000..08e918c --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md @@ -0,0 +1,91 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! + +[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) +[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) + +[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) + +## Example + +Get the first matching pair of braces: + +```js +var balanced = require('balanced-match'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +``` + +The matches are: + +```bash +$ node example.js +{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } +{ start: 3, + end: 9, + pre: 'pre', + body: 'first', + post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } +``` + +## API + +### var m = balanced(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +object with those keys: + +* **start** the index of the first match of `a` +* **end** the index of the matching `b` +* **pre** the preamble, `a` and `b` not included +* **body** the match, `a` and `b` not included +* **post** the postscript, `a` and `b` not included + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. + +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js new file mode 100644 index 0000000..e8d8587 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -0,0 +1,58 @@ +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json new file mode 100644 index 0000000..2557dda --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -0,0 +1,77 @@ +{ + "name": "balanced-match", + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "version": "0.4.2", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "homepage": "https://github.com/juliangruber/balanced-match", + "main": "index.js", + "scripts": { + "test": "make test" + }, + "dependencies": {}, + "devDependencies": { + "tape": "^4.6.0" + }, + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "gitHead": "57c2ea29d89a2844ae3bdcc637c6e2cbb73725e2", + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" + }, + "_id": "balanced-match@0.4.2", + "_shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", + "_from": "balanced-match@>=0.4.1 <0.5.0", + "_npmVersion": "2.15.8", + "_nodeVersion": "4.4.7", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "dist": { + "shasum": "cb3f3e3c732dc0f01ee70b403f302e61d7709838", + "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/balanced-match-0.4.2.tgz_1468834991581_0.6590619895141572" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml new file mode 100644 index 0000000..f1d0f13 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.4 + - 0.6 diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown new file mode 100644 index 0000000..408f70a --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown @@ -0,0 +1,62 @@ +concat-map +========== + +Concatenative mapdashery. + +[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) + +[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) + +example +======= + +``` js +var concatMap = require('concat-map'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); +``` + +*** + +``` +[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] +``` + +methods +======= + +``` js +var concatMap = require('concat-map') +``` + +concatMap(xs, fn) +----------------- + +Return an array of concatenated elements by calling `fn(x, i)` for each element +`x` and each index `i` in the array `xs`. + +When `fn(x, i)` returns an array, its result will be concatenated with the +result array. If `fn(x, i)` returns anything else, that value will be pushed +onto the end of the result array. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install concat-map +``` + +license +======= + +MIT + +notes +===== + +This module was written while sitting high above the ground in a tree. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js new file mode 100644 index 0000000..3365621 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js @@ -0,0 +1,6 @@ +var concatMap = require('../'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js new file mode 100644 index 0000000..b29a781 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js @@ -0,0 +1,13 @@ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json new file mode 100644 index 0000000..ba4b5a8 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json @@ -0,0 +1,84 @@ +{ + "name": "concat-map", + "description": "concatenative mapdashery", + "version": "0.0.1", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" + }, + "main": "index.js", + "keywords": [ + "concat", + "concatMap", + "map", + "functional", + "higher-order" + ], + "directories": { + "example": "example", + "test": "test" + }, + "scripts": { + "test": "tape test/*.js" + }, + "devDependencies": { + "tape": "~2.4.0" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "bugs": { + "url": "https://github.com/substack/node-concat-map/issues" + }, + "homepage": "https://github.com/substack/node-concat-map", + "_id": "concat-map@0.0.1", + "dist": { + "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "tarball": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "_from": "concat-map@0.0.1", + "_npmVersion": "1.3.21", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "readme": "concat-map\n==========\n\nConcatenative mapdashery.\n\n[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map)\n\n[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map)\n\nexample\n=======\n\n``` js\nvar concatMap = require('concat-map');\nvar xs = [ 1, 2, 3, 4, 5, 6 ];\nvar ys = concatMap(xs, function (x) {\n return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];\n});\nconsole.dir(ys);\n```\n\n***\n\n```\n[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]\n```\n\nmethods\n=======\n\n``` js\nvar concatMap = require('concat-map')\n```\n\nconcatMap(xs, fn)\n-----------------\n\nReturn an array of concatenated elements by calling `fn(x, i)` for each element\n`x` and each index `i` in the array `xs`.\n\nWhen `fn(x, i)` returns an array, its result will be concatenated with the\nresult array. If `fn(x, i)` returns anything else, that value will be pushed\nonto the end of the result array.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install concat-map\n```\n\nlicense\n=======\n\nMIT\n\nnotes\n=====\n\nThis module was written while sitting high above the ground in a tree.\n", + "readmeFilename": "README.markdown" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js new file mode 100644 index 0000000..fdbd702 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js @@ -0,0 +1,39 @@ +var concatMap = require('../'); +var test = require('tape'); + +test('empty or not', function (t) { + var xs = [ 1, 2, 3, 4, 5, 6 ]; + var ixes = []; + var ys = concatMap(xs, function (x, ix) { + ixes.push(ix); + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; + }); + t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); + t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); + t.end(); +}); + +test('always something', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('scalars', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : x; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('undefs', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function () {}); + t.same(ys, [ undefined, undefined, undefined, undefined ]); + t.end(); +}); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/package.json new file mode 100644 index 0000000..e00a73a --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -0,0 +1,79 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "1.1.6", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh" + }, + "dependencies": { + "balanced-match": "^0.4.1", + "concat-map": "0.0.1" + }, + "devDependencies": { + "tape": "^4.6.0" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "gitHead": "791262fa06625e9c5594cde529a21d82086af5f2", + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "_id": "brace-expansion@1.1.6", + "_shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", + "_from": "brace-expansion@>=1.0.0 <2.0.0", + "_npmVersion": "2.15.8", + "_nodeVersion": "4.4.7", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "dist": { + "shasum": "7197d7eaa9b87e648390ea61fc66c84427420df9", + "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + } + ], + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/brace-expansion-1.1.6.tgz_1469047715600_0.9362958471756428" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/package.json new file mode 100644 index 0000000..f6d7c1f --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/minimatch/package.json @@ -0,0 +1,64 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.0.3", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "brace-expansion": "^1.0.0" + }, + "devDependencies": { + "standard": "^3.7.2", + "tap": "^5.6.0" + }, + "license": "ISC", + "files": [ + "minimatch.js" + ], + "gitHead": "eed89491bd4a4e6bc463aac0dfb5c29ef0d1dc13", + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "homepage": "https://github.com/isaacs/minimatch#readme", + "_id": "minimatch@3.0.3", + "_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774", + "_from": "minimatch@>=3.0.0 <4.0.0", + "_npmVersion": "3.10.6", + "_nodeVersion": "4.4.4", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "dist": { + "shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774", + "tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/minimatch-3.0.3.tgz_1470678322731_0.1892083385027945" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/.npmignore b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/.npmignore new file mode 100644 index 0000000..62562b7 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/.npmignore @@ -0,0 +1,2 @@ +coverage +node_modules diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/.travis.yml b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/.travis.yml new file mode 100644 index 0000000..6a09715 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/.travis.yml @@ -0,0 +1,15 @@ +language: node_js +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.9 + - g++-4.9 +env: CXX=g++-4.9 CC=gcc-4.9 +node_js: + - "0.10" + - "0.11" + - "0.12" + - "4" + - "6" diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/LICENSE b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/LICENSE new file mode 100644 index 0000000..26e4435 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/LICENSE @@ -0,0 +1,24 @@ + Copyrights for code authored by Yahoo! Inc. is licensed under the following + terms: + + MIT License + + Copyright (c) 2011 Yahoo! Inc. All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/README.md new file mode 100644 index 0000000..b6dc837 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/README.md @@ -0,0 +1,247 @@ +# Mockery - Simplifying the use of mocks with Node.js + +[![Build Status](https://secure.travis-ci.org/mfncooper/mockery.png)](http://travis-ci.org/mfncooper/mockery) + +If you've tried working with mocks in Node.js, you've no doubt discovered that +it's not so easy to get your mocks hooked up in the face of Node's module +loading system. When your source-under-test pulls in its dependencies through +`require`, you want your mocks provided, instead of the original module, +to enable true unit testing of your code. + +This is exactly the problem Mockery is designed to solve. Mockery gives you a +simple and easy to use API with which you can hook in your mocks without having +to get your hands dirty with the `require` cache or other Node implementation +details. + +Mockery is *not* a mocking framework. It lets you work more easily with your +framework of choice (or no framework) to get your mocks hooked in to all the +right places in the code you need to test. + +* [Installation](#installation) +* [Enabling mockery](#enabling-mockery) +* [Registering mocks](#registering-mocks) +* [Registering substitutes](#registering-substitutes) +* [Registering allowable modules](#registering-allowable-modules) +* [Deregistering everything](#deregistering-everything) +* [Controlling the module cache](#controlling-the-module-cache) +* [Disabling warnings](#disabling-warnings) +* [The name](#the-name) +* [License](#license) + +## Installation + +Just use npm: + + npm install mockery + +## Enabling mockery + +When enabled, Mockery intercepts *all* `require` calls, regardless of where +those calls are being made from. Thus it's almost always desirable to bracket +your usage as narrowly as possible. + +If you're using a typical unit testing framework, you might enable and disable +Mockery in the test setup and teardown functions for your test cases. Something +like this: + + setUp: function() { + mockery.enable(); + }, + tearDown: function() { + mockery.disable(); + } + +### Options + +You can set up some initial configuration by passing an options object to +`enable`. Omitting the options object, or any of the defined keys, causes the +standard defaults to be used. + +For example, to disable all warnings, you might use this: + + mockery.enable({ + warnOnReplace: false, + warnOnUnregistered: false + }); + +The available options are: + +* _useCleanCache_ determines whether a temporary module cache should be used +while Mockery is enabled. See [Controlling the module cache](#controlling-the-module-cache) +below. [Default: false] +* _warnOnReplace_ determines whether or not warnings are issued when a mock or +substitute is replaced without being first deregistered. This has the same +effect as the `warnOnReplace` function. [Default: true] +* _warnOnUnregistered_ determines whether or not warnings are issued when a +module is not mocked, substituted or allowed. This has the same effect as the +`warnOnUnregistered` function. [Default: true] + +## Registering mocks + +You register your mocks with Mockery to tell it which mocks to provide for which +`require` calls. For example: + + var fsMock = { + stat: function (path, cb) { /* your mock code */ } + }; + mockery.registerMock('fs', fsMock); + +The arguments to `registerMock` are as follows: + +* _module_, the name or path of the module for which a mock is being +registered. This must exactly match the argument to `require`; there is no +"clever" matching. +* _mock_, the mock to be provided. Whatever is provided here is what will +become the result of subsequent `require` calls; that is, the `exports` of the +module. + +If you no longer want your mock to be used, you can deregister it: + + mockery.deregisterMock('fs'); + +Now the original module will be provided for any subsequent `require` calls. + +## Registering substitutes + +Sometimes you want to implement your mock itself as a module, especially if it's +more complicated and you'll be reusing it more widely. In that case, you can +tell Mockery to substitute that module for the original one. For example: + + mockery.registerSubstitute('fs', 'fs-mock'); + +Now any `require` invocation for 'fs' will be satisfied by loading the 'fs-mock' +module instead. + +The arguments to `registerSubstitute` are as follows: + +* _module_, the name or path of the module for which a substitute is being +registered. This must exactly match the argument to `require`; there is no +"clever" matching. +* _substitute_, the name or path of the module to substitute for _module_. + +If you no longer want your substitute to be used, you can deregister it: + + mockery.deregisterSubstitute('fs'); + +Now the original module will be provided for any subsequent `require` calls. + +## Registering allowable modules + +If you enable Mockery and _don't_ mock or substitute a module that is later +loaded via `require`, Mockery will print a warning to the console to tell you +that. This is so that you don't inadvertently use downstream modules without +being aware of them. By registering a module as "allowable", you tell Mockery +that you know about its use, and then Mockery won't print the warning. + +The most common use case for this is your source-under-test, which obviously +you'll want to load without warnings. For example: + + mockery.registerAllowable('./my-source-under-test'); + +As with `registerMock` and `registerSubstitute`, the first argument, _module_, +is the name or path of the module as it would be provided to `require`. Once +again, you can deregister it if you need to: + + mockery.deregisterAllowable('./my-source-under-test'); + +Sometimes you'll find that you need to register several modules at once. A +convenience function lets you do this with a single call: + + mockery.registerAllowables(['async', 'path', 'util']); + +and similarly to deregister several modules at once, as you would expect: + + mockery.deregisterAllowables(['async', 'path', 'util']); + +### Unhooking + +By default, the Node module loader will load a given module only once, caching +the loaded module for the lifetime of the process. When you're using Mockery, +this is almost always what you want. _Almost_. In relatively rare situations, +you may find that you need to use different mocks for different test cases +for the same source-under-test. (This is not the same as supplying different +test data in the same mock; here we're talking about providing different +functions for a module's `exports`.) + +To do this, your source-under-test must be unhooked from Node's module loading +system, such that it can be loaded again with new mocks. You do this by passing +a second argument, _unhook_, to `registerAllowable`, like this: + + mockery.registerAllowable('./my-source-under-test', true); + +When you subsequently deregister your source-under-test, Mockery will unhook it +from the Node module loading system as well as deregistering it. + +## Deregistering everything + +Since it's such a common use case, especially when you're using a unit test +framework and its setup and teardown functions, Mockery provides a convenience +function to deregister everything: + + mockery.deregisterAll(); + +This will deregister all mocks, substitutes, and allowable modules, as well as +unhooking any hooked modules. + +## Controlling the module cache + +One of the common problems that people encounter when trying to use mocks in +Node is that modules and their exports are almost always cached. This makes it +difficult to plug in a mock for testing if the module being mocked has already +been loaded elsewhere. + +Mockery provides a way for you to run your tests using a clean module cache, as +if no modules have been loaded. When this option is enabled, any previously +loaded modules will be "forgotten", and `require` calls will cause them to be +reloaded. This in turn allows your mocks to be picked up, and your tests to run +as expected. + +You tell Mockery to use a clean cache when you enable it, like this: + + mockery.enable({ useCleanCache: true }); + +Now all modules will be cached in this new clean cache, until you later disable +Mockery again. The new cache is temporary, and is discarded when Mockery is +disabled. The original cache is reinstated at that point, so you are back to +where you were before enabling the clean cache option. + +While you are working with a temporary cache, it may occasionally be useful to +reset it to a clean state again, without disabling and re-enabling Mockery. You +can do this with: + + mockery.resetCache(); + +This function has no effect if the clean cache option is not already in use. + +## Disabling warnings + +As mentioned above, if you enable Mockery and _don't_ mock, substitute, or +allow a module that is later loaded, Mockery will print a warning to the +console to tell you that. This is important when you're writing unit tests, +so that you don't end up using modules you weren't aware of. + +In certain circumstances, such as when writing functional or integration tests, +you may find it irritating to have to allow each module or to have all the +warnings appear on the console. If you need to, you can tell Mockery to turn +off those warnings: + + mockery.warnOnUnregistered(false); + +Mockery will also print a warning to the console whenever you register a mock +or substitute for a module for which one is already registered. This is almost +always what you want, since you should be deregistering mocks and substitutes +that you no longer need. Occasionally, though, you may want to suppress these +warnings, which you can do like this: + + mockery.warnOnReplace(false); + +In either of these cases, if you later need to re-enable the warnings, then +passing `true` to the same functions will do that, as you might imagine. + +## The name + +Mockery is to mocks as rookery is to rooks. + +## License + +Mockery is licensed under the [MIT License](http://github.com/mfncooper/mockery/raw/master/LICENSE). diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/examples/example1.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/examples/example1.js new file mode 100644 index 0000000..ccb17a8 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/examples/example1.js @@ -0,0 +1,123 @@ +/* + Copyrights for code authored by Yahoo! Inc. is licensed under the following + terms: + + MIT License + + Copyright (c) 2012 Yahoo! Inc. All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +/* + * This example demonstrates the use of Mockery to allow a mock to be used even + * when its requiring module has already been loaded and cached by Node. We do + * not use a test framework in this example, so that we control the sequence of + * calls to our "tests". This lets us show that tests using the original module + * dependencies can run before and / or after tests using our mock, without any + * interference in either direction. + * + * Notes: + * 1. If you change useCleanCache to 'false' in the mock test, that test will + * fail, because the module to be mocked was already cached by the previous + * test. + * 2. If, in addition to the above, you remove the call to the real test before + * the call to the mock test, the mock test will succeed but the second real + * test will fail, because the mock is now cached by Node. + * 3. If, in addition to both of the above, you amend the registration of the + * module under test to ask that it be unhooked, the remaining tests will + * pass, because Node will reload that module for the third test. + * 4. The 'useCleanCache' option is useful in particular because it avoids the + * complexities inherent in the above combinations, and lets your tests run + * in any order without the risk of cross-test interference. + */ + +"use strict"; + +var assert = require('assert'), + mockery = require('../mockery'), + moduleUnderTest = '../test/fixtures/intermediary'; + +// This is the mock we will use to replace the functionality of 'fake_module', +// which is used by 'intermediary'. +var mock_fake_module = { + foo: function () { + return 'mocked foo'; + } +}; + +/* + * Here we test 'intermediary' in its original state, without using any mocks. + * Thus the original 'fake_module' will be loaded and used by 'intermediary'. + */ +function testWithRealFoo() { + var intermediary = require(moduleUnderTest), + result = intermediary.bar(); + console.log("testWithRealFoo: " + result); + assert.equal(result, "real foo"); +} + +/* + * Here we test 'intermediary' while mocking its dependency, 'fake_module'. Our + * mock provides different results, so that we can verify the test. + * + * Note that when a test framework is being used, it would be typical for (some + * of) the Mockery calls to be placed in setUp() and tearDown() functions. + */ +function testWithMockFoo() { + // Register the module under test (i.e. 'intermediary') as an allowable + // module, so that mockery won't complain about it being loaded. + mockery.registerAllowable(moduleUnderTest); + // Register our mock for 'fake_module', using the path that 'intermediary' + // will use to 'require' it. This tells mockery to provide our mock any + // time this path is passed to 'require'. + mockery.registerMock('./fake_module', mock_fake_module); + // Enable mockery and tell it to use a clean cache. By using a clean cache, + // Node will reload 'intermediary', causing it in turn to re-require its + // 'fake_module' dependency, at which point mockery will provide our mock. + // Without the clean cache, 'intermediary' will not be reloaded, because + // Node knows it is already loaded (and cached). This means that mockery + // has no opportunity to provide the mock, since 'fake_module' was already + // loaded by 'intermediary' and will not be re-required. + mockery.enable({ useCleanCache: true }); + + var intermediary = require(moduleUnderTest), + result = intermediary.bar(); + console.log("testWithMockFoo: " + result); + assert.equal(result, "mocked foo"); + + // Now that we're done with our test, we need to disable mockery so that it + // doesn't continue intercepting 'require' calls from, for example, a test + // framework. + mockery.disable(); + // Finally, we clean up by deregistering the mock and allowable that we + // registered at the beginning of the test. + mockery.deregisterAll(); +} + +// Mainline code +// +// We run a test using the original modules first, which causes Node to load +// and cache all of the modules. Then we run a test using a mock, showing that +// it is provided even though the original was cached. Finally, we re-run the +// test using the original modules, showing that everything was unhooked after +// the previous test. +testWithRealFoo(); +testWithMockFoo(); +testWithRealFoo(); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/mockery.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/mockery.js new file mode 100644 index 0000000..43fc83d --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/mockery.js @@ -0,0 +1,347 @@ +/* + Copyrights for code authored by Yahoo! Inc. is licensed under the following + terms: + + MIT License + + Copyright (c) 2011-2012 Yahoo! Inc. All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +*/ + +/* + * A library that enables the hooking of the standard 'require' function, such + * that a (possibly partial) mock implementation can be provided instead. This + * is most useful for running unit tests, since any dependency obtained through + * 'require' can be mocked out. + */ + +"use strict"; + +var m = require('module'), + registeredMocks = {}, + registeredSubstitutes = {}, + registeredAllowables = {}, + originalLoader = null, + originalCache = null, + defaultOptions = { + useCleanCache: false, + warnOnReplace: true, + warnOnUnregistered: true + }, + options = {}; + +/* + * Merge the supplied options in with a new copy of the default options to get + * the effective options, and return those. + */ +function getEffectiveOptions(opts) { + var options = {}; + + Object.keys(defaultOptions).forEach(function (key) { + options[key] = defaultOptions[key]; + }); + if (opts) { + Object.keys(opts).forEach(function (key) { + options[key] = opts[key]; + }); + } + return options; +} + +/* + * The (private) loader replacement that is used when hooking is enabled. It + * does the work of returning a mock or substitute when configured, reporting + * non-allowed modules, and invoking the original loader when appropriate. + * The signature of this function *must* match that of Node's Module._load, + * since it will replace that when mockery is enabled. + */ +function hookedLoader(request, parent, isMain) { + var subst, allow, file; + + if (!originalLoader) { + throw new Error("Loader has not been hooked"); + } + + if (registeredMocks.hasOwnProperty(request)) { + return registeredMocks[request]; + } + + if (registeredSubstitutes.hasOwnProperty(request)) { + subst = registeredSubstitutes[request]; + if (!subst.module && subst.name) { + subst.module = originalLoader(subst.name, parent, isMain); + } + if (!subst.module) { + throw new Error("Misconfigured substitute for '" + request + "'"); + } + return subst.module; + } + + if (registeredAllowables.hasOwnProperty(request)) { + allow = registeredAllowables[request]; + if (allow.unhook) { + file = m._resolveFilename(request, parent); + if ((file.indexOf('/') !== -1 || file.indexOf('\\') !== -1) && allow.paths.indexOf(file) === -1) { + allow.paths.push(file); + } + } + } else { + if (options.warnOnUnregistered) { + console.warn("WARNING: loading non-allowed module: " + request); + } + } + + return originalLoader(request, parent, isMain); +} + +/* + * Enables mockery by hooking subsequent 'require' invocations. Note that *all* + * 'require' invocations will be hooked until 'disable' is called. Calling this + * function more than once will have no ill effects. + */ +function enable(opts) { + if (originalLoader) { + // Already hooked + return; + } + + options = getEffectiveOptions(opts); + + if (options.useCleanCache) { + originalCache = m._cache; + m._cache = {}; + repopulateNative(); + } + + originalLoader = m._load; + m._load = hookedLoader; +} + +/* + * Disables mockery by unhooking from the Node loader. No subsequent 'require' + * invocations will be seen by mockery. Calling this function more than once + * will have no ill effects. + */ +function disable() { + if (!originalLoader) { + // Not hooked + return; + } + + if (options.useCleanCache) { + // Previously this just set m._cache to originalCache. This would make + // node re-require native addons that were required while mockery was + // enabled, which breaks it in node@>=0.12. Instead populate + // originalCache with any native addons that were first required since + // mockery was enabled. + Object.keys(m._cache).forEach(function(k){ + if (k.indexOf('\.node') > -1 && !originalCache[k]) { + originalCache[k] = m._cache[k]; + } + }); + m._cache = originalCache; + originalCache = null; + } + + m._load = originalLoader; + originalLoader = null; +} + + /* + * If the clean cache option is in effect, reset the module cache to an empty + * state. Calling this function when the clean cache option is not in effect + * will have no ill effects, but will do nothing. + */ +function resetCache() { + if (options.useCleanCache && originalCache) { + m._cache = {}; + repopulateNative(); + } +} + +/* + * Starting in node 0.12 node won't reload native modules + * The reason is that native modules can register themselves to be loaded automatically + * This will re-populate the cache with the native modules that have not been mocked + */ +function repopulateNative() { + Object.keys(originalCache).forEach(function(k) { + if (k.indexOf('\.node') > -1 && !m._cache[k]) { + m._cache[k] = originalCache[k]; + } + }); +} + +/* + * Enable or disable warnings to the console when previously registered mocks + * and subsitutes are replaced. + */ +function warnOnReplace(enable) { + options.warnOnReplace = enable; +} + +/* + * Enable or disable warnings to the console when modules are loaded that have + * not been registered as a mock, a substitute, or allowed. + */ +function warnOnUnregistered(enable) { + options.warnOnUnregistered = enable; +} + +/* + * Register a mock object for the specified module. While mockery is enabled, + * any subsequent 'require' for this module will return the mock object. The + * mock need not mock out all original exports, but no fallback is provided + * for anything not mocked and subsequently invoked. + */ +function registerMock(mod, mock) { + if (options.warnOnReplace && registeredMocks.hasOwnProperty(mod)) { + console.warn("WARNING: Replacing existing mock for module: " + mod); + } + registeredMocks[mod] = mock; +} + +/* + * Deregister a mock object for the specified module. A subsequent 'require' for + * that module will revert to the previous behaviour (which, by default, means + * falling back to the original 'require' behaviour). + */ +function deregisterMock(mod) { + if (registeredMocks.hasOwnProperty(mod)) { + delete registeredMocks[mod]; + } +} + +/* + * Register a substitute module for the specified module. While mockery is + * enabled, any subsequent 'require' for this module will be effectively + * replaced by a 'require' for the substitute module. This is useful when + * a mock implementation is itself implemented as a module. + */ +function registerSubstitute(mod, subst) { + if (options.warnOnReplace && registeredSubstitutes.hasOwnProperty(mod)) { + console.warn("WARNING: Replacing existing substitute for module: " + mod); + } + registeredSubstitutes[mod] = { + name: subst + }; +} + +/* + * Deregister a substitute module for the specified module. A subsequent + * 'require' for that module will revert to the previous behaviour (which, by + * default, means falling back to the original 'require' behaviour). + */ +function deregisterSubstitute(mod) { + if (registeredSubstitutes.hasOwnProperty(mod)) { + delete registeredSubstitutes[mod]; + } +} + +/* + * Register a module as 'allowed', meaning that, even if a mock or substitute + * for it has not been registered, mockery will not complain when it is loaded + * via 'require'. This encourages the user to consciously declare the modules + * that will be loaded and used in the original form, thus avoiding warnings. + * + * If 'unhook' is true, the module will be removed from the module cache when + * it is deregistered. + */ +function registerAllowable(mod, unhook) { + registeredAllowables[mod] = { + unhook: !!unhook, + paths: [] + }; +} + +/* + * Register an array of modules as 'allowed'. This is a convenience function + * that performs the same function as 'registerAllowable' but for an array of + * modules rather than a single module. + */ +function registerAllowables(mods, unhook) { + mods.forEach(function (mod) { + registerAllowable(mod, unhook); + }); +} + +/* + * Deregister a module as 'allowed'. A subsequent 'require' for that module + * will generate a warning that the module is not allowed, unless or until a + * mock or substitute is registered for that module. + */ +function deregisterAllowable(mod) { + if (registeredAllowables.hasOwnProperty(mod)) { + var allow = registeredAllowables[mod]; + if (allow.unhook) { + allow.paths.forEach(function (p) { + delete m._cache[p]; + }); + } + delete registeredAllowables[mod]; + } +} + +/* + * Deregister an array of modules as 'allowed'. This is a convenience function + * that performs the same function as 'deregisterAllowable' but for an array of + * modules rather than a single module. + */ +function deregisterAllowables(mods) { + mods.forEach(function (mod) { + deregisterAllowable(mod); + }); +} + +/* + * Deregister all mocks, substitutes, and allowed modules, resetting the state + * to a clean slate. This does not affect the enabled / disabled state of + * mockery, though. + */ +function deregisterAll() { + Object.keys(registeredAllowables).forEach(function (mod) { + var allow = registeredAllowables[mod]; + if (allow.unhook) { + allow.paths.forEach(function (p) { + delete m._cache[p]; + }); + } + }); + + registeredMocks = {}; + registeredSubstitutes = {}; + registeredAllowables = {}; +} + +// Exported functions +exports.enable = enable; +exports.disable = disable; +exports.resetCache = resetCache; +exports.warnOnReplace = warnOnReplace; +exports.warnOnUnregistered = warnOnUnregistered; +exports.registerMock = registerMock; +exports.registerSubstitute = registerSubstitute; +exports.registerAllowable = registerAllowable; +exports.registerAllowables = registerAllowables; +exports.deregisterMock = deregisterMock; +exports.deregisterSubstitute = deregisterSubstitute; +exports.deregisterAllowable = deregisterAllowable; +exports.deregisterAllowables = deregisterAllowables; +exports.deregisterAll = deregisterAll; diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/package.json new file mode 100644 index 0000000..3d332a4 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/package.json @@ -0,0 +1,96 @@ +{ + "name": "mockery", + "version": "1.7.0", + "description": "Simplifying the use of mocks with Node.js", + "keywords": [ + "mock", + "stub", + "require", + "module", + "cache", + "unit", + "test", + "unittest", + "testing", + "tdd" + ], + "author": { + "name": "Martin Cooper", + "email": "mfncooper@gmail.com" + }, + "contributors": [ + { + "name": "Bryan Donovan", + "email": "bdondo@gmail.com" + }, + { + "name": "Dav Glass", + "email": "davglass@gmail.com" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/mfncooper/mockery.git" + }, + "bugs": { + "url": "http://github.com/mfncooper/mockery/issues" + }, + "main": "mockery.js", + "dependencies": {}, + "jshintConfig": { + "node": true + }, + "devDependencies": { + "istanbul": "~0.3.5", + "jshint": "~2.6.0", + "sinon": "1.2.x", + "unix-dgram": "^0.2.3", + "vows": "~0.8.1" + }, + "scripts": { + "pretest": "jshint mockery.js ./test/*.js", + "test": "istanbul cover --print both -- vows --spec ./test/*.js" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/mfncooper/mockery/raw/master/LICENSE" + } + ], + "gitHead": "4feec5dd1340163ffea5de1135d37c753a071f19", + "homepage": "https://github.com/mfncooper/mockery", + "_id": "mockery@1.7.0", + "_shasum": "f4ede0d8750c1c9727c272ea2c60629e2c9a1c4f", + "_from": "mockery@>=1.7.0 <2.0.0", + "_npmVersion": "2.15.1", + "_nodeVersion": "4.4.4", + "_npmUser": { + "name": "davglass", + "email": "davglass@gmail.com" + }, + "maintainers": [ + { + "name": "mfncooper", + "email": "mfncooper@gmail.com" + }, + { + "name": "gotwarlost", + "email": "kananthmail-github@yahoo.com" + }, + { + "name": "davglass", + "email": "davglass@gmail.com" + } + ], + "dist": { + "shasum": "f4ede0d8750c1c9727c272ea2c60629e2c9a1c4f", + "tarball": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz" + }, + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/mockery-1.7.0.tgz_1462566956296_0.7034751276951283" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/1-general.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/1-general.js new file mode 100644 index 0000000..f586087 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/1-general.js @@ -0,0 +1,41 @@ +/* +This file named 1-general.js for a reason, it is so this +test is executed first so we can catch the "warmup" of the +module and test the dead code cases. +*/ +var vows = require('vows'), + assert = require('assert'), + m = require('module'), + mockery = require('../mockery'); + +var tests = { + 'disable before enable': { + topic: function() { + mockery.disable(); + return null; + }, + 'should not throw and this passes': function() { + assert.ok(true); + }, + 'and without a module loader': { + topic: function() { + m.__load = m._load; + m._load = null; + return m; + }, + 'should throw on enable': function(m) { + assert.throws(function() { + mockery.enable(); + mockery.registerMock('fs', {}); + require('fs'); + }, /Loader has not been hooked/); + }, + teardown: function() { + m._load = m.__load; + delete m.__load; + } + } + } +}; + +vows.describe('mockery').addBatch(tests).export(module); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/allowable-unhook.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/allowable-unhook.js new file mode 100644 index 0000000..f38f846 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/allowable-unhook.js @@ -0,0 +1,71 @@ +var vows = require('vows'), + assert = require('assert'), + mockery = require('../mockery'), + sinon = require('sinon'), + m = require('module'); + +function isCached(name) { + var id; + // Super-simplistic, but good enough for the tests + for (id in m._cache) { + if (m._cache.hasOwnProperty(id) && id.indexOf(name) !== -1) { + return true; + } + } + return false; +} + + +var tests = { + "when an allowable is registered for unhooking": { + topic: function () { + mockery.registerAllowable('./fixtures/fake_module', true); + return null; + }, + "and mockery is enabled": { + setup: function () { + if (!this.originalCache) { + // Initialise a clean cache + this.originalCache = m._cache; + m._cache = {}; + } + mockery.enable(); + }, + teardown: function () { + if (this.originalCache) { + // Restore the original cache + m._cache = this.originalCache; + this.originalCache = null; + } + }, + "the module is not cached": function () { + assert.ok(!isCached('fixtures/fake_module')); + }, + + "and the module is required": { + topic: function () { + require('./fixtures/fake_module'); + return null; + }, + + "the module is cached": function () { + assert.ok(isCached('fixtures/fake_module')); + }, + + "and the module is deregistered": { + topic: function () { + mockery.deregisterAllowable('not-allowed-already'); + mockery.deregisterAllowable('./fixtures/fake_module'); + return null; + }, + + "the module is not cached": function () { + assert.ok(!isCached('fixtures/fake_module')); + } + } + } + } + } +}; + +vows.describe('allowable-unhook').addBatch(tests).export(module); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/fake_module.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/fake_module.js new file mode 100644 index 0000000..bd67982 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/fake_module.js @@ -0,0 +1,5 @@ +var foo = function() { + return 'real foo'; +}; + +exports.foo = foo; diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/fake_module_2.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/fake_module_2.js new file mode 100644 index 0000000..597ddfb --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/fake_module_2.js @@ -0,0 +1,5 @@ +var bar = function() { + return 'real bar'; +}; + +exports.bar = bar; diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/intermediary.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/intermediary.js new file mode 100644 index 0000000..e79711a --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/intermediary.js @@ -0,0 +1,7 @@ +var fake_module = require('./fake_module'); + +var bar = function () { + return fake_module.foo(); +}; + +exports.bar = bar; diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/substitute_fake_module.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/substitute_fake_module.js new file mode 100644 index 0000000..d836c8d --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/fixtures/substitute_fake_module.js @@ -0,0 +1,5 @@ +var foo = function() { + return 'substitute foo'; +}; + +exports.foo = foo; diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/intermediary.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/intermediary.js new file mode 100644 index 0000000..cc14c97 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/intermediary.js @@ -0,0 +1,61 @@ +var vows = require('vows'), + assert = require('assert'), + mockery = require('../mockery'), + sinon = require('sinon'); + +var mock_fake_module = { + foo: function () { + return 'mocked foo'; + } +}; + +var tests = { + "when an intermediary module is involved": { + topic: function() { + return null; + }, + "and mockery is not enabled requiring the intermediary causes the original to be used": function () { + var intermediary = require('./fixtures/intermediary'); + assert.equal(intermediary.bar(), 'real foo'); + }, + "and mockery is enabled without the clean cache option": { + topic: function () { + mockery.registerMock('./fake_module', mock_fake_module); + mockery.registerAllowable('./fixtures/intermediary'); + mockery.enable({ useCleanCache: false }); + var i = require('./fixtures/intermediary'); + mockery.resetCache(); + mockery.disable(); + return i; + }, + "requiring the intermediary causes the original to be used": function (intermediary) { + assert.equal(intermediary.bar(), 'real foo'); + }, + "then mockery is enabled with the clean cache option": { + topic: function () { + mockery.registerMock('./fake_module', mock_fake_module); + mockery.registerAllowable('./fixtures/intermediary'); + mockery.enable({ useCleanCache: true }); + var i = require('./fixtures/intermediary'); + mockery.resetCache(); + return i; + }, + "requiring the intermediary causes the mock to be used": function (intermediary) { + assert.equal(intermediary.bar(), 'mocked foo'); + }, + "then mockery is disabled": { + topic: function() { + mockery.disable(); + return require('./fixtures/intermediary'); + }, + "requiring the intermediary causes the original to be used": function (intermediary) { + assert.equal(intermediary.bar(), 'real foo'); + } + } + } + } + } +}; + +vows.describe('intermediary').addBatch(tests).export(module); + diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging-allow-array.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging-allow-array.js new file mode 100644 index 0000000..22795ea --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging-allow-array.js @@ -0,0 +1,61 @@ +var vows = require('vows'), + assert = require('assert'), + mockery = require('../mockery'), + sinon = require('sinon'); + +var tests = { + "when an array of allowables is registered": { + setup: function () { + mockery.registerAllowables( + ['./fixtures/fake_module', './fixtures/fake_module_2'] + ); + }, + "and mockery is enabled": { + topic: function () { + mockery.enable(); + return null; + }, + "requiring the modules causes no warning to be logged": function () { + var mock_console, fake_module, fake_module_2; + + mock_console = sinon.mock(console); + mock_console.expects('warn').never(); + + fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'real foo'); + + fake_module_2 = require('./fixtures/fake_module_2'); + assert.equal(fake_module_2.bar(), 'real bar'); + + mock_console.verify(); + mock_console.restore(); + }, + "and the allowables are deregistered": { + topic: function () { + mockery.deregisterAllowables( + ['./fixtures/fake_module', './fixtures/fake_module_2'] + ); + return null; + }, + "requiring the modules causes warnings to be logged": function () { + var mock_console, fake_module, fake_module_2; + + mock_console = sinon.mock(console); + mock_console.expects('warn').twice(); + + fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'real foo'); + + fake_module_2 = require('./fixtures/fake_module_2'); + assert.equal(fake_module_2.bar(), 'real bar'); + + mock_console.verify(); + mock_console.restore(); + } + } + } + } +}; + +vows.describe('logging-allowable-array').addBatch(tests).export(module); + diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging-allowable.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging-allowable.js new file mode 100644 index 0000000..8cb8aa1 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging-allowable.js @@ -0,0 +1,52 @@ +var vows = require('vows'), + assert = require('assert'), + mockery = require('../mockery'), + sinon = require('sinon'); + +var tests = { + "when an allowable is registered": { + setup: function () { + mockery.registerAllowable('./fixtures/fake_module'); + }, + + "and mockery is enabled": { + topic: function () { + mockery.enable(); + return null; + }, + + "requiring the module causes no warning to be logged": function () { + var mock_console, fake_module; + + mock_console = sinon.mock(console); + mock_console.expects('warn').never(); + + fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'real foo'); + + mock_console.verify(); + mock_console.restore(); + }, + "and the allowable is deregistered": { + topic: function () { + mockery.deregisterAllowable('./fixtures/fake_module'); + return null; + }, + "requiring the module causes a warning to be logged": function () { + var mock_console, fake_module; + + mock_console = sinon.mock(console); + mock_console.expects('warn').once(); + + fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'real foo'); + + mock_console.verify(); + mock_console.restore(); + } + } + } + } +}; + +vows.describe('logging-allowable').addBatch(tests).export(module); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging.js new file mode 100644 index 0000000..8651997 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/logging.js @@ -0,0 +1,71 @@ +var vows = require('vows'), + assert = require('assert'), + mockery = require('../mockery'), + sinon = require('sinon'); + +var tests = { + teardown: function () { + mockery.disable(); + mockery.deregisterAll(); + }, + "when nothing is registered": { + topic: function () { + mockery.enable(); + mockery.registerAllowable('../package.json', true); + require('../package.json'); + return null; + }, + "requiring a module causes a warning to be logged": function () { + var mock_console, fake_module; + + mock_console = sinon.mock(console); + mock_console.expects('warn').once(); + + fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'real foo'); + + mock_console.verify(); + mock_console.restore(); + }, + "and warnings are disabled": { + topic: function () { + mockery.warnOnUnregistered(false); + return null; + }, + + "requiring a module causes no warning to be logged": function (test) { + var mock_console, fake_module; + + mock_console = sinon.mock(console); + mock_console.expects('warn').never(); + + fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'real foo'); + + mock_console.verify(); + mock_console.restore(); + }, + "and warnings are reenabled": { + topic: function (callback) { + mockery.warnOnUnregistered(true); + return null; + }, + + "requiring a module causes a warning to be logged": function () { + var mock_console, fake_module; + + mock_console = sinon.mock(console); + mock_console.expects('warn').once(); + + fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'real foo'); + + mock_console.verify(); + mock_console.restore(); + } + } + } + } +}; + +vows.describe('logging').addBatch(tests).export(module); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/registered.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/registered.js new file mode 100644 index 0000000..5dc1238 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/registered.js @@ -0,0 +1,39 @@ +var vows = require('vows'), + assert = require('assert'), + mockery = require('../mockery'), + sinon = require('sinon'); + +var mock_fake_module = { + foo: function () { + return 'mocked foo'; + } +}; + + +var tests = { + "when a mock is registered": { + topic: function () { + mockery.registerMock('./fixtures/fake_module', mock_fake_module); + mockery.enable(); + return null; + }, + "requiring the module returns the mock instead": function () { + var fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'mocked foo'); + }, + "requiring the module returns the original module": function () { + mockery.deregisterMock('not-a-mock', mock_fake_module); + mockery.deregisterMock('./fixtures/fake_module', mock_fake_module); + mockery.registerAllowable('./fixtures/fake_module'); + var fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'real foo'); + }, + "and mockery is then disabled requiring the module returns the original module": function () { + mockery.disable(); + var fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'real foo'); + } + } +}; + +vows.describe('registered').addBatch(tests).export(module); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/self-register.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/self-register.js new file mode 100644 index 0000000..5a3bf2e --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/self-register.js @@ -0,0 +1,36 @@ +var vows = require('vows'), + assert = require('assert'), + mockery = require('../mockery'); + +var registerBin = function () { + var error = 0; + mockery.enable({ + warnOnUnregistered: false, + useCleanCache: true + }); + try { + require('unix-dgram'); //or some other binary module + } catch (err) { + error = 1; + } + mockery.deregisterAll(); + mockery.disable(); + return error; +}; + +var tests = { + "register bin": { + topic: function () { + var errors = 0; + for (var i = 0; i < 10; i++) { + errors += registerBin(); + } + return errors; + }, + "should be able to register a bin module multiple times": function(topic) { + assert.equal(topic, 0); + } + } +}; + +vows.describe('module-failed-to-self-register').addBatch(tests).export(module); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/substitute.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/substitute.js new file mode 100644 index 0000000..2dc389a --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/substitute.js @@ -0,0 +1,96 @@ +var vows = require('vows'), + assert = require('assert'), + mockery = require('../mockery'), + sinon = require('sinon'); + +var mock_fake_module = { + foo: function () { + return 'mocked foo'; + } +}; + +var tests = { + "when a substitute is registered": { + setup: function () { + mockery.registerSubstitute('./fixtures/fake_module', + './fixtures/substitute_fake_module'); + }, + teardown: function () { + mockery.deregisterSubstitute('not-registered-mock'); + mockery.deregisterSubstitute('./fixtures/fake_module'); + }, + "and mockery is enabled": { + topic: function () { + mockery.enable(); + return null; + }, + "requiring the module returns the substitute instead": function () { + var fake_module = require('./fixtures/fake_module'); + assert.equal(fake_module.foo(), 'substitute foo'); + }, + "throws on an invalid module": function() { + assert.throws(function() { + mockery.registerSubstitute('fs', 'does-not-exist-fs'); + require('fs'); + }, /Cannot find module/); + }, + "throws on an invalid substitute module": function() { + assert.throws(function() { + mockery.registerSubstitute('fs'); + require('fs'); + }, /Misconfigured substitute for/); + }, + "registering a replacement causes a warning to be logged": function () { + var mock_console; + + mock_console = sinon.mock(console); + mock_console.expects('warn').once(); + + mockery.registerSubstitute('./fixtures/fake_module', + './fixtures/substitute_fake_module'); + + mock_console.verify(); + mock_console.restore(); + }, + "and warnings are disabled": { + topic: function () { + mockery.warnOnReplace(false); + return null; + }, + "registering a replacement causes no warning to be logged": function () { + var mock_console; + + mock_console = sinon.mock(console); + mock_console.expects('warn').never(); + + mockery.registerSubstitute('./fixtures/fake_module', + './fixtures/substitute_fake_module'); + + mock_console.verify(); + mock_console.restore(); + }, + "and warnings are reenabled": { + topic: function () { + mockery.warnOnReplace(true); + return null; + }, + "registering a replacement causes a warning to be logged": function () { + var mock_console; + + mock_console = sinon.mock(console); + mock_console.expects('warn').once(); + + mockery.registerSubstitute('./fixtures/fake_module', + './fixtures/substitute_fake_module'); + + mock_console.verify(); + mock_console.restore(); + } + } + } + } + } +}; + +vows.describe('substitute').addBatch(tests).export(module); + diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/warn-replace.js b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/warn-replace.js new file mode 100644 index 0000000..230b6bf --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/mockery/test/warn-replace.js @@ -0,0 +1,52 @@ +var vows = require('vows'), + assert = require('assert'), + mockery = require('../mockery'), + sinon = require('sinon'); + +var mock_fake_module = { + foo: function () { + return 'mocked foo'; + } +}; + + +var tests = { + "warnings are disabled": { + topic: function () { + mockery.enable(); + mockery.warnOnReplace(false); + return null; + }, + "registering a replacement causes no warning to be logged": function() { + var mock_console; + + mock_console = sinon.mock(console); + mock_console.expects('warn').never(); + + mockery.registerMock('./fixtures/fake_module', mock_fake_module); + + mock_console.verify(); + mock_console.restore(); + }, + "and warnings are reenabled": { + topic: function () { + mockery.warnOnReplace(true); + return null; + }, + "registering a replacement causes a warning to be logged": function () { + var mock_console; + + mock_console = sinon.mock(console); + mock_console.expects('warn').once(); + + mockery.registerMock('./fixtures/fake_module', mock_fake_module); + + mock_console.verify(); + mock_console.restore(); + } + } + } +}; + +vows.describe('warn-replace').addBatch(tests).export(module); + diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/.npmignore b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/.npmignore new file mode 100644 index 0000000..8886139 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/.npmignore @@ -0,0 +1,4 @@ +node_modules +.DS_Store +.nyc_output +coverage diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/LICENSE.md b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/LICENSE.md new file mode 100644 index 0000000..652609b --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2012 Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/README.md new file mode 100644 index 0000000..5cd8555 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/README.md @@ -0,0 +1,254 @@ +# node-uuid + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Generate RFC4122 version 1 or version 4 UUIDs +* Runs in node.js and all browsers. +* Registered as a [ComponentJS](https://github.com/component/component) [component](https://github.com/component/component/wiki/Components) ('broofa/node-uuid'). +* Cryptographically strong random # generation + * `crypto.randomBytes(n)` in node.js + * `window.crypto.getRandomValues(ta)` in [supported browsers](https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues#Browser_Compatibility) +* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) +* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) +* Comes with a Command Line Interface for generating uuids on the command line + +## Getting Started + +Install it in your browser: + +```html + +``` + +Or in node.js: + +``` +npm install node-uuid +``` + +```javascript +var uuid = require('node-uuid'); +``` + +Then create some ids ... + +```javascript +// Generate a v1 (time-based) id +uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' + +// Generate a v4 (random) id +uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' +``` + +## API + +### uuid.v1([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Notes: + +1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v1({ + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}); // -> "710b962e-041c-11e1-9234-0123456789ab" +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +var arr = new Array(32); // -> [] +uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] +uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] + +// Optionally use uuid.unparse() to get stringify the ids +uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' +uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' +``` + +### uuid.v4([`options` [, `buffer` [, `offset`]]]) + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with fully-specified options + +```javascript +uuid.v4({ + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}); +// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" +``` + +Example: Generate two IDs in a single buffer + +```javascript +var buffer = new Array(32); // (or 'new Buffer' in node.js) +uuid.v4(null, buffer, 0); +uuid.v4(null, buffer, 16); +``` + +### uuid.parse(id[, buffer[, offset]]) +### uuid.unparse(buffer[, offset]) + +Parse and unparse UUIDs + + * `id` - (String) UUID(-like) string + * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used + * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 + +Example parsing and unparsing a UUID string + +```javascript +var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> +var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' +``` + +### uuid.noConflict() + +(Browsers only) Set `uuid` property back to it's previous value. + +Returns the node-uuid object. + +Example: + +```javascript +var myUuid = uuid.noConflict(); +myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' +``` + +## Deprecated APIs + +Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. + +### uuid([format [, buffer [, offset]]]) + +uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). + +### uuid.BufferClass + +The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. + +## Command Line Interface + +To use the executable, it's probably best to install this library globally. + +`npm install -g node-uuid` + +Usage: + +``` +USAGE: uuid [version] [options] + + +options: + +--help Display this message and exit +``` + +`version` must be an RFC4122 version that is supported by this library, which is currently version 1 and version 4 (denoted by "v1" and "v4", respectively). `version` defaults to version 4 when not supplied. + +### Examples + +``` +> uuid +3a91f950-dec8-4688-ba14-5b7bbfc7a563 +``` + +``` +> uuid v1 +9d0b43e0-7696-11e3-964b-250efa37a98e +``` + +``` +> uuid v4 +6790ac7c-24ac-4f98-8464-42f6d98a53ae +``` + +## Testing + +In node.js + +``` +npm test +``` + +In Browser + +``` +open test/test.html +``` + +### Benchmarking + +Requires node.js + +``` +npm install uuid uuid-js +node benchmark/benchmark.js +``` + +For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) + +For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). + +## Release notes + +### 1.4.6 + +* Properly detect node crypto and whatwg crypto +* Workaround phantomjs/browserify bug +* Explicit check for `window` rather implicit this-global +* Issue warning if Math.random() is being used +* "use strict"; +* A few jshint / stylistic updates (=== and such) + +### 1.4.0 + +* Improved module context detection +* Removed public RNG functions + +### 1.3.2 + +* Improve tests and handling of v1() options (Issue #24) +* Expose RNG option to allow for perf testing with different generators + +### 1.3.0 + +* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +* Support for node.js crypto API +* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/README.md b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/README.md new file mode 100644 index 0000000..aaeb2ea --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/README.md @@ -0,0 +1,53 @@ +# node-uuid Benchmarks + +### Results + +To see the results of our benchmarks visit https://github.com/broofa/node-uuid/wiki/Benchmark + +### Run them yourself + +node-uuid comes with some benchmarks to measure performance of generating UUIDs. These can be run using node.js. node-uuid is being benchmarked against some other uuid modules, that are available through npm namely `uuid` and `uuid-js`. + +To prepare and run the benchmark issue; + +``` +npm install uuid uuid-js +node benchmark/benchmark.js +``` + +You'll see an output like this one: + +``` +# v4 +nodeuuid.v4(): 854700 uuids/second +nodeuuid.v4('binary'): 788643 uuids/second +nodeuuid.v4('binary', buffer): 1336898 uuids/second +uuid(): 479386 uuids/second +uuid('binary'): 582072 uuids/second +uuidjs.create(4): 312304 uuids/second + +# v1 +nodeuuid.v1(): 938086 uuids/second +nodeuuid.v1('binary'): 683060 uuids/second +nodeuuid.v1('binary', buffer): 1644736 uuids/second +uuidjs.create(1): 190621 uuids/second +``` + +* The `uuid()` entries are for Nikhil Marathe's [uuid module](https://bitbucket.org/nikhilm/uuidjs) which is a wrapper around the native libuuid library. +* The `uuidjs()` entries are for Patrick Negri's [uuid-js module](https://github.com/pnegri/uuid-js) which is a pure javascript implementation based on [UUID.js](https://github.com/LiosK/UUID.js) by LiosK. + +If you want to get more reliable results you can run the benchmark multiple times and write the output into a log file: + +``` +for i in {0..9}; do node benchmark/benchmark.js >> benchmark/bench_0.4.12.log; done; +``` + +If you're interested in how performance varies between different node versions, you can issue the above command multiple times. + +You can then use the shell script `bench.sh` provided in this directory to calculate the averages over all benchmark runs and draw a nice plot: + +``` +(cd benchmark/ && ./bench.sh) +``` + +This assumes you have [gnuplot](http://www.gnuplot.info/) and [ImageMagick](http://www.imagemagick.org/) installed. You'll find a nice `bench.png` graph in the `benchmark/` directory then. diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/bench.gnu b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/bench.gnu new file mode 100644 index 0000000..a342fbb --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/bench.gnu @@ -0,0 +1,174 @@ +#!/opt/local/bin/gnuplot -persist +# +# +# G N U P L O T +# Version 4.4 patchlevel 3 +# last modified March 2011 +# System: Darwin 10.8.0 +# +# Copyright (C) 1986-1993, 1998, 2004, 2007-2010 +# Thomas Williams, Colin Kelley and many others +# +# gnuplot home: http://www.gnuplot.info +# faq, bugs, etc: type "help seeking-assistance" +# immediate help: type "help" +# plot window: hit 'h' +set terminal postscript eps noenhanced defaultplex \ + leveldefault color colortext \ + solid linewidth 1.2 butt noclip \ + palfuncparam 2000,0.003 \ + "Helvetica" 14 +set output 'bench.eps' +unset clip points +set clip one +unset clip two +set bar 1.000000 front +set border 31 front linetype -1 linewidth 1.000 +set xdata +set ydata +set zdata +set x2data +set y2data +set timefmt x "%d/%m/%y,%H:%M" +set timefmt y "%d/%m/%y,%H:%M" +set timefmt z "%d/%m/%y,%H:%M" +set timefmt x2 "%d/%m/%y,%H:%M" +set timefmt y2 "%d/%m/%y,%H:%M" +set timefmt cb "%d/%m/%y,%H:%M" +set boxwidth +set style fill empty border +set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 +set style circle radius graph 0.02, first 0, 0 +set dummy x,y +set format x "% g" +set format y "% g" +set format x2 "% g" +set format y2 "% g" +set format z "% g" +set format cb "% g" +set angles radians +unset grid +set key title "" +set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox +set key noinvert samplen 4 spacing 1 width 0 height 0 +set key maxcolumns 2 maxrows 0 +unset label +unset arrow +set style increment default +unset style line +set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 +unset style arrow +set style histogram clustered gap 2 title offset character 0, 0, 0 +unset logscale +set offsets graph 0.05, 0.15, 0, 0 +set pointsize 1.5 +set pointintervalbox 1 +set encoding default +unset polar +unset parametric +unset decimalsign +set view 60, 30, 1, 1 +set samples 100, 100 +set isosamples 10, 10 +set surface +unset contour +set clabel '%8.3g' +set mapping cartesian +set datafile separator whitespace +unset hidden3d +set cntrparam order 4 +set cntrparam linear +set cntrparam levels auto 5 +set cntrparam points 5 +set size ratio 0 1,1 +set origin 0,0 +set style data points +set style function lines +set xzeroaxis linetype -2 linewidth 1.000 +set yzeroaxis linetype -2 linewidth 1.000 +set zzeroaxis linetype -2 linewidth 1.000 +set x2zeroaxis linetype -2 linewidth 1.000 +set y2zeroaxis linetype -2 linewidth 1.000 +set ticslevel 0.5 +set mxtics default +set mytics default +set mztics default +set mx2tics default +set my2tics default +set mcbtics default +set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set xtics norangelimit +set xtics () +set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set ytics autofreq norangelimit +set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 +set ztics autofreq norangelimit +set nox2tics +set noy2tics +set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 +set cbtics autofreq norangelimit +set title "" +set title offset character 0, 0, 0 font "" norotate +set timestamp bottom +set timestamp "" +set timestamp offset character 0, 0, 0 font "" norotate +set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) +set autoscale rfixmin +set autoscale rfixmax +set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) +set autoscale tfixmin +set autoscale tfixmax +set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale ufixmin +set autoscale ufixmax +set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale vfixmin +set autoscale vfixmax +set xlabel "" +set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set x2label "" +set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate +set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) +set autoscale xfixmin +set autoscale xfixmax +set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) +set autoscale x2fixmin +set autoscale x2fixmax +set ylabel "" +set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set y2label "" +set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) +set autoscale yfixmin +set autoscale yfixmax +set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) +set autoscale y2fixmin +set autoscale y2fixmax +set zlabel "" +set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate +set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) +set autoscale zfixmin +set autoscale zfixmax +set cblabel "" +set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 +set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) +set autoscale cbfixmin +set autoscale cbfixmax +set zero 1e-08 +set lmargin -1 +set bmargin -1 +set rmargin -1 +set tmargin -1 +set pm3d explicit at s +set pm3d scansautomatic +set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean +set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB +set palette rgbformulae 7, 5, 15 +set colorbox default +set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault +set loadpath +set fontpath +set fit noerrorvariables +GNUTERM = "aqua" +plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 +# EOF diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/bench.sh b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/bench.sh new file mode 100644 index 0000000..d870a0c --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/bench.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# for a given node version run: +# for i in {0..9}; do node benchmark.js >> bench_0.6.2.log; done; + +PATTERNS=('nodeuuid.v1()' "nodeuuid.v1('binary'," 'nodeuuid.v4()' "nodeuuid.v4('binary'," "uuid()" "uuid('binary')" 'uuidjs.create(1)' 'uuidjs.create(4)' '140byte') +FILES=(node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es) +INDICES=(2 3 2 3 2 2 2 2 2) +VERSIONS=$( ls bench_*.log | sed -e 's/^bench_\([0-9\.]*\)\.log/\1/' | tr "\\n" " " ) +TMPJOIN="tmp_join" +OUTPUT="bench_results.txt" + +for I in ${!FILES[*]}; do + F=${FILES[$I]} + P=${PATTERNS[$I]} + INDEX=${INDICES[$I]} + echo "version $F" > $F + for V in $VERSIONS; do + (VAL=$( grep "$P" bench_$V.log | LC_ALL=en_US awk '{ sum += $'$INDEX' } END { print sum/NR }' ); echo $V $VAL) >> $F + done + if [ $I == 0 ]; then + cat $F > $TMPJOIN + else + join $TMPJOIN $F > $OUTPUT + cp $OUTPUT $TMPJOIN + fi + rm $F +done + +rm $TMPJOIN + +gnuplot bench.gnu +convert -density 200 -resize 800x560 -flatten bench.eps bench.png +rm bench.eps diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/benchmark-native.c b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/benchmark-native.c new file mode 100644 index 0000000..dbfc75f --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/benchmark-native.c @@ -0,0 +1,34 @@ +/* +Test performance of native C UUID generation + +To Compile: cc -luuid benchmark-native.c -o benchmark-native +*/ + +#include +#include +#include +#include + +int main() { + uuid_t myid; + char buf[36+1]; + int i; + struct timeval t; + double start, finish; + + gettimeofday(&t, NULL); + start = t.tv_sec + t.tv_usec/1e6; + + int n = 2e5; + for (i = 0; i < n; i++) { + uuid_generate(myid); + uuid_unparse(myid, buf); + } + + gettimeofday(&t, NULL); + finish = t.tv_sec + t.tv_usec/1e6; + double dur = finish - start; + + printf("%d uuids/sec", (int)(n/dur)); + return 0; +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/benchmark.js b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/benchmark.js new file mode 100644 index 0000000..40e6efb --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/benchmark/benchmark.js @@ -0,0 +1,84 @@ +try { + var nodeuuid = require('../uuid'); +} catch (e) { + console.error('node-uuid require failed - skipping tests'); +} + +try { + var uuid = require('uuid'); +} catch (e) { + console.error('uuid require failed - skipping tests'); +} + +try { + var uuidjs = require('uuid-js'); +} catch (e) { + console.error('uuid-js require failed - skipping tests'); +} + +var N = 5e5; + +function rate(msg, t) { + console.log(msg + ': ' + + (N / (Date.now() - t) * 1e3 | 0) + + ' uuids/second'); +} + +console.log('# v4'); + +// node-uuid - string form +if (nodeuuid) { + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4(); + rate('nodeuuid.v4() - using node.js crypto RNG', t); + + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4({rng: nodeuuid.mathRNG}); + rate('nodeuuid.v4() - using Math.random() RNG', t); + + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary'); + rate('nodeuuid.v4(\'binary\')', t); + + var buffer = new nodeuuid.BufferClass(16); + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v4('binary', buffer); + rate('nodeuuid.v4(\'binary\', buffer)', t); +} + +// libuuid - string form +if (uuid) { + for (var i = 0, t = Date.now(); i < N; i++) uuid(); + rate('uuid()', t); + + for (var i = 0, t = Date.now(); i < N; i++) uuid('binary'); + rate('uuid(\'binary\')', t); +} + +// uuid-js - string form +if (uuidjs) { + for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(4); + rate('uuidjs.create(4)', t); +} + +// 140byte.es +for (var i = 0, t = Date.now(); i < N; i++) 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(s,r){r=Math.random()*16|0;return (s=='x'?r:r&0x3|0x8).toString(16)}); +rate('140byte.es_v4', t); + +console.log(''); +console.log('# v1'); + +// node-uuid - v1 string form +if (nodeuuid) { + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1(); + rate('nodeuuid.v1()', t); + + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary'); + rate('nodeuuid.v1(\'binary\')', t); + + var buffer = new nodeuuid.BufferClass(16); + for (var i = 0, t = Date.now(); i < N; i++) nodeuuid.v1('binary', buffer); + rate('nodeuuid.v1(\'binary\', buffer)', t); +} + +// uuid-js - v1 string form +if (uuidjs) { + for (var i = 0, t = Date.now(); i < N; i++) uuidjs.create(1); + rate('uuidjs.create(1)', t); +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/bin/uuid b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/bin/uuid new file mode 100644 index 0000000..f732e99 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/bin/uuid @@ -0,0 +1,26 @@ +#!/usr/bin/env node + +var path = require('path'); +var uuid = require(path.join(__dirname, '..')); + +var arg = process.argv[2]; + +if ('--help' === arg) { + console.log('\n USAGE: uuid [version] [options]\n\n'); + console.log(' options:\n'); + console.log(' --help Display this message and exit\n'); + process.exit(0); +} + +if (null == arg) { + console.log(uuid()); + process.exit(0); +} + +if ('v1' !== arg && 'v4' !== arg) { + console.error('Version must be RFC4122 version 1 or version 4, denoted as "v1" or "v4"'); + process.exit(1); +} + +console.log(uuid[arg]()); +process.exit(0); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/bower.json b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/bower.json new file mode 100644 index 0000000..c0925e1 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/bower.json @@ -0,0 +1,23 @@ +{ + "name": "node-uuid", + "version": "1.4.7", + "homepage": "https://github.com/broofa/node-uuid", + "authors": [ + "Robert Kieffer " + ], + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "main": "uuid.js", + "keywords": [ + "uuid", + "gid", + "rfc4122" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/component.json b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/component.json new file mode 100644 index 0000000..3ff4633 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/component.json @@ -0,0 +1,25 @@ +{ + "name": "node-uuid", + "repo": "broofa/node-uuid", + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "version": "1.4.7", + "author": "Robert Kieffer ", + "contributors": [ + { + "name": "Christoph Tavan ", + "github": "https://github.com/ctavan" + } + ], + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "dependencies": {}, + "development": {}, + "main": "uuid.js", + "scripts": [ + "uuid.js" + ], + "license": "MIT" +} \ No newline at end of file diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/package.json b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/package.json new file mode 100644 index 0000000..e659034 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/package.json @@ -0,0 +1,81 @@ +{ + "author": { + "name": "Robert Kieffer", + "email": "robert@broofa.com" + }, + "bin": { + "uuid": "./bin/uuid" + }, + "bugs": { + "url": "https://github.com/broofa/node-uuid/issues" + }, + "contributors": [ + { + "name": "AJ ONeal", + "email": "coolaj86@gmail.com" + }, + { + "name": "Christoph Tavan", + "email": "dev@tavan.de" + } + ], + "dependencies": {}, + "description": "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", + "devDependencies": { + "nyc": "^2.2.0" + }, + "directories": {}, + "homepage": "https://github.com/broofa/node-uuid", + "installable": true, + "keywords": [ + "guid", + "rfc4122", + "uuid" + ], + "lib": ".", + "licenses": [ + { + "type": "MIT", + "url": "https://raw.github.com/broofa/node-uuid/master/LICENSE.md" + } + ], + "main": "./uuid.js", + "maintainers": [ + { + "name": "broofa", + "email": "robert@broofa.com" + }, + { + "name": "coolaj86", + "email": "coolaj86@gmail.com" + } + ], + "name": "node-uuid", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git+https://github.com/broofa/node-uuid.git" + }, + "scripts": { + "coverage": "nyc npm test && nyc report", + "test": "node test/test.js" + }, + "url": "http://github.com/broofa/node-uuid", + "version": "1.4.7", + "gitHead": "309512573ec1c60143c257157479a20f7f1f51cd", + "_id": "node-uuid@1.4.7", + "_shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", + "_from": "node-uuid@>=1.4.7 <2.0.0", + "_npmVersion": "3.3.6", + "_nodeVersion": "5.0.0", + "_npmUser": { + "name": "coolaj86", + "email": "coolaj86@gmail.com" + }, + "dist": { + "shasum": "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f", + "tarball": "http://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz" + }, + "_resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/compare_v1.js b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/compare_v1.js new file mode 100644 index 0000000..05af822 --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/compare_v1.js @@ -0,0 +1,63 @@ +var assert = require('assert'), + nodeuuid = require('../uuid'), + uuidjs = require('uuid-js'), + libuuid = require('uuid').generate, + util = require('util'), + exec = require('child_process').exec, + os = require('os'); + +// On Mac Os X / macports there's only the ossp-uuid package that provides uuid +// On Linux there's uuid-runtime which provides uuidgen +var uuidCmd = os.type() === 'Darwin' ? 'uuid -1' : 'uuidgen -t'; + +function compare(ids) { + console.log(ids); + for (var i = 0; i < ids.length; i++) { + var id = ids[i].split('-'); + id = [id[2], id[1], id[0]].join(''); + ids[i] = id; + } + var sorted = ([].concat(ids)).sort(); + + if (sorted.toString() !== ids.toString()) { + console.log('Warning: sorted !== ids'); + } else { + console.log('everything in order!'); + } +} + +// Test time order of v1 uuids +var ids = []; +while (ids.length < 10e3) ids.push(nodeuuid.v1()); + +var max = 10; +console.log('node-uuid:'); +ids = []; +for (var i = 0; i < max; i++) ids.push(nodeuuid.v1()); +compare(ids); + +console.log(''); +console.log('uuidjs:'); +ids = []; +for (var i = 0; i < max; i++) ids.push(uuidjs.create(1).toString()); +compare(ids); + +console.log(''); +console.log('libuuid:'); +ids = []; +var count = 0; +var last = function() { + compare(ids); +} +var cb = function(err, stdout, stderr) { + ids.push(stdout.substring(0, stdout.length-1)); + count++; + if (count < max) { + return next(); + } + last(); +}; +var next = function() { + exec(uuidCmd, cb); +}; +next(); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/test.html b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/test.html new file mode 100644 index 0000000..d80326e --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/test.html @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/test.js b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/test.js new file mode 100644 index 0000000..5f1113d --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/test/test.js @@ -0,0 +1,231 @@ +if (!this.uuid) { + // node.js + uuid = require('../uuid'); + if (!/_rb/.test(uuid._rng.toString())) { + throw new Error("should use crypto for node.js"); + } +} + +// +// x-platform log/assert shims +// + +function _log(msg, type) { + type = type || 'log'; + + if (typeof(document) != 'undefined') { + document.write('
' + msg.replace(/\n/g, '
') + '
'); + } + if (typeof(console) != 'undefined') { + var color = { + log: '\033[39m', + warn: '\033[33m', + error: '\033[31m' + }; + console[type](color[type] + msg + color.log); + } +} + +function log(msg) {_log(msg, 'log');} +function warn(msg) {_log(msg, 'warn');} +function error(msg) {_log(msg, 'error');} + +function assert(res, msg) { + if (!res) { + error('FAIL: ' + msg); + } else { + log('Pass: ' + msg); + } +} + +// +// Unit tests +// + +// Verify ordering of v1 ids created with explicit times +var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00 + +function compare(name, ids) { + ids = ids.map(function(id) { + return id.split('-').reverse().join('-'); + }).sort(); + var sorted = ([].concat(ids)).sort(); + + assert(sorted.toString() == ids.toString(), name + ' have expected order'); +} + +// Verify ordering of v1 ids created using default behavior +compare('uuids with current time', [ + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1(), + uuid.v1() +]); + +// Verify ordering of v1 ids created with explicit times +compare('uuids with time option', [ + uuid.v1({msecs: TIME - 10*3600*1000}), + uuid.v1({msecs: TIME - 1}), + uuid.v1({msecs: TIME}), + uuid.v1({msecs: TIME + 1}), + uuid.v1({msecs: TIME + 28*24*3600*1000}) +]); + +assert( + uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}), + 'IDs created at same msec are different' +); + +// Verify throw if too many ids created +var thrown = false; +try { + uuid.v1({msecs: TIME, nsecs: 10000}); +} catch (e) { + thrown = true; +} +assert(thrown, 'Exception thrown when > 10K ids created in 1 ms'); + +// Verify clock regression bumps clockseq +var uidt = uuid.v1({msecs: TIME}); +var uidtb = uuid.v1({msecs: TIME - 1}); +assert( + parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1, + 'Clock regression by msec increments the clockseq' +); + +// Verify clock regression bumps clockseq +var uidtn = uuid.v1({msecs: TIME, nsecs: 10}); +var uidtnb = uuid.v1({msecs: TIME, nsecs: 9}); +assert( + parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1, + 'Clock regression by nsec increments the clockseq' +); + +// Verify explicit options produce expected id +var id = uuid.v1({ + msecs: 1321651533573, + nsecs: 5432, + clockseq: 0x385c, + node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ] +}); +assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id'); + +// Verify adjacent ids across a msec boundary are 1 time unit apart +var u0 = uuid.v1({msecs: TIME, nsecs: 9999}); +var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0}); + +var before = u0.split('-')[0], after = u1.split('-')[0]; +var dt = parseInt(after, 16) - parseInt(before, 16); +assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart'); + +// +// Test parse/unparse +// + +id = '00112233445566778899aabbccddeeff'; +assert(uuid.unparse(uuid.parse(id.substr(0,10))) == + '00112233-4400-0000-0000-000000000000', 'Short parse'); +assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) == + '00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse'); + +// +// Perf tests +// + +var generators = { + v1: uuid.v1, + v4: uuid.v4 +}; + +var UUID_FORMAT = { + v1: /[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, + v4: /[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i +}; + +var N = 1e4; + +// Get %'age an actual value differs from the ideal value +function divergence(actual, ideal) { + return Math.round(100*100*(actual - ideal)/ideal)/100; +} + +function rate(msg, t) { + log(msg + ': ' + (N / (Date.now() - t) * 1e3 | 0) + ' uuids\/second'); +} + +for (var version in generators) { + var counts = {}, max = 0; + var generator = generators[version]; + var format = UUID_FORMAT[version]; + + log('\nSanity check ' + N + ' ' + version + ' uuids'); + for (var i = 0, ok = 0; i < N; i++) { + id = generator(); + if (!format.test(id)) { + throw Error(id + ' is not a valid UUID string'); + } + + if (id != uuid.unparse(uuid.parse(id))) { + assert(fail, id + ' is not a valid id'); + } + + // Count digits for our randomness check + if (version == 'v4') { + var digits = id.replace(/-/g, '').split(''); + for (var j = digits.length-1; j >= 0; j--) { + var c = digits[j]; + max = Math.max(max, counts[c] = (counts[c] || 0) + 1); + } + } + } + + // Check randomness for v4 UUIDs + if (version == 'v4') { + // Limit that we get worried about randomness. (Purely empirical choice, this!) + var limit = 2*100*Math.sqrt(1/N); + + log('\nChecking v4 randomness. Distribution of Hex Digits (% deviation from ideal)'); + + for (var i = 0; i < 16; i++) { + var c = i.toString(16); + var bar = '', n = counts[c], p = Math.round(n/max*100|0); + + // 1-3,5-8, and D-F: 1:16 odds over 30 digits + var ideal = N*30/16; + if (i == 4) { + // 4: 1:1 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1 + 30/16); + } else if (i >= 8 && i <= 11) { + // 8-B: 1:4 odds on 1 digit, plus 1:16 odds on 30 digits + ideal = N*(1/4 + 30/16); + } else { + // Otherwise: 1:16 odds on 30 digits + ideal = N*30/16; + } + var d = divergence(n, ideal); + + // Draw bar using UTF squares (just for grins) + var s = n/max*50 | 0; + while (s--) bar += '='; + + assert(Math.abs(d) < limit, c + ' |' + bar + '| ' + counts[c] + ' (' + d + '% < ' + limit + '%)'); + } + } +} + +// Perf tests +for (var version in generators) { + log('\nPerformance testing ' + version + ' UUIDs'); + var generator = generators[version]; + var buf = new uuid.BufferClass(16); + + for (var i = 0, t = Date.now(); i < N; i++) generator(); + rate('uuid.' + version + '()', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary'); + rate('uuid.' + version + '(\'binary\')', t); + + for (var i = 0, t = Date.now(); i < N; i++) generator('binary', buf); + rate('uuid.' + version + '(\'binary\', buffer)', t); +} diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/uuid.js b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/uuid.js new file mode 100644 index 0000000..89c5b8f --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/node-uuid/uuid.js @@ -0,0 +1,272 @@ +// uuid.js +// +// Copyright (c) 2010-2012 Robert Kieffer +// MIT License - http://opensource.org/licenses/mit-license.php + +/*global window, require, define */ +(function(_window) { + 'use strict'; + + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + var _rng, _mathRNG, _nodeRNG, _whatwgRNG, _previousRoot; + + function setupBrowser() { + // Allow for MSIE11 msCrypto + var _crypto = _window.crypto || _window.msCrypto; + + if (!_rng && _crypto && _crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // + // Moderately fast, high quality + try { + var _rnds8 = new Uint8Array(16); + _whatwgRNG = _rng = function whatwgRNG() { + _crypto.getRandomValues(_rnds8); + return _rnds8; + }; + _rng(); + } catch(e) {} + } + + if (!_rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + _mathRNG = _rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) { r = Math.random() * 0x100000000; } + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; + if ('undefined' !== typeof console && console.warn) { + console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()"); + } + } + } + + function setupNode() { + // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html + // + // Moderately fast, high quality + if ('function' === typeof require) { + try { + var _rb = require('crypto').randomBytes; + _nodeRNG = _rng = _rb && function() {return _rb(16);}; + _rng(); + } catch(e) {} + } + } + + if (_window) { + setupBrowser(); + } else { + setupNode(); + } + + // Buffer class to use + var BufferClass = ('function' === typeof Buffer) ? Buffer : Array; + + // Maps for number <-> hex string conversion + var _byteToHex = []; + var _hexToByte = {}; + for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; + } + + // **`parse()` - Parse a UUID into it's component bytes** + function parse(s, buf, offset) { + var i = (buf && offset) || 0, ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[oct]; + } + }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii++] = 0; + } + + return buf; + } + + // **`unparse()` - Convert UUID byte array (ala parse()) into a string** + function unparse(buf, offset) { + var i = offset || 0, bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; + } + + // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + + // random #'s we need to init node and clockseq + var _seedBytes = _rng(); + + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] + ]; + + // Per 4.2.2, randomize (14 bit) clockseq + var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + + // Previous uuid creation time + var _lastMSecs = 0, _lastNSecs = 0; + + // See https://github.com/broofa/node-uuid for API details + function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = (options.clockseq != null) ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = (options.msecs != null) ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = (options.nsecs != null) ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq == null) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); + } + + // **`v4()` - Generate random UUID** + + // See https://github.com/broofa/node-uuid for API details + function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + + if (typeof(options) === 'string') { + buf = (options === 'binary') ? new BufferClass(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || _rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); + } + + // Export public API + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; + uuid.parse = parse; + uuid.unparse = unparse; + uuid.BufferClass = BufferClass; + uuid._rng = _rng; + uuid._mathRNG = _mathRNG; + uuid._nodeRNG = _nodeRNG; + uuid._whatwgRNG = _whatwgRNG; + + if (('undefined' !== typeof module) && module.exports) { + // Publish as node.js module + module.exports = uuid; + } else if (typeof define === 'function' && define.amd) { + // Publish as AMD module + define(function() {return uuid;}); + + + } else { + // Publish as global (in browsers) + _previousRoot = _window.uuid; + + // **`noConflict()` - (browser only) to reset global 'uuid' var** + uuid.noConflict = function() { + _window.uuid = _previousRoot; + return uuid; + }; + + _window.uuid = uuid; + } +})('undefined' !== typeof window ? window : null); diff --git a/PingTask/node_modules/vsts-task-lib/node_modules/q/CHANGES.md b/PingTask/node_modules/vsts-task-lib/node_modules/q/CHANGES.md new file mode 100644 index 0000000..cd351fd --- /dev/null +++ b/PingTask/node_modules/vsts-task-lib/node_modules/q/CHANGES.md @@ -0,0 +1,786 @@ + +## 1.4.1 + + - Address an issue that prevented Q from being used as a `