From 362bbc1d830ce0b0730d400758282b29bfccac0b Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Tue, 6 Apr 2021 17:34:06 -0400 Subject: [PATCH] Ignore .gitkeep, remove deprecated url.resolve(), update dependencies (resolves #25). --- .nvmrc | 1 + package-lock.json | 246 ++++++++++++------ package.json | 20 +- src/structure/repo/BaseMavenRepo.ts | 10 +- src/structure/repo/VersionRepo.struct.ts | 4 +- src/structure/spec_model/Server.struct.ts | 4 +- .../spec_model/module/File.struct.ts | 8 +- .../spec_model/module/ForgeMod.struct.ts | 4 +- .../spec_model/module/Library.struct.ts | 4 +- .../spec_model/module/LiteMod.struct.ts | 4 +- .../spec_model/module/Module.struct.ts | 9 +- 11 files changed, 204 insertions(+), 110 deletions(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..da2d398 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +14 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bd13bf1..d5f6102 100644 --- a/package-lock.json +++ b/package-lock.json @@ -147,9 +147,9 @@ } }, "@types/fs-extra": { - "version": "9.0.8", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.8.tgz", - "integrity": "sha512-bnlTVTwq03Na7DpWxFJ1dvnORob+Otb8xHyUqUWhqvz/Ksg8+JXPlR52oeMSZ37YEOa5PyccbgUNutiQdi13TA==", + "version": "9.0.10", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.10.tgz", + "integrity": "sha512-O9T2LLkRDiTlalOBdjEkcnT0MRdT2+wglCl7pJUJ3mkWkR8hX4K+5bg2raQNJcLv4V8zGuTXe7Ud3wSqkTyuyQ==", "dev": true, "requires": { "@types/node": "*" @@ -174,21 +174,21 @@ } }, "@types/luxon": { - "version": "1.26.2", - "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-1.26.2.tgz", - "integrity": "sha512-2pvzy4LuxBMBBLAbml6PDcJPiIeZQ0Hqj3PE31IxkNI250qeoRMDovTrHXeDkIL4auvtarSdpTkLHs+st43EYQ==", + "version": "1.26.3", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-1.26.3.tgz", + "integrity": "sha512-2TELN+Pd3Ocde87sKJMSQ9Wdj0zc/okHK3/+fOQHr3CaWv4jtVtcMzmt1Foww1+5YvPd9B5vL3XR6u5KF0daEA==", "dev": true }, "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", "dev": true }, "@types/node": { - "version": "14.14.35", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz", - "integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag==" + "version": "14.14.37", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", + "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==" }, "@types/responselike": { "version": "1.0.0", @@ -205,9 +205,9 @@ "dev": true }, "@types/yargs": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.0.tgz", - "integrity": "sha512-2nN6AGeMwe8+O6nO9ytQfbMQOJy65oi1yK2y/9oReR08DaXSGtMsrLyCM1ooKqfICpCx4oITaR4LkOmdzz41Ww==", + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.1.tgz", + "integrity": "sha512-x4HABGLyzr5hKUzBC9dvjciOTm11WVH1NWonNjGgxapnTHu5SWUqyqn0zQ6Re0yQU0lsQ6ztLCoMAKDGZflyxA==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -220,13 +220,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.18.0.tgz", - "integrity": "sha512-Lzkc/2+7EoH7+NjIWLS2lVuKKqbEmJhtXe3rmfA8cyiKnZm3IfLf51irnBcmow8Q/AptVV0XBZmBJKuUJTe6cQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.21.0.tgz", + "integrity": "sha512-FPUyCPKZbVGexmbCFI3EQHzCZdy2/5f+jv6k2EDljGdXSRc0cKvbndd2nHZkSLqCNOPk0jB6lGzwIkglXcYVsQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.18.0", - "@typescript-eslint/scope-manager": "4.18.0", + "@typescript-eslint/experimental-utils": "4.21.0", + "@typescript-eslint/scope-manager": "4.21.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -236,55 +236,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.18.0.tgz", - "integrity": "sha512-92h723Kblt9JcT2RRY3QS2xefFKar4ZQFVs3GityOKWQYgtajxt/tuXIzL7sVCUlM1hgreiV5gkGYyBpdOwO6A==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.21.0.tgz", + "integrity": "sha512-cEbgosW/tUFvKmkg3cU7LBoZhvUs+ZPVM9alb25XvR0dal4qHL3SiUqHNrzoWSxaXA9gsifrYrS1xdDV6w/gIA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.18.0", - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/typescript-estree": "4.18.0", + "@typescript-eslint/scope-manager": "4.21.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/typescript-estree": "4.21.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.18.0.tgz", - "integrity": "sha512-W3z5S0ZbecwX3PhJEAnq4mnjK5JJXvXUDBYIYGoweCyWyuvAKfGHvzmpUzgB5L4cRBb+cTu9U/ro66dx7dIimA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.21.0.tgz", + "integrity": "sha512-eyNf7QmE5O/l1smaQgN0Lj2M/1jOuNg2NrBm1dqqQN0sVngTLyw8tdCbih96ixlhbF1oINoN8fDCyEH9SjLeIA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.18.0", - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/typescript-estree": "4.18.0", + "@typescript-eslint/scope-manager": "4.21.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/typescript-estree": "4.21.0", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.18.0.tgz", - "integrity": "sha512-olX4yN6rvHR2eyFOcb6E4vmhDPsfdMyfQ3qR+oQNkAv8emKKlfxTWUXU5Mqxs2Fwe3Pf1BoPvrwZtwngxDzYzQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.21.0.tgz", + "integrity": "sha512-kfOjF0w1Ix7+a5T1knOw00f7uAP9Gx44+OEsNQi0PvvTPLYeXJlsCJ4tYnDj5PQEYfpcgOH5yBlw7K+UEI9Agw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/visitor-keys": "4.18.0" + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/visitor-keys": "4.21.0" } }, "@typescript-eslint/types": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.18.0.tgz", - "integrity": "sha512-/BRociARpj5E+9yQ7cwCF/SNOWwXJ3qhjurMuK2hIFUbr9vTuDeu476Zpu+ptxY2kSxUHDGLLKy+qGq2sOg37A==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.21.0.tgz", + "integrity": "sha512-+OQaupjGVVc8iXbt6M1oZMwyKQNehAfLYJJ3SdvnofK2qcjfor9pEM62rVjBknhowTkh+2HF+/KdRAc/wGBN2w==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.18.0.tgz", - "integrity": "sha512-wt4xvF6vvJI7epz+rEqxmoNQ4ZADArGQO9gDU+cM0U5fdVv7N+IAuVoVAoZSOZxzGHBfvE3XQMLdy+scsqFfeg==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.21.0.tgz", + "integrity": "sha512-ZD3M7yLaVGVYLw4nkkoGKumb7Rog7QID9YOWobFDMQKNl+vPxqVIW/uDk+MDeGc+OHcoG2nJ2HphwiPNajKw3w==", "dev": true, "requires": { - "@typescript-eslint/types": "4.18.0", - "@typescript-eslint/visitor-keys": "4.18.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/visitor-keys": "4.21.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -293,12 +293,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.18.0.tgz", - "integrity": "sha512-Q9t90JCvfYaN0OfFUgaLqByOfz8yPeTAdotn/XYNm5q9eHax90gzdb+RJ6E9T5s97Kv/UHWKERTmqA0jTKAEHw==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.21.0.tgz", + "integrity": "sha512-dH22dROWGi5Z6p+Igc8bLVLmwy7vEe8r+8c+raPQU0LxgogPUrRAtRGtvBWmlr9waTu3n+QLt/qrS/hWzk1x5w==", "dev": true, "requires": { - "@typescript-eslint/types": "4.18.0", + "@typescript-eslint/types": "4.21.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -433,6 +433,16 @@ "responselike": "^2.0.0" } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -530,9 +540,9 @@ } }, "commander": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.1.0.tgz", - "integrity": "sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg==" + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" }, "concat-map": { "version": "0.0.1", @@ -652,9 +662,9 @@ "dev": true }, "eslint": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz", - "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", + "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", @@ -913,6 +923,12 @@ "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==", + "dev": true + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -924,6 +940,17 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -972,9 +999,9 @@ } }, "globby": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", - "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", + "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", "dev": true, "requires": { "array-union": "^2.1.0", @@ -1008,12 +1035,27 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "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==", + "dev": true + }, "helios-distribution-types": { "version": "1.0.0-rc.1", "resolved": "https://registry.npmjs.org/helios-distribution-types/-/helios-distribution-types-1.0.0-rc.1.tgz", @@ -1074,6 +1116,15 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1100,11 +1151,23 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true + }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -1200,6 +1263,24 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "logform": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", @@ -1272,9 +1353,9 @@ "dev": true }, "node-stream-zip": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.13.2.tgz", - "integrity": "sha512-159NUO3quDIRVSVOQiQ/0VG8NFrGvVyUa+MUUleiOys3NLtrGtNkodqYYTRHU/kiXu/ygHZcNy/tZ4NUCcDUmQ==" + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.13.3.tgz", + "integrity": "sha512-Vv95ug+8Jfug4AxcqNV7TeGEk2antNidj+YBOyP8SS8LTHJmjsE3d9h6L831eJtO8p7jesJ3CDtgkwmLO/wcSw==" }, "normalize-url": { "version": "4.5.0", @@ -1381,9 +1462,9 @@ "dev": true }, "queue-microtask": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", - "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "quick-lru": { @@ -1467,9 +1548,9 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -1568,21 +1649,26 @@ } }, "table": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", - "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz", + "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==", "dev": true, "requires": { - "ajv": "^7.0.2", - "lodash": "^4.17.20", + "ajv": "^8.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "lodash.clonedeep": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", "string-width": "^4.2.0" }, "dependencies": { "ajv": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz", - "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.5.tgz", + "integrity": "sha512-RkiLa/AeJx7+9OvniQ/qeWu0w74A8DiPPBclQ6ji3ZQkv5KamO+QGpqmi7O4JIw3rHGUXZ6CoP9tsAkn3gyazg==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -1630,16 +1716,16 @@ "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" }, "ts-json-schema-generator": { - "version": "0.89.0", - "resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-0.89.0.tgz", - "integrity": "sha512-1jmG5toW9CeswDbcYUwg9Z0bi9ZQtO/Dg9eJd7TxJgZWgj0bPxGZahkyoqomDrN0CruVNgquB2Y2wNDcVUO7qQ==", + "version": "0.89.2", + "resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-0.89.2.tgz", + "integrity": "sha512-fDKE80NvNgIomhuddRvuAyLKkI5RHdkvR19RckzyM2lLA/jWeFlCigZNjIqbsmw3duE1JSxuHHG3aEgJJUB/Cw==", "requires": { "@types/json-schema": "^7.0.7", - "commander": "^7.1.0", + "commander": "^7.2.0", "fast-json-stable-stringify": "^2.1.0", "glob": "^7.1.6", "json-stable-stringify": "^1.0.1", - "typescript": "~4.2.2" + "typescript": "~4.2.3" } }, "tslib": { diff --git a/package.json b/package.json index b804106..c8a66bc 100644 --- a/package.json +++ b/package.json @@ -27,15 +27,15 @@ }, "homepage": "https://github.com/dscalzi/Nebula#readme", "devDependencies": { - "@types/fs-extra": "^9.0.8", - "@types/luxon": "^1.26.2", - "@types/minimatch": "^3.0.3", - "@types/node": "^14.14.35", + "@types/fs-extra": "^9.0.10", + "@types/luxon": "^1.26.3", + "@types/minimatch": "^3.0.4", + "@types/node": "^14.14.37", "@types/triple-beam": "^1.3.2", - "@types/yargs": "^16.0.0", - "@typescript-eslint/eslint-plugin": "^4.18.0", - "@typescript-eslint/parser": "^4.18.0", - "eslint": "^7.22.0", + "@types/yargs": "^16.0.1", + "@typescript-eslint/eslint-plugin": "^4.21.0", + "@typescript-eslint/parser": "^4.21.0", + "eslint": "^7.23.0", "rimraf": "^3.0.2", "typescript": "^4.2.3" }, @@ -46,10 +46,10 @@ "helios-distribution-types": "^1.0.0-rc.1", "luxon": "^1.26.0", "minimatch": "^3.0.4", - "node-stream-zip": "^1.13.2", + "node-stream-zip": "^1.13.3", "toml": "^3.0.0", "triple-beam": "^1.3.0", - "ts-json-schema-generator": "^0.89.0", + "ts-json-schema-generator": "^0.89.2", "winston": "^3.3.3", "yargs": "^16.2.0" } diff --git a/src/structure/repo/BaseMavenRepo.ts b/src/structure/repo/BaseMavenRepo.ts index 17fcca8..cd39afd 100644 --- a/src/structure/repo/BaseMavenRepo.ts +++ b/src/structure/repo/BaseMavenRepo.ts @@ -1,7 +1,7 @@ import got from 'got' import { createWriteStream, mkdirs, pathExists } from 'fs-extra' import { dirname, join, resolve } from 'path' -import { resolve as resolveURL } from 'url' +import { URL } from 'url' import { MavenUtil } from '../../util/maven' import { BaseFileStructure } from '../BaseFileStructure' import { LoggerUtil } from '../../util/LoggerUtil' @@ -32,8 +32,8 @@ export abstract class BaseMavenRepo extends BaseFileStructure { public getArtifactUrlByComponents( baseURL: string, group: string, artifact: string, version: string, classifier?: string, extension = 'jar' ): string { - return resolveURL(baseURL, join(this.relativeRoot, - MavenUtil.mavenComponentsToString(group, artifact, version, classifier, extension))) + return new URL(join(this.relativeRoot, + MavenUtil.mavenComponentsToString(group, artifact, version, classifier, extension)), baseURL).toString() } public async artifactExists(path: string): Promise { @@ -52,7 +52,7 @@ export abstract class BaseMavenRepo extends BaseFileStructure { } private async downloadArtifactBase(url: string, relative: string): Promise { - const resolvedURL = resolveURL(url, relative).toString() + const resolvedURL = new URL(relative, url).toString() return this.downloadArtifactDirect(resolvedURL, relative) } @@ -85,7 +85,7 @@ export abstract class BaseMavenRepo extends BaseFileStructure { } private async headArtifactBase(url: string, relative: string): Promise { - const resolvedURL = resolveURL(url, relative).toString() + const resolvedURL = new URL(relative, url).toString() try { const response = await got.head({ url: resolvedURL diff --git a/src/structure/repo/VersionRepo.struct.ts b/src/structure/repo/VersionRepo.struct.ts index ca85318..a990a99 100644 --- a/src/structure/repo/VersionRepo.struct.ts +++ b/src/structure/repo/VersionRepo.struct.ts @@ -1,5 +1,5 @@ import { join } from 'path' -import { resolve as resolveURL } from 'url' +import { URL } from 'url' import { BaseFileStructure } from '../BaseFileStructure' import { MinecraftVersion } from '../../util/MinecraftVersion' @@ -27,7 +27,7 @@ export class VersionRepoStructure extends BaseFileStructure { public getVersionManifestURL(url: string, minecraftVersion: MinecraftVersion, forgeVersion: string): string { const fileName = this.getFileName(minecraftVersion, forgeVersion) - return resolveURL(url, join(this.relativeRoot, fileName, `${fileName}.json`)) + return new URL(join(this.relativeRoot, fileName, `${fileName}.json`), url).toString() } } diff --git a/src/structure/spec_model/Server.struct.ts b/src/structure/spec_model/Server.struct.ts index 79d9869..8bc0e51 100644 --- a/src/structure/spec_model/Server.struct.ts +++ b/src/structure/spec_model/Server.struct.ts @@ -1,7 +1,7 @@ import { lstat, mkdirs, pathExists, readdir, readFile, writeFile } from 'fs-extra' import { Server, Module } from 'helios-distribution-types' import { dirname, join, resolve as resolvePath } from 'path' -import { resolve as resolveUrl } from 'url' +import { URL } from 'url' import { VersionSegmentedRegistry } from '../../util/VersionSegmentedRegistry' import { ServerMeta, getDefaultServerMeta, ServerMetaOptions, UntrackedFilesOption } from '../../model/nebula/servermeta' import { BaseModelStructure } from './BaseModel.struct' @@ -114,7 +114,7 @@ export class ServerStructure extends BaseModelStructure { for (const subFile of subFiles) { const caseInsensitive = subFile.toLowerCase() if (caseInsensitive.endsWith('.jpg') || caseInsensitive.endsWith('.png')) { - iconUrl = resolveUrl(this.baseUrl, join(relativeServerRoot, subFile)) + iconUrl = new URL(join(relativeServerRoot, subFile), this.baseUrl).toString() } } diff --git a/src/structure/spec_model/module/File.struct.ts b/src/structure/spec_model/module/File.struct.ts index 9b348b9..bb328aa 100644 --- a/src/structure/spec_model/module/File.struct.ts +++ b/src/structure/spec_model/module/File.struct.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { Stats } from 'fs' import { Type, Module } from 'helios-distribution-types' -import { resolve as resolveURL } from 'url' +import { URL } from 'url' import { ModuleStructure } from './Module.struct' import { readdir, stat } from 'fs-extra' import { join, resolve, sep } from 'path' @@ -41,7 +41,9 @@ export class MiscFileStructure extends ModuleStructure { if (stats.isDirectory()) { acc = acc.concat(await this.recursiveModuleScan(filePath)) } else { - acc.push(await this.parseModule(file, filePath, stats)) + if(!this.FILE_NAME_BLACKLIST.includes(file)) { + acc.push(await this.parseModule(file, filePath, stats)) + } } } return acc @@ -54,7 +56,7 @@ export class MiscFileStructure extends ModuleStructure { return name } protected async getModuleUrl(name: string, path: string, stats: Stats): Promise { - return resolveURL(this.baseUrl, join(this.relativeRoot, ...path.substr(this.containerDirectory.length+1).split(sep))) + return new URL(join(this.relativeRoot, ...path.substr(this.containerDirectory.length+1).split(sep)), this.baseUrl).toString() } protected async getModulePath(name: string, path: string, stats: Stats): Promise { return path.substr(this.containerDirectory.length+1).replace(/\\/g, '/') diff --git a/src/structure/spec_model/module/ForgeMod.struct.ts b/src/structure/spec_model/module/ForgeMod.struct.ts index ca7c49f..c638f8c 100644 --- a/src/structure/spec_model/module/ForgeMod.struct.ts +++ b/src/structure/spec_model/module/ForgeMod.struct.ts @@ -1,7 +1,7 @@ import { Stats } from 'fs-extra' import { Type, Module } from 'helios-distribution-types' import { join } from 'path' -import { resolve } from 'url' +import { URL } from 'url' import { VersionSegmented } from '../../../util/VersionSegmented' import { MinecraftVersion } from '../../../util/MinecraftVersion' import { ToggleableModuleStructure } from './ToggleableModule.struct' @@ -36,7 +36,7 @@ export abstract class BaseForgeModStructure extends ToggleableModuleStructure im // eslint-disable-next-line @typescript-eslint/no-unused-vars protected async getModuleUrl(name: string, path: string, stats: Stats): Promise { - return resolve(this.baseUrl, join(this.relativeRoot, this.getActiveNamespace(), name)) + return new URL(join(this.relativeRoot, this.getActiveNamespace(), name), this.baseUrl).toString() } // eslint-disable-next-line @typescript-eslint/no-unused-vars protected async getModulePath(name: string, path: string, stats: Stats): Promise { diff --git a/src/structure/spec_model/module/Library.struct.ts b/src/structure/spec_model/module/Library.struct.ts index a162425..cf3ee49 100644 --- a/src/structure/spec_model/module/Library.struct.ts +++ b/src/structure/spec_model/module/Library.struct.ts @@ -2,7 +2,7 @@ import { ModuleStructure } from './Module.struct' import { Type, TypeMetadata } from 'helios-distribution-types' import { Stats } from 'fs-extra' import { join } from 'path' -import { resolve } from 'url' +import { URL } from 'url' import { MinecraftVersion } from '../../../util/MinecraftVersion' import { UntrackedFilesOption } from '../../../model/nebula/servermeta' @@ -36,7 +36,7 @@ export class LibraryStructure extends ModuleStructure { } // eslint-disable-next-line @typescript-eslint/no-unused-vars protected async getModuleUrl(name: string, path: string, stats: Stats): Promise { - return resolve(this.baseUrl, join(this.relativeRoot, name)) + return new URL(join(this.relativeRoot, name), this.baseUrl).toString() } // eslint-disable-next-line @typescript-eslint/no-unused-vars protected async getModulePath(name: string, path: string, stats: Stats): Promise { diff --git a/src/structure/spec_model/module/LiteMod.struct.ts b/src/structure/spec_model/module/LiteMod.struct.ts index 4e5d66b..942a451 100644 --- a/src/structure/spec_model/module/LiteMod.struct.ts +++ b/src/structure/spec_model/module/LiteMod.struct.ts @@ -2,7 +2,7 @@ import StreamZip from 'node-stream-zip' import { Stats } from 'fs-extra' import { Type } from 'helios-distribution-types' import { join } from 'path' -import { resolve } from 'url' +import { URL } from 'url' import { capitalize } from '../../../util/stringutils' import { LiteMod } from '../../../model/liteloader/litemod' import { ToggleableModuleStructure } from './ToggleableModule.struct' @@ -39,7 +39,7 @@ export class LiteModStructure extends ToggleableModuleStructure { } // eslint-disable-next-line @typescript-eslint/no-unused-vars protected async getModuleUrl(name: string, path: string, stats: Stats): Promise { - return resolve(this.baseUrl, join(this.relativeRoot, this.getActiveNamespace(), name)) + return new URL(join(this.relativeRoot, this.getActiveNamespace(), name), this.baseUrl).toString() } // eslint-disable-next-line @typescript-eslint/no-unused-vars protected async getModulePath(name: string, path: string, stats: Stats): Promise { diff --git a/src/structure/spec_model/module/Module.struct.ts b/src/structure/spec_model/module/Module.struct.ts index 1d193d5..c008d6a 100644 --- a/src/structure/spec_model/module/Module.struct.ts +++ b/src/structure/spec_model/module/Module.struct.ts @@ -25,6 +25,9 @@ export abstract class ModuleStructure extends BaseModelStructure { private readonly crudeRegex = /(.+?)-(.+).[jJ][aA][rR]/ protected readonly DEFAULT_VERSION = '0.0.0' + protected readonly FILE_NAME_BLACKLIST = [ + '.gitkeep' + ] protected untrackedFilePatterns: string[] // List of glob patterns. protected claritasResult!: ClaritasResult @@ -130,8 +133,10 @@ export abstract class ModuleStructure extends BaseModelStructure { const filePath = resolve(scanDirectory, file) const stats = await lstat(filePath) if (stats.isFile()) { - if(this.filter == null || this.filter(file, filePath, stats)) { - moduleCandidates.push({file, filePath, stats}) + if(!this.FILE_NAME_BLACKLIST.includes(file)) { + if(this.filter == null || this.filter(file, filePath, stats)) { + moduleCandidates.push({file, filePath, stats}) + } } } }