@zuplo/core 6.18.17 → 6.18.18
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/customer.cli.minified.js +1 -1
- package/index.minified.js +1 -1
- package/package.json +4 -4
package/customer.cli.minified.js
CHANGED
|
@@ -591,7 +591,7 @@ globstar while`,s,Z,l,Re,Ae),this.matchOne(s.slice(Z),l.slice(Re),_))return this
|
|
|
591
591
|
export default devPortal;`}t(Ghr,"generateSource");function nht(a){return{name:"dev-portal-config",setup(s){s.onResolve({filter:/dev-portal.json$/},l=>({namespace:"dev-portal-json",path:sfe.isAbsolute(l.path)?l.path:sfe.join(l.resolveDir,l.path),pluginName:"dev-portal"})),s.onLoad({filter:/.*/,namespace:"dev-portal-json"},async l=>hf.timeFn("Generating dev-portal.json data",async()=>{let _,m,b=[];if(await yl.fileExists(l.path)){m=await Vhr.readFile(l.path,"utf-8");try{_=JSON.parse(m)}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 D;try{if(D=Ghr(_),ph.DEBUG_BUILD_MODE&&D){let A=sfe.join(a.sourceDirectory,".zuplo","dev-portal.js");await ak(A,D)}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:D,errors:b,pluginName:"dev-portal",loader:"js",resolveDir:sfe.dirname(l.path),watchFiles:[l.path]}}))}}}t(nht,"devPortalConfigPlugin");import iht from"path";var sht="legacy-environment",aht="legacy-environment",Khr=`import { environment } from "@zuplo/runtime";
|
|
592
592
|
export default environment;`;function oht(a){return{name:"environment",setup(s){s.onResolve({filter:/@app\/environment$/},()=>({namespace:aht,pluginName:sht,path:iht.join(a.sourceDirectory,Z4,"environment.js")})),s.onLoad({filter:/.*/,namespace:aht},async l=>({contents:Khr,loader:"ts",resolveDir:iht.dirname(l.path),pluginName:sht}))}}}t(oht,"environmentPlugin");var yyt=up(mFe(),1),vyt=up(U0t(),1),byt=up(UFe(),1),Syt=up($Fe(),1);import G2r from"fs/promises";import q2 from"path";var pk="schemas",$fe="json-schema";function Tyt(a){return{name:pk,async setup(s){let l=new byt.Ajv2020({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});(0,vyt.default)(l,{mode:"fast"}),l.opts.code.formats=yyt._`require("ajv-formats/dist/formats").fastFormats`;let _=q2.join(a.sourceDirectory,uH),m,b=[],D=[];if(await yl.dirExists(_)&&(l.addKeyword("faker"),m=await yl.listFolderContents(_,uH),await Promise.all(m.map(async A=>{try{let M=yl.safePath(a.sourceDirectory).resolve(_,A);if(!M.startsWith(_))throw new Error("All schemas must be in the schemas directory");let U=await G2r.readFile(M,"utf-8");if(U===""||U===void 0)throw new Error(`Schema 'schemas/${A}' is empty and will be ignored.`);let ne=JSON.parse(U);if(ne.$schema&&ne.$schema!=="https://json-schema.org/draft/2020-12/schema")throw new Error(`Error in ${A}: All JSON schemas must use version 2020-12. See release notes for changes: https://json-schema.org/draft/2020-12/release-notes.html`);if(l.$dataMetaSchema,l.addSchema(ne,A),l.errors?.length){let se=l.errors[0];b.push({id:"json-schema-validation-error",pluginName:pk,text:`Error: ${se.message}`,location:{file:q2.join(uH,A)},detail:{params:se.params,propertyName:se.propertyName,schemaPath:se.schemaPath,data:se.data}})}}catch(M){if(M.message.endsWith("is empty and will be ignored.")){D.push({id:"empty-json-schema-file",pluginName:pk,text:`Schema 'schemas/${A}' is empty and will be ignored.`,location:{file:`schemas/${A}`,suggestion:"Add schema details or remove the file from the project."},detail:"EmptyJSONSchemaFile",notes:[{text:`Schema 'schemas/${A}' is empty and will be ignored.`,location:{file:`schemas/${A}`,suggestion:"Add schema details or remove the file from the project."}}]});return}let U=await S8e(A,a.sourceDirectory,M.message);b.push({id:"json-schema-add-error",pluginName:pk,text:`Error: ${M.message}`,location:U,detail:"InvalidAddSchemaError",notes:[{text:M.message}]})}})),await Promise.all(m.map(async A=>{try{let M=l.getSchema(A);M&&l.compile(M.schema).errors?.forEach(ne=>{b.push({text:`Failed to compile ${A}: ${ne.message}`})})}catch(M){let U=await S8e(A,a.sourceDirectory,M.message);b.push({id:"json-schema-compile-error",pluginName:pk,text:`The schema file '${A}' is not valid. Error: ${M.message}`,location:U,detail:"InvalidSchemaError",notes:[{text:M.message}]})}})),ph.DEBUG_BUILD_MODE)){let A=q2.resolve(a.outputDirectory,uH);await yl.mkdirIfNotExists(A)}s.onStart(async()=>{if(m)return{errors:b,warnings:D}}),s.onResolve({filter:/schemas\/.*\.json$/},async A=>{let M=q2.isAbsolute(A.path)?A.path:q2.join(A.resolveDir,A.path);if(A.importer&&A.importer!==q2.join(a.sourceDirectory,"config/routes.json"))return{path:M};if(!await yl.fileExists(M)){let U="policies.json";return{errors:[{id:"json-schema-build-error",text:`Unable to resolve reference to '${A.path}' from ${U}`,location:{file:q2.join(A.resolveDir,U),namespace:$fe,line:1,column:0,length:0,lineText:`Invalid JSON schema reference in ${U}`,suggestion:""},detail:"RouteReferenceError",pluginName:pk,notes:[{text:`Unable to resolve reference to '${A.path}' from ${U}`,location:null}]}],namespace:$fe,path:M,pluginName:pk}}return{path:M,namespace:$fe,pluginName:pk}}),s.onLoad({filter:/.*/,namespace:$fe},async A=>hf.timeFn(`Generating json schema data: ${q2.basename(A.path)}`,async()=>{let M=[],U;try{let ne=q2.relative(_,A.path),se=l.getSchema(ne);if(!se)throw new Error(`Could not load schema at ${A.path}`);U=se.source?.validateCode;let Z=l.compile(se.schema);U=(0,Syt.default)(l,Z)}catch(ne){M.push({pluginName:pk,text:`Cannot parse project's schemas/${q2.basename(A.path)} file. Error: ${ne.message}`,location:null,notes:[{text:ne.message,location:null}],detail:ne})}if(ph.DEBUG_BUILD_MODE&&U){let ne=q2.relative(_,A.path),se=q2.join(a.sourceDirectory,".zuplo",`${ne}.js`);await ak(se,U)}return{contents:U,errors:M,pluginName:pk,resolveDir:q2.dirname(A.path),watchFiles:[A.path]}}))}}}t(Tyt,"jsonSchemaPlugin");import{relative as K2r}from"path";var xyt=["node:assert","node:async_hooks","node:buffer","node:crypto","node:diagnostics_channel","node:events","node:path","node:process","node:stream","node:string_decoder","node:util"],Y2r="nodejs-compat-plugin";function Cyt({sourceDirectory:a}){return{name:Y2r,setup(s){let l=new Set;s.onStart(()=>{l.clear()}),s.onResolve({filter:/node:.*/},async({path:_,kind:m,resolveDir:b,...D})=>{let A=`${_}:${m}:${b}:${D.importer}`;if(l.has(A))return;l.add(A);let M=await s.resolve(_,{kind:m,resolveDir:b,importer:D.importer});return M.errors.length>0?xyt.includes(_)||_.includes("/")&&xyt.includes(_.split("/")[0])?{external:!0}:{external:!0,warnings:M.errors.map(ne=>({...ne,location:{file:K2r(a,D.importer),line:0,column:0,namespace:"",length:0,lineText:"",suggestion:"Remove the imported node module"},detail:`The package "${_}" wasn't found on the file system but is built into node. If this code is executed it will fail.`}))}:M})}}}t(Cyt,"nodejsCompatPlugin");import Eyt from"fs/promises";import eE from"path";var Cj="open-api-routes-plugin",Jfe="open-api-routes-json";function Dyt(a){return{name:"open-api-routes-plugin",setup(s){s.onResolve({filter:/routes.json$/},l=>({watchFiles:[...JFe(eE.join(a.sourceDirectory,M1),[".oas.json"],!0),eE.join(a.sourceDirectory,M1,yce)],namespace:Jfe,path:eE.isAbsolute(l.path)?l.path:eE.join(l.resolveDir,l.path),pluginName:Cj})),s.onResolve({filter:/^\.\.\/modules\/.*/,namespace:Jfe},async l=>{let _=eE.join(l.resolveDir,`${l.path}.ts`);if(!await yl.fileExists(_)){let m=`$import(.${l.path.replace(/^../,"")})`,b=eE.resolve(a.sourceDirectory,"config"),D=await xO(b),A=await got(D,m,"Update your route configuration to use code from the 'modules' folder");return{errors:[{id:"route-build-error",text:`Invalid handler reference in routes.json. Unable to resolve reference to '${m}' from routes.json`,location:A,detail:"RouteReferenceError",pluginName:Cj}],namespace:Jfe,path:l.path,pluginName:Cj}}}),s.onLoad({filter:/.*/,namespace:Jfe},async l=>hf.timeFn("Generating route.json data",async()=>{let _=eE.resolve(a.sourceDirectory,"config"),m=await xO(_),b=await Promise.all(m.map(async U=>({content:await Eyt.readFile(U,"utf-8"),fileName:U}))),D=eE.resolve(_,"policies.json");if(!await yl.fileExists(D))return{errors:[{text:"The project must include a policies file ('/config/policies.json')",detail:"OASPoliciesFileMissing",pluginName:Cj,location:{line:0,column:0,file:"/config/policies.json"}}],pluginName:Cj};let A={content:await Eyt.readFile(D,"utf-8"),fileName:D},M;try{M=await g8e({sourceDirectory:a.sourceDirectory,oasContent:b,policiesContent:A})}catch(U){throw new Error("Error compiling routes: "+U.message)}if(ph.DEBUG_BUILD_MODE&&M.content){let U=eE.join(a.sourceDirectory,".zuplo"),ne=eE.resolve(U,"routes.js");await ak(ne,M.content)}return{contents:M.content,errors:M.errors,pluginName:Cj,resolveDir:eE.dirname(l.path),watchFiles:[l.path]}}))}}}t(Dyt,"openApiRoutesPlugin");import zfe from"path";var zFe="raw-route-plugin",kyt="raw-route";function wyt(a){return{name:"raw-route-plugin",setup(s){s.onResolve({filter:/raw.json$/},l=>({namespace:kyt,path:l.path,pluginName:zFe})),s.onLoad({filter:/.*/,namespace:kyt},async l=>{let _=zfe.resolve(a.sourceDirectory,M1);if(!await yl.dirExists(_))return{loader:"js",resolveDir:zfe.dirname(l.path),pluginName:zFe};let m=await xO(_),b=await b8e({oasFiles:m,sourceDirectory:a.sourceDirectory,logger:a.logger});if(ph.DEBUG_BUILD_MODE&&b){let D=zfe.join(a.sourceDirectory,".zuplo","raw-routes.js");await ak(D,b)}return{contents:b,loader:"js",resolveDir:zfe.dirname(l.path),pluginName:zFe}})}}}t(wyt,"rawRoutePlugin");import X2r from"fs/promises";import qFe from"path";var qfe="runtime-config",Pyt="runtime-config-plugin";function Ayt(){return{name:qfe,setup(a){a.onResolve({filter:/^\.\.\/modules\/zuplo.runtime.ts$/},s=>({namespace:Pyt,path:qFe.isAbsolute(s.path)?s.path:qFe.join(s.resolveDir,s.path),pluginName:qfe})),a.onLoad({filter:/.*/,namespace:Pyt},async s=>hf.timeFn("Generating zuplo.runtime.ts data",async()=>{let l="export const runtimeInit = undefined;",_=[];return await yl.fileExists(s.path)?(l=await X2r.readFile(s.path,"utf-8"),{contents:l,loader:"ts",resolveDir:qFe.dirname(s.path),errors:_,pluginName:qfe,watchFiles:[s.path]}):{contents:l,loader:"ts",errors:_,pluginName:qfe}}))}}}t(Ayt,"runtimeConfigPlugin");var Iyt=up(UFe(),1),Oyt=up($Fe(),1);import HFe from"fs/promises";import cF from"path";var VFe="schema-validation-plugin",Nyt="schema-validation",Q2r="module.exports = {}";function Fyt(a){return{name:"schema-validation-plugin",setup(s){s.onResolve({filter:/ajv-schema.json$/},l=>({namespace:Nyt,path:l.path,pluginName:VFe})),s.onLoad({filter:/.*/,namespace:Nyt},async l=>{let _=cF.resolve(a.sourceDirectory,M1,"policies.json");if(!await yl.fileExists(_))return{contents:Q2r,loader:"js",resolveDir:cF.dirname(l.path),pluginName:VFe};let m=await eSr(a.sourceDirectory),b=cF.resolve(a.sourceDirectory,M1),D=await xO(b),A=await iSr(D,m),M=await Z2r({oasFiles:D,routesWithSchemaValidation:A,sourceDirectory:a.sourceDirectory,logger:a.logger});if(ph.DEBUG_BUILD_MODE&&M){let U=cF.join(a.sourceDirectory,".zuplo","schema-validation.js");await ak(U,M)}return{contents:M,loader:"js",resolveDir:cF.dirname(l.path),pluginName:VFe}})}}}t(Fyt,"schemaValidationPlugin");async function Z2r({oasFiles:a,routesWithSchemaValidation:s,sourceDirectory:l,logger:_}){let m="",b=new _3(l,_);if(s.length===0)return m;let D=new Iyt.Ajv2020({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});for(let A of a){let M=await HFe.readFile(A,"utf-8"),U=cF.basename(A,".oas.json"),ne=s.filter(ke=>ke.fileName===U),se=await b.resolve(A),Z=JSON.parse(M),Re=[],Ae=new Map;ne.forEach(ke=>{let Ot=Z.paths[ke.path][ke.method];if(Ot.requestBody){let kt;if(Ot.requestBody.$ref){let br=Ot.requestBody.$ref;kt=se.get(br)?.content}else Ot.requestBody.content&&(kt=Ot.requestBody.content);if(kt)for(let br in kt){let Kr=kt[br].schema,on=e3e(ke.path,ke.method,br);Kr.$id=on,D.addSchema(Kr),WFe(Kr,A,U,D,se,Re,Ae)}}if(Ot.parameters)for(let kt of Ot.parameters){let br=kt.$ref?se.get(kt.$ref):kt,Kr=br.schema.$ref?se.get(br.schema.$ref):br.schema,on=Z4e(ke.path,ke.method,br.in,br.name);Kr.$id=on,D.addSchema(Kr),WFe(br,A,U,D,se,Re,Ae)}});for(let ke of Re){let Ot=se.get(ke),kt=tG(U,ke);D.addSchema(Ot,kt)}}return m=(0,Oyt.default)(D),m}t(Z2r,"schemaValidationSource");function WFe(a,s,l,_,m,b,D){for(let A in a){let M=a[A];if(A==="$ref"){let U=tG(l,n3(s,M));a[A]=U,RH(s,l,n3(s,M),m,b,D,(ne,se)=>tG(ne,n3(s,se)))}else typeof M=="object"&&WFe(M,s,l,_,m,b,D)}}t(WFe,"addRefsToSchema");async function eSr(a){let s=new Set(["RequestValidationInboundPolicy"]),l=await HFe.readFile(`${a}/config/policies.json`,"utf-8"),_=JSON.parse(l);return tSr(_,s)}t(eSr,"getPolicyNamesUsingSchemaValidationPolicies");function tSr(a,s){let l=new Set;a.policies?.forEach(m=>{m.handler?.export&&s.has(m.handler.export)&&m.handler.module==="$import(@zuplo/runtime)"&&l.add(m.name)});let _=rSr(a,l);return new Set([...l,..._])}t(tSr,"getPolicyNamesReferencingPolicyHandlers");function rSr(a,s){let l=new Set;return a.policies?.forEach(_=>{_.handler?.export==="CompositeInboundPolicy"&&_.handler?.options?.policies?.forEach(m=>{s.has(m)&&l.add(_.name)})}),l}t(rSr,"getCompositePoliciesContainingPolicy");function nSr(a,s){if(!a["x-zuplo-route"]||!a["x-zuplo-route"].policies)return!1;let l=a["x-zuplo-route"].policies.inbound;if(l){for(let m of l)if(s.has(m))return!0}let _=a["x-zuplo-route"].policies.outbound;if(_){for(let m of _)if(s.has(m))return!0}return!1}t(nSr,"isPolicyPresentInOperation");async function iSr(a,s){let l=[];for(let _ of a){let m=await HFe.readFile(_,"utf-8"),D=JSON.parse(m).paths;for(let A in D){let M=D[A];for(let U in M){let ne=M[U];nSr(ne,s)&&l.push({fileName:cF.basename(_,".oas.json"),path:A,method:U})}}}return l}t(iSr,"getRoutesContainingPolicies");import{mkdirSync as sSr,writeFileSync as aSr}from"fs";import oSr from"path";import Lyt from"path";function Ej(a,s){let l=Lyt.relative(process.cwd(),Lyt.join(a,GR));return Object.keys(s?.outputs??{}).map(m=>`.${m.replace(l,"")}`)}t(Ej,"getBuildModules");function Ryt(a){return{name:"write-modules-plugin",setup(s){s.onEnd(async l=>{if(l){let _=Ej(a.sourceDirectory,l.metafile);sSr(a.outputDirectory,{recursive:!0}),aSr(oSr.join(a.outputDirectory,"modules.json"),JSON.stringify(_,null,2))}})}}}t(Ryt,"writeModulesPlugin");var cSr=eht("zuplo:core:build"),lSr=["workerd","worker","browser"],Byt=[...process.env.GLOBAL_MODULE_LOCATION?[process.env.GLOBAL_MODULE_LOCATION]:[],GFe.resolve(Myt(jyt(import.meta.url)),"..","..","..","node_modules"),GFe.resolve(Myt(jyt(import.meta.url)),"..","..","..","..","..","node_modules")];async function OK({systemDirectory:a,outputDirectory:s,sourceDirectory:l,cacheDirectory:_,logger:m,minify:b=!0,command:D,flags:A}){let M=GFe.join(a,Sce);cSr(`Building with node paths: ${Byt.join(", ")}`);let U=b&&D!=="dev"&&!process.env.DEBUG_BUILD_DISABLE_MINIFY?{minify:!0,chunkNames:"[hash]"}:{minify:!1,keepNames:!0,chunkNames:"[name]-[hash]"},ne={sourceDirectory:l,outputDirectory:s,cacheDirectory:_,logger:m,debugMode:ph.DEBUG_BUILD_MODE,flags:A};return{platform:"browser",target:"es2022",outdir:s,splitting:!0,metafile:!0,format:"esm",nodePaths:Byt,entryPoints:[M],sourcemap:"linked",legalComments:"none",treeShaking:!0,bundle:!0,...U,external:[],logLevel:"silent",conditions:lSr,plugins:[oht(ne),tht(ne),Dyt(ne),wyt(ne),Fyt(ne),Ayt(),nht(ne),Tyt(ne),Cyt(ne),Ryt(ne)]}}t(OK,"getBaseESBuildConfig");var lF="run-esbuild",$yt=t(async function({systemDirectory:a,outputDirectory:s,sourceDirectory:l,cacheDirectory:_,buildId:m,logger:b,config:D,command:A,minify:M},U){return hf.timeFn("Running esbuild",async()=>{b.info(`Running build_id: ${m}`);let ne=await OK({command:A,minify:M,systemDirectory:a,outputDirectory:s,cacheDirectory:_,sourceDirectory:l,logger:b,flags:D.flags}),se;try{if(!await oM(l))throw new Error("Failed to build project because no open-api file was found on the 'config' folder");se=await Uyt.build(ne),U.set("metafile",se.metafile)}catch(Ae){if(b.error(Ae),Ae.errors||Ae.warnings)se=Ae;else if(Ae.message.includes("Failed to build project because no open-api file was found on the 'config' folder"))se={warnings:[],errors:[{id:"missing-open-api-file",text:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:lF,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 Ae}se.errors.length>0&&se.errors.length>1&&(se.errors.length=1);let{errors:Z,warnings:Re}=KFe({buildId:m,result:se});return{errors:Z,warnings:Re}})},"runEsbuild");function KFe({buildId:a,result:s}){return{status:s.errors.length>0?"Failed":s.warnings.length>0?"Warnings":"Good",runtimeVersion:"0.0.0",buildTime:"",buildTimeMs:0,buildId:a,warnings:s.warnings.map(_=>_.text==="Using direct eval with a bundler is not recommended and may cause problems"?{location:_.location,detail:_.detail,id:_.id,notes:_.notes,message:"We do not support the use of 'eval' or 'new Function(...)'",severity:dce,pluginName:_.pluginName||lF}:{location:_.location,detail:_.detail,id:_.id,notes:_.notes,message:_.text,severity:dce,pluginName:_.pluginName||lF}),errors:s.errors.map(_=>({location:_.location,detail:_.detail,id:_.id,notes:_.notes,message:_.text,severity:qAe,pluginName:_.pluginName||lF})),metafile:s.metafile}}t(KFe,"esbuildResultToBuildResult");var uSr=t((a,s)=>{let l=s;if(s.includes(a)){let _=new RegExp(`.*(${a})`,"g");l=s.replace(_,"")}return l.match(/^(\/)?(\.\.(\/)?)+/)&&(l=l.replace(/^(\/)?(\.\.(\/)?)+/,"/")),l},"removePrefixFromString"),fSr=t((a,s)=>{let l=s;if(l.includes(a)){let _=new RegExp(`[a-zA-Z0-9-_.\\/]+(${a})`,"g");l=l.replace(_,"")}return l},"cleanFilePathsInMessage"),Jyt=t((a,s,l)=>{if(!a||a.length<=0)return a;let _=a.filter(m=>m.message!=='Could not resolve "@zuplo/runtime"');return _&&_.length>0&&_.forEach(m=>{try{m.location&&m.location.file&&(m.location.file=uSr(s,m.location.file)),m.location&&m.location.lineText&&m.location.lineText.includes("@zuplo/core/index.minified.js")&&(m.location.lineText=m.location.lineText.substring(0,200)+"...<Truncated>"),m.message=fSr(s,m.message),m.notes&&m.notes.length>0&&delete m.notes,m.text&&delete m.text,m.pluginName===""&&(m.pluginName=l)}catch{}}),_},"cleanDataOnBuildIssue");function zyt(a,s){let l=YFe.basename(s);a.errors&&(a.errors=Jyt(a.errors,l,lF)),a.warnings&&(a.warnings=Jyt(a.warnings,l,lF))}t(zyt,"formatBuildResult");var _Sr=t(a=>YFe.basename(a).startsWith("."),"isHiddenOnUnix"),pSr=t((a,s=[])=>s.map(l=>l.startsWith(".")?l:`.${l}`).some(l=>a.endsWith(l)),"hasMatchingExtname");function JFe(a,s=[],l=!1){let _=[],m;if(!Vfe.existsSync(a)){let b;if(IH.hasMagic(a))b=a;else{let D=s.map(A=>A.startsWith(".")?A:`.${A}`).join("|");b=`${a}+(${D})`}if(_.push(...IH.sync(b,{nodir:!0})),!_.length)throw Error(`Cannot find any files matching pattern "${a}"`);return _}try{if(m=Vfe.statSync(a),m.isFile())return[a]}catch{return[]}return Vfe.readdirSync(a).forEach(b=>{let D=YFe.join(a,b),A;try{if(A=Vfe.statSync(D),A.isDirectory()){l&&_.push(...JFe(D,s,l));return}}catch{return}if(!s.length)throw Error(`Argument '${s}' required when argument '${a}' is a directory`);!A.isFile()||!pSr(D,s)||_Sr(D)||_.push(D)}),_}t(JFe,"lookupFiles");var Dj=new Dce({level:process.env.FORCE_BUILD_COLORS?2:void 0}),uF=` ${Dj.gray("|")} `;function XFe({output:a,buildId:s,runtimeVersion:l,compatibilityDate:_}){let m=["Building Zuplo API...",`${uF}Build ID: ${s}`,`${uF}Runtime Version: ${l}`];_&&m.push(`${uF}Compatibility Date: ${_}`),a.info(m.join(`
|
|
593
593
|
`))}t(XFe,"outputBuildStart");async function Wfe(a,s,l){zyt(l,a),await Promise.all(l.warnings.map(_=>qyt(a,s,_))),await Promise.all(l.errors.map(_=>qyt(a,s,_))),l.status==="Good"?s.info(Dj.green("Build succeeded"),{status:"success"}):l.status==="Warnings"?s.warn(Dj.yellow("Build succeeded with warnings"),{status:"success"}):l.status==="Failed"&&s.error(Dj.red("Failed to build API"),{status:"failed"})}t(Wfe,"outputBuildResult");async function qyt(a,s,l){let _=[],m=l.severity==="error"?Dj.red:Dj.yellow,b=m(`${l.severity.toUpperCase()}: ${l.message}${l.detail?`
|
|
594
|
-
${uF}${l.detail.split(`
|
|
594
|
+
${uF}${l.detail.toString().split(`
|
|
595
595
|
`).join(`
|
|
596
596
|
${uF}`)}`:""}`);_.push(b);let D=hSr(l.location??void 0);if(D&&_.push(`${uF}${m(`The error was found in the file: ${D}`)}`),l.location&&l.location.column!==0&&l.location.line!==0){let A=mSr.join(a,l.location.file),M=await dSr(A,"utf-8"),U=(0,Vyt.codeFrameColumns)(M,{start:{line:l.location.line,column:l.location.column}},{highlightCode:!0,message:l.message,linesAbove:3,linesBelow:3});_.push(uF),_.push(U)}_.push(""),l.severity==="warning"?s.warn(_.join(`
|
|
597
597
|
`)):s.error(_.join(`
|
package/index.minified.js
CHANGED
|
@@ -597,7 +597,7 @@ export default environment;`;function _ht(a){return{name:"environment",setup(s){
|
|
|
597
597
|
`}),a.info(D)}t(TUr,"outputFileTree");function xUr(a,s){if(s.length===0)return"";let l=Object.keys(s[0]).length,_=Array.from({length:l},(D,A)=>Math.max(...s.map(M=>String(Object.values(M)[A]).length))),b=s.map(D=>Object.values(D).map((A,M)=>String(A).padEnd(_[M])).join(" ")).join(`
|
|
598
598
|
`);a.info(b)}t(xUr,"outputTable");function n7e({output:a,buildId:s,runtimeVersion:l,compatibilityDate:_}){let m=["Building Zuplo API...",`${_F}Build ID: ${s}`,`${_F}Runtime Version: ${l}`];_&&m.push(`${_F}Compatibility Date: ${_}`),a.info(m.join(`
|
|
599
599
|
`))}t(n7e,"outputBuildStart");async function Hfe(a,s,l){Gyt(l,a),await Promise.all(l.warnings.map(_=>Kyt(a,s,_))),await Promise.all(l.errors.map(_=>Kyt(a,s,_))),l.status==="Good"?s.info(tE.green("Build succeeded"),{status:"success"}):l.status==="Warnings"?s.warn(tE.yellow("Build succeeded with warnings"),{status:"success"}):l.status==="Failed"&&s.error(tE.red("Failed to build API"),{status:"failed"})}t(Hfe,"outputBuildResult");async function Kyt(a,s,l){let _=[],m=l.severity==="error"?tE.red:tE.yellow,b=m(`${l.severity.toUpperCase()}: ${l.message}${l.detail?`
|
|
600
|
-
${_F}${l.detail.split(`
|
|
600
|
+
${_F}${l.detail.toString().split(`
|
|
601
601
|
`).join(`
|
|
602
602
|
${_F}`)}`:""}`);_.push(b);let D=$Sr(l.location??void 0);if(D&&_.push(`${_F}${m(`The error was found in the file: ${D}`)}`),l.location&&l.location.column!==0&&l.location.line!==0){let A=USr.join(a,l.location.file),M=await BSr(A,"utf-8"),U=(0,Yyt.codeFrameColumns)(M,{start:{line:l.location.line,column:l.location.column}},{highlightCode:!0,message:l.message,linesAbove:3,linesBelow:3});_.push(_F),_.push(U)}_.push(""),l.severity==="warning"?s.warn(_.join(`
|
|
603
603
|
`)):s.error(_.join(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/core",
|
|
3
|
-
"version": "6.18.
|
|
3
|
+
"version": "6.18.18",
|
|
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": "^6.18.
|
|
44
|
-
"@zuplo/otel": "^6.18.
|
|
45
|
-
"@zuplo/runtime": "^6.18.
|
|
43
|
+
"@zuplo/graphql": "^6.18.18",
|
|
44
|
+
"@zuplo/otel": "^6.18.18",
|
|
45
|
+
"@zuplo/runtime": "^6.18.18"
|
|
46
46
|
}
|
|
47
47
|
}
|