create-turbo 1.9.0-canary.3 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cli.js +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
@@ -77,7 +77,7 @@ ${a.message}`:y,A=[g,s,u].filter(Boolean).join(`
|
|
77
77
|
${t.workspaceData.globs.map(o=>` - "${o}"`).join(`
|
78
78
|
`)}`))),u&&(Tr({workspace:{name:"root",paths:t.paths},project:t,to:r,logger:n,options:i}),n.workspaceHeader(),t.workspaceData.workspaces.forEach(o=>Tr({workspace:o,project:t,to:r,logger:n,options:i})))}async function cD(e){let{project:t,logger:r,options:n}=e,i=t.workspaceData.globs.length>0;r.mainStep(Lr({action:"remove",packageManager:"pnpm",project:t}));let u=st({workspaceRoot:t.paths.root});if(t.paths.workspaceConfig&&i&&(r.subStep('removing "pnpm-workspace.yaml"'),n!=null&&n.dry||mt.default.rmSync(t.paths.workspaceConfig,{force:!0})),r.subStep(`removing "packageManager" field in ${t.name} root "package.json"`),delete u.packageManager,!(n!=null&&n.dry)){mt.default.writeJSONSync(t.paths.packageJson,u,{spaces:2});let s=[t.paths.nodeModules,...t.workspaceData.workspaces.map(o=>o.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(s.map(o=>mt.default.rm(o,{recursive:!0,force:!0})))}catch{throw new qe("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function lD(e){let{project:t,logger:r,options:n}=e;r.subStep(`removing ${sn.default.relative(t.paths.root,t.paths.lockfile)}`),n!=null&&n.dry||mt.default.rmSync(t.paths.lockfile,{force:!0})}async function pD(e){let{project:t,logger:r,options:n}=e;if(t.packageManager!=="pnpm"&&(r.subStep(`converting ${sn.default.relative(t.paths.root,t.paths.lockfile)} to pnpm-lock.yaml`),!(n!=null&&n.dry)&&mt.default.existsSync(t.paths.lockfile)))try{await(0,Zx.default)("pnpm",["import"],{stdio:"ignore",cwd:t.paths.root})}finally{mt.default.rmSync(t.paths.lockfile,{force:!0})}}var fD={detect:kd,read:aD,create:uD,remove:cD,clean:lD,convertLock:pD},dD=fD,ir=Ce(require("fs-extra")),di=Ce(require("path"));async function Fd(e){let t=di.default.join(e.workspaceRoot,"package-lock.json"),r=wa({workspaceRoot:e.workspaceRoot});return ir.default.existsSync(t)||r==="npm"}async function hD(e){if(!await Fd(e))throw new qe("Not an npm project",{type:"package_manager-unexpected"});let t=st(e),{name:r,description:n}=Si(e);return{name:r,description:n,packageManager:"npm",paths:Ca({root:e.workspaceRoot,lockFile:"package-lock.json"}),workspaceData:{globs:t.workspaces||[],workspaces:ka({workspaceGlobs:t.workspaces,...e})}}}async function mD(e){let{project:t,options:r,to:n,logger:i}=e,u=t.workspaceData.globs.length>0;i.mainStep(Lr({packageManager:"npm",action:"create",project:t}));let s=st({workspaceRoot:t.paths.root});i.rootHeader(),i.rootStep(`adding "packageManager" field to ${di.default.relative(t.paths.root,t.paths.packageJson)}`),s.packageManager=`${n.name}@${n.version}`,u?(i.rootStep(`adding "workspaces" field to ${di.default.relative(t.paths.root,t.paths.packageJson)}`),s.workspaces=t.workspaceData.globs,r!=null&&r.dry||ir.default.writeJSONSync(t.paths.packageJson,s,{spaces:2}),Tr({workspace:{name:"root",paths:t.paths},project:t,to:n,logger:i,options:r}),i.workspaceHeader(),t.workspaceData.workspaces.forEach(o=>Tr({workspace:o,project:t,to:n,logger:i,options:r}))):r!=null&&r.dry||ir.default.writeJSONSync(t.paths.packageJson,s,{spaces:2})}async function gD(e){let{project:t,logger:r,options:n}=e,i=t.workspaceData.globs.length>0;r.mainStep(Lr({packageManager:"npm",action:"remove",project:t}));let u=st({workspaceRoot:t.paths.root});if(i&&(r.subStep(`removing "workspaces" field in ${t.name} root "package.json"`),delete u.workspaces),r.subStep(`removing "packageManager" field in ${t.name} root "package.json"`),delete u.packageManager,!(n!=null&&n.dry)){ir.default.writeJSONSync(t.paths.packageJson,u,{spaces:2});let s=[t.paths.nodeModules,...t.workspaceData.workspaces.map(o=>o.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(s.map(o=>ir.default.rm(o,{recursive:!0,force:!0})))}catch{throw new qe("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function yD(e){let{project:t,logger:r,options:n}=e;r.subStep(`removing ${di.default.relative(t.paths.root,t.paths.lockfile)}`),n!=null&&n.dry||ir.default.rmSync(t.paths.lockfile,{force:!0})}async function vD(e){let{project:t,options:r}=e;t.packageManager!=="npm"&&(r!=null&&r.dry||ir.default.rmSync(t.paths.lockfile,{force:!0}))}var _D={detect:Fd,read:hD,create:mD,remove:gD,clean:yD,convertLock:vD},ED=_D,or=Ce(require("fs-extra")),hi=Ce(require("path"));async function Rd(e){let t=hi.default.join(e.workspaceRoot,"yarn.lock"),r=wa({workspaceRoot:e.workspaceRoot});return or.default.existsSync(t)||r==="yarn"}async function SD(e){if(!await Rd(e))throw new qe("Not a yarn project",{type:"package_manager-unexpected"});let t=st(e),{name:r,description:n}=Si(e);return{name:r,description:n,packageManager:"yarn",paths:Ca({root:e.workspaceRoot,lockFile:"yarn.lock"}),workspaceData:{globs:t.workspaces||[],workspaces:ka({workspaceGlobs:t.workspaces,...e})}}}async function AD(e){let{project:t,to:r,logger:n,options:i}=e,u=t.workspaceData.globs.length>0;n.mainStep(Lr({packageManager:"yarn",action:"create",project:t}));let s=st({workspaceRoot:t.paths.root});n.rootHeader(),n.rootStep(`adding "packageManager" field to ${hi.default.relative(t.paths.root,t.paths.packageJson)}`),s.packageManager=`${r.name}@${r.version}`,u?(n.rootStep(`adding "workspaces" field to ${hi.default.relative(t.paths.root,t.paths.packageJson)}`),s.workspaces=t.workspaceData.globs,i!=null&&i.dry||or.default.writeJSONSync(t.paths.packageJson,s,{spaces:2}),Tr({workspace:{name:"root",paths:t.paths},project:t,to:r,logger:n,options:i}),n.workspaceHeader(),t.workspaceData.workspaces.forEach(o=>Tr({workspace:o,project:t,to:r,logger:n,options:i}))):i!=null&&i.dry||or.default.writeJSONSync(t.paths.packageJson,s,{spaces:2})}async function bD(e){let{project:t,logger:r,options:n}=e,i=t.workspaceData.globs.length>0;r.mainStep(Lr({packageManager:"yarn",action:"remove",project:t}));let u=st({workspaceRoot:t.paths.root});if(i&&(r.subStep(`removing "workspaces" field in ${t.name} root "package.json"`),delete u.workspaces),r.subStep(`removing "packageManager" field in ${t.name} root "package.json"`),delete u.packageManager,!(n!=null&&n.dry)){or.default.writeJSONSync(t.paths.packageJson,u,{spaces:2});let s=[t.paths.nodeModules,...t.workspaceData.workspaces.map(o=>o.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(s.map(o=>or.default.rm(o,{recursive:!0,force:!0})))}catch{throw new qe("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function xD(e){let{project:t,logger:r,options:n}=e;r.subStep(`removing ${hi.default.relative(t.paths.root,t.paths.lockfile)}`),n!=null&&n.dry||or.default.rmSync(t.paths.lockfile,{force:!0})}async function DD(e){let{project:t,options:r}=e;t.packageManager!=="yarn"&&(r!=null&&r.dry||or.default.rmSync(t.paths.lockfile,{force:!0}))}var wD={detect:Rd,read:SD,create:AD,remove:bD,clean:xD,convertLock:DD},CD=wD,kD={pnpm:dD,yarn:CD,npm:ED},Rr=kD;async function Od({root:e}){let{exists:t,absolute:r}=oD({directory:e});if(!t)throw new qe(`Could not find directory at ${r}. Ensure the directory exists.`,{type:"invalid_directory"});for(let{detect:n,read:i}of Object.values(Rr))if(await n({workspaceRoot:r}))return i({workspaceRoot:r});throw new qe("Could not determine package manager. Add `packageManager` to `package.json` or ensure a lockfile is present.",{type:"package_manager-unable_to_detect"})}var FD=Ce(require("chalk")),RD=Ce(require("execa")),OD=Ce(require("ora")),TD=require("semver"),nt=Ce(require("chalk")),PD=Ce(require("gradient-string")),wr=2,Td=class{constructor({interactive:e,dry:t}={}){this.interactive=e!=null?e:!0,this.dry=t!=null?t:!1,this.step=1}logger(...e){this.interactive&&console.log(...e)}indented(e,...t){this.logger(" ".repeat(wr*e),...t)}header(e){this.blankLine(),this.logger(nt.default.bold(e))}installerFrames(){let e=`${" ".repeat(wr)} - ${this.dry?nt.default.yellow("SKIPPED | "):nt.default.green("OK | ")}`;return[`${e} `,`${e}> `,`${e}>> `,`${e}>>>`]}gradient(e){return(0,PD.default)("#0099F7","#F11712")(e.toString())}hero(){this.logger(nt.default.bold(this.gradient(`
|
79
79
|
>>> TURBOREPO
|
80
|
-
`)))}info(...e){this.logger(...e)}mainStep(e){this.blankLine(),this.logger(`${this.step}. ${nt.default.underline(e)}`),this.step+=1}subStep(...e){this.logger(" ".repeat(wr),"-",this.dry?nt.default.yellow("SKIPPED |"):nt.default.green("OK |"),...e)}subStepFailure(...e){this.logger(" ".repeat(wr),"-",nt.default.red("ERROR |"),...e)}rootHeader(){this.blankLine(),this.indented(2,"Root:")}rootStep(...e){this.logger(" ".repeat(wr*3),"-",this.dry?nt.default.yellow("SKIPPED |"):nt.default.green("OK |"),...e)}workspaceHeader(){this.blankLine(),this.indented(2,"Workspaces:")}workspaceStep(...e){this.logger(" ".repeat(wr*3),"-",this.dry?nt.default.yellow("SKIPPED |"):nt.default.green("OK |"),...e)}blankLine(){this.logger()}error(...e){console.error(...e)}},jf={npm:[{name:"npm",template:"npm",command:"npm",installArgs:["install"],version:"latest",executable:"npx",semver:"*",default:!0}],pnpm:[{name:"pnpm6",template:"pnpm",command:"pnpm",installArgs:["install"],version:"latest-6",executable:"pnpx",semver:"6.x"},{name:"pnpm",template:"pnpm",command:"pnpm",installArgs:["install"],version:"latest",executable:"pnpm dlx",semver:">=7",default:!0}],yarn:[{name:"yarn",template:"yarn",command:"yarn",installArgs:["install"],version:"1.x",executable:"npx",semver:"<2",default:!0},{name:"berry",template:"berry",command:"yarn",installArgs:["install","--no-immutable"],version:"stable",executable:"yarn dlx",semver:">=2"}]};function Pd(e){let{version:t,name:r}=e;return t?jf[r].find(n=>(0,TD.satisfies)(t,n.semver)):jf[r].find(n=>n.default)}async function Ld(e){let{to:t,logger:r,options:n}=e,i=r!=null?r:new Td(n),u=Pd(t);if(!u)throw new qe("Unsupported package manager version.",{type:"package_manager-unsupported_version"});if(i.subStep(`running "${u.command} ${u.installArgs}"`),!(n!=null&&n.dry)){let s;i!=null&&i.interactive&&(s=(0,OD.default)({text:"installing dependencies...",spinner:{frames:i.installerFrames()}}).start());try{await(0,RD.default)(u.command,u.installArgs,{cwd:e.project.paths.root}),s&&s.stop(),i.subStep("dependencies installed")}catch(o){throw i.subStepFailure("failed to install dependencies"),o}}}async function LD({project:e,to:t,logger:r,options:n}){if(r.header(`Converting project from ${e.packageManager} to ${t.name}.`),e.packageManager==t.name)throw new qe("You are already using this package manager",{type:"package_manager-already_in_use"});await Rr[e.packageManager].remove({project:e,to:t,logger:r,options:n}),await Rr[t.name].create({project:e,to:t,logger:r,options:n}),r.mainStep("Installing dependencies"),n!=null&&n.skipInstall?r.subStep(FD.default.yellow("Skipping install")):(await Rr[t.name].convertLock({project:e,logger:r,options:n}),await Ld({project:e,to:t,logger:r,options:n})),r.mainStep(`Cleaning up ${e.packageManager} workspaces`),await Rr[e.packageManager].clean({project:e,logger:r})}async function ID({root:e,to:t,options:r}){let n=new Td({...r,interactive:!1}),[i,u]=await Promise.all([Od({root:e}),Jx()]);await LD({project:i,to:{name:t,version:u[t].version},logger:n,options:r})}});j();var $i=Se(require("chalk")),y0=require("commander");j();var mu=Se(require("chalk")),gu=Se(require("update-check"));var ur={name:"create-turbo",version:"1.9.0-canary.3",description:"Create a new Turborepo",homepage:"https://turbo.build/repo",license:"MPL-2.0",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/create-turbo"},bugs:{url:"https://github.com/vercel/turbo/issues"},bin:{"create-turbo":"dist/cli.js"},scripts:{build:"tsup",test:"jest",lint:"eslint src/**/*.ts","check-types":"tsc --noEmit"},dependencies:{"async-retry":"^1.3.3",chalk:"2.4.2",commander:"^10.0.0","cross-spawn":"^7.0.3",execa:"5.1.1","fs-extra":"^10.1.0",got:"^11.8.5","gradient-string":"^2.0.0",inquirer:"^8.0.0",ora:"4.1.1",rimraf:"^3.0.2",semver:"^7.3.8",tar:"6.1.13","update-check":"^1.5.4"},devDependencies:{"@turbo/workspaces":"workspace:*","@types/async-retry":"^1.4.5","@types/cross-spawn":"^6.0.2","@types/fs-extra":"^9.0.13","@types/gradient-string":"^1.1.2","@types/inquirer":"^7.3.1","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/rimraf":"^3.0.2","@types/semver":"^7.3.9","@types/tar":"^6.1.4",eslint:"^7.23.0",jest:"^27.4.3","strip-ansi":"^6.0.1","ts-jest":"^27.1.1",tsconfig:"workspace:*",tsup:"^5.10.3","turbo-utils":"workspace:*","turbo-test-utils":"workspace:*",typescript:"^4.5.5"},files:["dist"]};var C0=(0,gu.default)(ur).catch(()=>null);async function vn(){try{let e=await C0;e!=null&&e.latest&&(console.log(),console.log(mu.default.yellow.bold("A new version of `create-turbo` is available!")),console.log()),process.exit()}catch{}}j();var En=Se(require("chalk")),yu=Se(require("ora")),vu=Se(require("gradient-string")),_u="#0099F7",Eu="#F11712",k0="#FFFF00",cr=(0,vu.default)(_u,Eu),_n=En.default.hex(_u),F0=En.default.hex(Eu),R0=En.default.hex(k0),Sn=e=>(0,yu.default)({text:e,spinner:{frames:[" ",_n("> "),_n(">> "),_n(">>>")]}}),Hi=(...e)=>{console.log(_n.bold(">>>"),...e)},Pe=(...e)=>{console.error(F0.bold(">>>"),...e)},An=(...e)=>{console.error(R0.bold(">>>"),...e)};j();j();var yn=Se(require("path")),Ue=Se(require("chalk")),qt=Se(Fa());j();j();j();j();j();var ND=Object.create,Nd=Object.defineProperty,BD=Object.getOwnPropertyDescriptor,MD=Object.getOwnPropertyNames,jD=Object.getPrototypeOf,$D=Object.prototype.hasOwnProperty,ae=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),HD=(e,t)=>()=>(e&&(t=e(e=0)),t),U=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),GD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of MD(t))!$D.call(e,i)&&i!==r&&Nd(e,i,{get:()=>t[i],enumerable:!(n=BD(t,i))||n.enumerable});return e},jt=(e,t,r)=>(r=e!=null?ND(jD(e)):{},GD(t||!e||!e.__esModule?Nd(r,"default",{value:e,enumerable:!0}):r,e)),H=HD(()=>{});H();var UD=U((e,t)=>{H();function r(n){return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t.exports.__esModule=!0,t.exports.default=t.exports,r(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),WD=U((e,t)=>{H();var r=UD().default;function n(){"use strict";t.exports=n=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var i={},u=Object.prototype,s=u.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",p=o.toStringTag||"@@toStringTag";function l(C,S,R){return Object.defineProperty(C,S,{value:R,enumerable:!0,configurable:!0,writable:!0}),C[S]}try{l({},"")}catch{l=function(C,S,R){return C[S]=R}}function f(C,S,R,L){var M=S&&S.prototype instanceof v?S:v,B=Object.create(M.prototype),Q=new w(L||[]);return B._invoke=function(Z,oe,N){var le="suspendedStart";return function(pe,ne){if(le==="executing")throw new Error("Generator is already running");if(le==="completed"){if(pe==="throw")throw ne;return P()}for(N.method=pe,N.arg=ne;;){var T=N.delegate;if(T){var I=k(T,N);if(I){if(I===m)continue;return I}}if(N.method==="next")N.sent=N._sent=N.arg;else if(N.method==="throw"){if(le==="suspendedStart")throw le="completed",N.arg;N.dispatchException(N.arg)}else N.method==="return"&&N.abrupt("return",N.arg);le="executing";var $=h(Z,oe,N);if($.type==="normal"){if(le=N.done?"completed":"suspendedYield",$.arg===m)continue;return{value:$.arg,done:N.done}}$.type==="throw"&&(le="completed",N.method="throw",N.arg=$.arg)}}}(C,R,Q),B}function h(C,S,R){try{return{type:"normal",arg:C.call(S,R)}}catch(L){return{type:"throw",arg:L}}}i.wrap=f;var m={};function v(){}function _(){}function E(){}var d={};l(d,a,function(){return this});var y=Object.getPrototypeOf,D=y&&y(y(O([])));D&&D!==u&&s.call(D,a)&&(d=D);var g=E.prototype=v.prototype=Object.create(d);function A(C){["next","throw","return"].forEach(function(S){l(C,S,function(R){return this._invoke(S,R)})})}function b(C,S){function R(M,B,Q,Z){var oe=h(C[M],C,B);if(oe.type!=="throw"){var N=oe.arg,le=N.value;return le&&r(le)=="object"&&s.call(le,"__await")?S.resolve(le.__await).then(function(pe){R("next",pe,Q,Z)},function(pe){R("throw",pe,Q,Z)}):S.resolve(le).then(function(pe){N.value=pe,Q(N)},function(pe){return R("throw",pe,Q,Z)})}Z(oe.arg)}var L;this._invoke=function(M,B){function Q(){return new S(function(Z,oe){R(M,B,Z,oe)})}return L=L?L.then(Q,Q):Q()}}function k(C,S){var R=C.iterator[S.method];if(R===void 0){if(S.delegate=null,S.method==="throw"){if(C.iterator.return&&(S.method="return",S.arg=void 0,k(C,S),S.method==="throw"))return m;S.method="throw",S.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var L=h(R,C.iterator,S.arg);if(L.type==="throw")return S.method="throw",S.arg=L.arg,S.delegate=null,m;var M=L.arg;return M?M.done?(S[C.resultName]=M.value,S.next=C.nextLoc,S.method!=="return"&&(S.method="next",S.arg=void 0),S.delegate=null,m):M:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,m)}function x(C){var S={tryLoc:C[0]};1 in C&&(S.catchLoc=C[1]),2 in C&&(S.finallyLoc=C[2],S.afterLoc=C[3]),this.tryEntries.push(S)}function F(C){var S=C.completion||{};S.type="normal",delete S.arg,C.completion=S}function w(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(x,this),this.reset(!0)}function O(C){if(C){var S=C[a];if(S)return S.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var R=-1,L=function M(){for(;++R<C.length;)if(s.call(C,R))return M.value=C[R],M.done=!1,M;return M.value=void 0,M.done=!0,M};return L.next=L}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=E,l(g,"constructor",E),l(E,"constructor",_),_.displayName=l(E,p,"GeneratorFunction"),i.isGeneratorFunction=function(C){var S=typeof C=="function"&&C.constructor;return!!S&&(S===_||(S.displayName||S.name)==="GeneratorFunction")},i.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,E):(C.__proto__=E,l(C,p,"GeneratorFunction")),C.prototype=Object.create(g),C},i.awrap=function(C){return{__await:C}},A(b.prototype),l(b.prototype,c,function(){return this}),i.AsyncIterator=b,i.async=function(C,S,R,L,M){M===void 0&&(M=Promise);var B=new b(f(C,S,R,L),M);return i.isGeneratorFunction(S)?B:B.next().then(function(Q){return Q.done?Q.value:B.next()})},A(g),l(g,p,"Generator"),l(g,a,function(){return this}),l(g,"toString",function(){return"[object Generator]"}),i.keys=function(C){var S=[];for(var R in C)S.push(R);return S.reverse(),function L(){for(;S.length;){var M=S.pop();if(M in C)return L.value=M,L.done=!1,L}return L.done=!0,L}},i.values=O,w.prototype={constructor:w,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(F),!C)for(var S in this)S.charAt(0)==="t"&&s.call(this,S)&&!isNaN(+S.slice(1))&&(this[S]=void 0)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var S=this;function R(oe,N){return B.type="throw",B.arg=C,S.next=oe,N&&(S.method="next",S.arg=void 0),!!N}for(var L=this.tryEntries.length-1;L>=0;--L){var M=this.tryEntries[L],B=M.completion;if(M.tryLoc==="root")return R("end");if(M.tryLoc<=this.prev){var Q=s.call(M,"catchLoc"),Z=s.call(M,"finallyLoc");if(Q&&Z){if(this.prev<M.catchLoc)return R(M.catchLoc,!0);if(this.prev<M.finallyLoc)return R(M.finallyLoc)}else if(Q){if(this.prev<M.catchLoc)return R(M.catchLoc,!0)}else{if(!Z)throw new Error("try statement without catch or finally");if(this.prev<M.finallyLoc)return R(M.finallyLoc)}}}},abrupt:function(C,S){for(var R=this.tryEntries.length-1;R>=0;--R){var L=this.tryEntries[R];if(L.tryLoc<=this.prev&&s.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var M=L;break}}M&&(C==="break"||C==="continue")&&M.tryLoc<=S&&S<=M.finallyLoc&&(M=null);var B=M?M.completion:{};return B.type=C,B.arg=S,M?(this.method="next",this.next=M.finallyLoc,m):this.complete(B)},complete:function(C,S){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&S&&(this.next=S),m},finish:function(C){for(var S=this.tryEntries.length-1;S>=0;--S){var R=this.tryEntries[S];if(R.finallyLoc===C)return this.complete(R.completion,R.afterLoc),F(R),m}},catch:function(C){for(var S=this.tryEntries.length-1;S>=0;--S){var R=this.tryEntries[S];if(R.tryLoc===C){var L=R.completion;if(L.type==="throw"){var M=L.arg;F(R)}return M}}throw new Error("illegal catch attempt")},delegateYield:function(C,S,R){return this.delegate={iterator:O(C),resultName:S,nextLoc:R},this.method==="next"&&(this.arg=void 0),m}},i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),YD=U((e,t)=>{H();var r=WD()();t.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),KD=U((e,t)=>{"use strict";H();var r=(n,...i)=>new Promise(u=>{u(n(...i))});t.exports=r,t.exports.default=r}),VD=U((e,t)=>{"use strict";H();var r=KD(),n=i=>{if(!((Number.isInteger(i)||i===1/0)&&i>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let u=[],s=0,o=()=>{s--,u.length>0&&u.shift()()},a=(l,f,...h)=>{s++;let m=r(l,...h);f(m),m.then(o,o)},c=(l,f,...h)=>{s<i?a(l,f,...h):u.push(a.bind(null,l,f,...h))},p=(l,...f)=>new Promise(h=>c(l,h,...f));return Object.defineProperties(p,{activeCount:{get:()=>s},pendingCount:{get:()=>u.length},clearQueue:{value:()=>{u.length=0}}}),p};t.exports=n,t.exports.default=n}),QD=U((e,t)=>{"use strict";H();var r=VD(),n=class extends Error{constructor(o){super(),this.value=o}},i=async(o,a)=>a(await o),u=async o=>{let a=await Promise.all(o);if(a[1]===!0)throw new n(a[0]);return!1},s=async(o,a,c)=>{c={concurrency:1/0,preserveOrder:!0,...c};let p=r(c.concurrency),l=[...o].map(h=>[h,p(i,h,a)]),f=r(c.preserveOrder?1:1/0);try{await Promise.all(l.map(h=>f(u,h)))}catch(h){if(h instanceof n)return h.value;throw h}};t.exports=s,t.exports.default=s}),XD=U((e,t)=>{"use strict";H();var r=ae("path"),n=ae("fs"),{promisify:i}=ae("util"),u=QD(),s=i(n.stat),o=i(n.lstat),a={directory:"isDirectory",file:"isFile"};function c({type:l}){if(!(l in a))throw new Error(`Invalid type specified: ${l}`)}var p=(l,f)=>l===void 0||f[a[l]]();t.exports=async(l,f)=>{f={cwd:process.cwd(),type:"file",allowSymlinks:!0,...f},c(f);let h=f.allowSymlinks?s:o;return u(l,async m=>{try{let v=await h(r.resolve(f.cwd,m));return p(f.type,v)}catch{return!1}},f)},t.exports.sync=(l,f)=>{f={cwd:process.cwd(),allowSymlinks:!0,type:"file",...f},c(f);let h=f.allowSymlinks?n.statSync:n.lstatSync;for(let m of l)try{let v=h(r.resolve(f.cwd,m));if(p(f.type,v))return m}catch{}}}),JD=U((e,t)=>{"use strict";H();var r=ae("fs"),{promisify:n}=ae("util"),i=n(r.access);t.exports=async u=>{try{return await i(u),!0}catch{return!1}},t.exports.sync=u=>{try{return r.accessSync(u),!0}catch{return!1}}}),ZD=U((e,t)=>{"use strict";H();var r=ae("path"),n=XD(),i=JD(),u=Symbol("findUp.stop");t.exports=async(s,o={})=>{let a=r.resolve(o.cwd||""),{root:c}=r.parse(a),p=[].concat(s),l=async f=>{if(typeof s!="function")return n(p,f);let h=await s(f.cwd);return typeof h=="string"?n([h],f):h};for(;;){let f=await l({...o,cwd:a});if(f===u)return;if(f)return r.resolve(a,f);if(a===c)return;a=r.dirname(a)}},t.exports.sync=(s,o={})=>{let a=r.resolve(o.cwd||""),{root:c}=r.parse(a),p=[].concat(s),l=f=>{if(typeof s!="function")return n.sync(p,f);let h=s(f.cwd);return typeof h=="string"?n.sync([h],f):h};for(;;){let f=l({...o,cwd:a});if(f===u)return;if(f)return r.resolve(a,f);if(a===c)return;a=r.dirname(a)}},t.exports.exists=i,t.exports.sync.exists=i.sync,t.exports.stop=u}),et=U(e=>{"use strict";H(),e.fromCallback=function(t){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")t.apply(this,arguments);else return new Promise((r,n)=>{arguments[arguments.length]=(i,u)=>{if(i)return n(i);r(u)},arguments.length++,t.apply(this,arguments)})},"name",{value:t.name})},e.fromPromise=function(t){return Object.defineProperty(function(){let r=arguments[arguments.length-1];if(typeof r!="function")return t.apply(this,arguments);t.apply(this,arguments).then(n=>r(null,n),r)},"name",{value:t.name})}}),zD=U((e,t)=>{H();var r=ae("constants"),n=process.cwd,i=null,u=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||(i=n.call(process)),i};try{process.cwd()}catch{}typeof process.chdir=="function"&&(s=process.chdir,process.chdir=function(a){i=null,s.call(process,a)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s));var s;t.exports=o;function o(a){r.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&c(a),a.lutimes||p(a),a.chown=h(a.chown),a.fchown=h(a.fchown),a.lchown=h(a.lchown),a.chmod=l(a.chmod),a.fchmod=l(a.fchmod),a.lchmod=l(a.lchmod),a.chownSync=m(a.chownSync),a.fchownSync=m(a.fchownSync),a.lchownSync=m(a.lchownSync),a.chmodSync=f(a.chmodSync),a.fchmodSync=f(a.fchmodSync),a.lchmodSync=f(a.lchmodSync),a.stat=v(a.stat),a.fstat=v(a.fstat),a.lstat=v(a.lstat),a.statSync=_(a.statSync),a.fstatSync=_(a.fstatSync),a.lstatSync=_(a.lstatSync),a.chmod&&!a.lchmod&&(a.lchmod=function(d,y,D){D&&process.nextTick(D)},a.lchmodSync=function(){}),a.chown&&!a.lchown&&(a.lchown=function(d,y,D,g){g&&process.nextTick(g)},a.lchownSync=function(){}),u==="win32"&&(a.rename=typeof a.rename!="function"?a.rename:function(d){function y(D,g,A){var b=Date.now(),k=0;d(D,g,function x(F){if(F&&(F.code==="EACCES"||F.code==="EPERM")&&Date.now()-b<6e4){setTimeout(function(){a.stat(g,function(w,O){w&&w.code==="ENOENT"?d(D,g,x):A(F)})},k),k<100&&(k+=10);return}A&&A(F)})}return Object.setPrototypeOf&&Object.setPrototypeOf(y,d),y}(a.rename)),a.read=typeof a.read!="function"?a.read:function(d){function y(D,g,A,b,k,x){var F;if(x&&typeof x=="function"){var w=0;F=function(O,P,C){if(O&&O.code==="EAGAIN"&&w<10)return w++,d.call(a,D,g,A,b,k,F);x.apply(this,arguments)}}return d.call(a,D,g,A,b,k,F)}return Object.setPrototypeOf&&Object.setPrototypeOf(y,d),y}(a.read),a.readSync=typeof a.readSync!="function"?a.readSync:function(d){return function(y,D,g,A,b){for(var k=0;;)try{return d.call(a,y,D,g,A,b)}catch(x){if(x.code==="EAGAIN"&&k<10){k++;continue}throw x}}}(a.readSync);function c(d){d.lchmod=function(y,D,g){d.open(y,r.O_WRONLY|r.O_SYMLINK,D,function(A,b){if(A){g&&g(A);return}d.fchmod(b,D,function(k){d.close(b,function(x){g&&g(k||x)})})})},d.lchmodSync=function(y,D){var g=d.openSync(y,r.O_WRONLY|r.O_SYMLINK,D),A=!0,b;try{b=d.fchmodSync(g,D),A=!1}finally{if(A)try{d.closeSync(g)}catch{}else d.closeSync(g)}return b}}function p(d){r.hasOwnProperty("O_SYMLINK")&&d.futimes?(d.lutimes=function(y,D,g,A){d.open(y,r.O_SYMLINK,function(b,k){if(b){A&&A(b);return}d.futimes(k,D,g,function(x){d.close(k,function(F){A&&A(x||F)})})})},d.lutimesSync=function(y,D,g){var A=d.openSync(y,r.O_SYMLINK),b,k=!0;try{b=d.futimesSync(A,D,g),k=!1}finally{if(k)try{d.closeSync(A)}catch{}else d.closeSync(A)}return b}):d.futimes&&(d.lutimes=function(y,D,g,A){A&&process.nextTick(A)},d.lutimesSync=function(){})}function l(d){return d&&function(y,D,g){return d.call(a,y,D,function(A){E(A)&&(A=null),g&&g.apply(this,arguments)})}}function f(d){return d&&function(y,D){try{return d.call(a,y,D)}catch(g){if(!E(g))throw g}}}function h(d){return d&&function(y,D,g,A){return d.call(a,y,D,g,function(b){E(b)&&(b=null),A&&A.apply(this,arguments)})}}function m(d){return d&&function(y,D,g){try{return d.call(a,y,D,g)}catch(A){if(!E(A))throw A}}}function v(d){return d&&function(y,D,g){typeof D=="function"&&(g=D,D=null);function A(b,k){k&&(k.uid<0&&(k.uid+=4294967296),k.gid<0&&(k.gid+=4294967296)),g&&g.apply(this,arguments)}return D?d.call(a,y,D,A):d.call(a,y,A)}}function _(d){return d&&function(y,D){var g=D?d.call(a,y,D):d.call(a,y);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function E(d){if(!d||d.code==="ENOSYS")return!0;var y=!process.getuid||process.getuid()!==0;return!!(y&&(d.code==="EINVAL"||d.code==="EPERM"))}}}),ew=U((e,t)=>{H();var r=ae("stream").Stream;t.exports=n;function n(i){return{ReadStream:u,WriteStream:s};function u(o,a){if(!(this instanceof u))return new u(o,a);r.call(this);var c=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var p=Object.keys(a),l=0,f=p.length;l<f;l++){var h=p[l];this[h]=a[h]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){c._read()});return}i.open(this.path,this.flags,this.mode,function(m,v){if(m){c.emit("error",m),c.readable=!1;return}c.fd=v,c.emit("open",v),c._read()})}function s(o,a){if(!(this instanceof s))return new s(o,a);r.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var c=Object.keys(a),p=0,l=c.length;p<l;p++){var f=c[p];this[f]=a[f]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=i.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}),tw=U((e,t)=>{"use strict";H(),t.exports=n;var r=Object.getPrototypeOf||function(i){return i.__proto__};function n(i){if(i===null||typeof i!="object")return i;if(i instanceof Object)var u={__proto__:r(i)};else var u=Object.create(null);return Object.getOwnPropertyNames(i).forEach(function(s){Object.defineProperty(u,s,Object.getOwnPropertyDescriptor(i,s))}),u}}),Oe=U((e,t)=>{H();var r=ae("fs"),n=zD(),i=ew(),u=tw(),s=ae("util"),o,a;typeof Symbol=="function"&&typeof Symbol.for=="function"?(o=Symbol.for("graceful-fs.queue"),a=Symbol.for("graceful-fs.previous")):(o="___graceful-fs.queue",a="___graceful-fs.previous");function c(){}function p(d,y){Object.defineProperty(d,o,{get:function(){return y}})}var l=c;s.debuglog?l=s.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(l=function(){var d=s.format.apply(s,arguments);d="GFS4: "+d.split(/\n/).join(`
|
80
|
+
`)))}info(...e){this.logger(...e)}mainStep(e){this.blankLine(),this.logger(`${this.step}. ${nt.default.underline(e)}`),this.step+=1}subStep(...e){this.logger(" ".repeat(wr),"-",this.dry?nt.default.yellow("SKIPPED |"):nt.default.green("OK |"),...e)}subStepFailure(...e){this.logger(" ".repeat(wr),"-",nt.default.red("ERROR |"),...e)}rootHeader(){this.blankLine(),this.indented(2,"Root:")}rootStep(...e){this.logger(" ".repeat(wr*3),"-",this.dry?nt.default.yellow("SKIPPED |"):nt.default.green("OK |"),...e)}workspaceHeader(){this.blankLine(),this.indented(2,"Workspaces:")}workspaceStep(...e){this.logger(" ".repeat(wr*3),"-",this.dry?nt.default.yellow("SKIPPED |"):nt.default.green("OK |"),...e)}blankLine(){this.logger()}error(...e){console.error(...e)}},jf={npm:[{name:"npm",template:"npm",command:"npm",installArgs:["install"],version:"latest",executable:"npx",semver:"*",default:!0}],pnpm:[{name:"pnpm6",template:"pnpm",command:"pnpm",installArgs:["install"],version:"latest-6",executable:"pnpx",semver:"6.x"},{name:"pnpm",template:"pnpm",command:"pnpm",installArgs:["install"],version:"latest",executable:"pnpm dlx",semver:">=7",default:!0}],yarn:[{name:"yarn",template:"yarn",command:"yarn",installArgs:["install"],version:"1.x",executable:"npx",semver:"<2",default:!0},{name:"berry",template:"berry",command:"yarn",installArgs:["install","--no-immutable"],version:"stable",executable:"yarn dlx",semver:">=2"}]};function Pd(e){let{version:t,name:r}=e;return t?jf[r].find(n=>(0,TD.satisfies)(t,n.semver)):jf[r].find(n=>n.default)}async function Ld(e){let{to:t,logger:r,options:n}=e,i=r!=null?r:new Td(n),u=Pd(t);if(!u)throw new qe("Unsupported package manager version.",{type:"package_manager-unsupported_version"});if(i.subStep(`running "${u.command} ${u.installArgs}"`),!(n!=null&&n.dry)){let s;i!=null&&i.interactive&&(s=(0,OD.default)({text:"installing dependencies...",spinner:{frames:i.installerFrames()}}).start());try{await(0,RD.default)(u.command,u.installArgs,{cwd:e.project.paths.root}),s&&s.stop(),i.subStep("dependencies installed")}catch(o){throw i.subStepFailure("failed to install dependencies"),o}}}async function LD({project:e,to:t,logger:r,options:n}){if(r.header(`Converting project from ${e.packageManager} to ${t.name}.`),e.packageManager==t.name)throw new qe("You are already using this package manager",{type:"package_manager-already_in_use"});await Rr[e.packageManager].remove({project:e,to:t,logger:r,options:n}),await Rr[t.name].create({project:e,to:t,logger:r,options:n}),r.mainStep("Installing dependencies"),n!=null&&n.skipInstall?r.subStep(FD.default.yellow("Skipping install")):(await Rr[t.name].convertLock({project:e,logger:r,options:n}),await Ld({project:e,to:t,logger:r,options:n})),r.mainStep(`Cleaning up ${e.packageManager} workspaces`),await Rr[e.packageManager].clean({project:e,logger:r})}async function ID({root:e,to:t,options:r}){let n=new Td({...r,interactive:!1}),[i,u]=await Promise.all([Od({root:e}),Jx()]);await LD({project:i,to:{name:t,version:u[t].version},logger:n,options:r})}});j();var $i=Se(require("chalk")),y0=require("commander");j();var mu=Se(require("chalk")),gu=Se(require("update-check"));var ur={name:"create-turbo",version:"1.9.0",description:"Create a new Turborepo",homepage:"https://turbo.build/repo",license:"MPL-2.0",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/create-turbo"},bugs:{url:"https://github.com/vercel/turbo/issues"},bin:{"create-turbo":"dist/cli.js"},scripts:{build:"tsup",test:"jest",lint:"eslint src/**/*.ts","check-types":"tsc --noEmit"},dependencies:{"async-retry":"^1.3.3",chalk:"2.4.2",commander:"^10.0.0","cross-spawn":"^7.0.3",execa:"5.1.1","fs-extra":"^10.1.0",got:"^11.8.5","gradient-string":"^2.0.0",inquirer:"^8.0.0",ora:"4.1.1",rimraf:"^3.0.2",semver:"^7.3.8",tar:"6.1.13","update-check":"^1.5.4"},devDependencies:{"@turbo/workspaces":"workspace:*","@types/async-retry":"^1.4.5","@types/cross-spawn":"^6.0.2","@types/fs-extra":"^9.0.13","@types/gradient-string":"^1.1.2","@types/inquirer":"^7.3.1","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/rimraf":"^3.0.2","@types/semver":"^7.3.9","@types/tar":"^6.1.4",eslint:"^7.23.0",jest:"^27.4.3","strip-ansi":"^6.0.1","ts-jest":"^27.1.1",tsconfig:"workspace:*",tsup:"^5.10.3","turbo-utils":"workspace:*","turbo-test-utils":"workspace:*",typescript:"^4.5.5"},files:["dist"]};var C0=(0,gu.default)(ur).catch(()=>null);async function vn(){try{let e=await C0;e!=null&&e.latest&&(console.log(),console.log(mu.default.yellow.bold("A new version of `create-turbo` is available!")),console.log()),process.exit()}catch{}}j();var En=Se(require("chalk")),yu=Se(require("ora")),vu=Se(require("gradient-string")),_u="#0099F7",Eu="#F11712",k0="#FFFF00",cr=(0,vu.default)(_u,Eu),_n=En.default.hex(_u),F0=En.default.hex(Eu),R0=En.default.hex(k0),Sn=e=>(0,yu.default)({text:e,spinner:{frames:[" ",_n("> "),_n(">> "),_n(">>>")]}}),Hi=(...e)=>{console.log(_n.bold(">>>"),...e)},Pe=(...e)=>{console.error(F0.bold(">>>"),...e)},An=(...e)=>{console.error(R0.bold(">>>"),...e)};j();j();var yn=Se(require("path")),Ue=Se(require("chalk")),qt=Se(Fa());j();j();j();j();j();var ND=Object.create,Nd=Object.defineProperty,BD=Object.getOwnPropertyDescriptor,MD=Object.getOwnPropertyNames,jD=Object.getPrototypeOf,$D=Object.prototype.hasOwnProperty,ae=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),HD=(e,t)=>()=>(e&&(t=e(e=0)),t),U=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),GD=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of MD(t))!$D.call(e,i)&&i!==r&&Nd(e,i,{get:()=>t[i],enumerable:!(n=BD(t,i))||n.enumerable});return e},jt=(e,t,r)=>(r=e!=null?ND(jD(e)):{},GD(t||!e||!e.__esModule?Nd(r,"default",{value:e,enumerable:!0}):r,e)),H=HD(()=>{});H();var UD=U((e,t)=>{H();function r(n){return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t.exports.__esModule=!0,t.exports.default=t.exports,r(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),WD=U((e,t)=>{H();var r=UD().default;function n(){"use strict";t.exports=n=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var i={},u=Object.prototype,s=u.hasOwnProperty,o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",p=o.toStringTag||"@@toStringTag";function l(C,S,R){return Object.defineProperty(C,S,{value:R,enumerable:!0,configurable:!0,writable:!0}),C[S]}try{l({},"")}catch{l=function(C,S,R){return C[S]=R}}function f(C,S,R,L){var M=S&&S.prototype instanceof v?S:v,B=Object.create(M.prototype),Q=new w(L||[]);return B._invoke=function(Z,oe,N){var le="suspendedStart";return function(pe,ne){if(le==="executing")throw new Error("Generator is already running");if(le==="completed"){if(pe==="throw")throw ne;return P()}for(N.method=pe,N.arg=ne;;){var T=N.delegate;if(T){var I=k(T,N);if(I){if(I===m)continue;return I}}if(N.method==="next")N.sent=N._sent=N.arg;else if(N.method==="throw"){if(le==="suspendedStart")throw le="completed",N.arg;N.dispatchException(N.arg)}else N.method==="return"&&N.abrupt("return",N.arg);le="executing";var $=h(Z,oe,N);if($.type==="normal"){if(le=N.done?"completed":"suspendedYield",$.arg===m)continue;return{value:$.arg,done:N.done}}$.type==="throw"&&(le="completed",N.method="throw",N.arg=$.arg)}}}(C,R,Q),B}function h(C,S,R){try{return{type:"normal",arg:C.call(S,R)}}catch(L){return{type:"throw",arg:L}}}i.wrap=f;var m={};function v(){}function _(){}function E(){}var d={};l(d,a,function(){return this});var y=Object.getPrototypeOf,D=y&&y(y(O([])));D&&D!==u&&s.call(D,a)&&(d=D);var g=E.prototype=v.prototype=Object.create(d);function A(C){["next","throw","return"].forEach(function(S){l(C,S,function(R){return this._invoke(S,R)})})}function b(C,S){function R(M,B,Q,Z){var oe=h(C[M],C,B);if(oe.type!=="throw"){var N=oe.arg,le=N.value;return le&&r(le)=="object"&&s.call(le,"__await")?S.resolve(le.__await).then(function(pe){R("next",pe,Q,Z)},function(pe){R("throw",pe,Q,Z)}):S.resolve(le).then(function(pe){N.value=pe,Q(N)},function(pe){return R("throw",pe,Q,Z)})}Z(oe.arg)}var L;this._invoke=function(M,B){function Q(){return new S(function(Z,oe){R(M,B,Z,oe)})}return L=L?L.then(Q,Q):Q()}}function k(C,S){var R=C.iterator[S.method];if(R===void 0){if(S.delegate=null,S.method==="throw"){if(C.iterator.return&&(S.method="return",S.arg=void 0,k(C,S),S.method==="throw"))return m;S.method="throw",S.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var L=h(R,C.iterator,S.arg);if(L.type==="throw")return S.method="throw",S.arg=L.arg,S.delegate=null,m;var M=L.arg;return M?M.done?(S[C.resultName]=M.value,S.next=C.nextLoc,S.method!=="return"&&(S.method="next",S.arg=void 0),S.delegate=null,m):M:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,m)}function x(C){var S={tryLoc:C[0]};1 in C&&(S.catchLoc=C[1]),2 in C&&(S.finallyLoc=C[2],S.afterLoc=C[3]),this.tryEntries.push(S)}function F(C){var S=C.completion||{};S.type="normal",delete S.arg,C.completion=S}function w(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(x,this),this.reset(!0)}function O(C){if(C){var S=C[a];if(S)return S.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var R=-1,L=function M(){for(;++R<C.length;)if(s.call(C,R))return M.value=C[R],M.done=!1,M;return M.value=void 0,M.done=!0,M};return L.next=L}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=E,l(g,"constructor",E),l(E,"constructor",_),_.displayName=l(E,p,"GeneratorFunction"),i.isGeneratorFunction=function(C){var S=typeof C=="function"&&C.constructor;return!!S&&(S===_||(S.displayName||S.name)==="GeneratorFunction")},i.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,E):(C.__proto__=E,l(C,p,"GeneratorFunction")),C.prototype=Object.create(g),C},i.awrap=function(C){return{__await:C}},A(b.prototype),l(b.prototype,c,function(){return this}),i.AsyncIterator=b,i.async=function(C,S,R,L,M){M===void 0&&(M=Promise);var B=new b(f(C,S,R,L),M);return i.isGeneratorFunction(S)?B:B.next().then(function(Q){return Q.done?Q.value:B.next()})},A(g),l(g,p,"Generator"),l(g,a,function(){return this}),l(g,"toString",function(){return"[object Generator]"}),i.keys=function(C){var S=[];for(var R in C)S.push(R);return S.reverse(),function L(){for(;S.length;){var M=S.pop();if(M in C)return L.value=M,L.done=!1,L}return L.done=!0,L}},i.values=O,w.prototype={constructor:w,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(F),!C)for(var S in this)S.charAt(0)==="t"&&s.call(this,S)&&!isNaN(+S.slice(1))&&(this[S]=void 0)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var S=this;function R(oe,N){return B.type="throw",B.arg=C,S.next=oe,N&&(S.method="next",S.arg=void 0),!!N}for(var L=this.tryEntries.length-1;L>=0;--L){var M=this.tryEntries[L],B=M.completion;if(M.tryLoc==="root")return R("end");if(M.tryLoc<=this.prev){var Q=s.call(M,"catchLoc"),Z=s.call(M,"finallyLoc");if(Q&&Z){if(this.prev<M.catchLoc)return R(M.catchLoc,!0);if(this.prev<M.finallyLoc)return R(M.finallyLoc)}else if(Q){if(this.prev<M.catchLoc)return R(M.catchLoc,!0)}else{if(!Z)throw new Error("try statement without catch or finally");if(this.prev<M.finallyLoc)return R(M.finallyLoc)}}}},abrupt:function(C,S){for(var R=this.tryEntries.length-1;R>=0;--R){var L=this.tryEntries[R];if(L.tryLoc<=this.prev&&s.call(L,"finallyLoc")&&this.prev<L.finallyLoc){var M=L;break}}M&&(C==="break"||C==="continue")&&M.tryLoc<=S&&S<=M.finallyLoc&&(M=null);var B=M?M.completion:{};return B.type=C,B.arg=S,M?(this.method="next",this.next=M.finallyLoc,m):this.complete(B)},complete:function(C,S){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&S&&(this.next=S),m},finish:function(C){for(var S=this.tryEntries.length-1;S>=0;--S){var R=this.tryEntries[S];if(R.finallyLoc===C)return this.complete(R.completion,R.afterLoc),F(R),m}},catch:function(C){for(var S=this.tryEntries.length-1;S>=0;--S){var R=this.tryEntries[S];if(R.tryLoc===C){var L=R.completion;if(L.type==="throw"){var M=L.arg;F(R)}return M}}throw new Error("illegal catch attempt")},delegateYield:function(C,S,R){return this.delegate={iterator:O(C),resultName:S,nextLoc:R},this.method==="next"&&(this.arg=void 0),m}},i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),YD=U((e,t)=>{H();var r=WD()();t.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),KD=U((e,t)=>{"use strict";H();var r=(n,...i)=>new Promise(u=>{u(n(...i))});t.exports=r,t.exports.default=r}),VD=U((e,t)=>{"use strict";H();var r=KD(),n=i=>{if(!((Number.isInteger(i)||i===1/0)&&i>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let u=[],s=0,o=()=>{s--,u.length>0&&u.shift()()},a=(l,f,...h)=>{s++;let m=r(l,...h);f(m),m.then(o,o)},c=(l,f,...h)=>{s<i?a(l,f,...h):u.push(a.bind(null,l,f,...h))},p=(l,...f)=>new Promise(h=>c(l,h,...f));return Object.defineProperties(p,{activeCount:{get:()=>s},pendingCount:{get:()=>u.length},clearQueue:{value:()=>{u.length=0}}}),p};t.exports=n,t.exports.default=n}),QD=U((e,t)=>{"use strict";H();var r=VD(),n=class extends Error{constructor(o){super(),this.value=o}},i=async(o,a)=>a(await o),u=async o=>{let a=await Promise.all(o);if(a[1]===!0)throw new n(a[0]);return!1},s=async(o,a,c)=>{c={concurrency:1/0,preserveOrder:!0,...c};let p=r(c.concurrency),l=[...o].map(h=>[h,p(i,h,a)]),f=r(c.preserveOrder?1:1/0);try{await Promise.all(l.map(h=>f(u,h)))}catch(h){if(h instanceof n)return h.value;throw h}};t.exports=s,t.exports.default=s}),XD=U((e,t)=>{"use strict";H();var r=ae("path"),n=ae("fs"),{promisify:i}=ae("util"),u=QD(),s=i(n.stat),o=i(n.lstat),a={directory:"isDirectory",file:"isFile"};function c({type:l}){if(!(l in a))throw new Error(`Invalid type specified: ${l}`)}var p=(l,f)=>l===void 0||f[a[l]]();t.exports=async(l,f)=>{f={cwd:process.cwd(),type:"file",allowSymlinks:!0,...f},c(f);let h=f.allowSymlinks?s:o;return u(l,async m=>{try{let v=await h(r.resolve(f.cwd,m));return p(f.type,v)}catch{return!1}},f)},t.exports.sync=(l,f)=>{f={cwd:process.cwd(),allowSymlinks:!0,type:"file",...f},c(f);let h=f.allowSymlinks?n.statSync:n.lstatSync;for(let m of l)try{let v=h(r.resolve(f.cwd,m));if(p(f.type,v))return m}catch{}}}),JD=U((e,t)=>{"use strict";H();var r=ae("fs"),{promisify:n}=ae("util"),i=n(r.access);t.exports=async u=>{try{return await i(u),!0}catch{return!1}},t.exports.sync=u=>{try{return r.accessSync(u),!0}catch{return!1}}}),ZD=U((e,t)=>{"use strict";H();var r=ae("path"),n=XD(),i=JD(),u=Symbol("findUp.stop");t.exports=async(s,o={})=>{let a=r.resolve(o.cwd||""),{root:c}=r.parse(a),p=[].concat(s),l=async f=>{if(typeof s!="function")return n(p,f);let h=await s(f.cwd);return typeof h=="string"?n([h],f):h};for(;;){let f=await l({...o,cwd:a});if(f===u)return;if(f)return r.resolve(a,f);if(a===c)return;a=r.dirname(a)}},t.exports.sync=(s,o={})=>{let a=r.resolve(o.cwd||""),{root:c}=r.parse(a),p=[].concat(s),l=f=>{if(typeof s!="function")return n.sync(p,f);let h=s(f.cwd);return typeof h=="string"?n.sync([h],f):h};for(;;){let f=l({...o,cwd:a});if(f===u)return;if(f)return r.resolve(a,f);if(a===c)return;a=r.dirname(a)}},t.exports.exists=i,t.exports.sync.exists=i.sync,t.exports.stop=u}),et=U(e=>{"use strict";H(),e.fromCallback=function(t){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")t.apply(this,arguments);else return new Promise((r,n)=>{arguments[arguments.length]=(i,u)=>{if(i)return n(i);r(u)},arguments.length++,t.apply(this,arguments)})},"name",{value:t.name})},e.fromPromise=function(t){return Object.defineProperty(function(){let r=arguments[arguments.length-1];if(typeof r!="function")return t.apply(this,arguments);t.apply(this,arguments).then(n=>r(null,n),r)},"name",{value:t.name})}}),zD=U((e,t)=>{H();var r=ae("constants"),n=process.cwd,i=null,u=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||(i=n.call(process)),i};try{process.cwd()}catch{}typeof process.chdir=="function"&&(s=process.chdir,process.chdir=function(a){i=null,s.call(process,a)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s));var s;t.exports=o;function o(a){r.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&c(a),a.lutimes||p(a),a.chown=h(a.chown),a.fchown=h(a.fchown),a.lchown=h(a.lchown),a.chmod=l(a.chmod),a.fchmod=l(a.fchmod),a.lchmod=l(a.lchmod),a.chownSync=m(a.chownSync),a.fchownSync=m(a.fchownSync),a.lchownSync=m(a.lchownSync),a.chmodSync=f(a.chmodSync),a.fchmodSync=f(a.fchmodSync),a.lchmodSync=f(a.lchmodSync),a.stat=v(a.stat),a.fstat=v(a.fstat),a.lstat=v(a.lstat),a.statSync=_(a.statSync),a.fstatSync=_(a.fstatSync),a.lstatSync=_(a.lstatSync),a.chmod&&!a.lchmod&&(a.lchmod=function(d,y,D){D&&process.nextTick(D)},a.lchmodSync=function(){}),a.chown&&!a.lchown&&(a.lchown=function(d,y,D,g){g&&process.nextTick(g)},a.lchownSync=function(){}),u==="win32"&&(a.rename=typeof a.rename!="function"?a.rename:function(d){function y(D,g,A){var b=Date.now(),k=0;d(D,g,function x(F){if(F&&(F.code==="EACCES"||F.code==="EPERM")&&Date.now()-b<6e4){setTimeout(function(){a.stat(g,function(w,O){w&&w.code==="ENOENT"?d(D,g,x):A(F)})},k),k<100&&(k+=10);return}A&&A(F)})}return Object.setPrototypeOf&&Object.setPrototypeOf(y,d),y}(a.rename)),a.read=typeof a.read!="function"?a.read:function(d){function y(D,g,A,b,k,x){var F;if(x&&typeof x=="function"){var w=0;F=function(O,P,C){if(O&&O.code==="EAGAIN"&&w<10)return w++,d.call(a,D,g,A,b,k,F);x.apply(this,arguments)}}return d.call(a,D,g,A,b,k,F)}return Object.setPrototypeOf&&Object.setPrototypeOf(y,d),y}(a.read),a.readSync=typeof a.readSync!="function"?a.readSync:function(d){return function(y,D,g,A,b){for(var k=0;;)try{return d.call(a,y,D,g,A,b)}catch(x){if(x.code==="EAGAIN"&&k<10){k++;continue}throw x}}}(a.readSync);function c(d){d.lchmod=function(y,D,g){d.open(y,r.O_WRONLY|r.O_SYMLINK,D,function(A,b){if(A){g&&g(A);return}d.fchmod(b,D,function(k){d.close(b,function(x){g&&g(k||x)})})})},d.lchmodSync=function(y,D){var g=d.openSync(y,r.O_WRONLY|r.O_SYMLINK,D),A=!0,b;try{b=d.fchmodSync(g,D),A=!1}finally{if(A)try{d.closeSync(g)}catch{}else d.closeSync(g)}return b}}function p(d){r.hasOwnProperty("O_SYMLINK")&&d.futimes?(d.lutimes=function(y,D,g,A){d.open(y,r.O_SYMLINK,function(b,k){if(b){A&&A(b);return}d.futimes(k,D,g,function(x){d.close(k,function(F){A&&A(x||F)})})})},d.lutimesSync=function(y,D,g){var A=d.openSync(y,r.O_SYMLINK),b,k=!0;try{b=d.futimesSync(A,D,g),k=!1}finally{if(k)try{d.closeSync(A)}catch{}else d.closeSync(A)}return b}):d.futimes&&(d.lutimes=function(y,D,g,A){A&&process.nextTick(A)},d.lutimesSync=function(){})}function l(d){return d&&function(y,D,g){return d.call(a,y,D,function(A){E(A)&&(A=null),g&&g.apply(this,arguments)})}}function f(d){return d&&function(y,D){try{return d.call(a,y,D)}catch(g){if(!E(g))throw g}}}function h(d){return d&&function(y,D,g,A){return d.call(a,y,D,g,function(b){E(b)&&(b=null),A&&A.apply(this,arguments)})}}function m(d){return d&&function(y,D,g){try{return d.call(a,y,D,g)}catch(A){if(!E(A))throw A}}}function v(d){return d&&function(y,D,g){typeof D=="function"&&(g=D,D=null);function A(b,k){k&&(k.uid<0&&(k.uid+=4294967296),k.gid<0&&(k.gid+=4294967296)),g&&g.apply(this,arguments)}return D?d.call(a,y,D,A):d.call(a,y,A)}}function _(d){return d&&function(y,D){var g=D?d.call(a,y,D):d.call(a,y);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function E(d){if(!d||d.code==="ENOSYS")return!0;var y=!process.getuid||process.getuid()!==0;return!!(y&&(d.code==="EINVAL"||d.code==="EPERM"))}}}),ew=U((e,t)=>{H();var r=ae("stream").Stream;t.exports=n;function n(i){return{ReadStream:u,WriteStream:s};function u(o,a){if(!(this instanceof u))return new u(o,a);r.call(this);var c=this;this.path=o,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var p=Object.keys(a),l=0,f=p.length;l<f;l++){var h=p[l];this[h]=a[h]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){c._read()});return}i.open(this.path,this.flags,this.mode,function(m,v){if(m){c.emit("error",m),c.readable=!1;return}c.fd=v,c.emit("open",v),c._read()})}function s(o,a){if(!(this instanceof s))return new s(o,a);r.call(this),this.path=o,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var c=Object.keys(a),p=0,l=c.length;p<l;p++){var f=c[p];this[f]=a[f]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=i.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}),tw=U((e,t)=>{"use strict";H(),t.exports=n;var r=Object.getPrototypeOf||function(i){return i.__proto__};function n(i){if(i===null||typeof i!="object")return i;if(i instanceof Object)var u={__proto__:r(i)};else var u=Object.create(null);return Object.getOwnPropertyNames(i).forEach(function(s){Object.defineProperty(u,s,Object.getOwnPropertyDescriptor(i,s))}),u}}),Oe=U((e,t)=>{H();var r=ae("fs"),n=zD(),i=ew(),u=tw(),s=ae("util"),o,a;typeof Symbol=="function"&&typeof Symbol.for=="function"?(o=Symbol.for("graceful-fs.queue"),a=Symbol.for("graceful-fs.previous")):(o="___graceful-fs.queue",a="___graceful-fs.previous");function c(){}function p(d,y){Object.defineProperty(d,o,{get:function(){return y}})}var l=c;s.debuglog?l=s.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(l=function(){var d=s.format.apply(s,arguments);d="GFS4: "+d.split(/\n/).join(`
|
81
81
|
GFS4: `),console.error(d)}),r[o]||(f=global[o]||[],p(r,f),r.close=function(d){function y(D,g){return d.call(r,D,function(A){A||_(),typeof g=="function"&&g.apply(this,arguments)})}return Object.defineProperty(y,a,{value:d}),y}(r.close),r.closeSync=function(d){function y(D){d.apply(r,arguments),_()}return Object.defineProperty(y,a,{value:d}),y}(r.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){l(r[o]),ae("assert").equal(r[o].length,0)}));var f;global[o]||p(global,r[o]),t.exports=h(u(r)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!r.__patched&&(t.exports=h(r),r.__patched=!0);function h(d){n(d),d.gracefulify=h,d.createReadStream=N,d.createWriteStream=le;var y=d.readFile;d.readFile=D;function D(T,I,$){return typeof I=="function"&&($=I,I=null),Y(T,I,$);function Y(K,z,J,ee){return y(K,z,function(ie){ie&&(ie.code==="EMFILE"||ie.code==="ENFILE")?m([Y,[K,z,J],ie,ee||Date.now(),Date.now()]):typeof J=="function"&&J.apply(this,arguments)})}}var g=d.writeFile;d.writeFile=A;function A(T,I,$,Y){return typeof $=="function"&&(Y=$,$=null),K(T,I,$,Y);function K(z,J,ee,ie,ge){return g(z,J,ee,function(se){se&&(se.code==="EMFILE"||se.code==="ENFILE")?m([K,[z,J,ee,ie],se,ge||Date.now(),Date.now()]):typeof ie=="function"&&ie.apply(this,arguments)})}}var b=d.appendFile;b&&(d.appendFile=k);function k(T,I,$,Y){return typeof $=="function"&&(Y=$,$=null),K(T,I,$,Y);function K(z,J,ee,ie,ge){return b(z,J,ee,function(se){se&&(se.code==="EMFILE"||se.code==="ENFILE")?m([K,[z,J,ee,ie],se,ge||Date.now(),Date.now()]):typeof ie=="function"&&ie.apply(this,arguments)})}}var x=d.copyFile;x&&(d.copyFile=F);function F(T,I,$,Y){return typeof $=="function"&&(Y=$,$=0),K(T,I,$,Y);function K(z,J,ee,ie,ge){return x(z,J,ee,function(se){se&&(se.code==="EMFILE"||se.code==="ENFILE")?m([K,[z,J,ee,ie],se,ge||Date.now(),Date.now()]):typeof ie=="function"&&ie.apply(this,arguments)})}}var w=d.readdir;d.readdir=P;var O=/^v[0-5]\./;function P(T,I,$){typeof I=="function"&&($=I,I=null);var Y=O.test(process.version)?function(z,J,ee,ie){return w(z,K(z,J,ee,ie))}:function(z,J,ee,ie){return w(z,J,K(z,J,ee,ie))};return Y(T,I,$);function K(z,J,ee,ie){return function(ge,se){ge&&(ge.code==="EMFILE"||ge.code==="ENFILE")?m([Y,[z,J,ee],ge,ie||Date.now(),Date.now()]):(se&&se.sort&&se.sort(),typeof ee=="function"&&ee.call(this,ge,se))}}}if(process.version.substr(0,4)==="v0.8"){var C=i(d);B=C.ReadStream,Z=C.WriteStream}var S=d.ReadStream;S&&(B.prototype=Object.create(S.prototype),B.prototype.open=Q);var R=d.WriteStream;R&&(Z.prototype=Object.create(R.prototype),Z.prototype.open=oe),Object.defineProperty(d,"ReadStream",{get:function(){return B},set:function(T){B=T},enumerable:!0,configurable:!0}),Object.defineProperty(d,"WriteStream",{get:function(){return Z},set:function(T){Z=T},enumerable:!0,configurable:!0});var L=B;Object.defineProperty(d,"FileReadStream",{get:function(){return L},set:function(T){L=T},enumerable:!0,configurable:!0});var M=Z;Object.defineProperty(d,"FileWriteStream",{get:function(){return M},set:function(T){M=T},enumerable:!0,configurable:!0});function B(T,I){return this instanceof B?(S.apply(this,arguments),this):B.apply(Object.create(B.prototype),arguments)}function Q(){var T=this;ne(T.path,T.flags,T.mode,function(I,$){I?(T.autoClose&&T.destroy(),T.emit("error",I)):(T.fd=$,T.emit("open",$),T.read())})}function Z(T,I){return this instanceof Z?(R.apply(this,arguments),this):Z.apply(Object.create(Z.prototype),arguments)}function oe(){var T=this;ne(T.path,T.flags,T.mode,function(I,$){I?(T.destroy(),T.emit("error",I)):(T.fd=$,T.emit("open",$))})}function N(T,I){return new d.ReadStream(T,I)}function le(T,I){return new d.WriteStream(T,I)}var pe=d.open;d.open=ne;function ne(T,I,$,Y){return typeof $=="function"&&(Y=$,$=null),K(T,I,$,Y);function K(z,J,ee,ie,ge){return pe(z,J,ee,function(se,re){se&&(se.code==="EMFILE"||se.code==="ENFILE")?m([K,[z,J,ee,ie],se,ge||Date.now(),Date.now()]):typeof ie=="function"&&ie.apply(this,arguments)})}}return d}function m(d){l("ENQUEUE",d[0].name,d[1]),r[o].push(d),E()}var v;function _(){for(var d=Date.now(),y=0;y<r[o].length;++y)r[o][y].length>2&&(r[o][y][3]=d,r[o][y][4]=d);E()}function E(){if(clearTimeout(v),v=void 0,r[o].length!==0){var d=r[o].shift(),y=d[0],D=d[1],g=d[2],A=d[3],b=d[4];if(A===void 0)l("RETRY",y.name,D),y.apply(null,D);else if(Date.now()-A>=6e4){l("TIMEOUT",y.name,D);var k=D.pop();typeof k=="function"&&k.call(null,g)}else{var x=Date.now()-b,F=Math.max(b-A,1),w=Math.min(F*1.2,100);x>=w?(l("RETRY",y.name,D),y.apply(null,D.concat([A]))):r[o].push(d)}v===void 0&&(v=setTimeout(E,0))}}}),Bd=U(e=>{"use strict";H();var t=et().fromCallback,r=Oe(),n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(i=>typeof r[i]=="function");Object.keys(r).forEach(i=>{i!=="promises"&&(e[i]=r[i])}),n.forEach(i=>{e[i]=t(r[i])}),e.exists=function(i,u){return typeof u=="function"?r.exists(i,u):new Promise(s=>r.exists(i,s))},e.read=function(i,u,s,o,a,c){return typeof c=="function"?r.read(i,u,s,o,a,c):new Promise((p,l)=>{r.read(i,u,s,o,a,(f,h,m)=>{if(f)return l(f);p({bytesRead:h,buffer:m})})})},e.write=function(i,u,...s){return typeof s[s.length-1]=="function"?r.write(i,u,...s):new Promise((o,a)=>{r.write(i,u,...s,(c,p,l)=>{if(c)return a(c);o({bytesWritten:p,buffer:l})})})},typeof r.realpath.native=="function"&&(e.realpath.native=t(r.realpath.native))}),Md=U((e,t)=>{"use strict";H();var r=ae("path");function n(s){return s=r.normalize(r.resolve(s)).split(r.sep),s.length>0?s[0]:null}var i=/[<>:"|?*]/;function u(s){let o=n(s);return s=s.replace(o,""),i.test(s)}t.exports={getRootPath:n,invalidWin32Path:u}}),rw=U((e,t)=>{"use strict";H();var r=Oe(),n=ae("path"),i=Md().invalidWin32Path,u=parseInt("0777",8);function s(o,a,c,p){if(typeof a=="function"?(c=a,a={}):(!a||typeof a!="object")&&(a={mode:a}),process.platform==="win32"&&i(o)){let h=new Error(o+" contains invalid WIN32 path characters.");return h.code="EINVAL",c(h)}let l=a.mode,f=a.fs||r;l===void 0&&(l=u&~process.umask()),p||(p=null),c=c||function(){},o=n.resolve(o),f.mkdir(o,l,h=>{if(!h)return p=p||o,c(null,p);switch(h.code){case"ENOENT":if(n.dirname(o)===o)return c(h);s(n.dirname(o),a,(m,v)=>{m?c(m,v):s(o,a,c,v)});break;default:f.stat(o,(m,v)=>{m||!v.isDirectory()?c(h,p):c(null,p)});break}})}t.exports=s}),nw=U((e,t)=>{"use strict";H();var r=Oe(),n=ae("path"),i=Md().invalidWin32Path,u=parseInt("0777",8);function s(o,a,c){(!a||typeof a!="object")&&(a={mode:a});let p=a.mode,l=a.fs||r;if(process.platform==="win32"&&i(o)){let f=new Error(o+" contains invalid WIN32 path characters.");throw f.code="EINVAL",f}p===void 0&&(p=u&~process.umask()),c||(c=null),o=n.resolve(o);try{l.mkdirSync(o,p),c=c||o}catch(f){if(f.code==="ENOENT"){if(n.dirname(o)===o)throw f;c=s(n.dirname(o),a,c),s(o,a,c)}else{let h;try{h=l.statSync(o)}catch{throw f}if(!h.isDirectory())throw f}}return c}t.exports=s}),ot=U((e,t)=>{"use strict";H();var r=et().fromCallback,n=r(rw()),i=nw();t.exports={mkdirs:n,mkdirsSync:i,mkdirp:n,mkdirpSync:i,ensureDir:n,ensureDirSync:i}}),jd=U((e,t)=>{"use strict";H();var r=Oe(),n=ae("os"),i=ae("path");function u(){let p=i.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));p=i.join(n.tmpdir(),p);let l=new Date(1435410243862);r.writeFileSync(p,"https://github.com/jprichardson/node-fs-extra/pull/141");let f=r.openSync(p,"r+");return r.futimesSync(f,l,l),r.closeSync(f),r.statSync(p).mtime>1435410243e3}function s(p){let l=i.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));l=i.join(n.tmpdir(),l);let f=new Date(1435410243862);r.writeFile(l,"https://github.com/jprichardson/node-fs-extra/pull/141",h=>{if(h)return p(h);r.open(l,"r+",(m,v)=>{if(m)return p(m);r.futimes(v,f,f,_=>{if(_)return p(_);r.close(v,E=>{if(E)return p(E);r.stat(l,(d,y)=>{if(d)return p(d);p(null,y.mtime>1435410243e3)})})})})})}function o(p){if(typeof p=="number")return Math.floor(p/1e3)*1e3;if(p instanceof Date)return new Date(Math.floor(p.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function a(p,l,f,h){r.open(p,"r+",(m,v)=>{if(m)return h(m);r.futimes(v,l,f,_=>{r.close(v,E=>{h&&h(_||E)})})})}function c(p,l,f){let h=r.openSync(p,"r+");return r.futimesSync(h,l,f),r.closeSync(h)}t.exports={hasMillisRes:s,hasMillisResSync:u,timeRemoveMillis:o,utimesMillis:a,utimesMillisSync:c}}),xi=U((e,t)=>{"use strict";H();var r=Oe(),n=ae("path"),i=10,u=5,s=0,o=process.versions.node.split("."),a=Number.parseInt(o[0],10),c=Number.parseInt(o[1],10),p=Number.parseInt(o[2],10);function l(){return a>i||a===i&&(c>u||c===u&&p>=s)}function f(D,g,A){l()?r.stat(D,{bigint:!0},(b,k)=>{if(b)return A(b);r.stat(g,{bigint:!0},(x,F)=>x?x.code==="ENOENT"?A(null,{srcStat:k,destStat:null}):A(x):A(null,{srcStat:k,destStat:F}))}):r.stat(D,(b,k)=>{if(b)return A(b);r.stat(g,(x,F)=>x?x.code==="ENOENT"?A(null,{srcStat:k,destStat:null}):A(x):A(null,{srcStat:k,destStat:F}))})}function h(D,g){let A,b;l()?A=r.statSync(D,{bigint:!0}):A=r.statSync(D);try{l()?b=r.statSync(g,{bigint:!0}):b=r.statSync(g)}catch(k){if(k.code==="ENOENT")return{srcStat:A,destStat:null};throw k}return{srcStat:A,destStat:b}}function m(D,g,A,b){f(D,g,(k,x)=>{if(k)return b(k);let{srcStat:F,destStat:w}=x;return w&&w.ino&&w.dev&&w.ino===F.ino&&w.dev===F.dev?b(new Error("Source and destination must not be the same.")):F.isDirectory()&&d(D,g)?b(new Error(y(D,g,A))):b(null,{srcStat:F,destStat:w})})}function v(D,g,A){let{srcStat:b,destStat:k}=h(D,g);if(k&&k.ino&&k.dev&&k.ino===b.ino&&k.dev===b.dev)throw new Error("Source and destination must not be the same.");if(b.isDirectory()&&d(D,g))throw new Error(y(D,g,A));return{srcStat:b,destStat:k}}function _(D,g,A,b,k){let x=n.resolve(n.dirname(D)),F=n.resolve(n.dirname(A));if(F===x||F===n.parse(F).root)return k();l()?r.stat(F,{bigint:!0},(w,O)=>w?w.code==="ENOENT"?k():k(w):O.ino&&O.dev&&O.ino===g.ino&&O.dev===g.dev?k(new Error(y(D,A,b))):_(D,g,F,b,k)):r.stat(F,(w,O)=>w?w.code==="ENOENT"?k():k(w):O.ino&&O.dev&&O.ino===g.ino&&O.dev===g.dev?k(new Error(y(D,A,b))):_(D,g,F,b,k))}function E(D,g,A,b){let k=n.resolve(n.dirname(D)),x=n.resolve(n.dirname(A));if(x===k||x===n.parse(x).root)return;let F;try{l()?F=r.statSync(x,{bigint:!0}):F=r.statSync(x)}catch(w){if(w.code==="ENOENT")return;throw w}if(F.ino&&F.dev&&F.ino===g.ino&&F.dev===g.dev)throw new Error(y(D,A,b));return E(D,g,x,b)}function d(D,g){let A=n.resolve(D).split(n.sep).filter(k=>k),b=n.resolve(g).split(n.sep).filter(k=>k);return A.reduce((k,x,F)=>k&&b[F]===x,!0)}function y(D,g,A){return`Cannot ${A} '${D}' to a subdirectory of itself, '${g}'.`}t.exports={checkPaths:m,checkPathsSync:v,checkParentPaths:_,checkParentPathsSync:E,isSrcSubdir:d}}),iw=U((e,t)=>{"use strict";H(),t.exports=function(r){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(r)}catch{return new Buffer(r)}return new Buffer(r)}}),ow=U((e,t)=>{"use strict";H();var r=Oe(),n=ae("path"),i=ot().mkdirsSync,u=jd().utimesMillisSync,s=xi();function o(g,A,b){typeof b=="function"&&(b={filter:b}),b=b||{},b.clobber="clobber"in b?!!b.clobber:!0,b.overwrite="overwrite"in b?!!b.overwrite:b.clobber,b.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
82
82
|
|
83
83
|
see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:k,destStat:x}=s.checkPathsSync(g,A,"copy");return s.checkParentPathsSync(g,k,A,"copy"),a(x,g,A,b)}function a(g,A,b,k){if(k.filter&&!k.filter(A,b))return;let x=n.dirname(b);return r.existsSync(x)||i(x),c(g,A,b,k)}function c(g,A,b,k){if(!(k.filter&&!k.filter(A,b)))return p(g,A,b,k)}function p(g,A,b,k){let x=(k.dereference?r.statSync:r.lstatSync)(A);if(x.isDirectory())return v(x,g,A,b,k);if(x.isFile()||x.isCharacterDevice()||x.isBlockDevice())return l(x,g,A,b,k);if(x.isSymbolicLink())return y(g,A,b,k)}function l(g,A,b,k,x){return A?f(g,b,k,x):h(g,b,k,x)}function f(g,A,b,k){if(k.overwrite)return r.unlinkSync(b),h(g,A,b,k);if(k.errorOnExist)throw new Error(`'${b}' already exists`)}function h(g,A,b,k){return typeof r.copyFileSync=="function"?(r.copyFileSync(A,b),r.chmodSync(b,g.mode),k.preserveTimestamps?u(b,g.atime,g.mtime):void 0):m(g,A,b,k)}function m(g,A,b,k){let x=iw()(65536),F=r.openSync(A,"r"),w=r.openSync(b,"w",g.mode),O=0;for(;O<g.size;){let P=r.readSync(F,x,0,65536,O);r.writeSync(w,x,0,P),O+=P}k.preserveTimestamps&&r.futimesSync(w,g.atime,g.mtime),r.closeSync(F),r.closeSync(w)}function v(g,A,b,k,x){if(!A)return _(g,b,k,x);if(A&&!A.isDirectory())throw new Error(`Cannot overwrite non-directory '${k}' with directory '${b}'.`);return E(b,k,x)}function _(g,A,b,k){return r.mkdirSync(b),E(A,b,k),r.chmodSync(b,g.mode)}function E(g,A,b){r.readdirSync(g).forEach(k=>d(k,g,A,b))}function d(g,A,b,k){let x=n.join(A,g),F=n.join(b,g),{destStat:w}=s.checkPathsSync(x,F,"copy");return c(w,x,F,k)}function y(g,A,b,k){let x=r.readlinkSync(A);if(k.dereference&&(x=n.resolve(process.cwd(),x)),g){let F;try{F=r.readlinkSync(b)}catch(w){if(w.code==="EINVAL"||w.code==="UNKNOWN")return r.symlinkSync(x,b);throw w}if(k.dereference&&(F=n.resolve(process.cwd(),F)),s.isSrcSubdir(x,F))throw new Error(`Cannot copy '${x}' to a subdirectory of itself, '${F}'.`);if(r.statSync(b).isDirectory()&&s.isSrcSubdir(F,x))throw new Error(`Cannot overwrite '${F}' with '${x}'.`);return D(x,b)}else return r.symlinkSync(x,b)}function D(g,A){return r.unlinkSync(A),r.symlinkSync(g,A)}t.exports=o}),$d=U((e,t)=>{"use strict";H(),t.exports={copySync:ow()}}),Dt=U((e,t)=>{"use strict";H();var r=et().fromPromise,n=Bd();function i(u){return n.access(u).then(()=>!0).catch(()=>!1)}t.exports={pathExists:r(i),pathExistsSync:n.existsSync}}),sw=U((e,t)=>{"use strict";H();var r=Oe(),n=ae("path"),i=ot().mkdirs,u=Dt().pathExists,s=jd().utimesMillis,o=xi();function a(x,F,w,O){typeof w=="function"&&!O?(O=w,w={}):typeof w=="function"&&(w={filter:w}),O=O||function(){},w=w||{},w.clobber="clobber"in w?!!w.clobber:!0,w.overwrite="overwrite"in w?!!w.overwrite:w.clobber,w.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "create-turbo",
|
3
|
-
"version": "1.9.0
|
3
|
+
"version": "1.9.0",
|
4
4
|
"description": "Create a new Turborepo",
|
5
5
|
"homepage": "https://turbo.build/repo",
|
6
6
|
"license": "MPL-2.0",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
"update-check": "^1.5.4"
|
33
33
|
},
|
34
34
|
"devDependencies": {
|
35
|
-
"@turbo/workspaces": "1.9.0
|
35
|
+
"@turbo/workspaces": "1.9.0",
|
36
36
|
"@types/async-retry": "^1.4.5",
|
37
37
|
"@types/cross-spawn": "^6.0.2",
|
38
38
|
"@types/fs-extra": "^9.0.13",
|