action-debian-package/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.production.min.js.map
2020-11-12 16:37:43 +01:00

1 line
47 KiB
Plaintext

{"version":3,"file":"docker-hub-utils.cjs.production.min.js","sources":["../src/types/DockerHubRepo.ts","../node_modules/regenerator-runtime/runtime.js","../src/utils/log.ts","../src/services/DockerHubAPI.ts","../src/utils/constants.ts"],"sourcesContent":["/**\n * This is a direct representation of what we get back from the `/repositories`\n * API call.\n */\nexport interface DockerHubAPIRepo {\n readonly can_edit: boolean\n readonly description: string\n readonly is_automated: boolean\n readonly is_migrated: boolean\n readonly is_private: boolean\n readonly last_updated: string\n readonly name: string\n readonly namespace: string\n readonly pull_count: number\n readonly repository_type: string\n readonly star_count: number\n readonly status: number\n readonly user: string\n}\n\n/**\n * Union type representing the architecture defined in part of an OCI image's\n * manifest list.\n *\n * As specified in the Docker Manifest spec, any valid GOARCH values are valid\n * image architecture values, and vice versa:\n * > The platform object describes the platform which the image in the manifest\n * > runs on. A full list of valid operating system and architecture values are\n * > listed in the Go language documentation for $GOOS and $GOARCH\n * @see https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list-field-descriptions\n */\nexport enum Architecture {\n i386 = '386',\n amd64 = 'amd64',\n arm = 'arm',\n arm64 = 'arm64',\n mips = 'mips',\n mips64 = 'mips64',\n mips64le = 'mips64le',\n mipsle = 'mipsle',\n ppc64 = 'ppc64',\n ppc64le = 'ppc64le',\n s390x = 's390x',\n wasm = 'wasm',\n}\n\n/**\n * Union type representing the OS defined in part of an OCI image's\n * manifest list.\n * See the docs for the `Architecture` type above for more info.\n */\nexport enum OS {\n aix = 'aix',\n android = 'android',\n darwin = 'darwin',\n dragonfly = 'dragonfly',\n freebsd = 'freebsd',\n illumos = 'illumos',\n js = 'js',\n linux = 'linux',\n netbsd = 'netbsd',\n openbsd = 'openbsd',\n plan9 = 'plan9',\n solaris = 'solaris',\n windows = 'windows',\n}\n\nexport enum ManifestMediaType {\n Manifest = 'application/vnd.docker.distribution.manifest.v2+json',\n ManifestList = 'application/vnd.docker.distribution.manifest.list.v2+json',\n}\n\n/**\n * Yes, there's *way* more information contained in the manifest / \"fat\"\n * manifestList than just architectures, but I find this to be the most\n * relevant section for my projects. PR's welcome.\n */\nexport interface DockerManifest {\n readonly digest: string\n readonly mediaType: ManifestMediaType\n readonly platform: Array<{\n architecture: Architecture\n os: OS\n }>\n readonly schemaVersion: 1 | 2 | number\n}\n\nexport interface DockerManifestList {\n readonly manifests: DockerManifest[]\n readonly mediaType: ManifestMediaType\n readonly schemaVersion: 1 | 2 | any\n}\n\nexport interface DockerHubRepo {\n // ========================\n // Main fields of interest\n // ========================\n readonly description: string | null | undefined\n readonly lastUpdated: string\n readonly name: string\n readonly pullCount: number\n readonly starCount: number\n readonly user: string\n\n // Manifest type *may* be nested within this interface, but is usually\n // fetched and returned separately.\n readonly manifestList?: DockerManifestList\n readonly tags?: Tag[]\n\n // =============================================\n // Other stuff that comes down through the API,\n // that some may find useful\n // =============================================\n readonly canEdit?: boolean\n readonly isAutomated?: boolean\n readonly isMigrated?: boolean\n readonly isPrivate?: boolean\n readonly namespace?: string\n readonly repositoryType?: string\n readonly status?: number\n}\n\nexport interface Tag {\n creator: number\n fullSize: number\n id: number\n images: TagElement[]\n lastUpdated: string\n lastUpdater: number\n lastUpdaterUsername: string\n name: string\n repository: number\n v2: boolean\n}\n\nexport interface TagElement {\n architecture: Architecture\n digest: string\n features: string\n os: OS\n size: number\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","import pino from 'pino'\n\nexport default pino({ base: null, useLevelLabels: true })\n","import axios from 'axios'\nimport camelcaseKeys from 'camelcase-keys'\nimport { DateTime } from 'luxon'\nimport R from 'ramda'\nimport log from '../utils/log'\n\nimport {\n DockerHubAPIRepo,\n DockerHubRepo,\n DockerManifestList,\n Tag,\n} from '../types/DockerHubRepo'\nimport {\n DOCKER_HUB_API_AUTH_URL,\n DOCKER_HUB_API_ROOT,\n} from '../utils/constants'\n\n/**\n * Currently only supports fetching the manifest for the `latest` tag; in\n * reality, we can pass any valid content digest[1] to retrieve the manifest(s)\n * for that image.\n *\n * [1]: https://github.com/opencontainers/distribution-spec/blob/master/spec.md#content-digests\n */\nconst createManifestListURL = ({ repo }: { repo: DockerHubRepo }): string =>\n `https://registry-1.docker.io/v2/${repo.user}/${repo.name}/manifests/latest`\n\nconst createUserReposListURL = (user: string): string =>\n `${DOCKER_HUB_API_ROOT}repositories/${user}`\n\n/**\n * The OCI distribution spec requires a unique token for each repo manifest queried.\n */\nexport const fetchDockerHubToken = async (\n repo: DockerHubRepo,\n): Promise<string> => {\n const { name, user } = repo\n const tokenRequest = await axios.get(DOCKER_HUB_API_AUTH_URL, {\n params: {\n scope: `repository:${user}/${name}:pull`,\n service: 'registry.docker.io',\n },\n })\n\n const token: string | undefined = R.path(['data', 'token'], tokenRequest)\n if (!token) {\n throw new Error('Unable to retrieve auth token from registry.')\n }\n return token\n}\n\n/**\n * Pure function that massages the Docker Hub API response into the\n * format we want to return. e.g., only extracting certain fields;\n * converting snake_case to camelCase, etc.\n */\nexport const extractRepositoryDetails = (\n repos: DockerHubAPIRepo[],\n lastUpdatedSince?: DateTime,\n): DockerHubRepo[] => {\n if (!repos || R.isEmpty(repos)) {\n return []\n }\n\n const parsedRepos: DockerHubRepo[] = (camelcaseKeys(\n repos,\n ) as unknown) as DockerHubRepo[]\n\n if (R.isNil(lastUpdatedSince)) {\n return parsedRepos\n }\n\n return parsedRepos.filter(\n repo => DateTime.fromISO(repo.lastUpdated) < lastUpdatedSince,\n )\n}\n\n/**\n * Query a single repository given a repo name and username.\n *\n * @param user The DockerHub username or org name to query for.\n * @param name The DockerHub repo name -- restrict to this single repo.\n */\nexport const queryRepo = async ({\n name,\n user,\n}: {\n name: string\n user: string\n}): Promise<DockerHubRepo | undefined> => {\n const repoResult = await axios.request({\n url: `${DOCKER_HUB_API_ROOT}repositories/${user}/${name}/`,\n })\n const repo: DockerHubRepo | undefined = R.prop('data', repoResult)\n if (repoResult.status !== 200 || !repo || R.isEmpty(repo)) {\n return\n }\n return (camelcaseKeys(repo) as unknown) as DockerHubRepo\n}\n\n/**\n * Top-level function for querying repositories.\n *\n * @TODO Rename to just `queryRepos`.\n *\n * @param user The DockerHub username or org name to query for.\n * @param numRepos The number of repos to query (max 100).\n * @param lastUpdatedSince Filter by the DateTime at which a repo was last updated.\n */\nexport const queryTopRepos = async ({\n lastUpdatedSince,\n numRepos = 100,\n user,\n}: {\n lastUpdatedSince?: DateTime\n numRepos?: number\n user: string\n}): Promise<DockerHubRepo[]> => {\n if (numRepos > 100) {\n throw new RangeError('Number of repos to query cannot exceed 100.')\n }\n\n const listReposURL = createUserReposListURL(user)\n const repoResults = await axios.get(listReposURL, {\n params: { page: 1, page_size: numRepos },\n })\n const repos: DockerHubAPIRepo[] = R.path(\n ['data', 'results'],\n repoResults,\n ) as DockerHubAPIRepo[]\n\n return extractRepositoryDetails(repos, lastUpdatedSince)\n}\n\n/**\n * Query image tags.\n */\nexport const queryTags = async (\n repo: DockerHubRepo,\n): Promise<Tag[] | undefined> => {\n const repoUrl = createUserReposListURL(repo.user)\n const tagsUrl = `${repoUrl}/${repo.name}/tags?page_size=100`\n const tagsResults = await axios.get(tagsUrl)\n const tags = R.path(['data', 'results'], tagsResults)\n if (!tags || R.isEmpty(tags)) {\n return\n }\n // @ts-ignore\n return camelcaseKeys(tags)\n}\n\n/**\n * Queries the Docker Hub API to retrieve a \"fat manifest\", an object of\n * `Content-Type` `application/vnd.docker.distribution.manifest.list.v2+json/`.\n * Read up on the Manifest v2, Schema 2 Spec in more detail:\n * @see https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md\n * Or the shiny new OCI distribution spec which builds on it:\n * @see https://github.com/opencontainers/distribution-spec/blob/f67bc11ba3a083a9c62f8fa53ad14c5bcf2116af/spec.md\n */\nexport const fetchManifestList = async (\n repo: DockerHubRepo,\n): Promise<DockerManifestList | undefined> => {\n // Docker Hub requires a unique token for each repo manifest queried.\n const token = await fetchDockerHubToken(repo)\n\n const manifestListURL = createManifestListURL({ repo })\n const manifestListResponse = await axios.get(manifestListURL, {\n headers: {\n Accept: 'application/vnd.docker.distribution.manifest.list.v2+json',\n Authorization: `Bearer ${token}`,\n },\n })\n // For now, just ignore legacy V1 schema manifests. They have an entirely\n // different response shape and it's not worth mucking up the schema to\n // support a legacy format.\n if (manifestListResponse.data.schemaVersion === 1) {\n log.info('Schema version 1 is unsupported.', repo.name)\n return\n }\n\n return R.path(['data'], manifestListResponse)\n}\n","export const DOCKER_CLOUD_URL = 'https://cloud.docker.com/repository/docker/'\nexport const DOCKER_HUB_API_ROOT = 'https://hub.docker.com/v2/'\nexport const DOCKER_HUB_API_AUTH_URL = 'https://auth.docker.io/token'\n"],"names":["Architecture","OS","ManifestMediaType","runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","generator","create","Generator","context","Context","_invoke","state","method","arg","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","result","__await","then","unwrapped","error","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","toString","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","pino","base","useLevelLabels","createManifestListURL","repo","user","createUserReposListURL","DOCKER_HUB_API_ROOT","fetchDockerHubToken","axios","get","params","scope","service","token","R","path","extractRepositoryDetails","repos","lastUpdatedSince","isEmpty","parsedRepos","camelcaseKeys","isNil","filter","DateTime","fromISO","lastUpdated","queryRepo","request","url","prop","repoResult","status","queryTopRepos","numRepos","RangeError","listReposURL","page","page_size","queryTags","repoUrl","tagsUrl","tags","fetchManifestList","manifestListURL","headers","Accept","Authorization","manifestListResponse","data","schemaVersion","log"],"mappings":"8IA+BYA,EAoBAC,EAgBAC,kbApCAF,EAAAA,uBAAAA,qCAEVA,gBACAA,YACAA,gBACAA,cACAA,kBACAA,sBACAA,kBACAA,gBACAA,oBACAA,gBACAA,cAQF,SAAYC,GACVA,YACAA,oBACAA,kBACAA,wBACAA,oBACAA,oBACAA,UACAA,gBACAA,kBACAA,oBACAA,gBACAA,oBACAA,oBAbF,CAAYA,IAAAA,QAgBAC,EAAAA,4BAAAA,+FAEVA,gGC9DF,IAAIC,EAAW,SAAUC,GAGvB,IAAIC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eAEZC,EAA4B,mBAAXC,OAAwBA,OAAS,GAClDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASC,EAAOC,EAAKC,EAAKC,GAOxB,OANAf,OAAOgB,eAAeH,EAAKC,EAAK,CAC9BC,MAAOA,EACPE,YAAY,EACZC,cAAc,EACdC,UAAU,IAELN,EAAIC,GAEb,IAEEF,EAAO,GAAI,IACX,MAAOQ,GACPR,EAAS,SAASC,EAAKC,EAAKC,GAC1B,OAAOF,EAAIC,GAAOC,GAItB,SAASM,EAAKC,EAASC,EAASC,EAAMC,GAEpC,IACIC,EAAY1B,OAAO2B,QADFJ,GAAWA,EAAQtB,qBAAqB2B,EAAYL,EAAUK,GACtC3B,WACzC4B,EAAU,IAAIC,EAAQL,GAAe,IAMzC,OAFAC,EAAUK,QAsMZ,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