From e104e9556ebed8656f93f6b029c984374ff6621f Mon Sep 17 00:00:00 2001 From: Denis Rumyantsev Date: Fri, 28 Jan 2022 12:58:37 +0300 Subject: [PATCH 1/5] UniversalPackagesV0 migrated --- Tasks/UniversalPackagesV0/package-lock.json | 575 ++++++++++++++++-- Tasks/UniversalPackagesV0/package.json | 8 +- Tasks/UniversalPackagesV0/task.json | 8 +- Tasks/UniversalPackagesV0/task.loc.json | 6 +- .../UniversalPackagesV0/universaldownload.ts | 13 +- Tasks/UniversalPackagesV0/universalpublish.ts | 34 +- 6 files changed, 555 insertions(+), 89 deletions(-) diff --git a/Tasks/UniversalPackagesV0/package-lock.json b/Tasks/UniversalPackagesV0/package-lock.json index aff3642f73df..713f25092f41 100644 --- a/Tasks/UniversalPackagesV0/package-lock.json +++ b/Tasks/UniversalPackagesV0/package-lock.json @@ -1,9 +1,25 @@ { "name": "universalpackages", - "version": "0.0.6", + "version": "0.0.9", "lockfileVersion": 1, "requires": true, "dependencies": { + "@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=", + "requires": { + "@types/node": "*" + } + }, "@types/ini": { "version": "1.3.30", "resolved": "https://registry.npmjs.org/@types/ini/-/ini-1.3.30.tgz", @@ -15,12 +31,19 @@ "integrity": "sha512-qHnPVD0FFquypl7Yy8qqvDjhnX3c7toUYjjALK+bug7MfR2WCRTIjw+GUMfehRi/Mbhj5rLAQerPTnTCUzSCWg==", "requires": { "@types/node": "*" + }, + "dependencies": { + "@types/node": { + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.13.tgz", + "integrity": "sha512-Y86MAxASe25hNzlDbsviXl8jQHb0RDvKt4c40ZJQ1Don0AAL0STLZSs4N+6gLEO55pedy7r2cLwS+ZDxPm/2Bw==" + } } }, "@types/mocha": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", - "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==" + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==" }, "@types/mockery": { "version": "1.4.29", @@ -28,24 +51,29 @@ "integrity": "sha1-m6It838H43gP/4Ux0aOOYz+UV6U=" }, "@types/node": { - "version": "10.12.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.9.tgz", - "integrity": "sha512-eajkMXG812/w3w4a1OcBlaTwsFPO5F7fJ/amy+tieQxEMWBlbV1JGSjkFM+zkHNf81Cad+dfIRA+IBkvmvdAeA==" + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" }, "@types/q": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, "@types/semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==" }, "@types/uuid": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.9.tgz", - "integrity": "sha512-XDwyIlt/47l2kWLTzw/mtrpLdB+GPSskR2n/PIcPn+VYhVO77rGhRncIR5GPU0KRzXuqkDO+J5qqrG0Y8P6jzQ==" + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" }, "adm-zip": { "version": "0.4.16", @@ -67,6 +95,16 @@ } } }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, "azure-devops-node-api": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-8.0.0.tgz", @@ -78,16 +116,96 @@ } }, "azure-pipelines-task-lib": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-2.8.0.tgz", - "integrity": "sha512-PR8oap9z2j+o455W3PwAfB4SX1p4GdJc9OHQaQV0V+iQS1IBY6dVgcNSQMkHAXb0V1bbuLOFBLanXPe5eSgGTQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.1.10.tgz", + "integrity": "sha512-S5iH1mD9G7boOV0kjVsFkqlz/6FOZjQAajshj3ajzQK9Wr3XRq9JK9+grJP4ityG6of28X2XWpieFdJLhnWLoA==", "requires": { "minimatch": "3.0.4", "mockery": "^1.7.0", - "q": "^1.1.2", + "q": "^1.5.1", "semver": "^5.1.0", - "shelljs": "^0.3.0", + "shelljs": "^0.8.4", + "sync-request": "6.1.0", "uuid": "^3.0.1" + }, + "dependencies": { + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "requires": { + "@types/node": "^10.0.3" + } + }, + "promise": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "requires": { + "asap": "~2.0.6" + } + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + } + } + } } }, "azure-pipelines-tool-lib": { @@ -104,6 +222,25 @@ "uuid": "^3.0.1" }, "dependencies": { + "@types/uuid": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.10.tgz", + "integrity": "sha512-BgeaZuElf7DEYZhWYDTc/XcLZXdVgFkVSTa13BqKvbnmUrxr3TJFKofUxCtDO9UQOdhnV+HPOESdHiHKZOJV1A==" + }, + "azure-pipelines-task-lib": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-2.12.2.tgz", + "integrity": "sha512-ofAdVZcL90Qv6zYcKa1vK3Wnrl2kxoKX/Idvb7RWrqHQzcJlAEjCU4UCB5y6NnSKqRSyVTIhdS6hChphpOaiMQ==", + "requires": { + "minimatch": "3.0.4", + "mockery": "^1.7.0", + "q": "^1.1.2", + "semver": "^5.1.0", + "shelljs": "^0.3.0", + "sync-request": "3.0.1", + "uuid": "^3.0.1" + } + }, "typed-rest-client": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.0.9.tgz", @@ -116,9 +253,9 @@ } }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "brace-expansion": { "version": "1.1.11", @@ -129,25 +266,163 @@ "concat-map": "0.0.1" } }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, "esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "http-basic": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-2.5.1.tgz", + "integrity": "sha1-jORHvbW2xXf4pj4/p4BW7Eu02/s=", + "requires": { + "caseless": "~0.11.0", + "concat-stream": "^1.4.6", + "http-response-object": "^1.0.0" + } + }, + "http-response-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-1.1.0.tgz", + "integrity": "sha1-p8TnWq6C87tJBOT0P2FWc7TVGMM=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" }, "ip-address": { "version": "5.9.4", @@ -159,6 +434,19 @@ "sprintf-js": "1.1.2" } }, + "is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "requires": { + "has": "^1.0.3" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, "js-yaml": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz", @@ -174,18 +462,31 @@ "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=" }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "ltx": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.9.2.tgz", - "integrity": "sha512-llB7HflFhlfsYYT1SAe80elCBO5C20ryLdwPB/A/BZk38hhVeZztDlWQ9uTyvKNPX4aK6sA+JfS1f/mfzp5cxA==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.10.0.tgz", + "integrity": "sha512-RB4zR6Mrp/0wTNS9WxMvpgfht/7u/8QAC9DpPD19opL/4OASPa28uoliFqeDkLUU8pQ4aeAfATBZmz1aSAHkMw==", "requires": { "inherits": "^2.0.4" } }, + "mime-db": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==" + }, + "mime-types": { + "version": "2.1.34", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "requires": { + "mime-db": "1.51.0" + } + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -199,6 +500,19 @@ "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", "integrity": "sha1-9O3g2HUMHJcnwnLqLGBiniyaHE8=" }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, "packaging-common": { "version": "file:../../_build/Tasks/Common/packaging-common-1.0.1.tgz", "requires": { @@ -218,6 +532,59 @@ "q": "^1.5.0", "semver": "^5.5.0", "typed-rest-client": "1.2.0" + }, + "dependencies": { + "@types/mocha": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", + "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==" + }, + "@types/node": { + "version": "10.12.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.9.tgz", + "integrity": "sha512-eajkMXG812/w3w4a1OcBlaTwsFPO5F7fJ/amy+tieQxEMWBlbV1JGSjkFM+zkHNf81Cad+dfIRA+IBkvmvdAeA==" + }, + "azure-pipelines-task-lib": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-2.8.0.tgz", + "integrity": "sha512-PR8oap9z2j+o455W3PwAfB4SX1p4GdJc9OHQaQV0V+iQS1IBY6dVgcNSQMkHAXb0V1bbuLOFBLanXPe5eSgGTQ==", + "requires": { + "minimatch": "3.0.4", + "mockery": "^1.7.0", + "q": "^1.1.2", + "semver": "^5.1.0", + "shelljs": "^0.3.0", + "uuid": "^3.0.1" + } + } + } + }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "~2.0.3" } }, "q": { @@ -225,10 +592,55 @@ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" }, + "qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "requires": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "semver-compare": { "version": "1.0.0", @@ -240,11 +652,65 @@ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=" }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "sprintf-js": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "sync-request": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-3.0.1.tgz", + "integrity": "sha1-yqEjWq+Im6UBB2oYNMQ2gwqC+3M=", + "requires": { + "concat-stream": "^1.4.7", + "http-response-object": "^1.0.1", + "then-request": "^2.0.1" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "requires": { + "get-port": "^3.1.0" + } + }, + "then-request": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-2.2.0.tgz", + "integrity": "sha1-ZnizL6DKIY/laZgbvYhxtZQGDYE=", + "requires": { + "caseless": "~0.11.0", + "concat-stream": "^1.4.7", + "http-basic": "^2.5.1", + "http-response-object": "^1.1.0", + "promise": "^7.1.1", + "qs": "^6.1.0" + } + }, "tunnel": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", @@ -259,46 +725,40 @@ "underscore": "1.8.3" } }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typescript": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", + "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", + "dev": true + }, "underscore": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, "utility-common": { "version": "file:../../_build/Tasks/Common/utility-common-1.0.2.tgz", "requires": { "js-yaml": "3.6.1", "semver": "^5.4.1", - "vso-node-api": "6.5.0", "vsts-task-lib": "2.6.0", "vsts-task-tool-lib": "0.4.0" } }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" - }, - "vso-node-api": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/vso-node-api/-/vso-node-api-6.5.0.tgz", - "integrity": "sha512-hFjPLMJkq02zF8U+LhZ4airH0ivaiKzGdlNAQlYFB3lWuGH/UANUrl63DVPUQOyGw+7ZNQ+ufM44T6mWN92xyg==", - "requires": { - "tunnel": "0.0.4", - "typed-rest-client": "^0.12.0", - "underscore": "1.8.3" - }, - "dependencies": { - "typed-rest-client": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-0.12.0.tgz", - "integrity": "sha1-Y3b1Un9CfaEh3K/f1+QeEyHgcgw=", - "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" - } - } - } + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "vsts-task-lib": { "version": "2.6.0", @@ -348,6 +808,11 @@ } } } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } } \ No newline at end of file diff --git a/Tasks/UniversalPackagesV0/package.json b/Tasks/UniversalPackagesV0/package.json index c4663e2b6998..556bece6d076 100644 --- a/Tasks/UniversalPackagesV0/package.json +++ b/Tasks/UniversalPackagesV0/package.json @@ -17,8 +17,14 @@ }, "homepage": "https://github.com/Microsoft/azure-pipelines-tasks#readme", "dependencies": { - "azure-pipelines-task-lib": "2.8.0", + "@types/mocha": "^5.2.7", + "@types/node": "^10.17.0", + "@types/uuid": "^8.3.0", + "azure-pipelines-task-lib": "^3.1.10", "packaging-common": "file:../../_build/Tasks/Common/packaging-common-1.0.1.tgz", "utility-common": "file:../../_build/Tasks/Common/utility-common-1.0.2.tgz" + }, + "devDependencies": { + "typescript": "4.0.2" } } diff --git a/Tasks/UniversalPackagesV0/task.json b/Tasks/UniversalPackagesV0/task.json index 85a8ed78469b..c9ed3f56bb30 100644 --- a/Tasks/UniversalPackagesV0/task.json +++ b/Tasks/UniversalPackagesV0/task.json @@ -9,14 +9,14 @@ "category": "Package", "version": { "Major": 0, - "Minor": 198, + "Minor": 200, "Patch": 0 }, "runsOn": [ "Agent", "DeploymentGroup" ], - "minimumAgentVersion": "2.115.0", + "minimumAgentVersion": "2.144.0", "groups": [ { "name": "packageDownloadDetails", @@ -408,7 +408,7 @@ } ], "execution": { - "Node": { + "Node10": { "target": "universalmain.js", "argumentFormat": "" } @@ -453,4 +453,4 @@ "Error_UniversalPackagesNotSupportedOnPrem": "Universal Packages are not supported in Azure DevOps Server.", "Error_ProcessorArchitectureNotSupported": "Universal Packages require an x64 agent." } -} \ No newline at end of file +} diff --git a/Tasks/UniversalPackagesV0/task.loc.json b/Tasks/UniversalPackagesV0/task.loc.json index 44e64a6812c0..f424af1d2a38 100644 --- a/Tasks/UniversalPackagesV0/task.loc.json +++ b/Tasks/UniversalPackagesV0/task.loc.json @@ -9,14 +9,14 @@ "category": "Package", "version": { "Major": 0, - "Minor": 198, + "Minor": 200, "Patch": 0 }, "runsOn": [ "Agent", "DeploymentGroup" ], - "minimumAgentVersion": "2.115.0", + "minimumAgentVersion": "2.144.0", "groups": [ { "name": "packageDownloadDetails", @@ -408,7 +408,7 @@ } ], "execution": { - "Node": { + "Node10": { "target": "universalmain.js", "argumentFormat": "" } diff --git a/Tasks/UniversalPackagesV0/universaldownload.ts b/Tasks/UniversalPackagesV0/universaldownload.ts index 1c7afbe322b8..19e20bae66ca 100644 --- a/Tasks/UniversalPackagesV0/universaldownload.ts +++ b/Tasks/UniversalPackagesV0/universaldownload.ts @@ -1,7 +1,7 @@ import * as tl from "azure-pipelines-task-lib"; -import * as pkgLocationUtils from "packaging-common/locationUtilities"; +import * as pkgLocationUtils from "packaging-common/locationUtilities"; import { getProjectAndFeedIdFromInputParam } from 'packaging-common/util'; -import {IExecSyncResult, IExecOptions} from "azure-pipelines-task-lib/toolrunner"; +import { IExecSyncResult, IExecOptions } from "packaging-common/node_modules/azure-pipelines-task-lib/toolrunner"; import * as telemetry from "utility-common/telemetry"; import * as artifactToolRunner from "packaging-common/universal/ArtifactToolRunner"; import * as artifactToolUtilities from "packaging-common/universal/ArtifactToolUtilities"; @@ -13,8 +13,7 @@ export async function run(artifactToolPath: string): Promise { try { // Get directory where to download let downloadDir: string = tl.getInput("downloadDirectory"); - if (downloadDir.length < 1) - { + if (downloadDir.length < 1) { tl.warning(tl.loc("Info_DownloadDirectoryNotFound")); return; } @@ -39,8 +38,7 @@ export async function run(artifactToolPath: string): Promise { let toolRunnerOptions = artifactToolRunner.getOptions(); - if (feedType === "internal") - { + if (feedType === "internal") { // getting inputs serviceUri = tl.getEndpointUrl("SYSTEMVSSCONNECTION", false); @@ -64,8 +62,7 @@ export async function run(artifactToolPath: string): Promise { else { let externalAuthInfo = auth.GetExternalAuthInfo("externalEndpoint"); - if (!externalAuthInfo) - { + if (!externalAuthInfo) { tl.setResult(tl.TaskResult.Failed, tl.loc("Error_NoSourceSpecifiedForDownload")); return; } diff --git a/Tasks/UniversalPackagesV0/universalpublish.ts b/Tasks/UniversalPackagesV0/universalpublish.ts index afbbb838b3c4..d2d4177e3769 100644 --- a/Tasks/UniversalPackagesV0/universalpublish.ts +++ b/Tasks/UniversalPackagesV0/universalpublish.ts @@ -1,9 +1,9 @@ import * as pkgLocationUtils from "packaging-common/locationUtilities"; -import {ProvenanceHelper} from "packaging-common/provenance"; +import { ProvenanceHelper } from "packaging-common/provenance"; import { getProjectAndFeedIdFromInputParam } from 'packaging-common/util'; import * as telemetry from "utility-common/telemetry"; import * as tl from "azure-pipelines-task-lib"; -import {IExecOptions, IExecSyncResult} from "azure-pipelines-task-lib/toolrunner"; +import { IExecOptions, IExecSyncResult } from "packaging-common/node_modules/azure-pipelines-task-lib/toolrunner"; import * as artifactToolRunner from "packaging-common/universal/ArtifactToolRunner"; import * as artifactToolUtilities from "packaging-common/universal/ArtifactToolUtilities"; import * as auth from "packaging-common/universal/Authentication"; @@ -18,8 +18,7 @@ export async function run(artifactToolPath: string): Promise { try { // Get directory to publish const publishDir: string = tl.getInput("publishDirectory"); - if (publishDir.length < 1) - { + if (publishDir.length < 1) { tl.debug(tl.loc("Info_PublishDirectoryNotFound")); return; } @@ -53,8 +52,7 @@ export async function run(artifactToolPath: string): Promise { [serviceUri, packageName, feedId, projectId, accessToken] = authSetup(feedType); - if (feedType === "internal") - { + if (feedType === "internal") { internalAuthInfo = new auth.InternalAuthInfo([], accessToken); toolRunnerOptions.env.UNIVERSAL_PUBLISH_PAT = internalAuthInfo.accessToken; @@ -88,10 +86,10 @@ export async function run(artifactToolPath: string): Promise { toolRunnerOptions.env.UNIVERSAL_PUBLISH_PAT = accessToken; } - if (versionRadio === "custom"){ + if (versionRadio === "custom") { version = tl.getInput("versionPublish"); } - else{ + else { feedUri = await pkgLocationUtils.getFeedUriFromBaseServiceUri(serviceUri, accessToken); version = await getNextPackageVersion(feedUri, accessToken, projectId, feedId, packageName); } @@ -146,7 +144,7 @@ export async function run(artifactToolPath: string): Promise { tl.debug(tl.loc("Info_PublishingRetry", publishOptions.packageName, version, newVersion)); execResult = publishPackageUsingArtifactTool(publishDir, publishOptions, toolRunnerOptions); version = newVersion; - retries++; + retries++; } if (execResult != null && execResult.code === packageAlreadyExistsError) { @@ -218,7 +216,7 @@ async function getNextPackageVersion( accessToken: string, projectId: string, feedId: string, - packageName: string) { + packageName: string) { let version: string; const highestVersion = await artifactToolUtilities.getHighestPackageVersionFromFeed( feedUri, @@ -227,11 +225,11 @@ async function getNextPackageVersion( feedId, packageName); - if(highestVersion != null) { - version= artifactToolUtilities.getVersionUtility(tl.getInput("versionPublishSelector"), highestVersion); + if (highestVersion != null) { + version = artifactToolUtilities.getVersionUtility(tl.getInput("versionPublishSelector"), highestVersion); } - if(version == null) { + if (version == null) { throw new Error(tl.loc("FailedToGetLatestPackageVersion")); } @@ -240,7 +238,7 @@ async function getNextPackageVersion( function authSetup( feedType: string -) { +) { let serviceUri: string; let packageName: string; @@ -249,7 +247,7 @@ function authSetup( let accessToken: string; if (feedType == "internal") { - + // getting inputs serviceUri = tl.getEndpointUrl("SYSTEMVSSCONNECTION", false); @@ -264,7 +262,7 @@ function authSetup( else { const externalAuthInfo = auth.GetExternalAuthInfo("externalEndpoints"); - if (!externalAuthInfo) { + if (!externalAuthInfo) { tl.setResult(tl.TaskResult.Failed, tl.loc("Error_NoSourceSpecifiedForPublish")); return; } @@ -281,10 +279,10 @@ function authSetup( accessToken = (externalAuthInfo as auth.TokenExternalAuthInfo).token; } return [ - serviceUri, + serviceUri, packageName, feedId, projectId, accessToken ]; -} \ No newline at end of file +} From f183504300b0f9c82965146959aaaf24c4794a12 Mon Sep 17 00:00:00 2001 From: Denis Rumyantsev Date: Fri, 28 Jan 2022 15:03:32 +0300 Subject: [PATCH 2/5] use common npm packages --- .../Tests/UniversalMockHelper.ts | 10 +- Tasks/UniversalPackagesV0/make.json | 23 -- Tasks/UniversalPackagesV0/package-lock.json | 355 ++++++------------ Tasks/UniversalPackagesV0/package.json | 4 +- .../UniversalPackagesV0/universaldownload.ts | 14 +- Tasks/UniversalPackagesV0/universalmain.ts | 16 +- Tasks/UniversalPackagesV0/universalpublish.ts | 18 +- 7 files changed, 155 insertions(+), 285 deletions(-) delete mode 100644 Tasks/UniversalPackagesV0/make.json diff --git a/Tasks/UniversalPackagesV0/Tests/UniversalMockHelper.ts b/Tasks/UniversalPackagesV0/Tests/UniversalMockHelper.ts index 74553600e89e..fbf7df43dcb9 100644 --- a/Tasks/UniversalPackagesV0/Tests/UniversalMockHelper.ts +++ b/Tasks/UniversalPackagesV0/Tests/UniversalMockHelper.ts @@ -1,7 +1,7 @@ import { TaskLibAnswers, TaskLibAnswerExecResult } from 'azure-pipelines-task-lib/mock-answer'; import tmrm = require('azure-pipelines-task-lib/mock-run'); -import * as pkgMock from 'packaging-common/Tests/MockHelper'; -import * as artMock from 'packaging-common/Tests/ArtifactToolMockHelper'; +import * as pkgMock from 'azure-pipelines-tasks-packaging-common-v3/Tests/MockHelper'; +import * as artMock from 'azure-pipelines-tasks-packaging-common-v3/Tests/ArtifactToolMockHelper'; export class UniversalMockHelper { private static ArtifactToolCmd: string = 'c:\\mock\\location\\ArtifactTool.exe'; @@ -21,7 +21,7 @@ export class UniversalMockHelper { this.tmr.setInput('verbosity', "verbose"); process.env['AGENT_HOMEDIRECTORY'] = "c:\\agent\\home\\directory"; - process.env['BUILD_SOURCESDIRECTORY'] = "c:\\agent\\home\\directory\\sources", + process.env['BUILD_SOURCESDIRECTORY'] = "c:\\agent\\home\\directory\\sources"; process.env['ENDPOINT_AUTH_SYSTEMVSSCONNECTION'] = "{\"parameters\":{\"AccessToken\":\"token\"},\"scheme\":\"OAuth\"}"; process.env['ENDPOINT_URL_SYSTEMVSSCONNECTION'] = "https://example.visualstudio.com/defaultcollection"; process.env['SYSTEM_DEFAULTWORKINGDIRECTORY'] = "c:\\agent\\home\\directory"; @@ -35,10 +35,10 @@ export class UniversalMockHelper { pkgMock.registerLocationHelpersMock(tmr); } - public mockUniversalCommand(command: string, feed:string, packageName: string, packageVersion: string, path: string, result: TaskLibAnswerExecResult, service?: string) { + public mockUniversalCommand(command: string, feed: string, packageName: string, packageVersion: string, path: string, result: TaskLibAnswerExecResult, service?: string) { if (!service) { service = "https://example.visualstudio.com/defaultcollection"; } this.answers.exec[`${UniversalMockHelper.ArtifactToolCmd} universal ${command} --feed ${feed} --service ${service} --package-name ${packageName} --package-version ${packageVersion} --path ${path} --patvar UNIVERSAL_DOWNLOAD_PAT --verbosity verbose`] = result; } -} \ No newline at end of file +} diff --git a/Tasks/UniversalPackagesV0/make.json b/Tasks/UniversalPackagesV0/make.json deleted file mode 100644 index 0024cf6530af..000000000000 --- a/Tasks/UniversalPackagesV0/make.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "common": [ - { - "module": "../Common/utility-common", - "type": "node", - "compile": true - }, - { - "module": "../Common/packaging-common", - "type": "node", - "compile": true - } - ], - "rm": [ - { - "items": [ - "node_modules/utility-common/node_modules/vsts-task-lib", - "node_modules/packaging-common/node_modules/azure-pipelines-task-lib" - ], - "options": "-Rf" - } - ] -} \ No newline at end of file diff --git a/Tasks/UniversalPackagesV0/package-lock.json b/Tasks/UniversalPackagesV0/package-lock.json index 713f25092f41..556eaedfd758 100644 --- a/Tasks/UniversalPackagesV0/package-lock.json +++ b/Tasks/UniversalPackagesV0/package-lock.json @@ -105,16 +105,6 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, - "azure-devops-node-api": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-8.0.0.tgz", - "integrity": "sha512-QkIzphuE3y/hZVMB6ONN0Dev5r9+CIAiopWulwoYx1Er0kYcsbXsKXKynuLSxsVPocMppbr4YPhTsX2eHY/Mjw==", - "requires": { - "tunnel": "0.0.4", - "typed-rest-client": "1.2.0", - "underscore": "1.8.3" - } - }, "azure-pipelines-task-lib": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.1.10.tgz", @@ -208,18 +198,89 @@ } } }, - "azure-pipelines-tool-lib": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-0.12.0.tgz", - "integrity": "sha512-JAlFvMTtEXISrnJY/kgq0LecLi089RqXRf/gMsXYbflmzszklkc+LUJpR0A7NDmJ+9/MWpKY/ZX+Q/zirYa7gw==", + "azure-pipelines-tasks-packaging-common-v3": { + "version": "3.200.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-packaging-common-v3/-/azure-pipelines-tasks-packaging-common-v3-3.200.0.tgz", + "integrity": "sha512-sFUZ/S2haxklSVwmk9uBxG1eyrwmz6aIEF+ejuY1XDBSZqoMHWNGwLferLoNckTGXSXYLKu+O/nJYAfpYFB5GA==", "requires": { - "@types/semver": "^5.3.0", - "@types/uuid": "^3.0.1", - "azure-pipelines-task-lib": "^2.8.0", - "semver": "^5.3.0", - "semver-compare": "^1.0.0", - "typed-rest-client": "1.0.9", - "uuid": "^3.0.1" + "@types/ini": "1.3.30", + "@types/ltx": "2.8.0", + "@types/mocha": "^5.2.6", + "@types/mockery": "1.4.29", + "@types/node": "^10.17.0", + "@types/q": "1.5.2", + "adm-zip": "^0.4.11", + "azure-devops-node-api": "10.2.2", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tool-lib": "^1.0.2", + "ini": "^1.3.4", + "ip-address": "^5.8.9", + "ltx": "^2.6.2", + "q": "^1.5.0", + "semver": "^5.5.0", + "typed-rest-client": "1.8.4" + }, + "dependencies": { + "@types/uuid": { + "version": "3.4.10", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.10.tgz", + "integrity": "sha512-BgeaZuElf7DEYZhWYDTc/XcLZXdVgFkVSTa13BqKvbnmUrxr3TJFKofUxCtDO9UQOdhnV+HPOESdHiHKZOJV1A==" + }, + "azure-devops-node-api": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-10.2.2.tgz", + "integrity": "sha512-4TVv2X7oNStT0vLaEfExmy3J4/CzfuXolEcQl/BRUmvGySqKStTG2O55/hUQ0kM7UJlZBLgniM0SBq4d/WkKow==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "azure-pipelines-tool-lib": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.0.2.tgz", + "integrity": "sha512-0wWAqIY1n9UvcHP3AKLWIVd5fTPKaUOZJ50bNwW3NMpFlfpxZDAi8Ck9wvVm9oBdwHVYZsQy3WfK71DiBWQiHg==", + "requires": { + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.1.0", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.4", + "uuid": "^3.3.2" + } + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "underscore": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz", + "integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==" + } + } + }, + "azure-pipelines-tasks-utility-common": { + "version": "3.198.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.198.1.tgz", + "integrity": "sha512-XxXLwrz06lSXP31JGCcgp2DCuVwcKLCjma55DtsjDe8L8sngKfmTBIiSuZe41aP+KlRtqo8n1I/FBQNPWxGw9w==", + "requires": { + "@types/node": "^10.17.0", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tool-lib": "^1.0.2", + "js-yaml": "3.13.1", + "semver": "^5.4.1" }, "dependencies": { "@types/uuid": { @@ -227,28 +288,53 @@ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.10.tgz", "integrity": "sha512-BgeaZuElf7DEYZhWYDTc/XcLZXdVgFkVSTa13BqKvbnmUrxr3TJFKofUxCtDO9UQOdhnV+HPOESdHiHKZOJV1A==" }, - "azure-pipelines-task-lib": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-2.12.2.tgz", - "integrity": "sha512-ofAdVZcL90Qv6zYcKa1vK3Wnrl2kxoKX/Idvb7RWrqHQzcJlAEjCU4UCB5y6NnSKqRSyVTIhdS6hChphpOaiMQ==", + "azure-pipelines-tool-lib": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-1.0.2.tgz", + "integrity": "sha512-0wWAqIY1n9UvcHP3AKLWIVd5fTPKaUOZJ50bNwW3NMpFlfpxZDAi8Ck9wvVm9oBdwHVYZsQy3WfK71DiBWQiHg==", "requires": { - "minimatch": "3.0.4", - "mockery": "^1.7.0", - "q": "^1.1.2", - "semver": "^5.1.0", - "shelljs": "^0.3.0", - "sync-request": "3.0.1", - "uuid": "^3.0.1" + "@types/semver": "^5.3.0", + "@types/uuid": "^3.4.5", + "azure-pipelines-task-lib": "^3.1.0", + "semver": "^5.7.0", + "semver-compare": "^1.0.0", + "typed-rest-client": "^1.8.4", + "uuid": "^3.3.2" } }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, "typed-rest-client": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.0.9.tgz", - "integrity": "sha512-iOdwgmnP/tF6Qs+oY4iEtCf/3fnCDl7Gy9LGPJ4E3M4Wj3uaSko15FVwbsaBmnBqTJORnXBWVY5306D4HH8oiA==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.6.tgz", + "integrity": "sha512-xcQpTEAJw2DP7GqVNECh4dD+riS+C1qndXLfBCJ3xk0kqprtGN491P5KlmrDbKdtuW8NEcP/5ChxiJI3S9WYTA==", "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" } + }, + "underscore": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz", + "integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==" } } }, @@ -280,11 +366,6 @@ "get-intrinsic": "^1.0.2" } }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -319,11 +400,6 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" - }, "form-data": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", @@ -385,21 +461,6 @@ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" }, - "http-basic": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-2.5.1.tgz", - "integrity": "sha1-jORHvbW2xXf4pj4/p4BW7Eu02/s=", - "requires": { - "caseless": "~0.11.0", - "concat-stream": "^1.4.6", - "http-response-object": "^1.0.0" - } - }, - "http-response-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-1.1.0.tgz", - "integrity": "sha1-p8TnWq6C87tJBOT0P2FWc7TVGMM=" - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -447,15 +508,6 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "js-yaml": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz", - "integrity": "sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=", - "requires": { - "argparse": "^1.0.7", - "esprima": "^2.6.0" - } - }, "jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", @@ -513,52 +565,6 @@ "wrappy": "1" } }, - "packaging-common": { - "version": "file:../../_build/Tasks/Common/packaging-common-1.0.1.tgz", - "requires": { - "@types/ini": "1.3.30", - "@types/ltx": "2.8.0", - "@types/mocha": "5.2.6", - "@types/mockery": "1.4.29", - "@types/node": "10.12.9", - "@types/q": "1.5.2", - "adm-zip": "^0.4.11", - "azure-devops-node-api": "8.0.0", - "azure-pipelines-task-lib": "2.8.0", - "azure-pipelines-tool-lib": "0.12.0", - "ini": "^1.3.4", - "ip-address": "^5.8.9", - "ltx": "^2.6.2", - "q": "^1.5.0", - "semver": "^5.5.0", - "typed-rest-client": "1.2.0" - }, - "dependencies": { - "@types/mocha": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", - "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==" - }, - "@types/node": { - "version": "10.12.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.9.tgz", - "integrity": "sha512-eajkMXG812/w3w4a1OcBlaTwsFPO5F7fJ/amy+tieQxEMWBlbV1JGSjkFM+zkHNf81Cad+dfIRA+IBkvmvdAeA==" - }, - "azure-pipelines-task-lib": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-2.8.0.tgz", - "integrity": "sha512-PR8oap9z2j+o455W3PwAfB4SX1p4GdJc9OHQaQV0V+iQS1IBY6dVgcNSQMkHAXb0V1bbuLOFBLanXPe5eSgGTQ==", - "requires": { - "minimatch": "3.0.4", - "mockery": "^1.7.0", - "q": "^1.1.2", - "semver": "^5.1.0", - "shelljs": "^0.3.0", - "uuid": "^3.0.1" - } - } - } - }, "parse-cache-control": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", @@ -579,14 +585,6 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "requires": { - "asap": "~2.0.3" - } - }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -647,11 +645,6 @@ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=" }, - "shelljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", - "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=" - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -680,16 +673,6 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, - "sync-request": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-3.0.1.tgz", - "integrity": "sha1-yqEjWq+Im6UBB2oYNMQ2gwqC+3M=", - "requires": { - "concat-stream": "^1.4.7", - "http-response-object": "^1.0.1", - "then-request": "^2.0.1" - } - }, "sync-rpc": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", @@ -698,33 +681,6 @@ "get-port": "^3.1.0" } }, - "then-request": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/then-request/-/then-request-2.2.0.tgz", - "integrity": "sha1-ZnizL6DKIY/laZgbvYhxtZQGDYE=", - "requires": { - "caseless": "~0.11.0", - "concat-stream": "^1.4.7", - "http-basic": "^2.5.1", - "http-response-object": "^1.1.0", - "promise": "^7.1.1", - "qs": "^6.1.0" - } - }, - "tunnel": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=" - }, - "typed-rest-client": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.2.0.tgz", - "integrity": "sha512-FrUshzZ1yxH8YwGR29PWWnfksLEILbWJydU7zfIRkyH7kAEzB62uMAl2WY6EyolWpLpVHeJGgQm45/MaruaHpw==", - "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" - } - }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -736,83 +692,20 @@ "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", "dev": true }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, - "utility-common": { - "version": "file:../../_build/Tasks/Common/utility-common-1.0.2.tgz", - "requires": { - "js-yaml": "3.6.1", - "semver": "^5.4.1", - "vsts-task-lib": "2.6.0", - "vsts-task-tool-lib": "0.4.0" - } - }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, - "vsts-task-lib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/vsts-task-lib/-/vsts-task-lib-2.6.0.tgz", - "integrity": "sha512-ja2qX4BIUvswcNbGtIoGo1SM5mRVc3Yaf7oM4oY64bNHs04chKfvH6f3cDDG0pd44OrZIGQE9LgECzeau6z2wA==", - "requires": { - "minimatch": "3.0.4", - "mockery": "^1.7.0", - "q": "^1.1.2", - "semver": "^5.1.0", - "shelljs": "^0.3.0", - "uuid": "^3.0.1" - } - }, - "vsts-task-tool-lib": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/vsts-task-tool-lib/-/vsts-task-tool-lib-0.4.0.tgz", - "integrity": "sha1-zOtRxyh3yWTI5E3p7eovZfyKyPk=", - "requires": { - "semver": "^5.3.0", - "semver-compare": "^1.0.0", - "typed-rest-client": "^0.9.0", - "uuid": "^3.0.1", - "vsts-task-lib": "2.0.4-preview" - }, - "dependencies": { - "typed-rest-client": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-0.9.0.tgz", - "integrity": "sha1-92jMDcP06VDwbgSCXDaz54NKofI=", - "requires": { - "tunnel": "0.0.4", - "underscore": "1.8.3" - } - }, - "vsts-task-lib": { - "version": "2.0.4-preview", - "resolved": "https://registry.npmjs.org/vsts-task-lib/-/vsts-task-lib-2.0.4-preview.tgz", - "integrity": "sha1-nU63UAoL2a1Z429w8iqtxuK6+NI=", - "requires": { - "minimatch": "^3.0.0", - "mockery": "^1.7.0", - "q": "^1.1.2", - "semver": "^5.1.0", - "shelljs": "^0.3.0", - "uuid": "^3.0.1" - } - } - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } -} \ No newline at end of file +} diff --git a/Tasks/UniversalPackagesV0/package.json b/Tasks/UniversalPackagesV0/package.json index 556bece6d076..a13d905bb0cd 100644 --- a/Tasks/UniversalPackagesV0/package.json +++ b/Tasks/UniversalPackagesV0/package.json @@ -21,8 +21,8 @@ "@types/node": "^10.17.0", "@types/uuid": "^8.3.0", "azure-pipelines-task-lib": "^3.1.10", - "packaging-common": "file:../../_build/Tasks/Common/packaging-common-1.0.1.tgz", - "utility-common": "file:../../_build/Tasks/Common/utility-common-1.0.2.tgz" + "azure-pipelines-tasks-packaging-common-v3": "^3.200.0", + "azure-pipelines-tasks-utility-common": "^3.198.1" }, "devDependencies": { "typescript": "4.0.2" diff --git a/Tasks/UniversalPackagesV0/universaldownload.ts b/Tasks/UniversalPackagesV0/universaldownload.ts index 19e20bae66ca..b4137fa81940 100644 --- a/Tasks/UniversalPackagesV0/universaldownload.ts +++ b/Tasks/UniversalPackagesV0/universaldownload.ts @@ -1,11 +1,11 @@ import * as tl from "azure-pipelines-task-lib"; -import * as pkgLocationUtils from "packaging-common/locationUtilities"; -import { getProjectAndFeedIdFromInputParam } from 'packaging-common/util'; -import { IExecSyncResult, IExecOptions } from "packaging-common/node_modules/azure-pipelines-task-lib/toolrunner"; -import * as telemetry from "utility-common/telemetry"; -import * as artifactToolRunner from "packaging-common/universal/ArtifactToolRunner"; -import * as artifactToolUtilities from "packaging-common/universal/ArtifactToolUtilities"; -import * as auth from "packaging-common/universal/Authentication"; +import * as pkgLocationUtils from "azure-pipelines-tasks-packaging-common-v3/locationUtilities"; +import { getProjectAndFeedIdFromInputParam } from 'azure-pipelines-tasks-packaging-common-v3/util'; +import { IExecSyncResult, IExecOptions } from "azure-pipelines-task-lib/toolrunner"; +import * as telemetry from "azure-pipelines-tasks-utility-common/telemetry"; +import * as artifactToolRunner from "azure-pipelines-tasks-packaging-common-v3/universal/ArtifactToolRunner"; +import * as artifactToolUtilities from "azure-pipelines-tasks-packaging-common-v3/universal/ArtifactToolUtilities"; +import * as auth from "azure-pipelines-tasks-packaging-common-v3/universal/Authentication"; export async function run(artifactToolPath: string): Promise { let buildIdentityDisplayName: string = null; diff --git a/Tasks/UniversalPackagesV0/universalmain.ts b/Tasks/UniversalPackagesV0/universalmain.ts index 3fb10385de57..fdb680c841e6 100644 --- a/Tasks/UniversalPackagesV0/universalmain.ts +++ b/Tasks/UniversalPackagesV0/universalmain.ts @@ -1,8 +1,8 @@ import * as path from "path"; -import * as pkgLocationUtils from "packaging-common/locationUtilities"; -import * as telemetry from "utility-common/telemetry"; +import * as pkgLocationUtils from "azure-pipelines-tasks-packaging-common-v3/locationUtilities"; +import * as telemetry from "azure-pipelines-tasks-utility-common/telemetry"; import * as tl from "azure-pipelines-task-lib"; -import * as artifactToolUtilities from "packaging-common/universal/ArtifactToolUtilities"; +import * as artifactToolUtilities from "azure-pipelines-tasks-packaging-common-v3/universal/ArtifactToolUtilities"; import * as universalDownload from "./universaldownload"; import * as universalPublish from "./universalpublish"; @@ -15,7 +15,7 @@ async function main(): Promise { try { const serverType = tl.getVariable("System.ServerType"); - if (!serverType || serverType.toLowerCase() !== "hosted"){ + if (!serverType || serverType.toLowerCase() !== "hosted") { throw new Error(tl.loc("Error_UniversalPackagesNotSupportedOnPrem")); } @@ -24,9 +24,9 @@ async function main(): Promise { const blobUri = await pkgLocationUtils.getBlobstoreUriFromBaseServiceUri( serviceUri, localAccessToken); - + tl.debug(tl.loc("Info_RetrievingArtifactToolUri", blobUri)); - + // Finding the artifact tool directory artifactToolPath = await pkgLocationUtils.retryOnExceptionHelper( () => artifactToolUtilities.getArtifactToolFromService( @@ -39,7 +39,7 @@ async function main(): Promise { catch (error) { tl.setResult(tl.TaskResult.Failed, tl.loc("FailedToGetArtifactTool", error.message)); return; - } finally{ + } finally { _logUniversalStartupVariables(artifactToolPath); } // Calling the command. download/publish @@ -67,7 +67,7 @@ function _logUniversalStartupVariables(artifactToolPath: string) { "verbosity": tl.getInput("verbosity"), "solution": tl.getInput("solution"), "artifactToolPath": artifactToolPath, - }; + }; telemetry.emitTelemetry("Packaging", "UniversalPackages", universalPackagesTelemetry); } catch (err) { diff --git a/Tasks/UniversalPackagesV0/universalpublish.ts b/Tasks/UniversalPackagesV0/universalpublish.ts index d2d4177e3769..fc4cac842b90 100644 --- a/Tasks/UniversalPackagesV0/universalpublish.ts +++ b/Tasks/UniversalPackagesV0/universalpublish.ts @@ -1,13 +1,13 @@ -import * as pkgLocationUtils from "packaging-common/locationUtilities"; -import { ProvenanceHelper } from "packaging-common/provenance"; -import { getProjectAndFeedIdFromInputParam } from 'packaging-common/util'; -import * as telemetry from "utility-common/telemetry"; +import * as pkgLocationUtils from "azure-pipelines-tasks-packaging-common-v3/locationUtilities"; +import { ProvenanceHelper } from "azure-pipelines-tasks-packaging-common-v3/provenance"; +import { getProjectAndFeedIdFromInputParam } from 'azure-pipelines-tasks-packaging-common-v3/util'; +import * as telemetry from "azure-pipelines-tasks-utility-common/telemetry"; import * as tl from "azure-pipelines-task-lib"; -import { IExecOptions, IExecSyncResult } from "packaging-common/node_modules/azure-pipelines-task-lib/toolrunner"; -import * as artifactToolRunner from "packaging-common/universal/ArtifactToolRunner"; -import * as artifactToolUtilities from "packaging-common/universal/ArtifactToolUtilities"; -import * as auth from "packaging-common/universal/Authentication"; -import { logError } from 'packaging-common/util'; +import { IExecOptions, IExecSyncResult } from "azure-pipelines-task-lib/toolrunner"; +import * as artifactToolRunner from "azure-pipelines-tasks-packaging-common-v3/universal/ArtifactToolRunner"; +import * as artifactToolUtilities from "azure-pipelines-tasks-packaging-common-v3/universal/ArtifactToolUtilities"; +import * as auth from "azure-pipelines-tasks-packaging-common-v3/universal/Authentication"; +import { logError } from 'azure-pipelines-tasks-packaging-common-v3/util'; const packageAlreadyExistsError = 17; const numRetries = 1; From 7c8681304cf794af98501a5d2459aaebbb13b9ee Mon Sep 17 00:00:00 2001 From: Denis Rumyantsev Date: Mon, 7 Feb 2022 12:55:35 +0300 Subject: [PATCH 3/5] timeout 5 sec --- Tasks/UniversalPackagesV0/Tests/L0.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tasks/UniversalPackagesV0/Tests/L0.ts b/Tasks/UniversalPackagesV0/Tests/L0.ts index 3689be317334..20902d54a338 100644 --- a/Tasks/UniversalPackagesV0/Tests/L0.ts +++ b/Tasks/UniversalPackagesV0/Tests/L0.ts @@ -10,7 +10,7 @@ describe('UniversalPackages Suite', function () { }); it('downloads package from current organization', (done: MochaDone) => { - this.timeout(1000); + this.timeout(5000); let tp = path.join(__dirname, './downloadInternal.js') let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp); @@ -22,4 +22,4 @@ describe('UniversalPackages Suite', function () { assert.equal(tr.errorIssues.length, 0, "should have no errors"); done(); }); -}); \ No newline at end of file +}); From 681445427a28fc03d3e312301e87f057f5ee69a5 Mon Sep 17 00:00:00 2001 From: Denis Rumyantsev Date: Mon, 7 Feb 2022 13:23:35 +0300 Subject: [PATCH 4/5] timeout 5 sec --- Tasks/UniversalPackagesV0/Tests/L0.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tasks/UniversalPackagesV0/Tests/L0.ts b/Tasks/UniversalPackagesV0/Tests/L0.ts index 20902d54a338..d95dfc50e1b1 100644 --- a/Tasks/UniversalPackagesV0/Tests/L0.ts +++ b/Tasks/UniversalPackagesV0/Tests/L0.ts @@ -9,8 +9,8 @@ describe('UniversalPackages Suite', function () { after(() => { }); - it('downloads package from current organization', (done: MochaDone) => { - this.timeout(5000); + it('downloads package from current organization', (done: Mocha.Done) => { + mocha.timeout(5000); let tp = path.join(__dirname, './downloadInternal.js') let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp); From 8f5b4d22414e4cdfec77b7f7341abb7e53e275ec Mon Sep 17 00:00:00 2001 From: Denis Rumyantsev Date: Mon, 7 Feb 2022 13:35:08 +0300 Subject: [PATCH 5/5] timeout 5 sec --- Tasks/UniversalPackagesV0/Tests/L0.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tasks/UniversalPackagesV0/Tests/L0.ts b/Tasks/UniversalPackagesV0/Tests/L0.ts index d95dfc50e1b1..3130f4012d8c 100644 --- a/Tasks/UniversalPackagesV0/Tests/L0.ts +++ b/Tasks/UniversalPackagesV0/Tests/L0.ts @@ -9,8 +9,8 @@ describe('UniversalPackages Suite', function () { after(() => { }); - it('downloads package from current organization', (done: Mocha.Done) => { - mocha.timeout(5000); + it('downloads package from current organization', function (done: Mocha.Done) { + this.timeout(5000); let tp = path.join(__dirname, './downloadInternal.js') let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp);