@zuplo/core 5.2269.0 → 5.2270.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/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(Cut,"generateRefs");function $ut(e,t,r,n,i,o,a){let u=[];u.push(`${r}: {`);let c=m1(e,t,n,i,o,a);return u.push(c),u.push("}"),u.join(`
300
300
  `)}s($ut,"getJsonEntry");function m1(e,t,r,n,i,o){let a=[];for(let u in r){let c=r[u];if(u==="$ref")return(0,zm.chaseRefs)(e,t,(0,zm.getFullyQualifiedRefName)(e,c),n,i,o),`$REF:${Qoe(t,o.get((0,zm.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=m1(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=m1(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(m1,"processNode");function Qoe(e,t){return(0,Yoe.sanitizedIdentifierName)(e)+`_refsData_${t}`}s(Qoe,"getRefIdentifierName")});var tae=h(Hm=>{"use strict";var g1=Hm&&Hm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hm,"__esModule",{value:!0});Hm.runtimeConfigPlugin=void 0;var Dut=g1(gn()),Lut=g1(require("fs/promises")),kF=g1(require("path")),jut=g1(_n()),_1="runtime-config",eae="runtime-config-plugin";function Mut(){return{name:_1,setup(e){e.onResolve({filter:/^\.\.\/modules\/zuplo.runtime.ts$/},t=>({namespace:eae,path:kF.default.isAbsolute(t.path)?t.path:kF.default.join(t.resolveDir,t.path),pluginName:_1})),e.onLoad({filter:/.*/,namespace:eae},async t=>jut.default.timeFn("Generating zuplo.runtime.ts data",async()=>{let r="export const runtimeInit = undefined;",n=[];return await Dut.default.fileExists(t.path)?(r=await Lut.default.readFile(t.path,"utf-8"),{contents:r,loader:"ts",resolveDir:kF.default.dirname(t.path),errors:n,pluginName:_1,watchFiles:[t.path]}):{contents:r,loader:"ts",errors:n,pluginName:_1}}))}}}s(Mut,"runtimeConfigPlugin");Hm.runtimeConfigPlugin=Mut});var aae=h(js=>{"use strict";var Fd=js&&js.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(js,"__esModule",{value:!0});js.isPolicyPresentInOperation=js.getPolicyNamesReferencingPolicyHandlers=js.schemaValidationSource=js.schemaValidationPlugin=void 0;var Km=Gf(),HE=require("@zuplo/runtime/internal"),rae=Fd(gn()),Uut=Fd(uU()),xut=Fd(cU()),y1=Fd(require("fs/promises")),Qc=Fd(require("path")),qut=Fd(require("prettier")),BF=kt(),Fut=Fd(Xs()),GF="schema-validation-plugin",nae="schema-validation",kut="module.exports = {}";function But(e){return{name:"schema-validation-plugin",setup(t){t.onResolve({filter:/ajv-schema.json$/},r=>({namespace:nae,path:r.path,pluginName:GF})),t.onLoad({filter:/.*/,namespace:nae},async r=>{let n=Qc.default.resolve(e.sourceDirectory,BF.USER_CONFIG_DIR_NAME,"policies.json");if(!e.isOpenApiBased||!await rae.default.fileExists(n))return{contents:kut,loader:"js",resolveDir:Qc.default.dirname(r.path),pluginName:GF};let i=await Gut(e.sourceDirectory),o=Qc.default.resolve(e.sourceDirectory,BF.USER_CONFIG_DIR_NAME),a=await(0,Km.getOpenApiFilesByAlphabetical)(o),u=await zut(a,i),c=await iae({oasFiles:a,routesWithSchemaValidation:u,sourceDirectory:e.sourceDirectory,logger:e.logger});if(Fut.default.DEBUG_BUILD_MODE&&c){let l=Qc.default.join(e.sourceDirectory,BF.BUILD_OUTPUT_DIR),f=Qc.default.resolve(l,"schema-validation.js");await rae.default.mkdirForFilePathIfNotExits(f);let d=await qut.default.format(c,{parser:"babel"});await y1.default.writeFile(f,d,"utf-8")}return{contents:c,loader:"js",resolveDir:Qc.default.dirname(r.path),pluginName:GF}})}}}s(But,"schemaValidationPlugin");js.schemaValidationPlugin=But;async function iae({oasFiles:e,routesWithSchemaValidation:t,sourceDirectory:r,logger:n}){let i="",o=new Km.RefParser(r,n);if(t.length===0)return i;let a=new Uut.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});for(let u of e){let c=await y1.default.readFile(u,"utf-8"),l=Qc.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,I=(0,HE.getIdForRequestBodySchema)(y.path,y.method,S);O.$id=I,a.addSchema(O),VF(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,I=(0,HE.getIdForParameterSchema)(y.path,y.method,S.in,S.name);O.$id=I,a.addSchema(O),VF(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,xut.default)(a),i}s(iae,"schemaValidationSource");js.schemaValidationSource=iae;function VF(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,Km.getFullyQualifiedRefName)(t,c));e[u]=l,(0,Km.chaseRefs)(t,r,(0,Km.getFullyQualifiedRefName)(t,c),i,o,a,(f,d)=>(0,HE.getIdForRefSchema)(f,(0,Km.getFullyQualifiedRefName)(t,d)))}else typeof c=="object"&&VF(c,t,r,n,i,o,a)}}s(VF,"addRefsToSchema");async function Gut(e){let t=new Set(["RequestValidationInboundPolicy"]),r=await y1.default.readFile(`${e}/config/policies.json`,"utf-8"),n=JSON.parse(r);return sae(n,t)}s(Gut,"getPolicyNamesUsingSchemaValidationPolicies");function sae(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=Vut(e,r);return new Set([...r,...n])}s(sae,"getPolicyNamesReferencingPolicyHandlers");js.getPolicyNamesReferencingPolicyHandlers=sae;function Vut(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(Vut,"getCompositePoliciesContainingPolicy");function oae(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(oae,"isPolicyPresentInOperation");js.isPolicyPresentInOperation=oae;async function zut(e,t){let r=[];for(let n of e){let i=await y1.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];oae(f,t)&&r.push({fileName:Qc.default.basename(n,".oas.json"),path:u,method:l})}}}return r}s(zut,"getRoutesContainingPolicies")});var zF=h(Zc=>{"use strict";var Hut=Zc&&Zc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.BUILD_CONDITIONS=void 0;var Kut=T9(),E1=Hut(require("path")),Wut=kt(),Yut=N9(),Jut=$9(),Xut=M9(),Qut=WX(),Zut=XX(),ect=Hoe(),tct=Zoe(),rct=tae(),nct=aae(),ict=(0,Kut.debug)("zuplo:core:build");Zc.BUILD_CONDITIONS=["workerd","worker","browser"];var uae=[...process.env.GLOBAL_MODULE_LOCATION?[process.env.GLOBAL_MODULE_LOCATION]:[],E1.default.resolve(__dirname,"..","..","..","node_modules"),E1.default.resolve(__dirname,"..","..","..","..","..","node_modules"),...require.main?.paths??[]];async function sct({dev:e=!1,systemDirectory:t,outputDirectory:r,sourceDirectory:n,logger:i,flags:o}){let a=E1.default.join(t,Wut.WORKER_ENTRY_NAME);ict(`Building with node paths: ${uae.join(", ")}`);let u=e===!1?{minify:!0}:{minify:!1,keepNames:!0,metafile:!0},c={platform:"browser",target:"es2022",outfile:E1.default.join(r,"worker.js")};return{format:o?.esmWorker===!0?"esm":"iife",banner:{js:`'use strict';
302
- `},nodePaths:uae,entryPoints:[a],...c,sourcemap:"linked",legalComments:"linked",treeShaking:!0,bundle:!0,...u,external:[],logLevel:"silent",conditions:Zc.BUILD_CONDITIONS,plugins:[(0,Xut.environmentPlugin)({sourceDirectory:n}),(0,Yut.blockRemoteModulePlugin)({logger:i}),(0,ect.openApiRoutesPlugin)({sourceDirectory:n,outputDirectory:r}),(0,tct.rawRoutePlugin)({sourceDirectory:n,logger:i}),(0,nct.schemaValidationPlugin)({sourceDirectory:n,logger:i,isOpenApiBased:!0}),(0,rct.runtimeConfigPlugin)(),(0,Jut.devPortalConfigPlugin)({sourceDirectory:n}),(0,Qut.jsonSchemaPlugin)({sourceDirectory:n,outputDirectory:r}),(0,Zut.nodejsCompatPlugin)({nodeCompatEnabled:o?.esmWorker===!0,sourceDirectory:n})]}}s(sct,"getBaseESBuildConfig");Zc.default=sct});var S1=h(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.formatBuildResult=Ms.BUILD_TASK_PLUGIN_NAME=Ms.ESBUILD_PLUGIN_NAME=void 0;Ms.ESBUILD_PLUGIN_NAME="run-esbuild";Ms.BUILD_TASK_PLUGIN_NAME="build-task";var oct=s((e,t)=>{let r=t;if(t.includes(e)){let n=new RegExp(`.*(${e})`,"g");r=t.replace(n,"")}return r.match(/^(\/)?(\.\.(\/)?)+/)&&(r=r.replace(/^(\/)?(\.\.(\/)?)+/,"/")),r},"removePrefixFromString"),act=s((e,t)=>{let r=t;if(r.includes(e)){let n=new RegExp(`[a-zA-Z0-9-_.\\/]+(${e})`,"g");r=r.replace(n,"")}return r},"cleanFilePathsInMessage"),b1=s((e,t,r)=>{if(!e||e.length<=0)return e;let n=e.filter(i=>i.message!=='Could not resolve "@zuplo/runtime"');return n&&n.length>0&&n.forEach(i=>{i.location&&i.location.file&&(i.location.file=oct(t,i.location.file)),i.location&&i.location.lineText&&i.location.lineText.includes("@zuplo/core/index.minified.js")&&(i.location.lineText=i.location.lineText.substring(0,200)+"...<Truncated>"),i.message=act(t,i.message),i.notes&&i.notes.length>0&&delete i.notes,i.text&&delete i.text,i.pluginName===""&&(i.pluginName=r)}),n},"cleanDataOnBuildIssue");function uct(e,t,r){try{e.buildTaskResult&&(e.buildTaskResult.errors&&(e.buildTaskResult.errors=b1(e.buildTaskResult.errors,t,Ms.BUILD_TASK_PLUGIN_NAME)),e.buildTaskResult.warnings&&(e.buildTaskResult.warnings=b1(e.buildTaskResult.warnings,t,Ms.BUILD_TASK_PLUGIN_NAME))),e.compilerResult&&(e.compilerResult.errors&&(e.compilerResult.errors=b1(e.compilerResult.errors,t,Ms.ESBUILD_PLUGIN_NAME)),e.compilerResult.warnings&&(e.compilerResult.warnings=b1(e.compilerResult.warnings,t,Ms.ESBUILD_PLUGIN_NAME)))}catch(n){r.error("Error while formatting buildResult. Err: ",n)}return e}s(uct,"formatBuildResult");Ms.formatBuildResult=uct});var fae=h(Us=>{"use strict";var cct=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]}),lct=Us&&Us.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),fct=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)&&cct(t,e,r);return lct(t,e),t},lae=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});Us.getRunEsBuildPlugin=void 0;var dct=Gf(),cae=Yo(),pct=fct(require("esbuild")),hct=lae(_n()),mct=CP(),_ct=lae(zF()),HF=S1(),gct=s(function(e){return s(async function({systemDirectory:r,outputDirectory:n,sourceDirectory:i,dev:o,generateSourceMaps:a,buildId:u,logger:c,config:l}){return hct.default.timeFn("Running esbuild",async()=>{c.info(`Running build_id: ${u}`);let f=await(0,_ct.default)({systemDirectory:r,outputDirectory:n,generateSourceMaps:a,sourceDirectory:i,dev:o,logger:c,flags:l.flags}),d,_=new Date;try{if(!await(0,dct.oasFileInProject)(i))throw new Error("Failed to build project because no open-api file was found on the 'config' folder");d=await pct.build(f)}catch(g){if(c.error(g),g.errors||g.warnings)d=g;else if(g.message.includes("Failed to build project because no open-api file was found on the 'config' folder"))d={warnings:[],errors:[{id:"missing-open-api-file",text:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:HF.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 g}let m=new Date;if(e(new mct.CompilerResult(d,{endBuildTime:m,startBuildTime:_,buildId:u??""})),d.errors.length>0){d.errors.length>1&&(d.errors.length=1);let g=d.errors[0];c.debug(g)}return{warnings:[...d.warnings.map(g=>({message:g.text,pluginName:HF.ESBUILD_PLUGIN_NAME,severity:cae.WARNING_SEVERITY}))],errors:[...d.errors.map(g=>({message:g.text,pluginName:HF.ESBUILD_PLUGIN_NAME,severity:cae.ERROR_SEVERITY}))]}})},"runEsbuild")},"getRunEsBuildPlugin");Us.getRunEsBuildPlugin=gct});var WF=h(Ym=>{"use strict";var pae=Ym&&Ym.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ym,"__esModule",{value:!0});Ym.build=void 0;var Wm=Yo(),yct=require("crypto"),Ect=require("fs"),KE=pae(require("path")),dae=kt(),bct=rc(),Sct=pae(_n()),vct=Bz(),Oct=Vz(),Pct=zz(),Ict=Hz(),wct=Jz(),Tct=Xz(),Nct=tH(),Act=f9(),Rct=p9(),Cct=fae(),KF=S1(),v1;try{let e=(0,Ect.readFileSync)(KE.default.resolve(__dirname,"../../package.json"),"utf-8");v1=JSON.parse(e).version}catch{v1="0.0.0"}async function $ct({sourceDirectory:e,deploymentName:t=KE.default.basename(e),dev:r,entitlements:n,environmentType:i,generateSourceMaps:o=!1,logger:a,noCompile:u=!1,postBuildTasks:c,projectId:l,publicZuploEnvironmentVariables:f={}}){let d=(0,yct.randomUUID)(),_=a.child({buildId:d});return Sct.default.timeFn(`Run build with build_id: ${d}`,async()=>{let m=await(0,vct.getZuploConfig)(e),g=KE.default.join(e,dae.BUILD_OUTPUT_DIR),y;if("errors"in m)y={status:"Failed",flags:void 0,compatibilityDate:void 0,runtimeVersion:v1,outputPath:g,buildTaskResult:{buildTime:"",buildTimeMs:0,status:Wm.FAILURE_STATUS,buildId:d,warnings:[],errors:m.errors}};else{let E={dev:r,generateSourceMaps:o,deploymentName:t,sourceDirectory:e,outputDirectory:g,systemDirectory:KE.default.join(e,dae.GENERATED_SOURCE_DIR_NAME),buildId:d,logger:_,config:m.config,publicZuploEnvironmentVariables:f,projectId:l,entitlements:n,environmentType:i},S=[];S.push(Oct.cleanOutput),S.push(Pct.createSystemDir),S.push(Ict.checkForDeprecations),S.push(wct.generateBuildData),S.push(Nct.validateDevPortalJSON),S.push(Act.validateOpenAPIFiles),S.push(Tct.generateWorker);let O,I=s(V=>{O=V},"compileCallback");u||S.push((0,Cct.getRunEsBuildPlugin)(I)),S.push(Rct.verifyWorkerOutput),c&&S.push(...c);let w=await(0,bct.runPlugins)(S,E),D=w.errors.length>0?Wm.FAILURE_STATUS:w.warnings.length>0?Wm.WARNING_STATUS:Wm.GOOD_STATUS;y={status:D==="Failed"||O===void 0||O.status==="Failed"?"Failed":D==="Warnings"||O.status==="Warnings"?"Warnings":"Good",compatibilityDate:m.config.compatibilityDate,runtimeVersion:v1,outputPath:g,compilerResult:O,buildTaskResult:{buildTime:"",buildTimeMs:0,status:D,buildId:d,warnings:w.warnings,errors:w.errors},flags:m.config.flags}}if(y.buildTaskResult.warnings.length>0){y.buildTaskResult.warnings.forEach(S=>{_.warn(S)});let E=y.buildTaskResult.warnings.filter(S=>S.pluginName!=="runEsbuild"&&S.pluginName!==KF.ESBUILD_PLUGIN_NAME);E.length>0&&(y.buildTaskResult.warnings=E),y.buildTaskResult.status=Wm.WARNING_STATUS}if(y.buildTaskResult.errors.length>0){y.buildTaskResult.errors.forEach(S=>{_.error(S)});let E=y.buildTaskResult.errors.filter(S=>S.pluginName!=="runEsbuild"&&S.pluginName!==KF.ESBUILD_PLUGIN_NAME);E.length>0&&(y.buildTaskResult.errors=E),y.buildTaskResult.status=Wm.FAILURE_STATUS}if(_.debug(`Build ${y.compilerResult?.buildId??d} completed ${u?"on watch mode":"with compiler status "+y.compilerResult?.status} and build task status ${y.buildTaskResult.status}`),y.compilerResult){let{metafile:E,...S}=y.compilerResult;_.debug(`Compiler results for build ${y.compilerResult?.buildId??d}`,S)}_.debug(`Build task results for build ${y.buildTaskResult?.buildId??d}`,y.buildTaskResult);let b=KE.default.basename(e);return(0,KF.formatBuildResult)(y,b,_)})}s($ct,"build");Ym.build=$ct});var P1=h(xs=>{"use strict";var Dct=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]}),Lct=xs&&xs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jct=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)&&Dct(t,e,r);return Lct(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 hae=Yo(),Mct=O1(require("chokidar")),Uct=jct(require("esbuild")),mae=require("crypto"),xct=O1(require("events")),WE=O1(require("path")),_ae=kt(),qct=WF(),gae=CP(),Fct=O1(zF()),yae=S1(),YF=class extends xct.default{static{s(this,"WatchEmitter")}},JF=class{static{s(this,"BuildWatcher")}esbuildContext;emitter=new YF;envFilesWatcher;outputDirectory;sourceDirectory;dev;generateSourceMaps;logger;publicZuploEnvironmentVariables;projectName;constructor({sourceDirectory:t,dev:r,generateSourceMaps:n,logger:i,publicZuploEnvironmentVariables:o={}}){this.sourceDirectory=t,this.dev=r,this.outputDirectory=WE.default.join(t,_ae.BUILD_OUTPUT_DIR),this.generateSourceMaps=n??!1,this.logger=i,this.publicZuploEnvironmentVariables=o,this.projectName=WE.default.basename(t),this.envFilesWatcher=Mct.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,qct.build)({sourceDirectory:t,noCompile:!0,dev:this.dev,generateSourceMaps:this.generateSourceMaps,publicZuploEnvironmentVariables:this.publicZuploEnvironmentVariables,logger:this.logger}),n=await(0,Fct.default)({systemDirectory:WE.default.join(t,_ae.GENERATED_SOURCE_DIR_NAME),outputDirectory:this.outputDirectory,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 gae.CompilerResult(a),u.errors.length>0){let c={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:hae.FAILURE_STATUS,buildId:(0,mae.randomUUID)(),warnings:[],errors:[]}};c.compilerResult=u,(0,yae.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 Uct.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:hae.FAILURE_STATUS,buildId:(0,mae.randomUUID)(),warnings:[],errors:[]}};a.compilerResult=new gae.CompilerResult(o),(0,yae.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=JF});var XF=h(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});I1.HttpStatusCode=void 0;var Eae;(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"})(Eae||(I1.HttpStatusCode=Eae={}))});var bae=h(w1=>{"use strict";Object.defineProperty(w1,"__esModule",{value:!0});w1.getSourceControlProviderLabel=void 0;function kct(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(kct,"getSourceControlProviderLabel");w1.getSourceControlProviderLabel=kct});var vae=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.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_REMOTE_BRANCH_EXISTS=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.API_KEY_CANNOT_BE_CREATED=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.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS=v.RBACCONFIGURATION_DOES_NOT_EXISTS=v.RBAC_INVALID_EXPIRATION_DATE=v.ACCOUNT_RBAC_DISABLED=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=v.DUPLICATE_ENVIRONMENT_VARIABLE=v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=void 0;v.RBACCONFIGURATION_MISCONFIGURATION=v.RBACCONFIGURATION_DELETE_MISCONFIGURATION=v.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG=v.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED=v.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS=v.RBACCONFIGURATION_REQUIRE_PROJECTS=v.RBACCONFIGURATION_INVALID_ENVIRONMENTS=void 0;var N=XF(),Sae=bae(),Bct="https://github.com/apps/zuplo/installations/new";v.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:N.HttpStatusCode.BAD_REQUEST};v.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:N.HttpStatusCode.CONFLICT};v.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:N.HttpStatusCode.NOT_FOUND};v.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:N.HttpStatusCode.METHOD_NOT_ALLOWED};v.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:N.HttpStatusCode.UNAUTHORIZED};v.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:N.HttpStatusCode.FORBIDDEN};v.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:N.HttpStatusCode.NOT_FOUND};v.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:N.HttpStatusCode.CONFLICT};v.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:N.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:N.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:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.NOT_FOUND};v.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:N.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:N.HttpStatusCode.FORBIDDEN};v.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:N.HttpStatusCode.BAD_REQUEST};var Gct=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:N.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");v.INVALID_TEMPLATE_REPOSITORY=Gct;v.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:N.HttpStatusCode.NOT_FOUND};v.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:N.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:N.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:N.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:N.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:N.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:N.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:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:"Deployment is not working copy.",status:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:N.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:N.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:N.HttpStatusCode.BAD_REQUEST};v.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:N.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:N.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:N.HttpStatusCode.FORBIDDEN};v.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};var Vct=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:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");v.USER_NO_ACCESS_GITHUB_REPO=Vct;var zct=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:N.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");v.USER_NO_PULL_ACCESS_GITHUB_REPO=zct;var Hct=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:N.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");v.GITHUB_USER_NO_READ_ACCESS_REPO=Hct;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:N.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:N.HttpStatusCode.FORBIDDEN};var Kct=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 '${Bct}' to add the repository.`,status:N.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");v.GITHUB_APP_NO_USER_ACCESS_=Kct;v.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:N.HttpStatusCode.NOT_FOUND};var Wct=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:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");v.USER_NO_ACCESS_BITBUCKET_REPO=Wct;var Yct=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:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");v.USER_NO_ACCESS_GITLAB_REPO=Yct;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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};var Jct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:N.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Jct;var Xct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:N.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");v.GITHUB_REPOSITORY_NOT_FOUND=Xct;v.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:N.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:N.HttpStatusCode.FORBIDDEN};var Qct=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:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");v.GITHUB_INTEGRATION_DUPLICATE_REPO=Qct;var Zct=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:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Zct;var elt=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:N.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=elt;var tlt=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:N.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=tlt;var rlt=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:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");v.GITHUB_INTEGRATION_INVALID_REPO=rlt;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:N.HttpStatusCode.FORBIDDEN};v.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:N.HttpStatusCode.FORBIDDEN};var nlt=s(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:N.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");v.BITBUCKET_FAILED_DURING_REPO_CREATION=nlt;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:N.HttpStatusCode.FORBIDDEN};var ilt=s(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");v.GITLAB_FAILED_DURING_REPO_CREATION=ilt;var slt=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:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");v.GITLAB_DUPLICATE_REPO=slt;var olt=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:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=olt;var alt=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:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=alt;var ult=s(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=ult;v.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:N.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:N.HttpStatusCode.NOT_FOUND};v.CONSUMER_CANNOT_BE_CREATED={type:"https://zup.fail/consumer-not-created",title:"Failed to create consumer",status:N.HttpStatusCode.BAD_GATEWAY};v.API_KEY_CANNOT_BE_CREATED={type:"https://zup.fail/api-key-not-created",title:"Failed to create api key",status:N.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:N.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:N.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:N.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:N.HttpStatusCode.INTERNAL_SERVER_ERROR};var clt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${(0,Sae.getSourceControlProviderLabel)(e)}`,status:N.HttpStatusCode.UNAUTHORIZED}),"SOURCE_CONTROL_AUTHENTICATION_FAILED");v.SOURCE_CONTROL_AUTHENTICATION_FAILED=clt;var llt=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,Sae.getSourceControlProviderLabel)(e)} repository`,status:N.HttpStatusCode.NOT_FOUND}),"SOURCE_CONTROL_REPO_NOT_FOUND");v.SOURCE_CONTROL_REPO_NOT_FOUND=llt;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:N.HttpStatusCode.BAD_REQUEST};var flt=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:N.HttpStatusCode.FORBIDDEN}),"SOURCE_CONTROL_REPO_OPERATION_ERROR");v.SOURCE_CONTROL_REPO_OPERATION_ERROR=flt;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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS={type:"https://zup.fail/source-control-integration-branch-behind",title:"The branch exists in the remote repository. Please try again with a different branch name.",status:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.FAILED_DEPENDENCY};v.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:N.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:N.HttpStatusCode.BAD_REQUEST};v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:N.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:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:N.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:N.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:N.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:N.HttpStatusCode.NOT_FOUND};var dlt=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:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=dlt;var plt=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:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=plt;v.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:"Migrations can only run on working copies.",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:"No package.json file found.",status:N.HttpStatusCode.NOT_FOUND};v.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:"Cannot read package.json file.",status:N.HttpStatusCode.BAD_REQUEST};v.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:"Cannot find source directory.",status:N.HttpStatusCode.BAD_REQUEST};v.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:"Failed to download content from storage.",status:N.HttpStatusCode.BAD_REQUEST};var hlt=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:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=hlt;var mlt=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:N.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=mlt;var _lt=s(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:N.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");v.DIRECTORY_ALREADY_EXISTS=_lt;var glt=s(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:N.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");v.DIRECTORY_DOES_NOT_EXIST=glt;var ylt=s(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:N.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=ylt;var Elt=s(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");v.DIRECTORY_CREATION_FAILED=Elt;var blt=s(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:N.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=blt;var Slt=s(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:N.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=Slt;var vlt=s(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:N.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=vlt;var Olt=s(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");v.FILE_RENAME_FAILED=Olt;var Plt=s(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");v.FILE_WRITE_FAILED=Plt;var Ilt=s(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:N.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");v.CANNOT_DELETE_ESSENTIAL_FILE=Ilt;var wlt=s(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:N.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=wlt;var Tlt=s(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:N.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=Tlt;var Nlt=s(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");v.FILE_DELETE_FAILED=Nlt;var Alt=s(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");v.DIRECTORY_DELETE_FAILED=Alt;v.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:N.HttpStatusCode.CONFLICT};v.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:N.HttpStatusCode.NOT_FOUND};v.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:N.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:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.ACCOUNT_RBAC_DISABLED={type:"https://zup.fail/account_rbac_disabled",title:"Account does not have RBAC enabled. Please contact support to get this feature enabled.",status:N.HttpStatusCode.FORBIDDEN};v.RBAC_INVALID_EXPIRATION_DATE={type:"https://zup.fail/rbac_invalid_expiration_date",title:"Invalid expiresOn date provided",detail:"The expiresOn date provided must be greater than the current date",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_DOES_NOT_EXISTS={type:"https://zup.fail/rbacconfiguration-does-not-exists",title:"RBAC configuration record can not be found",detail:"The RBAC configuration does not exist or you don't have access to it.",status:N.HttpStatusCode.NOT_FOUND};v.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS={type:"https://zup.fail/rbacconfiguration-required-environments",title:"You must provide at least one environment value.",detail:"Please provide at least one environment value. Valid options include 'production', 'preview' and 'development'.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_INVALID_ENVIRONMENTS={type:"https://zup.fail/rbacconfiguration-invalid-environments",title:"The environment configuration provided is invalid.",detail:"Please provide at least one environment value. Valid options include 'production', 'preview' and 'development'.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_REQUIRE_PROJECTS={type:"https://zup.fail/rbacconfiguration-required-projects",title:"You must provide at least one project to configure.",detail:"Please provide at least one project to configure access for.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS={type:"https://zup.fail/rbacconfiguration-no-projects",title:"Cannot find the specified projects on this account",detail:"The account does not have any projects to configure. Please create at least one project before configuring RBAC access.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED={type:"https://zup.fail/rbacconfiguration-invalid-project",title:"You must provide valid projects to configure",detail:"One or more of the projects provided is not part of the account or does not exist. Make sure all the projects are valid and try again.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG={type:"https://zup.fail/rbacconfiguration-invalid-openfga-config",title:"Unexpected error while creating the configuration",detail:"The provided configuration caused an unexpected error. Please contact support.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_DELETE_MISCONFIGURATION={type:"https://zup.fail/rbacconfiguration-delete-misconfiguration",title:"Failed to delete the configuration",detail:"The provided configuration was not correctly created and cannot be deleted. Please contact support.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_MISCONFIGURATION={type:"https://zup.fail/rbacconfiguration-misconfiguration",title:"Configuration was created with errors",detail:"The provided configuration was not correctly created and cannot be used. Please contact support.",status:N.HttpStatusCode.BAD_REQUEST}});var Pae=h(wi=>{"use strict";var Rlt=wi&&wi.__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]}),Clt=wi&&wi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$lt=wi&&wi.__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)&&Rlt(t,e,r);return Clt(t,e),t};Object.defineProperty(wi,"__esModule",{value:!0});wi.ApiNotFoundError=wi.ApiError=wi.Problems=void 0;var Oae=$lt(vae());wi.Problems=Oae;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}};wi.ApiError=T1;var QF=class extends T1{static{s(this,"ApiNotFoundError")}constructor(t={}){super({...t,...Oae.NOT_FOUND}),this.name="ApiNotFoundProblemError"}};wi.ApiNotFoundError=QF});var Iae=h(Iu=>{"use strict";var Dlt=Iu&&Iu.__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=Iu&&Iu.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Dlt(t,e,r)};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.HttpStatusCode=void 0;Llt(Pae(),Iu);var jlt=XF();Object.defineProperty(Iu,"HttpStatusCode",{enumerable:!0,get:function(){return jlt.HttpStatusCode}})});var Tae=h((mqt,wae)=>{"use strict";function Mlt(e){return e>=55296&&e<=56319}s(Mlt,"isHighSurrogate");function Ult(e){return e>=56320&&e<=57343}s(Ult,"isLowSurrogate");wae.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],Mlt(a)&&Ult(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 Aae=h((gqt,Nae)=>{"use strict";var xlt=Tae(),qlt=Buffer.byteLength.bind(Buffer);Nae.exports=xlt.bind(null,qlt)});var ZF=h(Jm=>{"use strict";var Flt=Jm&&Jm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.sanitize=void 0;var klt=Flt(Aae()),Blt=/[/?<>\\:*|"]/g,Glt=/[\x00-\x1f\x80-\x9f]/g,Vlt=/^\.+$/,zlt=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Hlt=/[. ]+$/;function Klt(e,t=""){if(typeof e!="string")throw new Error("Input must be string");let r=e.replace(Blt,t).replace(Glt,t).replace(Vlt,t).replace(zlt,t).replace(Hlt,t);return(0,klt.default)(r,255)}s(Klt,"sanitize");Jm.sanitize=Klt});var Dae=h(Xm=>{"use strict";var $ae=Xm&&Xm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.createProjectDirs=void 0;var Rae=$ae(require("fs/promises")),Wlt=$ae(require("path")),YE=kt(),Cae=rc(),Ylt=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 Rae.default.mkdir(e);for(let n of r)await Rae.default.mkdir(Wlt.default.join(e,n),{recursive:!0})}catch(n){return t.error(n),new Cae.PluginResult({message:`Cannot create project directory tree at ${e}`,pluginName:"create-project-dirs",severity:"error"})}return new Cae.PluginResult},"createProjectDirs");Xm.createProjectDirs=Ylt});var Uae=h(Qm=>{"use strict";var Mae=Qm&&Qm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qm,"__esModule",{value:!0});Qm.generateFromTemplate=void 0;var Jlt=require("fs"),Lae=Mae(require("fs/promises")),jae=Mae(require("path"));async function Xlt(e){let t=jae.default.resolve(__dirname,"..","templates",e);if((0,Jlt.existsSync)(t))return await Lae.default.readFile(t,"utf-8");{let r=jae.default.resolve(__dirname,"templates",e);return await Lae.default.readFile(r,"utf-8")}}s(Xlt,"generateFromTemplate");Qm.generateFromTemplate=Xlt});var Ti=h(Zm=>{"use strict";var N1=Zm&&Zm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zm,"__esModule",{value:!0});Zm.generateFileFromTemplate=void 0;var Qlt=N1(gn()),Zlt=N1(require("fs/promises")),eft=N1(require("path")),tft=N1(_n()),rft=Uae(),nft=s(function(e,t){return async({sourceDirectory:r,logger:n})=>tft.default.timeFn(`Generating ${e}`,async()=>{n.debug(`Generating ${e}`);let i=eft.default.join(r,e);return await Qlt.default.fileExists(i)?(n.debug({sourceDirectory:r},`${e} already exists, skipping`),{warnings:[],errors:[]}):ift(i,t,n)})},"generateFileFromTemplate");Zm.generateFileFromTemplate=nft;async function ift(e,t,r){let n=await(0,rft.generateFromTemplate)(t);try{await Zlt.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(ift,"writeTemplate")});var qae=h(e_=>{"use strict";var sft=e_&&e_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e_,"__esModule",{value:!0});e_.generateDefaultDocsMarkdown=void 0;var oft=sft(require("path")),xae=kt(),aft=Ti();e_.generateDefaultDocsMarkdown=(0,aft.generateFileFromTemplate)(oft.default.join(xae.USER_DOCS_DIR_NAME,xae.DEFAULT_DOCS_MARKDOWN_FILE),"markdown.template.md")});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_.generateDefaultDocsSidebar=void 0;var cft=uft(require("path")),Fae=kt(),lft=Ti();t_.generateDefaultDocsSidebar=(0,lft.generateFileFromTemplate)(cft.default.join(Fae.USER_DOCS_DIR_NAME,Fae.DOCS_SIDEBAR_FILE),"sidebar.template.json")});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_.generateDefaultDocsTheme=void 0;var dft=fft(require("path")),Bae=kt(),pft=Ti();r_.generateDefaultDocsTheme=(0,pft.generateFileFromTemplate)(dft.default.join(Bae.USER_DOCS_DIR_NAME,Bae.DOCS_THEME_FILE),"dev-portal.theme.template.css")});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_.generateDefaultModule=void 0;var mft=hft(require("path")),Vae=kt(),_ft=Ti();n_.generateDefaultModule=(0,_ft.generateFileFromTemplate)(mft.default.join(Vae.USER_MODULES_DIR_NAME,Vae.DEFAULT_MODULE_FILE),"hello-world.template.ts")});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_.generateDevPortalConfigJson=void 0;var yft=gft(require("path")),Hae=kt(),Eft=Ti();i_.generateDevPortalConfigJson=(0,Eft.generateFileFromTemplate)(yft.default.join(Hae.USER_CONFIG_DIR_NAME,Hae.DEV_PORTAL_CONFIG_FILE),"dev-portal.template.json")});var Wae=h(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.generateEnvironment=void 0;var bft=Ti();A1.generateEnvironment=(0,bft.generateFileFromTemplate)(".env","env.template")});var Yae=h(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.generateESLint=void 0;var Sft=Ti();R1.generateESLint=(0,Sft.generateFileFromTemplate)(".eslintrc.js","eslintrc.template.js")});var Jae=h(C1=>{"use strict";Object.defineProperty(C1,"__esModule",{value:!0});C1.generateGitignore=void 0;var vft=Ti();C1.generateGitignore=(0,vft.generateFileFromTemplate)(".gitignore","gitignore.template.ignore")});var Xae=h(s_=>{"use strict";var Oft=s_&&s_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s_,"__esModule",{value:!0});s_.generateLaunchJson=void 0;var Pft=Oft(require("path")),Ift=Ti();s_.generateLaunchJson=(0,Ift.generateFileFromTemplate)(Pft.default.join(".vscode","launch.json"),"launch.template.jsonc")});var Zae=h(o_=>{"use strict";var wft=o_&&o_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o_,"__esModule",{value:!0});o_.generateRouteOasConfig=void 0;var Tft=wft(require("path")),Qae=kt(),Nft=Ti();o_.generateRouteOasConfig=(0,Nft.generateFileFromTemplate)(Tft.default.join(Qae.USER_CONFIG_DIR_NAME,Qae.ROUTES_OAS_CONFIG_FILE),"routes.oas.template.json")});var rue=h(qs=>{"use strict";var ek=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 eue=ek(require("fs/promises")),tk=ek(require("path")),Aft=ek(Xs());async function Rft(e,t=Aft.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=tue();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(Rft,"generateDefaultPackageJson");qs.generateDefaultPackageJson=Rft;function tue(){let e=tk.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(tue,"getPackageOverrides");qs.getPackageOverrides=tue;async function Cft(e){let t=tk.default.join(e,"package.json"),r=await eue.default.readFile(t,"utf-8");return JSON.parse(r)}s(Cft,"getProjectPackageJson");qs.getProjectPackageJson=Cft;async function $ft(e,t){let r=tk.default.join(e,"package.json"),n=JSON.stringify(t,void 0,2);await eue.default.writeFile(r,n,"utf-8")}s($ft,"updateProjectPackageJson");qs.updateProjectPackageJson=$ft});var sue=h($1=>{"use strict";Object.defineProperty($1,"__esModule",{value:!0});$1.generatePackageJson=void 0;var nue=rue(),iue=rc(),Dft=s(async function({sourceDirectory:e,name:t,logger:r}){let n=await(0,nue.generateDefaultPackageJson)(t);try{await(0,nue.updateProjectPackageJson)(e,n)}catch(i){return r.error(i),new iue.PluginResult({message:"Error creating package.json",pluginName:"generate-package-json",severity:"error"})}return new iue.PluginResult},"generatePackageJson");$1.generatePackageJson=Dft});var aue=h(a_=>{"use strict";var Lft=a_&&a_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a_,"__esModule",{value:!0});a_.generatePoliciesConfig=void 0;var jft=Lft(require("path")),oue=kt(),Mft=Ti();a_.generatePoliciesConfig=(0,Mft.generateFileFromTemplate)(jft.default.join(oue.USER_CONFIG_DIR_NAME,oue.POLICIES_CONFIG_FILE),"policies.template.json")});var uue=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_.generateSettingsJson=void 0;var xft=Uft(require("path")),qft=Ti();u_.generateSettingsJson=(0,qft.generateFileFromTemplate)(xft.default.join(".vscode","settings.json"),"settings.template.jsonc")});var cue=h(D1=>{"use strict";Object.defineProperty(D1,"__esModule",{value:!0});D1.generateTSConfig=void 0;var Fft=Ti();D1.generateTSConfig=(0,Fft.generateFileFromTemplate)("tsconfig.json","tsconfig.template.json")});var fue=h(c_=>{"use strict";var kft=c_&&c_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c_,"__esModule",{value:!0});c_.generateZuploJson=void 0;var Bft=Yo(),Gft=require("fs/promises"),Vft=kft(require("path")),zft=kt(),lue=rc(),Hft=s(async function({name:e,sourceDirectory:t,logger:r}){let n={version:1,project:e,compatibilityDate:Bft.DEFAULT_COMPATIBILITY_DATE},i=Vft.default.join(t,zft.ZUPLO_PREFERRED_JSON_FILE),o=JSON.stringify(n,null,2);try{await(0,Gft.writeFile)(i,o,"utf-8")}catch(a){return r.error(a),new lue.PluginResult({message:"Error creating zuplo.jsonc",pluginName:"generate-zuplo-json",severity:"error"})}return new lue.PluginResult},"generateZuploJson");c_.generateZuploJson=Hft});var mue=h(l_=>{"use strict";var hue=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0});l_.create=void 0;var due=Iae(),Kft=hue(gn()),Wft=require("fs/promises"),Yft=hue(require("path")),Jft=rc(),pue=ZF(),Xft=Dae(),Qft=qae(),Zft=kae(),edt=Gae(),tdt=zae(),rdt=Kae(),ndt=Wae(),idt=Yae(),sdt=Jae(),odt=Xae(),adt=Zae(),udt=sue(),cdt=aue(),ldt=uue(),fdt=cue(),ddt=fue();async function pdt({name:e,accountName:t="",rootDirectory:r,logger:n}){let i=(0,pue.sanitize)(e),o=(0,pue.sanitize)(t),a=Yft.default.join(r,o,i),u={name:e,sourceDirectory:a,logger:n},c=[];if(await Kft.default.dirExists(a))throw new due.ApiError({type:"https://zup.fail/project-already-exists-at-directory",title:"The project already exists in the specified directory",status:due.HttpStatusCode.BAD_REQUEST,detail:`Project already exists at ${a}`});c.push(Xft.createProjectDirs,adt.generateRouteOasConfig,ddt.generateZuploJson,rdt.generateDevPortalConfigJson,tdt.generateDefaultModule,Zft.generateDefaultDocsSidebar,Qft.generateDefaultDocsMarkdown,edt.generateDefaultDocsTheme,cdt.generatePoliciesConfig),c.push(fdt.generateTSConfig,sdt.generateGitignore,udt.generatePackageJson,ndt.generateEnvironment,idt.generateESLint,odt.generateLaunchJson,ldt.generateSettingsJson);let{errors:l,warnings:f}=await(0,Jft.runPlugins)(c,u);if(f.length>0&&f.forEach(_=>{n.warn(_)}),l.length>0){await(0,Wft.rm)(a,{recursive:!0,force:!0});let _=l[0];throw _ instanceof Error?_:new Error(_.message)}return{sourceDirectory:a,projectName:e}}s(pdt,"create");l_.create=pdt});var bue=h((Kqt,Eue)=>{Eue.exports=yue;yue.sync=mdt;var _ue=require("fs");function hdt(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(hdt,"checkPathExt");function gue(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:hdt(t,r)}s(gue,"checkStat");function yue(e,t,r){_ue.stat(e,function(n,i){r(n,n?!1:gue(i,e,t))})}s(yue,"isexe");function mdt(e,t){return gue(_ue.statSync(e),e,t)}s(mdt,"sync")});var Iue=h((Yqt,Pue)=>{Pue.exports=vue;vue.sync=_dt;var Sue=require("fs");function vue(e,t,r){Sue.stat(e,function(n,i){r(n,n?!1:Oue(i,t))})}s(vue,"isexe");function _dt(e,t){return Oue(Sue.statSync(e),t)}s(_dt,"sync");function Oue(e,t){return e.isFile()&&gdt(e,t)}s(Oue,"checkStat");function gdt(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(gdt,"checkMode")});var Tue=h((Qqt,wue)=>{var Xqt=require("fs"),L1;process.platform==="win32"||global.TESTING_WINDOWS?L1=bue():L1=Iue();wue.exports=rk;rk.sync=ydt;function rk(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){rk(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(rk,"isexe");function ydt(e,t){try{return L1.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}s(ydt,"sync")});var Lue=h((e2t,Due)=>{var f_=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Nue=require("path"),Edt=f_?";":":",Aue=Tue(),Rue=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Cue=s((e,t)=>{let r=t.colon||Edt,n=e.match(/\//)||f_&&e.match(/\\/)?[""]:[...f_?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=f_?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=f_?i.split(r):[""];return f_&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},"getPathInfo"),$ue=s((e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:o}=Cue(e,t),a=[],u=s(l=>new Promise((f,d)=>{if(l===n.length)return t.all&&a.length?f(a):d(Rue(e));let _=n[l],m=/^".*"$/.test(_)?_.slice(1,-1):_,g=Nue.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];Aue(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"),bdt=s((e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Cue(e,t),o=[];for(let a=0;a<r.length;a++){let u=r[a],c=/^".*"$/.test(u)?u.slice(1,-1):u,l=Nue.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(Aue.sync(_,{pathExt:i}))if(t.all)o.push(_);else return _}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Rue(e)},"whichSync");Due.exports=$ue;$ue.sync=bdt});var ik=h((r2t,nk)=>{"use strict";var jue=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");nk.exports=jue;nk.exports.default=jue});var que=h((i2t,xue)=>{"use strict";var Mue=require("path"),Sdt=Lue(),vdt=ik();function Uue(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=Sdt.sync(e.command,{path:r[vdt({env:r})],pathExt:t?Mue.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=Mue.resolve(i?e.options.cwd:"",a)),a}s(Uue,"resolveCommandAttempt");function Odt(e){return Uue(e)||Uue(e,!0)}s(Odt,"resolveCommand");xue.exports=Odt});var Fue=h((o2t,ok)=>{"use strict";var sk=/([()\][%!^"`<>&|;, *?])/g;function Pdt(e){return e=e.replace(sk,"^$1"),e}s(Pdt,"escapeCommand");function Idt(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(sk,"^$1"),t&&(e=e.replace(sk,"^$1")),e}s(Idt,"escapeArgument");ok.exports.command=Pdt;ok.exports.argument=Idt});var Bue=h((u2t,kue)=>{"use strict";kue.exports=/^#!(.*)/});var Vue=h((c2t,Gue)=>{"use strict";var wdt=Bue();Gue.exports=(e="")=>{let t=e.match(wdt);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var Hue=h((l2t,zue)=>{"use strict";var ak=require("fs"),Tdt=Vue();function Ndt(e){let r=Buffer.alloc(150),n;try{n=ak.openSync(e,"r"),ak.readSync(n,r,0,150,0),ak.closeSync(n)}catch{}return Tdt(r.toString())}s(Ndt,"readShebang");zue.exports=Ndt});var Jue=h((d2t,Yue)=>{"use strict";var Adt=require("path"),Kue=que(),Wue=Fue(),Rdt=Hue(),Cdt=process.platform==="win32",$dt=/\.(?:com|exe)$/i,Ddt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Ldt(e){e.file=Kue(e);let t=e.file&&Rdt(e.file);return t?(e.args.unshift(e.file),e.command=t,Kue(e)):e.file}s(Ldt,"detectShebang");function jdt(e){if(!Cdt)return e;let t=Ldt(e),r=!$dt.test(t);if(e.options.forceShell||r){let n=Ddt.test(t);e.command=Adt.normalize(e.command),e.command=Wue.command(e.command),e.args=e.args.map(o=>Wue.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(jdt,"parseNonShell");function Mdt(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:jdt(n)}s(Mdt,"parse");Yue.exports=Mdt});var Zue=h((h2t,Que)=>{"use strict";var uk=process.platform==="win32";function ck(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(ck,"notFoundError");function Udt(e,t){if(!uk)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let o=Xue(i,t,"spawn");if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}s(Udt,"hookChildProcess");function Xue(e,t){return uk&&e===1&&!t.file?ck(t.original,"spawn"):null}s(Xue,"verifyENOENT");function xdt(e,t){return uk&&e===1&&!t.file?ck(t.original,"spawnSync"):null}s(xdt,"verifyENOENTSync");Que.exports={hookChildProcess:Udt,verifyENOENT:Xue,verifyENOENTSync:xdt,notFoundError:ck}});var rce=h((_2t,d_)=>{"use strict";var ece=require("child_process"),lk=Jue(),fk=Zue();function tce(e,t,r){let n=lk(e,t,r),i=ece.spawn(n.command,n.args,n.options);return fk.hookChildProcess(i,n),i}s(tce,"spawn");function qdt(e,t,r){let n=lk(e,t,r),i=ece.spawnSync(n.command,n.args,n.options);return i.error=i.error||fk.verifyENOENTSync(i.status,n),i}s(qdt,"spawnSync");d_.exports=tce;d_.exports.spawn=tce;d_.exports.sync=qdt;d_.exports._parse=lk;d_.exports._enoent=fk});var ice=h((y2t,nce)=>{"use strict";nce.exports=e=>{let t=typeof e=="string"?`
302
+ `},nodePaths:uae,entryPoints:[a],...c,sourcemap:"linked",legalComments:"linked",treeShaking:!0,bundle:!0,...u,external:[],logLevel:"silent",conditions:Zc.BUILD_CONDITIONS,plugins:[(0,Xut.environmentPlugin)({sourceDirectory:n}),(0,Yut.blockRemoteModulePlugin)({logger:i}),(0,ect.openApiRoutesPlugin)({sourceDirectory:n,outputDirectory:r}),(0,tct.rawRoutePlugin)({sourceDirectory:n,logger:i}),(0,nct.schemaValidationPlugin)({sourceDirectory:n,logger:i,isOpenApiBased:!0}),(0,rct.runtimeConfigPlugin)(),(0,Jut.devPortalConfigPlugin)({sourceDirectory:n}),(0,Qut.jsonSchemaPlugin)({sourceDirectory:n,outputDirectory:r}),(0,Zut.nodejsCompatPlugin)({nodeCompatEnabled:o?.esmWorker===!0,sourceDirectory:n})]}}s(sct,"getBaseESBuildConfig");Zc.default=sct});var S1=h(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.formatBuildResult=Ms.BUILD_TASK_PLUGIN_NAME=Ms.ESBUILD_PLUGIN_NAME=void 0;Ms.ESBUILD_PLUGIN_NAME="run-esbuild";Ms.BUILD_TASK_PLUGIN_NAME="build-task";var oct=s((e,t)=>{let r=t;if(t.includes(e)){let n=new RegExp(`.*(${e})`,"g");r=t.replace(n,"")}return r.match(/^(\/)?(\.\.(\/)?)+/)&&(r=r.replace(/^(\/)?(\.\.(\/)?)+/,"/")),r},"removePrefixFromString"),act=s((e,t)=>{let r=t;if(r.includes(e)){let n=new RegExp(`[a-zA-Z0-9-_.\\/]+(${e})`,"g");r=r.replace(n,"")}return r},"cleanFilePathsInMessage"),b1=s((e,t,r)=>{if(!e||e.length<=0)return e;let n=e.filter(i=>i.message!=='Could not resolve "@zuplo/runtime"');return n&&n.length>0&&n.forEach(i=>{i.location&&i.location.file&&(i.location.file=oct(t,i.location.file)),i.location&&i.location.lineText&&i.location.lineText.includes("@zuplo/core/index.minified.js")&&(i.location.lineText=i.location.lineText.substring(0,200)+"...<Truncated>"),i.message=act(t,i.message),i.notes&&i.notes.length>0&&delete i.notes,i.text&&delete i.text,i.pluginName===""&&(i.pluginName=r)}),n},"cleanDataOnBuildIssue");function uct(e,t,r){try{e.buildTaskResult&&(e.buildTaskResult.errors&&(e.buildTaskResult.errors=b1(e.buildTaskResult.errors,t,Ms.BUILD_TASK_PLUGIN_NAME)),e.buildTaskResult.warnings&&(e.buildTaskResult.warnings=b1(e.buildTaskResult.warnings,t,Ms.BUILD_TASK_PLUGIN_NAME))),e.compilerResult&&(e.compilerResult.errors&&(e.compilerResult.errors=b1(e.compilerResult.errors,t,Ms.ESBUILD_PLUGIN_NAME)),e.compilerResult.warnings&&(e.compilerResult.warnings=b1(e.compilerResult.warnings,t,Ms.ESBUILD_PLUGIN_NAME)))}catch(n){r.error("Error while formatting buildResult. Err: ",n)}return e}s(uct,"formatBuildResult");Ms.formatBuildResult=uct});var fae=h(Us=>{"use strict";var cct=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]}),lct=Us&&Us.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),fct=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)&&cct(t,e,r);return lct(t,e),t},lae=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});Us.getRunEsBuildPlugin=void 0;var dct=Gf(),cae=Yo(),pct=fct(require("esbuild")),hct=lae(_n()),mct=CP(),_ct=lae(zF()),HF=S1(),gct=s(function(e){return s(async function({systemDirectory:r,outputDirectory:n,sourceDirectory:i,dev:o,generateSourceMaps:a,buildId:u,logger:c,config:l}){return hct.default.timeFn("Running esbuild",async()=>{c.info(`Running build_id: ${u}`);let f=await(0,_ct.default)({systemDirectory:r,outputDirectory:n,generateSourceMaps:a,sourceDirectory:i,dev:o,logger:c,flags:l.flags}),d,_=new Date;try{if(!await(0,dct.oasFileInProject)(i))throw new Error("Failed to build project because no open-api file was found on the 'config' folder");d=await pct.build(f)}catch(g){if(c.error(g),g.errors||g.warnings)d=g;else if(g.message.includes("Failed to build project because no open-api file was found on the 'config' folder"))d={warnings:[],errors:[{id:"missing-open-api-file",text:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:HF.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 g}let m=new Date;if(e(new mct.CompilerResult(d,{endBuildTime:m,startBuildTime:_,buildId:u??""})),d.errors.length>0){d.errors.length>1&&(d.errors.length=1);let g=d.errors[0];c.debug(g)}return{warnings:[...d.warnings.map(g=>({message:g.text,pluginName:HF.ESBUILD_PLUGIN_NAME,severity:cae.WARNING_SEVERITY}))],errors:[...d.errors.map(g=>({message:g.text,pluginName:HF.ESBUILD_PLUGIN_NAME,severity:cae.ERROR_SEVERITY}))]}})},"runEsbuild")},"getRunEsBuildPlugin");Us.getRunEsBuildPlugin=gct});var WF=h(Ym=>{"use strict";var pae=Ym&&Ym.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ym,"__esModule",{value:!0});Ym.build=void 0;var Wm=Yo(),yct=require("crypto"),Ect=require("fs"),KE=pae(require("path")),dae=kt(),bct=rc(),Sct=pae(_n()),vct=Bz(),Oct=Vz(),Pct=zz(),Ict=Hz(),wct=Jz(),Tct=Xz(),Nct=tH(),Act=f9(),Rct=p9(),Cct=fae(),KF=S1(),v1;try{let e=(0,Ect.readFileSync)(KE.default.resolve(__dirname,"../../package.json"),"utf-8");v1=JSON.parse(e).version}catch{v1="0.0.0"}async function $ct({sourceDirectory:e,deploymentName:t=KE.default.basename(e),dev:r,entitlements:n,environmentType:i,generateSourceMaps:o=!1,logger:a,noCompile:u=!1,postBuildTasks:c,projectId:l,publicZuploEnvironmentVariables:f={}}){let d=(0,yct.randomUUID)(),_=a.child({buildId:d});return Sct.default.timeFn(`Run build with build_id: ${d}`,async()=>{let m=await(0,vct.getZuploConfig)(e),g=KE.default.join(e,dae.BUILD_OUTPUT_DIR),y;if("errors"in m)y={status:"Failed",flags:void 0,compatibilityDate:void 0,runtimeVersion:v1,outputPath:g,buildTaskResult:{buildTime:"",buildTimeMs:0,status:Wm.FAILURE_STATUS,buildId:d,warnings:[],errors:m.errors}};else{let E={dev:r,generateSourceMaps:o,deploymentName:t,sourceDirectory:e,outputDirectory:g,systemDirectory:KE.default.join(e,dae.GENERATED_SOURCE_DIR_NAME),buildId:d,logger:_,config:m.config,publicZuploEnvironmentVariables:f,projectId:l,entitlements:n,environmentType:i},S=[];S.push(Oct.cleanOutput),S.push(Pct.createSystemDir),S.push(Ict.checkForDeprecations),S.push(wct.generateBuildData),S.push(Nct.validateDevPortalJSON),S.push(Act.validateOpenAPIFiles),S.push(Tct.generateWorker);let O,I=s(V=>{O=V},"compileCallback");u||S.push((0,Cct.getRunEsBuildPlugin)(I)),S.push(Rct.verifyWorkerOutput),c&&S.push(...c);let w=await(0,bct.runPlugins)(S,E),D=w.errors.length>0?Wm.FAILURE_STATUS:w.warnings.length>0?Wm.WARNING_STATUS:Wm.GOOD_STATUS;y={status:D==="Failed"||O===void 0||O.status==="Failed"?"Failed":D==="Warnings"||O.status==="Warnings"?"Warnings":"Good",compatibilityDate:m.config.compatibilityDate,runtimeVersion:v1,outputPath:g,compilerResult:O,buildTaskResult:{buildTime:"",buildTimeMs:0,status:D,buildId:d,warnings:w.warnings,errors:w.errors},flags:m.config.flags}}if(y.buildTaskResult.warnings.length>0){y.buildTaskResult.warnings.forEach(S=>{_.warn(S)});let E=y.buildTaskResult.warnings.filter(S=>S.pluginName!=="runEsbuild"&&S.pluginName!==KF.ESBUILD_PLUGIN_NAME);E.length>0&&(y.buildTaskResult.warnings=E),y.buildTaskResult.status=Wm.WARNING_STATUS}if(y.buildTaskResult.errors.length>0){y.buildTaskResult.errors.forEach(S=>{_.error(S)});let E=y.buildTaskResult.errors.filter(S=>S.pluginName!=="runEsbuild"&&S.pluginName!==KF.ESBUILD_PLUGIN_NAME);E.length>0&&(y.buildTaskResult.errors=E),y.buildTaskResult.status=Wm.FAILURE_STATUS}if(_.debug(`Build ${y.compilerResult?.buildId??d} completed ${u?"on watch mode":"with compiler status "+y.compilerResult?.status} and build task status ${y.buildTaskResult.status}`),y.compilerResult){let{metafile:E,...S}=y.compilerResult;_.debug(`Compiler results for build ${y.compilerResult?.buildId??d}`,S)}_.debug(`Build task results for build ${y.buildTaskResult?.buildId??d}`,y.buildTaskResult);let b=KE.default.basename(e);return(0,KF.formatBuildResult)(y,b,_)})}s($ct,"build");Ym.build=$ct});var P1=h(xs=>{"use strict";var Dct=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]}),Lct=xs&&xs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jct=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)&&Dct(t,e,r);return Lct(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 hae=Yo(),Mct=O1(require("chokidar")),Uct=jct(require("esbuild")),mae=require("crypto"),xct=O1(require("events")),WE=O1(require("path")),_ae=kt(),qct=WF(),gae=CP(),Fct=O1(zF()),yae=S1(),YF=class extends xct.default{static{s(this,"WatchEmitter")}},JF=class{static{s(this,"BuildWatcher")}esbuildContext;emitter=new YF;envFilesWatcher;outputDirectory;sourceDirectory;dev;generateSourceMaps;logger;publicZuploEnvironmentVariables;projectName;constructor({sourceDirectory:t,dev:r,generateSourceMaps:n,logger:i,publicZuploEnvironmentVariables:o={}}){this.sourceDirectory=t,this.dev=r,this.outputDirectory=WE.default.join(t,_ae.BUILD_OUTPUT_DIR),this.generateSourceMaps=n??!1,this.logger=i,this.publicZuploEnvironmentVariables=o,this.projectName=WE.default.basename(t),this.envFilesWatcher=Mct.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,qct.build)({sourceDirectory:t,noCompile:!0,dev:this.dev,generateSourceMaps:this.generateSourceMaps,publicZuploEnvironmentVariables:this.publicZuploEnvironmentVariables,logger:this.logger}),n=await(0,Fct.default)({systemDirectory:WE.default.join(t,_ae.GENERATED_SOURCE_DIR_NAME),outputDirectory:this.outputDirectory,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 gae.CompilerResult(a),u.errors.length>0){let c={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:hae.FAILURE_STATUS,buildId:(0,mae.randomUUID)(),warnings:[],errors:[]}};c.compilerResult=u,(0,yae.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 Uct.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:hae.FAILURE_STATUS,buildId:(0,mae.randomUUID)(),warnings:[],errors:[]}};a.compilerResult=new gae.CompilerResult(o),(0,yae.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=JF});var XF=h(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});I1.HttpStatusCode=void 0;var Eae;(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"})(Eae||(I1.HttpStatusCode=Eae={}))});var bae=h(w1=>{"use strict";Object.defineProperty(w1,"__esModule",{value:!0});w1.getSourceControlProviderLabel=void 0;function kct(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(kct,"getSourceControlProviderLabel");w1.getSourceControlProviderLabel=kct});var vae=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.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_REMOTE_BRANCH_EXISTS=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.API_KEY_CANNOT_BE_CREATED=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.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS=v.RBACCONFIGURATION_DOES_NOT_EXISTS=v.RBAC_INVALID_EXPIRATION_DATE=v.ACCOUNT_RBAC_DISABLED=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=v.DUPLICATE_ENVIRONMENT_VARIABLE=v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=void 0;v.RBACCONFIGURATION_CONSUMER_LOCKED=v.RBACCONFIGURATION_MISCONFIGURATION=v.RBACCONFIGURATION_DELETE_MISCONFIGURATION=v.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG=v.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED=v.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS=v.RBACCONFIGURATION_REQUIRE_PROJECTS=v.RBACCONFIGURATION_INVALID_ENVIRONMENTS=void 0;var N=XF(),Sae=bae(),Bct="https://github.com/apps/zuplo/installations/new";v.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:N.HttpStatusCode.BAD_REQUEST};v.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:N.HttpStatusCode.CONFLICT};v.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:N.HttpStatusCode.NOT_FOUND};v.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:N.HttpStatusCode.METHOD_NOT_ALLOWED};v.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:N.HttpStatusCode.UNAUTHORIZED};v.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:N.HttpStatusCode.FORBIDDEN};v.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:N.HttpStatusCode.NOT_FOUND};v.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:N.HttpStatusCode.CONFLICT};v.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:N.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:N.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:N.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:N.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.NOT_FOUND};v.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:N.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:N.HttpStatusCode.FORBIDDEN};v.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:N.HttpStatusCode.BAD_REQUEST};var Gct=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:N.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");v.INVALID_TEMPLATE_REPOSITORY=Gct;v.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:N.HttpStatusCode.NOT_FOUND};v.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:N.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:N.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:N.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:N.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:N.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:N.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:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:"Deployment is not working copy.",status:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:N.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:N.HttpStatusCode.BAD_REQUEST};v.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:N.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:N.HttpStatusCode.BAD_REQUEST};v.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:N.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:N.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:N.HttpStatusCode.FORBIDDEN};v.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};var Vct=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:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");v.USER_NO_ACCESS_GITHUB_REPO=Vct;var zct=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:N.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");v.USER_NO_PULL_ACCESS_GITHUB_REPO=zct;var Hct=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:N.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");v.GITHUB_USER_NO_READ_ACCESS_REPO=Hct;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:N.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:N.HttpStatusCode.FORBIDDEN};var Kct=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 '${Bct}' to add the repository.`,status:N.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");v.GITHUB_APP_NO_USER_ACCESS_=Kct;v.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:N.HttpStatusCode.NOT_FOUND};var Wct=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:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");v.USER_NO_ACCESS_BITBUCKET_REPO=Wct;var Yct=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:N.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");v.USER_NO_ACCESS_GITLAB_REPO=Yct;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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};var Jct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:N.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Jct;var Xct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:N.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");v.GITHUB_REPOSITORY_NOT_FOUND=Xct;v.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:N.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:N.HttpStatusCode.FORBIDDEN};var Qct=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:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");v.GITHUB_INTEGRATION_DUPLICATE_REPO=Qct;var Zct=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:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=Zct;var elt=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:N.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=elt;var tlt=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:N.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=tlt;var rlt=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:N.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");v.GITHUB_INTEGRATION_INVALID_REPO=rlt;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:N.HttpStatusCode.FORBIDDEN};v.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:N.HttpStatusCode.FORBIDDEN};var nlt=s(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:N.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");v.BITBUCKET_FAILED_DURING_REPO_CREATION=nlt;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:N.HttpStatusCode.FORBIDDEN};var ilt=s(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");v.GITLAB_FAILED_DURING_REPO_CREATION=ilt;var slt=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:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");v.GITLAB_DUPLICATE_REPO=slt;var olt=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:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=olt;var alt=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:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=alt;var ult=s(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:N.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=ult;v.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:N.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:N.HttpStatusCode.NOT_FOUND};v.CONSUMER_CANNOT_BE_CREATED={type:"https://zup.fail/consumer-not-created",title:"Failed to create consumer",status:N.HttpStatusCode.BAD_GATEWAY};v.API_KEY_CANNOT_BE_CREATED={type:"https://zup.fail/api-key-not-created",title:"Failed to create api key",status:N.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:N.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:N.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:N.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:N.HttpStatusCode.INTERNAL_SERVER_ERROR};var clt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${(0,Sae.getSourceControlProviderLabel)(e)}`,status:N.HttpStatusCode.UNAUTHORIZED}),"SOURCE_CONTROL_AUTHENTICATION_FAILED");v.SOURCE_CONTROL_AUTHENTICATION_FAILED=clt;var llt=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,Sae.getSourceControlProviderLabel)(e)} repository`,status:N.HttpStatusCode.NOT_FOUND}),"SOURCE_CONTROL_REPO_NOT_FOUND");v.SOURCE_CONTROL_REPO_NOT_FOUND=llt;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:N.HttpStatusCode.BAD_REQUEST};var flt=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:N.HttpStatusCode.FORBIDDEN}),"SOURCE_CONTROL_REPO_OPERATION_ERROR");v.SOURCE_CONTROL_REPO_OPERATION_ERROR=flt;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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS={type:"https://zup.fail/source-control-integration-branch-behind",title:"The branch exists in the remote repository. Please try again with a different branch name.",status:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.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:N.HttpStatusCode.FAILED_DEPENDENCY};v.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:N.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:N.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:N.HttpStatusCode.BAD_REQUEST};v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:N.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:N.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:N.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:N.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:N.HttpStatusCode.BAD_REQUEST};v.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:N.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:N.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:N.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:N.HttpStatusCode.NOT_FOUND};var dlt=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:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=dlt;var plt=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:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=plt;v.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:"Migrations can only run on working copies.",status:N.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:N.HttpStatusCode.BAD_REQUEST};v.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:"No package.json file found.",status:N.HttpStatusCode.NOT_FOUND};v.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:"Cannot read package.json file.",status:N.HttpStatusCode.BAD_REQUEST};v.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:"Cannot find source directory.",status:N.HttpStatusCode.BAD_REQUEST};v.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:"Failed to download content from storage.",status:N.HttpStatusCode.BAD_REQUEST};var hlt=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:N.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=hlt;var mlt=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:N.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=mlt;var _lt=s(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:N.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");v.DIRECTORY_ALREADY_EXISTS=_lt;var glt=s(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:N.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");v.DIRECTORY_DOES_NOT_EXIST=glt;var ylt=s(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:N.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=ylt;var Elt=s(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");v.DIRECTORY_CREATION_FAILED=Elt;var blt=s(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:N.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=blt;var Slt=s(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:N.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=Slt;var vlt=s(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:N.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=vlt;var Olt=s(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");v.FILE_RENAME_FAILED=Olt;var Plt=s(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");v.FILE_WRITE_FAILED=Plt;var Ilt=s(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:N.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");v.CANNOT_DELETE_ESSENTIAL_FILE=Ilt;var wlt=s(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:N.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=wlt;var Tlt=s(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:N.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=Tlt;var Nlt=s(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");v.FILE_DELETE_FAILED=Nlt;var Alt=s(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:N.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");v.DIRECTORY_DELETE_FAILED=Alt;v.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:N.HttpStatusCode.CONFLICT};v.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:N.HttpStatusCode.NOT_FOUND};v.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:N.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:N.HttpStatusCode.INTERNAL_SERVER_ERROR};v.ACCOUNT_RBAC_DISABLED={type:"https://zup.fail/account_rbac_disabled",title:"Account does not have RBAC enabled. Please contact support to get this feature enabled.",status:N.HttpStatusCode.FORBIDDEN};v.RBAC_INVALID_EXPIRATION_DATE={type:"https://zup.fail/rbac_invalid_expiration_date",title:"Invalid expiresOn date provided",detail:"The expiresOn date provided must be greater than the current date",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_DOES_NOT_EXISTS={type:"https://zup.fail/rbacconfiguration-does-not-exists",title:"RBAC configuration record can not be found",detail:"The RBAC configuration does not exist or you don't have access to it.",status:N.HttpStatusCode.NOT_FOUND};v.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS={type:"https://zup.fail/rbacconfiguration-required-environments",title:"You must provide at least one environment value.",detail:"Please provide at least one environment value. Valid options include 'production', 'preview' and 'development'.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_INVALID_ENVIRONMENTS={type:"https://zup.fail/rbacconfiguration-invalid-environments",title:"The environment configuration provided is invalid.",detail:"Please provide at least one environment value. Valid options include 'production', 'preview' and 'development'.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_REQUIRE_PROJECTS={type:"https://zup.fail/rbacconfiguration-required-projects",title:"You must provide at least one project to configure.",detail:"Please provide at least one project to configure access for.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS={type:"https://zup.fail/rbacconfiguration-no-projects",title:"Cannot find the specified projects on this account",detail:"The account does not have any projects to configure. Please create at least one project before configuring RBAC access.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED={type:"https://zup.fail/rbacconfiguration-invalid-project",title:"You must provide valid projects to configure",detail:"One or more of the projects provided is not part of the account or does not exist. Make sure all the projects are valid and try again.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG={type:"https://zup.fail/rbacconfiguration-invalid-openfga-config",title:"Unexpected error while creating the configuration",detail:"The provided configuration caused an unexpected error. Please contact support.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_DELETE_MISCONFIGURATION={type:"https://zup.fail/rbacconfiguration-delete-misconfiguration",title:"Failed to delete the configuration",detail:"The provided configuration was not correctly created and cannot be deleted. Please contact support.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_MISCONFIGURATION={type:"https://zup.fail/rbacconfiguration-misconfiguration",title:"Configuration was created with errors",detail:"The provided configuration was not correctly created and cannot be used. Please contact support.",status:N.HttpStatusCode.BAD_REQUEST};v.RBACCONFIGURATION_CONSUMER_LOCKED={type:"https://zup.fail/rbacconfiguration-consumer-locked",title:"Consumer is locked and can't be modified or deleted",detail:"The provided consumer is locked and can't be modified or deleted.",status:N.HttpStatusCode.FORBIDDEN}});var Pae=h(wi=>{"use strict";var Rlt=wi&&wi.__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]}),Clt=wi&&wi.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$lt=wi&&wi.__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)&&Rlt(t,e,r);return Clt(t,e),t};Object.defineProperty(wi,"__esModule",{value:!0});wi.ApiNotFoundError=wi.ApiError=wi.Problems=void 0;var Oae=$lt(vae());wi.Problems=Oae;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}};wi.ApiError=T1;var QF=class extends T1{static{s(this,"ApiNotFoundError")}constructor(t={}){super({...t,...Oae.NOT_FOUND}),this.name="ApiNotFoundProblemError"}};wi.ApiNotFoundError=QF});var Iae=h(Iu=>{"use strict";var Dlt=Iu&&Iu.__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=Iu&&Iu.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Dlt(t,e,r)};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.HttpStatusCode=void 0;Llt(Pae(),Iu);var jlt=XF();Object.defineProperty(Iu,"HttpStatusCode",{enumerable:!0,get:function(){return jlt.HttpStatusCode}})});var Tae=h((mqt,wae)=>{"use strict";function Mlt(e){return e>=55296&&e<=56319}s(Mlt,"isHighSurrogate");function Ult(e){return e>=56320&&e<=57343}s(Ult,"isLowSurrogate");wae.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],Mlt(a)&&Ult(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 Aae=h((gqt,Nae)=>{"use strict";var xlt=Tae(),qlt=Buffer.byteLength.bind(Buffer);Nae.exports=xlt.bind(null,qlt)});var ZF=h(Jm=>{"use strict";var Flt=Jm&&Jm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.sanitize=void 0;var klt=Flt(Aae()),Blt=/[/?<>\\:*|"]/g,Glt=/[\x00-\x1f\x80-\x9f]/g,Vlt=/^\.+$/,zlt=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Hlt=/[. ]+$/;function Klt(e,t=""){if(typeof e!="string")throw new Error("Input must be string");let r=e.replace(Blt,t).replace(Glt,t).replace(Vlt,t).replace(zlt,t).replace(Hlt,t);return(0,klt.default)(r,255)}s(Klt,"sanitize");Jm.sanitize=Klt});var Dae=h(Xm=>{"use strict";var $ae=Xm&&Xm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.createProjectDirs=void 0;var Rae=$ae(require("fs/promises")),Wlt=$ae(require("path")),YE=kt(),Cae=rc(),Ylt=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 Rae.default.mkdir(e);for(let n of r)await Rae.default.mkdir(Wlt.default.join(e,n),{recursive:!0})}catch(n){return t.error(n),new Cae.PluginResult({message:`Cannot create project directory tree at ${e}`,pluginName:"create-project-dirs",severity:"error"})}return new Cae.PluginResult},"createProjectDirs");Xm.createProjectDirs=Ylt});var Uae=h(Qm=>{"use strict";var Mae=Qm&&Qm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qm,"__esModule",{value:!0});Qm.generateFromTemplate=void 0;var Jlt=require("fs"),Lae=Mae(require("fs/promises")),jae=Mae(require("path"));async function Xlt(e){let t=jae.default.resolve(__dirname,"..","templates",e);if((0,Jlt.existsSync)(t))return await Lae.default.readFile(t,"utf-8");{let r=jae.default.resolve(__dirname,"templates",e);return await Lae.default.readFile(r,"utf-8")}}s(Xlt,"generateFromTemplate");Qm.generateFromTemplate=Xlt});var Ti=h(Zm=>{"use strict";var N1=Zm&&Zm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zm,"__esModule",{value:!0});Zm.generateFileFromTemplate=void 0;var Qlt=N1(gn()),Zlt=N1(require("fs/promises")),eft=N1(require("path")),tft=N1(_n()),rft=Uae(),nft=s(function(e,t){return async({sourceDirectory:r,logger:n})=>tft.default.timeFn(`Generating ${e}`,async()=>{n.debug(`Generating ${e}`);let i=eft.default.join(r,e);return await Qlt.default.fileExists(i)?(n.debug({sourceDirectory:r},`${e} already exists, skipping`),{warnings:[],errors:[]}):ift(i,t,n)})},"generateFileFromTemplate");Zm.generateFileFromTemplate=nft;async function ift(e,t,r){let n=await(0,rft.generateFromTemplate)(t);try{await Zlt.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(ift,"writeTemplate")});var qae=h(e_=>{"use strict";var sft=e_&&e_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e_,"__esModule",{value:!0});e_.generateDefaultDocsMarkdown=void 0;var oft=sft(require("path")),xae=kt(),aft=Ti();e_.generateDefaultDocsMarkdown=(0,aft.generateFileFromTemplate)(oft.default.join(xae.USER_DOCS_DIR_NAME,xae.DEFAULT_DOCS_MARKDOWN_FILE),"markdown.template.md")});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_.generateDefaultDocsSidebar=void 0;var cft=uft(require("path")),Fae=kt(),lft=Ti();t_.generateDefaultDocsSidebar=(0,lft.generateFileFromTemplate)(cft.default.join(Fae.USER_DOCS_DIR_NAME,Fae.DOCS_SIDEBAR_FILE),"sidebar.template.json")});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_.generateDefaultDocsTheme=void 0;var dft=fft(require("path")),Bae=kt(),pft=Ti();r_.generateDefaultDocsTheme=(0,pft.generateFileFromTemplate)(dft.default.join(Bae.USER_DOCS_DIR_NAME,Bae.DOCS_THEME_FILE),"dev-portal.theme.template.css")});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_.generateDefaultModule=void 0;var mft=hft(require("path")),Vae=kt(),_ft=Ti();n_.generateDefaultModule=(0,_ft.generateFileFromTemplate)(mft.default.join(Vae.USER_MODULES_DIR_NAME,Vae.DEFAULT_MODULE_FILE),"hello-world.template.ts")});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_.generateDevPortalConfigJson=void 0;var yft=gft(require("path")),Hae=kt(),Eft=Ti();i_.generateDevPortalConfigJson=(0,Eft.generateFileFromTemplate)(yft.default.join(Hae.USER_CONFIG_DIR_NAME,Hae.DEV_PORTAL_CONFIG_FILE),"dev-portal.template.json")});var Wae=h(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.generateEnvironment=void 0;var bft=Ti();A1.generateEnvironment=(0,bft.generateFileFromTemplate)(".env","env.template")});var Yae=h(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.generateESLint=void 0;var Sft=Ti();R1.generateESLint=(0,Sft.generateFileFromTemplate)(".eslintrc.js","eslintrc.template.js")});var Jae=h(C1=>{"use strict";Object.defineProperty(C1,"__esModule",{value:!0});C1.generateGitignore=void 0;var vft=Ti();C1.generateGitignore=(0,vft.generateFileFromTemplate)(".gitignore","gitignore.template.ignore")});var Xae=h(s_=>{"use strict";var Oft=s_&&s_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s_,"__esModule",{value:!0});s_.generateLaunchJson=void 0;var Pft=Oft(require("path")),Ift=Ti();s_.generateLaunchJson=(0,Ift.generateFileFromTemplate)(Pft.default.join(".vscode","launch.json"),"launch.template.jsonc")});var Zae=h(o_=>{"use strict";var wft=o_&&o_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o_,"__esModule",{value:!0});o_.generateRouteOasConfig=void 0;var Tft=wft(require("path")),Qae=kt(),Nft=Ti();o_.generateRouteOasConfig=(0,Nft.generateFileFromTemplate)(Tft.default.join(Qae.USER_CONFIG_DIR_NAME,Qae.ROUTES_OAS_CONFIG_FILE),"routes.oas.template.json")});var rue=h(qs=>{"use strict";var ek=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 eue=ek(require("fs/promises")),tk=ek(require("path")),Aft=ek(Xs());async function Rft(e,t=Aft.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=tue();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(Rft,"generateDefaultPackageJson");qs.generateDefaultPackageJson=Rft;function tue(){let e=tk.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(tue,"getPackageOverrides");qs.getPackageOverrides=tue;async function Cft(e){let t=tk.default.join(e,"package.json"),r=await eue.default.readFile(t,"utf-8");return JSON.parse(r)}s(Cft,"getProjectPackageJson");qs.getProjectPackageJson=Cft;async function $ft(e,t){let r=tk.default.join(e,"package.json"),n=JSON.stringify(t,void 0,2);await eue.default.writeFile(r,n,"utf-8")}s($ft,"updateProjectPackageJson");qs.updateProjectPackageJson=$ft});var sue=h($1=>{"use strict";Object.defineProperty($1,"__esModule",{value:!0});$1.generatePackageJson=void 0;var nue=rue(),iue=rc(),Dft=s(async function({sourceDirectory:e,name:t,logger:r}){let n=await(0,nue.generateDefaultPackageJson)(t);try{await(0,nue.updateProjectPackageJson)(e,n)}catch(i){return r.error(i),new iue.PluginResult({message:"Error creating package.json",pluginName:"generate-package-json",severity:"error"})}return new iue.PluginResult},"generatePackageJson");$1.generatePackageJson=Dft});var aue=h(a_=>{"use strict";var Lft=a_&&a_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a_,"__esModule",{value:!0});a_.generatePoliciesConfig=void 0;var jft=Lft(require("path")),oue=kt(),Mft=Ti();a_.generatePoliciesConfig=(0,Mft.generateFileFromTemplate)(jft.default.join(oue.USER_CONFIG_DIR_NAME,oue.POLICIES_CONFIG_FILE),"policies.template.json")});var uue=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_.generateSettingsJson=void 0;var xft=Uft(require("path")),qft=Ti();u_.generateSettingsJson=(0,qft.generateFileFromTemplate)(xft.default.join(".vscode","settings.json"),"settings.template.jsonc")});var cue=h(D1=>{"use strict";Object.defineProperty(D1,"__esModule",{value:!0});D1.generateTSConfig=void 0;var Fft=Ti();D1.generateTSConfig=(0,Fft.generateFileFromTemplate)("tsconfig.json","tsconfig.template.json")});var fue=h(c_=>{"use strict";var kft=c_&&c_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c_,"__esModule",{value:!0});c_.generateZuploJson=void 0;var Bft=Yo(),Gft=require("fs/promises"),Vft=kft(require("path")),zft=kt(),lue=rc(),Hft=s(async function({name:e,sourceDirectory:t,logger:r}){let n={version:1,project:e,compatibilityDate:Bft.DEFAULT_COMPATIBILITY_DATE},i=Vft.default.join(t,zft.ZUPLO_PREFERRED_JSON_FILE),o=JSON.stringify(n,null,2);try{await(0,Gft.writeFile)(i,o,"utf-8")}catch(a){return r.error(a),new lue.PluginResult({message:"Error creating zuplo.jsonc",pluginName:"generate-zuplo-json",severity:"error"})}return new lue.PluginResult},"generateZuploJson");c_.generateZuploJson=Hft});var mue=h(l_=>{"use strict";var hue=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0});l_.create=void 0;var due=Iae(),Kft=hue(gn()),Wft=require("fs/promises"),Yft=hue(require("path")),Jft=rc(),pue=ZF(),Xft=Dae(),Qft=qae(),Zft=kae(),edt=Gae(),tdt=zae(),rdt=Kae(),ndt=Wae(),idt=Yae(),sdt=Jae(),odt=Xae(),adt=Zae(),udt=sue(),cdt=aue(),ldt=uue(),fdt=cue(),ddt=fue();async function pdt({name:e,accountName:t="",rootDirectory:r,logger:n}){let i=(0,pue.sanitize)(e),o=(0,pue.sanitize)(t),a=Yft.default.join(r,o,i),u={name:e,sourceDirectory:a,logger:n},c=[];if(await Kft.default.dirExists(a))throw new due.ApiError({type:"https://zup.fail/project-already-exists-at-directory",title:"The project already exists in the specified directory",status:due.HttpStatusCode.BAD_REQUEST,detail:`Project already exists at ${a}`});c.push(Xft.createProjectDirs,adt.generateRouteOasConfig,ddt.generateZuploJson,rdt.generateDevPortalConfigJson,tdt.generateDefaultModule,Zft.generateDefaultDocsSidebar,Qft.generateDefaultDocsMarkdown,edt.generateDefaultDocsTheme,cdt.generatePoliciesConfig),c.push(fdt.generateTSConfig,sdt.generateGitignore,udt.generatePackageJson,ndt.generateEnvironment,idt.generateESLint,odt.generateLaunchJson,ldt.generateSettingsJson);let{errors:l,warnings:f}=await(0,Jft.runPlugins)(c,u);if(f.length>0&&f.forEach(_=>{n.warn(_)}),l.length>0){await(0,Wft.rm)(a,{recursive:!0,force:!0});let _=l[0];throw _ instanceof Error?_:new Error(_.message)}return{sourceDirectory:a,projectName:e}}s(pdt,"create");l_.create=pdt});var bue=h((Kqt,Eue)=>{Eue.exports=yue;yue.sync=mdt;var _ue=require("fs");function hdt(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(hdt,"checkPathExt");function gue(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:hdt(t,r)}s(gue,"checkStat");function yue(e,t,r){_ue.stat(e,function(n,i){r(n,n?!1:gue(i,e,t))})}s(yue,"isexe");function mdt(e,t){return gue(_ue.statSync(e),e,t)}s(mdt,"sync")});var Iue=h((Yqt,Pue)=>{Pue.exports=vue;vue.sync=_dt;var Sue=require("fs");function vue(e,t,r){Sue.stat(e,function(n,i){r(n,n?!1:Oue(i,t))})}s(vue,"isexe");function _dt(e,t){return Oue(Sue.statSync(e),t)}s(_dt,"sync");function Oue(e,t){return e.isFile()&&gdt(e,t)}s(Oue,"checkStat");function gdt(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(gdt,"checkMode")});var Tue=h((Qqt,wue)=>{var Xqt=require("fs"),L1;process.platform==="win32"||global.TESTING_WINDOWS?L1=bue():L1=Iue();wue.exports=rk;rk.sync=ydt;function rk(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){rk(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(rk,"isexe");function ydt(e,t){try{return L1.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}s(ydt,"sync")});var Lue=h((e2t,Due)=>{var f_=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Nue=require("path"),Edt=f_?";":":",Aue=Tue(),Rue=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Cue=s((e,t)=>{let r=t.colon||Edt,n=e.match(/\//)||f_&&e.match(/\\/)?[""]:[...f_?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=f_?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=f_?i.split(r):[""];return f_&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},"getPathInfo"),$ue=s((e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:o}=Cue(e,t),a=[],u=s(l=>new Promise((f,d)=>{if(l===n.length)return t.all&&a.length?f(a):d(Rue(e));let _=n[l],m=/^".*"$/.test(_)?_.slice(1,-1):_,g=Nue.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];Aue(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"),bdt=s((e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Cue(e,t),o=[];for(let a=0;a<r.length;a++){let u=r[a],c=/^".*"$/.test(u)?u.slice(1,-1):u,l=Nue.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(Aue.sync(_,{pathExt:i}))if(t.all)o.push(_);else return _}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Rue(e)},"whichSync");Due.exports=$ue;$ue.sync=bdt});var ik=h((r2t,nk)=>{"use strict";var jue=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");nk.exports=jue;nk.exports.default=jue});var que=h((i2t,xue)=>{"use strict";var Mue=require("path"),Sdt=Lue(),vdt=ik();function Uue(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=Sdt.sync(e.command,{path:r[vdt({env:r})],pathExt:t?Mue.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=Mue.resolve(i?e.options.cwd:"",a)),a}s(Uue,"resolveCommandAttempt");function Odt(e){return Uue(e)||Uue(e,!0)}s(Odt,"resolveCommand");xue.exports=Odt});var Fue=h((o2t,ok)=>{"use strict";var sk=/([()\][%!^"`<>&|;, *?])/g;function Pdt(e){return e=e.replace(sk,"^$1"),e}s(Pdt,"escapeCommand");function Idt(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(sk,"^$1"),t&&(e=e.replace(sk,"^$1")),e}s(Idt,"escapeArgument");ok.exports.command=Pdt;ok.exports.argument=Idt});var Bue=h((u2t,kue)=>{"use strict";kue.exports=/^#!(.*)/});var Vue=h((c2t,Gue)=>{"use strict";var wdt=Bue();Gue.exports=(e="")=>{let t=e.match(wdt);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var Hue=h((l2t,zue)=>{"use strict";var ak=require("fs"),Tdt=Vue();function Ndt(e){let r=Buffer.alloc(150),n;try{n=ak.openSync(e,"r"),ak.readSync(n,r,0,150,0),ak.closeSync(n)}catch{}return Tdt(r.toString())}s(Ndt,"readShebang");zue.exports=Ndt});var Jue=h((d2t,Yue)=>{"use strict";var Adt=require("path"),Kue=que(),Wue=Fue(),Rdt=Hue(),Cdt=process.platform==="win32",$dt=/\.(?:com|exe)$/i,Ddt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Ldt(e){e.file=Kue(e);let t=e.file&&Rdt(e.file);return t?(e.args.unshift(e.file),e.command=t,Kue(e)):e.file}s(Ldt,"detectShebang");function jdt(e){if(!Cdt)return e;let t=Ldt(e),r=!$dt.test(t);if(e.options.forceShell||r){let n=Ddt.test(t);e.command=Adt.normalize(e.command),e.command=Wue.command(e.command),e.args=e.args.map(o=>Wue.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(jdt,"parseNonShell");function Mdt(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:jdt(n)}s(Mdt,"parse");Yue.exports=Mdt});var Zue=h((h2t,Que)=>{"use strict";var uk=process.platform==="win32";function ck(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(ck,"notFoundError");function Udt(e,t){if(!uk)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let o=Xue(i,t,"spawn");if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}s(Udt,"hookChildProcess");function Xue(e,t){return uk&&e===1&&!t.file?ck(t.original,"spawn"):null}s(Xue,"verifyENOENT");function xdt(e,t){return uk&&e===1&&!t.file?ck(t.original,"spawnSync"):null}s(xdt,"verifyENOENTSync");Que.exports={hookChildProcess:Udt,verifyENOENT:Xue,verifyENOENTSync:xdt,notFoundError:ck}});var rce=h((_2t,d_)=>{"use strict";var ece=require("child_process"),lk=Jue(),fk=Zue();function tce(e,t,r){let n=lk(e,t,r),i=ece.spawn(n.command,n.args,n.options);return fk.hookChildProcess(i,n),i}s(tce,"spawn");function qdt(e,t,r){let n=lk(e,t,r),i=ece.spawnSync(n.command,n.args,n.options);return i.error=i.error||fk.verifyENOENTSync(i.status,n),i}s(qdt,"spawnSync");d_.exports=tce;d_.exports.spawn=tce;d_.exports.sync=qdt;d_.exports._parse=lk;d_.exports._enoent=fk});var ice=h((y2t,nce)=>{"use strict";nce.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 ace=h((E2t,XE)=>{"use strict";var JE=require("path"),sce=ik(),oce=s(e=>{e={cwd:process.cwd(),path:process.env[sce()],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=oce;XE.exports.default=oce;XE.exports.env=e=>{e={env:process.env,...e};let t={...e.env},r=sce({env:t});return e.path=t[r],t[r]=XE.exports(e),t}});var cce=h((S2t,dk)=>{"use strict";var uce=s((e,t)=>{for(let r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e},"mimicFn");dk.exports=uce;dk.exports.default=uce});var fce=h((O2t,M1)=>{"use strict";var Fdt=cce(),j1=new WeakMap,lce=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 Fdt(o,e),j1.set(o,n),o},"onetime");M1.exports=lce;M1.exports.default=lce;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 dce=h(U1=>{"use strict";Object.defineProperty(U1,"__esModule",{value:!0});U1.SIGNALS=void 0;var kdt=[{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=kdt});var pk=h(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});p_.SIGRTMAX=p_.getRealtimeSignals=void 0;var Bdt=s(function(){let e=hce-pce+1;return Array.from({length:e},Gdt)},"getRealtimeSignals");p_.getRealtimeSignals=Bdt;var Gdt=s(function(e,t){return{name:`SIGRT${t+1}`,number:pce+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},"getRealtimeSignal"),pce=34,hce=64;p_.SIGRTMAX=hce});var mce=h(x1=>{"use strict";Object.defineProperty(x1,"__esModule",{value:!0});x1.getSignals=void 0;var Vdt=require("os"),zdt=dce(),Hdt=pk(),Kdt=s(function(){let e=(0,Hdt.getRealtimeSignals)();return[...zdt.SIGNALS,...e].map(Wdt)},"getSignals");x1.getSignals=Kdt;var Wdt=s(function({name:e,number:t,description:r,action:n,forced:i=!1,standard:o}){let{signals:{[e]:a}}=Vdt.constants,u=a!==void 0;return{name:e,number:u?a:t,description:r,supported:u,action:n,forced:i,standard:o}},"normalizeSignal")});var gce=h(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});h_.signalsByNumber=h_.signalsByName=void 0;var Ydt=require("os"),_ce=mce(),Jdt=pk(),Xdt=s(function(){return(0,_ce.getSignals)().reduce(Qdt,{})},"getSignalsByName"),Qdt=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"),Zdt=Xdt();h_.signalsByName=Zdt;var ept=s(function(){let e=(0,_ce.getSignals)(),t=Jdt.SIGRTMAX+1,r=Array.from({length:t},(n,i)=>tpt(i,e));return Object.assign({},...r)},"getSignalsByNumber"),tpt=s(function(e,t){let r=rpt(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"),rpt=s(function(e,t){let r=t.find(({name:n})=>Ydt.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},"findSignalByNumber"),npt=ept();h_.signalsByNumber=npt});var Ece=h(($2t,yce)=>{"use strict";var{signalsByName:ipt}=gce(),spt=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"),opt=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:ipt[i].description,m=n&&n.code,y=`Command ${spt({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(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/core",
3
- "version": "5.2269.0",
3
+ "version": "5.2270.0",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "exports": {