@zuplo/core 5.2175.0 → 5.2176.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/create.index.minified.js +1 -1
- package/index.minified.js +1 -1
- package/package.json +1 -1
package/index.minified.js
CHANGED
|
@@ -299,7 +299,7 @@ globstar while`,t,_,r,m,g),this.matchOne(t.slice(_),r.slice(m),n))return this.de
|
|
|
299
299
|
`)}s(Mut,"generateRefs");function Uut(e,t,r,n,i,o,a){let u=[];u.push(`${r}: {`);let c=g1(e,t,n,i,o,a);return u.push(c),u.push("}"),u.join(`
|
|
300
300
|
`)}s(Uut,"getJsonEntry");function g1(e,t,r,n,i,o){let a=[];for(let u in r){let c=r[u];if(u==="$ref")return(0,Hm.chaseRefs)(e,t,(0,Hm.getFullyQualifiedRefName)(e,c),n,i,o),`$REF:${eae(t,o.get((0,Hm.getFullyQualifiedRefName)(e,c)))}`;switch(typeof c){case"string":{a.push(`"${u}": ${JSON.stringify(c)},`);break}case"number":case"boolean":{a.push(`"${u}":${c},`);break}default:if(Array.isArray(c))a.push(`"${u}":[`),c.forEach(l=>{if(typeof l=="object"){let f=g1(e,t,l,n,i,o);if(f.startsWith("$REF")){let d=f.split(":")[1];a.push(`${d},`)}else a.push("{"),a.push(f),a.push("},")}else a.push(`${JSON.stringify(l)},`)}),a.push("],");else{let l=g1(e,t,c,n,i,o);if(l.startsWith("$REF")){let f=l.split(":")[1];a.push(`${u}: ${f},`)}else a.push(`"${u}":{`),a.push(l),a.push("},")}}}return a.join(`
|
|
301
301
|
`)}s(g1,"processNode");function eae(e,t){return(0,Xoe.sanitizedIdentifierName)(e)+`_refsData_${t}`}s(eae,"getRefIdentifierName")});var nae=h(Km=>{"use strict";var E1=Km&&Km.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Km,"__esModule",{value:!0});Km.runtimeConfigPlugin=void 0;var xut=E1(_n()),qut=E1(require("fs/promises")),BF=E1(require("path")),Fut=E1(mn()),y1="runtime-config",rae="runtime-config-plugin";function kut(){return{name:y1,setup(e){e.onResolve({filter:/^\.\.\/modules\/zuplo.runtime.ts$/},t=>({namespace:rae,path:BF.default.isAbsolute(t.path)?t.path:BF.default.join(t.resolveDir,t.path),pluginName:y1})),e.onLoad({filter:/.*/,namespace:rae},async t=>Fut.default.timeFn("Generating zuplo.runtime.ts data",async()=>{let r="export const runtimeInit = undefined;",n=[];return await xut.default.fileExists(t.path)?(r=await qut.default.readFile(t.path,"utf-8"),{contents:r,loader:"ts",resolveDir:BF.default.dirname(t.path),errors:n,pluginName:y1,watchFiles:[t.path]}):{contents:r,loader:"ts",errors:n,pluginName:y1}}))}}}s(kut,"runtimeConfigPlugin");Km.runtimeConfigPlugin=kut});var cae=h(Ms=>{"use strict";var Fd=Ms&&Ms.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.isPolicyPresentInOperation=Ms.getPolicyNamesReferencingPolicyHandlers=Ms.schemaValidationSource=Ms.schemaValidationPlugin=void 0;var Wm=Gf(),HE=require("@zuplo/runtime/internal"),iae=Fd(_n()),But=Fd(cU()),Gut=Fd(lU()),b1=Fd(require("fs/promises")),Zc=Fd(require("path")),Vut=Fd(require("prettier")),GF=kt(),zut=Fd(Xs()),VF="schema-validation-plugin",sae="schema-validation",Hut="module.exports = {}";function Kut(e){return{name:"schema-validation-plugin",setup(t){t.onResolve({filter:/ajv-schema.json$/},r=>({namespace:sae,path:r.path,pluginName:VF})),t.onLoad({filter:/.*/,namespace:sae},async r=>{let n=Zc.default.resolve(e.sourceDirectory,GF.USER_CONFIG_DIR_NAME,"policies.json");if(!e.isOpenApiBased||!await iae.default.fileExists(n))return{contents:Hut,loader:"js",resolveDir:Zc.default.dirname(r.path),pluginName:VF};let i=await Wut(e.sourceDirectory),o=Zc.default.resolve(e.sourceDirectory,GF.USER_CONFIG_DIR_NAME),a=await(0,Wm.getOpenApiFilesByAlphabetical)(o),u=await Jut(a,i),c=await oae({oasFiles:a,routesWithSchemaValidation:u,sourceDirectory:e.sourceDirectory,logger:e.logger});if(zut.default.DEBUG_BUILD_MODE&&c){let l=Zc.default.join(e.sourceDirectory,GF.BUILD_OUTPUT_DIR),f=Zc.default.resolve(l,"schema-validation.js");await iae.default.mkdirForFilePathIfNotExits(f);let d=await Vut.default.format(c,{parser:"babel"});await b1.default.writeFile(f,d,"utf-8")}return{contents:c,loader:"js",resolveDir:Zc.default.dirname(r.path),pluginName:VF}})}}}s(Kut,"schemaValidationPlugin");Ms.schemaValidationPlugin=Kut;async function oae({oasFiles:e,routesWithSchemaValidation:t,sourceDirectory:r,logger:n}){let i="",o=new Wm.RefParser(r,n);if(t.length===0)return i;let a=new But.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});for(let u of e){let c=await b1.default.readFile(u,"utf-8"),l=Zc.default.basename(u,".oas.json"),f=t.filter(y=>y.fileName===l),d=await o.resolve(u),_=JSON.parse(c),m=[],g=new Map;f.forEach(y=>{let b=_.paths[y.path][y.method];if(b.requestBody){let E;if(b.requestBody.$ref){let S=b.requestBody.$ref;E=d.get(S)?.content}else b.requestBody.content&&(E=b.requestBody.content);if(E)for(let S in E){let O=E[S].schema,P=(0,HE.getIdForRequestBodySchema)(y.path,y.method,S);O.$id=P,a.addSchema(O),zF(O,u,l,a,d,m,g)}}if(b.parameters)for(let E of b.parameters){let S=E.$ref?d.get(E.$ref):E,O=S.schema.$ref?d.get(S.schema.$ref):S.schema,P=(0,HE.getIdForParameterSchema)(y.path,y.method,S.in,S.name);O.$id=P,a.addSchema(O),zF(S,u,l,a,d,m,g)}});for(let y of m){let b=d.get(y),E=(0,HE.getIdForRefSchema)(l,y);a.addSchema(b,E)}}return i=(0,Gut.default)(a),i}s(oae,"schemaValidationSource");Ms.schemaValidationSource=oae;function zF(e,t,r,n,i,o,a){for(let u in e){let c=e[u];if(u==="$ref"){let l=(0,HE.getIdForRefSchema)(r,(0,Wm.getFullyQualifiedRefName)(t,c));e[u]=l,(0,Wm.chaseRefs)(t,r,(0,Wm.getFullyQualifiedRefName)(t,c),i,o,a,(f,d)=>(0,HE.getIdForRefSchema)(f,(0,Wm.getFullyQualifiedRefName)(t,d)))}else typeof c=="object"&&zF(c,t,r,n,i,o,a)}}s(zF,"addRefsToSchema");async function Wut(e){let t=new Set(["RequestValidationInboundPolicy"]),r=await b1.default.readFile(`${e}/config/policies.json`,"utf-8"),n=JSON.parse(r);return aae(n,t)}s(Wut,"getPolicyNamesUsingSchemaValidationPolicies");function aae(e,t){let r=new Set;e.policies?.forEach(i=>{i.handler?.export&&t.has(i.handler.export)&&i.handler.module==="$import(@zuplo/runtime)"&&r.add(i.name)});let n=Yut(e,r);return new Set([...r,...n])}s(aae,"getPolicyNamesReferencingPolicyHandlers");Ms.getPolicyNamesReferencingPolicyHandlers=aae;function Yut(e,t){let r=new Set;return e.policies?.forEach(n=>{n.handler?.export==="CompositeInboundPolicy"&&n.handler?.options?.policies?.forEach(i=>{t.has(i)&&r.add(n.name)})}),r}s(Yut,"getCompositePoliciesContainingPolicy");function uae(e,t){if(!e["x-zuplo-route"]||!e["x-zuplo-route"].policies)return!1;let r=e["x-zuplo-route"].policies.inbound;if(r){for(let i of r)if(t.has(i))return!0}let n=e["x-zuplo-route"].policies.outbound;if(n){for(let i of n)if(t.has(i))return!0}return!1}s(uae,"isPolicyPresentInOperation");Ms.isPolicyPresentInOperation=uae;async function Jut(e,t){let r=[];for(let n of e){let i=await b1.default.readFile(n,"utf-8"),a=JSON.parse(i).paths;for(let u in a){let c=a[u];for(let l in c){let f=c[l];uae(f,t)&&r.push({fileName:Zc.default.basename(n,".oas.json"),path:u,method:l})}}}return r}s(Jut,"getRoutesContainingPolicies")});var HF=h(Qc=>{"use strict";var Xut=Qc&&Qc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.BUILD_CONDITIONS=void 0;var Zut=A9(),S1=Xut(require("path")),Qut=hy(),ect=R9(),tct=L9(),rct=x9(),nct=JX(),ict=QX(),sct=Woe(),oct=tae(),act=nae(),uct=cae(),cct=(0,Zut.debug)("zuplo:core:build");Qc.BUILD_CONDITIONS=["workerd","worker","browser"];var lae=[...process.env.GLOBAL_MODULE_LOCATION?[process.env.GLOBAL_MODULE_LOCATION]:[],S1.default.resolve(__dirname,"..","..","..","node_modules"),S1.default.resolve(__dirname,"..","..","..","..","..","node_modules"),...require.main?.paths??[]];async function lct({dev:e=!1,targetPlatform:t,systemDirectory:r,outputDirectory:n,sourceDirectory:i,logger:o,flags:a}){let u=S1.default.join(r,(0,Qut.getBuildEntry)(t));cct(`Building with node paths: ${lae.join(", ")}`);let c=e===!1?{minify:!0}:{minify:!1,keepNames:!0,metafile:!0},l={platform:"browser",target:"es2022",outfile:S1.default.join(n,"worker.js")};return{format:a?.esmWorker===!0?"esm":"iife",banner:{js:`'use strict';
|
|
302
|
-
`},nodePaths:lae,entryPoints:[u],...l,sourcemap:"linked",legalComments:"linked",treeShaking:!0,bundle:!0,...c,external:[],logLevel:"silent",conditions:Qc.BUILD_CONDITIONS,plugins:[(0,rct.environmentPlugin)({sourceDirectory:i,targetPlatform:t}),(0,ect.blockRemoteModulePlugin)({logger:o}),(0,sct.openApiRoutesPlugin)({sourceDirectory:i,outputDirectory:n}),(0,oct.rawRoutePlugin)({sourceDirectory:i,targetPlatform:t,logger:o}),(0,uct.schemaValidationPlugin)({sourceDirectory:i,logger:o,isOpenApiBased:!0}),(0,act.runtimeConfigPlugin)(),(0,tct.devPortalConfigPlugin)({sourceDirectory:i}),(0,nct.jsonSchemaPlugin)({sourceDirectory:i,outputDirectory:n}),(0,ict.nodejsCompatPlugin)({nodeCompatEnabled:a?.esmWorker===!0,sourceDirectory:i})]}}s(lct,"getBaseESBuildConfig");Qc.default=lct});var pae=h(Us=>{"use strict";var fct=Us&&Us.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),dct=Us&&Us.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pct=Us&&Us.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&fct(t,e,r);return dct(t,e),t},dae=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});Us.getRunEsBuildPlugin=void 0;var hct=Gf(),fae=Yo(),mct=pct(require("esbuild")),_ct=dae(mn()),gct=$P(),yct=dae(HF()),KF=hy(),Ect=s(function(e){return s(async function({systemDirectory:r,outputDirectory:n,sourceDirectory:i,dev:o,targetPlatform:a,generateSourceMaps:u,buildId:c,logger:l,config:f}){return _ct.default.timeFn("Running esbuild",async()=>{l.info(`Running build for platform ${a}, build_id: ${c}`);let d=await(0,yct.default)({systemDirectory:r,outputDirectory:n,targetPlatform:a,generateSourceMaps:u,sourceDirectory:i,dev:o,logger:l,flags:f.flags}),_,m=new Date;try{if(!await(0,hct.oasFileInProject)(i))throw new Error("Failed to build project because no open-api file was found on the 'config' folder");_=await mct.build(d)}catch(y){if(l.error(y),y.errors||y.warnings)_=y;else if(y.message.includes("Failed to build project because no open-api file was found on the 'config' folder"))_={warnings:[],errors:[{id:"missing-open-api-file",text:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:KF.ESBUILD_PLUGIN_NAME,location:null,notes:[],detail:"Failed to build project because no open-api file was found on the 'config' folder"}],outputFiles:void 0,metafile:void 0,mangleCache:void 0};else throw y}let g=new Date;if(e(new gct.CompilerResult(_,{endBuildTime:g,startBuildTime:m,buildId:c??""})),_.errors.length>0){_.errors.length>1&&(_.errors.length=1);let y=_.errors[0];l.debug(y)}return{warnings:[..._.warnings.map(y=>({message:y.text,pluginName:KF.ESBUILD_PLUGIN_NAME,severity:fae.WARNING_SEVERITY}))],errors:[..._.errors.map(y=>({message:y.text,pluginName:KF.ESBUILD_PLUGIN_NAME,severity:fae.ERROR_SEVERITY}))]}})},"runEsbuild")},"getRunEsBuildPlugin");Us.getRunEsBuildPlugin=Ect});var YF=h(Jm=>{"use strict";var mae=Jm&&Jm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.build=void 0;var Ym=Yo(),bct=require("crypto"),Sct=require("fs"),KE=mae(require("path")),hae=kt(),vct=rc(),Oct=mae(mn()),Pct=Bz(),wct=th(),Ict=zz(),Tct=Hz(),Nct=Kz(),Act=Zz(),Rct=Qz(),Cct=nH(),$ct=p9(),Dct=m9(),Lct=pae(),WF=hy(),v1;try{let e=(0,Sct.readFileSync)(KE.default.resolve(__dirname,"../../package.json"),"utf-8");v1=JSON.parse(e).version}catch{v1="0.0.0"}async function jct({sourceDirectory:e,dev:t,targetPlatform:r,generateSourceMaps:n=!1,noCompile:i=!1,deploymentName:o=KE.default.basename(e),logger:a,publicZuploEnvironmentVariables:u={},entitlements:c,projectId:l,customDomain:f,environmentType:d,postBuildTasks:_}){let m=(0,bct.randomUUID)(),g=a.child({buildId:m});return Oct.default.timeFn(`Run Build for platform: ${r}, build_id: ${m}`,async()=>{let y=await(0,Pct.getZuploConfig)(e),b=KE.default.join(e,hae.BUILD_OUTPUT_DIR),E;if("errors"in y)E={status:"Failed",flags:void 0,compatibilityDate:void 0,runtimeVersion:v1,outputPath:b,buildTaskResult:{buildTime:"",buildTimeMs:0,status:Ym.FAILURE_STATUS,buildId:m,warnings:[],errors:y.errors}};else{let O={dev:t,targetPlatform:r,generateSourceMaps:n,deploymentName:o,sourceDirectory:e,outputDirectory:b,systemDirectory:KE.default.join(e,hae.GENERATED_SOURCE_DIR_NAME),buildId:m,logger:g,config:y.config,publicZuploEnvironmentVariables:u,projectId:l,entitlements:c,customDomain:f,environmentType:d},P=[];P.push(Ict.cleanOutput),P.push(Tct.createSystemDir),P.push(Nct.checkForDeprecations),P.push(Act.generateBuildData),P.push(Cct.validateDevPortalJSON),P.push($ct.validateOpenAPIFiles),r==wct.TargetPlatform.Worker&&P.push(Rct.generateWorker);let I,j=s(Q=>{I=Q},"compileCallback");i||P.push((0,Lct.getRunEsBuildPlugin)(j)),P.push(Dct.verifyWorkerOutput),_&&P.push(..._);let x=await(0,vct.runPlugins)(P,O),H=x.errors.length>0?Ym.FAILURE_STATUS:x.warnings.length>0?Ym.WARNING_STATUS:Ym.GOOD_STATUS;E={status:H==="Failed"||I===void 0||I.status==="Failed"?"Failed":H==="Warnings"||I.status==="Warnings"?"Warnings":"Good",compatibilityDate:y.config.compatibilityDate,runtimeVersion:v1,outputPath:b,compilerResult:I,buildTaskResult:{buildTime:"",buildTimeMs:0,status:H,buildId:m,warnings:x.warnings,errors:x.errors},flags:y.config.flags}}if(E.buildTaskResult.warnings.length>0){E.buildTaskResult.warnings.forEach(P=>{g.warn(P)});let O=E.buildTaskResult.warnings.filter(P=>P.pluginName!=="runEsbuild"&&P.pluginName!==WF.ESBUILD_PLUGIN_NAME);O.length>0&&(E.buildTaskResult.warnings=O),E.buildTaskResult.status=Ym.WARNING_STATUS}if(E.buildTaskResult.errors.length>0){E.buildTaskResult.errors.forEach(P=>{g.error(P)});let O=E.buildTaskResult.errors.filter(P=>P.pluginName!=="runEsbuild"&&P.pluginName!==WF.ESBUILD_PLUGIN_NAME);O.length>0&&(E.buildTaskResult.errors=O),E.buildTaskResult.status=Ym.FAILURE_STATUS}if(g.debug(`Build ${E.compilerResult?.buildId??m} completed ${i?"on watch mode":"with compiler status "+E.compilerResult?.status} and build task status ${E.buildTaskResult.status}`),E.compilerResult){let{metafile:O,...P}=E.compilerResult;g.debug(`Compiler results for build ${E.compilerResult?.buildId??m}`,P)}g.debug(`Build task results for build ${E.buildTaskResult?.buildId??m}`,E.buildTaskResult);let S=KE.default.basename(e);return(0,WF.formatBuildResult)(E,S,g)})}s(jct,"build");Jm.build=jct});var P1=h(xs=>{"use strict";var Mct=xs&&xs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Uct=xs&&xs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xct=xs&&xs.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Mct(t,e,r);return Uct(t,e),t},O1=xs&&xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xs,"__esModule",{value:!0});xs.BuildWatcher=void 0;var _ae=Yo(),qct=O1(require("chokidar")),Fct=xct(require("esbuild")),gae=require("crypto"),kct=O1(require("events")),WE=O1(require("path")),yae=kt(),Bct=YF(),Eae=$P(),Gct=O1(HF()),bae=hy(),JF=class extends kct.default{static{s(this,"WatchEmitter")}},XF=class{static{s(this,"BuildWatcher")}esbuildContext;emitter=new JF;envFilesWatcher;outputDirectory;sourceDirectory;dev;targetPlatform;generateSourceMaps;logger;publicZuploEnvironmentVariables;projectName;constructor({sourceDirectory:t,dev:r,targetPlatform:n,generateSourceMaps:i,logger:o,publicZuploEnvironmentVariables:a={}}){this.sourceDirectory=t,this.dev=r,this.targetPlatform=n,this.outputDirectory=WE.default.join(t,yae.BUILD_OUTPUT_DIR),this.generateSourceMaps=i??!1,this.logger=o,this.publicZuploEnvironmentVariables=a,this.projectName=WE.default.basename(t),this.envFilesWatcher=qct.default.watch([WE.default.join(t,".env"),WE.default.join(t,".env.zuplo")])}watchEnvFiles(){this.envFilesWatcher.on("change",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("add",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("unlink",async()=>{this.emitter.emit("reload",null,null)})}onReload=t=>{this.emitter.on("reload",t)};async start(){let{sourceDirectory:t}=this;if(this.esbuildContext!==void 0)throw new Error("Watcher cannot be started more than once");let r=await(0,Bct.build)({sourceDirectory:t,noCompile:!0,dev:this.dev,targetPlatform:this.targetPlatform,generateSourceMaps:this.generateSourceMaps,publicZuploEnvironmentVariables:this.publicZuploEnvironmentVariables,logger:this.logger}),n=await(0,Gct.default)({systemDirectory:WE.default.join(t,yae.GENERATED_SOURCE_DIR_NAME),outputDirectory:this.outputDirectory,targetPlatform:this.targetPlatform,sourceDirectory:t,dev:this.dev,generateSourceMaps:this.generateSourceMaps,logger:this.logger,flags:r.flags}),i=this;n.plugins?.push({name:"on-end",setup(o){o.onEnd(a=>{i.logger.debug("Watcher (build) reloaded");let u;if(a)if(u=new Eae.CompilerResult(a),u.errors.length>0){let c={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:_ae.FAILURE_STATUS,buildId:(0,gae.randomUUID)(),warnings:[],errors:[]}};c.compilerResult=u,(0,bae.formatBuildResult)(c,i.projectName,i.logger),i.logger.error(c.compilerResult.errors,"Build errors")}else i.logger.debug(`Successfully rebuilt watched project. Build id ${u.buildId}`);i.emitter.emit("reload",r,null,u)})}}),this.esbuildContext=await Fct.context(n);try{let o=await this.esbuildContext.rebuild();if(o.errors.length>0){let a={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:_ae.FAILURE_STATUS,buildId:(0,gae.randomUUID)(),warnings:[],errors:[]}};a.compilerResult=new Eae.CompilerResult(o),(0,bae.formatBuildResult)(a,this.projectName,this.logger),this.logger.error(a.compilerResult.errors,"Build errors")}}catch(o){throw await this.close(),o}await this.esbuildContext.watch()}async close(){try{await this.envFilesWatcher.close(),this.esbuildContext&&(await this.esbuildContext.dispose(),this.logger.debug("ESBuild watcher closed"))}catch(t){this.logger.error(t)}}};xs.BuildWatcher=XF});var ZF=h(w1=>{"use strict";Object.defineProperty(w1,"__esModule",{value:!0});w1.HttpStatusCode=void 0;var Sae;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(Sae||(w1.HttpStatusCode=Sae={}))});var vae=h(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});I1.getSourceControlProviderLabel=void 0;function Vct(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}s(Vct,"getSourceControlProviderLabel");I1.getSourceControlProviderLabel=Vct});var Pae=h(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.DEPLOYMENT_NO_ACCESS=v.INVALID_SOURCE_REPO_URL=v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=v.PROJECT_MUST_HAVE_ONE_MEMBER=v.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=v.PROJECT_MEMBER_ALREADY_EXISTS=v.PROJECT_MEMBER_NOT_FOUND=v.INVALID_TEMPLATE_REPOSITORY=v.INCORRECT_PROJECT_TEMPLATE=v.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=v.PROJECT_NOT_FOUND=v.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=v.PROJECT_SHARING_DISABLED_ON_ACCOUNT=v.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=v.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=v.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=v.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=v.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=v.ACCOUNT_MEMBER_INVITE_INVALID=v.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=v.ACCOUNT_MEMBER_DOES_NOT_EXIST=v.ACCOUNT_MEMBER_INFO_MISSING=v.ACCOUNT_MEMBER_ALREADY_EXISTS=v.ACCOUNT_UPDATE_INFO_MISSING=v.ACCOUNT_INFO_MISSING=v.ACCOUNT_DOES_NOT_EXISTS=v.INVALID_ACCOUNT_LABEL_ENDING=v.INVALID_ACCOUNT_NAME_ENDING=v.ACCOUNT_NAME_ALREADY_IN_USE=v.INVALID_ACCOUNT_LABEL=v.INVALID_ACCOUNT_NAME=v.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED=v.ACCOUNT_NAME_LENGTH_LIMIT_REACHED=v.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=v.ACCOUNT_NAME_USES_RESERVED_KEYWORD=v.ACCOUNT_ALREADY_EXISTS=v.ACCOUNT_NOT_FOUND=v.USER_IS_NOT_SERVICE_ACCOUNT=v.USER_REMOVE_NOT_MEMBER_ACCOUNT=v.USER_HAS_NO_ACCESS_TO_ACCOUNT=v.USER_DETAILS_CANNOT_BE_FOUND=v.USER_ALREADY_EXISTS=v.CLIENT_NOT_FOUND=v.FORBIDDEN=v.UNAUTHORIZED=v.METHOD_NOT_ALLOWED=v.NOT_FOUND=v.CONFLICT=v.BAD_REQUEST=v.INTERNAL_SERVER_ERROR=void 0;v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=v.GITHUB_INTEGRATION_ALREADY_EXISTS=v.FEATURE_FLAGS_NOT_FOUND=v.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=v.PROJECT_ALREADY_HAS_REPO=v.PROJECT_INVALID_NAME=v.FAILED_TO_REVOKE_GH_TOKEN=v.USER_ACCOUNT_NOT_FS_MIGRATED=v.USER_NO_ACCESS_GITLAB_REPO=v.USER_NO_ACCESS_BITBUCKET_REPO=v.GITHUB_APP_CONFIGURATION_NOT_FOUND=v.GITHUB_APP_NO_USER_ACCESS_=v.GITHUB_APP_NO_NAMESPACE_ACCESS=v.GENERIC_GITHUB_BRANCH_INFO_ERROR=v.GITHUB_USER_NO_READ_ACCESS_REPO=v.USER_NO_PULL_ACCESS_GITHUB_REPO=v.USER_NO_ACCESS_GITHUB_REPO=v.PROJECT_SHARING_REQUIRES_GIT_REPO=v.PROJECT_INVALID_GIT_REPO=v.PROJECT_INVALID_GIT_CLONE=v.USER_IS_PROJECT_MEMBER=v.USER_HAS_NO_ACCESS_TO_PROJECT=v.RUNTIME_FLAG_KEY_NOT_VALID=v.RUNTIME_FLAG_NOT_FOUND=v.RUNTIME_FLAG_ALREADY_EXISTS=v.PROJECT_NO_MEMBERS=v.PROJECT_ALREADY_EXISTS=v.SERVICE_CONFIGURATION_FAILED_DECRYPTION=v.WORKING_COPY_SERVICE_NOT_CREATED=v.WORKING_COPY_SERVICE_NOT_DELETED=v.WORKING_COPY_SERVICE_NOT_FOUND=v.SERVICE_CONFIGURATION_NOT_FOUND=v.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=v.DEPLOYMENT_INCORRECT_STATUS_PAUSE=v.DEPLOYMENT_NOT_WORKING_COPY=v.DEPLOYMENT_LOG_NOT_FOUND=v.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=v.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=v.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=v.DEPLOYMENT_DELETE_ERROR=v.DEPLOYMENT_CANNOT_DELETE_INSTANCE=v.DEPLOYMENT_INVALID_MULTI_PART=v.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=v.DEPLOYMENT_FILE_DOES_NOT_EXISTS=v.DEPLOYMENT_NOT_FOUND=v.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=v.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=void 0;v.DUPLICATE_ENVIRONMENT_VARIABLE=v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=v.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=v.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=v.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=v.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=v.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=v.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=v.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=v.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=v.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=v.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=v.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=v.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=v.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=v.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=v.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=v.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=v.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=v.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=v.SOURCE_CONTROL_REPO_OPERATION_ERROR=v.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=v.SOURCE_CONTROL_REPO_NOT_FOUND=v.SOURCE_CONTROL_AUTHENTICATION_FAILED=v.EXTERNAL_SERVICE_GENERIC_ERROR=v.API_USER_NO_ACCESS=v.EXTERNAL_USER_NOT_CONFIGURED=v.EXTERNAL_USER_NO_ACCESS=v.CONSUMER_CANNOT_BE_CREATED=v.CONSUMER_DOES_NOT_EXIST=v.CONSUMER_NO_ACCESS=v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=v.GITLAB_DUPLICATE_REPO=v.GITLAB_FAILED_DURING_REPO_CREATION=v.GITLAB_QUERY_USER_INFO_FAILED=v.BITBUCKET_FAILED_DURING_REPO_CREATION=v.BITBUCKET_WORKSPACE_MISCONFIGURATION=v.BITBUCKET_QUERY_USER_INFO_FAILED=v.GITHUB_INTEGRATION_INVALID_REPO=v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=v.GITHUB_INTEGRATION_DUPLICATE_REPO=v.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=v.GITHUB_INTEGRATION_BRANCH_BEHIND=v.GITHUB_INTEGRATION_NOT_FOUND=v.GITHUB_REPOSITORY_NOT_FOUND=void 0;v.METERING_BUCKET_CREATION_FAILED=v.UNABLE_UPGRADE_PLAN=v.BUCKET_NOT_FOUND=v.BUCKET_API_KEY_SERVICE_CONFLICT=v.DIRECTORY_DELETE_FAILED=v.FILE_DELETE_FAILED=v.CANNOT_DELETE_SOLE_OPEN_API_FILE=v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=v.CANNOT_DELETE_ESSENTIAL_FILE=v.FILE_WRITE_FAILED=v.FILE_RENAME_FAILED=v.FILE_RENAME_FILE_ALREADY_EXISTS=v.FILE_RENAME_CANNOT_CHANGE_EXTENSION=v.FILE_RENAME_PATHS_MATCH=v.DIRECTORY_CREATION_FAILED=v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=v.DIRECTORY_DOES_NOT_EXIST=v.DIRECTORY_ALREADY_EXISTS=v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=v.FAILED_DOWNLOAD_FROM_STORAGE=v.CANNOT_FIND_SRC_DIRECTORY=v.CANNOT_READ_PACKAGE_JSON=v.PACKAGE_JSON_NOT_FOUND=v.RUNTIME_VERSION_INCORRECT_FORMAT=v.MIGRATIONS_ONLY_ON_WORKING_COPY=v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=v.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=v.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=v.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=v.NO_GLOBAL_SYMBOLS=v.NO_ZUPLO_PREFIXED_VARIABLES=v.NON_EMPTY_TARGETS_REQUIRED=v.CONFLICTING_TYPES=v.OVERLAPPING_TARGETS=v.INVALID_BRANCH_NAME=v.TARGET_BRANCH_ONLY_FOR_PREVIEW=v.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=v.DEPLOYMENT_NAME_MISSING=v.NON_EXISTENT_ENVIRONMENT_VARIABLE=v.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=void 0;var A=ZF(),Oae=vae(),zct="https://github.com/apps/zuplo/installations/new";v.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:A.HttpStatusCode.BAD_REQUEST};v.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:A.HttpStatusCode.CONFLICT};v.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:A.HttpStatusCode.NOT_FOUND};v.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:A.HttpStatusCode.METHOD_NOT_ALLOWED};v.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:A.HttpStatusCode.UNAUTHORIZED};v.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:A.HttpStatusCode.FORBIDDEN};v.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:A.HttpStatusCode.NOT_FOUND};v.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:A.HttpStatusCode.CONFLICT};v.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:A.HttpStatusCode.UNAUTHORIZED};v.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:A.HttpStatusCode.BAD_REQUEST};v.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:A.HttpStatusCode.CONFLICT};v.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-name-length-limit",title:"The account name exceeds the 200 character limit",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-label-length-limit",title:"The account label exceeds the 200 character limit",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_NAME={type:"https://zup.fail/invalid-account-name",title:"The account name can only contain lower-cased characters, numbers, dashes and underscores",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_LABEL={type:"https://zup.fail/invalid-account-label",title:"The account label can only contain alpha-numeric characters, spaces, dashes and underscores",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_ALREADY_IN_USE={type:"https://zup.fail/account-name-in-use",title:"The account name is already taken. Please try again using a different name.",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_NAME_ENDING={type:"https://zup.fail/invalid-account-name-ending",title:"The account name can not end with a dash or underscore character",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_LABEL_ENDING={type:"https://zup.fail/invalid-account-label-ending",title:"The account label can not end with a dash or underscore character",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:A.HttpStatusCode.BAD_REQUEST};v.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:A.HttpStatusCode.BAD_REQUEST};v.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:A.HttpStatusCode.BAD_REQUEST};v.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:A.HttpStatusCode.FORBIDDEN};v.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:A.HttpStatusCode.NOT_FOUND};v.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:A.HttpStatusCode.NOT_FOUND};v.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",status:A.HttpStatusCode.FORBIDDEN};v.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:A.HttpStatusCode.BAD_REQUEST};var Hct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:A.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");v.INVALID_TEMPLATE_REPOSITORY=Hct;v.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:A.HttpStatusCode.NOT_FOUND};v.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:A.HttpStatusCode.BAD_REQUEST};v.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:A.HttpStatusCode.BAD_REQUEST};v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:A.HttpStatusCode.FORBIDDEN};v.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:"Deployment is not working copy.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:A.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:A.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:A.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:A.HttpStatusCode.BAD_REQUEST};v.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:A.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:A.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:A.HttpStatusCode.BAD_REQUEST};v.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:A.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:A.HttpStatusCode.BAD_REQUEST};v.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:A.HttpStatusCode.FORBIDDEN};v.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:A.HttpStatusCode.BAD_REQUEST};var Kct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");v.USER_NO_ACCESS_GITHUB_REPO=Kct;var Wct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");v.USER_NO_PULL_ACCESS_GITHUB_REPO=Wct;var Yct=s(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");v.GITHUB_USER_NO_READ_ACCESS_REPO=Yct;v.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:A.HttpStatusCode.BAD_REQUEST};v.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:A.HttpStatusCode.FORBIDDEN};var Jct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${zct}' to add the repository.`,status:A.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");v.GITHUB_APP_NO_USER_ACCESS_=Jct;v.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:A.HttpStatusCode.NOT_FOUND};var Xct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");v.USER_NO_ACCESS_BITBUCKET_REPO=Xct;var Zct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");v.USER_NO_ACCESS_GITLAB_REPO=Zct;v.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:A.HttpStatusCode.FORBIDDEN};v.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:A.HttpStatusCode.BAD_REQUEST};v.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:A.HttpStatusCode.BAD_REQUEST};v.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:A.HttpStatusCode.BAD_REQUEST};var Qct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:A.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Qct;var elt=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:A.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");v.GITHUB_REPOSITORY_NOT_FOUND=elt;v.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:A.HttpStatusCode.NOT_FOUND,detail:"The project does not have a GitHub integration configured."};v.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:A.HttpStatusCode.BAD_REQUEST};v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:A.HttpStatusCode.FORBIDDEN};v.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:A.HttpStatusCode.FORBIDDEN};var tlt=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");v.GITHUB_INTEGRATION_DUPLICATE_REPO=tlt;var rlt=s(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=rlt;var nlt=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=nlt;var ilt=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=ilt;var slt=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");v.GITHUB_INTEGRATION_INVALID_REPO=slt;v.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:A.HttpStatusCode.FORBIDDEN};v.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:A.HttpStatusCode.FORBIDDEN};var olt=s(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:A.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");v.BITBUCKET_FAILED_DURING_REPO_CREATION=olt;v.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:A.HttpStatusCode.FORBIDDEN};var alt=s(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");v.GITLAB_FAILED_DURING_REPO_CREATION=alt;var ult=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");v.GITLAB_DUPLICATE_REPO=ult;var clt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=clt;var llt=s(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=llt;var flt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=flt;v.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:A.HttpStatusCode.UNAUTHORIZED};v.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist or cannot be accessed.",status:A.HttpStatusCode.NOT_FOUND};v.CONSUMER_CANNOT_BE_CREATED={type:"https://zup.fail/consumer-not-created",title:"Failed to create consumer",status:A.HttpStatusCode.BAD_GATEWAY};v.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:A.HttpStatusCode.UNAUTHORIZED};v.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:A.HttpStatusCode.FORBIDDEN};v.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:A.HttpStatusCode.FORBIDDEN};v.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};var dlt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${(0,Oae.getSourceControlProviderLabel)(e)}`,status:A.HttpStatusCode.UNAUTHORIZED}),"SOURCE_CONTROL_AUTHENTICATION_FAILED");v.SOURCE_CONTROL_AUTHENTICATION_FAILED=dlt;var plt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${(0,Oae.getSourceControlProviderLabel)(e)} repository`,status:A.HttpStatusCode.NOT_FOUND}),"SOURCE_CONTROL_REPO_NOT_FOUND");v.SOURCE_CONTROL_REPO_NOT_FOUND=plt;v.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:A.HttpStatusCode.BAD_REQUEST};var hlt=s(({repoURL:e,operation:t})=>({type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:"Verify your source control configuration and make sure you have been granted read & write access to the repository",status:A.HttpStatusCode.FORBIDDEN}),"SOURCE_CONTROL_REPO_OPERATION_ERROR");v.SOURCE_CONTROL_REPO_OPERATION_ERROR=hlt;v.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:"You do not have write access to the repository, verify your source control access configuration and try again.",detail:"Verify your source control configuration and make sure you have been granted access to the repository",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:A.HttpStatusCode.NOT_FOUND};v.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:A.HttpStatusCode.NOT_FOUND};v.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:A.HttpStatusCode.UNAUTHORIZED};v.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:A.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:A.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:A.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:A.HttpStatusCode.FORBIDDEN};v.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:A.HttpStatusCode.NOT_FOUND};v.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:A.HttpStatusCode.NOT_FOUND};v.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:A.HttpStatusCode.FAILED_DEPENDENCY};v.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:A.HttpStatusCode.FAILED_DEPENDENCY};v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:A.HttpStatusCode.FAILED_DEPENDENCY};v.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:A.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:A.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:A.HttpStatusCode.BAD_REQUEST};v.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:A.HttpStatusCode.BAD_REQUEST};v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:A.HttpStatusCode.BAD_REQUEST};v.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:A.HttpStatusCode.BAD_REQUEST};v.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:A.HttpStatusCode.BAD_REQUEST};v.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:A.HttpStatusCode.BAD_REQUEST};v.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:A.HttpStatusCode.BAD_REQUEST};v.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:A.HttpStatusCode.BAD_REQUEST};v.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:A.HttpStatusCode.BAD_REQUEST};v.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:A.HttpStatusCode.FORBIDDEN};v.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:A.HttpStatusCode.NOT_FOUND};var mlt=s(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify file on read-only environment",detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=mlt;var _lt=s(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify files on read-only environment",detail:"Cannot save files on a read-only environment. Read-only environments cannot be edited.",status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=_lt;v.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:"Migrations can only run on working copies.",status:A.HttpStatusCode.BAD_REQUEST};v.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:"Runtime version is in an incorrect format.",status:A.HttpStatusCode.BAD_REQUEST};v.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:"No package.json file found.",status:A.HttpStatusCode.NOT_FOUND};v.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:"Cannot read package.json file.",status:A.HttpStatusCode.BAD_REQUEST};v.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:"Cannot find source directory.",status:A.HttpStatusCode.BAD_REQUEST};v.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:"Failed to download content from storage.",status:A.HttpStatusCode.BAD_REQUEST};var glt=s(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot create directory on read-only environment",detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=glt;var ylt=s(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=ylt;var Elt=s(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:A.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");v.DIRECTORY_ALREADY_EXISTS=Elt;var blt=s(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:A.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");v.DIRECTORY_DOES_NOT_EXIST=blt;var Slt=s(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:A.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=Slt;var vlt=s(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");v.DIRECTORY_CREATION_FAILED=vlt;var Olt=s(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");v.FILE_RENAME_PATHS_MATCH=Olt;var Plt=s(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");v.FILE_RENAME_CANNOT_CHANGE_EXTENSION=Plt;var wlt=s(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");v.FILE_RENAME_FILE_ALREADY_EXISTS=wlt;var Ilt=s(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");v.FILE_RENAME_FAILED=Ilt;var Tlt=s(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");v.FILE_WRITE_FAILED=Tlt;var Nlt=s(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:A.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");v.CANNOT_DELETE_ESSENTIAL_FILE=Nlt;var Alt=s(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:A.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=Alt;var Rlt=s(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:A.HttpStatusCode.BAD_REQUEST,detail:"Your project must have at least 1 OpenAPI file."}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");v.CANNOT_DELETE_SOLE_OPEN_API_FILE=Rlt;var Clt=s(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");v.FILE_DELETE_FAILED=Clt;var $lt=s(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");v.DIRECTORY_DELETE_FAILED=$lt;v.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:A.HttpStatusCode.CONFLICT};v.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:A.HttpStatusCode.BAD_REQUEST};v.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR}});var Iae=h(Ti=>{"use strict";var Dlt=Ti&&Ti.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Llt=Ti&&Ti.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jlt=Ti&&Ti.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Dlt(t,e,r);return Llt(t,e),t};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ApiNotFoundError=Ti.ApiError=Ti.Problems=void 0;var wae=jlt(Pae());Ti.Problems=wae;var T1=class extends Error{static{s(this,"ApiError")}type;status;detail;instance;constructor(t){if(super(t.title),!t.type.startsWith("https://zup.fail/"))throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`);this.name="ApiProblemError",this.type=t.type,this.status=t.status,this.detail=t.detail,this.instance=t.instance}};Ti.ApiError=T1;var QF=class extends T1{static{s(this,"ApiNotFoundError")}constructor(t={}){super({...t,...wae.NOT_FOUND}),this.name="ApiNotFoundProblemError"}};Ti.ApiNotFoundError=QF});var Tae=h(wu=>{"use strict";var Mlt=wu&&wu.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ult=wu&&wu.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Mlt(t,e,r)};Object.defineProperty(wu,"__esModule",{value:!0});wu.HttpStatusCode=void 0;Ult(Iae(),wu);var xlt=ZF();Object.defineProperty(wu,"HttpStatusCode",{enumerable:!0,get:function(){return xlt.HttpStatusCode}})});var Aae=h((Eqt,Nae)=>{"use strict";function qlt(e){return e>=55296&&e<=56319}s(qlt,"isHighSurrogate");function Flt(e){return e>=56320&&e<=57343}s(Flt,"isLowSurrogate");Nae.exports=s(function(t,r,n){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,a,u,c=0;c<i;c+=1){if(a=r.charCodeAt(c),u=r[c],qlt(a)&&Flt(r.charCodeAt(c+1))&&(c+=1,u+=r[c]),o+=t(u),o===n)return r.slice(0,c+1);if(o>n)return r.slice(0,c-u.length+1)}return r},"truncate")});var Cae=h((Sqt,Rae)=>{"use strict";var klt=Aae(),Blt=Buffer.byteLength.bind(Buffer);Rae.exports=klt.bind(null,Blt)});var ek=h(Xm=>{"use strict";var Glt=Xm&&Xm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.sanitize=void 0;var Vlt=Glt(Cae()),zlt=/[/?<>\\:*|"]/g,Hlt=/[\x00-\x1f\x80-\x9f]/g,Klt=/^\.+$/,Wlt=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Ylt=/[. ]+$/;function Jlt(e,t=""){if(typeof e!="string")throw new Error("Input must be string");let r=e.replace(zlt,t).replace(Hlt,t).replace(Klt,t).replace(Wlt,t).replace(Ylt,t);return(0,Vlt.default)(r,255)}s(Jlt,"sanitize");Xm.sanitize=Jlt});var jae=h(Zm=>{"use strict";var Lae=Zm&&Zm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zm,"__esModule",{value:!0});Zm.createProjectDirs=void 0;var $ae=Lae(require("fs/promises")),Xlt=Lae(require("path")),YE=kt(),Dae=rc(),Zlt=s(async function({sourceDirectory:e,logger:t}){t.debug("Creating project directories");let r=[YE.USER_MODULES_DIR_NAME,YE.USER_CONFIG_DIR_NAME,YE.USER_TEST_DIR_NAME,YE.USER_SCHEMAS_DIR_NAME,YE.USER_DOCS_DIR_NAME,".vscode"];try{await $ae.default.mkdir(e);for(let n of r)await $ae.default.mkdir(Xlt.default.join(e,n),{recursive:!0})}catch(n){return t.error(n),new Dae.PluginResult({message:`Cannot create project directory tree at ${e}`,pluginName:"create-project-dirs",severity:"error"})}return new Dae.PluginResult},"createProjectDirs");Zm.createProjectDirs=Zlt});var qae=h(Qm=>{"use strict";var xae=Qm&&Qm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qm,"__esModule",{value:!0});Qm.generateFromTemplate=void 0;var Qlt=require("fs"),Mae=xae(require("fs/promises")),Uae=xae(require("path"));async function eft(e){let t=Uae.default.resolve(__dirname,"..","templates",e);if((0,Qlt.existsSync)(t))return await Mae.default.readFile(t,"utf-8");{let r=Uae.default.resolve(__dirname,"templates",e);return await Mae.default.readFile(r,"utf-8")}}s(eft,"generateFromTemplate");Qm.generateFromTemplate=eft});var Ni=h(e_=>{"use strict";var N1=e_&&e_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e_,"__esModule",{value:!0});e_.generateFileFromTemplate=void 0;var tft=N1(_n()),rft=N1(require("fs/promises")),nft=N1(require("path")),ift=N1(mn()),sft=qae(),oft=s(function(e,t){return async({sourceDirectory:r,logger:n})=>ift.default.timeFn(`Generating ${e}`,async()=>{n.debug(`Generating ${e}`);let i=nft.default.join(r,e);return await tft.default.fileExists(i)?(n.debug({sourceDirectory:r},`${e} already exists, skipping`),{warnings:[],errors:[]}):aft(i,t,n)})},"generateFileFromTemplate");e_.generateFileFromTemplate=oft;async function aft(e,t,r){let n=await(0,sft.generateFromTemplate)(t);try{await rft.default.writeFile(e,n,"utf-8"),r.debug(`File written to ${e}`)}catch(i){r.error(i);let o={message:`Error creating file at ${e}`,pluginName:"generate-file",severity:"error"};return{warnings:[],errors:[o]}}return{warnings:[],errors:[]}}s(aft,"writeTemplate")});var kae=h(t_=>{"use strict";var uft=t_&&t_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t_,"__esModule",{value:!0});t_.generateDefaultDocsMarkdown=void 0;var cft=uft(require("path")),Fae=kt(),lft=Ni();t_.generateDefaultDocsMarkdown=(0,lft.generateFileFromTemplate)(cft.default.join(Fae.USER_DOCS_DIR_NAME,Fae.DEFAULT_DOCS_MARKDOWN_FILE),"markdown.template.md")});var Gae=h(r_=>{"use strict";var fft=r_&&r_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r_,"__esModule",{value:!0});r_.generateDefaultDocsSidebar=void 0;var dft=fft(require("path")),Bae=kt(),pft=Ni();r_.generateDefaultDocsSidebar=(0,pft.generateFileFromTemplate)(dft.default.join(Bae.USER_DOCS_DIR_NAME,Bae.DOCS_SIDEBAR_FILE),"sidebar.template.json")});var zae=h(n_=>{"use strict";var hft=n_&&n_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n_,"__esModule",{value:!0});n_.generateDefaultDocsTheme=void 0;var mft=hft(require("path")),Vae=kt(),_ft=Ni();n_.generateDefaultDocsTheme=(0,_ft.generateFileFromTemplate)(mft.default.join(Vae.USER_DOCS_DIR_NAME,Vae.DOCS_THEME_FILE),"dev-portal.theme.template.css")});var Kae=h(i_=>{"use strict";var gft=i_&&i_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i_,"__esModule",{value:!0});i_.generateDefaultModule=void 0;var yft=gft(require("path")),Hae=kt(),Eft=Ni();i_.generateDefaultModule=(0,Eft.generateFileFromTemplate)(yft.default.join(Hae.USER_MODULES_DIR_NAME,Hae.DEFAULT_MODULE_FILE),"hello-world.template.ts")});var Yae=h(s_=>{"use strict";var bft=s_&&s_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s_,"__esModule",{value:!0});s_.generateDevPortalConfigJson=void 0;var Sft=bft(require("path")),Wae=kt(),vft=Ni();s_.generateDevPortalConfigJson=(0,vft.generateFileFromTemplate)(Sft.default.join(Wae.USER_CONFIG_DIR_NAME,Wae.DEV_PORTAL_CONFIG_FILE),"dev-portal.template.json")});var Jae=h(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.generateEnvironment=void 0;var Oft=Ni();A1.generateEnvironment=(0,Oft.generateFileFromTemplate)(".env","env.template")});var Xae=h(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.generateESLint=void 0;var Pft=Ni();R1.generateESLint=(0,Pft.generateFileFromTemplate)(".eslintrc.js","eslintrc.template.js")});var Zae=h(C1=>{"use strict";Object.defineProperty(C1,"__esModule",{value:!0});C1.generateGitignore=void 0;var wft=Ni();C1.generateGitignore=(0,wft.generateFileFromTemplate)(".gitignore","gitignore.template.ignore")});var Qae=h(o_=>{"use strict";var Ift=o_&&o_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o_,"__esModule",{value:!0});o_.generateLaunchJson=void 0;var Tft=Ift(require("path")),Nft=Ni();o_.generateLaunchJson=(0,Nft.generateFileFromTemplate)(Tft.default.join(".vscode","launch.json"),"launch.template.jsonc")});var tue=h(a_=>{"use strict";var Aft=a_&&a_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a_,"__esModule",{value:!0});a_.generateRouteOasConfig=void 0;var Rft=Aft(require("path")),eue=kt(),Cft=Ni();a_.generateRouteOasConfig=(0,Cft.generateFileFromTemplate)(Rft.default.join(eue.USER_CONFIG_DIR_NAME,eue.ROUTES_OAS_CONFIG_FILE),"routes.oas.template.json")});var iue=h(qs=>{"use strict";var tk=qs&&qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qs,"__esModule",{value:!0});qs.updateProjectPackageJson=qs.getProjectPackageJson=qs.getPackageOverrides=qs.generateDefaultPackageJson=void 0;var rue=tk(require("fs/promises")),rk=tk(require("path")),$ft=tk(Xs());async function Dft(e,t=$ft.default.USE_MONOREPO_PACKAGES){let r={name:e,version:"1.0.0",author:"",copyright:"",scripts:{dev:"zup dev",test:"zup test"},dependencies:{zuplo:"latest"}};if(t){let n=nue();r.overrides=n,r.dependencies["@zuplo/runtime"]=n["@zuplo/runtime"],r.devDependencies&&"@zuplo/core"in r.devDependencies&&(r.devDependencies["@zuplo/core"]=n["@zuplo/core"]),"@zuplo/core"in r.dependencies&&(r.dependencies["@zuplo/core"]=n["@zuplo/core"])}return r}s(Dft,"generateDefaultPackageJson");qs.generateDefaultPackageJson=Dft;function nue(){let e=rk.default.resolve(__dirname,"..","..");return{"@zuplo/core":`file:${e}/core`,"@zuplo/runtime":`file:${e}/runtime`,"@zuplo/debug":`file:${e}/debug`,"@zuplo/errors":`file:${e}/errors`}}s(nue,"getPackageOverrides");qs.getPackageOverrides=nue;async function Lft(e){let t=rk.default.join(e,"package.json"),r=await rue.default.readFile(t,"utf-8");return JSON.parse(r)}s(Lft,"getProjectPackageJson");qs.getProjectPackageJson=Lft;async function jft(e,t){let r=rk.default.join(e,"package.json"),n=JSON.stringify(t,void 0,2);await rue.default.writeFile(r,n,"utf-8")}s(jft,"updateProjectPackageJson");qs.updateProjectPackageJson=jft});var aue=h($1=>{"use strict";Object.defineProperty($1,"__esModule",{value:!0});$1.generatePackageJson=void 0;var sue=iue(),oue=rc(),Mft=s(async function({sourceDirectory:e,name:t,logger:r}){let n=await(0,sue.generateDefaultPackageJson)(t);try{await(0,sue.updateProjectPackageJson)(e,n)}catch(i){return r.error(i),new oue.PluginResult({message:"Error creating package.json",pluginName:"generate-package-json",severity:"error"})}return new oue.PluginResult},"generatePackageJson");$1.generatePackageJson=Mft});var cue=h(u_=>{"use strict";var Uft=u_&&u_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u_,"__esModule",{value:!0});u_.generatePoliciesConfig=void 0;var xft=Uft(require("path")),uue=kt(),qft=Ni();u_.generatePoliciesConfig=(0,qft.generateFileFromTemplate)(xft.default.join(uue.USER_CONFIG_DIR_NAME,uue.POLICIES_CONFIG_FILE),"policies.template.json")});var lue=h(c_=>{"use strict";var Fft=c_&&c_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c_,"__esModule",{value:!0});c_.generateSettingsJson=void 0;var kft=Fft(require("path")),Bft=Ni();c_.generateSettingsJson=(0,Bft.generateFileFromTemplate)(kft.default.join(".vscode","settings.json"),"settings.template.jsonc")});var fue=h(D1=>{"use strict";Object.defineProperty(D1,"__esModule",{value:!0});D1.generateTSConfig=void 0;var Gft=Ni();D1.generateTSConfig=(0,Gft.generateFileFromTemplate)("tsconfig.json","tsconfig.template.json")});var pue=h(l_=>{"use strict";var Vft=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0});l_.generateZuploJson=void 0;var zft=Yo(),Hft=require("fs/promises"),Kft=Vft(require("path")),Wft=kt(),due=rc(),Yft=s(async function({name:e,sourceDirectory:t,logger:r}){let n={version:1,project:e,compatibilityDate:zft.DEFAULT_COMPATIBILITY_DATE},i=Kft.default.join(t,Wft.ZUPLO_PREFERRED_JSON_FILE),o=JSON.stringify(n,null,2);try{await(0,Hft.writeFile)(i,o,"utf-8")}catch(a){return r.error(a),new due.PluginResult({message:"Error creating zuplo.jsonc",pluginName:"generate-zuplo-json",severity:"error"})}return new due.PluginResult},"generateZuploJson");l_.generateZuploJson=Yft});var gue=h(f_=>{"use strict";var _ue=f_&&f_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(f_,"__esModule",{value:!0});f_.create=void 0;var hue=Tae(),Jft=_ue(_n()),Xft=require("fs/promises"),Zft=_ue(require("path")),Qft=rc(),mue=ek(),edt=jae(),tdt=kae(),rdt=Gae(),ndt=zae(),idt=Kae(),sdt=Yae(),odt=Jae(),adt=Xae(),udt=Zae(),cdt=Qae(),ldt=tue(),fdt=aue(),ddt=cue(),pdt=lue(),hdt=fue(),mdt=pue();async function _dt({name:e,accountName:t="",rootDirectory:r,logger:n}){let i=(0,mue.sanitize)(e),o=(0,mue.sanitize)(t),a=Zft.default.join(r,o,i),u={name:e,sourceDirectory:a,logger:n},c=[];if(await Jft.default.dirExists(a))throw new hue.ApiError({type:"https://zup.fail/project-already-exists-at-directory",title:"The project already exists in the specified directory",status:hue.HttpStatusCode.BAD_REQUEST,detail:`Project already exists at ${a}`});c.push(edt.createProjectDirs,ldt.generateRouteOasConfig,mdt.generateZuploJson,sdt.generateDevPortalConfigJson,idt.generateDefaultModule,rdt.generateDefaultDocsSidebar,tdt.generateDefaultDocsMarkdown,ndt.generateDefaultDocsTheme,ddt.generatePoliciesConfig),c.push(hdt.generateTSConfig,udt.generateGitignore,fdt.generatePackageJson,odt.generateEnvironment,adt.generateESLint,cdt.generateLaunchJson,pdt.generateSettingsJson);let{errors:l,warnings:f}=await(0,Qft.runPlugins)(c,u);if(f.length>0&&f.forEach(_=>{n.warn(_)}),l.length>0){await(0,Xft.rm)(a,{recursive:!0,force:!0});let _=l[0];throw _ instanceof Error?_:new Error(_.message)}return{sourceDirectory:a,projectName:e}}s(_dt,"create");f_.create=_dt});var vue=h((Xqt,Sue)=>{Sue.exports=bue;bue.sync=ydt;var yue=require("fs");function gdt(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}s(gdt,"checkPathExt");function Eue(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:gdt(t,r)}s(Eue,"checkStat");function bue(e,t,r){yue.stat(e,function(n,i){r(n,n?!1:Eue(i,e,t))})}s(bue,"isexe");function ydt(e,t){return Eue(yue.statSync(e),e,t)}s(ydt,"sync")});var Tue=h((Qqt,Iue)=>{Iue.exports=Pue;Pue.sync=Edt;var Oue=require("fs");function Pue(e,t,r){Oue.stat(e,function(n,i){r(n,n?!1:wue(i,t))})}s(Pue,"isexe");function Edt(e,t){return wue(Oue.statSync(e),t)}s(Edt,"sync");function wue(e,t){return e.isFile()&&bdt(e,t)}s(wue,"checkStat");function bdt(e,t){var r=e.mode,n=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),f=u|c,d=r&l||r&c&&i===a||r&u&&n===o||r&f&&o===0;return d}s(bdt,"checkMode")});var Aue=h((r2t,Nue)=>{var t2t=require("fs"),L1;process.platform==="win32"||global.TESTING_WINDOWS?L1=vue():L1=Tue();Nue.exports=nk;nk.sync=Sdt;function nk(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){nk(e,t||{},function(o,a){o?i(o):n(a)})})}L1(e,t||{},function(n,i){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,i=!1),r(n,i)})}s(nk,"isexe");function Sdt(e,t){try{return L1.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}s(Sdt,"sync")});var Mue=h((i2t,jue)=>{var d_=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Rue=require("path"),vdt=d_?";":":",Cue=Aue(),$ue=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Due=s((e,t)=>{let r=t.colon||vdt,n=e.match(/\//)||d_&&e.match(/\\/)?[""]:[...d_?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=d_?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=d_?i.split(r):[""];return d_&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},"getPathInfo"),Lue=s((e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:o}=Due(e,t),a=[],u=s(l=>new Promise((f,d)=>{if(l===n.length)return t.all&&a.length?f(a):d($ue(e));let _=n[l],m=/^".*"$/.test(_)?_.slice(1,-1):_,g=Rue.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;f(c(y,l,0))}),"step"),c=s((l,f,d)=>new Promise((_,m)=>{if(d===i.length)return _(u(f+1));let g=i[d];Cue(l+g,{pathExt:o},(y,b)=>{if(!y&&b)if(t.all)a.push(l+g);else return _(l+g);return _(c(l,f,d+1))})}),"subStep");return r?u(0).then(l=>r(null,l),r):u(0)},"which"),Odt=s((e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Due(e,t),o=[];for(let a=0;a<r.length;a++){let u=r[a],c=/^".*"$/.test(u)?u.slice(1,-1):u,l=Rue.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let d=0;d<n.length;d++){let _=f+n[d];try{if(Cue.sync(_,{pathExt:i}))if(t.all)o.push(_);else return _}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw $ue(e)},"whichSync");jue.exports=Lue;Lue.sync=Odt});var sk=h((o2t,ik)=>{"use strict";var Uue=s((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");ik.exports=Uue;ik.exports.default=Uue});var kue=h((u2t,Fue)=>{"use strict";var xue=require("path"),Pdt=Mue(),wdt=sk();function que(e,t){let r=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let a;try{a=Pdt.sync(e.command,{path:r[wdt({env:r})],pathExt:t?xue.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=xue.resolve(i?e.options.cwd:"",a)),a}s(que,"resolveCommandAttempt");function Idt(e){return que(e)||que(e,!0)}s(Idt,"resolveCommand");Fue.exports=Idt});var Bue=h((l2t,ak)=>{"use strict";var ok=/([()\][%!^"`<>&|;, *?])/g;function Tdt(e){return e=e.replace(ok,"^$1"),e}s(Tdt,"escapeCommand");function Ndt(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(ok,"^$1"),t&&(e=e.replace(ok,"^$1")),e}s(Ndt,"escapeArgument");ak.exports.command=Tdt;ak.exports.argument=Ndt});var Vue=h((d2t,Gue)=>{"use strict";Gue.exports=/^#!(.*)/});var Hue=h((p2t,zue)=>{"use strict";var Adt=Vue();zue.exports=(e="")=>{let t=e.match(Adt);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var Wue=h((h2t,Kue)=>{"use strict";var uk=require("fs"),Rdt=Hue();function Cdt(e){let r=Buffer.alloc(150),n;try{n=uk.openSync(e,"r"),uk.readSync(n,r,0,150,0),uk.closeSync(n)}catch{}return Rdt(r.toString())}s(Cdt,"readShebang");Kue.exports=Cdt});var Zue=h((_2t,Xue)=>{"use strict";var $dt=require("path"),Yue=kue(),Jue=Bue(),Ddt=Wue(),Ldt=process.platform==="win32",jdt=/\.(?:com|exe)$/i,Mdt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Udt(e){e.file=Yue(e);let t=e.file&&Ddt(e.file);return t?(e.args.unshift(e.file),e.command=t,Yue(e)):e.file}s(Udt,"detectShebang");function xdt(e){if(!Ldt)return e;let t=Udt(e),r=!jdt.test(t);if(e.options.forceShell||r){let n=Mdt.test(t);e.command=$dt.normalize(e.command),e.command=Jue.command(e.command),e.args=e.args.map(o=>Jue.argument(o,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}s(xdt,"parseNonShell");function qdt(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:xdt(n)}s(qdt,"parse");Xue.exports=qdt});var tce=h((y2t,ece)=>{"use strict";var ck=process.platform==="win32";function lk(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}s(lk,"notFoundError");function Fdt(e,t){if(!ck)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let o=Que(i,t,"spawn");if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}s(Fdt,"hookChildProcess");function Que(e,t){return ck&&e===1&&!t.file?lk(t.original,"spawn"):null}s(Que,"verifyENOENT");function kdt(e,t){return ck&&e===1&&!t.file?lk(t.original,"spawnSync"):null}s(kdt,"verifyENOENTSync");ece.exports={hookChildProcess:Fdt,verifyENOENT:Que,verifyENOENTSync:kdt,notFoundError:lk}});var ice=h((b2t,p_)=>{"use strict";var rce=require("child_process"),fk=Zue(),dk=tce();function nce(e,t,r){let n=fk(e,t,r),i=rce.spawn(n.command,n.args,n.options);return dk.hookChildProcess(i,n),i}s(nce,"spawn");function Bdt(e,t,r){let n=fk(e,t,r),i=rce.spawnSync(n.command,n.args,n.options);return i.error=i.error||dk.verifyENOENTSync(i.status,n),i}s(Bdt,"spawnSync");p_.exports=nce;p_.exports.spawn=nce;p_.exports.sync=Bdt;p_.exports._parse=fk;p_.exports._enoent=dk});var oce=h((v2t,sce)=>{"use strict";sce.exports=e=>{let t=typeof e=="string"?`
|
|
302
|
+
`},nodePaths:lae,entryPoints:[u],...l,sourcemap:"linked",legalComments:"linked",treeShaking:!0,bundle:!0,...c,external:[],logLevel:"silent",conditions:Qc.BUILD_CONDITIONS,plugins:[(0,rct.environmentPlugin)({sourceDirectory:i,targetPlatform:t}),(0,ect.blockRemoteModulePlugin)({logger:o}),(0,sct.openApiRoutesPlugin)({sourceDirectory:i,outputDirectory:n}),(0,oct.rawRoutePlugin)({sourceDirectory:i,targetPlatform:t,logger:o}),(0,uct.schemaValidationPlugin)({sourceDirectory:i,logger:o,isOpenApiBased:!0}),(0,act.runtimeConfigPlugin)(),(0,tct.devPortalConfigPlugin)({sourceDirectory:i}),(0,nct.jsonSchemaPlugin)({sourceDirectory:i,outputDirectory:n}),(0,ict.nodejsCompatPlugin)({nodeCompatEnabled:a?.esmWorker===!0,sourceDirectory:i})]}}s(lct,"getBaseESBuildConfig");Qc.default=lct});var pae=h(Us=>{"use strict";var fct=Us&&Us.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),dct=Us&&Us.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pct=Us&&Us.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&fct(t,e,r);return dct(t,e),t},dae=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});Us.getRunEsBuildPlugin=void 0;var hct=Gf(),fae=Yo(),mct=pct(require("esbuild")),_ct=dae(mn()),gct=$P(),yct=dae(HF()),KF=hy(),Ect=s(function(e){return s(async function({systemDirectory:r,outputDirectory:n,sourceDirectory:i,dev:o,targetPlatform:a,generateSourceMaps:u,buildId:c,logger:l,config:f}){return _ct.default.timeFn("Running esbuild",async()=>{l.info(`Running build for platform ${a}, build_id: ${c}`);let d=await(0,yct.default)({systemDirectory:r,outputDirectory:n,targetPlatform:a,generateSourceMaps:u,sourceDirectory:i,dev:o,logger:l,flags:f.flags}),_,m=new Date;try{if(!await(0,hct.oasFileInProject)(i))throw new Error("Failed to build project because no open-api file was found on the 'config' folder");_=await mct.build(d)}catch(y){if(l.error(y),y.errors||y.warnings)_=y;else if(y.message.includes("Failed to build project because no open-api file was found on the 'config' folder"))_={warnings:[],errors:[{id:"missing-open-api-file",text:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:KF.ESBUILD_PLUGIN_NAME,location:null,notes:[],detail:"Failed to build project because no open-api file was found on the 'config' folder"}],outputFiles:void 0,metafile:void 0,mangleCache:void 0};else throw y}let g=new Date;if(e(new gct.CompilerResult(_,{endBuildTime:g,startBuildTime:m,buildId:c??""})),_.errors.length>0){_.errors.length>1&&(_.errors.length=1);let y=_.errors[0];l.debug(y)}return{warnings:[..._.warnings.map(y=>({message:y.text,pluginName:KF.ESBUILD_PLUGIN_NAME,severity:fae.WARNING_SEVERITY}))],errors:[..._.errors.map(y=>({message:y.text,pluginName:KF.ESBUILD_PLUGIN_NAME,severity:fae.ERROR_SEVERITY}))]}})},"runEsbuild")},"getRunEsBuildPlugin");Us.getRunEsBuildPlugin=Ect});var YF=h(Jm=>{"use strict";var mae=Jm&&Jm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.build=void 0;var Ym=Yo(),bct=require("crypto"),Sct=require("fs"),KE=mae(require("path")),hae=kt(),vct=rc(),Oct=mae(mn()),Pct=Bz(),wct=th(),Ict=zz(),Tct=Hz(),Nct=Kz(),Act=Zz(),Rct=Qz(),Cct=nH(),$ct=p9(),Dct=m9(),Lct=pae(),WF=hy(),v1;try{let e=(0,Sct.readFileSync)(KE.default.resolve(__dirname,"../../package.json"),"utf-8");v1=JSON.parse(e).version}catch{v1="0.0.0"}async function jct({sourceDirectory:e,dev:t,targetPlatform:r,generateSourceMaps:n=!1,noCompile:i=!1,deploymentName:o=KE.default.basename(e),logger:a,publicZuploEnvironmentVariables:u={},entitlements:c,projectId:l,customDomain:f,environmentType:d,postBuildTasks:_}){let m=(0,bct.randomUUID)(),g=a.child({buildId:m});return Oct.default.timeFn(`Run Build for platform: ${r}, build_id: ${m}`,async()=>{let y=await(0,Pct.getZuploConfig)(e),b=KE.default.join(e,hae.BUILD_OUTPUT_DIR),E;if("errors"in y)E={status:"Failed",flags:void 0,compatibilityDate:void 0,runtimeVersion:v1,outputPath:b,buildTaskResult:{buildTime:"",buildTimeMs:0,status:Ym.FAILURE_STATUS,buildId:m,warnings:[],errors:y.errors}};else{let O={dev:t,targetPlatform:r,generateSourceMaps:n,deploymentName:o,sourceDirectory:e,outputDirectory:b,systemDirectory:KE.default.join(e,hae.GENERATED_SOURCE_DIR_NAME),buildId:m,logger:g,config:y.config,publicZuploEnvironmentVariables:u,projectId:l,entitlements:c,customDomain:f,environmentType:d},P=[];P.push(Ict.cleanOutput),P.push(Tct.createSystemDir),P.push(Nct.checkForDeprecations),P.push(Act.generateBuildData),P.push(Cct.validateDevPortalJSON),P.push($ct.validateOpenAPIFiles),r==wct.TargetPlatform.Worker&&P.push(Rct.generateWorker);let I,j=s(Q=>{I=Q},"compileCallback");i||P.push((0,Lct.getRunEsBuildPlugin)(j)),P.push(Dct.verifyWorkerOutput),_&&P.push(..._);let x=await(0,vct.runPlugins)(P,O),H=x.errors.length>0?Ym.FAILURE_STATUS:x.warnings.length>0?Ym.WARNING_STATUS:Ym.GOOD_STATUS;E={status:H==="Failed"||I===void 0||I.status==="Failed"?"Failed":H==="Warnings"||I.status==="Warnings"?"Warnings":"Good",compatibilityDate:y.config.compatibilityDate,runtimeVersion:v1,outputPath:b,compilerResult:I,buildTaskResult:{buildTime:"",buildTimeMs:0,status:H,buildId:m,warnings:x.warnings,errors:x.errors},flags:y.config.flags}}if(E.buildTaskResult.warnings.length>0){E.buildTaskResult.warnings.forEach(P=>{g.warn(P)});let O=E.buildTaskResult.warnings.filter(P=>P.pluginName!=="runEsbuild"&&P.pluginName!==WF.ESBUILD_PLUGIN_NAME);O.length>0&&(E.buildTaskResult.warnings=O),E.buildTaskResult.status=Ym.WARNING_STATUS}if(E.buildTaskResult.errors.length>0){E.buildTaskResult.errors.forEach(P=>{g.error(P)});let O=E.buildTaskResult.errors.filter(P=>P.pluginName!=="runEsbuild"&&P.pluginName!==WF.ESBUILD_PLUGIN_NAME);O.length>0&&(E.buildTaskResult.errors=O),E.buildTaskResult.status=Ym.FAILURE_STATUS}if(g.debug(`Build ${E.compilerResult?.buildId??m} completed ${i?"on watch mode":"with compiler status "+E.compilerResult?.status} and build task status ${E.buildTaskResult.status}`),E.compilerResult){let{metafile:O,...P}=E.compilerResult;g.debug(`Compiler results for build ${E.compilerResult?.buildId??m}`,P)}g.debug(`Build task results for build ${E.buildTaskResult?.buildId??m}`,E.buildTaskResult);let S=KE.default.basename(e);return(0,WF.formatBuildResult)(E,S,g)})}s(jct,"build");Jm.build=jct});var P1=h(xs=>{"use strict";var Mct=xs&&xs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Uct=xs&&xs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xct=xs&&xs.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Mct(t,e,r);return Uct(t,e),t},O1=xs&&xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xs,"__esModule",{value:!0});xs.BuildWatcher=void 0;var _ae=Yo(),qct=O1(require("chokidar")),Fct=xct(require("esbuild")),gae=require("crypto"),kct=O1(require("events")),WE=O1(require("path")),yae=kt(),Bct=YF(),Eae=$P(),Gct=O1(HF()),bae=hy(),JF=class extends kct.default{static{s(this,"WatchEmitter")}},XF=class{static{s(this,"BuildWatcher")}esbuildContext;emitter=new JF;envFilesWatcher;outputDirectory;sourceDirectory;dev;targetPlatform;generateSourceMaps;logger;publicZuploEnvironmentVariables;projectName;constructor({sourceDirectory:t,dev:r,targetPlatform:n,generateSourceMaps:i,logger:o,publicZuploEnvironmentVariables:a={}}){this.sourceDirectory=t,this.dev=r,this.targetPlatform=n,this.outputDirectory=WE.default.join(t,yae.BUILD_OUTPUT_DIR),this.generateSourceMaps=i??!1,this.logger=o,this.publicZuploEnvironmentVariables=a,this.projectName=WE.default.basename(t),this.envFilesWatcher=qct.default.watch([WE.default.join(t,".env"),WE.default.join(t,".env.zuplo")])}watchEnvFiles(){this.envFilesWatcher.on("change",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("add",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("unlink",async()=>{this.emitter.emit("reload",null,null)})}onReload=t=>{this.emitter.on("reload",t)};async start(){let{sourceDirectory:t}=this;if(this.esbuildContext!==void 0)throw new Error("Watcher cannot be started more than once");let r=await(0,Bct.build)({sourceDirectory:t,noCompile:!0,dev:this.dev,targetPlatform:this.targetPlatform,generateSourceMaps:this.generateSourceMaps,publicZuploEnvironmentVariables:this.publicZuploEnvironmentVariables,logger:this.logger}),n=await(0,Gct.default)({systemDirectory:WE.default.join(t,yae.GENERATED_SOURCE_DIR_NAME),outputDirectory:this.outputDirectory,targetPlatform:this.targetPlatform,sourceDirectory:t,dev:this.dev,generateSourceMaps:this.generateSourceMaps,logger:this.logger,flags:r.flags}),i=this;n.plugins?.push({name:"on-end",setup(o){o.onEnd(a=>{i.logger.debug("Watcher (build) reloaded");let u;if(a)if(u=new Eae.CompilerResult(a),u.errors.length>0){let c={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:_ae.FAILURE_STATUS,buildId:(0,gae.randomUUID)(),warnings:[],errors:[]}};c.compilerResult=u,(0,bae.formatBuildResult)(c,i.projectName,i.logger),i.logger.error(c.compilerResult.errors,"Build errors")}else i.logger.debug(`Successfully rebuilt watched project. Build id ${u.buildId}`);i.emitter.emit("reload",r,null,u)})}}),this.esbuildContext=await Fct.context(n);try{let o=await this.esbuildContext.rebuild();if(o.errors.length>0){let a={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:_ae.FAILURE_STATUS,buildId:(0,gae.randomUUID)(),warnings:[],errors:[]}};a.compilerResult=new Eae.CompilerResult(o),(0,bae.formatBuildResult)(a,this.projectName,this.logger),this.logger.error(a.compilerResult.errors,"Build errors")}}catch(o){throw await this.close(),o}await this.esbuildContext.watch()}async close(){try{await this.envFilesWatcher.close(),this.esbuildContext&&(await this.esbuildContext.dispose(),this.logger.debug("ESBuild watcher closed"))}catch(t){this.logger.error(t)}}};xs.BuildWatcher=XF});var ZF=h(w1=>{"use strict";Object.defineProperty(w1,"__esModule",{value:!0});w1.HttpStatusCode=void 0;var Sae;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(Sae||(w1.HttpStatusCode=Sae={}))});var vae=h(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});I1.getSourceControlProviderLabel=void 0;function Vct(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}s(Vct,"getSourceControlProviderLabel");I1.getSourceControlProviderLabel=Vct});var Pae=h(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.DEPLOYMENT_NO_ACCESS=v.INVALID_SOURCE_REPO_URL=v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=v.PROJECT_MUST_HAVE_ONE_MEMBER=v.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=v.PROJECT_MEMBER_ALREADY_EXISTS=v.PROJECT_MEMBER_NOT_FOUND=v.INVALID_TEMPLATE_REPOSITORY=v.INCORRECT_PROJECT_TEMPLATE=v.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=v.PROJECT_NOT_FOUND=v.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=v.PROJECT_SHARING_DISABLED_ON_ACCOUNT=v.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=v.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=v.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=v.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=v.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=v.ACCOUNT_MEMBER_INVITE_INVALID=v.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=v.ACCOUNT_MEMBER_DOES_NOT_EXIST=v.ACCOUNT_MEMBER_INFO_MISSING=v.ACCOUNT_MEMBER_ALREADY_EXISTS=v.ACCOUNT_UPDATE_INFO_MISSING=v.ACCOUNT_INFO_MISSING=v.ACCOUNT_DOES_NOT_EXISTS=v.INVALID_ACCOUNT_LABEL_ENDING=v.INVALID_ACCOUNT_NAME_ENDING=v.ACCOUNT_NAME_ALREADY_IN_USE=v.INVALID_ACCOUNT_LABEL=v.INVALID_ACCOUNT_NAME=v.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED=v.ACCOUNT_NAME_LENGTH_LIMIT_REACHED=v.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=v.ACCOUNT_NAME_USES_RESERVED_KEYWORD=v.ACCOUNT_ALREADY_EXISTS=v.ACCOUNT_NOT_FOUND=v.USER_IS_NOT_SERVICE_ACCOUNT=v.USER_REMOVE_NOT_MEMBER_ACCOUNT=v.USER_HAS_NO_ACCESS_TO_ACCOUNT=v.USER_DETAILS_CANNOT_BE_FOUND=v.USER_ALREADY_EXISTS=v.CLIENT_NOT_FOUND=v.FORBIDDEN=v.UNAUTHORIZED=v.METHOD_NOT_ALLOWED=v.NOT_FOUND=v.CONFLICT=v.BAD_REQUEST=v.INTERNAL_SERVER_ERROR=void 0;v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=v.GITHUB_INTEGRATION_ALREADY_EXISTS=v.FEATURE_FLAGS_NOT_FOUND=v.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=v.PROJECT_ALREADY_HAS_REPO=v.PROJECT_INVALID_NAME=v.FAILED_TO_REVOKE_GH_TOKEN=v.USER_ACCOUNT_NOT_FS_MIGRATED=v.USER_NO_ACCESS_GITLAB_REPO=v.USER_NO_ACCESS_BITBUCKET_REPO=v.GITHUB_APP_CONFIGURATION_NOT_FOUND=v.GITHUB_APP_NO_USER_ACCESS_=v.GITHUB_APP_NO_NAMESPACE_ACCESS=v.GENERIC_GITHUB_BRANCH_INFO_ERROR=v.GITHUB_USER_NO_READ_ACCESS_REPO=v.USER_NO_PULL_ACCESS_GITHUB_REPO=v.USER_NO_ACCESS_GITHUB_REPO=v.PROJECT_SHARING_REQUIRES_GIT_REPO=v.PROJECT_INVALID_GIT_REPO=v.PROJECT_INVALID_GIT_CLONE=v.USER_IS_PROJECT_MEMBER=v.USER_HAS_NO_ACCESS_TO_PROJECT=v.RUNTIME_FLAG_KEY_NOT_VALID=v.RUNTIME_FLAG_NOT_FOUND=v.RUNTIME_FLAG_ALREADY_EXISTS=v.PROJECT_NO_MEMBERS=v.PROJECT_ALREADY_EXISTS=v.SERVICE_CONFIGURATION_FAILED_DECRYPTION=v.WORKING_COPY_SERVICE_NOT_CREATED=v.WORKING_COPY_SERVICE_NOT_DELETED=v.WORKING_COPY_SERVICE_NOT_FOUND=v.SERVICE_CONFIGURATION_NOT_FOUND=v.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=v.DEPLOYMENT_INCORRECT_STATUS_PAUSE=v.DEPLOYMENT_NOT_WORKING_COPY=v.DEPLOYMENT_LOG_NOT_FOUND=v.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=v.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=v.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=v.DEPLOYMENT_DELETE_ERROR=v.DEPLOYMENT_CANNOT_DELETE_INSTANCE=v.DEPLOYMENT_INVALID_MULTI_PART=v.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=v.DEPLOYMENT_FILE_DOES_NOT_EXISTS=v.DEPLOYMENT_NOT_FOUND=v.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=v.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=void 0;v.DUPLICATE_ENVIRONMENT_VARIABLE=v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=v.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=v.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=v.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=v.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=v.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=v.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=v.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=v.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=v.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=v.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=v.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=v.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=v.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=v.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=v.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=v.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=v.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=v.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=v.SOURCE_CONTROL_REPO_OPERATION_ERROR=v.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=v.SOURCE_CONTROL_REPO_NOT_FOUND=v.SOURCE_CONTROL_AUTHENTICATION_FAILED=v.EXTERNAL_SERVICE_GENERIC_ERROR=v.API_USER_NO_ACCESS=v.EXTERNAL_USER_NOT_CONFIGURED=v.EXTERNAL_USER_NO_ACCESS=v.CONSUMER_CANNOT_BE_CREATED=v.CONSUMER_DOES_NOT_EXIST=v.CONSUMER_NO_ACCESS=v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=v.GITLAB_DUPLICATE_REPO=v.GITLAB_FAILED_DURING_REPO_CREATION=v.GITLAB_QUERY_USER_INFO_FAILED=v.BITBUCKET_FAILED_DURING_REPO_CREATION=v.BITBUCKET_WORKSPACE_MISCONFIGURATION=v.BITBUCKET_QUERY_USER_INFO_FAILED=v.GITHUB_INTEGRATION_INVALID_REPO=v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=v.GITHUB_INTEGRATION_DUPLICATE_REPO=v.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=v.GITHUB_INTEGRATION_BRANCH_BEHIND=v.GITHUB_INTEGRATION_NOT_FOUND=v.GITHUB_REPOSITORY_NOT_FOUND=void 0;v.METERING_BUCKET_CREATION_FAILED=v.UNABLE_UPGRADE_PLAN=v.BUCKET_NOT_FOUND=v.BUCKET_API_KEY_SERVICE_CONFLICT=v.DIRECTORY_DELETE_FAILED=v.FILE_DELETE_FAILED=v.CANNOT_DELETE_SOLE_OPEN_API_FILE=v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=v.CANNOT_DELETE_ESSENTIAL_FILE=v.FILE_WRITE_FAILED=v.FILE_RENAME_FAILED=v.FILE_RENAME_FILE_ALREADY_EXISTS=v.FILE_RENAME_CANNOT_CHANGE_EXTENSION=v.FILE_RENAME_PATHS_MATCH=v.DIRECTORY_CREATION_FAILED=v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=v.DIRECTORY_DOES_NOT_EXIST=v.DIRECTORY_ALREADY_EXISTS=v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=v.FAILED_DOWNLOAD_FROM_STORAGE=v.CANNOT_FIND_SRC_DIRECTORY=v.CANNOT_READ_PACKAGE_JSON=v.PACKAGE_JSON_NOT_FOUND=v.RUNTIME_VERSION_INCORRECT_FORMAT=v.MIGRATIONS_ONLY_ON_WORKING_COPY=v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=v.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=v.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=v.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=v.NO_GLOBAL_SYMBOLS=v.NO_ZUPLO_PREFIXED_VARIABLES=v.NON_EMPTY_TARGETS_REQUIRED=v.CONFLICTING_TYPES=v.OVERLAPPING_TARGETS=v.INVALID_BRANCH_NAME=v.TARGET_BRANCH_ONLY_FOR_PREVIEW=v.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=v.DEPLOYMENT_NAME_MISSING=v.NON_EXISTENT_ENVIRONMENT_VARIABLE=v.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=void 0;var A=ZF(),Oae=vae(),zct="https://github.com/apps/zuplo/installations/new";v.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:A.HttpStatusCode.BAD_REQUEST};v.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:A.HttpStatusCode.CONFLICT};v.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:A.HttpStatusCode.NOT_FOUND};v.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:A.HttpStatusCode.METHOD_NOT_ALLOWED};v.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:A.HttpStatusCode.UNAUTHORIZED};v.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:A.HttpStatusCode.FORBIDDEN};v.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:A.HttpStatusCode.NOT_FOUND};v.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:A.HttpStatusCode.CONFLICT};v.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:A.HttpStatusCode.UNAUTHORIZED};v.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:A.HttpStatusCode.BAD_REQUEST};v.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:A.HttpStatusCode.CONFLICT};v.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-name-length-limit",title:"The account name exceeds the 200 character limit",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-label-length-limit",title:"The account label exceeds the 200 character limit",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_NAME={type:"https://zup.fail/invalid-account-name",title:"The account name can only contain lower-cased characters, numbers, dashes and underscores",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_LABEL={type:"https://zup.fail/invalid-account-label",title:"The account label can only contain alpha-numeric characters, spaces, dashes and underscores",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_ALREADY_IN_USE={type:"https://zup.fail/account-name-in-use",title:"The account name is already taken. Please try again using a different name.",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_NAME_ENDING={type:"https://zup.fail/invalid-account-name-ending",title:"The account name can not end with a dash or underscore character",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_LABEL_ENDING={type:"https://zup.fail/invalid-account-label-ending",title:"The account label can not end with a dash or underscore character",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:A.HttpStatusCode.BAD_REQUEST};v.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:A.HttpStatusCode.BAD_REQUEST};v.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:A.HttpStatusCode.BAD_REQUEST};v.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:A.HttpStatusCode.FORBIDDEN};v.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:A.HttpStatusCode.NOT_FOUND};v.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:A.HttpStatusCode.NOT_FOUND};v.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",detail:"Project has protected deployments. Make sure to remove the use of custom domains before trying to delete the project.",status:A.HttpStatusCode.FORBIDDEN};v.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:A.HttpStatusCode.BAD_REQUEST};var Hct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:A.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");v.INVALID_TEMPLATE_REPOSITORY=Hct;v.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:A.HttpStatusCode.NOT_FOUND};v.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:A.HttpStatusCode.BAD_REQUEST};v.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:A.HttpStatusCode.BAD_REQUEST};v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:A.HttpStatusCode.FORBIDDEN};v.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:"Deployment is not working copy.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:A.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:A.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:A.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:A.HttpStatusCode.BAD_REQUEST};v.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:A.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:A.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:A.HttpStatusCode.BAD_REQUEST};v.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:A.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:A.HttpStatusCode.BAD_REQUEST};v.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:A.HttpStatusCode.FORBIDDEN};v.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:A.HttpStatusCode.BAD_REQUEST};var Kct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");v.USER_NO_ACCESS_GITHUB_REPO=Kct;var Wct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");v.USER_NO_PULL_ACCESS_GITHUB_REPO=Wct;var Yct=s(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");v.GITHUB_USER_NO_READ_ACCESS_REPO=Yct;v.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:A.HttpStatusCode.BAD_REQUEST};v.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:A.HttpStatusCode.FORBIDDEN};var Jct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${zct}' to add the repository.`,status:A.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");v.GITHUB_APP_NO_USER_ACCESS_=Jct;v.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:A.HttpStatusCode.NOT_FOUND};var Xct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");v.USER_NO_ACCESS_BITBUCKET_REPO=Xct;var Zct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");v.USER_NO_ACCESS_GITLAB_REPO=Zct;v.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:A.HttpStatusCode.FORBIDDEN};v.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:A.HttpStatusCode.BAD_REQUEST};v.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:A.HttpStatusCode.BAD_REQUEST};v.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:A.HttpStatusCode.BAD_REQUEST};var Qct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:A.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Qct;var elt=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:A.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");v.GITHUB_REPOSITORY_NOT_FOUND=elt;v.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:A.HttpStatusCode.NOT_FOUND,detail:"The project does not have a GitHub integration configured."};v.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:A.HttpStatusCode.BAD_REQUEST};v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:A.HttpStatusCode.FORBIDDEN};v.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:A.HttpStatusCode.FORBIDDEN};var tlt=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");v.GITHUB_INTEGRATION_DUPLICATE_REPO=tlt;var rlt=s(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=rlt;var nlt=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=nlt;var ilt=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=ilt;var slt=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");v.GITHUB_INTEGRATION_INVALID_REPO=slt;v.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:A.HttpStatusCode.FORBIDDEN};v.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:A.HttpStatusCode.FORBIDDEN};var olt=s(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:A.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");v.BITBUCKET_FAILED_DURING_REPO_CREATION=olt;v.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:A.HttpStatusCode.FORBIDDEN};var alt=s(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");v.GITLAB_FAILED_DURING_REPO_CREATION=alt;var ult=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");v.GITLAB_DUPLICATE_REPO=ult;var clt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=clt;var llt=s(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=llt;var flt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=flt;v.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:A.HttpStatusCode.UNAUTHORIZED};v.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist or cannot be accessed.",status:A.HttpStatusCode.NOT_FOUND};v.CONSUMER_CANNOT_BE_CREATED={type:"https://zup.fail/consumer-not-created",title:"Failed to create consumer",status:A.HttpStatusCode.BAD_GATEWAY};v.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:A.HttpStatusCode.UNAUTHORIZED};v.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:A.HttpStatusCode.FORBIDDEN};v.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:A.HttpStatusCode.FORBIDDEN};v.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};var dlt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${(0,Oae.getSourceControlProviderLabel)(e)}`,status:A.HttpStatusCode.UNAUTHORIZED}),"SOURCE_CONTROL_AUTHENTICATION_FAILED");v.SOURCE_CONTROL_AUTHENTICATION_FAILED=dlt;var plt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${(0,Oae.getSourceControlProviderLabel)(e)} repository`,status:A.HttpStatusCode.NOT_FOUND}),"SOURCE_CONTROL_REPO_NOT_FOUND");v.SOURCE_CONTROL_REPO_NOT_FOUND=plt;v.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:A.HttpStatusCode.BAD_REQUEST};var hlt=s(({repoURL:e,operation:t})=>({type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:"Verify your source control configuration and make sure you have been granted read & write access to the repository",status:A.HttpStatusCode.FORBIDDEN}),"SOURCE_CONTROL_REPO_OPERATION_ERROR");v.SOURCE_CONTROL_REPO_OPERATION_ERROR=hlt;v.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:"You do not have write access to the repository, verify your source control access configuration and try again.",detail:"Verify your source control configuration and make sure you have been granted access to the repository",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:A.HttpStatusCode.NOT_FOUND};v.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:A.HttpStatusCode.NOT_FOUND};v.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:A.HttpStatusCode.UNAUTHORIZED};v.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:A.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:A.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:A.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:A.HttpStatusCode.FORBIDDEN};v.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:A.HttpStatusCode.NOT_FOUND};v.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:A.HttpStatusCode.NOT_FOUND};v.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:A.HttpStatusCode.FAILED_DEPENDENCY};v.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:A.HttpStatusCode.FAILED_DEPENDENCY};v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:A.HttpStatusCode.FAILED_DEPENDENCY};v.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:A.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:A.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:A.HttpStatusCode.BAD_REQUEST};v.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:A.HttpStatusCode.BAD_REQUEST};v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:A.HttpStatusCode.BAD_REQUEST};v.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:A.HttpStatusCode.BAD_REQUEST};v.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:A.HttpStatusCode.BAD_REQUEST};v.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:A.HttpStatusCode.BAD_REQUEST};v.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:A.HttpStatusCode.BAD_REQUEST};v.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:A.HttpStatusCode.BAD_REQUEST};v.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:A.HttpStatusCode.BAD_REQUEST};v.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:A.HttpStatusCode.FORBIDDEN};v.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:A.HttpStatusCode.NOT_FOUND};var mlt=s(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify file on read-only environment",detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=mlt;var _lt=s(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify files on read-only environment",detail:"Cannot save files on a read-only environment. Read-only environments cannot be edited.",status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=_lt;v.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:"Migrations can only run on working copies.",status:A.HttpStatusCode.BAD_REQUEST};v.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:"Runtime version is in an incorrect format.",status:A.HttpStatusCode.BAD_REQUEST};v.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:"No package.json file found.",status:A.HttpStatusCode.NOT_FOUND};v.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:"Cannot read package.json file.",status:A.HttpStatusCode.BAD_REQUEST};v.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:"Cannot find source directory.",status:A.HttpStatusCode.BAD_REQUEST};v.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:"Failed to download content from storage.",status:A.HttpStatusCode.BAD_REQUEST};var glt=s(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot create directory on read-only environment",detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=glt;var ylt=s(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=ylt;var Elt=s(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:A.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");v.DIRECTORY_ALREADY_EXISTS=Elt;var blt=s(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:A.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");v.DIRECTORY_DOES_NOT_EXIST=blt;var Slt=s(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:A.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=Slt;var vlt=s(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");v.DIRECTORY_CREATION_FAILED=vlt;var Olt=s(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");v.FILE_RENAME_PATHS_MATCH=Olt;var Plt=s(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");v.FILE_RENAME_CANNOT_CHANGE_EXTENSION=Plt;var wlt=s(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");v.FILE_RENAME_FILE_ALREADY_EXISTS=wlt;var Ilt=s(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");v.FILE_RENAME_FAILED=Ilt;var Tlt=s(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");v.FILE_WRITE_FAILED=Tlt;var Nlt=s(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:A.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");v.CANNOT_DELETE_ESSENTIAL_FILE=Nlt;var Alt=s(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:A.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=Alt;var Rlt=s(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:A.HttpStatusCode.BAD_REQUEST,detail:"Your project must have at least 1 OpenAPI file."}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");v.CANNOT_DELETE_SOLE_OPEN_API_FILE=Rlt;var Clt=s(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");v.FILE_DELETE_FAILED=Clt;var $lt=s(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");v.DIRECTORY_DELETE_FAILED=$lt;v.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:A.HttpStatusCode.CONFLICT};v.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:A.HttpStatusCode.BAD_REQUEST};v.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR}});var Iae=h(Ti=>{"use strict";var Dlt=Ti&&Ti.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Llt=Ti&&Ti.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jlt=Ti&&Ti.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Dlt(t,e,r);return Llt(t,e),t};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ApiNotFoundError=Ti.ApiError=Ti.Problems=void 0;var wae=jlt(Pae());Ti.Problems=wae;var T1=class extends Error{static{s(this,"ApiError")}type;status;detail;instance;constructor(t){if(super(t.title),!t.type.startsWith("https://zup.fail/"))throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`);this.name="ApiProblemError",this.type=t.type,this.status=t.status,this.detail=t.detail,this.instance=t.instance}};Ti.ApiError=T1;var QF=class extends T1{static{s(this,"ApiNotFoundError")}constructor(t={}){super({...t,...wae.NOT_FOUND}),this.name="ApiNotFoundProblemError"}};Ti.ApiNotFoundError=QF});var Tae=h(wu=>{"use strict";var Mlt=wu&&wu.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ult=wu&&wu.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Mlt(t,e,r)};Object.defineProperty(wu,"__esModule",{value:!0});wu.HttpStatusCode=void 0;Ult(Iae(),wu);var xlt=ZF();Object.defineProperty(wu,"HttpStatusCode",{enumerable:!0,get:function(){return xlt.HttpStatusCode}})});var Aae=h((Eqt,Nae)=>{"use strict";function qlt(e){return e>=55296&&e<=56319}s(qlt,"isHighSurrogate");function Flt(e){return e>=56320&&e<=57343}s(Flt,"isLowSurrogate");Nae.exports=s(function(t,r,n){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,a,u,c=0;c<i;c+=1){if(a=r.charCodeAt(c),u=r[c],qlt(a)&&Flt(r.charCodeAt(c+1))&&(c+=1,u+=r[c]),o+=t(u),o===n)return r.slice(0,c+1);if(o>n)return r.slice(0,c-u.length+1)}return r},"truncate")});var Cae=h((Sqt,Rae)=>{"use strict";var klt=Aae(),Blt=Buffer.byteLength.bind(Buffer);Rae.exports=klt.bind(null,Blt)});var ek=h(Xm=>{"use strict";var Glt=Xm&&Xm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.sanitize=void 0;var Vlt=Glt(Cae()),zlt=/[/?<>\\:*|"]/g,Hlt=/[\x00-\x1f\x80-\x9f]/g,Klt=/^\.+$/,Wlt=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Ylt=/[. ]+$/;function Jlt(e,t=""){if(typeof e!="string")throw new Error("Input must be string");let r=e.replace(zlt,t).replace(Hlt,t).replace(Klt,t).replace(Wlt,t).replace(Ylt,t);return(0,Vlt.default)(r,255)}s(Jlt,"sanitize");Xm.sanitize=Jlt});var jae=h(Zm=>{"use strict";var Lae=Zm&&Zm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zm,"__esModule",{value:!0});Zm.createProjectDirs=void 0;var $ae=Lae(require("fs/promises")),Xlt=Lae(require("path")),YE=kt(),Dae=rc(),Zlt=s(async function({sourceDirectory:e,logger:t}){t.debug("Creating project directories");let r=[YE.USER_MODULES_DIR_NAME,YE.USER_CONFIG_DIR_NAME,YE.USER_TEST_DIR_NAME,YE.USER_SCHEMAS_DIR_NAME,YE.USER_DOCS_DIR_NAME,".vscode"];try{await $ae.default.mkdir(e);for(let n of r)await $ae.default.mkdir(Xlt.default.join(e,n),{recursive:!0})}catch(n){return t.error(n),new Dae.PluginResult({message:`Cannot create project directory tree at ${e}`,pluginName:"create-project-dirs",severity:"error"})}return new Dae.PluginResult},"createProjectDirs");Zm.createProjectDirs=Zlt});var qae=h(Qm=>{"use strict";var xae=Qm&&Qm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qm,"__esModule",{value:!0});Qm.generateFromTemplate=void 0;var Qlt=require("fs"),Mae=xae(require("fs/promises")),Uae=xae(require("path"));async function eft(e){let t=Uae.default.resolve(__dirname,"..","templates",e);if((0,Qlt.existsSync)(t))return await Mae.default.readFile(t,"utf-8");{let r=Uae.default.resolve(__dirname,"templates",e);return await Mae.default.readFile(r,"utf-8")}}s(eft,"generateFromTemplate");Qm.generateFromTemplate=eft});var Ni=h(e_=>{"use strict";var N1=e_&&e_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e_,"__esModule",{value:!0});e_.generateFileFromTemplate=void 0;var tft=N1(_n()),rft=N1(require("fs/promises")),nft=N1(require("path")),ift=N1(mn()),sft=qae(),oft=s(function(e,t){return async({sourceDirectory:r,logger:n})=>ift.default.timeFn(`Generating ${e}`,async()=>{n.debug(`Generating ${e}`);let i=nft.default.join(r,e);return await tft.default.fileExists(i)?(n.debug({sourceDirectory:r},`${e} already exists, skipping`),{warnings:[],errors:[]}):aft(i,t,n)})},"generateFileFromTemplate");e_.generateFileFromTemplate=oft;async function aft(e,t,r){let n=await(0,sft.generateFromTemplate)(t);try{await rft.default.writeFile(e,n,"utf-8"),r.debug(`File written to ${e}`)}catch(i){r.error(i);let o={message:`Error creating file at ${e}`,pluginName:"generate-file",severity:"error"};return{warnings:[],errors:[o]}}return{warnings:[],errors:[]}}s(aft,"writeTemplate")});var kae=h(t_=>{"use strict";var uft=t_&&t_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t_,"__esModule",{value:!0});t_.generateDefaultDocsMarkdown=void 0;var cft=uft(require("path")),Fae=kt(),lft=Ni();t_.generateDefaultDocsMarkdown=(0,lft.generateFileFromTemplate)(cft.default.join(Fae.USER_DOCS_DIR_NAME,Fae.DEFAULT_DOCS_MARKDOWN_FILE),"markdown.template.md")});var Gae=h(r_=>{"use strict";var fft=r_&&r_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r_,"__esModule",{value:!0});r_.generateDefaultDocsSidebar=void 0;var dft=fft(require("path")),Bae=kt(),pft=Ni();r_.generateDefaultDocsSidebar=(0,pft.generateFileFromTemplate)(dft.default.join(Bae.USER_DOCS_DIR_NAME,Bae.DOCS_SIDEBAR_FILE),"sidebar.template.json")});var zae=h(n_=>{"use strict";var hft=n_&&n_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n_,"__esModule",{value:!0});n_.generateDefaultDocsTheme=void 0;var mft=hft(require("path")),Vae=kt(),_ft=Ni();n_.generateDefaultDocsTheme=(0,_ft.generateFileFromTemplate)(mft.default.join(Vae.USER_DOCS_DIR_NAME,Vae.DOCS_THEME_FILE),"dev-portal.theme.template.css")});var Kae=h(i_=>{"use strict";var gft=i_&&i_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i_,"__esModule",{value:!0});i_.generateDefaultModule=void 0;var yft=gft(require("path")),Hae=kt(),Eft=Ni();i_.generateDefaultModule=(0,Eft.generateFileFromTemplate)(yft.default.join(Hae.USER_MODULES_DIR_NAME,Hae.DEFAULT_MODULE_FILE),"hello-world.template.ts")});var Yae=h(s_=>{"use strict";var bft=s_&&s_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s_,"__esModule",{value:!0});s_.generateDevPortalConfigJson=void 0;var Sft=bft(require("path")),Wae=kt(),vft=Ni();s_.generateDevPortalConfigJson=(0,vft.generateFileFromTemplate)(Sft.default.join(Wae.USER_CONFIG_DIR_NAME,Wae.DEV_PORTAL_CONFIG_FILE),"dev-portal.template.json")});var Jae=h(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.generateEnvironment=void 0;var Oft=Ni();A1.generateEnvironment=(0,Oft.generateFileFromTemplate)(".env","env.template")});var Xae=h(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.generateESLint=void 0;var Pft=Ni();R1.generateESLint=(0,Pft.generateFileFromTemplate)(".eslintrc.js","eslintrc.template.js")});var Zae=h(C1=>{"use strict";Object.defineProperty(C1,"__esModule",{value:!0});C1.generateGitignore=void 0;var wft=Ni();C1.generateGitignore=(0,wft.generateFileFromTemplate)(".gitignore","gitignore.template.ignore")});var Qae=h(o_=>{"use strict";var Ift=o_&&o_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o_,"__esModule",{value:!0});o_.generateLaunchJson=void 0;var Tft=Ift(require("path")),Nft=Ni();o_.generateLaunchJson=(0,Nft.generateFileFromTemplate)(Tft.default.join(".vscode","launch.json"),"launch.template.jsonc")});var tue=h(a_=>{"use strict";var Aft=a_&&a_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a_,"__esModule",{value:!0});a_.generateRouteOasConfig=void 0;var Rft=Aft(require("path")),eue=kt(),Cft=Ni();a_.generateRouteOasConfig=(0,Cft.generateFileFromTemplate)(Rft.default.join(eue.USER_CONFIG_DIR_NAME,eue.ROUTES_OAS_CONFIG_FILE),"routes.oas.template.json")});var iue=h(qs=>{"use strict";var tk=qs&&qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qs,"__esModule",{value:!0});qs.updateProjectPackageJson=qs.getProjectPackageJson=qs.getPackageOverrides=qs.generateDefaultPackageJson=void 0;var rue=tk(require("fs/promises")),rk=tk(require("path")),$ft=tk(Xs());async function Dft(e,t=$ft.default.USE_MONOREPO_PACKAGES){let r={name:e,version:"1.0.0",author:"",copyright:"",scripts:{dev:"zup dev",test:"zup test"},dependencies:{zuplo:"latest"}};if(t){let n=nue();r.overrides=n,r.dependencies["@zuplo/runtime"]=n["@zuplo/runtime"],r.devDependencies&&"@zuplo/core"in r.devDependencies&&(r.devDependencies["@zuplo/core"]=n["@zuplo/core"]),"@zuplo/core"in r.dependencies&&(r.dependencies["@zuplo/core"]=n["@zuplo/core"])}return r}s(Dft,"generateDefaultPackageJson");qs.generateDefaultPackageJson=Dft;function nue(){let e=rk.default.resolve(__dirname,"..","..");return{"@zuplo/core":`file:${e}/core`,"@zuplo/runtime":`file:${e}/runtime`,"@zuplo/debug":`file:${e}/debug`,"@zuplo/errors":`file:${e}/errors`}}s(nue,"getPackageOverrides");qs.getPackageOverrides=nue;async function Lft(e){let t=rk.default.join(e,"package.json"),r=await rue.default.readFile(t,"utf-8");return JSON.parse(r)}s(Lft,"getProjectPackageJson");qs.getProjectPackageJson=Lft;async function jft(e,t){let r=rk.default.join(e,"package.json"),n=JSON.stringify(t,void 0,2);await rue.default.writeFile(r,n,"utf-8")}s(jft,"updateProjectPackageJson");qs.updateProjectPackageJson=jft});var aue=h($1=>{"use strict";Object.defineProperty($1,"__esModule",{value:!0});$1.generatePackageJson=void 0;var sue=iue(),oue=rc(),Mft=s(async function({sourceDirectory:e,name:t,logger:r}){let n=await(0,sue.generateDefaultPackageJson)(t);try{await(0,sue.updateProjectPackageJson)(e,n)}catch(i){return r.error(i),new oue.PluginResult({message:"Error creating package.json",pluginName:"generate-package-json",severity:"error"})}return new oue.PluginResult},"generatePackageJson");$1.generatePackageJson=Mft});var cue=h(u_=>{"use strict";var Uft=u_&&u_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u_,"__esModule",{value:!0});u_.generatePoliciesConfig=void 0;var xft=Uft(require("path")),uue=kt(),qft=Ni();u_.generatePoliciesConfig=(0,qft.generateFileFromTemplate)(xft.default.join(uue.USER_CONFIG_DIR_NAME,uue.POLICIES_CONFIG_FILE),"policies.template.json")});var lue=h(c_=>{"use strict";var Fft=c_&&c_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c_,"__esModule",{value:!0});c_.generateSettingsJson=void 0;var kft=Fft(require("path")),Bft=Ni();c_.generateSettingsJson=(0,Bft.generateFileFromTemplate)(kft.default.join(".vscode","settings.json"),"settings.template.jsonc")});var fue=h(D1=>{"use strict";Object.defineProperty(D1,"__esModule",{value:!0});D1.generateTSConfig=void 0;var Gft=Ni();D1.generateTSConfig=(0,Gft.generateFileFromTemplate)("tsconfig.json","tsconfig.template.json")});var pue=h(l_=>{"use strict";var Vft=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0});l_.generateZuploJson=void 0;var zft=Yo(),Hft=require("fs/promises"),Kft=Vft(require("path")),Wft=kt(),due=rc(),Yft=s(async function({name:e,sourceDirectory:t,logger:r}){let n={version:1,project:e,compatibilityDate:zft.DEFAULT_COMPATIBILITY_DATE},i=Kft.default.join(t,Wft.ZUPLO_PREFERRED_JSON_FILE),o=JSON.stringify(n,null,2);try{await(0,Hft.writeFile)(i,o,"utf-8")}catch(a){return r.error(a),new due.PluginResult({message:"Error creating zuplo.jsonc",pluginName:"generate-zuplo-json",severity:"error"})}return new due.PluginResult},"generateZuploJson");l_.generateZuploJson=Yft});var gue=h(f_=>{"use strict";var _ue=f_&&f_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(f_,"__esModule",{value:!0});f_.create=void 0;var hue=Tae(),Jft=_ue(_n()),Xft=require("fs/promises"),Zft=_ue(require("path")),Qft=rc(),mue=ek(),edt=jae(),tdt=kae(),rdt=Gae(),ndt=zae(),idt=Kae(),sdt=Yae(),odt=Jae(),adt=Xae(),udt=Zae(),cdt=Qae(),ldt=tue(),fdt=aue(),ddt=cue(),pdt=lue(),hdt=fue(),mdt=pue();async function _dt({name:e,accountName:t="",rootDirectory:r,logger:n}){let i=(0,mue.sanitize)(e),o=(0,mue.sanitize)(t),a=Zft.default.join(r,o,i),u={name:e,sourceDirectory:a,logger:n},c=[];if(await Jft.default.dirExists(a))throw new hue.ApiError({type:"https://zup.fail/project-already-exists-at-directory",title:"The project already exists in the specified directory",status:hue.HttpStatusCode.BAD_REQUEST,detail:`Project already exists at ${a}`});c.push(edt.createProjectDirs,ldt.generateRouteOasConfig,mdt.generateZuploJson,sdt.generateDevPortalConfigJson,idt.generateDefaultModule,rdt.generateDefaultDocsSidebar,tdt.generateDefaultDocsMarkdown,ndt.generateDefaultDocsTheme,ddt.generatePoliciesConfig),c.push(hdt.generateTSConfig,udt.generateGitignore,fdt.generatePackageJson,odt.generateEnvironment,adt.generateESLint,cdt.generateLaunchJson,pdt.generateSettingsJson);let{errors:l,warnings:f}=await(0,Qft.runPlugins)(c,u);if(f.length>0&&f.forEach(_=>{n.warn(_)}),l.length>0){await(0,Xft.rm)(a,{recursive:!0,force:!0});let _=l[0];throw _ instanceof Error?_:new Error(_.message)}return{sourceDirectory:a,projectName:e}}s(_dt,"create");f_.create=_dt});var vue=h((Xqt,Sue)=>{Sue.exports=bue;bue.sync=ydt;var yue=require("fs");function gdt(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}s(gdt,"checkPathExt");function Eue(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:gdt(t,r)}s(Eue,"checkStat");function bue(e,t,r){yue.stat(e,function(n,i){r(n,n?!1:Eue(i,e,t))})}s(bue,"isexe");function ydt(e,t){return Eue(yue.statSync(e),e,t)}s(ydt,"sync")});var Tue=h((Qqt,Iue)=>{Iue.exports=Pue;Pue.sync=Edt;var Oue=require("fs");function Pue(e,t,r){Oue.stat(e,function(n,i){r(n,n?!1:wue(i,t))})}s(Pue,"isexe");function Edt(e,t){return wue(Oue.statSync(e),t)}s(Edt,"sync");function wue(e,t){return e.isFile()&&bdt(e,t)}s(wue,"checkStat");function bdt(e,t){var r=e.mode,n=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),f=u|c,d=r&l||r&c&&i===a||r&u&&n===o||r&f&&o===0;return d}s(bdt,"checkMode")});var Aue=h((r2t,Nue)=>{var t2t=require("fs"),L1;process.platform==="win32"||global.TESTING_WINDOWS?L1=vue():L1=Tue();Nue.exports=nk;nk.sync=Sdt;function nk(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){nk(e,t||{},function(o,a){o?i(o):n(a)})})}L1(e,t||{},function(n,i){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,i=!1),r(n,i)})}s(nk,"isexe");function Sdt(e,t){try{return L1.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}s(Sdt,"sync")});var Mue=h((i2t,jue)=>{var d_=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Rue=require("path"),vdt=d_?";":":",Cue=Aue(),$ue=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Due=s((e,t)=>{let r=t.colon||vdt,n=e.match(/\//)||d_&&e.match(/\\/)?[""]:[...d_?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=d_?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=d_?i.split(r):[""];return d_&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},"getPathInfo"),Lue=s((e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:o}=Due(e,t),a=[],u=s(l=>new Promise((f,d)=>{if(l===n.length)return t.all&&a.length?f(a):d($ue(e));let _=n[l],m=/^".*"$/.test(_)?_.slice(1,-1):_,g=Rue.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;f(c(y,l,0))}),"step"),c=s((l,f,d)=>new Promise((_,m)=>{if(d===i.length)return _(u(f+1));let g=i[d];Cue(l+g,{pathExt:o},(y,b)=>{if(!y&&b)if(t.all)a.push(l+g);else return _(l+g);return _(c(l,f,d+1))})}),"subStep");return r?u(0).then(l=>r(null,l),r):u(0)},"which"),Odt=s((e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Due(e,t),o=[];for(let a=0;a<r.length;a++){let u=r[a],c=/^".*"$/.test(u)?u.slice(1,-1):u,l=Rue.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let d=0;d<n.length;d++){let _=f+n[d];try{if(Cue.sync(_,{pathExt:i}))if(t.all)o.push(_);else return _}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw $ue(e)},"whichSync");jue.exports=Lue;Lue.sync=Odt});var sk=h((o2t,ik)=>{"use strict";var Uue=s((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");ik.exports=Uue;ik.exports.default=Uue});var kue=h((u2t,Fue)=>{"use strict";var xue=require("path"),Pdt=Mue(),wdt=sk();function que(e,t){let r=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let a;try{a=Pdt.sync(e.command,{path:r[wdt({env:r})],pathExt:t?xue.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=xue.resolve(i?e.options.cwd:"",a)),a}s(que,"resolveCommandAttempt");function Idt(e){return que(e)||que(e,!0)}s(Idt,"resolveCommand");Fue.exports=Idt});var Bue=h((l2t,ak)=>{"use strict";var ok=/([()\][%!^"`<>&|;, *?])/g;function Tdt(e){return e=e.replace(ok,"^$1"),e}s(Tdt,"escapeCommand");function Ndt(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(ok,"^$1"),t&&(e=e.replace(ok,"^$1")),e}s(Ndt,"escapeArgument");ak.exports.command=Tdt;ak.exports.argument=Ndt});var Vue=h((d2t,Gue)=>{"use strict";Gue.exports=/^#!(.*)/});var Hue=h((p2t,zue)=>{"use strict";var Adt=Vue();zue.exports=(e="")=>{let t=e.match(Adt);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var Wue=h((h2t,Kue)=>{"use strict";var uk=require("fs"),Rdt=Hue();function Cdt(e){let r=Buffer.alloc(150),n;try{n=uk.openSync(e,"r"),uk.readSync(n,r,0,150,0),uk.closeSync(n)}catch{}return Rdt(r.toString())}s(Cdt,"readShebang");Kue.exports=Cdt});var Zue=h((_2t,Xue)=>{"use strict";var $dt=require("path"),Yue=kue(),Jue=Bue(),Ddt=Wue(),Ldt=process.platform==="win32",jdt=/\.(?:com|exe)$/i,Mdt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Udt(e){e.file=Yue(e);let t=e.file&&Ddt(e.file);return t?(e.args.unshift(e.file),e.command=t,Yue(e)):e.file}s(Udt,"detectShebang");function xdt(e){if(!Ldt)return e;let t=Udt(e),r=!jdt.test(t);if(e.options.forceShell||r){let n=Mdt.test(t);e.command=$dt.normalize(e.command),e.command=Jue.command(e.command),e.args=e.args.map(o=>Jue.argument(o,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}s(xdt,"parseNonShell");function qdt(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:xdt(n)}s(qdt,"parse");Xue.exports=qdt});var tce=h((y2t,ece)=>{"use strict";var ck=process.platform==="win32";function lk(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}s(lk,"notFoundError");function Fdt(e,t){if(!ck)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let o=Que(i,t,"spawn");if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}s(Fdt,"hookChildProcess");function Que(e,t){return ck&&e===1&&!t.file?lk(t.original,"spawn"):null}s(Que,"verifyENOENT");function kdt(e,t){return ck&&e===1&&!t.file?lk(t.original,"spawnSync"):null}s(kdt,"verifyENOENTSync");ece.exports={hookChildProcess:Fdt,verifyENOENT:Que,verifyENOENTSync:kdt,notFoundError:lk}});var ice=h((b2t,p_)=>{"use strict";var rce=require("child_process"),fk=Zue(),dk=tce();function nce(e,t,r){let n=fk(e,t,r),i=rce.spawn(n.command,n.args,n.options);return dk.hookChildProcess(i,n),i}s(nce,"spawn");function Bdt(e,t,r){let n=fk(e,t,r),i=rce.spawnSync(n.command,n.args,n.options);return i.error=i.error||dk.verifyENOENTSync(i.status,n),i}s(Bdt,"spawnSync");p_.exports=nce;p_.exports.spawn=nce;p_.exports.sync=Bdt;p_.exports._parse=fk;p_.exports._enoent=dk});var oce=h((v2t,sce)=>{"use strict";sce.exports=e=>{let t=typeof e=="string"?`
|
|
303
303
|
`:`
|
|
304
304
|
`.charCodeAt(),r=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}});var cce=h((O2t,XE)=>{"use strict";var JE=require("path"),ace=sk(),uce=s(e=>{e={cwd:process.cwd(),path:process.env[ace()],execPath:process.execPath,...e};let t,r=JE.resolve(e.cwd),n=[];for(;t!==r;)n.push(JE.join(r,"node_modules/.bin")),t=r,r=JE.resolve(r,"..");let i=JE.resolve(e.cwd,e.execPath,"..");return n.push(i),n.concat(e.path).join(JE.delimiter)},"npmRunPath");XE.exports=uce;XE.exports.default=uce;XE.exports.env=e=>{e={env:process.env,...e};let t={...e.env},r=ace({env:t});return e.path=t[r],t[r]=XE.exports(e),t}});var fce=h((w2t,pk)=>{"use strict";var lce=s((e,t)=>{for(let r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e},"mimicFn");pk.exports=lce;pk.exports.default=lce});var pce=h((T2t,M1)=>{"use strict";var Gdt=fce(),j1=new WeakMap,dce=s((e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,i=e.displayName||e.name||"<anonymous>",o=s(function(...a){if(j1.set(o,++n),n===1)r=e.apply(this,a),e=null;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r},"onetime");return Gdt(o,e),j1.set(o,n),o},"onetime");M1.exports=dce;M1.exports.default=dce;M1.exports.callCount=e=>{if(!j1.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return j1.get(e)}});var hce=h(U1=>{"use strict";Object.defineProperty(U1,"__esModule",{value:!0});U1.SIGNALS=void 0;var Vdt=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];U1.SIGNALS=Vdt});var hk=h(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});h_.SIGRTMAX=h_.getRealtimeSignals=void 0;var zdt=s(function(){let e=_ce-mce+1;return Array.from({length:e},Hdt)},"getRealtimeSignals");h_.getRealtimeSignals=zdt;var Hdt=s(function(e,t){return{name:`SIGRT${t+1}`,number:mce+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},"getRealtimeSignal"),mce=34,_ce=64;h_.SIGRTMAX=_ce});var gce=h(x1=>{"use strict";Object.defineProperty(x1,"__esModule",{value:!0});x1.getSignals=void 0;var Kdt=require("os"),Wdt=hce(),Ydt=hk(),Jdt=s(function(){let e=(0,Ydt.getRealtimeSignals)();return[...Wdt.SIGNALS,...e].map(Xdt)},"getSignals");x1.getSignals=Jdt;var Xdt=s(function({name:e,number:t,description:r,action:n,forced:i=!1,standard:o}){let{signals:{[e]:a}}=Kdt.constants,u=a!==void 0;return{name:e,number:u?a:t,description:r,supported:u,action:n,forced:i,standard:o}},"normalizeSignal")});var Ece=h(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.signalsByNumber=m_.signalsByName=void 0;var Zdt=require("os"),yce=gce(),Qdt=hk(),ept=s(function(){return(0,yce.getSignals)().reduce(tpt,{})},"getSignalsByName"),tpt=s(function(e,{name:t,number:r,description:n,supported:i,action:o,forced:a,standard:u}){return{...e,[t]:{name:t,number:r,description:n,supported:i,action:o,forced:a,standard:u}}},"getSignalByName"),rpt=ept();m_.signalsByName=rpt;var npt=s(function(){let e=(0,yce.getSignals)(),t=Qdt.SIGRTMAX+1,r=Array.from({length:t},(n,i)=>ipt(i,e));return Object.assign({},...r)},"getSignalsByNumber"),ipt=s(function(e,t){let r=spt(e,t);if(r===void 0)return{};let{name:n,description:i,supported:o,action:a,forced:u,standard:c}=r;return{[e]:{name:n,number:e,description:i,supported:o,action:a,forced:u,standard:c}}},"getSignalByNumber"),spt=s(function(e,t){let r=t.find(({name:n})=>Zdt.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},"findSignalByNumber"),opt=npt();m_.signalsByNumber=opt});var Sce=h((M2t,bce)=>{"use strict";var{signalsByName:apt}=Ece(),upt=s(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:i,exitCode:o,isCanceled:a})=>e?`timed out after ${t} milliseconds`:a?"was canceled":r!==void 0?`failed with ${r}`:n!==void 0?`was killed with ${n} (${i})`:o!==void 0?`failed with exit code ${o}`:"failed","getErrorPrefix"),cpt=s(({stdout:e,stderr:t,all:r,error:n,signal:i,exitCode:o,command:a,escapedCommand:u,timedOut:c,isCanceled:l,killed:f,parsed:{options:{timeout:d}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let _=i===void 0?void 0:apt[i].description,m=n&&n.code,y=`Command ${upt({timedOut:c,timeout:d,errorCode:m,signal:i,signalDescription:_,exitCode:o,isCanceled:l})}: ${a}`,b=Object.prototype.toString.call(n)==="[object Error]",E=b?`${y}
|
|
305
305
|
${n.message}`:y,S=[E,t,e].filter(Boolean).join(`
|