@zuplo/core 5.2482.0 → 5.2485.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
|
@@ -701,7 +701,7 @@ export default {
|
|
|
701
701
|
return handler.requestHandler(request, env, ctx)
|
|
702
702
|
},
|
|
703
703
|
};
|
|
704
|
-
`,llt=t(async function({systemDirectory:s,logger:a,config:u}){return Fu.timeFn("Generating Worker shim",async()=>{a.debug("Generating Worker shim");let p=u?.flags?.esmWorker?mnr:dnr,g=pnr.join(s,sce);try{await _nr.writeFile(g,p.trimStart(),"utf-8")}catch(b){a.error(b);let k={message:`Error creating file at ${g}`,pluginName:"generate-worker-entry",severity:"error"};return{warnings:[],errors:[k]}}return{warnings:[],errors:[]}})},"generateWorker");import{readFile as hnr}from"fs/promises";import ult from"path";var gnr="validate-dev-portal-json",yG="dev-portal-enabled",_lt=t(async function({logger:s,sourceDirectory:a},u){return Fu.timeFn("Validate dev-portal.json file",async()=>{s.debug("Validate dev-portal.json file");let p=ult.join(a,Kp),g=ult.join(p,m8);if(!await pc.fileExists(g))return s.debug("Project is missing a dev-portal.json file. Skipping validate-dev-portal-json plugin."),u.set(yG,!1),new Yp;let b=[],k=await hnr(g,"utf-8"),A=JSON.parse(k);if(A.enabled===!1)return s.debug("Project has set dev-portal.json to disabled. Skipping validate-dev-portal-json plugin."),u.set(yG,!1),new Yp;if(A.enableAuthentication&&A.authentication){let{provider:M}=A.authentication;if(M&&M!=="auth0"&&M!=="okta"&&M!=="azure-ad"&&M!=="clerk"&&M!=="oidc"&&M!=="external"&&b.push({message:"The authentication setting 'provider' is not set or invalid. Valid values are 'auth0', 'okta', 'azure-ad', 'clerk', 'oidc', or 'external'.",pluginName:"validate-dev-portal-json",severity:"warning"}),M==="external"){let{loginUrl:U,logoutUrl:ne}=A.authentication;hE(U)?U.startsWith("$env(")&&!U.startsWith("$env(ZUPLO_PUBLIC_")&&b.push({message:"'loginUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The authentication setting for 'loginUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(ne)?ne.startsWith("$env(")&&!ne.startsWith("$env(ZUPLO_PUBLIC_")&&b.push({message:"'logoutUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The authentication setting for 'logoutUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"})}else if("authority"in A.authentication){let{authority:U}=A.authentication;if(!A.authentication.devPortalClient)b.push({message:"The authentication setting for 'devPortalClient' is not set. This property is required when 'authority' is also set.",pluginName:"validate-dev-portal-json",severity:"warning"});else{let{clientId:ne,audience:Z}=A.authentication.devPortalClient;hE(U)?U.startsWith("$env(")&&!U.startsWith("$env(ZUPLO_PUBLIC_")&&b.push({message:"'authority' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The authentication setting for 'authority' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),b.push(...flt({audience:Z,clientId:ne}))}}else if("issuer"in A.authentication){let{issuer:U,clientId:ne,clientSecret:Z,audience:z}=A.authentication;hE(U)?U.startsWith("$env(")&&!U.startsWith("$env(ZUPLO_PUBLIC_")&&b.push({message:"'issuer' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The authentication setting for 'issuer' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),b.push(...flt({audience:z,clientId:ne,clientSecret:Z}))}else throw new xS({message:"The dev-portal.json is not valid. The 'authentication' section does not have required fields.",severity:"error"},gnr)}if(A.enableMonetization&&A.monetization){let{provider:M}=A.monetization;if((!hE(M)||M!=="stripe")&&b.push({message:"The monetization setting 'provider' is not set or an empty string. Valid values are 'stripe'.",pluginName:"validate-dev-portal-json",severity:"warning"}),M==="stripe"){let{pricingTableId:U,publishableKey:ne,secretKey:Z}=A.monetization;hE(U)?U.startsWith("$env(")?U.startsWith("$env(ZUPLO_PUBLIC_")||b.push({message:"'Pricing Table Id' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):U.startsWith("prctbl_")||b.push({message:"'Pricing Table Id' field must start with prctbl_. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The monetization setting for 'Pricing Table Id' is not set or is an empty string. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(ne)?ne.startsWith("$env(")?ne.startsWith("$env(ZUPLO_PUBLIC_")||b.push({message:"'Publishable Key' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):ne.startsWith("pk_")||b.push({message:"'Publishable Key' field must start with pk_. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The monetization setting for 'Publishable Key' is not set or is an empty string. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(Z)?Z.startsWith("$env(")||b.push({message:"The monetization setting for 'Secret Key' must be an environment variable. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The monetization setting for 'Secret Key' is not set or is an empty string. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"})}}else A.enableMonetization&&!A.monetization&&b.push({message:"Monetization was enabled but no monetization configuration was provider in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"});return{errors:[],warnings:b}})},"validateDevPortalJSON");function flt({audience:s,clientId:a,clientSecret:u}){let p=[];return s&&s.startsWith("$env(")&&!s.startsWith("$env(ZUPLO_PUBLIC_")&&p.push({message:"'audience' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(a)?a.startsWith("$env(")&&!a.startsWith("$env(ZUPLO_PUBLIC_")&&p.push({message:"'clientId' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):p.push({message:"The authentication setting for 'clientId' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(u)&&!u.startsWith("$env(")&&(u.startsWith("$env(ZUPLO_PUBLIC")&&p.push({message:"The authorization setting for 'Client Secret' should not be a public environment variable. ",pluginName:"validate-dev-portal-json",severity:"warning"}),p.push({message:"The authorization setting for 'Client Secret' must be an environment variable. Field authentication.devPortalClient.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"})),p}t(flt,"validateCommonAuth");import{readFile as ynr,readdir as vnr}from"fs/promises";import plt from"path";var jce="validate-open-api-files",dlt=t(async function({sourceDirectory:s,logger:a}){return Fu.timeFn("Building OpenAPI files to build output",async()=>{a.debug("Building OpenAPI files to build output");let u=plt.join(s,Kp),p=[];try{if(!await z9(s))return new Yp({message:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:jce,severity:"error"});let k=(await vnr(u)).filter(A=>A.endsWith(".oas.json"));for(let A of k){let M=plt.join(u,A);try{A==="zp.oas.json"&&p.push({message:"Open API files cannot be named 'zp.oas.json' since 'zp' is a reserved prefix. Update the file name to solve this build issue.",pluginName:jce,severity:"error"});let U=await ynr(M,"utf-8"),ne=JSON.parse(U);if(ne&&ne.paths){let Z=Object.entries(ne.paths).filter(z=>z[0]==="zp"||z[0]==="/zp");if(Z.length>0){let z=Z.length===1?"includes one route path":`includes '${Z.length}' routes`;p.push({message:`Open API file '${A}' ${z} that's named '/zp' which is a reserved route name. Updating the route to something other than '/zp' will solve this build issue.`,pluginName:jce,severity:"error"})}}}catch(U){a.error(U)}}}catch(g){return a.error(g),p.length>0?{errors:p,warnings:[]}:new Yp({message:"Failed while validating the open api files in the project",pluginName:jce,severity:"warning"})}return{errors:p,warnings:[]}})},"validateOpenAPIFiles");var uM=sm(nIe(),1);import{parse as iir}from"jsonc-parser";import{readFile as sir,writeFile as nut}from"fs/promises";import air from"path";var lM=sm(nIe(),1);var rut=t(()=>({include:["modules/**/*",".zuplo/**/*","tests/**/*"],exclude:["./node_modules","./dist"],compilerOptions:{baseUrl:".",module:lM.ModuleKind.ESNext,target:lM.ScriptTarget.ESNext,moduleResolution:lM.ModuleResolutionKind.Bundler,lib:["ESNext","WebWorker","Webworker.Iterable"],preserveConstEnums:!0,useUnknownInCatchVariables:!1,forceConsistentCasingInFileNames:!0,importHelpers:!0,removeComments:!0,esModuleInterop:!0,strictNullChecks:!0,experimentalDecorators:!0,noEmit:!0,paths:{"@app/*":[".zuplo/*"]}}}),"getZuploTsConfigTemplate");var P8="validate-tsconfig",iut=t(async function({sourceDirectory:s,logger:a,command:u,environmentType:p}){return Fu.timeFn("Validate TSConfig",async()=>{a.debug("Validate TSConfig");let g=p==="WORKING_COPY"||u==="dev";try{let b=rut(),k=air.join(s,"tsconfig.json");if(!await pc.fileExists(k))return g?(await nut(k,JSON.stringify(b,null,2)),{warnings:[{message:"This project does not have a tsconfig.json file. The file has been created for you.",severity:"warning",pluginName:P8,helpUrl:"https://zuplo.com/docs/articles/tsconfig"}],errors:[]}):{warnings:[],errors:[{message:"This project does not have a tsconfig.json file.",severity:"error",pluginName:P8,helpUrl:"https://zuplo.com/docs/articles/tsconfig"}]};let A=await sir(k,"utf-8"),M=iir(A);if(!(M&&typeof M=="object"&&"compilerOptions"in M))return g?(await nut(k,JSON.stringify(b,null,2)),{warnings:[{message:"This project's tsconfig.json file was invalid. A valid file has been written for you.",severity:"warning",pluginName:P8,helpUrl:"https://zuplo.com/docs/articles/tsconfig"}],errors:[]}):{warnings:[],errors:[{message:"This project's tsconfig.json file is invalid. It must have a compilerOptions.",severity:"error",pluginName:P8,helpUrl:"https://zuplo.com/docs/articles/tsconfig"}]};let U=uM.default.convertCompilerOptionsFromJson(M.compilerOptions,s);if(U.errors.length>0)return{warnings:[],errors:U.errors.map(Yt=>({severity:"error",pluginName:P8,message:Yt.messageText.toString(),detail:"You will need to modify your tsconfig.json file to build this project.",helpUrl:"https://zuplo.com/docs/articles/tsconfig",location:Yt.file?{line:Yt.file.getLineStarts()[0],length:Yt.file.getWidth(),file:Yt.file.fileName,column:Yt.file.getStart(),lineText:"",namespace:"",suggestion:""}:void 0}))};if(!M||typeof M!="object")throw new TypeError("The userConfigRaw is not an object, this should not happen.");if(!("compilerOptions"in M)||M.compilerOptions===null||M.compilerOptions===void 0||typeof M.compilerOptions!="object")throw new TypeError("The userConfigRaw.compilerOptions property is not an object, this should not happen.");let ne=t((Yt,xn,mr)=>`The compiler option '${Yt}' should ${xn===void 0?"not be set":`be set to '${typeof xn=="string"?xn:JSON.stringify(xn)}'`}, it was ${mr===void 0?"not set":`set to '${typeof mr=="string"?mr:JSON.stringify(mr)}'`}`,"getMessage"),Z="ESNext",z=uM.ModuleKind.ESNext,ve=[];U.options.module!==z&&ve.push(ne("module",Z,M.compilerOptions.module));let Be="ES2022",Ee=uM.default.ScriptTarget.ES2022;U.options.target!==Ee&&ve.push(ne("target",Be,M.compilerOptions.target));let Le="Bundler",xt=uM.default.ModuleResolutionKind.Bundler;U.options.moduleResolution!==xt&&ve.push(ne("moduleResolution",Le,M.compilerOptions.moduleResolution));let Bt=["ESNext","WebWorker","Webworker.Iterable"];t(Yt=>{let xn=Bt.map(Zt=>Zt.toLowerCase()),mr=Yt.map(Zt=>Zt.toLowerCase());return xn.every(Zt=>mr.includes(Zt))},"includesAllLibs")(M.compilerOptions.lib??[])||ve.push(ne("lib",Bt,M.compilerOptions.lib)),U.options.baseUrl&&ve.push(ne("baseUrl",void 0,M.compilerOptions.baseUrl));let Sr=[];return ve.length>0&&Sr.push({message:"This project's tsconfig.json was not set to the recommended settings. Custom settings may cause build issues. For guidance on how to adjust your settings, please visit: https://zuplo.com/docs/articles/tsconfig",severity:"warning",detail:ve.join(`
|
|
704
|
+
`,llt=t(async function({systemDirectory:s,logger:a,config:u}){return Fu.timeFn("Generating Worker shim",async()=>{a.debug("Generating Worker shim");let p=u?.flags?.esmWorker?mnr:dnr,g=pnr.join(s,sce);try{await _nr.writeFile(g,p.trimStart(),"utf-8")}catch(b){a.error(b);let k={message:`Error creating file at ${g}`,pluginName:"generate-worker-entry",severity:"error"};return{warnings:[],errors:[k]}}return{warnings:[],errors:[]}})},"generateWorker");import{readFile as hnr}from"fs/promises";import ult from"path";var gnr="validate-dev-portal-json",yG="dev-portal-enabled",_lt=t(async function({logger:s,sourceDirectory:a},u){return Fu.timeFn("Validate dev-portal.json file",async()=>{s.debug("Validate dev-portal.json file");let p=ult.join(a,Kp),g=ult.join(p,m8);if(!await pc.fileExists(g))return s.debug("Project is missing a dev-portal.json file. Skipping validate-dev-portal-json plugin."),u.set(yG,!1),new Yp;let b=[],k=await hnr(g,"utf-8"),A=JSON.parse(k);if(A.enabled===!1)return s.debug("Project has set dev-portal.json to disabled. Skipping validate-dev-portal-json plugin."),u.set(yG,!1),new Yp;if(A.enableAuthentication&&A.authentication){let{provider:M}=A.authentication;if(M&&M!=="auth0"&&M!=="okta"&&M!=="azure-ad"&&M!=="clerk"&&M!=="oidc"&&M!=="external"&&b.push({message:"The authentication setting 'provider' is not set or invalid. Valid values are 'auth0', 'okta', 'azure-ad', 'clerk', 'oidc', or 'external'.",pluginName:"validate-dev-portal-json",severity:"warning"}),M==="external"){let{loginUrl:U,logoutUrl:ne}=A.authentication;hE(U)?U.startsWith("$env(")&&!U.startsWith("$env(ZUPLO_PUBLIC_")&&b.push({message:"'loginUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The authentication setting for 'loginUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(ne)?ne.startsWith("$env(")&&!ne.startsWith("$env(ZUPLO_PUBLIC_")&&b.push({message:"'logoutUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The authentication setting for 'logoutUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"})}else if("authority"in A.authentication){let{authority:U}=A.authentication;if(!A.authentication.devPortalClient)b.push({message:"The authentication setting for 'devPortalClient' is not set. This property is required when 'authority' is also set.",pluginName:"validate-dev-portal-json",severity:"warning"});else{let{clientId:ne,audience:Z}=A.authentication.devPortalClient;hE(U)?U.startsWith("$env(")&&!U.startsWith("$env(ZUPLO_PUBLIC_")&&b.push({message:"'authority' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The authentication setting for 'authority' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),b.push(...flt({audience:Z,clientId:ne}))}}else if("issuer"in A.authentication){let{issuer:U,clientId:ne,clientSecret:Z,audience:z}=A.authentication;hE(U)?U.startsWith("$env(")&&!U.startsWith("$env(ZUPLO_PUBLIC_")&&b.push({message:"'issuer' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The authentication setting for 'issuer' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),b.push(...flt({audience:z,clientId:ne,clientSecret:Z}))}else throw new xS({message:"The dev-portal.json is not valid. The 'authentication' section does not have required fields.",severity:"error"},gnr)}if(A.enableMonetization&&A.monetization){let{provider:M}=A.monetization;if((!hE(M)||M!=="stripe")&&b.push({message:"The monetization setting 'provider' is not set or an empty string. Valid values are 'stripe'.",pluginName:"validate-dev-portal-json",severity:"warning"}),M==="stripe"){let{pricingTableId:U,publishableKey:ne,secretKey:Z}=A.monetization;hE(U)?U.startsWith("$env(")?U.startsWith("$env(ZUPLO_PUBLIC_")||b.push({message:"'Pricing Table Id' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):U.startsWith("prctbl_")||b.push({message:"'Pricing Table Id' field must start with prctbl_. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The monetization setting for 'Pricing Table Id' is not set or is an empty string. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(ne)?ne.startsWith("$env(")?ne.startsWith("$env(ZUPLO_PUBLIC_")||b.push({message:"'Publishable Key' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):ne.startsWith("pk_")||b.push({message:"'Publishable Key' field must start with pk_. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The monetization setting for 'Publishable Key' is not set or is an empty string. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(Z)?Z.startsWith("$env(")||b.push({message:"The monetization setting for 'Secret Key' must be an environment variable. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):b.push({message:"The monetization setting for 'Secret Key' is not set or is an empty string. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"})}}else A.enableMonetization&&!A.monetization&&b.push({message:"Monetization was enabled but no monetization configuration was provider in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"});return{errors:[],warnings:b}})},"validateDevPortalJSON");function flt({audience:s,clientId:a,clientSecret:u}){let p=[];return s&&s.startsWith("$env(")&&!s.startsWith("$env(ZUPLO_PUBLIC_")&&p.push({message:"'audience' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(a)?a.startsWith("$env(")&&!a.startsWith("$env(ZUPLO_PUBLIC_")&&p.push({message:"'clientId' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):p.push({message:"The authentication setting for 'clientId' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),hE(u)&&!u.startsWith("$env(")&&(u.startsWith("$env(ZUPLO_PUBLIC")&&p.push({message:"The authorization setting for 'Client Secret' should not be a public environment variable. ",pluginName:"validate-dev-portal-json",severity:"warning"}),p.push({message:"The authorization setting for 'Client Secret' must be an environment variable. Field authentication.devPortalClient.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"})),p}t(flt,"validateCommonAuth");import{readFile as ynr,readdir as vnr}from"fs/promises";import plt from"path";var jce="validate-open-api-files",dlt=t(async function({sourceDirectory:s,logger:a}){return Fu.timeFn("Building OpenAPI files to build output",async()=>{a.debug("Building OpenAPI files to build output");let u=plt.join(s,Kp),p=[];try{if(!await z9(s))return new Yp({message:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:jce,severity:"error"});let k=(await vnr(u)).filter(A=>A.endsWith(".oas.json"));for(let A of k){let M=plt.join(u,A);try{A==="zp.oas.json"&&p.push({message:"Open API files cannot be named 'zp.oas.json' since 'zp' is a reserved prefix. Update the file name to solve this build issue.",pluginName:jce,severity:"error"});let U=await ynr(M,"utf-8"),ne=JSON.parse(U);if(ne&&ne.paths){let Z=Object.entries(ne.paths).filter(z=>z[0]==="zp"||z[0]==="/zp");if(Z.length>0){let z=Z.length===1?"includes one route path":`includes '${Z.length}' routes`;p.push({message:`Open API file '${A}' ${z} that's named '/zp' which is a reserved route name. Updating the route to something other than '/zp' will solve this build issue.`,pluginName:jce,severity:"error"})}}}catch(U){a.error(U)}}}catch(g){return a.error(g),p.length>0?{errors:p,warnings:[]}:new Yp({message:"Failed while validating the open api files in the project",pluginName:jce,severity:"warning"})}return{errors:p,warnings:[]}})},"validateOpenAPIFiles");var uM=sm(nIe(),1);import{parse as iir}from"jsonc-parser";import{readFile as sir,writeFile as nut}from"fs/promises";import air from"path";var lM=sm(nIe(),1);var rut=t(()=>({include:["modules/**/*",".zuplo/**/*","tests/**/*"],exclude:["./node_modules","./dist"],compilerOptions:{module:lM.ModuleKind.ESNext,target:lM.ScriptTarget.ES2022,moduleResolution:lM.ModuleResolutionKind.Bundler,lib:["ESNext","WebWorker","Webworker.Iterable"],preserveConstEnums:!0,useUnknownInCatchVariables:!1,forceConsistentCasingInFileNames:!0,importHelpers:!0,esModuleInterop:!0,strictNullChecks:!0,noEmit:!0}}),"getZuploTsConfigTemplate");var P8="validate-tsconfig",iut=t(async function({sourceDirectory:s,logger:a,command:u,environmentType:p}){return Fu.timeFn("Validate TSConfig",async()=>{a.debug("Validate TSConfig");let g=p==="WORKING_COPY"||u==="dev";try{let b=rut(),k=air.join(s,"tsconfig.json");if(!await pc.fileExists(k))return g?(await nut(k,JSON.stringify(b,null,2)),{warnings:[{message:"This project does not have a tsconfig.json file. The file has been created for you.",severity:"warning",pluginName:P8,helpUrl:"https://zuplo.com/docs/articles/tsconfig"}],errors:[]}):{warnings:[],errors:[{message:"This project does not have a tsconfig.json file.",severity:"error",pluginName:P8,helpUrl:"https://zuplo.com/docs/articles/tsconfig"}]};let A=await sir(k,"utf-8"),M=iir(A);if(!(M&&typeof M=="object"&&"compilerOptions"in M))return g?(await nut(k,JSON.stringify(b,null,2)),{warnings:[{message:"This project's tsconfig.json file was invalid. A valid file has been written for you.",severity:"warning",pluginName:P8,helpUrl:"https://zuplo.com/docs/articles/tsconfig"}],errors:[]}):{warnings:[],errors:[{message:"This project's tsconfig.json file is invalid. It must have a compilerOptions.",severity:"error",pluginName:P8,helpUrl:"https://zuplo.com/docs/articles/tsconfig"}]};let U=uM.default.convertCompilerOptionsFromJson(M.compilerOptions,s);if(U.errors.length>0)return{warnings:[],errors:U.errors.map(Yt=>({severity:"error",pluginName:P8,message:Yt.messageText.toString(),detail:"You will need to modify your tsconfig.json file to build this project.",helpUrl:"https://zuplo.com/docs/articles/tsconfig",location:Yt.file?{line:Yt.file.getLineStarts()[0],length:Yt.file.getWidth(),file:Yt.file.fileName,column:Yt.file.getStart(),lineText:"",namespace:"",suggestion:""}:void 0}))};if(!M||typeof M!="object")throw new TypeError("The userConfigRaw is not an object, this should not happen.");if(!("compilerOptions"in M)||M.compilerOptions===null||M.compilerOptions===void 0||typeof M.compilerOptions!="object")throw new TypeError("The userConfigRaw.compilerOptions property is not an object, this should not happen.");let ne=t((Yt,xn,mr)=>`The compiler option '${Yt}' should ${xn===void 0?"not be set":`be set to '${typeof xn=="string"?xn:JSON.stringify(xn)}'`}, it was ${mr===void 0?"not set":`set to '${typeof mr=="string"?mr:JSON.stringify(mr)}'`}`,"getMessage"),Z="ESNext",z=uM.ModuleKind.ESNext,ve=[];U.options.module!==z&&ve.push(ne("module",Z,M.compilerOptions.module));let Be="ES2022",Ee=uM.default.ScriptTarget.ES2022;U.options.target!==Ee&&ve.push(ne("target",Be,M.compilerOptions.target));let Le="Bundler",xt=uM.default.ModuleResolutionKind.Bundler;U.options.moduleResolution!==xt&&ve.push(ne("moduleResolution",Le,M.compilerOptions.moduleResolution));let Bt=["ESNext","WebWorker","Webworker.Iterable"];t(Yt=>{let xn=Bt.map(Zt=>Zt.toLowerCase()),mr=Yt.map(Zt=>Zt.toLowerCase());return xn.every(Zt=>mr.includes(Zt))},"includesAllLibs")(M.compilerOptions.lib??[])||ve.push(ne("lib",Bt,M.compilerOptions.lib)),U.options.baseUrl&&ve.push(ne("baseUrl",void 0,M.compilerOptions.baseUrl));let Sr=[];return ve.length>0&&Sr.push({message:"This project's tsconfig.json was not set to the recommended settings. Custom settings may cause build issues. For guidance on how to adjust your settings, please visit: https://zuplo.com/docs/articles/tsconfig",severity:"warning",detail:ve.join(`
|
|
705
705
|
`),pluginName:P8,helpUrl:"https://zuplo.com/docs/articles/tsconfig"}),{warnings:Sr,errors:[]}}catch(b){a.error(b);let k={message:`Error validating tsconfig.json : ${b.message}`,severity:"error",pluginName:P8};return{warnings:[],errors:[k]}}})},"validateTSConfig");import{parse as cir}from"@swc/core";import oir from"vm";var{hasOwnProperty:Kv}=Object.prototype;function A8(s,a){return s=s.slice(),s.push(a),s}t(A8,"push");function iIe(s,a){return a=a.slice(),a.unshift(s),a}t(iIe,"unshift");var sIe=class extends Error{static{t(this,"NewError")}constructor(a){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=a,this.name="NewError"}};function o_(s,a,u,p,g){if(!(this instanceof o_))try{return new o_(s,a,u,p,g)}catch(k){if(!k.avoidNew)throw k;return k.value}typeof s=="string"&&(g=p,p=u,u=a,a=s,s=null);let b=s&&typeof s=="object";if(s=s||{},this.json=s.json||u,this.path=s.path||a,this.resultType=s.resultType||"value",this.flatten=s.flatten||!1,this.wrap=Kv.call(s,"wrap")?s.wrap:!0,this.sandbox=s.sandbox||{},this.preventEval=s.preventEval||!1,this.parent=s.parent||null,this.parentProperty=s.parentProperty||null,this.callback=s.callback||p||null,this.otherTypeCallback=s.otherTypeCallback||g||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},s.autostart!==!1){let k={path:b?s.path:a};b?"json"in s&&(k.json=s.json):k.json=u;let A=this.evaluate(k);if(!A||typeof A!="object")throw new sIe(A);return A}}t(o_,"JSONPath");o_.prototype.evaluate=function(s,a,u,p){let g=this.parent,b=this.parentProperty,{flatten:k,wrap:A}=this;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,u=u||this.callback,this.currOtherTypeCallback=p||this.otherTypeCallback,a=a||this.json,s=s||this.path,s&&typeof s=="object"&&!Array.isArray(s)){if(!s.path&&s.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Kv.call(s,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:a}=s),k=Kv.call(s,"flatten")?s.flatten:k,this.currResultType=Kv.call(s,"resultType")?s.resultType:this.currResultType,this.currSandbox=Kv.call(s,"sandbox")?s.sandbox:this.currSandbox,A=Kv.call(s,"wrap")?s.wrap:A,this.currPreventEval=Kv.call(s,"preventEval")?s.preventEval:this.currPreventEval,u=Kv.call(s,"callback")?s.callback:u,this.currOtherTypeCallback=Kv.call(s,"otherTypeCallback")?s.otherTypeCallback:this.currOtherTypeCallback,g=Kv.call(s,"parent")?s.parent:g,b=Kv.call(s,"parentProperty")?s.parentProperty:b,s=s.path}if(g=g||null,b=b||null,Array.isArray(s)&&(s=o_.toPathString(s)),!s&&s!==""||!a)return;let M=o_.toPathArray(s);M[0]==="$"&&M.length>1&&M.shift(),this._hasParentSelector=null;let U=this._trace(M,a,["$"],g,b,u).filter(function(ne){return ne&&!ne.isParentSelector});return U.length?!A&&U.length===1&&!U[0].hasArrExpr?this._getPreferredOutput(U[0]):U.reduce((ne,Z)=>{let z=this._getPreferredOutput(Z);return k&&Array.isArray(z)?ne=ne.concat(z):ne.push(z),ne},[]):A?[]:void 0};o_.prototype._getPreferredOutput=function(s){let a=this.currResultType;switch(a){case"all":{let u=Array.isArray(s.path)?s.path:o_.toPathArray(s.path);return s.pointer=o_.toPointer(u),s.path=typeof s.path=="string"?s.path:o_.toPathString(s.path),s}case"value":case"parent":case"parentProperty":return s[a];case"path":return o_.toPathString(s[a]);case"pointer":return o_.toPointer(s.path);default:throw new TypeError("Unknown result type")}};o_.prototype._handleCallback=function(s,a,u){if(a){let p=this._getPreferredOutput(s);s.path=typeof s.path=="string"?s.path:o_.toPathString(s.path),a(p,u,s)}};o_.prototype._trace=function(s,a,u,p,g,b,k,A){let M;if(!s.length)return M={path:u,value:a,parent:p,parentProperty:g,hasArrExpr:k},this._handleCallback(M,b,"value"),M;let U=s[0],ne=s.slice(1),Z=[];function z(ve){Array.isArray(ve)?ve.forEach(Be=>{Z.push(Be)}):Z.push(ve)}if(t(z,"addRet"),(typeof U!="string"||A)&&a&&Kv.call(a,U))z(this._trace(ne,a[U],A8(u,U),a,U,b,k));else if(U==="*")this._walk(a,ve=>{z(this._trace(ne,a[ve],A8(u,ve),a,ve,b,!0,!0))});else if(U==="..")z(this._trace(ne,a,u,p,g,b,k)),this._walk(a,ve=>{typeof a[ve]=="object"&&z(this._trace(s.slice(),a[ve],A8(u,ve),a,ve,b,!0))});else{if(U==="^")return this._hasParentSelector=!0,{path:u.slice(0,-1),expr:ne,isParentSelector:!0};if(U==="~")return M={path:A8(u,U),value:g,parent:p,parentProperty:null},this._handleCallback(M,b,"property"),M;if(U==="$")z(this._trace(ne,a,u,null,null,b,k));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(U))z(this._slice(U,ne,a,u,p,g,b));else if(U.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");let ve=U.replace(/^\?\((.*?)\)$/u,"$1");this._walk(a,Be=>{this._eval(ve,a[Be],Be,u,p,g)&&z(this._trace(ne,a[Be],A8(u,Be),a,Be,b,!0))})}else if(U[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");z(this._trace(iIe(this._eval(U,a,u[u.length-1],u.slice(0,-1),p,g),ne),a,u,p,g,b,k))}else if(U[0]==="@"){let ve=!1,Be=U.slice(1,-2);switch(Be){case"scalar":(!a||!["object","function"].includes(typeof a))&&(ve=!0);break;case"boolean":case"string":case"undefined":case"function":typeof a===Be&&(ve=!0);break;case"integer":Number.isFinite(a)&&!(a%1)&&(ve=!0);break;case"number":Number.isFinite(a)&&(ve=!0);break;case"nonFinite":typeof a=="number"&&!Number.isFinite(a)&&(ve=!0);break;case"object":a&&typeof a===Be&&(ve=!0);break;case"array":Array.isArray(a)&&(ve=!0);break;case"other":ve=this.currOtherTypeCallback(a,u,p,g);break;case"null":a===null&&(ve=!0);break;default:throw new TypeError("Unknown value type "+Be)}if(ve)return M={path:u,value:a,parent:p,parentProperty:g},this._handleCallback(M,b,"value"),M}else if(U[0]==="`"&&a&&Kv.call(a,U.slice(1))){let ve=U.slice(1);z(this._trace(ne,a[ve],A8(u,ve),a,ve,b,k,!0))}else if(U.includes(",")){let ve=U.split(",");for(let Be of ve)z(this._trace(iIe(Be,ne),a,u,p,g,b,!0))}else!A&&a&&Kv.call(a,U)&&z(this._trace(ne,a[U],A8(u,U),a,U,b,k,!0))}if(this._hasParentSelector)for(let ve=0;ve<Z.length;ve++){let Be=Z[ve];if(Be&&Be.isParentSelector){let Ee=this._trace(Be.expr,a,Be.path,p,g,b,k);if(Array.isArray(Ee)){Z[ve]=Ee[0];let Le=Ee.length;for(let xt=1;xt<Le;xt++)ve++,Z.splice(ve,0,Ee[xt])}else Z[ve]=Ee}}return Z};o_.prototype._walk=function(s,a){if(Array.isArray(s)){let u=s.length;for(let p=0;p<u;p++)a(p)}else s&&typeof s=="object"&&Object.keys(s).forEach(u=>{a(u)})};o_.prototype._slice=function(s,a,u,p,g,b,k){if(!Array.isArray(u))return;let A=u.length,M=s.split(":"),U=M[2]&&Number.parseInt(M[2])||1,ne=M[0]&&Number.parseInt(M[0])||0,Z=M[1]&&Number.parseInt(M[1])||A;ne=ne<0?Math.max(0,ne+A):Math.min(A,ne),Z=Z<0?Math.max(0,Z+A):Math.min(A,Z);let z=[];for(let ve=ne;ve<Z;ve+=U)this._trace(iIe(ve,a),u,p,g,b,k,!0).forEach(Ee=>{z.push(Ee)});return z};o_.prototype._eval=function(s,a,u,p,g,b){this.currSandbox._$_parentProperty=b,this.currSandbox._$_parent=g,this.currSandbox._$_property=u,this.currSandbox._$_root=this.json,this.currSandbox._$_v=a;let k=s.includes("@path");k&&(this.currSandbox._$_path=o_.toPathString(p.concat([u])));let A="script:"+s;if(!o_.cache[A]){let M=s.replace(/@parentProperty/gu,"_$_parentProperty").replace(/@parent/gu,"_$_parent").replace(/@property/gu,"_$_property").replace(/@root/gu,"_$_root").replace(/@([.\s)[])/gu,"_$_v$1");k&&(M=M.replace(/@path/gu,"_$_path")),o_.cache[A]=new this.vm.Script(M)}try{return o_.cache[A].runInNewContext(this.currSandbox)}catch(M){throw new Error("jsonPath: "+M.message+": "+s)}};o_.cache={};o_.toPathString=function(s){let a=s,u=a.length,p="$";for(let g=1;g<u;g++)/^(~|\^|@.*?\(\))$/u.test(a[g])||(p+=/^[0-9*]+$/u.test(a[g])?"["+a[g]+"]":"['"+a[g]+"']");return p};o_.toPointer=function(s){let a=s,u=a.length,p="";for(let g=1;g<u;g++)/^(~|\^|@.*?\(\))$/u.test(a[g])||(p+="/"+a[g].toString().replace(/~/gu,"~0").replace(/\//gu,"~1"));return p};o_.toPathArray=function(s){let{cache:a}=o_;if(a[s])return a[s].concat();let u=[],g=s.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replace(/[['](\??\(.*?\))[\]']/gu,function(b,k){return"[#"+(u.push(k)-1)+"]"}).replace(/\[['"]([^'\]]*)['"]\]/gu,function(b,k){return"['"+k.replace(/\./gu,"%@%").replace(/~/gu,"%%@@%%")+"']"}).replace(/~/gu,";~;").replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replace(/%@%/gu,".").replace(/%%@@%%/gu,"~").replace(/(?:;)?(\^+)(?:;)?/gu,function(b,k){return";"+k.split("").join(";")+";"}).replace(/;;;|;;/gu,";..;").replace(/;$|'?\]|'$/gu,"").split(";").map(function(b){let k=b.match(/#(\d+)/u);return!k||!k[1]?b:u[k[1]]});return a[s]=g,a[s].concat()};o_.prototype.vm=oir;import lir from"fs/promises";import uir from"path";var sut=t(async function({outputDirectory:s,logger:a}){return Fu.timeFn("Verify Worker output",async()=>{a.debug("Verify Worker output");let u=uir.join(s,"worker.js");try{if(await pc.fileExists(u)){let p=await lir.readFile(u,"utf-8"),g=await cir(p,{syntax:"ecmascript"}),b=o_({path:"$..callee[?(@property === 'value' && (@ === 'Function'|| @ === 'eval'))]^",json:g.body});if(b&&b.length>0)return{warnings:[{message:"We do not support the use of 'eval' or 'new Function(...)'",severity:"warning",pluginName:"verify-worker-output"}],errors:[]}}}catch(p){a.error(p);let g={message:`Error validating build output : ${p.message}`,severity:"error",pluginName:"verify-worker-output"};return{warnings:[],errors:[g]}}return{warnings:[],errors:[]}})},"verifyWorkerOutput");import*as fbt from"esbuild";import{randomUUID as fir}from"crypto";var YN=class{static{t(this,"CompilerResult")}buildId;buildTime;buildTimeMs;errors;warnings;status;assets;metafile;constructor(a,u){this.buildId=u?.buildId??fir(),this.buildTime=u?.startBuildTime.toISOString(),this.buildTimeMs=u?.endBuildTime.getTime()-u?.startBuildTime.getTime(),this.errors=a.errors.map(p=>({message:p.text,severity:GW,...p})),this.warnings=a.warnings.map(p=>({message:p.text,severity:HW,...p})),a.metafile&&(this.metafile=a.metafile),this.status=d8,this.warnings&&this.warnings.length>0&&(this.status=U9),this.errors&&this.errors.length>0&&(this.status=Wv)}};var _ir=!1;function fM(s,a){return{open:`\x1B[${s.join(";")}m`,close:`\x1B[${a}m`,regexp:new RegExp(`\\x1b\\[${a}m`,"g")}}t(fM,"code");function _M(s,a){return _ir?`${a.open}${s.replace(a.regexp,a.open)}${a.close}`:s}t(_M,"run");function pir(s){return _M(s,fM([31],39))}t(pir,"red");function dir(s){return _M(s,fM([32],39))}t(dir,"green");function mir(s){return _M(s,fM([33],39))}t(mir,"yellow");function hir(s){return _M(s,fM([34],39))}t(hir,"blue");function gir(s){return _M(s,fM([35],39))}t(gir,"magenta");function yir(s){return _M(s,fM([36],39))}t(yir,"cyan");var wFr=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|"),"g");var aut=[pir,dir,mir,hir,gir,yir];function vir(s){let a=0,u=s.length,p=0;if(u>0)for(;p<u;)a=(a<<5)-a+s.charCodeAt(p++)|0;return a}t(vir,"hashCode");function out(s){let a=Math.abs(vir(s));return aut[a%aut.length]}t(out,"generateColor");import{inspect as bir}from"util";function cut(s,a,...u){let p=0,g=u.length,b=String(a).replace(/%[sdjoO%]/g,k=>{if(k==="%%")return"%";if(p>=g)return k;switch(k){case"%s":return String(u[p++]);case"%d":return Number(u[p++]).toString();case"%o":return s(u[p++]).split(`
|
|
706
706
|
`).map(A=>A.trim()).join(" ");case"%O":return s(u[p++]);case"%j":try{return JSON.stringify(u[p++])}catch{return"[Circular]"}default:return k}});for(let k of u.splice(p))k===null||!(typeof k=="object"&&k!==null)?b+=" "+k:b+=" "+s(k);return b}t(cut,"format");var lut=t((s,...a)=>cut(bir,s,a),"format");var aIe=class{static{t(this,"Debugger")}manager;ns;color;last;enabled;constructor(a,u){this.manager=a,this.ns=u,this.color=out(u),this.last=0,this.enabled=a.enabled.some(p=>p.test(u))}log(...a){if(!this.enabled)return;let u,p=a[0];typeof p=="function"?u=p():u=String(p);let g=Date.now()-(this.last||Date.now());u=lut(u,...a);let b=`${this.color(this.ns)} ${u} ${this.color(`+${g}ms`)}`;console.log(b),this.last=Date.now()}},oIe=class{static{t(this,"DebugManager")}debuggers;enabled;constructor(a){this.debuggers=new Map,this.enabled=a??[]}};function Sir(s){return!s||s.length===0?[]:(s=s.replace(/\s/g,"").replace(/\*/g,".+"),s.split(",").map(a=>new RegExp(`^${a}$`)))}t(Sir,"extract");var Gce;function uut(s){Gce||(Gce=new oIe(Sir(process.env.DEBUG)));let a=new aIe(Gce,s);return Gce.debuggers.set(s,a),Object.assign(a.log.bind(a),{self:a})}t(uut,"debug");import Rfe,{dirname as obt}from"path";import{fileURLToPath as cbt}from"url";var cIe="no-remote-module";function fut({logger:s}){return{name:cIe,async setup(a){a.onResolve({filter:/^https?:\/\//},u=>(s.error(u,"User attempted to load a remote module"),{errors:[{text:`Remote modules are not supported. Attempted to load module ${u.path}`,detail:"InvalidRemoteModule",pluginName:cIe,location:{line:0,column:0,file:""}}],pluginName:cIe}))}}}t(fut,"blockRemoteModulePlugin");import _ut from"fs/promises";import Hce from"path";import Tir from"prettier";var put="/docs",xir="/__zuplo/dev-portal";function Eir(s){let a=s.trim().toLowerCase();return a.endsWith("/")&&(a=a.slice(0,-1)),a}t(Eir,"normalizePathname");function Cir(s){let a={sitePathname:s?.sitePathname===xir?put:s?.sitePathname?Eir(s.sitePathname):put,enabled:s?s.enabled??!0:!1};return`const devPortal = ${JSON.stringify(a)};
|
|
707
707
|
export default devPortal;`}t(Cir,"generateSource");function dut(s){return{name:"dev-portal-config",setup(a){a.onResolve({filter:/dev-portal.json$/},u=>({namespace:"dev-portal-json",path:Hce.isAbsolute(u.path)?u.path:Hce.join(u.resolveDir,u.path),pluginName:"dev-portal"})),a.onLoad({filter:/.*/,namespace:"dev-portal-json"},async u=>Fu.timeFn("Generating dev-portal.json data",async()=>{let p,g,b=[];if(await pc.fileExists(u.path)){g=await _ut.readFile(u.path,"utf-8");try{p=JSON.parse(g)}catch{b.push({id:"dev-portal-build-error",text:"Could not parse dev-portal.json. Ensure that the file is valid JSON.",location:{file:"dev-portal.json",namespace:"dev-portal-json",line:1,column:0,length:0,lineText:"",suggestion:""},detail:"DevPortalValidationError",pluginName:"dev-portal",notes:[{text:"Could not parse dev-portal.json. Ensure that the file is valid JSON.",location:null}]})}}if(b&&b.length>0)throw b;let k;try{if(k=Cir(p),Lm.DEBUG_BUILD_MODE&&k&&await pc.dirExists(s.sourceDirectory)){let A=await Tir.format(k,{parser:"babel"});await _ut.writeFile(Hce.join(s.sourceDirectory,IN,"dev-portal.js"),A)}if(b&&b.length>0)throw b}catch(A){A.length>0?A.forEach(M=>{let U={id:"dev-portal-build-error",text:M.message,location:{file:"dev-portal.json",namespace:"dev-portal-json",line:1,column:0,length:0,lineText:"issue",suggestion:""},detail:"DevPortalValidationError",pluginName:"dev-portal",notes:[{text:M.message,location:null}]};b.push(U)}):b.push({id:"dev-portal-build-error",text:A.message,location:{file:"dev-portal.json",namespace:"dev-portal-json",line:1,column:0,length:0,lineText:"issue",suggestion:""},detail:"DevPortalValidationError",pluginName:"dev-portal",notes:[{text:A.message,location:null}]})}return{contents:k,errors:b,pluginName:"dev-portal",loader:"js",resolveDir:Hce.dirname(u.path),watchFiles:[u.path]}}))}}}t(dut,"devPortalConfigPlugin");import mut from"path";var hut="legacy-environment",gut="legacy-environment",kir=`import { environment } from "@zuplo/runtime";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2485.0",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"prettier": "^3.3.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@zuplo/graphql": "5.
|
|
44
|
-
"@zuplo/otel": "5.
|
|
45
|
-
"@zuplo/runtime": "5.
|
|
43
|
+
"@zuplo/graphql": "5.2485.0",
|
|
44
|
+
"@zuplo/otel": "5.2485.0",
|
|
45
|
+
"@zuplo/runtime": "5.2485.0"
|
|
46
46
|
}
|
|
47
47
|
}
|