@front10/danger-plugins 1.0.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/danger-plugins.cjs.development.js +62 -28
- package/dist/danger-plugins.cjs.development.js.map +1 -1
- package/dist/danger-plugins.cjs.production.min.js +1 -1
- package/dist/danger-plugins.cjs.production.min.js.map +1 -1
- package/dist/danger-plugins.esm.js +61 -27
- package/dist/danger-plugins.esm.js.map +1 -1
- package/package.json +6 -4
- package/src/plugin-bundle-size.ts +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"danger-plugins.cjs.production.min.js","sources":["../node_modules/regenerator-runtime/runtime.js","../src/plugin-netlify.ts","../src/plugin-bundle-size.ts","../src/plugin-lighthouse.ts"],"sourcesContent":["/**\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 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 GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\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 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 if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\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 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 { DangerDSLType } from \"danger\";\nimport NetlifyAPI, { DeployOptions, DeployResult } from \"netlify\";\n\ndeclare const danger: DangerDSLType;\ndeclare function fail(message?: string): void;\ndeclare function markdown(message?: string): void;\n\ntype Options = {\n siteId: string;\n buildDir: string;\n label: string;\n} & DeployOptions;\n\nexport function deploySite({\n siteId,\n buildDir,\n client: customClient,\n ...configRest\n}: Options & { client?: NetlifyAPI; message?: string }) {\n let client = customClient;\n if (!client) {\n const authToken = process.env.NETLIFY_AUTH_TOKEN;\n client = new NetlifyAPI(authToken!);\n }\n\n return client.deploy(siteId, buildDir, {\n statusCb: (statusObj) => {\n console.log(statusObj.msg);\n },\n ...configRest,\n });\n}\n\nexport async function deploy(configs: Options[]) {\n const authToken = process.env.NETLIFY_AUTH_TOKEN;\n if (!authToken) {\n fail(\n `Couldn't get deploy information. You need to set up an authentication \n token in your environment variables. \n See: https://gitlab.com/help/ci/variables/README#variables`\n );\n }\n try {\n const client = new NetlifyAPI(authToken!);\n let message;\n if (danger.gitlab) {\n message = danger.gitlab.mr.title;\n }\n const deployResults: DeployResult[] = [];\n for (const config of configs) {\n const result = await deploySite({\n client,\n message,\n draft: true,\n ...config,\n });\n deployResults.push(result);\n }\n\n const lastCommit = danger.git.commits[0];\n markdown(\n [\n \"## Deploy preview\",\n \"Deploy preview for *front10-ui* ready!\",\n `Built with commit ${lastCommit.sha}`,\n ...deployResults.map(\n (result, index) =>\n `${configs[index].label}: ${result.deploy.deploy_ssl_url}`\n ),\n ].join(`\\n\\n`)\n );\n } catch (e) {\n console.error(e);\n fail(`Couldn't get deploy information.`);\n }\n}\n","import { MarkdownString } from \"danger\";\nimport fs, { existsSync, lstatSync, readdirSync, readFileSync } from \"fs\";\nimport fetch from \"node-fetch\";\nimport path from \"path\";\nimport zlib from \"zlib\";\n\ndeclare function markdown(message: MarkdownString): void;\n\ntype CompressionFormats = \"gzip\" | \"brotli\";\n\n/**\n * Generates a Markdown table\n * @param {string[]} headers\n * @param {string[][]} body\n */\nfunction generateMDTable(headers: string[], body: string[][]): string {\n const tableHeaders = [\n headers.join(\" | \"),\n headers.map(() => \" --- \").join(\" | \"),\n ];\n\n const tableBody = body.map((r) => r.join(\" | \"));\n return `${tableHeaders.join(\"\\n\")}\\n${tableBody.join(\"\\n\")}`;\n}\n\nexport interface BundleSizeOptions {\n formats?: CompressionFormats[];\n bundlesDir: string;\n getBundlesFn?: (bundleDir: string) => string[];\n renameFn?: (filename: string) => string;\n bundlePrefix?: string;\n reportPath?: string;\n baseBundleJob?: string;\n}\n\nfunction getDefaultGetBundlesFn(bundlePrefix: string) {\n return function defaultGetBundlesFn(bundlesDir: string) {\n return readdirSync(bundlesDir)\n .map((name) => path.join(bundlesDir, name))\n .filter((dirName) => lstatSync(dirName).isDirectory())\n .map((dirName) =>\n path.join(\n dirName,\n path.basename(dirName).replace(bundlePrefix, \"\") + \".bundle.js\"\n )\n );\n };\n}\n\nfunction defaultRenameFn(filename: string) {\n return filename\n .split(\".bundle.js\")[0]\n .replace(/--/g, \"-\")\n .split(\"-\")\n .map((e) => e[0].toUpperCase() + e.slice(1))\n .join(\" \")\n .replace(\"Mobile\", \"(mobile)\");\n}\n\ninterface BundleInfo {\n filename: string;\n sizes: number[];\n}\n\ninterface BundleSizeResult {\n gzip: boolean;\n brotli: boolean;\n bundles: BundleInfo[];\n}\n\nexport function bundleSizeResults({\n formats = [\"gzip\"],\n bundlesDir,\n renameFn = defaultRenameFn,\n getBundlesFn,\n bundlePrefix = \"cmp-mc-\",\n reportPath,\n}: BundleSizeOptions): BundleSizeResult {\n const getBundles = getBundlesFn ?? getDefaultGetBundlesFn(bundlePrefix);\n const files = getBundles(bundlesDir).filter(existsSync);\n\n const formatFilter = new Set(formats);\n const gzip = formatFilter.has(\"gzip\");\n const brotli = formatFilter.has(\"brotli\");\n\n const results = {\n gzip,\n brotli,\n bundles: files.map((filePath) => {\n const jsFile = readFileSync(filePath);\n const fileSizes = [\n jsFile,\n ...(gzip ? [zlib.gzipSync(jsFile)] : []),\n ...(brotli ? [zlib.brotliCompressSync(jsFile)] : []),\n ];\n\n return {\n filename: renameFn(path.basename(filePath)),\n sizes: fileSizes.map((file) => file.length),\n };\n }),\n };\n\n if (reportPath) {\n fs.writeFileSync(reportPath, JSON.stringify(results, null, 2));\n }\n\n return results;\n}\n\nfunction formatDiff(value: number) {\n let sizeString = (value / 1000).toFixed(1);\n if (sizeString === \"-0.0\") {\n sizeString = \"0.0\";\n }\n const size = Number(sizeString);\n let icon = \"\";\n if (size > 0) {\n icon = \"🔺+\";\n } else if (size < 0) {\n icon = \"🔻\";\n }\n return `${icon}${sizeString}k`;\n}\n\nexport async function bundleSize(options: BundleSizeOptions) {\n const results = bundleSizeResults(options);\n const { reportPath, baseBundleJob = \"publish\" } = options;\n\n let baseResults: BundleSizeResult | undefined;\n if (reportPath) {\n const projectId = process.env.CI_MERGE_REQUEST_PROJECT_ID;\n const authToken = process.env.DANGER_GITLAB_API_TOKEN as string;\n const targetBranch =\n process.env.CI_MERGE_REQUEST_TARGET_BRANCH_NAME || \"master\";\n const baseBundlesUrl = `https://gitlab.com/api/v4/projects/${projectId}/jobs/artifacts/${targetBranch}/raw/${reportPath}?job=${baseBundleJob}`;\n baseResults = await fetch(baseBundlesUrl, {\n headers: { \"PRIVATE-TOKEN\": authToken },\n }).then((response) => response.json());\n }\n\n let baseBundles: Map<string, number[]> = new Map();\n let diffHeaders: string[] = [];\n if (baseResults) {\n const { bundles, brotli, gzip } = baseResults;\n if (bundles) {\n bundles.forEach((bundle) => {\n baseBundles.set(bundle.filename, bundle.sizes);\n });\n }\n diffHeaders = [\n \"Filesize diff\",\n ...(gzip ? [\"Gzip diff\"] : []),\n ...(brotli ? [\"Brotli diff\"] : []),\n ];\n }\n\n const headers = [\n \"Module\",\n \"Filesize\",\n ...(results.gzip ? [\"Gzip size\"] : []),\n ...(results.brotli ? [\"Brotli size\"] : []),\n ...diffHeaders,\n ];\n\n const body = results.bundles.map((bundle) => {\n let diff: number[] = [];\n if (baseResults) {\n const { brotli, gzip } = baseResults;\n const baseBrotliIndex = brotli && !gzip ? 1 : 2;\n const brotliIndex = results.brotli && !results.gzip ? 1 : 2;\n if (baseBundles.has(bundle.filename)) {\n const baseBundle = baseBundles.get(bundle.filename)!;\n diff = [\n bundle.sizes[0] - baseBundle[0],\n ...(gzip && results.gzip ? [bundle.sizes[1] - baseBundle[1]] : []),\n ...(brotli && results.brotli\n ? [bundle.sizes[brotliIndex] - baseBundle[baseBrotliIndex]]\n : []),\n ];\n }\n }\n\n return [\n bundle.filename,\n ...bundle.sizes.map((size) => `${(size / 1000).toFixed(1)}k`),\n ...diff.map((size) => formatDiff(size)),\n ];\n });\n\n markdown([\"## Bundle size\", generateMDTable(headers, body)].join(\"\\n\\n\"));\n}\n","declare function markdown(message?: string): void;\nimport * as fs from \"fs\";\nimport { promisify } from \"util\";\n\nconst readFile = promisify(fs.readFile);\n\nexport async function lighthouse() {\n const content = await readFile(\".lighthouseci/links.json\");\n const links: Record<string, string> = JSON.parse(content.toString());\n\n const urlsToCheck = Object.entries(links);\n\n if (urlsToCheck.length === 0) {\n return;\n }\n\n markdown(\n [\n \"## Lighthouse report\",\n urlsToCheck\n .map(([pageUrl, reportUrl]) => {\n const pageDisplay = pageUrl.replace(\n /http:\\/\\/localhost:[0-9]*\\//,\n \"\"\n );\n return `- [${pageDisplay}](${reportUrl})`;\n })\n .join(\"\\n\"),\n ].join(\"\\n\\n\")\n );\n}\n"],"names":["runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","self","tryLocsList","generator","create","Generator","context","Context","_invoke","state","method","arg","Error","value","undefined","done","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","makeInvokeMethod","fn","obj","call","err","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","key","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","deploySite","siteId","buildDir","customClient","client","configRest","authToken","process","env","NETLIFY_AUTH_TOKEN","NetlifyAPI","deploy","statusCb","statusObj","console","log","msg","configs","fail","danger","gitlab","message","mr","title","deployResults","config","draft","lastCommit","git","commits","markdown","sha","map","index","label","deploy_ssl_url","join","generateMDTable","headers","body","tableHeaders","tableBody","r","defaultRenameFn","filename","split","replace","e","toUpperCase","bundleSizeResults","bundlePrefix","formats","renameFn","getBundlesFn","reportPath","files","bundlesDir","readdirSync","path","filter","dirName","lstatSync","isDirectory","basename","existsSync","formatFilter","Set","gzip","has","brotli","results","bundles","filePath","jsFile","readFileSync","fileSizes","zlib","gzipSync","brotliCompressSync","sizes","file","fs","writeFileSync","JSON","stringify","formatDiff","sizeString","toFixed","size","Number","icon","options","baseBundleJob","projectId","CI_MERGE_REQUEST_PROJECT_ID","DANGER_GITLAB_API_TOKEN","targetBranch","CI_MERGE_REQUEST_TARGET_BRANCH_NAME","baseBundlesUrl","fetch","response","json","baseResults","baseBundles","Map","diffHeaders","bundle","set","diff","baseBrotliIndex","brotliIndex","baseBundle","get","readFile","promisify","links","parse","urlsToCheck","entries","reportUrl"],"mappings":"mnDAOA,IAAIA,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,EAAKC,EAASC,EAASC,EAAMC,GAEpC,IACIC,EAAYjB,OAAOkB,QADFJ,GAAWA,EAAQb,qBAAqBkB,EAAYL,EAAUK,GACtClB,WACzCmB,EAAU,IAAIC,EAAQL,GAAe,IAMzC,OAFAC,EAAUK,QAqMZ,SAA0BT,EAASE,EAAMK,GACvC,IAAIG,EA9KuB,iBAgL3B,OAAO,SAAgBC,EAAQC,GAC7B,GA/KoB,cA+KhBF,EACF,MAAM,IAAIG,MAAM,gCAGlB,GAlLoB,cAkLhBH,EAA6B,CAC/B,GAAe,UAAXC,EACF,MAAMC,EAKR,MAoQG,CAAEE,WAtePC,EAseyBC,MAAM,GA9P/B,IAHAT,EAAQI,OAASA,EACjBJ,EAAQK,IAAMA,IAED,CACX,IAAIK,EAAWV,EAAQU,SACvB,GAAIA,EAAU,CACZ,IAAIC,EAAiBC,EAAoBF,EAAUV,GACnD,GAAIW,EAAgB,CAClB,GAAIA,IAAmBE,EAAkB,SACzC,OAAOF,GAIX,GAAuB,SAAnBX,EAAQI,OAGVJ,EAAQc,KAAOd,EAAQe,MAAQf,EAAQK,SAElC,GAAuB,UAAnBL,EAAQI,OAAoB,CACrC,GAlNqB,mBAkNjBD,EAEF,MADAA,EAhNc,YAiNRH,EAAQK,IA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aAAe,GAC/BG,EAAQD,OAAS,CAAC,eAAiB,GACpCoC,GAGClE,EAAO+B,EAAQC,QAAQvC,KAAI,SAAC0E,OAC5BE,EAAiB,MACjBN,EAAa,KACPjC,EAAiBiC,EAAjBjC,OAAQF,EAASmC,EAATnC,KACV0C,EAAkBxC,IAAWF,EAAO,EAAI,EACxC2C,EAAcxC,EAAQD,SAAWC,EAAQH,KAAO,EAAI,KACtDoC,EAAYnC,IAAIsC,EAAO9D,UAAW,KAC9BmE,EAAaR,EAAYS,IAAIN,EAAO9D,UAC1CgE,GACEF,EAAO3B,MAAM,GAAKgC,EAAW,WACzB5C,GAAQG,EAAQH,KAAO,CAACuC,EAAO3B,MAAM,GAAKgC,EAAW,IAAM,GAC3D1C,GAAUC,EAAQD,OAClB,CAACqC,EAAO3B,MAAM+B,GAAeC,EAAWF,IACxC,YAMRH,EAAO9D,iBACJ8D,EAAO3B,MAAM/C,KAAI,SAACwD,UAAaA,EAAO,KAAMD,QAAQ,UACpDqB,EAAK5E,KAAI,SAACwD,UAASH,EAAWG,UAIrC1D,SAAS,CAAC,iBAAkBO,EAAgBC,EAASC,IAAOH,KAAK,4EC1LnE,IAAM6E,EAAWC,YAAUjC,4CAEpB,oGACiBgC,EAAS,sCACzBE,EAAgChC,KAAKiC,aAAcjJ,YAI9B,KAFrBkJ,EAAc3P,OAAO4P,QAAQH,IAEnBhK,wDAIhB2E,SACE,CACE,uBACAuF,EACGrF,KAAI,gBAAWuF,wBACczE,QAC1B,8BACA,SAE2ByE,SAE9BnF,KAAK,OACRA,KAAK,yLAtBX"}
|
|
1
|
+
{"version":3,"file":"danger-plugins.cjs.production.min.js","sources":["../node_modules/regenerator-runtime/runtime.js","../src/plugin-netlify.ts","../src/plugin-bundle-size.ts","../src/plugin-lighthouse.ts"],"sourcesContent":["/**\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 define(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 = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(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 define(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 define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(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, in modern engines\n // we can explicitly access globalThis. In older engines 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 if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","import { DangerDSLType } from \"danger\";\nimport NetlifyAPI, { DeployOptions, DeployResult } from \"netlify\";\n\ndeclare const danger: DangerDSLType;\ndeclare function fail(message?: string): void;\ndeclare function markdown(message?: string): void;\n\ntype Options = {\n siteId: string;\n buildDir: string;\n label: string;\n} & DeployOptions;\n\nexport function deploySite({\n siteId,\n buildDir,\n client: customClient,\n ...configRest\n}: Options & { client?: NetlifyAPI; message?: string }) {\n let client = customClient;\n if (!client) {\n const authToken = process.env.NETLIFY_AUTH_TOKEN;\n client = new NetlifyAPI(authToken!);\n }\n\n return client.deploy(siteId, buildDir, {\n statusCb: (statusObj) => {\n console.log(statusObj.msg);\n },\n ...configRest,\n });\n}\n\nexport async function deploy(configs: Options[]) {\n const authToken = process.env.NETLIFY_AUTH_TOKEN;\n if (!authToken) {\n fail(\n `Couldn't get deploy information. You need to set up an authentication \n token in your environment variables. \n See: https://gitlab.com/help/ci/variables/README#variables`\n );\n }\n try {\n const client = new NetlifyAPI(authToken!);\n let message;\n if (danger.gitlab) {\n message = danger.gitlab.mr.title;\n }\n const deployResults: DeployResult[] = [];\n for (const config of configs) {\n const result = await deploySite({\n client,\n message,\n draft: true,\n ...config,\n });\n deployResults.push(result);\n }\n\n const lastCommit = danger.git.commits[0];\n markdown(\n [\n \"## Deploy preview\",\n \"Deploy preview for *front10-ui* ready!\",\n `Built with commit ${lastCommit.sha}`,\n ...deployResults.map(\n (result, index) =>\n `${configs[index].label}: ${result.deploy.deploy_ssl_url}`\n ),\n ].join(`\\n\\n`)\n );\n } catch (e) {\n console.error(e);\n fail(`Couldn't get deploy information.`);\n }\n}\n","import { MarkdownString } from \"danger\";\nimport fs, { existsSync, lstatSync, readdirSync, readFileSync } from \"fs\";\nimport { fetch } from \"undici\";\nimport path from \"path\";\nimport zlib from \"zlib\";\n\ndeclare function markdown(message: MarkdownString): void;\n\ntype CompressionFormats = \"gzip\" | \"brotli\";\n\n/**\n * Generates a Markdown table\n * @param {string[]} headers\n * @param {string[][]} body\n */\nfunction generateMDTable(headers: string[], body: string[][]): string {\n const tableHeaders = [\n headers.join(\" | \"),\n headers.map(() => \" --- \").join(\" | \"),\n ];\n\n const tableBody = body.map((r) => r.join(\" | \"));\n return `${tableHeaders.join(\"\\n\")}\\n${tableBody.join(\"\\n\")}`;\n}\n\nexport interface BundleSizeOptions {\n formats?: CompressionFormats[];\n bundlesDir: string;\n getBundlesFn?: (bundleDir: string) => string[];\n renameFn?: (filename: string) => string;\n bundlePrefix?: string;\n reportPath?: string;\n baseBundleJob?: string;\n}\n\nfunction getDefaultGetBundlesFn(bundlePrefix: string) {\n return function defaultGetBundlesFn(bundlesDir: string) {\n return readdirSync(bundlesDir)\n .map((name) => path.join(bundlesDir, name))\n .filter((dirName) => lstatSync(dirName).isDirectory())\n .map((dirName) =>\n path.join(\n dirName,\n path.basename(dirName).replace(bundlePrefix, \"\") + \".bundle.js\"\n )\n );\n };\n}\n\nfunction defaultRenameFn(filename: string) {\n return filename\n .split(\".bundle.js\")[0]\n .replace(/--/g, \"-\")\n .split(\"-\")\n .map((e) => e[0].toUpperCase() + e.slice(1))\n .join(\" \")\n .replace(\"Mobile\", \"(mobile)\");\n}\n\ninterface BundleInfo {\n filename: string;\n sizes: number[];\n}\n\ninterface BundleSizeResult {\n gzip: boolean;\n brotli: boolean;\n bundles: BundleInfo[];\n}\n\nexport function bundleSizeResults({\n formats = [\"gzip\"],\n bundlesDir,\n renameFn = defaultRenameFn,\n getBundlesFn,\n bundlePrefix = \"cmp-mc-\",\n reportPath,\n}: BundleSizeOptions): BundleSizeResult {\n const getBundles = getBundlesFn ?? getDefaultGetBundlesFn(bundlePrefix);\n const files = getBundles(bundlesDir).filter(existsSync);\n\n const formatFilter = new Set(formats);\n const gzip = formatFilter.has(\"gzip\");\n const brotli = formatFilter.has(\"brotli\");\n\n const results = {\n gzip,\n brotli,\n bundles: files.map((filePath) => {\n const jsFile = readFileSync(filePath);\n const fileSizes = [\n jsFile,\n ...(gzip ? [zlib.gzipSync(jsFile)] : []),\n ...(brotli ? [zlib.brotliCompressSync(jsFile)] : []),\n ];\n\n return {\n filename: renameFn(path.basename(filePath)),\n sizes: fileSizes.map((file) => file.length),\n };\n }),\n };\n\n if (reportPath) {\n fs.writeFileSync(reportPath, JSON.stringify(results, null, 2));\n }\n\n return results;\n}\n\nfunction formatDiff(value: number) {\n let sizeString = (value / 1000).toFixed(1);\n if (sizeString === \"-0.0\") {\n sizeString = \"0.0\";\n }\n const size = Number(sizeString);\n let icon = \"\";\n if (size > 0) {\n icon = \"🔺+\";\n } else if (size < 0) {\n icon = \"🔻\";\n }\n return `${icon}${sizeString}k`;\n}\n\nexport async function bundleSize(options: BundleSizeOptions) {\n const results = bundleSizeResults(options);\n const { reportPath, baseBundleJob = \"publish\" } = options;\n\n let baseResults: BundleSizeResult | undefined;\n if (reportPath) {\n const projectId = process.env.CI_MERGE_REQUEST_PROJECT_ID;\n const authToken = process.env.DANGER_GITLAB_API_TOKEN as string;\n const targetBranch =\n process.env.CI_MERGE_REQUEST_TARGET_BRANCH_NAME || \"master\";\n const baseBundlesUrl = `https://gitlab.com/api/v4/projects/${projectId}/jobs/artifacts/${targetBranch}/raw/${reportPath}?job=${baseBundleJob}`;\n const baseResultsResponse = await fetch(baseBundlesUrl, {\n headers: { \"PRIVATE-TOKEN\": authToken },\n });\n if (baseResultsResponse.ok) {\n baseResults = await (baseResultsResponse.json() as Promise<\n BundleSizeResult\n >);\n }\n }\n\n let baseBundles: Map<string, number[]> = new Map();\n let diffHeaders: string[] = [];\n if (baseResults) {\n const { bundles, brotli, gzip } = baseResults;\n if (bundles) {\n bundles.forEach((bundle) => {\n baseBundles.set(bundle.filename, bundle.sizes);\n });\n }\n diffHeaders = [\n \"Filesize diff\",\n ...(gzip ? [\"Gzip diff\"] : []),\n ...(brotli ? [\"Brotli diff\"] : []),\n ];\n }\n\n const headers = [\n \"Module\",\n \"Filesize\",\n ...(results.gzip ? [\"Gzip size\"] : []),\n ...(results.brotli ? [\"Brotli size\"] : []),\n ...diffHeaders,\n ];\n\n const body = results.bundles.map((bundle) => {\n let diff: number[] = [];\n if (baseResults) {\n const { brotli, gzip } = baseResults;\n const baseBrotliIndex = brotli && !gzip ? 1 : 2;\n const brotliIndex = results.brotli && !results.gzip ? 1 : 2;\n if (baseBundles.has(bundle.filename)) {\n const baseBundle = baseBundles.get(bundle.filename)!;\n diff = [\n bundle.sizes[0] - baseBundle[0],\n ...(gzip && results.gzip ? [bundle.sizes[1] - baseBundle[1]] : []),\n ...(brotli && results.brotli\n ? [bundle.sizes[brotliIndex] - baseBundle[baseBrotliIndex]]\n : []),\n ];\n }\n }\n\n return [\n bundle.filename,\n ...bundle.sizes.map((size) => `${(size / 1000).toFixed(1)}k`),\n ...diff.map((size) => formatDiff(size)),\n ];\n });\n\n markdown([\"## Bundle size\", generateMDTable(headers, body)].join(\"\\n\\n\"));\n}\n","declare function markdown(message?: string): void;\nimport * as fs from \"fs\";\nimport { promisify } from \"util\";\n\nconst readFile = promisify(fs.readFile);\n\nexport async function lighthouse() {\n const content = await readFile(\".lighthouseci/links.json\");\n const links: Record<string, string> = JSON.parse(content.toString());\n\n const urlsToCheck = Object.entries(links);\n\n if (urlsToCheck.length === 0) {\n return;\n }\n\n markdown(\n [\n \"## Lighthouse report\",\n urlsToCheck\n .map(([pageUrl, reportUrl]) => {\n const pageDisplay = pageUrl.replace(\n /http:\\/\\/localhost:[0-9]*\\//,\n \"\"\n );\n return `- [${pageDisplay}](${reportUrl})`;\n })\n .join(\"\\n\"),\n ].join(\"\\n\\n\")\n );\n}\n"],"names":["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","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","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","globalThis","Function","deploySite","siteId","buildDir","customClient","client","configRest","authToken","process","env","NETLIFY_AUTH_TOKEN","NetlifyAPI","deploy","statusCb","statusObj","console","log","msg","configs","fail","danger","gitlab","message","mr","title","deployResults","config","draft","lastCommit","git","commits","markdown","sha","map","index","label","deploy_ssl_url","join","generateMDTable","headers","body","tableHeaders","tableBody","r","defaultRenameFn","filename","split","replace","e","toUpperCase","bundleSizeResults","bundlePrefix","formats","renameFn","getBundlesFn","reportPath","files","bundlesDir","readdirSync","path","filter","dirName","lstatSync","isDirectory","basename","existsSync","formatFilter","Set","gzip","has","brotli","results","bundles","filePath","jsFile","readFileSync","fileSizes","zlib","gzipSync","brotliCompressSync","sizes","file","fs","writeFileSync","JSON","stringify","formatDiff","sizeString","toFixed","size","Number","icon","options","baseBundleJob","projectId","CI_MERGE_REQUEST_PROJECT_ID","DANGER_GITLAB_API_TOKEN","targetBranch","CI_MERGE_REQUEST_TARGET_BRANCH_NAME","baseBundlesUrl","fetch","baseResultsResponse","ok","json","baseResults","baseBundles","Map","diffHeaders","bundle","set","diff","baseBrotliIndex","brotliIndex","baseBundle","get","readFile","promisify","links","parse","toString","urlsToCheck","entries","reportUrl"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readdirSync, lstatSync, readFile as readFile$1 } from 'fs';
|
|
3
|
-
import fetch from '
|
|
3
|
+
import { fetch } from 'undici';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import zlib from 'zlib';
|
|
6
6
|
import { promisify } from 'util';
|
|
@@ -138,6 +138,24 @@ var runtime = (function (exports) {
|
|
|
138
138
|
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
139
139
|
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
140
140
|
|
|
141
|
+
function define(obj, key, value) {
|
|
142
|
+
Object.defineProperty(obj, key, {
|
|
143
|
+
value: value,
|
|
144
|
+
enumerable: true,
|
|
145
|
+
configurable: true,
|
|
146
|
+
writable: true
|
|
147
|
+
});
|
|
148
|
+
return obj[key];
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
152
|
+
define({}, "");
|
|
153
|
+
} catch (err) {
|
|
154
|
+
define = function(obj, key, value) {
|
|
155
|
+
return obj[key] = value;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
141
159
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
142
160
|
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
143
161
|
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
@@ -190,9 +208,9 @@ var runtime = (function (exports) {
|
|
|
190
208
|
// This is a polyfill for %IteratorPrototype% for environments that
|
|
191
209
|
// don't natively support it.
|
|
192
210
|
var IteratorPrototype = {};
|
|
193
|
-
IteratorPrototype
|
|
211
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
194
212
|
return this;
|
|
195
|
-
};
|
|
213
|
+
});
|
|
196
214
|
|
|
197
215
|
var getProto = Object.getPrototypeOf;
|
|
198
216
|
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
@@ -206,18 +224,22 @@ var runtime = (function (exports) {
|
|
|
206
224
|
|
|
207
225
|
var Gp = GeneratorFunctionPrototype.prototype =
|
|
208
226
|
Generator.prototype = Object.create(IteratorPrototype);
|
|
209
|
-
GeneratorFunction.prototype =
|
|
210
|
-
|
|
211
|
-
GeneratorFunctionPrototype
|
|
212
|
-
|
|
227
|
+
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
228
|
+
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
229
|
+
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
230
|
+
GeneratorFunction.displayName = define(
|
|
231
|
+
GeneratorFunctionPrototype,
|
|
232
|
+
toStringTagSymbol,
|
|
233
|
+
"GeneratorFunction"
|
|
234
|
+
);
|
|
213
235
|
|
|
214
236
|
// Helper for defining the .next, .throw, and .return methods of the
|
|
215
237
|
// Iterator interface in terms of a single ._invoke method.
|
|
216
238
|
function defineIteratorMethods(prototype) {
|
|
217
239
|
["next", "throw", "return"].forEach(function(method) {
|
|
218
|
-
prototype
|
|
240
|
+
define(prototype, method, function(arg) {
|
|
219
241
|
return this._invoke(method, arg);
|
|
220
|
-
};
|
|
242
|
+
});
|
|
221
243
|
});
|
|
222
244
|
}
|
|
223
245
|
|
|
@@ -236,9 +258,7 @@ var runtime = (function (exports) {
|
|
|
236
258
|
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
237
259
|
} else {
|
|
238
260
|
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
239
|
-
|
|
240
|
-
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
241
|
-
}
|
|
261
|
+
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
242
262
|
}
|
|
243
263
|
genFun.prototype = Object.create(Gp);
|
|
244
264
|
return genFun;
|
|
@@ -320,9 +340,9 @@ var runtime = (function (exports) {
|
|
|
320
340
|
}
|
|
321
341
|
|
|
322
342
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
323
|
-
AsyncIterator.prototype
|
|
343
|
+
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
324
344
|
return this;
|
|
325
|
-
};
|
|
345
|
+
});
|
|
326
346
|
exports.AsyncIterator = AsyncIterator;
|
|
327
347
|
|
|
328
348
|
// Note that simple async functions are implemented on top of
|
|
@@ -508,20 +528,20 @@ var runtime = (function (exports) {
|
|
|
508
528
|
// unified ._invoke helper method.
|
|
509
529
|
defineIteratorMethods(Gp);
|
|
510
530
|
|
|
511
|
-
Gp
|
|
531
|
+
define(Gp, toStringTagSymbol, "Generator");
|
|
512
532
|
|
|
513
533
|
// A Generator should always return itself as the iterator object when the
|
|
514
534
|
// @@iterator function is called on it. Some browsers' implementations of the
|
|
515
535
|
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
516
536
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
517
537
|
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
518
|
-
Gp
|
|
538
|
+
define(Gp, iteratorSymbol, function() {
|
|
519
539
|
return this;
|
|
520
|
-
};
|
|
540
|
+
});
|
|
521
541
|
|
|
522
|
-
Gp
|
|
542
|
+
define(Gp, "toString", function() {
|
|
523
543
|
return "[object Generator]";
|
|
524
|
-
};
|
|
544
|
+
});
|
|
525
545
|
|
|
526
546
|
function pushTryEntry(locs) {
|
|
527
547
|
var entry = { tryLoc: locs[0] };
|
|
@@ -840,14 +860,19 @@ try {
|
|
|
840
860
|
} catch (accidentalStrictMode) {
|
|
841
861
|
// This module should not be running in strict mode, so the above
|
|
842
862
|
// assignment should always work unless something is misconfigured. Just
|
|
843
|
-
// in case runtime.js accidentally runs in strict mode,
|
|
863
|
+
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
864
|
+
// we can explicitly access globalThis. In older engines we can escape
|
|
844
865
|
// strict mode using a global Function call. This could conceivably fail
|
|
845
866
|
// if a Content Security Policy forbids using Function, but in that case
|
|
846
867
|
// the proper solution is to fix the accidental strict mode problem. If
|
|
847
868
|
// you've misconfigured your bundler to force strict mode and applied a
|
|
848
869
|
// CSP to forbid Function, and you're not willing to fix either of those
|
|
849
870
|
// problems, please detail your unique predicament in a GitHub issue.
|
|
850
|
-
|
|
871
|
+
if (typeof globalThis === "object") {
|
|
872
|
+
globalThis.regeneratorRuntime = runtime;
|
|
873
|
+
} else {
|
|
874
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
875
|
+
}
|
|
851
876
|
}
|
|
852
877
|
});
|
|
853
878
|
|
|
@@ -1046,7 +1071,7 @@ function bundleSize(_x) {
|
|
|
1046
1071
|
|
|
1047
1072
|
function _bundleSize() {
|
|
1048
1073
|
_bundleSize = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(options) {
|
|
1049
|
-
var results, reportPath, _options$baseBundleJo, baseBundleJob, baseResults, projectId, authToken, targetBranch, baseBundlesUrl, baseBundles, diffHeaders, _baseResults, bundles, brotli, gzip, headers, body;
|
|
1074
|
+
var results, reportPath, _options$baseBundleJo, baseBundleJob, baseResults, projectId, authToken, targetBranch, baseBundlesUrl, baseResultsResponse, baseBundles, diffHeaders, _baseResults, bundles, brotli, gzip, headers, body;
|
|
1050
1075
|
|
|
1051
1076
|
return runtime_1.wrap(function _callee$(_context) {
|
|
1052
1077
|
while (1) {
|
|
@@ -1056,7 +1081,7 @@ function _bundleSize() {
|
|
|
1056
1081
|
reportPath = options.reportPath, _options$baseBundleJo = options.baseBundleJob, baseBundleJob = _options$baseBundleJo === void 0 ? "publish" : _options$baseBundleJo;
|
|
1057
1082
|
|
|
1058
1083
|
if (!reportPath) {
|
|
1059
|
-
_context.next =
|
|
1084
|
+
_context.next = 14;
|
|
1060
1085
|
break;
|
|
1061
1086
|
}
|
|
1062
1087
|
|
|
@@ -1069,14 +1094,23 @@ function _bundleSize() {
|
|
|
1069
1094
|
headers: {
|
|
1070
1095
|
"PRIVATE-TOKEN": authToken
|
|
1071
1096
|
}
|
|
1072
|
-
}).then(function (response) {
|
|
1073
|
-
return response.json();
|
|
1074
1097
|
});
|
|
1075
1098
|
|
|
1076
1099
|
case 9:
|
|
1100
|
+
baseResultsResponse = _context.sent;
|
|
1101
|
+
|
|
1102
|
+
if (!baseResultsResponse.ok) {
|
|
1103
|
+
_context.next = 14;
|
|
1104
|
+
break;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
_context.next = 13;
|
|
1108
|
+
return baseResultsResponse.json();
|
|
1109
|
+
|
|
1110
|
+
case 13:
|
|
1077
1111
|
baseResults = _context.sent;
|
|
1078
1112
|
|
|
1079
|
-
case
|
|
1113
|
+
case 14:
|
|
1080
1114
|
baseBundles = new Map();
|
|
1081
1115
|
diffHeaders = [];
|
|
1082
1116
|
|
|
@@ -1117,7 +1151,7 @@ function _bundleSize() {
|
|
|
1117
1151
|
});
|
|
1118
1152
|
markdown(["## Bundle size", generateMDTable(headers, body)].join("\n\n"));
|
|
1119
1153
|
|
|
1120
|
-
case
|
|
1154
|
+
case 20:
|
|
1121
1155
|
case "end":
|
|
1122
1156
|
return _context.stop();
|
|
1123
1157
|
}
|