@wix/cli-app 1.1.37 → 1.1.38
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/build/{CreateVersionCommand-6EC4JSXM.js → CreateVersionCommand-C6UP5ORQ.js} +2 -2
- package/build/{DevCommand-X6EMKMNL.js → DevCommand-BO6KQHRP.js} +2 -2
- package/build/GenerateCommand-7ZGIGNPF.js +99 -0
- package/build/{GenerateCommand-OMONJKBI.js.map → GenerateCommand-7ZGIGNPF.js.map} +1 -1
- package/build/{LogsCommand-J2FI7ZFQ.js → LogsCommand-W5CRI6WA.js} +2 -2
- package/build/PreviewCommand-DWQCCBBZ.js +4 -0
- package/build/{ServeCommand-MITPYVYW.js → ServeCommand-T5PQKB57.js} +2 -2
- package/build/{build-QYESI24D.js → build-CNTVWU2X.js} +2 -2
- package/build/{chunk-FVAP6LIO.js → chunk-35BUZ7CK.js} +2 -2
- package/build/{chunk-FVAP6LIO.js.map → chunk-35BUZ7CK.js.map} +1 -1
- package/build/{chunk-XMBKXITX.js → chunk-3Q7TAN43.js} +2 -2
- package/build/{chunk-2M3UC7RV.js → chunk-4YU6J2EW.js} +2 -2
- package/build/{chunk-7DTNPXX6.js → chunk-6QCQALVT.js} +2 -2
- package/build/{chunk-RPHPWNCA.js → chunk-7OVUUUVH.js} +2 -2
- package/build/{chunk-E6KVS4MA.js → chunk-BW3SDDV3.js} +2 -2
- package/build/chunk-GK5AZX2F.js +4 -0
- package/build/{chunk-EQUG3BNW.js → chunk-I2Z6OIJW.js} +2 -2
- package/build/{chunk-JA2XJ7LG.js → chunk-IBNMP32R.js} +2 -2
- package/build/{chunk-T3M3WLBF.js → chunk-KLTGX7JQ.js} +2 -2
- package/build/{chunk-HMROXS2Y.js → chunk-MIBBNKYS.js} +2 -2
- package/build/{chunk-XFE6VTSD.js → chunk-PBBKM3Z3.js} +2 -2
- package/build/{chunk-22T5OFY2.js → chunk-QDPEZ5A2.js} +2 -2
- package/build/{chunk-QCRAQWKR.js → chunk-QT3P4FJP.js} +2 -2
- package/build/{chunk-CXOD6WQ4.js → chunk-R3JUFM5X.js} +1 -1
- package/build/chunk-R3JUFM5X.js.map +1 -0
- package/build/{chunk-KEE43HZL.js → chunk-RCIAHQJ5.js} +2 -2
- package/build/{chunk-KEE43HZL.js.map → chunk-RCIAHQJ5.js.map} +1 -1
- package/build/{chunk-CKCOR335.js → chunk-RZI5OJAA.js} +2 -2
- package/build/{chunk-U6DFVNFC.js → chunk-TRE6G7GA.js} +2 -2
- package/build/{chunk-PVYYLEXH.js → chunk-VAOLKVA2.js} +2 -2
- package/build/{chunk-7IFG7QRE.js → chunk-YHA4H34H.js} +3 -3
- package/build/{chunk-7IFG7QRE.js.map → chunk-YHA4H34H.js.map} +1 -1
- package/build/index.js +2 -2
- package/build/{preview-YWEFS3GP.js → preview-HS2NEMQI.js} +2 -2
- package/build/{render-command-QQQFQTR7.js → render-command-QGD6AYTF.js} +2 -2
- package/package.json +2 -2
- package/build/GenerateCommand-OMONJKBI.js +0 -99
- package/build/PreviewCommand-62VXVRKG.js +0 -4
- package/build/chunk-CXOD6WQ4.js.map +0 -1
- package/build/chunk-HDM7FXQ2.js +0 -4
- /package/build/{CreateVersionCommand-6EC4JSXM.js.map → CreateVersionCommand-C6UP5ORQ.js.map} +0 -0
- /package/build/{DevCommand-X6EMKMNL.js.map → DevCommand-BO6KQHRP.js.map} +0 -0
- /package/build/{LogsCommand-J2FI7ZFQ.js.map → LogsCommand-W5CRI6WA.js.map} +0 -0
- /package/build/{PreviewCommand-62VXVRKG.js.map → PreviewCommand-DWQCCBBZ.js.map} +0 -0
- /package/build/{ServeCommand-MITPYVYW.js.map → ServeCommand-T5PQKB57.js.map} +0 -0
- /package/build/{build-QYESI24D.js.map → build-CNTVWU2X.js.map} +0 -0
- /package/build/{chunk-XMBKXITX.js.map → chunk-3Q7TAN43.js.map} +0 -0
- /package/build/{chunk-2M3UC7RV.js.map → chunk-4YU6J2EW.js.map} +0 -0
- /package/build/{chunk-7DTNPXX6.js.map → chunk-6QCQALVT.js.map} +0 -0
- /package/build/{chunk-RPHPWNCA.js.map → chunk-7OVUUUVH.js.map} +0 -0
- /package/build/{chunk-E6KVS4MA.js.map → chunk-BW3SDDV3.js.map} +0 -0
- /package/build/{chunk-HDM7FXQ2.js.map → chunk-GK5AZX2F.js.map} +0 -0
- /package/build/{chunk-EQUG3BNW.js.map → chunk-I2Z6OIJW.js.map} +0 -0
- /package/build/{chunk-JA2XJ7LG.js.map → chunk-IBNMP32R.js.map} +0 -0
- /package/build/{chunk-T3M3WLBF.js.map → chunk-KLTGX7JQ.js.map} +0 -0
- /package/build/{chunk-HMROXS2Y.js.map → chunk-MIBBNKYS.js.map} +0 -0
- /package/build/{chunk-XFE6VTSD.js.map → chunk-PBBKM3Z3.js.map} +0 -0
- /package/build/{chunk-22T5OFY2.js.map → chunk-QDPEZ5A2.js.map} +0 -0
- /package/build/{chunk-QCRAQWKR.js.map → chunk-QT3P4FJP.js.map} +0 -0
- /package/build/{chunk-CKCOR335.js.map → chunk-RZI5OJAA.js.map} +0 -0
- /package/build/{chunk-U6DFVNFC.js.map → chunk-TRE6G7GA.js.map} +0 -0
- /package/build/{chunk-PVYYLEXH.js.map → chunk-VAOLKVA2.js.map} +0 -0
- /package/build/{preview-YWEFS3GP.js.map → preview-HS2NEMQI.js.map} +0 -0
- /package/build/{render-command-QQQFQTR7.js.map → render-command-QGD6AYTF.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{a as J}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=LogsCommand-
|
|
3
|
+
import{a as J}from"./chunk-RZI5OJAA.js";import{Oa as V,Pa as z,Qa as H,Va as R,Wa as q,mb as U}from"./chunk-MIBBNKYS.js";import{O as j,R as G,V as C,W as N,a as I,b as M,d as _,e as S,l as r,w as l,z as d}from"./chunk-R3JUFM5X.js";import{e as f,h as a}from"./chunk-V4TR6DCM.js";a();a();var L=f(I(),1);var v=f(M(),1);a();var o=f(I(),1),k=f(M(),1);a();var y=f(I(),1);import{createServer as pe}from"node:http";var X=f(M(),1);a();var x=f(M(),1),oe=r.any(),re=r.enum(["info","error","warn","debug","log"]),te=r.object({message:r.array(oe),level:re,timestamp:r.number()}),ne=r.object({stack:r.string(),name:r.string(),message:r.string(),timestamp:r.number()}),se=r.object({_type:r.literal("log"),exceptions:r.array(ne),logs:r.array(te)}).passthrough(),ie=r.object({_type:r.literal("session-timeout")}).passthrough(),me=r.discriminatedUnion("_type",[se,ie]),K=(0,x.variant)({Log:(0,x.fields)(),Exception:(0,x.fields)()}),D="/logs",$=(e,n)=>{let i,g;if(e.method==="POST"&&e.url===D){let m="";e.on("data",s=>{m+=s.toString()}),e.on("end",()=>{let s;try{s=me.parse(JSON.parse(m))}catch(p){return g(S.FailedToParseLog(),p,{body:m}),n.statusCode=400,n.end()}let t=[];s._type==="log"&&(t.push(...s.exceptions.map(p=>K.Exception(p))),t.push(...s.logs.map(p=>K.Log(p)))),(0,x.match)(s._type,{log:()=>{i(t)},"session-timeout":()=>{n.statusCode=200,n.end(),g(S.LogsConnectionTimeout(),{},{body:m})}}),n.statusCode=200,n.end()})}else n.statusCode=404,n.end("Not Found");let u={onLog:m=>(i=m,u),onError:m=>(g=m,u)};return u};var ae=/([0-9a-f-]{36})/,Y=({onLog:e,version:n,appId:i})=>{let{getAppByVersion:g}=H(),u=J(),m=z({type:"backoffice"}),s=(0,y.useRef)(),t=(0,y.useMemo)(()=>pe((c,h)=>{$(c,h).onLog(e).onError((B,b,O)=>{throw t.close(),new _({code:B,cause:b,info:O})})}),[e]),p=(0,y.useMemo)(()=>new Promise(c=>{s.current=c}),[]);(0,y.useEffect)(()=>(t.listen(0,async()=>{let c=t.address().port;s.current?.(c)}),()=>{t.listening&&t.close()}),[t]);let{status:T}=G(async()=>{let c=await p,{url:h}=await u(c),{data:B}=await g({appId:i,version:n}),b=B.components.find(A=>A.compType===V.TOPOLOGY),O=ae.exec(b?.compData.topology.topology.backendApiUrl??"");if(!O?.[1])throw new _({code:S.FailedToGetLogsTopology()});let F=O[1],ee={appId:i,deploymentId:F,destinationUrl:new URL(D,h).href};try{await m.request(R(ee))}catch(A){throw t.close(),new _({code:S.FailedToConnectToLogsService(),cause:A})}return F},[]);return(0,y.useEffect)(()=>()=>{(0,X.isType)(T,"Success")&&m.request(q({appId:i,deploymentId:T.result}))},[]),T};a();var Q=f(I(),1);var P=({message:e,level:n})=>{let i="unknown";return typeof e=="object"?i=JSON.stringify(e):i=String(e),Q.default.createElement(d,{skin:n==="error"?"error":"standard"},i)};var W=({version:e,appId:n})=>{let{t:i}=N(),[g,u]=(0,o.useState)([]),m=Y({appId:n,version:e,onLog:(0,o.useCallback)(s=>{u(t=>[...t,...s])},[u])});return(0,k.match)(m,{Success:()=>o.default.createElement(l,{marginTop:1,marginBottom:1,flexDirection:"column"},o.default.createElement(l,{marginBottom:1,flexDirection:"column"},o.default.createElement(d,null,o.default.createElement(C,{i18nKey:"logs_command.listening_to_logs"})),o.default.createElement(d,null,o.default.createElement(C,{i18nKey:"logs_command.prod_env_logs",values:{version:e}}))),g.map((s,t)=>o.default.createElement(l,{key:t,flexDirection:"column"},o.default.createElement(l,{columnGap:1},o.default.createElement(l,{flexShrink:0},o.default.createElement(d,{skin:"secondary"},new Date(s.timestamp).toLocaleTimeString())),o.default.createElement(l,{columnGap:1},(0,k.match)(s,{Log:({message:p,level:T})=>p.map((c,h)=>o.default.createElement(P,{key:`${t}-${h}`,message:c,level:T})),Exception:({message:p})=>o.default.createElement(P,{key:t,message:p,level:"error"})}))),(0,k.match)(s,{Log:()=>null,Exception:({stack:p})=>o.default.createElement(d,{skin:"error"},p)})))),Loading:()=>o.default.createElement(j,{text:i("logs_command.connecting")}),Error:()=>null})};var Z=(0,v.variant)({Valid:(0,v.fields)(),Error:(0,v.fields)()}),ge=({version:e})=>e?Z.Valid({version:e}):Z.Error({message:L.default.createElement(C,{i18nKey:"logs_command.logs_without_version"})}),le=({version:e})=>{let{model:n}=U(),i=(0,L.useMemo)(()=>ge({version:e}),[e]);return(0,v.match)(i,{Valid:({version:g})=>L.default.createElement(W,{version:g,appId:n.config.appId}),Error:({message:g})=>L.default.createElement(l,{rowGap:1,marginTop:1,marginBottom:1,flexDirection:"column"},L.default.createElement(l,{gap:1},L.default.createElement(d,{skin:"error"},g)))})};export{le as LogsCommand};
|
|
4
|
+
//# sourceMappingURL=LogsCommand-W5CRI6WA.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
import{a}from"./chunk-VAOLKVA2.js";import"./chunk-TRE6G7GA.js";import"./chunk-QDPEZ5A2.js";import"./chunk-6QCQALVT.js";import"./chunk-BW3SDDV3.js";import"./chunk-QT3P4FJP.js";import"./chunk-IBNMP32R.js";import"./chunk-3Q7TAN43.js";import"./chunk-KLTGX7JQ.js";import"./chunk-4YU6J2EW.js";import"./chunk-MIBBNKYS.js";import"./chunk-R3JUFM5X.js";import"./chunk-V4TR6DCM.js";export{a as PreviewCommand};
|
|
4
|
+
//# sourceMappingURL=PreviewCommand-DWQCCBBZ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{a as D,b as L}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=ServeCommand-
|
|
3
|
+
import{a as D,b as L}from"./chunk-TRE6G7GA.js";import{b as U,c as K,d as N}from"./chunk-QDPEZ5A2.js";import"./chunk-BW3SDDV3.js";import"./chunk-QT3P4FJP.js";import{a as F,b as h}from"./chunk-PBBKM3Z3.js";import{b as j}from"./chunk-3Q7TAN43.js";import{g as b,h as k,j as f,k as V}from"./chunk-KLTGX7JQ.js";import{b as M}from"./chunk-4YU6J2EW.js";import{mb as c}from"./chunk-MIBBNKYS.js";import{A as I,B as y,D as B,N as T,O as _,R as O,V as a,W as A,a as d,b as R,w as i,z as E}from"./chunk-R3JUFM5X.js";import{e as s,h as o}from"./chunk-V4TR6DCM.js";o();o();var S=s(d(),1);o();var n=s(d(),1),q=s(R(),1);o();var m=s(d(),1);import{preview as ee}from"vite";function W(){let t=(0,m.useRef)(),{model:r}=c();return(0,m.useEffect)(()=>()=>{t.current?.httpServer.close()},[]),(0,m.useCallback)(async()=>{let v=await ee(await h(r,{type:"build"}));return t.current=v,F(v)},[r])}var z=(0,n.createContext)(null),g=({children:t})=>{let{model:r}=c(),{t:v}=A(),{site:H}=f(),J=b(),{createOverride:Q}=K(),X=W(),{status:Y}=O(async()=>{await D(r.projectFolder);let p=await X(),x=await j(r.projectFolder),P=M(x,p),Z=await J.createAppRelease(P,r.config.projectId),C=N(r),{id:$}=C?await Q({appId:r.config.appId,siteId:H.id,overrides:C}):await Promise.resolve({id:void 0});return{armTag:Z,serverUrl:p,siteOverrideId:$}},[]);return(0,q.match)(Y,{Error:()=>null,Loading:()=>n.default.createElement(_,{text:v("serve_command.starting_serve_environment")}),Success:({result:{armTag:p,serverUrl:x,siteOverrideId:P}})=>n.default.createElement(z.Provider,{value:{serverUrl:x}},n.default.createElement(V,{siteOverrideId:P},n.default.createElement(k,{armTag:p},t)))})};function w(){let t=(0,n.useContext)(z);if(t===null)throw new Error("useServeEnvironment() cannot be used without an <ServeEnvironmentProvider>");return t}o();var e=s(d(),1);function G(){let{site:t}=f(),{serverUrl:r}=w();return e.default.createElement(i,{flexDirection:"column"},e.default.createElement(i,{gap:1},e.default.createElement(E,{skin:"success"},e.default.createElement(B,null)),e.default.createElement(a,{i18nKey:"serve_command.starting_serve_environment_success",components:[e.default.createElement(T,{url:r})]})),e.default.createElement(i,{gap:1},e.default.createElement(I,null),e.default.createElement(a,{i18nKey:"serve_command.production_build"})),e.default.createElement(i,{gap:1,paddingTop:1,paddingBottom:1},e.default.createElement(y,null),e.default.createElement(a,{i18nKey:"general.dev_site.current",values:{name:t.displayName}})),e.default.createElement(i,{paddingBottom:1,flexDirection:"column"},e.default.createElement(L,null)))}var re=()=>S.default.createElement(U,null,S.default.createElement(g,null,S.default.createElement(G,null)));export{re as ServeCommand,g as ServeEnvironmentProvider,w as useServeEnvironment};
|
|
4
|
+
//# sourceMappingURL=ServeCommand-T5PQKB57.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{a as s,c as u,d as f}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=build-
|
|
3
|
+
import{a as s,c as u,d as f}from"./chunk-35BUZ7CK.js";import{b as m,c as d}from"./chunk-PBBKM3Z3.js";import{a as l}from"./chunk-3Q7TAN43.js";import"./chunk-4YU6J2EW.js";import{Ya as c,kb as a,va as i}from"./chunk-MIBBNKYS.js";import{b as E,d as t,e as n}from"./chunk-R3JUFM5X.js";import{e as g,h as p}from"./chunk-V4TR6DCM.js";p();import{cwd as b}from"node:process";import{build as w}from"vite";var r=g(E(),1);async function M(){let o=await a(b());if(o.components.length===0)throw new t({code:n.NoExtensionsFound()});s(o.components);let C=o.components.filter(e=>(0,r.isType)(e,i.Api)||(0,r.isType)(e,i.Event)||(0,r.isType)(e,i.ServicePlugin)).length>0?await w(await d(o,{type:"build"},{appSecret:"__APP_SECRET__",webhooksPublicKey:"__WEBHOOKS_PUBLIC_KEY__"})).catch(e=>{throw new t({code:n.FailedToBuildApp({cause:e}),cause:e})}):void 0,_=await w(await m(o,{type:"build"},{baseBackendUrl:c})).catch(e=>{throw new t({code:n.FailedToBuildApp({cause:e}),cause:e})}),B=await u({appId:o.config.appId,components:o.components,sentryDSN:o.config.sentryDSN,componentSourceBuilder:f(o,{clientBuildOutput:_},{backendBuildOutput:C})});await l({projectFolder:o.projectFolder,manifest:B})}export{M as build};
|
|
4
|
+
//# sourceMappingURL=build-CNTVWU2X.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{F as A,J as l,K as M,L as N,P as S,Q as x,R as O,S as U,bb as V,db as W,ia as k,oa as fe,pa as Ee,qa as R,ra as Ce,ua as L,va as P,wa as v,xa as F,za as q}from"./chunk-HMROXS2Y.js";import{b,d as f,e as E}from"./chunk-CXOD6WQ4.js";import{c as g,e as D,h as u}from"./chunk-V4TR6DCM.js";var H=g((lt,G)=>{"use strict";u();function Se(e,r,n,i){for(var d=e.length,o=n+(i?1:-1);i?o--:++o<d;)if(r(e[o],o,e))return o;return-1}G.exports=Se});var Y=g((mt,K)=>{"use strict";u();function ve(e){return e!==e}K.exports=ve});var X=g((ft,$)=>{"use strict";u();function ye(e,r,n){for(var i=n-1,d=e.length;++i<d;)if(e[i]===r)return i;return-1}$.exports=ye});var Z=g((Ct,z)=>{"use strict";u();var De=H(),Pe=Y(),be=X();function Ie(e,r,n){return r===r?be(e,r,n):De(e,Pe,n)}z.exports=Ie});var Q=g((St,J)=>{"use strict";u();var Te=Z();function _e(e,r){var n=e==null?0:e.length;return!!n&&Te(e,r,0)>-1}J.exports=_e});var te=g((yt,ee)=>{"use strict";u();function we(e,r,n){for(var i=-1,d=e==null?0:e.length;++i<d;)if(n(r,e[i]))return!0;return!1}ee.exports=we});var ie=g((Pt,re)=>{"use strict";u();function Be(){}re.exports=Be});var oe=g((It,ne)=>{"use strict";u();var I=Ce(),Ae=ie(),Me=R(),Ne=1/0,xe=I&&1/Me(new I([,-0]))[1]==Ne?function(e){return new I(e)}:Ae;ne.exports=xe});var se=g((_t,ae)=>{"use strict";u();var Oe=fe(),Ue=Q(),ke=te(),Re=Ee(),Le=oe(),Fe=R(),qe=200;function Ve(e,r,n){var i=-1,d=Ue,o=e.length,t=!0,c=[],s=c;if(n)t=!1,d=ke;else if(o>=qe){var a=r?null:Le(e);if(a)return Fe(a);t=!1,d=Re,s=new Oe}else s=r?[]:c;e:for(;++i<o;){var C=e[i],h=r?r(C):C;if(C=n||C!==0?C:0,t&&h===h){for(var B=s.length;B--;)if(s[B]===h)continue e;r&&s.push(h),c.push(C)}else d(s,h,n)||(s!==c&&s.push(h),c.push(C))}return c}ae.exports=Ve});var ue=g((Bt,de)=>{"use strict";u();var We=se();function je(e,r){return r=typeof r=="function"?r:void 0,e&&e.length?We(e,void 0,r):[]}de.exports=je});u();var y=D(b(),1);import{randomUUID as he}from"node:crypto";var j=e=>{let r=new Map;[...e.filter(o=>!(0,y.isType)(o,P.Api)&&!(0,y.isType)(o,P.Event)&&!(0,y.isType)(o,P.ServicePlugin))].sort((o,t)=>o.id.localeCompare(t.id)).forEach(o=>{let t=r.get(o.id)??[];t.push(o),r.set(o.id,t)});let d=new Map;if(r.forEach((o,t)=>{o.length>1&&d.set(t,o)}),d.size)throw new f({code:E.DuplicateComponentIdsError({issues:Array.from(d.entries()).map(([o,t])=>({id:o,components:t.map(c=>(0,y.match)(c,{DashboardPage:({title:s,relativePath:a})=>({name:s,type:"page",path:v(a,"json")}),DashboardPlugin:({title:s,relativePath:a})=>({name:s,type:"plugin",path:v(a,"json")}),DashboardMenuPlugin:({title:s,relativePath:a})=>({name:s,type:"menu-plugin",path:a}),DashboardModal:({title:s,relativePath:a})=>({name:s,type:"modal",path:v(a,"json")}),DashboardSidebarCategory:({label:s})=>({name:s,type:"sidebar-category",path:A}),EmbeddedScript:({relativePath:s})=>({name:s,type:"embedded-script",path:v(s,"json")}),CustomElement:({name:s,relativePath:a})=>({name:s,type:"custom-element",path:v(a,"json")}),Topology:({name:s})=>({name:s,type:"topology",path:""})})).sort((c,s)=>c.name.localeCompare(s.name)),suggestedId:he()}))})})};u();var T=D(b(),1),ce=D(ue(),1);import{randomUUID as Ge}from"node:crypto";function He(e){return e!=null&&e!==!1}var Ke=(e,r)=>{if(e.experiments)return{appId:r,componentId:e.id,spec:e.experiments.enabledBy,variantValue:"true"}},Ye=e=>({compId:e.id,compType:l.CUSTOM_ELEMENT_WIDGET,compName:e.name,compData:{customElementWidget:{base:{name:e.name},widgetData:{tagName:e.tagName,scriptType:O.ES_MODULE,scriptUrl:""},size:{width:{defaultWidth:e.width.defaultWidth,allowStretch:e.width.allowStretch,stretchByDefault:e.width.stretchByDefault},height:{defaultHeight:e.height.defaultHeight,heightMode:U.FIXED}},installation:{base:{autoAdd:e.installation?.autoAddToSite,essential:e.installation?.essential,maxInstances:e.installation?.essential?1:0},widget:{region:M.BODY}},behaviors:{},dependencies:e.dependencies}}});async function Ut({appId:e,components:r,sentryDSN:n,componentSourceBuilder:i}){j(r);let d=(await Promise.all(r.map((0,T.match)({DashboardPage:async t=>{let c=t.sentryDSN??n;return{compId:t.id,compType:l.BACK_OFFICE_PAGE,compData:{backOfficePage:{hostingPlatform:S.BUSINESS_MANAGER,fullPage:t.sidebar?.whenActive?.hideSidebar,hideInSidebar:t.sidebar?.disabled,priority:t.sidebar?.priority,routePath:t.route.slice(1),title:t.title,pageCategoryId:t.sidebar?.categoryId,activeSidebarPageId:t.sidebar?.whenActive?.selectedPageId,requiredPermission:t.requiredPermission,previousRoutePaths:t.additionalRoutes,...c?{errorReporting:{url:c}}:void 0,...await i(t)}},compName:t.title,experiment:Ke(t,e)}},DashboardPlugin:async t=>({compId:t.id,compType:l.BACK_OFFICE_EXTENSION_WIDGET,compData:{backOfficeExtensionWidget:{hostingPlatform:S.BUSINESS_MANAGER,extends:t.extends,title:t.title,requiredPermission:t.requiredPermission,width:t.width,height:t.height,...await i(t),...t.sentryDSN?{errorReporting:{url:t.sentryDSN}}:void 0}},compName:t.title}),DashboardMenuPlugin:async t=>({compId:t.id,compType:l.BACK_OFFICE_EXTENSION_MENU_ITEM,compData:{backOfficeExtensionMenuItem:{hostingPlatform:S.BUSINESS_MANAGER,id:t.id,title:t.title,subtitle:t.subtitle,iconKey:t.iconKey,extends:t.extends,action:t.action,requiredPermission:t.requiredPermission,...t.sentryDSN?{errorReporting:{url:t.sentryDSN}}:void 0}},compName:t.title}),DashboardModal:async t=>({compId:t.id,compType:l.BACK_OFFICE_MODAL,compData:{backOfficeModal:{hostingPlatform:S.BUSINESS_MANAGER,title:t.title,requiredPermission:t.requiredPermission,width:t.width,height:t.height,...await i(t),...t.sentryDSN?{errorReporting:{url:t.sentryDSN}}:void 0}},compName:t.title}),DashboardSidebarCategory:async t=>({compId:t.id,compType:l.BACK_OFFICE_SIDEBAR_CATEGORY,compData:{backOfficeSidebarCategory:{hostingPlatform:S.BUSINESS_MANAGER,title:t.label,priority:t.priority}},compName:t.label}),EmbeddedScript:async t=>({compId:t.id,compType:l.EMBEDDED_SCRIPT,compName:t.name,compData:{embeddedScriptComponentData:{name:t.name,pages:N.NONE_PAGES,placement:t.placement,connectArticleUrl:"",embedCategory:t.scriptType,dependencies:t.dependencies,loadOnce:!0,allowedForFreeSite:!0,...await i(t)}}}),CustomElement:async t=>{let{scriptUrl:c,settingsUrl:s}=await i(t),a=Ye(t);return{...a,compData:{customElementWidget:{...a.compData.customElementWidget,widgetData:{...a.compData.customElementWidget.widgetData,scriptUrl:c},behaviors:{...a.compData.customElementWidget.behaviors,...t.relativePanelPath?{settings:{settingsUrl:s}}:{}}}}}},Topology:async t=>({compId:t.id,compType:l.TOPOLOGY,compName:t.name,compData:{topology:{topology:{backendApiUrl:t.backendApiUrl}}}}),Api:()=>null,Event:async t=>(await i(t)).map(({webhookSlug:s})=>({compName:s,compId:Ge(),compType:l.WEBHOOK,compData:{webhook:{callbackUrl:"__WEBHOOKS_URL_PLACEHOLDER__",webhookSlug:s}}})),ServicePlugin:async t=>{let c=(0,T.match)(t.servicePlugin,{EcomShippingRates:a=>({compName:a.name,compId:a.id,compType:l.ECOM_SHIPPING_RATES,compData:{ecomShippingRates:{name:a.name,deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__",description:a.description,learnMoreUrl:a.learnMoreUrl,dashboardUrl:a.dashboardUrl,fallbackDefinitionMandatory:a.fallbackDefinitionMandatory,thumbnailUrl:a.thumbnailUrl}}}),EcomAdditionalFees:a=>({compName:a.name,compId:a.id,compType:l.ECOM_ADDITIONAL_FEES,compData:{ecomAdditionalFees:{deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__"}}}),EcomDiscountsTrigger:a=>({compName:a.name,compId:a.id,compType:l.ECOM_DISCOUNTS_TRIGGER,compData:{ecomDiscountsTrigger:{deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__"}}}),EcomValidations:a=>({compName:a.name,compId:a.id,compType:l.ECOM_VALIDATIONS,compData:{ecomValidations:{deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__",validateInCart:a.validateInCart}}}),EcomPaymentSettings:a=>({compName:a.name,compId:a.id,compType:l.ECOM_PAYMENT_SETTINGS,compData:{ecomPaymentSettings:{deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__",fallbackValueForRequires3dSecure:a.fallbackValueForRequires3dSecure}}})}),{servicePluginType:s}=await i(t);if(c.compType!==s)throw new f({code:E.InvalidServicePluginImplementation({configuredImplementation:c.compType})});return c}})))).filter(He).flat(),o=(0,ce.default)(d,(t,c)=>t.compType===l.WEBHOOK&&c.compType===l.WEBHOOK&&t.compData.webhook.webhookSlug===c.compData.webhook.webhookSlug);return{appId:e,components:o}}u();var me=D(b(),1);import{join as $e}from"node:path";u();function le(e){if(!("output"in e||Array.isArray(e)))throw new f({code:E.InvalidViteBuildOutput()});return Array.isArray(e)?e.flatMap(i=>i.output):e.output}function _(e,r){let i=le(e).find(d=>d.type==="chunk"&&d.facadeModuleId===r);if(!i)throw new f({code:E.ViteModuleBundleNotFound()});return i.fileName}function pe(e,r){let i=le(e).find(d=>d.fileName===r);if(!i||!("source"in i))throw new f({code:E.ViteFileNotFoundInOutput({fileName:r})});return i.source.toString()}async function Xe(e,r){let n=new URL(e.relativePath,r).href;return await fetch(n).then(d=>d.text())}async function ze(e,r){let n=new URL("__get-registered-events",r).href,i=await fetch(n);return i.ok?(await i.json())[`/${e.relativePath}`]??[]:[]}async function ge(e){let r=k(e.projectFolder);return import($e(r,"getRegisteredExtensions.mjs"))}async function Ze(e,r){let{getRegisteredEvents:n}=await ge(r);return(await n())[`/${e.relativePath}`]}async function Je(e,r){let n=new URL("__get-registered-service-plugins",r).href,i=await fetch(n);return i.ok?(await i.json())[`/${e.relativePath}`]:null}async function Qe(e,r){let{getRegisteredServicePlugins:n}=await ge(r);return(await n())[`/${e.relativePath}`]}var w=(e,r,n)=>{if(!r.config.trusted)return{iframeUrl:F(e.id)};let i=q(e.id),d=n.clientBuildOutput?_(n.clientBuildOutput,i):`/@id/${i}?import`;return{scriptAsset:{exportedName:e.id,containerId:r.config.appId,url:d,scriptType:x.MODULE}}},et=async(e,{clientBuildOutput:r,clientDevServerUrl:n})=>({template:r?pe(r,e.relativePath):await Xe(e,n)}),tt=async(e,r,n)=>{let i=n.backendDevServerUrl?await ze(e,n.backendDevServerUrl):await Ze(e,r);return(i?await Promise.all(i.map(L)):[]).map(o=>({webhookSlug:o}))},rt=async(e,r,n)=>{let i=n.backendDevServerUrl?await Je(e,n.backendDevServerUrl):await Qe(e,r);if(!i)throw new Error("could not find service plugin definition");return{servicePluginType:i}},it=(e,r)=>{let n=W(e.id);return{scriptUrl:r.clientBuildOutput?_(r.clientBuildOutput,n):`/@id/${n}?import`,settingsUrl:V(e.id)}};function $t(e,r,n){return async i=>(0,me.match)(i,{EmbeddedScript:o=>et(o,r),DashboardSidebarCategory:()=>{},CustomElement:o=>it(o,r),DashboardPage:o=>w(o,e,r),DashboardPlugin:o=>w(o,e,r),DashboardModal:o=>w(o,e,r),DashboardMenuPlugin:()=>{},Topology:()=>{},Api:()=>{},Event:o=>tt(o,e,n),ServicePlugin:o=>rt(o,e,n)})}export{j as a,Ye as b,Ut as c,$t as d};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{F as A,J as l,K as M,L as N,P as S,Q as x,R as U,S as O,bb as V,db as W,ia as k,oa as fe,pa as Ee,qa as R,ra as Ce,ua as L,va as P,wa as v,xa as F,za as q}from"./chunk-MIBBNKYS.js";import{b,d as f,e as E}from"./chunk-R3JUFM5X.js";import{c as g,e as D,h as c}from"./chunk-V4TR6DCM.js";var H=g((pt,G)=>{"use strict";c();function Se(e,r,n,i){for(var d=e.length,o=n+(i?1:-1);i?o--:++o<d;)if(r(e[o],o,e))return o;return-1}G.exports=Se});var Y=g((gt,K)=>{"use strict";c();function ve(e){return e!==e}K.exports=ve});var X=g((Et,$)=>{"use strict";c();function ye(e,r,n){for(var i=n-1,d=e.length;++i<d;)if(e[i]===r)return i;return-1}$.exports=ye});var Z=g((ht,z)=>{"use strict";c();var De=H(),Pe=Y(),be=X();function Ie(e,r,n){return r===r?be(e,r,n):De(e,Pe,n)}z.exports=Ie});var Q=g((vt,J)=>{"use strict";c();var Te=Z();function _e(e,r){var n=e==null?0:e.length;return!!n&&Te(e,r,0)>-1}J.exports=_e});var te=g((Dt,ee)=>{"use strict";c();function we(e,r,n){for(var i=-1,d=e==null?0:e.length;++i<d;)if(n(r,e[i]))return!0;return!1}ee.exports=we});var ie=g((bt,re)=>{"use strict";c();function Be(){}re.exports=Be});var oe=g((Tt,ne)=>{"use strict";c();var I=Ce(),Ae=ie(),Me=R(),Ne=1/0,xe=I&&1/Me(new I([,-0]))[1]==Ne?function(e){return new I(e)}:Ae;ne.exports=xe});var se=g((wt,ae)=>{"use strict";c();var Ue=fe(),Oe=Q(),ke=te(),Re=Ee(),Le=oe(),Fe=R(),qe=200;function Ve(e,r,n){var i=-1,d=Oe,o=e.length,t=!0,u=[],s=u;if(n)t=!1,d=ke;else if(o>=qe){var a=r?null:Le(e);if(a)return Fe(a);t=!1,d=Re,s=new Ue}else s=r?[]:u;e:for(;++i<o;){var C=e[i],h=r?r(C):C;if(C=n||C!==0?C:0,t&&h===h){for(var B=s.length;B--;)if(s[B]===h)continue e;r&&s.push(h),u.push(C)}else d(s,h,n)||(s!==u&&s.push(h),u.push(C))}return u}ae.exports=Ve});var ce=g((At,de)=>{"use strict";c();var We=se();function je(e,r){return r=typeof r=="function"?r:void 0,e&&e.length?We(e,void 0,r):[]}de.exports=je});c();var y=D(b(),1);import{randomUUID as he}from"node:crypto";var j=e=>{let r=new Map;[...e.filter(o=>!(0,y.isType)(o,P.Api)&&!(0,y.isType)(o,P.Event)&&!(0,y.isType)(o,P.ServicePlugin))].sort((o,t)=>o.id.localeCompare(t.id)).forEach(o=>{let t=r.get(o.id)??[];t.push(o),r.set(o.id,t)});let d=new Map;if(r.forEach((o,t)=>{o.length>1&&d.set(t,o)}),d.size)throw new f({code:E.DuplicateComponentIdsError({issues:Array.from(d.entries()).map(([o,t])=>({id:o,components:t.map(u=>(0,y.match)(u,{DashboardPage:({title:s,relativePath:a})=>({name:s,type:"page",path:v(a,"json")}),DashboardPlugin:({title:s,relativePath:a})=>({name:s,type:"plugin",path:v(a,"json")}),DashboardMenuPlugin:({title:s,relativePath:a})=>({name:s,type:"menu-plugin",path:a}),DashboardModal:({title:s,relativePath:a})=>({name:s,type:"modal",path:v(a,"json")}),DashboardSidebarCategory:({label:s})=>({name:s,type:"sidebar-category",path:A}),EmbeddedScript:({relativePath:s})=>({name:s,type:"embedded-script",path:v(s,"json")}),CustomElement:({name:s,relativePath:a})=>({name:s,type:"custom-element",path:v(a,"json")}),Topology:({name:s})=>({name:s,type:"topology",path:""})})).sort((u,s)=>u.name.localeCompare(s.name)),suggestedId:he()}))})})};c();var T=D(b(),1),ue=D(ce(),1);import{randomUUID as Ge}from"node:crypto";function He(e){return e!=null&&e!==!1}var Ke=(e,r)=>{if(e.experiments)return{appId:r,componentId:e.id,spec:e.experiments.enabledBy,variantValue:"true"}},Ye=e=>({compId:e.id,compType:l.CUSTOM_ELEMENT_WIDGET,compName:e.name,compData:{customElementWidget:{base:{name:e.name},widgetData:{tagName:e.tagName,scriptType:U.ES_MODULE,scriptUrl:""},size:{width:{defaultWidth:e.width.defaultWidth,allowStretch:e.width.allowStretch,stretchByDefault:e.width.stretchByDefault},height:{defaultHeight:e.height.defaultHeight,heightMode:O.FIXED}},installation:{base:{autoAdd:e.installation?.autoAddToSite,essential:e.installation?.essential,maxInstances:e.installation?.essential?1:0},widget:{region:M.BODY}},behaviors:{},dependencies:e.dependencies}}});async function kt({appId:e,components:r,sentryDSN:n,componentSourceBuilder:i}){j(r);let d=(await Promise.all(r.map((0,T.match)({DashboardPage:async t=>{let u=t.sentryDSN??n;return{compId:t.id,compType:l.BACK_OFFICE_PAGE,compData:{backOfficePage:{hostingPlatform:S.BUSINESS_MANAGER,fullPage:t.sidebar?.whenActive?.hideSidebar,hideInSidebar:t.sidebar?.disabled,priority:t.sidebar?.priority,routePath:t.route.slice(1),title:t.title,pageCategoryId:t.sidebar?.categoryId,activeSidebarPageId:t.sidebar?.whenActive?.selectedPageId,requiredPermission:t.requiredPermission,previousRoutePaths:t.additionalRoutes,...u?{errorReporting:{url:u}}:void 0,...await i(t)}},compName:t.title,experiment:Ke(t,e)}},DashboardPlugin:async t=>({compId:t.id,compType:l.BACK_OFFICE_EXTENSION_WIDGET,compData:{backOfficeExtensionWidget:{hostingPlatform:S.BUSINESS_MANAGER,extends:t.extends,title:t.title,requiredPermission:t.requiredPermission,width:t.width,height:t.height,...await i(t),...t.sentryDSN?{errorReporting:{url:t.sentryDSN}}:void 0}},compName:t.title}),DashboardMenuPlugin:async t=>({compId:t.id,compType:l.BACK_OFFICE_EXTENSION_MENU_ITEM,compData:{backOfficeExtensionMenuItem:{hostingPlatform:S.BUSINESS_MANAGER,id:t.id,title:t.title,subtitle:t.subtitle,iconKey:t.iconKey,extends:t.extends,action:t.action,requiredPermission:t.requiredPermission,...t.sentryDSN?{errorReporting:{url:t.sentryDSN}}:void 0}},compName:t.title}),DashboardModal:async t=>({compId:t.id,compType:l.BACK_OFFICE_MODAL,compData:{backOfficeModal:{hostingPlatform:S.BUSINESS_MANAGER,title:t.title,requiredPermission:t.requiredPermission,width:t.width,height:t.height,...await i(t),...t.sentryDSN?{errorReporting:{url:t.sentryDSN}}:void 0}},compName:t.title}),DashboardSidebarCategory:async t=>({compId:t.id,compType:l.BACK_OFFICE_SIDEBAR_CATEGORY,compData:{backOfficeSidebarCategory:{hostingPlatform:S.BUSINESS_MANAGER,title:t.label,priority:t.priority}},compName:t.label}),EmbeddedScript:async t=>({compId:t.id,compType:l.EMBEDDED_SCRIPT,compName:t.name,compData:{embeddedScriptComponentData:{name:t.name,pages:N.NONE_PAGES,placement:t.placement,connectArticleUrl:"",embedCategory:t.scriptType,dependencies:t.dependencies,loadOnce:!0,allowedForFreeSite:!0,...await i(t)}}}),CustomElement:async t=>{let{scriptUrl:u,settingsUrl:s}=await i(t),a=Ye(t);return{...a,compData:{customElementWidget:{...a.compData.customElementWidget,widgetData:{...a.compData.customElementWidget.widgetData,scriptUrl:u},behaviors:{...a.compData.customElementWidget.behaviors,...t.relativePanelPath?{settings:{settingsUrl:s}}:{}}}}}},Topology:async t=>({compId:t.id,compType:l.TOPOLOGY,compName:t.name,compData:{topology:{topology:{backendApiUrl:t.backendApiUrl}}}}),Api:()=>null,Event:async t=>(await i(t)).map(({webhookSlug:s})=>({compName:s,compId:Ge(),compType:l.WEBHOOK,compData:{webhook:{callbackUrl:"__WEBHOOKS_URL_PLACEHOLDER__",webhookSlug:s}}})),ServicePlugin:async t=>{let u=(0,T.match)(t.servicePlugin,{EcomShippingRates:a=>({compName:a.name,compId:a.id,compType:l.ECOM_SHIPPING_RATES,compData:{ecomShippingRates:{name:a.name,deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__",description:a.description,learnMoreUrl:a.learnMoreUrl,dashboardUrl:a.dashboardUrl,fallbackDefinitionMandatory:a.fallbackDefinitionMandatory,thumbnailUrl:a.thumbnailUrl}}}),EcomAdditionalFees:a=>({compName:a.name,compId:a.id,compType:l.ECOM_ADDITIONAL_FEES,compData:{ecomAdditionalFees:{deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__"}}}),EcomDiscountsTrigger:a=>({compName:a.name,compId:a.id,compType:l.ECOM_DISCOUNTS_TRIGGER,compData:{ecomDiscountsTrigger:{deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__"}}}),EcomValidations:a=>({compName:a.name,compId:a.id,compType:l.ECOM_VALIDATIONS,compData:{ecomValidations:{deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__",validateInCart:a.validateInCart}}}),EcomPaymentSettings:a=>({compName:a.name,compId:a.id,compType:l.ECOM_PAYMENT_SETTINGS,compData:{ecomPaymentSettings:{deploymentUri:"__SERVICE_PLUGIN_URL_PLACEHOLDER__",fallbackValueForRequires3dSecure:a.fallbackValueForRequires3dSecure}}})}),{servicePluginType:s}=await i(t);if(u.compType!==s)throw new f({code:E.InvalidServicePluginImplementation({configuredImplementation:u.compType})});return u}})))).filter(He).flat(),o=(0,ue.default)(d,(t,u)=>t.compType===l.WEBHOOK&&u.compType===l.WEBHOOK&&t.compData.webhook.webhookSlug===u.compData.webhook.webhookSlug);return{appId:e,components:o}}c();var me=D(b(),1);import{join as $e}from"node:path";import{pathToFileURL as Xe}from"node:url";c();function le(e){if(!("output"in e||Array.isArray(e)))throw new f({code:E.InvalidViteBuildOutput()});return Array.isArray(e)?e.flatMap(i=>i.output):e.output}function _(e,r){let i=le(e).find(d=>d.type==="chunk"&&d.facadeModuleId===r);if(!i)throw new f({code:E.ViteModuleBundleNotFound()});return i.fileName}function pe(e,r){let i=le(e).find(d=>d.fileName===r);if(!i||!("source"in i))throw new f({code:E.ViteFileNotFoundInOutput({fileName:r})});return i.source.toString()}async function ze(e,r){let n=new URL(e.relativePath,r).href;return await fetch(n).then(d=>d.text())}async function Ze(e,r){let n=new URL("__get-registered-events",r).href,i=await fetch(n);return i.ok?(await i.json())[`/${e.relativePath}`]??[]:[]}async function ge(e){let r=k(e.projectFolder),n=$e(r,"getRegisteredExtensions.mjs");return import(Xe(n).href)}async function Je(e,r){let{getRegisteredEvents:n}=await ge(r);return(await n())[`/${e.relativePath}`]}async function Qe(e,r){let n=new URL("__get-registered-service-plugins",r).href,i=await fetch(n);return i.ok?(await i.json())[`/${e.relativePath}`]:null}async function et(e,r){let{getRegisteredServicePlugins:n}=await ge(r);return(await n())[`/${e.relativePath}`]}var w=(e,r,n)=>{if(!r.config.trusted)return{iframeUrl:F(e.id)};let i=q(e.id),d=n.clientBuildOutput?_(n.clientBuildOutput,i):`/@id/${i}?import`;return{scriptAsset:{exportedName:e.id,containerId:r.config.appId,url:d,scriptType:x.MODULE}}},tt=async(e,{clientBuildOutput:r,clientDevServerUrl:n})=>({template:r?pe(r,e.relativePath):await ze(e,n)}),rt=async(e,r,n)=>{let i=n.backendDevServerUrl?await Ze(e,n.backendDevServerUrl):await Je(e,r);return(i?await Promise.all(i.map(L)):[]).map(o=>({webhookSlug:o}))},it=async(e,r,n)=>{let i=n.backendDevServerUrl?await Qe(e,n.backendDevServerUrl):await et(e,r);if(!i)throw new Error("could not find service plugin definition");return{servicePluginType:i}},nt=(e,r)=>{let n=W(e.id);return{scriptUrl:r.clientBuildOutput?_(r.clientBuildOutput,n):`/@id/${n}?import`,settingsUrl:V(e.id)}};function zt(e,r,n){return async i=>(0,me.match)(i,{EmbeddedScript:o=>tt(o,r),DashboardSidebarCategory:()=>{},CustomElement:o=>nt(o,r),DashboardPage:o=>w(o,e,r),DashboardPlugin:o=>w(o,e,r),DashboardModal:o=>w(o,e,r),DashboardMenuPlugin:()=>{},Topology:()=>{},Api:()=>{},Event:o=>rt(o,e,n),ServicePlugin:o=>it(o,e,n)})}export{j as a,Ye as b,kt as c,zt as d};
|
|
4
|
+
//# sourceMappingURL=chunk-35BUZ7CK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/lodash/_baseFindIndex.js","../../../node_modules/lodash/_baseIsNaN.js","../../../node_modules/lodash/_strictIndexOf.js","../../../node_modules/lodash/_baseIndexOf.js","../../../node_modules/lodash/_arrayIncludes.js","../../../node_modules/lodash/_arrayIncludesWith.js","../../../node_modules/lodash/noop.js","../../../node_modules/lodash/_createSet.js","../../../node_modules/lodash/_baseUniq.js","../../../node_modules/lodash/uniqWith.js","../src/app-manifest/validate.ts","../src/app-manifest/create.ts","../src/app-manifest/component-source.ts","../src/app-manifest/build-output-data-extractor.ts"],"sourcesContent":["/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var baseUniq = require('./_baseUniq');\n\n/**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\nfunction uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n}\n\nmodule.exports = uniqWith;\n","import { randomUUID } from 'node:crypto';\nimport { isType, match } from 'variant';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport { CONFIG_FILENAME } from '@wix/cli-core-definitions';\nimport { replaceExtension } from '../dev-center/components/path.js';\nimport type { BackendComponent } from '../dev-center/components/dev-center-component.js';\nimport { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\n\ntype NonBackendComponent = Exclude<DevCenterComponent, BackendComponent>;\n\nexport const validateComponents = (components: DevCenterComponent[]) => {\n const devCenterComponentsToIdMap = new Map<string, NonBackendComponent[]>();\n\n const componentsWithConfig = components.filter(\n (component): component is NonBackendComponent =>\n !isType(component, DevCenterComponent.Api) &&\n !isType(component, DevCenterComponent.Event) &&\n !isType(component, DevCenterComponent.ServicePlugin)\n );\n\n const sortedComponentsById = [...componentsWithConfig].sort((a, b) =>\n a.id.localeCompare(b.id)\n );\n sortedComponentsById.forEach((component) => {\n const componentList = devCenterComponentsToIdMap.get(component.id) ?? [];\n componentList.push(component);\n devCenterComponentsToIdMap.set(component.id, componentList);\n });\n\n const devCenterComponentsWithSameIDMap = new Map<\n string,\n NonBackendComponent[]\n >();\n\n devCenterComponentsToIdMap.forEach((devCenterComponents, key) => {\n if (devCenterComponents.length > 1) {\n devCenterComponentsWithSameIDMap.set(key, devCenterComponents);\n }\n });\n\n if (devCenterComponentsWithSameIDMap.size) {\n throw new CliError({\n code: CliErrorCode.DuplicateComponentIdsError({\n issues: Array.from(devCenterComponentsWithSameIDMap.entries()).map(\n ([id, devCenterComponents]) => {\n return {\n id,\n components: devCenterComponents\n .map((component) =>\n match(component, {\n DashboardPage: ({ title, relativePath }) => ({\n name: title,\n type: 'page' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n DashboardPlugin: ({ title, relativePath }) => ({\n name: title,\n type: 'plugin' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n DashboardMenuPlugin: ({ title, relativePath }) => ({\n name: title,\n type: 'menu-plugin' as const,\n // We can use the relative path since the path already points to the menu config json\n path: relativePath,\n }),\n DashboardModal: ({ title, relativePath }) => ({\n name: title,\n type: 'modal' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n DashboardSidebarCategory: ({ label }) => ({\n name: label,\n type: 'sidebar-category' as const,\n path: CONFIG_FILENAME,\n }),\n EmbeddedScript: ({ relativePath }) => ({\n name: relativePath,\n type: 'embedded-script' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n CustomElement: ({ name, relativePath }) => ({\n name,\n type: 'custom-element' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n Topology: ({ name }) => ({\n name,\n type: 'topology' as const,\n // Topology component doesn't have a config file\n path: '',\n }),\n })\n )\n .sort((a, b) => a.name.localeCompare(b.name)),\n suggestedId: randomUUID(),\n };\n }\n ),\n }),\n });\n }\n};\n","import {\n ComponentType,\n BackOfficeHostingPlatforms,\n EmbeddedScriptPages,\n HeightMode,\n RegionType,\n CustomElementScriptType,\n} from '@wix/ambassador-devcenter-components-v1-component/types';\nimport { match } from 'variant';\nimport { randomUUID } from 'node:crypto';\nimport uniqWith from 'lodash/uniqWith.js';\nimport type {\n AppManifest,\n ComponentExperiment,\n BackofficePage,\n BackofficeExtensionWidget,\n BackofficeExtensionMenuItem,\n BackofficeSideCategory,\n BackofficeModal,\n EmbeddedScript,\n CustomElement,\n Webhook,\n ServicePlugin,\n Topology,\n EcomShippingRates,\n EcomAdditionalFees,\n EcomDiscountsTrigger,\n EcomValidations,\n EcomPaymentSettings,\n} from '@wix/cli-app-manifest';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport { validateComponents } from './validate.js';\nimport type { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\nimport type { ComponentSourceBuilder } from './component-source.js';\n\ninterface CreateAppManifestParams {\n appId: string;\n backendServerUrl?: string;\n components: DevCenterComponent[];\n sentryDSN?: string;\n componentSourceBuilder: ComponentSourceBuilder;\n}\n\nfunction isTruthy<T>(x: T | undefined | null | false): x is T {\n return x !== undefined && x !== null && x !== false;\n}\n\nconst getExperiment = (\n component: DevCenterComponent<'DashboardPage'>,\n appId: string\n): ComponentExperiment => {\n if (component.experiments) {\n return {\n appId,\n componentId: component.id,\n spec: component.experiments.enabledBy,\n variantValue: 'true',\n };\n }\n return undefined;\n};\n\nexport const createCustomElementConfig = (\n component: DevCenterComponent<'CustomElement'>\n): CustomElement => {\n return {\n compId: component.id,\n compType: ComponentType.CUSTOM_ELEMENT_WIDGET as const,\n compName: component.name,\n compData: {\n customElementWidget: {\n base: {\n name: component.name,\n },\n widgetData: {\n tagName: component.tagName,\n scriptType: CustomElementScriptType.ES_MODULE,\n scriptUrl: '',\n },\n size: {\n width: {\n defaultWidth: component.width.defaultWidth,\n allowStretch: component.width.allowStretch,\n stretchByDefault: component.width.stretchByDefault,\n },\n height: {\n defaultHeight: component.height.defaultHeight,\n heightMode: HeightMode.FIXED,\n },\n },\n installation: {\n base: {\n autoAdd: component.installation?.autoAddToSite,\n essential: component.installation?.essential,\n maxInstances: component.installation?.essential ? 1 : 0,\n },\n widget: { region: RegionType.BODY },\n },\n behaviors: {},\n dependencies: component.dependencies,\n },\n },\n };\n};\n\nexport async function createAppManifest({\n appId,\n components,\n sentryDSN,\n componentSourceBuilder,\n}: CreateAppManifestParams): Promise<AppManifest> {\n validateComponents(components);\n\n const appManifestComponents = (\n await Promise.all(\n components.map(\n match({\n DashboardPage: async (component): Promise<BackofficePage> => {\n const componentSentryDSN = component.sentryDSN ?? sentryDSN;\n return {\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_PAGE as const,\n compData: {\n backOfficePage: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n fullPage: component.sidebar?.whenActive?.hideSidebar,\n hideInSidebar: component.sidebar?.disabled,\n priority: component.sidebar?.priority,\n routePath: component.route.slice(1),\n title: component.title,\n pageCategoryId: component.sidebar?.categoryId,\n activeSidebarPageId:\n component.sidebar?.whenActive?.selectedPageId,\n requiredPermission: component.requiredPermission,\n previousRoutePaths: component.additionalRoutes,\n ...(componentSentryDSN\n ? { errorReporting: { url: componentSentryDSN } }\n : undefined),\n ...(await componentSourceBuilder(component)),\n },\n },\n compName: component.title,\n experiment: getExperiment(component, appId),\n };\n },\n DashboardPlugin: async (\n component\n ): Promise<BackofficeExtensionWidget> => ({\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_EXTENSION_WIDGET as const,\n compData: {\n backOfficeExtensionWidget: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n extends: component.extends,\n title: component.title,\n requiredPermission: component.requiredPermission,\n width: component.width,\n height: component.height,\n ...(await componentSourceBuilder(component)),\n ...(component.sentryDSN\n ? { errorReporting: { url: component.sentryDSN } }\n : undefined),\n },\n },\n compName: component.title,\n }),\n DashboardMenuPlugin: async (\n component\n ): Promise<BackofficeExtensionMenuItem> => ({\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_EXTENSION_MENU_ITEM as const,\n compData: {\n backOfficeExtensionMenuItem: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n id: component.id,\n title: component.title,\n subtitle: component.subtitle,\n iconKey: component.iconKey,\n extends: component.extends,\n action: component.action,\n requiredPermission: component.requiredPermission,\n ...(component.sentryDSN\n ? { errorReporting: { url: component.sentryDSN } }\n : undefined),\n },\n },\n compName: component.title,\n }),\n DashboardModal: async (component): Promise<BackofficeModal> => ({\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_MODAL as const,\n compData: {\n backOfficeModal: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n title: component.title,\n requiredPermission: component.requiredPermission,\n width: component.width,\n height: component.height,\n ...(await componentSourceBuilder(component)),\n ...(component.sentryDSN\n ? { errorReporting: { url: component.sentryDSN } }\n : undefined),\n },\n },\n compName: component.title,\n }),\n DashboardSidebarCategory: async (\n component\n ): Promise<BackofficeSideCategory> => ({\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_SIDEBAR_CATEGORY as const,\n compData: {\n backOfficeSidebarCategory: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n title: component.label,\n priority: component.priority,\n },\n },\n compName: component.label,\n }),\n EmbeddedScript: async (component): Promise<EmbeddedScript> => ({\n compId: component.id,\n compType: ComponentType.EMBEDDED_SCRIPT as const,\n compName: component.name,\n compData: {\n embeddedScriptComponentData: {\n name: component.name,\n pages: EmbeddedScriptPages.NONE_PAGES,\n placement: component.placement,\n connectArticleUrl: '',\n embedCategory: component.scriptType,\n dependencies: component.dependencies,\n loadOnce: true,\n allowedForFreeSite: true,\n ...(await componentSourceBuilder(component)),\n },\n },\n }),\n CustomElement: async (component): Promise<CustomElement> => {\n const { scriptUrl, settingsUrl } = await componentSourceBuilder(\n component\n );\n\n const basicConfig = createCustomElementConfig(component);\n\n return {\n ...basicConfig,\n compData: {\n customElementWidget: {\n ...basicConfig.compData.customElementWidget,\n widgetData: {\n ...basicConfig.compData.customElementWidget.widgetData,\n scriptUrl,\n },\n behaviors: {\n ...basicConfig.compData.customElementWidget.behaviors,\n ...(component.relativePanelPath\n ? { settings: { settingsUrl } }\n : {}),\n },\n },\n },\n };\n },\n Topology: async (component): Promise<Topology> => {\n return {\n compId: component.id,\n compType: ComponentType.TOPOLOGY as const,\n compName: component.name,\n compData: {\n topology: {\n topology: {\n backendApiUrl: component.backendApiUrl,\n },\n },\n },\n };\n },\n Api: () => null,\n Event: async (component): Promise<Webhook[]> => {\n const webhookSlugs = await componentSourceBuilder(component);\n\n return webhookSlugs.map(({ webhookSlug }) => ({\n compName: webhookSlug,\n compId: randomUUID(),\n compType: ComponentType.WEBHOOK,\n compData: {\n webhook: {\n callbackUrl: '__WEBHOOKS_URL_PLACEHOLDER__',\n webhookSlug,\n },\n },\n }));\n },\n ServicePlugin: async (component): Promise<ServicePlugin> => {\n const servicePlugin = match(component.servicePlugin, {\n EcomShippingRates: (component): EcomShippingRates => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_SHIPPING_RATES,\n compData: {\n ecomShippingRates: {\n name: component.name,\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n description: component.description,\n learnMoreUrl: component.learnMoreUrl,\n dashboardUrl: component.dashboardUrl,\n fallbackDefinitionMandatory:\n component.fallbackDefinitionMandatory,\n thumbnailUrl: component.thumbnailUrl,\n },\n },\n }),\n EcomAdditionalFees: (component): EcomAdditionalFees => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_ADDITIONAL_FEES,\n compData: {\n ecomAdditionalFees: {\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n },\n },\n }),\n EcomDiscountsTrigger: (component): EcomDiscountsTrigger => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_DISCOUNTS_TRIGGER,\n compData: {\n ecomDiscountsTrigger: {\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n },\n },\n }),\n EcomValidations: (component): EcomValidations => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_VALIDATIONS,\n compData: {\n ecomValidations: {\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n validateInCart: component.validateInCart,\n },\n },\n }),\n EcomPaymentSettings: (component): EcomPaymentSettings => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_PAYMENT_SETTINGS,\n compData: {\n ecomPaymentSettings: {\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n fallbackValueForRequires3dSecure:\n component.fallbackValueForRequires3dSecure,\n },\n },\n }),\n });\n\n const { servicePluginType } = await componentSourceBuilder(\n component\n );\n\n if (servicePlugin.compType !== servicePluginType) {\n throw new CliError({\n code: CliErrorCode.InvalidServicePluginImplementation({\n configuredImplementation: servicePlugin.compType,\n }),\n });\n }\n\n return servicePlugin;\n },\n })\n )\n )\n )\n .filter(isTruthy)\n .flat();\n\n const uniqueComponents = uniqWith(appManifestComponents, (one, two) => {\n return (\n one.compType === ComponentType.WEBHOOK &&\n two.compType === ComponentType.WEBHOOK &&\n one.compData.webhook.webhookSlug === two.compData.webhook.webhookSlug\n );\n });\n\n return {\n appId,\n components: uniqueComponents,\n };\n}\n","import { BackOfficeScriptAssetType } from '@wix/ambassador-devcenter-components-v1-component/types';\nimport type { ComponentSource } from '@wix/cli-app-manifest';\nimport { match } from 'variant';\nimport { join } from 'node:path';\nimport type { SupportedServicePlugin } from '@wix/cli-app-definitions';\nimport { getAppBackendBuildFolder } from '@wix/cli-app-definitions';\nimport type * as GetRegisteredExtensions from '@wix/cli-cloudflare-runtime/getRegisteredExtensions';\nimport { getBackendEventSlug } from '@wix/extensions-data-client';\nimport {\n virtualModuleIdForScriptAsset,\n virtualPathForHTMLAsset,\n} from '../dev-center/components/dashboard/config.js';\nimport {\n virtualModuleIdForCustomElementScriptAsset,\n virtualPathForCustomElementPanelHTMLAsset,\n} from '../dev-center/components/site/config.js';\nimport type { ProjectModel } from '../model.js';\nimport type { ViteBuildOutput } from './build-output-data-extractor.js';\nimport {\n extractModuleBundleContent,\n extractModuleBundleName,\n} from './build-output-data-extractor.js';\nimport type { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\n\ntype BackendSource =\n | {\n backendBuildOutput: ViteBuildOutput | undefined;\n backendDevServerUrl?: never;\n }\n | { backendDevServerUrl: string | undefined; backendBuildOutput?: never };\n\ntype ClientSource =\n | { clientBuildOutput: ViteBuildOutput; clientDevServerUrl?: never }\n | { clientDevServerUrl: string; clientBuildOutput?: never };\n\ntype DashboardSource =\n | {\n iframeUrl: string;\n scriptAsset?: never;\n }\n | {\n scriptAsset: ComponentSource['scriptAsset'];\n iframeUrl?: never;\n };\n\ninterface EmbeddedScriptSource {\n template: string;\n}\n\ninterface CustomElementSource {\n scriptUrl: string;\n settingsUrl: string;\n}\n\ninterface EventSource {\n webhookSlug: string;\n}\n\ninterface ServicePluginSource {\n servicePluginType: SupportedServicePlugin;\n}\n\nexport type ComponentSourceBuilder = <T extends DevCenterComponent>(\n component: T\n) => Promise<\n T extends DevCenterComponent<'EmbeddedScript'>\n ? EmbeddedScriptSource\n : T extends DevCenterComponent<'CustomElement'>\n ? CustomElementSource\n : T extends DevCenterComponent<'DashboardPage'>\n ? DashboardSource\n : T extends DevCenterComponent<'DashboardPlugin'>\n ? DashboardSource\n : T extends DevCenterComponent<'DashboardModal'>\n ? DashboardSource\n : T extends DevCenterComponent<'Event'>\n ? EventSource[]\n : T extends DevCenterComponent<'ServicePlugin'>\n ? ServicePluginSource\n : undefined\n>;\n\nasync function getEmbeddedScriptDevTemplate(\n component: DevCenterComponent<'EmbeddedScript'>,\n backendDevServerUrl: string\n) {\n const url = new URL(component.relativePath, backendDevServerUrl).href;\n const devTemplate = await fetch(url).then((res) => res.text());\n\n return devTemplate;\n}\n\nasync function getEventDevSlugs(\n component: DevCenterComponent<'Event'>,\n backendDevServerUrl: string\n) {\n const url = new URL(`__get-registered-events`, backendDevServerUrl).href;\n const response = await fetch(url);\n\n if (!response.ok) {\n return [];\n }\n\n const eventTypes = await response.json();\n const devSlugs = eventTypes[`/${component.relativePath}`] ?? [];\n\n return devSlugs as string[];\n}\n\nasync function getRegisteredExtensions(model: ProjectModel) {\n const backendBuildFolder = getAppBackendBuildFolder(model.projectFolder);\n const outputFilepath = join(\n backendBuildFolder,\n 'getRegisteredExtensions.mjs'\n );\n\n return import(outputFilepath) as Promise<typeof GetRegisteredExtensions>;\n}\n\nasync function getEventProdSlugs(\n component: DevCenterComponent<'Event'>,\n model: ProjectModel\n) {\n const { getRegisteredEvents } = await getRegisteredExtensions(model);\n\n const eventsMap = await getRegisteredEvents();\n\n return eventsMap[`/${component.relativePath}`];\n}\n\nasync function getServicePluginDevType(\n component: DevCenterComponent<'ServicePlugin'>,\n backendDevServerUrl: string\n) {\n const url = new URL(`__get-registered-service-plugins`, backendDevServerUrl)\n .href;\n const response = await fetch(url);\n\n if (!response.ok) {\n return null;\n }\n\n const servicePluginTypes = await response.json();\n const servicePluginType = servicePluginTypes[`/${component.relativePath}`];\n\n return servicePluginType as string;\n}\n\nasync function getServicePluginProdType(\n component: DevCenterComponent<'ServicePlugin'>,\n model: ProjectModel\n) {\n const { getRegisteredServicePlugins } = await getRegisteredExtensions(model);\n\n const servicePluginsMap = await getRegisteredServicePlugins();\n\n return servicePluginsMap[`/${component.relativePath}`];\n}\n\nconst dashboardSourceBuilder = (\n component:\n | DevCenterComponent<'DashboardPage'>\n | DevCenterComponent<'DashboardPlugin'>\n | DevCenterComponent<'DashboardModal'>,\n model: ProjectModel,\n clientSource: ClientSource\n): DashboardSource => {\n if (!model.config.trusted) {\n return {\n iframeUrl: virtualPathForHTMLAsset(component.id),\n };\n }\n const moduleId = virtualModuleIdForScriptAsset(component.id);\n const componentUrl = clientSource.clientBuildOutput\n ? extractModuleBundleName(clientSource.clientBuildOutput, moduleId)\n : `/@id/${moduleId}?import`;\n\n return {\n scriptAsset: {\n exportedName: component.id,\n containerId: model.config.appId,\n url: componentUrl,\n scriptType: BackOfficeScriptAssetType.MODULE,\n },\n };\n};\n\nconst embeddedScriptBuilder = async (\n component: DevCenterComponent<'EmbeddedScript'>,\n { clientBuildOutput, clientDevServerUrl }: ClientSource\n): Promise<EmbeddedScriptSource> => {\n return {\n template: clientBuildOutput\n ? extractModuleBundleContent(clientBuildOutput, component.relativePath)\n : await getEmbeddedScriptDevTemplate(component, clientDevServerUrl),\n };\n};\n\nconst eventSourceBuilder = async (\n component: DevCenterComponent<'Event'>,\n model: ProjectModel,\n backendSource: BackendSource\n): Promise<EventSource[]> => {\n const fullSlugNames = backendSource.backendDevServerUrl\n ? await getEventDevSlugs(component, backendSource.backendDevServerUrl)\n : await getEventProdSlugs(component, model);\n\n const webhookSlugs = fullSlugNames\n ? await Promise.all(fullSlugNames.map(getBackendEventSlug))\n : [];\n\n return webhookSlugs.map((webhookSlug) => ({\n webhookSlug,\n }));\n};\n\nconst servicePluginSourceBuilder = async (\n component: DevCenterComponent<'ServicePlugin'>,\n model: ProjectModel,\n backendSource: BackendSource\n): Promise<ServicePluginSource> => {\n const servicePluginType = backendSource.backendDevServerUrl\n ? await getServicePluginDevType(\n component,\n backendSource.backendDevServerUrl\n )\n : await getServicePluginProdType(component, model);\n\n if (!servicePluginType) {\n throw new Error('could not find service plugin definition');\n }\n\n return {\n servicePluginType,\n } as ServicePluginSource;\n};\n\nconst customElementBuilder = (\n component: DevCenterComponent<'CustomElement'>,\n clientSource: ClientSource\n): CustomElementSource => {\n const moduleId = virtualModuleIdForCustomElementScriptAsset(component.id);\n const componentUrl = clientSource.clientBuildOutput\n ? extractModuleBundleName(clientSource.clientBuildOutput, moduleId)\n : `/@id/${moduleId}?import`;\n\n return {\n scriptUrl: componentUrl,\n settingsUrl: virtualPathForCustomElementPanelHTMLAsset(component.id),\n };\n};\n\nexport function getComponentSourceBuilder(\n model: ProjectModel,\n clientSource: ClientSource,\n backendSource: BackendSource\n) {\n return (async (component: DevCenterComponent) => {\n const source = match(component, {\n EmbeddedScript: (embeddedScriptComponent) =>\n embeddedScriptBuilder(embeddedScriptComponent, clientSource),\n DashboardSidebarCategory: () => {},\n CustomElement: (customElementComponent) =>\n customElementBuilder(customElementComponent, clientSource),\n DashboardPage: (dashboardPageComponent) =>\n dashboardSourceBuilder(dashboardPageComponent, model, clientSource),\n DashboardPlugin: (dashboardPluginComponent) =>\n dashboardSourceBuilder(dashboardPluginComponent, model, clientSource),\n DashboardModal: (dashboardModalComponent) =>\n dashboardSourceBuilder(dashboardModalComponent, model, clientSource),\n DashboardMenuPlugin: () => {},\n Topology: () => {},\n Api: () => {},\n Event: (component) => eventSourceBuilder(component, model, backendSource),\n ServicePlugin: (component) =>\n servicePluginSourceBuilder(component, model, backendSource),\n });\n\n return source;\n }) as ComponentSourceBuilder;\n}\n","import { CliError, CliErrorCode } from '@wix/cli-error';\nimport type { build } from 'vite';\n\nexport type ViteBuildOutput = Awaited<ReturnType<typeof build>>;\n\nfunction extractBuildOutputs(buildOutput: ViteBuildOutput) {\n const isValidRollupOutput =\n 'output' in buildOutput || Array.isArray(buildOutput);\n\n if (!isValidRollupOutput) {\n throw new CliError({ code: CliErrorCode.InvalidViteBuildOutput() });\n }\n\n const outputs = Array.isArray(buildOutput)\n ? buildOutput.flatMap((output) => output.output)\n : buildOutput.output;\n\n return outputs;\n}\n\nexport function extractModuleBundleName(\n buildOutput: ViteBuildOutput,\n moduleId: string\n) {\n const outputs = extractBuildOutputs(buildOutput);\n\n const output = outputs.find(\n (output) => output.type === 'chunk' && output.facadeModuleId === moduleId\n );\n\n if (!output) {\n throw new CliError({ code: CliErrorCode.ViteModuleBundleNotFound() });\n }\n\n return output.fileName;\n}\n\nexport function extractModuleBundleContent(\n buildOutput: ViteBuildOutput,\n fileName: string\n) {\n const outputs = extractBuildOutputs(buildOutput);\n\n const output = outputs.find((output) => output.fileName === fileName);\n\n if (!output || !('source' in output)) {\n throw new CliError({\n code: CliErrorCode.ViteFileNotFoundInOutput({ fileName }),\n });\n }\n\n return output.source.toString();\n}\n"],"mappings":";;mSAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAAAC,IAWA,SAASC,GAAcC,EAAOC,EAAWC,EAAWC,EAAW,CAI7D,QAHIC,EAASJ,EAAM,OACfK,EAAQH,GAAaC,EAAY,EAAI,IAEjCA,EAAYE,IAAU,EAAEA,EAAQD,GACtC,GAAIH,EAAUD,EAAMK,CAAK,EAAGA,EAAOL,CAAK,EACtC,OAAOK,EAGX,MAAO,EACT,CAEAR,EAAO,QAAUE,KCvBjB,IAAAO,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAAAC,IAOA,SAASC,GAAUC,EAAO,CACxB,OAAOA,IAAUA,CACnB,CAEAH,EAAO,QAAUE,KCXjB,IAAAE,EAAAC,EAA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,GACdiC,GAA2BjC,EAAWO,EAAOsB,CAAa,CAC9D,CAAC,CAIL","names":["require_baseFindIndex","__commonJSMin","exports","module","init_esm_shims","baseFindIndex","array","predicate","fromIndex","fromRight","length","index","require_baseIsNaN","__commonJSMin","exports","module","init_esm_shims","baseIsNaN","value","require_strictIndexOf","__commonJSMin","exports","module","init_esm_shims","strictIndexOf","array","value","fromIndex","index","length","require_baseIndexOf","__commonJSMin","exports","module","init_esm_shims","baseFindIndex","baseIsNaN","strictIndexOf","baseIndexOf","array","value","fromIndex","require_arrayIncludes","__commonJSMin","exports","module","init_esm_shims","baseIndexOf","arrayIncludes","array","value","length","require_arrayIncludesWith","__commonJSMin","exports","module","init_esm_shims","arrayIncludesWith","array","value","comparator","index","length","require_noop","__commonJSMin","exports","module","init_esm_shims","noop","require_createSet","__commonJSMin","exports","module","init_esm_shims","Set","noop","setToArray","INFINITY","createSet","values","require_baseUniq","__commonJSMin","exports","module","init_esm_shims","SetCache","arrayIncludes","arrayIncludesWith","cacheHas","createSet","setToArray","LARGE_ARRAY_SIZE","baseUniq","array","iteratee","comparator","index","includes","length","isCommon","result","seen","set","outer","value","computed","seenIndex","require_uniqWith","__commonJSMin","exports","module","init_esm_shims","baseUniq","uniqWith","array","comparator","init_esm_shims","import_variant","randomUUID","validateComponents","components","devCenterComponentsToIdMap","component","DevCenterComponent","a","b","componentList","devCenterComponentsWithSameIDMap","devCenterComponents","key","CliError","CliErrorCode","id","title","relativePath","replaceExtension","label","CONFIG_FILENAME","name","randomUUID","init_esm_shims","import_variant","import_uniqWith","randomUUID","isTruthy","x","getExperiment","component","appId","createCustomElementConfig","ComponentType","CustomElementScriptType","HeightMode","RegionType","createAppManifest","components","sentryDSN","componentSourceBuilder","validateComponents","appManifestComponents","componentSentryDSN","BackOfficeHostingPlatforms","EmbeddedScriptPages","scriptUrl","settingsUrl","basicConfig","webhookSlug","randomUUID","servicePlugin","servicePluginType","CliError","CliErrorCode","uniqueComponents","uniqWith","one","two","init_esm_shims","import_variant","join","init_esm_shims","extractBuildOutputs","buildOutput","CliError","CliErrorCode","output","extractModuleBundleName","moduleId","extractModuleBundleContent","fileName","getEmbeddedScriptDevTemplate","component","backendDevServerUrl","url","res","getEventDevSlugs","response","getRegisteredExtensions","model","backendBuildFolder","getAppBackendBuildFolder","join","getEventProdSlugs","getRegisteredEvents","getServicePluginDevType","getServicePluginProdType","getRegisteredServicePlugins","dashboardSourceBuilder","clientSource","virtualPathForHTMLAsset","moduleId","virtualModuleIdForScriptAsset","componentUrl","extractModuleBundleName","BackOfficeScriptAssetType","embeddedScriptBuilder","clientBuildOutput","clientDevServerUrl","extractModuleBundleContent","eventSourceBuilder","backendSource","fullSlugNames","getBackendEventSlug","webhookSlug","servicePluginSourceBuilder","servicePluginType","customElementBuilder","virtualModuleIdForCustomElementScriptAsset","virtualPathForCustomElementPanelHTMLAsset","getComponentSourceBuilder","embeddedScriptComponent","customElementComponent","dashboardPageComponent","dashboardPluginComponent","dashboardModalComponent"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/lodash/_baseFindIndex.js","../../../node_modules/lodash/_baseIsNaN.js","../../../node_modules/lodash/_strictIndexOf.js","../../../node_modules/lodash/_baseIndexOf.js","../../../node_modules/lodash/_arrayIncludes.js","../../../node_modules/lodash/_arrayIncludesWith.js","../../../node_modules/lodash/noop.js","../../../node_modules/lodash/_createSet.js","../../../node_modules/lodash/_baseUniq.js","../../../node_modules/lodash/uniqWith.js","../src/app-manifest/validate.ts","../src/app-manifest/create.ts","../src/app-manifest/component-source.ts","../src/app-manifest/build-output-data-extractor.ts"],"sourcesContent":["/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var baseUniq = require('./_baseUniq');\n\n/**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\nfunction uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n}\n\nmodule.exports = uniqWith;\n","import { randomUUID } from 'node:crypto';\nimport { isType, match } from 'variant';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport { CONFIG_FILENAME } from '@wix/cli-core-definitions';\nimport { replaceExtension } from '../dev-center/components/path.js';\nimport type { BackendComponent } from '../dev-center/components/dev-center-component.js';\nimport { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\n\ntype NonBackendComponent = Exclude<DevCenterComponent, BackendComponent>;\n\nexport const validateComponents = (components: DevCenterComponent[]) => {\n const devCenterComponentsToIdMap = new Map<string, NonBackendComponent[]>();\n\n const componentsWithConfig = components.filter(\n (component): component is NonBackendComponent =>\n !isType(component, DevCenterComponent.Api) &&\n !isType(component, DevCenterComponent.Event) &&\n !isType(component, DevCenterComponent.ServicePlugin)\n );\n\n const sortedComponentsById = [...componentsWithConfig].sort((a, b) =>\n a.id.localeCompare(b.id)\n );\n sortedComponentsById.forEach((component) => {\n const componentList = devCenterComponentsToIdMap.get(component.id) ?? [];\n componentList.push(component);\n devCenterComponentsToIdMap.set(component.id, componentList);\n });\n\n const devCenterComponentsWithSameIDMap = new Map<\n string,\n NonBackendComponent[]\n >();\n\n devCenterComponentsToIdMap.forEach((devCenterComponents, key) => {\n if (devCenterComponents.length > 1) {\n devCenterComponentsWithSameIDMap.set(key, devCenterComponents);\n }\n });\n\n if (devCenterComponentsWithSameIDMap.size) {\n throw new CliError({\n code: CliErrorCode.DuplicateComponentIdsError({\n issues: Array.from(devCenterComponentsWithSameIDMap.entries()).map(\n ([id, devCenterComponents]) => {\n return {\n id,\n components: devCenterComponents\n .map((component) =>\n match(component, {\n DashboardPage: ({ title, relativePath }) => ({\n name: title,\n type: 'page' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n DashboardPlugin: ({ title, relativePath }) => ({\n name: title,\n type: 'plugin' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n DashboardMenuPlugin: ({ title, relativePath }) => ({\n name: title,\n type: 'menu-plugin' as const,\n // We can use the relative path since the path already points to the menu config json\n path: relativePath,\n }),\n DashboardModal: ({ title, relativePath }) => ({\n name: title,\n type: 'modal' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n DashboardSidebarCategory: ({ label }) => ({\n name: label,\n type: 'sidebar-category' as const,\n path: CONFIG_FILENAME,\n }),\n EmbeddedScript: ({ relativePath }) => ({\n name: relativePath,\n type: 'embedded-script' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n CustomElement: ({ name, relativePath }) => ({\n name,\n type: 'custom-element' as const,\n path: replaceExtension(relativePath, 'json'),\n }),\n Topology: ({ name }) => ({\n name,\n type: 'topology' as const,\n // Topology component doesn't have a config file\n path: '',\n }),\n })\n )\n .sort((a, b) => a.name.localeCompare(b.name)),\n suggestedId: randomUUID(),\n };\n }\n ),\n }),\n });\n }\n};\n","import {\n ComponentType,\n BackOfficeHostingPlatforms,\n EmbeddedScriptPages,\n HeightMode,\n RegionType,\n CustomElementScriptType,\n} from '@wix/ambassador-devcenter-components-v1-component/types';\nimport { match } from 'variant';\nimport { randomUUID } from 'node:crypto';\nimport uniqWith from 'lodash/uniqWith.js';\nimport type {\n AppManifest,\n ComponentExperiment,\n BackofficePage,\n BackofficeExtensionWidget,\n BackofficeExtensionMenuItem,\n BackofficeSideCategory,\n BackofficeModal,\n EmbeddedScript,\n CustomElement,\n Webhook,\n ServicePlugin,\n Topology,\n EcomShippingRates,\n EcomAdditionalFees,\n EcomDiscountsTrigger,\n EcomValidations,\n EcomPaymentSettings,\n} from '@wix/cli-app-manifest';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport { validateComponents } from './validate.js';\nimport type { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\nimport type { ComponentSourceBuilder } from './component-source.js';\n\ninterface CreateAppManifestParams {\n appId: string;\n backendServerUrl?: string;\n components: DevCenterComponent[];\n sentryDSN?: string;\n componentSourceBuilder: ComponentSourceBuilder;\n}\n\nfunction isTruthy<T>(x: T | undefined | null | false): x is T {\n return x !== undefined && x !== null && x !== false;\n}\n\nconst getExperiment = (\n component: DevCenterComponent<'DashboardPage'>,\n appId: string\n): ComponentExperiment => {\n if (component.experiments) {\n return {\n appId,\n componentId: component.id,\n spec: component.experiments.enabledBy,\n variantValue: 'true',\n };\n }\n return undefined;\n};\n\nexport const createCustomElementConfig = (\n component: DevCenterComponent<'CustomElement'>\n): CustomElement => {\n return {\n compId: component.id,\n compType: ComponentType.CUSTOM_ELEMENT_WIDGET as const,\n compName: component.name,\n compData: {\n customElementWidget: {\n base: {\n name: component.name,\n },\n widgetData: {\n tagName: component.tagName,\n scriptType: CustomElementScriptType.ES_MODULE,\n scriptUrl: '',\n },\n size: {\n width: {\n defaultWidth: component.width.defaultWidth,\n allowStretch: component.width.allowStretch,\n stretchByDefault: component.width.stretchByDefault,\n },\n height: {\n defaultHeight: component.height.defaultHeight,\n heightMode: HeightMode.FIXED,\n },\n },\n installation: {\n base: {\n autoAdd: component.installation?.autoAddToSite,\n essential: component.installation?.essential,\n maxInstances: component.installation?.essential ? 1 : 0,\n },\n widget: { region: RegionType.BODY },\n },\n behaviors: {},\n dependencies: component.dependencies,\n },\n },\n };\n};\n\nexport async function createAppManifest({\n appId,\n components,\n sentryDSN,\n componentSourceBuilder,\n}: CreateAppManifestParams): Promise<AppManifest> {\n validateComponents(components);\n\n const appManifestComponents = (\n await Promise.all(\n components.map(\n match({\n DashboardPage: async (component): Promise<BackofficePage> => {\n const componentSentryDSN = component.sentryDSN ?? sentryDSN;\n return {\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_PAGE as const,\n compData: {\n backOfficePage: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n fullPage: component.sidebar?.whenActive?.hideSidebar,\n hideInSidebar: component.sidebar?.disabled,\n priority: component.sidebar?.priority,\n routePath: component.route.slice(1),\n title: component.title,\n pageCategoryId: component.sidebar?.categoryId,\n activeSidebarPageId:\n component.sidebar?.whenActive?.selectedPageId,\n requiredPermission: component.requiredPermission,\n previousRoutePaths: component.additionalRoutes,\n ...(componentSentryDSN\n ? { errorReporting: { url: componentSentryDSN } }\n : undefined),\n ...(await componentSourceBuilder(component)),\n },\n },\n compName: component.title,\n experiment: getExperiment(component, appId),\n };\n },\n DashboardPlugin: async (\n component\n ): Promise<BackofficeExtensionWidget> => ({\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_EXTENSION_WIDGET as const,\n compData: {\n backOfficeExtensionWidget: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n extends: component.extends,\n title: component.title,\n requiredPermission: component.requiredPermission,\n width: component.width,\n height: component.height,\n ...(await componentSourceBuilder(component)),\n ...(component.sentryDSN\n ? { errorReporting: { url: component.sentryDSN } }\n : undefined),\n },\n },\n compName: component.title,\n }),\n DashboardMenuPlugin: async (\n component\n ): Promise<BackofficeExtensionMenuItem> => ({\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_EXTENSION_MENU_ITEM as const,\n compData: {\n backOfficeExtensionMenuItem: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n id: component.id,\n title: component.title,\n subtitle: component.subtitle,\n iconKey: component.iconKey,\n extends: component.extends,\n action: component.action,\n requiredPermission: component.requiredPermission,\n ...(component.sentryDSN\n ? { errorReporting: { url: component.sentryDSN } }\n : undefined),\n },\n },\n compName: component.title,\n }),\n DashboardModal: async (component): Promise<BackofficeModal> => ({\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_MODAL as const,\n compData: {\n backOfficeModal: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n title: component.title,\n requiredPermission: component.requiredPermission,\n width: component.width,\n height: component.height,\n ...(await componentSourceBuilder(component)),\n ...(component.sentryDSN\n ? { errorReporting: { url: component.sentryDSN } }\n : undefined),\n },\n },\n compName: component.title,\n }),\n DashboardSidebarCategory: async (\n component\n ): Promise<BackofficeSideCategory> => ({\n compId: component.id,\n compType: ComponentType.BACK_OFFICE_SIDEBAR_CATEGORY as const,\n compData: {\n backOfficeSidebarCategory: {\n hostingPlatform: BackOfficeHostingPlatforms.BUSINESS_MANAGER,\n title: component.label,\n priority: component.priority,\n },\n },\n compName: component.label,\n }),\n EmbeddedScript: async (component): Promise<EmbeddedScript> => ({\n compId: component.id,\n compType: ComponentType.EMBEDDED_SCRIPT as const,\n compName: component.name,\n compData: {\n embeddedScriptComponentData: {\n name: component.name,\n pages: EmbeddedScriptPages.NONE_PAGES,\n placement: component.placement,\n connectArticleUrl: '',\n embedCategory: component.scriptType,\n dependencies: component.dependencies,\n loadOnce: true,\n allowedForFreeSite: true,\n ...(await componentSourceBuilder(component)),\n },\n },\n }),\n CustomElement: async (component): Promise<CustomElement> => {\n const { scriptUrl, settingsUrl } = await componentSourceBuilder(\n component\n );\n\n const basicConfig = createCustomElementConfig(component);\n\n return {\n ...basicConfig,\n compData: {\n customElementWidget: {\n ...basicConfig.compData.customElementWidget,\n widgetData: {\n ...basicConfig.compData.customElementWidget.widgetData,\n scriptUrl,\n },\n behaviors: {\n ...basicConfig.compData.customElementWidget.behaviors,\n ...(component.relativePanelPath\n ? { settings: { settingsUrl } }\n : {}),\n },\n },\n },\n };\n },\n Topology: async (component): Promise<Topology> => {\n return {\n compId: component.id,\n compType: ComponentType.TOPOLOGY as const,\n compName: component.name,\n compData: {\n topology: {\n topology: {\n backendApiUrl: component.backendApiUrl,\n },\n },\n },\n };\n },\n Api: () => null,\n Event: async (component): Promise<Webhook[]> => {\n const webhookSlugs = await componentSourceBuilder(component);\n\n return webhookSlugs.map(({ webhookSlug }) => ({\n compName: webhookSlug,\n compId: randomUUID(),\n compType: ComponentType.WEBHOOK,\n compData: {\n webhook: {\n callbackUrl: '__WEBHOOKS_URL_PLACEHOLDER__',\n webhookSlug,\n },\n },\n }));\n },\n ServicePlugin: async (component): Promise<ServicePlugin> => {\n const servicePlugin = match(component.servicePlugin, {\n EcomShippingRates: (component): EcomShippingRates => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_SHIPPING_RATES,\n compData: {\n ecomShippingRates: {\n name: component.name,\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n description: component.description,\n learnMoreUrl: component.learnMoreUrl,\n dashboardUrl: component.dashboardUrl,\n fallbackDefinitionMandatory:\n component.fallbackDefinitionMandatory,\n thumbnailUrl: component.thumbnailUrl,\n },\n },\n }),\n EcomAdditionalFees: (component): EcomAdditionalFees => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_ADDITIONAL_FEES,\n compData: {\n ecomAdditionalFees: {\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n },\n },\n }),\n EcomDiscountsTrigger: (component): EcomDiscountsTrigger => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_DISCOUNTS_TRIGGER,\n compData: {\n ecomDiscountsTrigger: {\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n },\n },\n }),\n EcomValidations: (component): EcomValidations => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_VALIDATIONS,\n compData: {\n ecomValidations: {\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n validateInCart: component.validateInCart,\n },\n },\n }),\n EcomPaymentSettings: (component): EcomPaymentSettings => ({\n compName: component.name,\n compId: component.id,\n compType: ComponentType.ECOM_PAYMENT_SETTINGS,\n compData: {\n ecomPaymentSettings: {\n deploymentUri: '__SERVICE_PLUGIN_URL_PLACEHOLDER__',\n fallbackValueForRequires3dSecure:\n component.fallbackValueForRequires3dSecure,\n },\n },\n }),\n });\n\n const { servicePluginType } = await componentSourceBuilder(\n component\n );\n\n if (servicePlugin.compType !== servicePluginType) {\n throw new CliError({\n code: CliErrorCode.InvalidServicePluginImplementation({\n configuredImplementation: servicePlugin.compType,\n }),\n });\n }\n\n return servicePlugin;\n },\n })\n )\n )\n )\n .filter(isTruthy)\n .flat();\n\n const uniqueComponents = uniqWith(appManifestComponents, (one, two) => {\n return (\n one.compType === ComponentType.WEBHOOK &&\n two.compType === ComponentType.WEBHOOK &&\n one.compData.webhook.webhookSlug === two.compData.webhook.webhookSlug\n );\n });\n\n return {\n appId,\n components: uniqueComponents,\n };\n}\n","import { BackOfficeScriptAssetType } from '@wix/ambassador-devcenter-components-v1-component/types';\nimport type { ComponentSource } from '@wix/cli-app-manifest';\nimport { match } from 'variant';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { SupportedServicePlugin } from '@wix/cli-app-definitions';\nimport { getAppBackendBuildFolder } from '@wix/cli-app-definitions';\nimport type * as GetRegisteredExtensions from '@wix/cli-cloudflare-runtime/getRegisteredExtensions';\nimport { getBackendEventSlug } from '@wix/extensions-data-client';\nimport {\n virtualModuleIdForScriptAsset,\n virtualPathForHTMLAsset,\n} from '../dev-center/components/dashboard/config.js';\nimport {\n virtualModuleIdForCustomElementScriptAsset,\n virtualPathForCustomElementPanelHTMLAsset,\n} from '../dev-center/components/site/config.js';\nimport type { ProjectModel } from '../model.js';\nimport type { ViteBuildOutput } from './build-output-data-extractor.js';\nimport {\n extractModuleBundleContent,\n extractModuleBundleName,\n} from './build-output-data-extractor.js';\nimport type { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\n\ntype BackendSource =\n | {\n backendBuildOutput: ViteBuildOutput | undefined;\n backendDevServerUrl?: never;\n }\n | { backendDevServerUrl: string | undefined; backendBuildOutput?: never };\n\ntype ClientSource =\n | { clientBuildOutput: ViteBuildOutput; clientDevServerUrl?: never }\n | { clientDevServerUrl: string; clientBuildOutput?: never };\n\ntype DashboardSource =\n | {\n iframeUrl: string;\n scriptAsset?: never;\n }\n | {\n scriptAsset: ComponentSource['scriptAsset'];\n iframeUrl?: never;\n };\n\ninterface EmbeddedScriptSource {\n template: string;\n}\n\ninterface CustomElementSource {\n scriptUrl: string;\n settingsUrl: string;\n}\n\ninterface EventSource {\n webhookSlug: string;\n}\n\ninterface ServicePluginSource {\n servicePluginType: SupportedServicePlugin;\n}\n\nexport type ComponentSourceBuilder = <T extends DevCenterComponent>(\n component: T\n) => Promise<\n T extends DevCenterComponent<'EmbeddedScript'>\n ? EmbeddedScriptSource\n : T extends DevCenterComponent<'CustomElement'>\n ? CustomElementSource\n : T extends DevCenterComponent<'DashboardPage'>\n ? DashboardSource\n : T extends DevCenterComponent<'DashboardPlugin'>\n ? DashboardSource\n : T extends DevCenterComponent<'DashboardModal'>\n ? DashboardSource\n : T extends DevCenterComponent<'Event'>\n ? EventSource[]\n : T extends DevCenterComponent<'ServicePlugin'>\n ? ServicePluginSource\n : undefined\n>;\n\nasync function getEmbeddedScriptDevTemplate(\n component: DevCenterComponent<'EmbeddedScript'>,\n backendDevServerUrl: string\n) {\n const url = new URL(component.relativePath, backendDevServerUrl).href;\n const devTemplate = await fetch(url).then((res) => res.text());\n\n return devTemplate;\n}\n\nasync function getEventDevSlugs(\n component: DevCenterComponent<'Event'>,\n backendDevServerUrl: string\n) {\n const url = new URL(`__get-registered-events`, backendDevServerUrl).href;\n const response = await fetch(url);\n\n if (!response.ok) {\n return [];\n }\n\n const eventTypes = await response.json();\n const devSlugs = eventTypes[`/${component.relativePath}`] ?? [];\n\n return devSlugs as string[];\n}\n\nasync function getRegisteredExtensions(model: ProjectModel) {\n const backendBuildFolder = getAppBackendBuildFolder(model.projectFolder);\n const outputFilepath = join(\n backendBuildFolder,\n 'getRegisteredExtensions.mjs'\n );\n\n return import(pathToFileURL(outputFilepath).href) as Promise<\n typeof GetRegisteredExtensions\n >;\n}\n\nasync function getEventProdSlugs(\n component: DevCenterComponent<'Event'>,\n model: ProjectModel\n) {\n const { getRegisteredEvents } = await getRegisteredExtensions(model);\n\n const eventsMap = await getRegisteredEvents();\n\n return eventsMap[`/${component.relativePath}`];\n}\n\nasync function getServicePluginDevType(\n component: DevCenterComponent<'ServicePlugin'>,\n backendDevServerUrl: string\n) {\n const url = new URL(`__get-registered-service-plugins`, backendDevServerUrl)\n .href;\n const response = await fetch(url);\n\n if (!response.ok) {\n return null;\n }\n\n const servicePluginTypes = await response.json();\n const servicePluginType = servicePluginTypes[`/${component.relativePath}`];\n\n return servicePluginType as string;\n}\n\nasync function getServicePluginProdType(\n component: DevCenterComponent<'ServicePlugin'>,\n model: ProjectModel\n) {\n const { getRegisteredServicePlugins } = await getRegisteredExtensions(model);\n\n const servicePluginsMap = await getRegisteredServicePlugins();\n\n return servicePluginsMap[`/${component.relativePath}`];\n}\n\nconst dashboardSourceBuilder = (\n component:\n | DevCenterComponent<'DashboardPage'>\n | DevCenterComponent<'DashboardPlugin'>\n | DevCenterComponent<'DashboardModal'>,\n model: ProjectModel,\n clientSource: ClientSource\n): DashboardSource => {\n if (!model.config.trusted) {\n return {\n iframeUrl: virtualPathForHTMLAsset(component.id),\n };\n }\n const moduleId = virtualModuleIdForScriptAsset(component.id);\n const componentUrl = clientSource.clientBuildOutput\n ? extractModuleBundleName(clientSource.clientBuildOutput, moduleId)\n : `/@id/${moduleId}?import`;\n\n return {\n scriptAsset: {\n exportedName: component.id,\n containerId: model.config.appId,\n url: componentUrl,\n scriptType: BackOfficeScriptAssetType.MODULE,\n },\n };\n};\n\nconst embeddedScriptBuilder = async (\n component: DevCenterComponent<'EmbeddedScript'>,\n { clientBuildOutput, clientDevServerUrl }: ClientSource\n): Promise<EmbeddedScriptSource> => {\n return {\n template: clientBuildOutput\n ? extractModuleBundleContent(clientBuildOutput, component.relativePath)\n : await getEmbeddedScriptDevTemplate(component, clientDevServerUrl),\n };\n};\n\nconst eventSourceBuilder = async (\n component: DevCenterComponent<'Event'>,\n model: ProjectModel,\n backendSource: BackendSource\n): Promise<EventSource[]> => {\n const fullSlugNames = backendSource.backendDevServerUrl\n ? await getEventDevSlugs(component, backendSource.backendDevServerUrl)\n : await getEventProdSlugs(component, model);\n\n const webhookSlugs = fullSlugNames\n ? await Promise.all(fullSlugNames.map(getBackendEventSlug))\n : [];\n\n return webhookSlugs.map((webhookSlug) => ({\n webhookSlug,\n }));\n};\n\nconst servicePluginSourceBuilder = async (\n component: DevCenterComponent<'ServicePlugin'>,\n model: ProjectModel,\n backendSource: BackendSource\n): Promise<ServicePluginSource> => {\n const servicePluginType = backendSource.backendDevServerUrl\n ? await getServicePluginDevType(\n component,\n backendSource.backendDevServerUrl\n )\n : await getServicePluginProdType(component, model);\n\n if (!servicePluginType) {\n throw new Error('could not find service plugin definition');\n }\n\n return {\n servicePluginType,\n } as ServicePluginSource;\n};\n\nconst customElementBuilder = (\n component: DevCenterComponent<'CustomElement'>,\n clientSource: ClientSource\n): CustomElementSource => {\n const moduleId = virtualModuleIdForCustomElementScriptAsset(component.id);\n const componentUrl = clientSource.clientBuildOutput\n ? extractModuleBundleName(clientSource.clientBuildOutput, moduleId)\n : `/@id/${moduleId}?import`;\n\n return {\n scriptUrl: componentUrl,\n settingsUrl: virtualPathForCustomElementPanelHTMLAsset(component.id),\n };\n};\n\nexport function getComponentSourceBuilder(\n model: ProjectModel,\n clientSource: ClientSource,\n backendSource: BackendSource\n) {\n return (async (component: DevCenterComponent) => {\n const source = match(component, {\n EmbeddedScript: (embeddedScriptComponent) =>\n embeddedScriptBuilder(embeddedScriptComponent, clientSource),\n DashboardSidebarCategory: () => {},\n CustomElement: (customElementComponent) =>\n customElementBuilder(customElementComponent, clientSource),\n DashboardPage: (dashboardPageComponent) =>\n dashboardSourceBuilder(dashboardPageComponent, model, clientSource),\n DashboardPlugin: (dashboardPluginComponent) =>\n dashboardSourceBuilder(dashboardPluginComponent, model, clientSource),\n DashboardModal: (dashboardModalComponent) =>\n dashboardSourceBuilder(dashboardModalComponent, model, clientSource),\n DashboardMenuPlugin: () => {},\n Topology: () => {},\n Api: () => {},\n Event: (component) => eventSourceBuilder(component, model, backendSource),\n ServicePlugin: (component) =>\n servicePluginSourceBuilder(component, model, backendSource),\n });\n\n return source;\n }) as ComponentSourceBuilder;\n}\n","import { CliError, CliErrorCode } from '@wix/cli-error';\nimport type { build } from 'vite';\n\nexport type ViteBuildOutput = Awaited<ReturnType<typeof build>>;\n\nfunction extractBuildOutputs(buildOutput: ViteBuildOutput) {\n const isValidRollupOutput =\n 'output' in buildOutput || Array.isArray(buildOutput);\n\n if (!isValidRollupOutput) {\n throw new CliError({ code: CliErrorCode.InvalidViteBuildOutput() });\n }\n\n const outputs = Array.isArray(buildOutput)\n ? buildOutput.flatMap((output) => output.output)\n : buildOutput.output;\n\n return outputs;\n}\n\nexport function extractModuleBundleName(\n buildOutput: ViteBuildOutput,\n moduleId: string\n) {\n const outputs = extractBuildOutputs(buildOutput);\n\n const output = outputs.find(\n (output) => output.type === 'chunk' && output.facadeModuleId === moduleId\n );\n\n if (!output) {\n throw new CliError({ code: CliErrorCode.ViteModuleBundleNotFound() });\n }\n\n return output.fileName;\n}\n\nexport function extractModuleBundleContent(\n buildOutput: ViteBuildOutput,\n fileName: string\n) {\n const outputs = extractBuildOutputs(buildOutput);\n\n const output = outputs.find((output) => output.fileName === fileName);\n\n if (!output || !('source' in output)) {\n throw new CliError({\n code: CliErrorCode.ViteFileNotFoundInOutput({ fileName }),\n });\n }\n\n return output.source.toString();\n}\n"],"mappings":";;mSAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAAAC,IAWA,SAASC,GAAcC,EAAOC,EAAWC,EAAWC,EAAW,CAI7D,QAHIC,EAASJ,EAAM,OACfK,EAAQH,GAAaC,EAAY,EAAI,IAEjCA,EAAYE,IAAU,EAAEA,EAAQD,GACtC,GAAIH,EAAUD,EAAMK,CAAK,EAAGA,EAAOL,CAAK,EACtC,OAAOK,EAGX,MAAO,EACT,CAEAR,EAAO,QAAUE,KCvBjB,IAAAO,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAAAC,IAOA,SAASC,GAAUC,EAAO,CACxB,OAAOA,IAAUA,CACnB,CAEAH,EAAO,QAAUE,KCXjB,IAAAE,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAAAC,IAUA,SAASC,GAAcC,EAAOC,EAAOC,EAAW,CAI9C,QAHIC,EAAQD,EAAY,EACpBE,EAASJ,EAAM,OAEZ,EAAEG,EAAQC,GACf,GAAIJ,EAAMG,CAAK,IAAMF,EACnB,OAAOE,EAGX,MAAO,EACT,CAEAN,EAAO,QAAUE,KCtBjB,IAAAM,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAAAC,IAAA,IAAIC,GAAgB,IAChBC,GAAY,IACZC,GAAgB,IAWpB,SAASC,GAAYC,EAAOC,EAAOC,EAAW,CAC5C,OAAOD,IAAUA,EACbH,G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,EAAc,oBACpC,MAAMhB,GACJf,EACA+B,EAAc,mBAChB,EACA,MAAMf,GAAyBhB,EAAWO,CAAK,EAEnD,GAAI,CAAC6B,EACH,MAAM,IAAI,MAAM,0CAA0C,EAG5D,MAAO,CACL,kBAAAA,CACF,CACF,EAEMC,GAAuB,CAC3BrC,EACAmB,IACwB,CACxB,IAAME,EAAWiB,EAA2CtC,EAAU,EAAE,EAKxE,MAAO,CACL,UALmBmB,EAAa,kBAC9BK,EAAwBL,EAAa,kBAAmBE,CAAQ,EAChE,QAAQA,CAAQ,UAIlB,YAAakB,EAA0CvC,EAAU,EAAE,CACrE,CACF,EAEO,SAASwC,GACdjC,EACAY,EACAY,EACA,CACA,MAAQ,OAAO/B,MACE,UAAMA,EAAW,CAC9B,eAAiByC,GACff,GAAsBe,EAAyBtB,CAAY,EAC7D,yBAA0B,IAAM,CAAC,EACjC,cAAgBuB,GACdL,GAAqBK,EAAwBvB,CAAY,EAC3D,cAAgBwB,GACdzB,EAAuByB,EAAwBpC,EAAOY,CAAY,EACpE,gBAAkByB,GAChB1B,EAAuB0B,EAA0BrC,EAAOY,CAAY,EACtE,eAAiB0B,GACf3B,EAAuB2B,EAAyBtC,EAAOY,CAAY,EACrE,oBAAqB,IAAM,CAAC,EAC5B,SAAU,IAAM,CAAC,EACjB,IAAK,IAAM,CAAC,EACZ,MAAQnB,GAAc8B,GAAmB9B,EAAWO,EAAOwB,CAAa,EACxE,cAAgB/B,GACdmC,GAA2BnC,EAAWO,EAAOwB,CAAa,CAC9D,CAAC,CAIL","names":["require_baseFindIndex","__commonJSMin","exports","module","init_esm_shims","baseFindIndex","array","predicate","fromIndex","fromRight","length","index","require_baseIsNaN","__commonJSMin","exports","module","init_esm_shims","baseIsNaN","value","require_strictIndexOf","__commonJSMin","exports","module","init_esm_shims","strictIndexOf","array","value","fromIndex","index","length","require_baseIndexOf","__commonJSMin","exports","module","init_esm_shims","baseFindIndex","baseIsNaN","strictIndexOf","baseIndexOf","array","value","fromIndex","require_arrayIncludes","__commonJSMin","exports","module","init_esm_shims","baseIndexOf","arrayIncludes","array","value","length","require_arrayIncludesWith","__commonJSMin","exports","module","init_esm_shims","arrayIncludesWith","array","value","comparator","index","length","require_noop","__commonJSMin","exports","module","init_esm_shims","noop","require_createSet","__commonJSMin","exports","module","init_esm_shims","Set","noop","setToArray","INFINITY","createSet","values","require_baseUniq","__commonJSMin","exports","module","init_esm_shims","SetCache","arrayIncludes","arrayIncludesWith","cacheHas","createSet","setToArray","LARGE_ARRAY_SIZE","baseUniq","array","iteratee","comparator","index","includes","length","isCommon","result","seen","set","outer","value","computed","seenIndex","require_uniqWith","__commonJSMin","exports","module","init_esm_shims","baseUniq","uniqWith","array","comparator","init_esm_shims","import_variant","randomUUID","validateComponents","components","devCenterComponentsToIdMap","component","DevCenterComponent","a","b","componentList","devCenterComponentsWithSameIDMap","devCenterComponents","key","CliError","CliErrorCode","id","title","relativePath","replaceExtension","label","CONFIG_FILENAME","name","randomUUID","init_esm_shims","import_variant","import_uniqWith","randomUUID","isTruthy","x","getExperiment","component","appId","createCustomElementConfig","ComponentType","CustomElementScriptType","HeightMode","RegionType","createAppManifest","components","sentryDSN","componentSourceBuilder","validateComponents","appManifestComponents","componentSentryDSN","BackOfficeHostingPlatforms","EmbeddedScriptPages","scriptUrl","settingsUrl","basicConfig","webhookSlug","randomUUID","servicePlugin","servicePluginType","CliError","CliErrorCode","uniqueComponents","uniqWith","one","two","init_esm_shims","import_variant","join","pathToFileURL","init_esm_shims","extractBuildOutputs","buildOutput","CliError","CliErrorCode","output","extractModuleBundleName","moduleId","extractModuleBundleContent","fileName","getEmbeddedScriptDevTemplate","component","backendDevServerUrl","url","res","getEventDevSlugs","response","getRegisteredExtensions","model","backendBuildFolder","getAppBackendBuildFolder","outputFilepath","join","pathToFileURL","getEventProdSlugs","getRegisteredEvents","getServicePluginDevType","getServicePluginProdType","getRegisteredServicePlugins","dashboardSourceBuilder","clientSource","virtualPathForHTMLAsset","moduleId","virtualModuleIdForScriptAsset","componentUrl","extractModuleBundleName","BackOfficeScriptAssetType","embeddedScriptBuilder","clientBuildOutput","clientDevServerUrl","extractModuleBundleContent","eventSourceBuilder","backendSource","fullSlugNames","getBackendEventSlug","webhookSlug","servicePluginSourceBuilder","servicePluginType","customElementBuilder","virtualModuleIdForCustomElementScriptAsset","virtualPathForCustomElementPanelHTMLAsset","getComponentSourceBuilder","embeddedScriptComponent","customElementComponent","dashboardPageComponent","dashboardPluginComponent","dashboardModalComponent"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{a as r}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as r}from"./chunk-4YU6J2EW.js";import{k as p,ka as i}from"./chunk-MIBBNKYS.js";import{h as n}from"./chunk-V4TR6DCM.js";n();async function A({projectFolder:t,manifest:e}){let a=i(t);return p(a,e)}async function M(t){let e=i(t);return r(e)}export{A as a,M as b};
|
|
4
|
+
//# sourceMappingURL=chunk-3Q7TAN43.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{J as l,K as A,L as S,M as O,N as h,O as w,R as C,S as N}from"./chunk-HMROXS2Y.js";import{l as e}from"./chunk-CXOD6WQ4.js";import{c as R,e as P,h as T}from"./chunk-V4TR6DCM.js";var _=R((be,F)=>{"use strict";T();F.exports=L;function E(a){return a instanceof Buffer?Buffer.from(a):new a.constructor(a.buffer.slice(),a.byteOffset,a.length)}function L(a){if(a=a||{},a.circles)return K(a);let n=new Map;if(n.set(Date,t=>new Date(t)),n.set(Map,(t,s)=>new Map(m(Array.from(t),s))),n.set(Set,(t,s)=>new Set(m(Array.from(t),s))),a.constructorHandlers)for(let t of a.constructorHandlers)n.set(t[0],t[1]);let r=null;return a.proto?f:p;function m(t,s){let o=Object.keys(t),i=new Array(o.length);for(let g=0;g<o.length;g++){let c=o[g],u=t[c];typeof u!="object"||u===null?i[c]=u:u.constructor!==Object&&(r=n.get(u.constructor))?i[c]=r(u,s):ArrayBuffer.isView(u)?i[c]=E(u):i[c]=s(u)}return i}function p(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return m(t,p);if(t.constructor!==Object&&(r=n.get(t.constructor)))return r(t,p);let s={};for(let o in t){if(Object.hasOwnProperty.call(t,o)===!1)continue;let i=t[o];typeof i!="object"||i===null?s[o]=i:i.constructor!==Object&&(r=n.get(i.constructor))?s[o]=r(i,p):ArrayBuffer.isView(i)?s[o]=E(i):s[o]=p(i)}return s}function f(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return m(t,f);if(t.constructor!==Object&&(r=n.get(t.constructor)))return r(t,f);let s={};for(let o in t){let i=t[o];typeof i!="object"||i===null?s[o]=i:i.constructor!==Object&&(r=n.get(i.constructor))?s[o]=r(i,f):ArrayBuffer.isView(i)?s[o]=E(i):s[o]=f(i)}return s}}function K(a){let n=[],r=[],m=new Map;if(m.set(Date,o=>new Date(o)),m.set(Map,(o,i)=>new Map(f(Array.from(o),i))),m.set(Set,(o,i)=>new Set(f(Array.from(o),i))),a.constructorHandlers)for(let o of a.constructorHandlers)m.set(o[0],o[1]);let p=null;return a.proto?s:t;function f(o,i){let g=Object.keys(o),c=new Array(g.length);for(let u=0;u<g.length;u++){let b=g[u],d=o[b];if(typeof d!="object"||d===null)c[b]=d;else if(d.constructor!==Object&&(p=m.get(d.constructor)))c[b]=p(d,i);else if(ArrayBuffer.isView(d))c[b]=E(d);else{let v=n.indexOf(d);v!==-1?c[b]=r[v]:c[b]=i(d)}}return c}function t(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return f(o,t);if(o.constructor!==Object&&(p=m.get(o.constructor)))return p(o,t);let i={};n.push(o),r.push(i);for(let g in o){if(Object.hasOwnProperty.call(o,g)===!1)continue;let c=o[g];if(typeof c!="object"||c===null)i[g]=c;else if(c.constructor!==Object&&(p=m.get(c.constructor)))i[g]=p(c,t);else if(ArrayBuffer.isView(c))i[g]=E(c);else{let u=n.indexOf(c);u!==-1?i[g]=r[u]:i[g]=t(c)}}return n.pop(),r.pop(),i}function s(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return f(o,s);if(o.constructor!==Object&&(p=m.get(o.constructor)))return p(o,s);let i={};n.push(o),r.push(i);for(let g in o){let c=o[g];if(typeof c!="object"||c===null)i[g]=c;else if(c.constructor!==Object&&(p=m.get(c.constructor)))i[g]=p(c,s);else if(ArrayBuffer.isView(c))i[g]=E(c);else{let u=n.indexOf(c);u!==-1?i[g]=r[u]:i[g]=s(c)}}return n.pop(),r.pop(),i}}});T();import H from"node:fs/promises";var x=P(_(),1);var B=P(_(),1);var U=P(_(),1),y=e.object({errorReporting:e.object({url:e.string().optional(),artifact:e.object({fullArtifactId:e.string().max(255).min(1),version:e.string().max(255).min(1)}).optional()}).optional()}),j=e.object({iframeUrl:e.string().optional(),scriptAsset:e.object({exportedName:e.string(),containerId:e.string(),url:e.string(),scriptType:e.string().optional()}).optional()}),V=e.object({hostingPlatform:e.string(),fullPage:e.boolean().nullish(),hideInSidebar:e.boolean().nullish(),priority:e.number().nullish(),routePath:e.string().nullish(),title:e.string(),pageCategoryId:e.string().uuid().nullish(),activeSidebarPageId:e.string().nullish(),requiredPermission:e.string().nullish(),previousRoutePaths:e.array(e.string()).nullish()}).merge(y).merge(j).passthrough(),$=e.object({width:e.number().nullish(),height:e.number().nullish()}).merge(j).passthrough(),I=e.object({appId:e.string(),componentId:e.string().uuid(),spec:e.string().min(1),variantValue:e.string()}).passthrough().optional(),Y=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_PAGE),compData:e.object({backOfficePage:V}),compName:e.string().optional(),experiment:I}).passthrough(),X=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_EXTENSION),compData:e.object({backOfficeExtension:e.object({hostingPlatform:e.string(),extends:e.string(),title:e.string().nullish(),extensionType:e.literal(w.BACK_OFFICE_EXTENSION_WIDGET),requiredPermission:e.string().nullish(),widget:$}).merge(y).passthrough()}),compName:e.string().optional(),experiment:I}).passthrough(),q=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_EXTENSION_WIDGET),compData:e.object({backOfficeExtensionWidget:e.object({hostingPlatform:e.string(),extends:e.string(),title:e.string().nullish(),description:e.string().optional(),requiredPermission:e.string().nullish(),width:e.number().nullish(),height:e.number().nullish()}).merge(j).merge(y).passthrough()}),compName:e.string().optional(),experiment:I}).passthrough(),z=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_EXTENSION_MENU_ITEM),compData:e.object({backOfficeExtensionMenuItem:e.object({id:e.string().uuid(),title:e.string().min(1),subtitle:e.string().max(200).optional(),iconKey:e.string().min(3).max(50).optional(),extends:e.string().uuid(),action:e.object({navigateToPage:e.object({pageId:e.string().uuid(),relativeUrl:e.string().optional()}),openModal:e.object({componentId:e.string().uuid(),componentParams:e.record(e.string().min(1),e.string().min(1)).optional()})}).partial().superRefine((a,n)=>{!a.navigateToPage&&!a.openModal&&n.addIssue({code:e.ZodIssueCode.custom,message:"action must have either navigateToPage or openModal"}),a.navigateToPage&&a.openModal&&n.addIssue({code:e.ZodIssueCode.custom,message:"action can't have both navigateToPage and openModal"})}),sentryDSN:e.string().optional(),requiredPermission:e.string().optional()}).merge(j).merge(y).passthrough()}),compName:e.string().optional(),experiment:I}).passthrough(),J=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_MODAL),compData:e.object({backOfficeModal:e.object({hostingPlatform:e.string(),title:e.string().nullish(),requiredPermission:e.string().nullish(),width:e.number().nullish(),height:e.number().nullish()}).merge(j).merge(y).passthrough()}),compName:e.string().optional(),experiment:I}).passthrough(),Z=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_SIDEBAR_CATEGORY),compData:e.object({backOfficeSidebarCategory:e.object({hostingPlatform:e.string(),title:e.string(),priority:e.number().nullish()})}),compName:e.string().optional()}).passthrough(),Q=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_WIDGET),compName:e.string().optional()}).passthrough(),ee=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_EXTENSION_CONTAINER),compName:e.string().optional()}).passthrough(),k=e.object({packageName:e.string().min(2).max(100),version:e.number().int().min(0)}),te=e.object({template:e.string(),name:e.string(),pages:e.enum([S.NONE_PAGES,S.ONCE,S.SPECIFIC_PAGES]),placement:e.enum([O.HEAD,O.BODY_START,O.BODY_END,O.NONE_PLACEMENT]),connectArticleUrl:e.string(),embedCategory:e.enum([h.UNKNOWN,h.FUNCTIONAL,h.ESSENTIAL,h.ANALYTICS,h.ADVERTISING]),loadOnce:e.boolean(),allowedForFreeSite:e.boolean(),dependencies:e.array(k)}),oe=e.object({compId:e.string(),compType:e.literal(l.EMBEDDED_SCRIPT),compName:e.string().optional(),compData:e.object({embeddedScriptComponentData:te})}).passthrough(),ie=e.object({base:e.object({id:e.string().optional(),name:e.string()}),installation:e.object({base:e.object({autoAdd:e.boolean().optional(),essential:e.boolean().optional(),maxInstances:e.number().optional()}).optional(),widget:e.object({default_preset:e.object({desktop_preset_id:e.string().optional(),tablet_preset_id:e.string().optional(),mobile_preset_id:e.string().optional()}).optional(),region:e.enum([A.BODY,A.FOOTER,A.HEADER])}).optional()}).optional(),widgetData:e.object({tagName:e.string(),scriptUrl:e.string(),scriptType:e.enum([C.NONE,C.COMMON_JS,C.ES_MODULE])}),behaviors:e.object({settings:e.object({settingsUrl:e.string()}).optional(),dashboard:e.object({dashboardPageComponentId:e.string()}).optional()}),size:e.object({width:e.object({allowStretch:e.boolean().optional(),defaultWidth:e.number().optional(),stretchByDefault:e.boolean().optional()}),height:e.object({defaultHeight:e.number(),heightMode:e.enum([N.AUTO,N.FIXED,N.UNKNOWN]).optional()})}),dependencies:e.array(k)}),re=e.object({compId:e.string(),compType:e.literal(l.CUSTOM_ELEMENT_WIDGET),compName:e.string().optional(),compData:e.object({customElementWidget:ie})}).passthrough(),ne=e.object({compId:e.string().uuid(),compType:e.literal(l.WEBHOOK),compName:e.string().optional(),compData:e.object({webhook:e.object({webhookSlug:e.string(),callbackUrl:e.string()})})}).passthrough(),ae=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_SHIPPING_RATES),compName:e.string().optional(),compData:e.object({ecomShippingRates:e.object({name:e.string(),deploymentUri:e.string(),description:e.string().optional(),learnMoreUrl:e.string().url().optional(),dashboardUrl:e.string().url().optional(),fallbackDefinitionMandatory:e.boolean().optional(),thumbnailUrl:e.string().url().optional()})})}).passthrough(),se=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_ADDITIONAL_FEES),compName:e.string().optional(),compData:e.object({ecomAdditionalFees:e.object({deploymentUri:e.string()})})}).passthrough(),ce=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_DISCOUNTS_TRIGGER),compName:e.string().optional(),compData:e.object({ecomDiscountsTrigger:e.object({deploymentUri:e.string()})})}).passthrough(),le=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_VALIDATIONS),compName:e.string().optional(),compData:e.object({ecomValidations:e.object({deploymentUri:e.string(),validateInCart:e.boolean().optional()})})}).passthrough(),pe=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_PAYMENT_SETTINGS),compName:e.string().optional(),compData:e.object({ecomPaymentSettings:e.object({deploymentUri:e.string(),fallbackValueForRequires3dSecure:e.boolean().optional()})})}).passthrough(),me=e.object({compType:e.literal(l.TOPOLOGY),compId:e.string(),compName:e.string().optional(),compData:e.object({topology:e.object({topology:e.object({backendApiUrl:e.string().url()})})})}).passthrough(),ge=e.object({appId:e.string(),components:e.array(e.discriminatedUnion("compType",[Y,X,q,z,J,Z,Q,ee,oe,re,ne,se,ae,ce,le,pe,me]))});async function je(a){try{let n=await H.readFile(a,"utf-8");return ge.parse(JSON.parse(n))}catch(n){let r=n instanceof Error?n.toString():JSON.stringify(n);throw new Error(`Failed to read App Manifest at ${a}: ${r}`)}}var Ie=(0,x.default)();var ue=(0,B.default)(),M=(a,n)=>new URL(a,n).href,D=(a,n)=>{let{scriptAsset:r,iframeUrl:m}=a;return r?{scriptAsset:{...r,url:M(r.url,n)}}:m?{iframeUrl:M(m,n)}:a},fe=(a,n)=>({template:a.template.replaceAll("__STATICS_BASE_URL_PLACEHOLDER__",n)}),Ae=(a,n,r)=>{let m=ue(a),p=n.endsWith("/")?n:`${n}/`;return m.components.forEach(f=>{let{compData:t,compType:s}=f;s===l.BACK_OFFICE_PAGE&&(t.backOfficePage={...t.backOfficePage,...D(t.backOfficePage,p)}),s===l.BACK_OFFICE_EXTENSION&&(t.backOfficeExtension.widget={...t.backOfficeExtension.widget,...D(t.backOfficeExtension.widget,p)}),s===l.BACK_OFFICE_EXTENSION_WIDGET&&(t.backOfficeExtensionWidget={...t.backOfficeExtensionWidget,...D(t.backOfficeExtensionWidget,p)}),s===l.BACK_OFFICE_MODAL&&(t.backOfficeModal={...t.backOfficeModal,...D(t.backOfficeModal,p)}),s===l.EMBEDDED_SCRIPT&&(t.embeddedScriptComponentData={...t.embeddedScriptComponentData,...fe(t.embeddedScriptComponentData,p)}),s===l.CUSTOM_ELEMENT_WIDGET&&(t.customElementWidget={...t.customElementWidget,widgetData:{...t.customElementWidget.widgetData,scriptUrl:M(t.customElementWidget.widgetData.scriptUrl,p)},behaviors:{...t.customElementWidget.behaviors,...t.customElementWidget.behaviors.settings?{settings:{settingsUrl:M(t.customElementWidget.behaviors.settings.settingsUrl,p)}}:{}}}),s===l.WEBHOOK&&r&&(t.webhook={...t.webhook,callbackUrl:`${r}/webhooks`}),s===l.ECOM_ADDITIONAL_FEES&&r&&(t.ecomAdditionalFees={...t.ecomAdditionalFees,deploymentUri:`${r}/service-plugins`}),s===l.ECOM_SHIPPING_RATES&&r&&(t.ecomShippingRates={...t.ecomShippingRates,deploymentUri:`${r}/service-plugins`}),s===l.ECOM_VALIDATIONS&&r&&(t.ecomValidations={...t.ecomValidations,deploymentUri:`${r}/service-plugins`}),s===l.ECOM_DISCOUNTS_TRIGGER&&r&&(t.ecomDiscountsTrigger={...t.ecomDiscountsTrigger,deploymentUri:`${r}/service-plugins`}),s===l.ECOM_PAYMENT_SETTINGS&&r&&(t.ecomPaymentSettings={...t.ecomPaymentSettings,deploymentUri:`${r}/service-plugins`})}),m},de=(0,U.default)(),Ce=(a,n)=>{let{baseApiUrl:r,id:m}=n;if(!m&&!r)return a;let p=de(a);return p.components.forEach(f=>{f.compType===l.TOPOLOGY&&(m&&(f.compId=m),r&&(f.compData.topology.topology.backendApiUrl=r))}),p};export{je as a,Ae as b,Ce as c};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{J as l,K as A,L as S,M as O,N as h,O as w,R as C,S as N}from"./chunk-MIBBNKYS.js";import{l as e}from"./chunk-R3JUFM5X.js";import{c as R,e as P,h as T}from"./chunk-V4TR6DCM.js";var _=R((be,F)=>{"use strict";T();F.exports=L;function E(a){return a instanceof Buffer?Buffer.from(a):new a.constructor(a.buffer.slice(),a.byteOffset,a.length)}function L(a){if(a=a||{},a.circles)return K(a);let n=new Map;if(n.set(Date,t=>new Date(t)),n.set(Map,(t,s)=>new Map(m(Array.from(t),s))),n.set(Set,(t,s)=>new Set(m(Array.from(t),s))),a.constructorHandlers)for(let t of a.constructorHandlers)n.set(t[0],t[1]);let r=null;return a.proto?f:p;function m(t,s){let o=Object.keys(t),i=new Array(o.length);for(let g=0;g<o.length;g++){let c=o[g],u=t[c];typeof u!="object"||u===null?i[c]=u:u.constructor!==Object&&(r=n.get(u.constructor))?i[c]=r(u,s):ArrayBuffer.isView(u)?i[c]=E(u):i[c]=s(u)}return i}function p(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return m(t,p);if(t.constructor!==Object&&(r=n.get(t.constructor)))return r(t,p);let s={};for(let o in t){if(Object.hasOwnProperty.call(t,o)===!1)continue;let i=t[o];typeof i!="object"||i===null?s[o]=i:i.constructor!==Object&&(r=n.get(i.constructor))?s[o]=r(i,p):ArrayBuffer.isView(i)?s[o]=E(i):s[o]=p(i)}return s}function f(t){if(typeof t!="object"||t===null)return t;if(Array.isArray(t))return m(t,f);if(t.constructor!==Object&&(r=n.get(t.constructor)))return r(t,f);let s={};for(let o in t){let i=t[o];typeof i!="object"||i===null?s[o]=i:i.constructor!==Object&&(r=n.get(i.constructor))?s[o]=r(i,f):ArrayBuffer.isView(i)?s[o]=E(i):s[o]=f(i)}return s}}function K(a){let n=[],r=[],m=new Map;if(m.set(Date,o=>new Date(o)),m.set(Map,(o,i)=>new Map(f(Array.from(o),i))),m.set(Set,(o,i)=>new Set(f(Array.from(o),i))),a.constructorHandlers)for(let o of a.constructorHandlers)m.set(o[0],o[1]);let p=null;return a.proto?s:t;function f(o,i){let g=Object.keys(o),c=new Array(g.length);for(let u=0;u<g.length;u++){let b=g[u],d=o[b];if(typeof d!="object"||d===null)c[b]=d;else if(d.constructor!==Object&&(p=m.get(d.constructor)))c[b]=p(d,i);else if(ArrayBuffer.isView(d))c[b]=E(d);else{let v=n.indexOf(d);v!==-1?c[b]=r[v]:c[b]=i(d)}}return c}function t(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return f(o,t);if(o.constructor!==Object&&(p=m.get(o.constructor)))return p(o,t);let i={};n.push(o),r.push(i);for(let g in o){if(Object.hasOwnProperty.call(o,g)===!1)continue;let c=o[g];if(typeof c!="object"||c===null)i[g]=c;else if(c.constructor!==Object&&(p=m.get(c.constructor)))i[g]=p(c,t);else if(ArrayBuffer.isView(c))i[g]=E(c);else{let u=n.indexOf(c);u!==-1?i[g]=r[u]:i[g]=t(c)}}return n.pop(),r.pop(),i}function s(o){if(typeof o!="object"||o===null)return o;if(Array.isArray(o))return f(o,s);if(o.constructor!==Object&&(p=m.get(o.constructor)))return p(o,s);let i={};n.push(o),r.push(i);for(let g in o){let c=o[g];if(typeof c!="object"||c===null)i[g]=c;else if(c.constructor!==Object&&(p=m.get(c.constructor)))i[g]=p(c,s);else if(ArrayBuffer.isView(c))i[g]=E(c);else{let u=n.indexOf(c);u!==-1?i[g]=r[u]:i[g]=s(c)}}return n.pop(),r.pop(),i}}});T();import H from"node:fs/promises";var x=P(_(),1);var B=P(_(),1);var U=P(_(),1),y=e.object({errorReporting:e.object({url:e.string().optional(),artifact:e.object({fullArtifactId:e.string().max(255).min(1),version:e.string().max(255).min(1)}).optional()}).optional()}),j=e.object({iframeUrl:e.string().optional(),scriptAsset:e.object({exportedName:e.string(),containerId:e.string(),url:e.string(),scriptType:e.string().optional()}).optional()}),V=e.object({hostingPlatform:e.string(),fullPage:e.boolean().nullish(),hideInSidebar:e.boolean().nullish(),priority:e.number().nullish(),routePath:e.string().nullish(),title:e.string(),pageCategoryId:e.string().uuid().nullish(),activeSidebarPageId:e.string().nullish(),requiredPermission:e.string().nullish(),previousRoutePaths:e.array(e.string()).nullish()}).merge(y).merge(j).passthrough(),$=e.object({width:e.number().nullish(),height:e.number().nullish()}).merge(j).passthrough(),I=e.object({appId:e.string(),componentId:e.string().uuid(),spec:e.string().min(1),variantValue:e.string()}).passthrough().optional(),Y=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_PAGE),compData:e.object({backOfficePage:V}),compName:e.string().optional(),experiment:I}).passthrough(),X=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_EXTENSION),compData:e.object({backOfficeExtension:e.object({hostingPlatform:e.string(),extends:e.string(),title:e.string().nullish(),extensionType:e.literal(w.BACK_OFFICE_EXTENSION_WIDGET),requiredPermission:e.string().nullish(),widget:$}).merge(y).passthrough()}),compName:e.string().optional(),experiment:I}).passthrough(),q=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_EXTENSION_WIDGET),compData:e.object({backOfficeExtensionWidget:e.object({hostingPlatform:e.string(),extends:e.string(),title:e.string().nullish(),description:e.string().optional(),requiredPermission:e.string().nullish(),width:e.number().nullish(),height:e.number().nullish()}).merge(j).merge(y).passthrough()}),compName:e.string().optional(),experiment:I}).passthrough(),z=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_EXTENSION_MENU_ITEM),compData:e.object({backOfficeExtensionMenuItem:e.object({id:e.string().uuid(),title:e.string().min(1),subtitle:e.string().max(200).optional(),iconKey:e.string().min(3).max(50).optional(),extends:e.string().uuid(),action:e.object({navigateToPage:e.object({pageId:e.string().uuid(),relativeUrl:e.string().optional()}),openModal:e.object({componentId:e.string().uuid(),componentParams:e.record(e.string().min(1),e.string().min(1)).optional()})}).partial().superRefine((a,n)=>{!a.navigateToPage&&!a.openModal&&n.addIssue({code:e.ZodIssueCode.custom,message:"action must have either navigateToPage or openModal"}),a.navigateToPage&&a.openModal&&n.addIssue({code:e.ZodIssueCode.custom,message:"action can't have both navigateToPage and openModal"})}),sentryDSN:e.string().optional(),requiredPermission:e.string().optional()}).merge(j).merge(y).passthrough()}),compName:e.string().optional(),experiment:I}).passthrough(),J=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_MODAL),compData:e.object({backOfficeModal:e.object({hostingPlatform:e.string(),title:e.string().nullish(),requiredPermission:e.string().nullish(),width:e.number().nullish(),height:e.number().nullish()}).merge(j).merge(y).passthrough()}),compName:e.string().optional(),experiment:I}).passthrough(),Z=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_SIDEBAR_CATEGORY),compData:e.object({backOfficeSidebarCategory:e.object({hostingPlatform:e.string(),title:e.string(),priority:e.number().nullish()})}),compName:e.string().optional()}).passthrough(),Q=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_WIDGET),compName:e.string().optional()}).passthrough(),ee=e.object({compId:e.string(),compType:e.literal(l.BACK_OFFICE_EXTENSION_CONTAINER),compName:e.string().optional()}).passthrough(),k=e.object({packageName:e.string().min(2).max(100),version:e.number().int().min(0)}),te=e.object({template:e.string(),name:e.string(),pages:e.enum([S.NONE_PAGES,S.ONCE,S.SPECIFIC_PAGES]),placement:e.enum([O.HEAD,O.BODY_START,O.BODY_END,O.NONE_PLACEMENT]),connectArticleUrl:e.string(),embedCategory:e.enum([h.UNKNOWN,h.FUNCTIONAL,h.ESSENTIAL,h.ANALYTICS,h.ADVERTISING]),loadOnce:e.boolean(),allowedForFreeSite:e.boolean(),dependencies:e.array(k)}),oe=e.object({compId:e.string(),compType:e.literal(l.EMBEDDED_SCRIPT),compName:e.string().optional(),compData:e.object({embeddedScriptComponentData:te})}).passthrough(),ie=e.object({base:e.object({id:e.string().optional(),name:e.string()}),installation:e.object({base:e.object({autoAdd:e.boolean().optional(),essential:e.boolean().optional(),maxInstances:e.number().optional()}).optional(),widget:e.object({default_preset:e.object({desktop_preset_id:e.string().optional(),tablet_preset_id:e.string().optional(),mobile_preset_id:e.string().optional()}).optional(),region:e.enum([A.BODY,A.FOOTER,A.HEADER])}).optional()}).optional(),widgetData:e.object({tagName:e.string(),scriptUrl:e.string(),scriptType:e.enum([C.NONE,C.COMMON_JS,C.ES_MODULE])}),behaviors:e.object({settings:e.object({settingsUrl:e.string()}).optional(),dashboard:e.object({dashboardPageComponentId:e.string()}).optional()}),size:e.object({width:e.object({allowStretch:e.boolean().optional(),defaultWidth:e.number().optional(),stretchByDefault:e.boolean().optional()}),height:e.object({defaultHeight:e.number(),heightMode:e.enum([N.AUTO,N.FIXED,N.UNKNOWN]).optional()})}),dependencies:e.array(k)}),re=e.object({compId:e.string(),compType:e.literal(l.CUSTOM_ELEMENT_WIDGET),compName:e.string().optional(),compData:e.object({customElementWidget:ie})}).passthrough(),ne=e.object({compId:e.string().uuid(),compType:e.literal(l.WEBHOOK),compName:e.string().optional(),compData:e.object({webhook:e.object({webhookSlug:e.string(),callbackUrl:e.string()})})}).passthrough(),ae=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_SHIPPING_RATES),compName:e.string().optional(),compData:e.object({ecomShippingRates:e.object({name:e.string(),deploymentUri:e.string(),description:e.string().optional(),learnMoreUrl:e.string().url().optional(),dashboardUrl:e.string().url().optional(),fallbackDefinitionMandatory:e.boolean().optional(),thumbnailUrl:e.string().url().optional()})})}).passthrough(),se=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_ADDITIONAL_FEES),compName:e.string().optional(),compData:e.object({ecomAdditionalFees:e.object({deploymentUri:e.string()})})}).passthrough(),ce=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_DISCOUNTS_TRIGGER),compName:e.string().optional(),compData:e.object({ecomDiscountsTrigger:e.object({deploymentUri:e.string()})})}).passthrough(),le=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_VALIDATIONS),compName:e.string().optional(),compData:e.object({ecomValidations:e.object({deploymentUri:e.string(),validateInCart:e.boolean().optional()})})}).passthrough(),pe=e.object({compId:e.string().uuid(),compType:e.literal(l.ECOM_PAYMENT_SETTINGS),compName:e.string().optional(),compData:e.object({ecomPaymentSettings:e.object({deploymentUri:e.string(),fallbackValueForRequires3dSecure:e.boolean().optional()})})}).passthrough(),me=e.object({compType:e.literal(l.TOPOLOGY),compId:e.string(),compName:e.string().optional(),compData:e.object({topology:e.object({topology:e.object({backendApiUrl:e.string().url()})})})}).passthrough(),ge=e.object({appId:e.string(),components:e.array(e.discriminatedUnion("compType",[Y,X,q,z,J,Z,Q,ee,oe,re,ne,se,ae,ce,le,pe,me]))});async function je(a){try{let n=await H.readFile(a,"utf-8");return ge.parse(JSON.parse(n))}catch(n){let r=n instanceof Error?n.toString():JSON.stringify(n);throw new Error(`Failed to read App Manifest at ${a}: ${r}`)}}var Ie=(0,x.default)();var ue=(0,B.default)(),M=(a,n)=>new URL(a,n).href,D=(a,n)=>{let{scriptAsset:r,iframeUrl:m}=a;return r?{scriptAsset:{...r,url:M(r.url,n)}}:m?{iframeUrl:M(m,n)}:a},fe=(a,n)=>({template:a.template.replaceAll("__STATICS_BASE_URL_PLACEHOLDER__",n)}),Ae=(a,n,r)=>{let m=ue(a),p=n.endsWith("/")?n:`${n}/`;return m.components.forEach(f=>{let{compData:t,compType:s}=f;s===l.BACK_OFFICE_PAGE&&(t.backOfficePage={...t.backOfficePage,...D(t.backOfficePage,p)}),s===l.BACK_OFFICE_EXTENSION&&(t.backOfficeExtension.widget={...t.backOfficeExtension.widget,...D(t.backOfficeExtension.widget,p)}),s===l.BACK_OFFICE_EXTENSION_WIDGET&&(t.backOfficeExtensionWidget={...t.backOfficeExtensionWidget,...D(t.backOfficeExtensionWidget,p)}),s===l.BACK_OFFICE_MODAL&&(t.backOfficeModal={...t.backOfficeModal,...D(t.backOfficeModal,p)}),s===l.EMBEDDED_SCRIPT&&(t.embeddedScriptComponentData={...t.embeddedScriptComponentData,...fe(t.embeddedScriptComponentData,p)}),s===l.CUSTOM_ELEMENT_WIDGET&&(t.customElementWidget={...t.customElementWidget,widgetData:{...t.customElementWidget.widgetData,scriptUrl:M(t.customElementWidget.widgetData.scriptUrl,p)},behaviors:{...t.customElementWidget.behaviors,...t.customElementWidget.behaviors.settings?{settings:{settingsUrl:M(t.customElementWidget.behaviors.settings.settingsUrl,p)}}:{}}}),s===l.WEBHOOK&&r&&(t.webhook={...t.webhook,callbackUrl:`${r}/webhooks`}),s===l.ECOM_ADDITIONAL_FEES&&r&&(t.ecomAdditionalFees={...t.ecomAdditionalFees,deploymentUri:`${r}/service-plugins`}),s===l.ECOM_SHIPPING_RATES&&r&&(t.ecomShippingRates={...t.ecomShippingRates,deploymentUri:`${r}/service-plugins`}),s===l.ECOM_VALIDATIONS&&r&&(t.ecomValidations={...t.ecomValidations,deploymentUri:`${r}/service-plugins`}),s===l.ECOM_DISCOUNTS_TRIGGER&&r&&(t.ecomDiscountsTrigger={...t.ecomDiscountsTrigger,deploymentUri:`${r}/service-plugins`}),s===l.ECOM_PAYMENT_SETTINGS&&r&&(t.ecomPaymentSettings={...t.ecomPaymentSettings,deploymentUri:`${r}/service-plugins`})}),m},de=(0,U.default)(),Ce=(a,n)=>{let{baseApiUrl:r,id:m}=n;if(!m&&!r)return a;let p=de(a);return p.components.forEach(f=>{f.compType===l.TOPOLOGY&&(m&&(f.compId=m),r&&(f.compData.topology.topology.backendApiUrl=r))}),p};export{je as a,Ae as b,Ce as c};
|
|
4
|
+
//# sourceMappingURL=chunk-4YU6J2EW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{mb as p,va as r}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{mb as p,va as r}from"./chunk-MIBBNKYS.js";import{a as v,b as f}from"./chunk-R3JUFM5X.js";import{e as m,h as c}from"./chunk-V4TR6DCM.js";c();var s=m(v(),1),i=m(f(),1);function k(){let{model:t}=p(),n=(0,s.useMemo)(()=>{let l=t.components.filter((0,i.isType)(r.Api)).sort((e,o)=>e.title.localeCompare(o.title)),a=t.components.filter((0,i.isType)(r.Event)).sort((e,o)=>e.title.localeCompare(o.title)),u=t.components.filter((0,i.isType)(r.ServicePlugin)).sort((e,o)=>e.servicePlugin.name.localeCompare(o.servicePlugin.name));return{Api:l,Event:a,ServicePlugin:u}},[t.components]);return{backendComponents:[...n.Api,...n.Event,...n.ServicePlugin],backendComponentsByType:n}}export{k as a};
|
|
4
|
+
//# sourceMappingURL=chunk-6QCQALVT.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{Ua as e,u as r}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{Ua as e,u as r}from"./chunk-MIBBNKYS.js";import{a as m}from"./chunk-R3JUFM5X.js";import{e as t,h as i}from"./chunk-V4TR6DCM.js";i();var p=t(m(),1);function f(){let o=r();return(0,p.useMemo)(()=>e(o),[o])}i();export{f as a};
|
|
4
|
+
//# sourceMappingURL=chunk-7OVUUUVH.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{mb as i,va as d}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{mb as i,va as d}from"./chunk-MIBBNKYS.js";import{a as b,b as D}from"./chunk-R3JUFM5X.js";import{e as r,h as p}from"./chunk-V4TR6DCM.js";p();var n=r(b(),1),u=r(D(),1);var E=(0,u.typeCatalog)(d);function C(){let{model:t}=i(),e=(0,n.useMemo)(()=>{let o=t.components.reduce((s,a)=>(s[a.type].push(a),s),{DashboardPage:[],DashboardSidebarCategory:[],EmbeddedScript:[],CustomElement:[],DashboardPlugin:[],DashboardMenuPlugin:[],DashboardModal:[],Topology:[],Api:[],Event:[],ServicePlugin:[]});return o.DashboardPage=o.DashboardPage.sort((s,a)=>s.route.localeCompare(a.route)),o},[t.components]),h=(0,n.useMemo)(()=>[...e.DashboardPage,...e.DashboardMenuPlugin,...e.DashboardPlugin,...e.DashboardModal],[e]),l=(0,n.useCallback)(o=>o?e[o].length>0:t.components.length>0,[e,t.components]),m=(0,n.useCallback)(o=>e[o],[e]);return{dashboardExtensions:h,getExtensions:m,hasExtensions:l}}export{C as a};
|
|
4
|
+
//# sourceMappingURL=chunk-BW3SDDV3.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
+
const require = _createRequire(import.meta.url);
|
|
3
|
+
import{a as n}from"./chunk-YHA4H34H.js";import{X as t}from"./chunk-R3JUFM5X.js";import{h as r}from"./chunk-V4TR6DCM.js";r();function s(){let e=t(n);return e.t.bind(e)}export{s as a};
|
|
4
|
+
//# sourceMappingURL=chunk-GK5AZX2F.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{v as f,w as m}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{v as f,w as m}from"./chunk-MIBBNKYS.js";import{f as l,g as d,v as U}from"./chunk-R3JUFM5X.js";import{e as O,h as o}from"./chunk-V4TR6DCM.js";o();import{randomUUID as k}from"node:crypto";function L(r,t){r.updateDefaults(N(t))}function N(r){return r?{_client_id:r,_uuid:r,logged_user_id:r,logged_account_id:r,target_account_id:r}:{_client_id:k()}}o();import{uptime as h}from"node:process";o();var u=O(U(),1);import V from"node:os";import{platform as b,version as B}from"node:process";function w({cliVersion:r,flow:t}){return{...t?{flow:t}:{},cliVersion:r,isCI:u.default,nodeVersion:B,osName:F(),osVersion:V.release()}}function F(){switch(b){case"darwin":return"mac";case"win32":return"windows";default:return"linux"}}var x=()=>Math.round(h()*1e3);function j({biLogger:r,command:t,flow:y,cliVersion:E,projectId:p,extensions:n}){let S=t.opts(),C=t.args,_=new Set(["apiKey"]),c=Object.fromEntries(Object.entries(S).map(([e,s])=>{let v=_.has(e)?"<censored>":s;return[e,v]})),i={command:t.name(),arguments:C.join(","),flags:Object.keys(c).length?JSON.stringify(c):""};return r.report(f({...w({cliVersion:E,flow:y}),...i,...p?{projectId:p}:{},isValid:!0})),{succeed(){r.report(m({...i,...n?{extensions:JSON.stringify(n)}:{},duration:x(),isSuccess:!0,isValid:!0}))},failed(e){let s=l(e)?{errorType:d(e)?"SystemError":"UserError",errorName:e.name,errorMessage:e.message}:e instanceof Error?{errorType:"UnknownError",errorName:e.name,errorMessage:e.message}:{errorType:"UnknownError",errorMessage:JSON.stringify(e)};r.report(m({...i,...s,...n?{extensions:JSON.stringify(n)}:{},duration:x(),isSuccess:!1,isValid:!0}))}}}o();export{L as a,j as b};
|
|
4
|
+
//# sourceMappingURL=chunk-I2Z6OIJW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{b as p}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{b as p}from"./chunk-3Q7TAN43.js";import{b as r,c as i}from"./chunk-4YU6J2EW.js";import{h as o}from"./chunk-V4TR6DCM.js";o();var M=async({model:e,arm:a,serveUrl:n,backendServerUrl:t,topologyComponentId:s})=>{let l=await p(e.projectFolder),m=i(r(l,n,t),{id:s,baseApiUrl:t});return a.createAppRelease(m,e.config.projectId)};export{M as a};
|
|
4
|
+
//# sourceMappingURL=chunk-IBNMP32R.js.map
|