From 0f5180acbdeeda5edb468ef3a44d195a97b56093 Mon Sep 17 00:00:00 2001 From: Alex Layton Date: Wed, 28 Apr 2021 16:14:13 -0400 Subject: [PATCH] Use yarn.BUILD for building services --- oada/.yarn/plugins/@ojkelly/plugin-build.cjs | 8 ++++++++ oada/.yarnrc.yml | 2 ++ oada/Dockerfile | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 oada/.yarn/plugins/@ojkelly/plugin-build.cjs diff --git a/oada/.yarn/plugins/@ojkelly/plugin-build.cjs b/oada/.yarn/plugins/@ojkelly/plugin-build.cjs new file mode 100644 index 00000000..5bacc4ca --- /dev/null +++ b/oada/.yarn/plugins/@ojkelly/plugin-build.cjs @@ -0,0 +1,8 @@ +/* eslint-disable */ +module.exports = { +name: "@ojkelly/plugin-build", +factory: function (require) { +var plugin;plugin=(()=>{var e={131:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>G});const r=require("@yarnpkg/cli"),o=require("@yarnpkg/core"),s=require("@yarnpkg/libzip"),i=require("@yarnpkg/fslib"),a=require("clipanion"),u=require("path");var c=n.n(u),l=function(e,t,n,r){var o,s=arguments.length,i=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,n,i):o(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i};class d extends r.BaseCommand{constructor(){super(...arguments),this.json=!1,this.archiveName="bundle.zip",this.exclude=[]}async removeUnusedPackages(e,t,n){const{project:s,workspace:a}=await o.Project.find(n,t);if(!a)throw new r.WorkspaceRequiredError(s.cwd,t);const u=new Set([a]);for(const e of u)for(const t of o.Manifest.hardDependencies)for(const n of e.manifest.getForScope(t).values()){const e=s.tryWorkspaceByDescriptor(n);null!==e&&u.add(e)}for(const t of s.workspaces)u.has(t)||t.cwd!==e&&await i.xfs.removePromise(t.cwd)}async removeExcluded(e,t){const n=e+"/.git";try{await i.xfs.lstatPromise(n)&&await i.xfs.removePromise(n)}catch(e){}await t.map(async t=>{t.startsWith(e)&&await i.xfs.lstatPromise(t)&&await i.xfs.removePromise(t)})}async execute(){return await i.xfs.mktempPromise(async e=>{var t,n,a,u;const l=""+this.context.cwd,d=i.ppath.join(l,this.archiveName),p=await o.Configuration.find(this.context.cwd,this.context.plugins);if(null===p.projectCwd)throw new Error("Can't find project directory");const f=l.replace(p.projectCwd,""),m=new i.NodeFS;await i.xfs.copyPromise(e,p.projectCwd,{baseFs:m});const g=`${e}${f}`,v=this.exclude,b=`${g}/${this.archiveName}`;try{await i.xfs.lstatPromise(b)&&v.push(b)}catch(e){}await this.removeExcluded(e,v);const y=await o.Configuration.find(g,this.context.plugins),w=await o.Cache.find(y);await this.removeUnusedPackages(e,g,y);const{project:C,workspace:R}=await o.Project.find(y,g);if(!R)throw new r.WorkspaceRequiredError(C.cwd,g);const _=new Set([R]);for(const e of _)for(const t of o.Manifest.hardDependencies)for(const n of e.manifest.getForScope(t).values()){const e=C.tryWorkspaceByDescriptor(n);null!==e&&_.add(e)}for(const e of C.workspaces)e.manifest.devDependencies.clear(),_.has(e)||(e.manifest.dependencies.clear(),e.manifest.peerDependencies.clear());if(null===(n=null===(t=null==R?void 0:R.manifest)||void 0===t?void 0:t.raw)||void 0===n?void 0:n.main){const t=R.relativeCwd+c().sep+(null===(u=null===(a=null==R?void 0:R.manifest)||void 0===a?void 0:a.raw)||void 0===u?void 0:u.main),n="./.pnp.js";i.xfs.writeFilePromise(`${e}${c().sep}entrypoint.js`,h(t,n))}return(await o.StreamReport.start({configuration:y,json:this.json,stdout:this.context.stdout,includeLogs:!0},async t=>{await C.install({cache:w,report:t}),t.reportInfo(null,"Getting libzip");const n=await(0,s.getLibzipPromise)();t.reportInfo(null,"Creating archive");const r=new i.ZipFS(d,{create:!0,libzip:n});t.reportInfo(null,"Copying files to archive"),await r.copyPromise("bundle",e,{baseFs:m}),r.saveAndClose(),t.reportJson({name:"ArchiveSuccess",message:"Archive created successfuly at ",outputArchive:d})})).exitCode()})}}d.usage=a.Command.Usage({category:"Build commands",description:"bundle a workspace package into a deployable archive",details:"\n This command will bundle up the source of the target package along with\n its dependencies into an archive.\n\n This is designed to be used for deployment, not for publishing, so\n everything to run except for a runtime (ie node) is bundled into\n the archive.\n\n Call this after you have run your build step (if any).\n\n This is designed to work best with zero-install configurations. If you\n don't have that, run `yarn install` before this command.\n\n Why not just compile like we do on the front-end?\n Some dependencies may use require in interesting ways, or be or call\n binaries. It's safest not to transpile them.\n\n If the `--json` flag is set the output will follow a JSON-stream output\n also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n\n `-o,--output-directory` sets the output directory.\n\n `-a,--archive-name` sets the name of the archive. Any files matching\n this, will be excluded from subsequent archives. Defaults to ./bundle.tgz\n "}),l([a.Command.Boolean("--json")],d.prototype,"json",void 0),l([a.Command.String("-o,--output-directory")],d.prototype,"outputDirectory",void 0),l([a.Command.String("-a,--archive-name")],d.prototype,"archiveName",void 0),l([a.Command.Array("--exclude")],d.prototype,"exclude",void 0),l([a.Command.Path("bundle")],d.prototype,"execute",null);const h=(e,t)=>`\n"use strict";\n\nconst pnp = require("${t}").setup();\n\nconst index = require("./${e}");\n\nObject.defineProperty(exports, "__esModule", { value: true });\n\nexports.default = index;\n`,p=require("yup"),f=require("@yarnpkg/parsers"),m=p.number().integer().moreThan(0);async function g(e){return await async function(e){let t={};const n=i.ppath.join(e.projectCwd||e.startingCwd,".yarnbuildrc.yml");if(i.xfs.existsSync(n)){const e=await i.xfs.readFilePromise(n,"utf8");try{t=(0,f.parseSyml)(e)}catch(t){let r="";throw e.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(r=" (in particular, make sure you list the colons after each key name)"),new Error(`Parse error when loading ${n}; please check it's proper Yaml${r}`)}}return p.object().shape({commands:p.object().shape({build:p.string().default("build"),test:p.string().default("test"),dev:p.string().default("dev")}),folders:p.object().shape({input:p.string().default("."),output:p.string().default("build")}),enableBetaFeatures:p.object().shape({folderConfiguration:p.boolean().default(!0),targetedBuilds:p.boolean().default(!1)}),maxConcurrency:m}).validate(t)}(e)}var v=n(820),b=n.n(v);const y=require("os"),w=require("events");var C=n(103),R=n(299),_=n.n(R),k=n(344),I=n(106),x=n.n(I),S=n(285),P=n.n(S);class E{constructor(){this.nodes={},this.size=0,this.runSize=0,this.ran=new Set}addNode(e){if(this.nodes[e])return this.nodes[e];const t=new j(e,this);return this.nodes[e]=t,this.size++,t}getNode(e){if(this.nodes[e])return this.nodes[e]}resetRuns(){this.ran=new Set}async resolve(e){const t=new Set,n=new Set;await this.resolveNode(e,t,n)}async resolveNode(e,t,n){n.add(e.id);for(const r of e.dependencies)if(!t.has(r.id)){if(n.has(r.id))throw new O(`${e.id} has a cyclic dependency on ${r.id}`);await this.resolveNode(r,t,n)}t.add(e.id),n.delete(e.id)}async run(e){const t=new Set,n=new Set,r={};for(const n of e)this.resolveQueue(n,t,r);return await new Promise(e=>{this.workLoop(t,r,n,e)}),r}workLoop(e,t,n,r){0!==e.size&&e.forEach(r=>{var o,s;r.canStart(t)&&((null===(o=null==r?void 0:r.node)||void 0===o?void 0:o.runCallback)?(null===(s=null==r?void 0:r.node)||void 0===s||s.runCallback(t),n.add(r.node)):t[r.node.id]={success:!0,done:!0},e.delete(r))}),n.forEach((e,r)=>{t[e.id].done&&n.delete(r)}),Object.keys(t).map(e=>{var n,r;return null===(r=null===(n=t[e])||void 0===n?void 0:n.done)||void 0===r||r}).every(e=>!0===e)?r():setTimeout(()=>this.workLoop(e,t,n,r),30)}resolveQueue(e,t,n){const r=[];for(const o of e.dependencies)if(r.push(o.id),!n[o.id]&&o.runCallback){n[o.id]=Object.assign({},E.RunLogInit);const e=this.resolveQueue(o,t,n),r={node:o,canStart:E.QueueItemCanStart(e)};t.add(r)}if(!n[e.id]&&e.runCallback){n[e.id]=Object.assign({},E.RunLogInit);const o={node:e,canStart:E.QueueItemCanStart(r)};t.add(o)}return r}}E.RunLogInit={success:!1,done:!1},E.QueueItemCanStart=e=>t=>e.map(e=>{var n,r;return null===(r=null===(n=t[e])||void 0===n?void 0:n.done)||void 0===r||r}).every(e=>!0===e);class j{constructor(e,t){this.id=e,this.dependencies=[],this.graph=t}addDependency(e){return this.dependencies.push(e),this}addWorkSpace(e){return this.workspace=e,this}addRunCallback(e){return this.runCallback||(this.runCallback=t=>e().then(e=>{t[this.id]={done:!0,success:e}}),this.graph.runSize++),this}}class O extends Error{constructor(e){super(e),this.name="CyclicDependencyError",this.code="YN0003"}}const T="[";class ${static pad(e=1){for(let t=0;t{process.stdin.setRawMode(!0),process.stdin.once("data",t=>{process.stdin.setRawMode(!1),process.stdin.pause();const[n,r]=t.slice(2,t.length-1).toString().split(";").map(Number);e({x:r,y:n})}),process.stdout.write("")})}static setScrollableRegion(e,t){process.stdout.write(`[${e};${t}r`)}static resetScrollableRegion(){process.stdout.write("")}static moveTo(e){process.stdout.write(`[${e.y};${e.x}H`)}static cursorHome(){process.stdout.write("")}static alternateScreen(){process.stdout.write("[?1049h")}static mainScreen(){process.stdout.write("[?1049l")}static linesRequired(e,t){var n;const r=new RegExp(`([^\n]{0,${t}})(\n)?`,"gm");return(null!==(n=x()(e).match(r))&&void 0!==n?n:[""]).length-1}}$.row=0,$.column=0;const M="-".repeat(80);var B,L;!function(e){e.pending="pending",e.inProgress="inProgress",e.failed="failed",e.succeeded="succeeded"}(B||(B={})),function(e){e.pending="pending",e.start="start",e.info="info",e.error="error",e.success="success",e.fail="fail",e.finish="finish"}(L||(L={}));const D=async(e,t)=>{let n=0;const r=await i.xfs.readdirPromise(e);return await Promise.all(r.map(async r=>{const o=`${e}${c().sep}${r}`;if(t&&o.startsWith(t))return;const s=await i.xfs.statPromise(o);if(s.isFile()&&s.mtimeMs>n&&(n=s.mtimeMs),s.isDirectory()){const e=await D(o,t);e>n&&(n=e)}})),n},U=(e,t)=>{let n=Math.abs(t-e),r="";const o=Math.trunc(n/6e4);return o&&(r+=o+"m",n-=6e4*o),n&&(o&&(r+=" "),r+=(n/1e3).toFixed(2)+"s"),r};const N=class{constructor({project:e,report:t,runCommand:n,cli:r,configuration:s,pluginConfiguration:a,dryRun:u,ignoreRunCache:c,verbose:l,concurrency:d}){this.runGraph=new E,this.runLength=0,this.runTargets=[],this.runMutexes={},this.dryRun=!1,this.ignoreRunCache=!1,this.verbose=!1,this.entrypoints=[],this.runReporter=new w.EventEmitter,this.runReport={mutex:new k.W,totalJobs:0,previousOutput:"",successCount:0,failCount:0,workspaces:{},done:!1},this.nextUnitOfWork=[],this.hasSetup=!1,this.setupRunReporter=()=>{this.runReporter.on(L.pending,(e,t)=>{this.runReport.mutex.acquire().then(n=>{this.runReport.workspaces[e]={name:t,stdout:[],stderr:[],done:!1,fail:!1},n()})}),this.runReporter.on(L.start,(e,t,n)=>{this.runReport.mutex.acquire().then(r=>{this.runReport.workspaces[e]=Object.assign(Object.assign({},this.runReport.workspaces[e]),{start:Date.now(),runScript:n,name:t}),r()})}),this.runReporter.on(L.info,(e,t)=>{this.runReport.mutex.acquire().then(n=>{this.runReport.workspaces[e].stdout.push(t),n()})}),this.runReporter.on(L.error,(e,t)=>{this.runReport.mutex.acquire().then(n=>{this.runReport.workspaces[e].stderr.push(t),this.logError(`${e} ${t}`),n()})}),this.runReporter.on(L.success,e=>{this.runReport.mutex.acquire().then(t=>{this.runReport.workspaces[e]=Object.assign(Object.assign({},this.runReport.workspaces[e]),{done:!0}),this.runReport.successCount++,t()})}),this.runReporter.on(L.fail,(e,t)=>{this.runReport.mutex.acquire().then(n=>{this.runReport.workspaces[e].stderr.push(t),this.runReport.workspaces[e].done=!0,this.runReport.workspaces[e].fail=!0,this.runReport.failCount++,this.logError(`${e} ${t}`),n()})})},this.plan=async e=>{var t,n,r,s,i;const a=this.runGraph.addNode(e.relativeCwd).addWorkSpace(e);let u=!1;this.runMutexes[e.relativeCwd]=new k.W;for(const t of o.Manifest.hardDependencies)for(const n of e.manifest.getForScope(t).values()){const e=this.project.tryWorkspaceByDescriptor(n);if(null===e)continue;const t=this.runGraph.addNode(e.relativeCwd).addWorkSpace(e);a.addDependency(t);const r=await this.plan(e);let o=!1;e!==this.project.topLevelWorkspace&&(o=await this.checkIfRunIsRequired(e)),(o||r)&&(u=!0,t.addRunCallback(this.createRunItem(e)))}let c=!1;if(e!==this.project.topLevelWorkspace&&(c=await this.checkIfRunIsRequired(e)),this.runReporter.emit(L.pending,e.relativeCwd),u||c)return this.runReporter.emit(L.pending,e.relativeCwd,`${(null===(t=e.manifest.name)||void 0===t?void 0:t.scope)?`@${null===(n=e.manifest.name)||void 0===n?void 0:n.scope}/`:""}${null===(r=e.manifest.name)||void 0===r?void 0:r.name}`),a.addRunCallback(this.createRunItem(e)),!0;{const t=null===(s=this.runLog)||void 0===s?void 0:s.get(`${e.relativeCwd}#${this.runCommand}`);t&&(null===(i=this.runLog)||void 0===i||i.set(`${e.relativeCwd}#${this.runCommand}`,{lastModified:t.lastModified,status:B.succeeded,haveCheckedForRerun:!0,rerun:!1,command:this.runCommand}))}return!1},this.run=async()=>{var e,t;if(!1===this.hasSetup)throw new Error("RunSupervisor is not setup, you need to call await supervisor.setup()");if(this.runReport.runStart=Date.now(),this.dryRun||b()||($.pad(this.concurrency+3),this.raf(this.waitUntilDone)),this.dryRun)return;this.currentRunTarget=this.runTargets.length>1?"All":null!==(t=null===(e=this.runTargets[0])||void 0===e?void 0:e.relativeCwd)&&void 0!==t?t:"Nothing to run",b()||process.stderr.write("\n");const n=this.generateHeaderString();await this.runGraph.run(this.entrypoints);const r=await this.runReport.mutex.acquire();if(this.runReport.done=!0,r(),b()||($.cursorUp($.linesRequired(this.runReport.previousOutput,process.stdout.columns)),$.clearScreenDown()),0!==this.runReport.failCount){const e=[];process.stdout.write(this.formatHeader(n)+"\n");for(const t in this.runReport.workspaces){const n=this.runReport.workspaces[t];n.fail&&e.push(t);let r=!1;if(0!==n.stdout.length){r=!0;const e=this.formatHeader("Output: "+this.configuration.format(t,o.FormatType.PATH),2);process.stdout.write(e+"\n"),n.stdout.forEach(e=>{e.split("\n").forEach(e=>{0!==e.length&&process.stdout.write(e+"\n")})})}if(0!==n.stderr.length){r=!0;const e="[stderr]";process.stderr.write(e+"\n"),n.stderr.forEach(e=>{(e instanceof Error?e.toString():""+e).split("\n").forEach(e=>{0!==e.length&&process.stderr.write(e+"\n")})})}r&&process.stdout.write(this.grey(M)+"\n")}if(e.length>0){const t=this.grey(`ERROR for script ${n}\nThe following packages returned an error.\n`);process.stderr.write(t),e.forEach(e=>{const t="- "+this.configuration.format(e,o.FormatType.PATH);process.stderr.write(t+"\n")})}process.stderr.write(this.grey("Search `Output: path` to find the start of the output.\n"))}const s=this.generateFinalReport();return process.stdout.write(s),await this.saveRunLog(),0===this.runReport.failCount},this.raf=e=>{setImmediate(()=>e(Date.now()))},this.waitUntilDone=e=>{if(this.runReport.done)return;const t=this.generateProgressString(e);var n;$.cursorUp($.linesRequired(this.runReport.previousOutput,process.stdout.columns)),$.clearScreenDown(),process.stdout.write(t),this.runReport.previousOutput=t,(n=90,new Promise(e=>setTimeout(e,n))).then(()=>{this.raf(this.waitUntilDone)})},this.grey=e=>this.configuration.format(e,"grey"),this.generateRunCountString=e=>{let t="";if(this.runReport.runStart){const n=this.configuration.format(""+this.runReport.successCount,"green"),r=this.configuration.format(""+this.runReport.failCount,"red"),o=this.configuration.format(""+this.runGraph.runSize,"grey");t+=this.formatHeader(`${n}${this.grey(":")}${r}${this.grey("/")}${o} ${U(this.runReport.runStart,e)}`)+"\n"}return t},this.generateFinalReport=()=>{var e;const t=this.formatHeader(`${this.configuration.format(this.runCommand+" finished",0===this.runReport.failCount?"green":"red")}${0!=this.runReport.failCount?this.configuration.format(` with ${this.runReport.failCount} errors`,"red"):""}`)+"\n";let n=this.formatHeader("Summary")+"\n";if(this.runReport.runStart){n+=this.configuration.format("Success: "+this.runReport.successCount,"green")+"\n"+this.configuration.format("Fail:"+this.runReport.failCount,"red")+"\n"+this.configuration.format("Total: "+this.runGraph.runSize,"grey")+"\n"+this.grey("---")+"\n"}let r=50;for(const t in this.runReport.workspaces){r+=null!==(e=this.runReport.workspaces[t].runtimeSeconds)&&void 0!==e?e:0}if(this.runReport.runStart&&this.runGraph.runSize>1){const e=r,t=Date.now()-this.runReport.runStart,o=U(t,e);b()||(n+=this.grey(`Cumulative: (cpu): ${U(0,r)}\n`),n+=this.grey(`Saved: ${o}\n`))}return this.runReport.runStart&&(n+=this.grey("Runtime (wall): ")+U(Date.now(),this.runReport.runStart)+"\n"),n+=t,n},this.createRunItem=e=>async()=>await this.limit(async()=>{var t,n,r,o,s,i,a;const u=e.relativeCwd,c=e.manifest.scripts.get(this.runCommand),l=null===(t=this.runLog)||void 0===t?void 0:t.get(`${e.relativeCwd}#${this.runCommand}`);if(this.runReporter.emit(L.start,e.relativeCwd,`${(null===(n=e.manifest.name)||void 0===n?void 0:n.scope)?`@${null===(r=e.manifest.name)||void 0===r?void 0:r.scope}/`:""}${null===(o=e.manifest.name)||void 0===o?void 0:o.name}`,c),!c)return this.verbose&&this.runReporter.emit(L.info,e.relativeCwd,`Missing \`${this.runCommand}\` script in manifest.`),this.runReporter.emit(L.success,e.relativeCwd),!0;try{if(0!==await this.cli(this.runCommand,e.cwd,this.runReporter,u))return this.runReporter.emit(L.fail,e.relativeCwd),null===(s=this.runLog)||void 0===s||s.set(`${e.relativeCwd}#${this.runCommand}`,{lastModified:null==l?void 0:l.lastModified,status:B.failed,haveCheckedForRerun:!0,rerun:!1,command:this.runCommand}),!1;null===(i=this.runLog)||void 0===i||i.set(`${e.relativeCwd}#${this.runCommand}`,{lastModified:null==l?void 0:l.lastModified,status:B.succeeded,haveCheckedForRerun:!0,rerun:!1,command:this.runCommand}),this.runReporter.emit(L.success,e.relativeCwd)}catch(t){return this.runReporter.emit(L.fail,e.relativeCwd,t),null===(a=this.runLog)||void 0===a||a.set(`${e.relativeCwd}#${this.runCommand}`,{lastModified:null==l?void 0:l.lastModified,status:B.failed,haveCheckedForRerun:!0,rerun:!1,command:this.runCommand}),!1}return!0});const h=null!=d?d:Math.max(1,(0,y.cpus)().length);this.configuration=s,this.pluginConfiguration=a,this.project=e,this.report=t,this.runCommand=n,this.cli=r,this.dryRun=u,this.ignoreRunCache=c,this.verbose=l,this.concurrency=h,this.limit=_()(h),this.queue=new C.Z({concurrency:h,carryoverConcurrencyCount:!0,timeout:5e4,throwOnTimeout:!0,autoStart:!0}),this.verbose&&(this.errorLogFile=i.xfs.createWriteStream(this.getRunErrorPath(),{flags:"a"}))}async setup(){this.runLog=await this.readRunLog(),this.setupRunReporter(),this.hasSetup=!0}getRunErrorPath(){return i.ppath.resolve(this.project.cwd,"yarn.build-error.log")}getRunLogPath(){return i.ppath.resolve(this.project.cwd,".yarn","yarn.build.json")}async readRunLog(){const e=new Map;try{const t=await i.xfs.readJsonPromise(this.getRunLogPath());if(t&&t.packages)for(const n in t.packages)e.set(n,{lastModified:t.packages[n].lastModified,status:t.packages[n].status,haveCheckedForRerun:!1,rerun:!0,command:this.runCommand})}catch(e){}return e}async saveRunLog(){if(!this.runLog)return;let e;try{e=await i.xfs.readJsonPromise(this.getRunLogPath())}catch(e){}const t={comment:"This is an auto-generated file, it keeps track of whats been built. This is a local file, don't store this in version control.",packages:Object.assign({},e&&e.packages)};for(const[e,n]of this.runLog)n.status===B.succeeded&&(t.packages[e]=Object.assign(Object.assign({},t.packages[e]),this.runLog.get(e)));await i.xfs.writeJsonPromise(this.getRunLogPath(),t)}logError(e){this.verbose&&process.stderr.write(x()(e)+"\n")}async addRunTarget(e){this.entrypoints.push(this.runGraph.addNode(e.relativeCwd));await this.plan(e)&&this.runTargets.push(e)}async checkIfRunIsRequired(e){var t,n,r,o,s;if(!0===this.ignoreRunCache)return!0;let a=!1;const u=i.ppath.resolve(e.project.cwd,e.relativeCwd);let l,d;this.pluginConfiguration.enableBetaFeatures.folderConfiguration&&((null===(t=null==e?void 0:e.manifest)||void 0===t?void 0:t.raw["yarn.build"])&&"string"==typeof(null==e?void 0:e.manifest.raw["yarn.build"].output)?l=`${u}${c().sep}${null==e?void 0:e.manifest.raw["yarn.build"].output}`:this.pluginConfiguration.folders.output?l=`${u}${c().sep}${this.pluginConfiguration.folders.output}`:(null==e?void 0:e.manifest.raw.main)&&(l=`${u}${c().sep}${null==e?void 0:e.manifest.raw.main.substring(0,null==e?void 0:e.manifest.raw.main.lastIndexOf(c().sep))}`),(null===(n=null==e?void 0:e.manifest)||void 0===n?void 0:n.raw["yarn.build"])&&"string"==typeof(null==e?void 0:e.manifest.raw["yarn.build"].input)?d=`${u}${c().sep}${null==e?void 0:e.manifest.raw["yarn.build"].input}`:this.pluginConfiguration.folders.input&&(d=`${u}${c().sep}${this.pluginConfiguration.folders.input}`)),(null==d?void 0:d.endsWith("/."))&&(d=d.substring(0,d.length-2));const h=await this.runReport.mutex.acquire();try{const t=null===(r=this.runLog)||void 0===r?void 0:r.get(`${e.relativeCwd}#${this.runCommand}`);if(null==t?void 0:t.haveCheckedForRerun)return null===(o=null==t?void 0:t.rerun)||void 0===o||o;const n=await D(null!=d?d:u,l);(null==t?void 0:t.lastModified)!==n&&(a=!0),null===(s=this.runLog)||void 0===s||s.set(`${e.relativeCwd}#${this.runCommand}`,{lastModified:n,status:a?B.succeeded:B.pending,haveCheckedForRerun:!0,rerun:a,command:this.runCommand})}catch(t){this.logError(`${e.relativeCwd}: failed to get lastModified (${t})`)}finally{h()}return a}formatHeader(e,t=0){const n=`${this.grey("-".repeat(t)+"[")} ${e} ${this.grey("]")}`,r=x()(n).length;return n+this.grey("-".repeat(80-r))}generateHeaderString(){return`${this.configuration.format(""+this.runCommand,o.FormatType.CODE)} for ${this.configuration.format(this.currentRunTarget?this.currentRunTarget:"",o.FormatType.SCOPE)}${this.dryRun?this.configuration.format(" --dry-run",o.FormatType.NAME):""}`}generateProgressString(e){let t="";const n=e=>this.grey(`[${e}]`),r=this.configuration.format("IDLE","grey");t+=this.formatHeader(this.generateHeaderString())+"\n";let s=1;for(const r in this.runReport.workspaces){const i=this.runReport.workspaces[r];if(!i||!i.start||i.done)continue;this.runReport.runStart&&(this.runReport.workspaces[r].runtimeSeconds=e-this.runReport.runStart);const a=this.configuration.format(r,o.FormatType.PATH),u=this.configuration.format(`(${i.runScript})`,o.FormatType.REFERENCE),c=i.start?this.configuration.format(U(i.start,e),o.FormatType.RANGE):"",l=n(s++),d=" ".repeat(l.length-1),h=this.configuration.format(i.name,o.FormatType.NAME);let p=`${l} ${a}${h} ${u} ${c}\n`,f="",m="",g="";x()(p).length>=process.stdout.columns&&(f=`${l} ${a}${h}\n`,m=`${d} ${u} ${c}\n`,x()(f).length>=process.stdout.columns&&(f=P()(`${l} ${a}\n`,0,process.stdout.columns),m=P()(`${d} ${h}\n`,0,process.stdout.columns),g=P()(`${d} ${u} ${c}\n`,0,process.stdout.columns)),p=f+m+g),t+=p}for(;s{const n=[];for(const r of e.workspacesCwds){const e=t.workspacesByCwd.get(r);e&&n.push(e,...A(e,t))}return n},q=async({targetWorkspace:e,project:t,supervisor:n})=>{if(0!==e.workspacesCwds.size){const r=A(e,t);for(const e of r){for(const r of o.Manifest.hardDependencies)for(const o of e.manifest.getForScope(r).values()){const e=t.tryWorkspaceByDescriptor(o);null!==e&&await n.addRunTarget(e)}await n.addRunTarget(e)}await n.addRunTarget(e)}else await n.addRunTarget(e)};var F=function(e,t,n,r){var o,s=arguments.length,i=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,n,i):o(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i};class z extends r.BaseCommand{constructor(){super(...arguments),this.json=!1,this.buildCommand="build",this.parallel=!0,this.interlaced=!1,this.verbose=!1,this.dryRun=!1,this.ignoreBuildCache=!1,this.buildTarget=[],this.buildLog={}}async execute(){const e=await o.Configuration.find(this.context.cwd,this.context.plugins),t=await g(e),n=void 0===this.maxConcurrency?t.maxConcurrency:parseInt(this.maxConcurrency);return(await o.StreamReport.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!0},async r=>{let s=this.context.cwd;t.enableBetaFeatures.targetedBuilds&&"string"==typeof this.buildTarget[0]&&(s=`${e.projectCwd}${c().sep}${this.buildTarget[0]}`);const{project:i,workspace:a}=await o.Project.find(e,s),u=a||i.topLevelWorkspace,l=new N({project:i,configuration:e,pluginConfiguration:t,report:r,runCommand:this.buildCommand,cli:async(e,t,n,r)=>{const s=new o.miscUtils.BufferStream;s.on("data",e=>null==n?void 0:n.emit(L.info,r,e&&e.toString()));const i=new o.miscUtils.BufferStream;i.on("data",e=>null==n?void 0:n.emit(L.error,r,e&&e.toString()));try{const n=await this.cli.run(["run",e],{cwd:t,stdout:s,stderr:i})||0;return s.end(),i.end(),n}catch(e){s.end(),i.end()}return 2},dryRun:this.dryRun,ignoreRunCache:this.ignoreBuildCache,verbose:this.verbose,concurrency:n});await l.setup(),await q({targetWorkspace:u,project:i,supervisor:l});!1===await l.run()&&r.reportError(o.MessageName.BUILD_FAILED,"Build failed")})).exitCode()}}z.schema=p.object().shape({maxConcurrency:m}),z.usage=a.Command.Usage({category:"Build commands",description:"build a package and all its dependencies",details:'\n In a monorepo with internal packages that depend on others, this command\n will traverse the dependency graph and efficiently ensure, the packages\n are built in the right order.\n\n `-c,--build-command` is the command to be run in each package (if available), defaults to "build"\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn\n will print the lines from the output as it receives them.\n Parallel defaults to true.\n\n If `-i,--interlaced` wasn\'t set, it would instead buffer the output\n from each process and print the resulting buffers only after their\n source processes have exited. Defaults to false.\n\n If the `--verbose` flag is set, more information will be logged to stdout than normal.\n If the `--dry-run` flag is set, it will simulate running a build, but not actually run it.\n\n If the `--json` flag is set the output will follow a JSON-stream output\n also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n\n If the `--ignore-cache` flag is set, every package will be built,\n regardless of whether is has changed or not.\n\n `-m,--max-concurrency` is the maximum number of builds that can run at a time,\n defaults to the number of logical CPUs on the current machine. Will override the global config option.\n '}),F([a.Command.Boolean("--json")],z.prototype,"json",void 0),F([a.Command.String("-c,--build-command")],z.prototype,"buildCommand",void 0),F([a.Command.Boolean("-p,--parallel")],z.prototype,"parallel",void 0),F([a.Command.Boolean("-i,--interlaced")],z.prototype,"interlaced",void 0),F([a.Command.Boolean("-v,--verbose")],z.prototype,"verbose",void 0),F([a.Command.Boolean("-d,--dry-run")],z.prototype,"dryRun",void 0),F([a.Command.Boolean("--ignore-cache")],z.prototype,"ignoreBuildCache",void 0),F([a.Command.String("-m,--max-concurrency")],z.prototype,"maxConcurrency",void 0),F([a.Command.Rest()],z.prototype,"buildTarget",void 0),F([a.Command.Path("build")],z.prototype,"execute",null);var W=function(e,t,n,r){var o,s=arguments.length,i=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,n,i):o(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i};class H extends r.BaseCommand{constructor(){super(...arguments),this.json=!1,this.verbose=!1,this.ignoreTestCache=!1,this.runTarget=[],this.runLog={}}async execute(){const e=await o.Configuration.find(this.context.cwd,this.context.plugins),t=await g(e),n=void 0===this.maxConcurrency?t.maxConcurrency:parseInt(this.maxConcurrency);return(await o.StreamReport.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!0},async r=>{let s=this.context.cwd;t.enableBetaFeatures.targetedBuilds&&"string"==typeof this.runTarget[0]&&(s=`${e.projectCwd}${c().sep}${this.runTarget[0]}`);const{project:i,workspace:a}=await o.Project.find(e,s),u=a||i.topLevelWorkspace,l=new N({project:i,configuration:e,pluginConfiguration:t,report:r,runCommand:"test",cli:async(e,t,n,r)=>{const s=new o.miscUtils.BufferStream;s.on("data",e=>null==n?void 0:n.emit(L.info,r,e&&e.toString()));const i=new o.miscUtils.BufferStream;i.on("data",e=>null==n?void 0:n.emit(L.error,r,e&&e.toString()));try{const n=await this.cli.run(["run",e],{cwd:t,stdout:s,stderr:i})||0;return s.end(),i.end(),n}catch(e){s.end(),i.end()}return 2},dryRun:!1,ignoreRunCache:this.ignoreTestCache,verbose:this.verbose,concurrency:n});await l.setup(),await q({targetWorkspace:u,project:i,supervisor:l});!1===await l.run()&&r.reportError(o.MessageName.BUILD_FAILED,"Test failed")})).exitCode()}}H.schema=p.object().shape({maxConcurrency:m}),H.usage=a.Command.Usage({category:"Test commands",description:"test a package and all its dependencies",details:"\n In a monorepo with internal packages that depend on others, this command\n will traverse the dependency graph and efficiently ensure, the packages\n are tested in the right order.\n\n If the `--verbose` flag is set, more information will be logged to stdout than normal.\n If the `--json` flag is set the output will follow a JSON-stream output\n also known as NDJSON (https://github.com/ndjson/ndjson-spec).\n\n If the `--ignore-cache` flag is set, every package will be tested,\n regardless of whether is has changed or not.\n\n `-m,--max-concurrency` is the maximum number of tests that can run at a time,\n defaults to the number of logical CPUs on the current machine. Will override the global config option.\n "}),W([a.Command.Boolean("--json")],H.prototype,"json",void 0),W([a.Command.Boolean("-v,--verbose")],H.prototype,"verbose",void 0),W([a.Command.Boolean("--ignore-cache")],H.prototype,"ignoreTestCache",void 0),W([a.Command.String("-m,--max-concurrency")],H.prototype,"maxConcurrency",void 0),W([a.Command.Rest()],H.prototype,"runTarget",void 0),W([a.Command.Path("test")],H.prototype,"execute",null);const G={commands:[d,z,H]}},461:e=>{"use strict";e.exports=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}},101:(e,t,n)=>{"use strict";e=n.nmd(e);const r=(e,t)=>(...n)=>`[${e(...n)+t}m`,o=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},s=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},i=e=>e,a=(e,t,n)=>[e,t,n],u=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let c;const l=(e,t,r,o)=>{void 0===c&&(c=n(198));const s=o?10:0,i={};for(const[n,o]of Object.entries(c)){const a="ansi16"===n?"ansi":n;n===t?i[a]=e(r,s):"object"==typeof o&&(i[a]=e(o[t],s))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[n,r]of Object.entries(t)){for(const[n,o]of Object.entries(r))t[n]={open:`[${o[0]}m`,close:`[${o[1]}m`},r[n]=t[n],e.set(o[0],o[1]);Object.defineProperty(t,n,{value:r,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="",t.bgColor.close="",u(t.color,"ansi",()=>l(r,"ansi16",i,!1)),u(t.color,"ansi256",()=>l(o,"ansi256",i,!1)),u(t.color,"ansi16m",()=>l(s,"rgb",a,!1)),u(t.bgColor,"ansi",()=>l(r,"ansi16",i,!0)),u(t.bgColor,"ansi256",()=>l(o,"ansi256",i,!0)),u(t.bgColor,"ansi16m",()=>l(s,"rgb",a,!0)),t}})},593:e=>{"use strict";e.exports=e=>e&&e.exact?new RegExp("^[\ud800-\udbff][\udc00-\udfff]$"):new RegExp("[\ud800-\udbff][\udc00-\udfff]","g")},344:(e,t)=>{"use strict";class n{constructor(e){this.tasks=[],this.count=e}sched(){if(this.count>0&&this.tasks.length>0){this.count--;let e=this.tasks.shift();if(void 0===e)throw"Unexpected undefined value in tasks list";e()}}acquire(){return new Promise((e,t)=>{this.tasks.push(()=>{var t=!1;e(()=>{t||(t=!0,this.count++,this.sched())})}),process&&process.nextTick?process.nextTick(this.sched.bind(this)):setImmediate(this.sched.bind(this))})}use(e){return this.acquire().then(t=>e().then(e=>(t(),e)).catch(e=>{throw t(),e}))}}t.W=class extends n{constructor(){super(1)}}},187:(e,t,n)=>{"use strict";var r=n(526),o=process.env;function s(e){return"string"==typeof e?!!o[e]:Object.keys(e).every((function(t){return o[t]===e[t]}))}Object.defineProperty(t,"_vendors",{value:r.map((function(e){return e.constant}))}),t.name=null,t.isPR=null,r.forEach((function(e){var n=(Array.isArray(e.env)?e.env:[e.env]).every((function(e){return s(e)}));if(t[e.constant]=n,n)switch(t.name=e.name,typeof e.pr){case"string":t.isPR=!!o[e.pr];break;case"object":"env"in e.pr?t.isPR=e.pr.env in o&&o[e.pr.env]!==e.pr.ne:"any"in e.pr?t.isPR=e.pr.any.some((function(e){return!!o[e]})):t.isPR=s(e.pr);break;default:t.isPR=null}})),t.isCI=!!(o.CI||o.CONTINUOUS_INTEGRATION||o.BUILD_NUMBER||o.RUN_ID||t.name)},526:e=>{"use strict";e.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY_BUILD_BASE","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')},244:(e,t,n)=>{const r=n(752),o={};for(const e of Object.keys(r))o[r[e]]=e;const s={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=s;for(const e of Object.keys(s)){if(!("channels"in s[e]))throw new Error("missing channels property: "+e);if(!("labels"in s[e]))throw new Error("missing channel labels property: "+e);if(s[e].labels.length!==s[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=s[e];delete s[e].channels,delete s[e].labels,Object.defineProperty(s[e],"channels",{value:t}),Object.defineProperty(s[e],"labels",{value:n})}s.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),s=Math.max(t,n,r),i=s-o;let a,u;s===o?a=0:t===s?a=(n-r)/i:n===s?a=2+(r-t)/i:r===s&&(a=4+(t-n)/i),a=Math.min(60*a,360),a<0&&(a+=360);const c=(o+s)/2;return u=s===o?0:c<=.5?i/(s+o):i/(2-s-o),[a,100*u,100*c]},s.rgb.hsv=function(e){let t,n,r,o,s;const i=e[0]/255,a=e[1]/255,u=e[2]/255,c=Math.max(i,a,u),l=c-Math.min(i,a,u),d=function(e){return(c-e)/6/l+.5};return 0===l?(o=0,s=0):(s=l/c,t=d(i),n=d(a),r=d(u),i===c?o=r-n:a===c?o=1/3+t-r:u===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*s,100*c]},s.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=s.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,100*i,100*r]},s.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},s.rgb.keyword=function(e){const t=o[e];if(t)return t;let n,s=1/0;for(const t of Object.keys(r)){const o=r[t],u=(a=o,((i=e)[0]-a[0])**2+(i[1]-a[1])**2+(i[2]-a[2])**2);u.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},s.rgb.lab=function(e){const t=s.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*r-16,500*(n-r),200*(r-o)]},s.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,s,i;if(0===n)return i=255*r,[i,i,i];o=r<.5?r*(1+n):r+n-r*n;const a=2*r-o,u=[0,0,0];for(let e=0;e<3;e++)s=t+1/3*-(e-1),s<0&&s++,s>1&&s--,i=6*s<1?a+6*(o-a)*s:2*s<1?o:3*s<2?a+(o-a)*(2/3-s)*6:a,u[e]=255*i;return u},s.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=s<=1?s:2-s;return[t,100*(0===r?2*o/(s+o):2*n/(r+n)),100*((r+n)/2)]},s.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,s=t-Math.floor(t),i=255*r*(1-n),a=255*r*(1-n*s),u=255*r*(1-n*(1-s));switch(r*=255,o){case 0:return[r,u,i];case 1:return[a,r,i];case 2:return[i,r,u];case 3:return[i,a,r];case 4:return[u,i,r];case 5:return[r,i,a]}},s.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let s,i;i=(2-n)*r;const a=(2-n)*o;return s=n*o,s/=a<=1?a:2-a,s=s||0,i/=2,[t,100*s,100*i]},s.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let s;o>1&&(n/=o,r/=o);const i=Math.floor(6*t),a=1-r;s=6*t-i,0!=(1&i)&&(s=1-s);const u=n+s*(a-n);let c,l,d;switch(i){default:case 6:case 0:c=a,l=u,d=n;break;case 1:c=u,l=a,d=n;break;case 2:c=n,l=a,d=u;break;case 3:c=n,l=u,d=a;break;case 4:c=u,l=n,d=a;break;case 5:c=a,l=n,d=u}return[255*c,255*l,255*d]},s.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},s.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,s,i;return o=3.2406*t+-1.5372*n+-.4986*r,s=-.9689*t+1.8758*n+.0415*r,i=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),[255*o,255*s,255*i]},s.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},s.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,s=t**3,i=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,r=i>.008856?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},s.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},s.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},s.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let i=null===t?s.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),0===i)return 30;let a=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===i&&(a+=60),a},s.hsv.ansi16=function(e){return s.rgb.ansi16(s.hsv.rgb(e),e[2])},s.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},s.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},s.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},s.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},s.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},s.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),s=Math.min(Math.min(t,n),r),i=o-s;let a,u;return a=i<1?s/(1-i):0,u=i<=0?0:o===t?(n-r)/i%6:o===n?2+(r-t)/i:4+(t-n)/i,u/=6,u%=1,[360*u,100*i,100*a]},s.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},s.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},s.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],s=t%1*6,i=s%1,a=1-i;let u=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return u=(1-n)*r,[255*(n*o[0]+u),255*(n*o[1]+u),255*(n*o[2]+u)]},s.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},s.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},s.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},s.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},s.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},s.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},s.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},s.gray.hsl=function(e){return[0,0,e[0]]},s.gray.hsv=s.gray.hsl,s.gray.hwb=function(e){return[0,100,e[0]]},s.gray.cmyk=function(e){return[0,0,0,e[0]]},s.gray.lab=function(e){return[e[0],0,0]},s.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},s.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},198:(e,t,n)=>{const r=n(244),o=n(350),s={};Object.keys(r).forEach(e=>{s[e]={},Object.defineProperty(s[e],"channels",{value:r[e].channels}),Object.defineProperty(s[e],"labels",{value:r[e].labels});const t=o(e);Object.keys(t).forEach(n=>{const r=t[n];s[e][n]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)})}),e.exports=s},350:(e,t,n)=>{const r=n(244);function o(e){const t=function(){const e={},t=Object.keys(r);for(let n=t.length,r=0;r{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},178:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,r,s,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new o(r,s||e,i),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,i=new Array(s);o{"use strict";e.exports=n(187).isCI},427:e=>{"use strict";const t=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));e.exports=t,e.exports.default=t},473:e=>{"use strict";e.exports=(e,t)=>(t=t||(()=>{}),e.then(e=>new Promise(e=>{e(t())}).then(()=>e),e=>new Promise(e=>{e(t())}).then(()=>{throw e})))},299:(e,t,n)=>{"use strict";const r=n(679),o=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const t=[];let n=0;const o=()=>{n--,t.length>0&&t.shift()()},s=(e,t,...s)=>{n++;const i=r(e,...s);t(i),i.then(o,o)},i=(r,...o)=>new Promise(i=>((r,o,...i)=>{nn},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}}),i};e.exports=o,e.exports.default=o},103:(e,t,n)=>{"use strict";const r=n(178),o=n(688),s=n(443),i=()=>{},a=new o.TimeoutError;t.Z=class extends r{constructor(e){if(super(),Object.defineProperty(this,"_carryoverConcurrencyCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isIntervalIgnored",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalCap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interval",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_intervalEnd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_intervalId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_timeoutId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_queueClass",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pendingCount",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_concurrency",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isPaused",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_resolveEmpty",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"_resolveIdle",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"_timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_throwOnTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:s.default},e)).intervalCap&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()},t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother)return this.emit("active"),this._queue.dequeue()(),e&&this._initializeIntervalIfNeeded(),!0}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,t={}){return new Promise((n,r)=>{this._queue.enqueue(async()=>{this._pendingCount++,this._intervalCount++;try{const s=void 0===this._timeout&&void 0===t.timeout?e():o.default(Promise.resolve(e()),void 0===t.timeout?this._timeout:t.timeout,()=>{(void 0===t.throwOnTimeout?this._throwOnTimeout:t.throwOnTimeout)&&r(a)});n(await s)}catch(e){r(e)}this._next()},t),this._tryToStartAnother()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise(e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}})}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise(e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}set timeout(e){this._timeout=e}get timeout(){return this._timeout}}},310:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){let r=0,o=e.length;for(;o>0;){const s=o/2|0;let i=r+s;n(e[i],t)<=0?(r=++i,o-=s+1):o=s}return r}},443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(310);t.default=class{constructor(){Object.defineProperty(this,"_queue",{enumerable:!0,configurable:!0,writable:!0,value:[]})}enqueue(e,t){const n={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority)return void this._queue.push(n);const o=r.default(this._queue,n,(e,t)=>t.priority-e.priority);this._queue.splice(o,0,n)}dequeue(){const e=this._queue.shift();return e&&e.run}filter(e){return this._queue.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this._queue.length}}},688:(e,t,n)=>{"use strict";const r=n(473);class o extends Error{constructor(e){super(e),this.name="TimeoutError"}}const s=(e,t,n)=>new Promise((s,i)=>{if("number"!=typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(t===1/0)return void s(e);const a=setTimeout(()=>{if("function"==typeof n){try{s(n())}catch(e){i(e)}return}const r=n instanceof Error?n:new o("string"==typeof n?n:`Promise timed out after ${t} milliseconds`);"function"==typeof e.cancel&&e.cancel(),i(r)},t);r(e.then(s,i),()=>{clearTimeout(a)})});e.exports=s,e.exports.default=s,e.exports.TimeoutError=o},679:e=>{"use strict";const t=(e,...t)=>new Promise(n=>{n(e(...t))});e.exports=t,e.exports.default=t},285:(e,t,n)=>{"use strict";const r=n(427),o=n(593),s=n(101),i=["","›"],a=e=>`${i[0]}[${e}m`,u=(e,t,n)=>{let r=[];e=[...e];for(let n of e){const o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");const i=s.codes.get(Number.parseInt(n,10));if(i){const n=e.indexOf(i.toString());-1===n?r.push(a(t?i:o)):e.splice(n,1)}else{if(t){r.push(a(0));break}r.push(a(o))}}if(t&&(r=r.filter((e,t)=>r.indexOf(e)===t),void 0!==n)){const e=a(s.codes.get(Number.parseInt(n,10)));r=r.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return r.join("")};e.exports=(e,t,n)=>{const s=[...e],a=[];let c,l="number"==typeof n?n:s.length,d=!1,h=0,p="";for(const[f,m]of s.entries()){let s=!1;if(i.includes(m)){const t=/\d[^m]*/.exec(e.slice(f,f+18));c=t&&t.length>0?t[0]:void 0,ht&&h<=l)p+=m;else if(h!==t||d||void 0===c){if(h>=l){p+=u(a,!0,c);break}}else p=u(a)}return p}},106:(e,t,n)=>{"use strict";const r=n(461);e.exports=e=>"string"==typeof e?e.replace(r(),""):e}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r](o,o.exports,n),o.loaded=!0,o.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(131)})(); +return plugin; +} +}; \ No newline at end of file diff --git a/oada/.yarnrc.yml b/oada/.yarnrc.yml index 1cead422..d402654f 100644 --- a/oada/.yarnrc.yml +++ b/oada/.yarnrc.yml @@ -16,5 +16,7 @@ plugins: spec: "@yarnpkg/plugin-interactive-tools" - path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs spec: "@yarnpkg/plugin-typescript" + - path: .yarn/plugins/@ojkelly/plugin-build.cjs + spec: "https://yarn.build/latest" yarnPath: .yarn/releases/yarn-2.4.1.cjs diff --git a/oada/Dockerfile b/oada/Dockerfile index 89b7cbdf..9c5df364 100644 --- a/oada/Dockerfile +++ b/oada/Dockerfile @@ -53,7 +53,7 @@ RUN yarn install --immutable # Build and then remove yarn stuff # TODO: Without p it quits after first build... ? -RUN yarn workspaces foreach -vApi run build -v && rm -rfv .yarn .pnp.* +RUN yarn build -p --verbose && rm -rfv .yarn .pnp.* FROM node:$NODE_VER AS code