@juuno-sdk/cli 1.0.10 → 1.0.12

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.
Files changed (56) hide show
  1. package/README.md +61 -11
  2. package/bin/cli-router.js +18 -4
  3. package/bin/cli.js +40 -15
  4. package/dist/cli/src/auth/index.js +128 -39
  5. package/dist/cli/src/deploy/index.js +11 -6
  6. package/dist/cli/src/info/index.js +3 -3
  7. package/dist/cli/src/list/index.js +3 -3
  8. package/dist/cli/src/login/index.js +11 -8
  9. package/dist/cli/src/logout/index.js +29 -8
  10. package/dist/cli/src/whoami/index.js +31 -10
  11. package/dist/cli/tsconfig.build.tsbuildinfo +1 -1
  12. package/dist/types/src/auth/index.d.ts +84 -0
  13. package/dist/types/src/auth/index.d.ts.map +1 -0
  14. package/dist/{cli → types}/src/deploy/index.d.ts +6 -0
  15. package/dist/{cli → types}/src/deploy/index.d.ts.map +1 -1
  16. package/dist/{cli → types}/src/info/index.d.ts.map +1 -1
  17. package/dist/{cli → types}/src/list/index.d.ts.map +1 -1
  18. package/dist/{cli → types}/src/login/index.d.ts +3 -1
  19. package/dist/types/src/login/index.d.ts.map +1 -0
  20. package/dist/types/src/logout/index.d.ts +12 -0
  21. package/dist/types/src/logout/index.d.ts.map +1 -0
  22. package/dist/types/src/whoami/index.d.ts +12 -0
  23. package/dist/types/src/whoami/index.d.ts.map +1 -0
  24. package/package.json +26 -26
  25. package/dist/assets/main-B8xiNI5_.js +0 -1
  26. package/dist/assets/main-Bf2N9gBQ.js +0 -1
  27. package/dist/assets/main-Bo8Yyr87.js +0 -1
  28. package/dist/assets/main-C3hW0d-b.css +0 -1
  29. package/dist/assets/main-C6ZAJydH.js +0 -1
  30. package/dist/assets/main-CCYNXtGp.css +0 -1
  31. package/dist/assets/main-COSZCfRq.css +0 -1
  32. package/dist/assets/main-CnpUG-52.js +0 -1
  33. package/dist/assets/main-D0353jp3.js +0 -1
  34. package/dist/assets/main-D7UD6CXw.css +0 -1
  35. package/dist/assets/main-DC3n4QV-.css +0 -1
  36. package/dist/assets/main-DWrNgA-L.js +0 -1
  37. package/dist/assets/main-HbFBqUMx.js +0 -1
  38. package/dist/assets/main-jQYqLcLk.js +0 -1
  39. package/dist/cli/src/auth/index.d.ts +0 -51
  40. package/dist/cli/src/auth/index.d.ts.map +0 -1
  41. package/dist/cli/src/login/index.d.ts.map +0 -1
  42. package/dist/cli/src/logout/index.d.ts +0 -5
  43. package/dist/cli/src/logout/index.d.ts.map +0 -1
  44. package/dist/cli/src/monorepo/index.d.ts +0 -37
  45. package/dist/cli/src/monorepo/index.d.ts.map +0 -1
  46. package/dist/cli/src/monorepo/index.js +0 -94
  47. package/dist/cli/src/whoami/index.d.ts +0 -5
  48. package/dist/cli/src/whoami/index.d.ts.map +0 -1
  49. /package/dist/{cli → types}/src/dev/index.d.ts +0 -0
  50. /package/dist/{cli → types}/src/dev/index.d.ts.map +0 -0
  51. /package/dist/{cli → types}/src/info/index.d.ts +0 -0
  52. /package/dist/{cli → types}/src/list/index.d.ts +0 -0
  53. /package/dist/{cli → types}/src/simulator/index.d.ts +0 -0
  54. /package/dist/{cli → types}/src/simulator/index.d.ts.map +0 -0
  55. /package/dist/{cli → types}/src/utils/fs.d.ts +0 -0
  56. /package/dist/{cli → types}/src/utils/fs.d.ts.map +0 -0
@@ -1 +0,0 @@
1
- import{defineComponent as V,ref as w,computed as S,onMounted as j,onUnmounted as D,createElementBlock as d,openBlock as r,normalizeClass as m,createElementVNode as e,createCommentVNode as A,toDisplayString as _,createTextVNode as O,withDirectives as $,createBlock as R,resolveDynamicComponent as U,vShow as B,shallowRef as T,reactive as I,unref as J,markRaw as P,createApp as q}from"vue";import{provideAppConfigContext as z}from"@juuno-sdk/app-sdk";(function(){const y=document.createElement("link").relList;if(y&&y.supports&&y.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))b(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const n of l.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&b(n)}).observe(document,{childList:!0,subtree:!0});function h(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function b(o){if(o.ep)return;o.ep=!0;const l=h(o);fetch(o.href,l)}})();const H="modulepreload",W=function(a){return"/"+a},N={},F=function(y,h,b){let o=Promise.resolve();if(h&&h.length>0){let n=function(s){return Promise.all(s.map(p=>Promise.resolve(p).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),f=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=n(h.map(s=>{if(s=W(s),s in N)return;N[s]=!0;const p=s.endsWith(".css"),x=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${x}`))return;const k=document.createElement("link");if(k.rel=p?"stylesheet":H,p||(k.as="script"),k.crossOrigin="",k.href=s,f&&k.setAttribute("nonce",f),document.head.appendChild(k),p)return new Promise((E,L)=>{k.addEventListener("load",E),k.addEventListener("error",()=>L(new Error(`Unable to preload CSS for ${s}`)))})}))}function l(n){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=n,window.dispatchEvent(i),!i.defaultPrevented)throw n}return o.then(n=>{for(const i of n||[])i.status==="rejected"&&l(i.reason);return y().catch(l)})},K={class:"header"},X={class:"header-left"},G={class:"app-info"},Q={class:"app-name"},Y={key:0,class:"app-version"},Z={class:"header-right"},ee={key:0,class:"status-badge live"},te={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},oe={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},ne={key:0,class:"loading-state"},le={class:"url-info"},se={key:1,class:"error-state"},ie={class:"error-message"},ae={class:"error-details"},re={key:2,class:"main-content"},ue={class:"tabs"},ce={key:0,class:"tab-controls"},de={class:"tab-panels"},ve={class:"player-frame"},pe={key:1,class:"placeholder"},fe={class:"player-controls"},me={class:"controls-group"},ye=["title"],he={key:0,width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},ge={key:1,width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},we=["title"],ke={key:0,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ce={key:1,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},be=["title"],xe={key:0,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},_e={key:1,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ee={class:"controls-info"},Le={class:"tab-panel config-panel"},Me={key:1,class:"placeholder"},Se={class:"tab-panel meta-panel"},Ae={class:"meta-code"},Pe={name:"SimulatorLayout"},$e=V({...Pe,props:{playerComponent:{},configComponent:{},scene:{},appUrl:{},isLoading:{type:Boolean},error:{},manifest:{},liveReloadActive:{type:Boolean}},emits:["reload"],setup(a,{emit:y}){const h=a,b=y,o=w("player"),l=w("landscape"),n=w(!1),i=w(!1),f=w(!0),s=w(!0),p=w(!1),x=w(3e4),k=S(()=>{var v;return((v=h.manifest)==null?void 0:v.name)||"External App"}),E=S(()=>{var v;return((v=h.manifest)==null?void 0:v.version)||""}),L=S(()=>l.value==="landscape"?"aspect-landscape":"aspect-portrait"),M=S(()=>{var v;try{return JSON.stringify(((v=h.scene)==null?void 0:v.meta)||{},null,2)}catch{return"{}"}});function g(){b("reload")}async function C(){try{await navigator.clipboard.writeText(M.value)}catch{console.warn("Failed to copy to clipboard")}}function u(v){v.key==="Escape"&&n.value&&(n.value=!1)}return j(()=>{window.addEventListener("keydown",u)}),D(()=>{window.removeEventListener("keydown",u)}),(v,t)=>(r(),d("div",{class:m(["simulator-layout",{"dark-mode":i.value}])},[e("header",K,[e("div",X,[t[11]||(t[11]=e("h1",null,"Juuno Simulator",-1)),e("div",G,[e("span",Q,_(k.value),1),E.value?(r(),d("span",Y,"v"+_(E.value),1)):A("",!0)])]),e("div",Z,[a.liveReloadActive?(r(),d("div",ee,[...t[12]||(t[12]=[e("span",{class:"status-dot"},null,-1),O(" Live ",-1)])])):A("",!0),e("button",{class:"icon-btn",title:"Reload app",onClick:g},[...t[13]||(t[13]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M23 4v6h-6M1 20v-6h6M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"})],-1)])]),e("button",{class:"icon-btn",title:"Toggle dark mode",onClick:t[0]||(t[0]=c=>i.value=!i.value)},[i.value?(r(),d("svg",oe,[...t[15]||(t[15]=[e("path",{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"},null,-1)])])):(r(),d("svg",te,[...t[14]||(t[14]=[e("circle",{cx:"12",cy:"12",r:"5"},null,-1),e("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"},null,-1)])]))])])]),a.isLoading?(r(),d("div",ne,[t[16]||(t[16]=e("div",{class:"spinner"},null,-1)),t[17]||(t[17]=e("p",null,"Loading app...",-1)),e("p",le,_(a.appUrl),1)])):a.error?(r(),d("div",se,[t[19]||(t[19]=e("div",{class:"error-icon"},"!",-1)),t[20]||(t[20]=e("h2",null,"Failed to Load App",-1)),e("p",ie,_(a.error),1),e("div",ae,[e("p",null,[t[18]||(t[18]=e("strong",null,"App URL:",-1)),O(" "+_(a.appUrl),1)]),e("button",{class:"retry-btn",onClick:g},"Try Again")])])):(r(),d("div",re,[e("div",ue,[e("button",{class:m(["tab",{active:o.value==="player"}]),onClick:t[1]||(t[1]=c=>o.value="player")}," Player ",2),e("button",{class:m(["tab",{active:o.value==="config"}]),onClick:t[2]||(t[2]=c=>o.value="config")}," Config ",2),e("button",{class:m(["tab",{active:o.value==="meta"}]),onClick:t[3]||(t[3]=c=>o.value="meta")}," Scene Meta ",2),o.value==="player"?(r(),d("div",ce,[e("button",{class:m(["control-btn",{active:l.value==="landscape"}]),title:"Landscape (16:9)",onClick:t[4]||(t[4]=c=>l.value="landscape")},[...t[21]||(t[21]=[e("svg",{width:"18",height:"12",viewBox:"0 0 18 12",fill:"currentColor"},[e("rect",{x:"0.5",y:"0.5",width:"17",height:"11",rx:"1",fill:"none",stroke:"currentColor"})],-1)])],2),e("button",{class:m(["control-btn",{active:l.value==="portrait"}]),title:"Portrait (9:16)",onClick:t[5]||(t[5]=c=>l.value="portrait")},[...t[22]||(t[22]=[e("svg",{width:"12",height:"18",viewBox:"0 0 12 18",fill:"currentColor"},[e("rect",{x:"0.5",y:"0.5",width:"11",height:"17",rx:"1",fill:"none",stroke:"currentColor"})],-1)])],2),e("button",{class:m(["control-btn",{active:n.value}]),title:"Fullscreen (Esc to exit)",onClick:t[6]||(t[6]=c=>n.value=!n.value)},[...t[23]||(t[23]=[e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e("path",{d:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3"})],-1)])],2)])):A("",!0)]),e("div",de,[$(e("div",{class:m(["tab-panel player-panel",{fullscreen:n.value}])},[e("div",{class:m(["player-container",L.value])},[e("div",ve,[a.playerComponent?(r(),R(U(a.playerComponent),{key:a.scene.idx,scene:a.scene,playing:f.value,"is-visible":s.value,"duration-ms":x.value,muted:p.value},null,8,["scene","playing","is-visible","duration-ms","muted"])):(r(),d("div",pe,"No player component"))])],2),e("div",fe,[e("div",me,[e("button",{class:m(["player-btn",{active:f.value}]),title:f.value?"Pause":"Play",onClick:t[7]||(t[7]=c=>f.value=!f.value)},[f.value?(r(),d("svg",he,[...t[24]||(t[24]=[e("rect",{x:"6",y:"4",width:"4",height:"16"},null,-1),e("rect",{x:"14",y:"4",width:"4",height:"16"},null,-1)])])):(r(),d("svg",ge,[...t[25]||(t[25]=[e("polygon",{points:"5,3 19,12 5,21"},null,-1)])]))],10,ye),e("button",{class:m(["player-btn",{active:!s.value}]),title:s.value?"Hide (simulate off-screen)":"Show",onClick:t[8]||(t[8]=c=>s.value=!s.value)},[s.value?(r(),d("svg",ke,[...t[26]||(t[26]=[e("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},null,-1),e("circle",{cx:"12",cy:"12",r:"3"},null,-1)])])):(r(),d("svg",Ce,[...t[27]||(t[27]=[e("path",{d:"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"},null,-1),e("line",{x1:"1",y1:"1",x2:"23",y2:"23"},null,-1)])]))],10,we),e("button",{class:m(["player-btn",{active:p.value}]),title:p.value?"Unmute":"Mute",onClick:t[9]||(t[9]=c=>p.value=!p.value)},[p.value?(r(),d("svg",_e,[...t[29]||(t[29]=[e("polygon",{points:"11,5 6,9 2,9 2,15 6,15 11,19"},null,-1),e("line",{x1:"23",y1:"9",x2:"17",y2:"15"},null,-1),e("line",{x1:"17",y1:"9",x2:"23",y2:"15"},null,-1)])])):(r(),d("svg",xe,[...t[28]||(t[28]=[e("polygon",{points:"11,5 6,9 2,9 2,15 6,15 11,19"},null,-1),e("path",{d:"M19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07"},null,-1)])]))],10,be)]),e("div",Ee,[e("span",{class:m(["state-badge",{inactive:!f.value}])},_(f.value?"Playing":"Paused"),3),e("span",{class:m(["state-badge",{inactive:!s.value}])},_(s.value?"Visible":"Hidden"),3),e("span",{class:m(["state-badge",{inactive:!p.value}])},_(p.value?"Muted":"Sound On"),3)])]),n.value?(r(),d("button",{key:0,class:"exit-fullscreen",onClick:t[10]||(t[10]=c=>n.value=!1)}," Exit Fullscreen ")):A("",!0)],2),[[B,o.value==="player"]]),$(e("div",Le,[a.configComponent?(r(),R(U(a.configComponent),{key:"config-"+a.scene.idx})):(r(),d("div",Me,"No config component"))],512),[[B,o.value==="config"]]),$(e("div",Se,[e("div",{class:"meta-header"},[t[30]||(t[30]=e("h3",null,"scene.meta",-1)),e("button",{class:"copy-btn",onClick:C},"Copy")]),e("pre",Ae,_(M.value),1)],512),[[B,o.value==="meta"]])])]))],2))}}),Be=(a,y)=>{const h=a.__vccOpts||a;for(const[b,o]of y)h[b]=o;return h},Re=Be($e,[["__scopeId","data-v-d3c29943"]]),Oe={name:"JuunoCLI"},Ue=V({...Oe,setup(a){const y=w(window.__JUUNO_EXTERNAL_APP_URL__||"http://localhost:5002/index.js"),h=w(!1),b=w(null),o=[],l=T(null),n=T(null),i=w(!0),f=w(null),s=I({idx:"simulator-scene-1",name:"Simulator Test Scene",app:null,app_idx:"simulator-app-1",created_at:new Date().toISOString(),display_time:5e3,language:"en",order:0,playlist_idx:"simulator-playlist-1",updated_at:new Date().toISOString(),translations:{},meta:{title:"Test App",backgroundColor:"#2c3e50",textColor:"#ecf0f1"},mediaAssets:[]}),x=z({async save(g){console.log("Simulator: Scene updated",g),Object.assign(s,g)}},{scene:s});async function k(){try{const g=await fetch(`${y.value}/manifest.json`);if(g.ok){const C=await g.json();return b.value=C,C}}catch{}return b.value=null,null}function E(g){o.forEach(C=>C.remove()),o.length=0,g.forEach(C=>{const u=document.createElement("link");u.rel="stylesheet",u.href=`${y.value}${C}`,document.head.appendChild(u),o.push(u)})}async function L(){var g,C;try{i.value=!0,f.value=null,console.log(`Loading external app from: ${y.value}`);const u=await k(),v=[];(g=u==null?void 0:u.resources)!=null&&g.player&&v.push(...u.resources.player.filter(c=>c.endsWith(".css"))),(C=u==null?void 0:u.resources)!=null&&C.config&&v.push(...u.resources.config.filter(c=>c.endsWith(".css"))),v.length>0&&(console.log("Loading CSS files:",v),E(v));const t=await F(()=>import("external-app/player"),[]);if(t.default)l.value=P(t.default);else if(typeof t.render=="function")l.value=P(t.render());else throw new Error("External app must export a default component or render function from /player");try{const c=await F(()=>import("external-app/config"),[]);c.default?n.value=P(c.default):typeof c.render=="function"?n.value=P(c.render()):n.value=null}catch{n.value=null}x.load(s),console.log("✅ External app loaded successfully"),i.value=!1}catch(u){console.error("Failed to load external app:",u),f.value=u instanceof Error?u.message:"Failed to load external app",i.value=!1}}function M(){console.log("🔄 Reloading app..."),window.location.reload()}return j(L),(g,C)=>(r(),R(J(Re),{"player-component":l.value,"config-component":n.value,scene:s,"app-url":y.value,"is-loading":i.value,error:f.value,manifest:b.value,"live-reload-active":h.value,onReload:M},null,8,["player-component","config-component","scene","app-url","is-loading","error","manifest","live-reload-active"]))}}),Te=q(Ue);Te.mount("#app");
@@ -1,51 +0,0 @@
1
- /**
2
- * Authentication credentials for the developer API.
3
- */
4
- export interface AuthCredentials {
5
- email: string;
6
- password: string;
7
- }
8
- /**
9
- * Authentication token response from the API.
10
- */
11
- export interface AuthTokenResponse {
12
- success: boolean;
13
- token: string;
14
- }
15
- /**
16
- * Options for authentication.
17
- */
18
- export interface AuthOptions {
19
- email?: string;
20
- password?: string;
21
- token?: string;
22
- }
23
- /**
24
- * Saves authentication token to local credentials file.
25
- */
26
- export declare function saveToken(token: string): void;
27
- /**
28
- * Loads authentication token from local credentials file.
29
- */
30
- export declare function loadToken(): string | null;
31
- /**
32
- * Removes stored credentials file.
33
- */
34
- export declare function removeToken(): void;
35
- /**
36
- * Checks if user is currently logged in.
37
- */
38
- export declare function isLoggedIn(): boolean;
39
- /**
40
- * Gets the API URL from environment or uses default.
41
- */
42
- export declare function getApiUrl(): string;
43
- /**
44
- * Gets the authentication token from options, environment, or stored credentials.
45
- */
46
- export declare function getAuthToken(options: AuthOptions): Promise<string>;
47
- /**
48
- * Authenticates with the developer API using email and password.
49
- */
50
- export declare function loginWithCredentials(credentials: AuthCredentials): Promise<string>;
51
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/index.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA6BD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAa7C;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,GAAG,IAAI,CAczC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBxE;AAiCD;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,eAAe,GAC3B,OAAO,CAAC,MAAM,CAAC,CAoCjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/login/index.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAoEhE"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Logs out of Juuno by removing stored credentials.
3
- */
4
- export declare function logout(): Promise<void>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/logout/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAwB5C"}
@@ -1,37 +0,0 @@
1
- /**
2
- * Monorepo detection and Vite dev server launcher for internal app development.
3
- *
4
- * When running in the Juuno monorepo, this uses Vite's dev server instead of
5
- * the built simulator, allowing local @juuno/* packages to be resolved from
6
- * the workspace.
7
- */
8
- import { type ChildProcess } from 'child_process';
9
- /**
10
- * Detect if we're running in the Juuno monorepo.
11
- */
12
- export declare function detectMonorepo(cwd: string): {
13
- isMonorepo: boolean;
14
- workspaceRoot: string | null;
15
- cliPath: string | null;
16
- };
17
- /**
18
- * Options for launching the simulator in monorepo mode.
19
- */
20
- export interface MonorepoSimulatorOptions {
21
- /** URL of the external app to load. */
22
- appUrl: string;
23
- /** Port for the simulator service (default: 5004). */
24
- port: string;
25
- /** Path to the monorepo workspace root. */
26
- workspaceRoot: string;
27
- /** Directory to watch for live reload. */
28
- watchDir?: string;
29
- }
30
- /**
31
- * Launch the simulator service (monorepo mode).
32
- *
33
- * This uses the internal simulator service which has full monorepo support
34
- * for @juuno/* packages, GraphQL, Sass, etc.
35
- */
36
- export declare function launchMonorepoSimulator(options: MonorepoSimulatorOptions): Promise<ChildProcess>;
37
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/monorepo/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAKzD;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG;IAC3C,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAyBA;AA2BD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,YAAY,CAAC,CAgDvB"}
@@ -1,94 +0,0 @@
1
- /**
2
- * Monorepo detection and Vite dev server launcher for internal app development.
3
- *
4
- * When running in the Juuno monorepo, this uses Vite's dev server instead of
5
- * the built simulator, allowing local @juuno/* packages to be resolved from
6
- * the workspace.
7
- */
8
- import { spawn } from 'child_process';
9
- import { existsSync } from 'fs';
10
- import { join, resolve } from 'path';
11
- import { findFileUpward } from '../utils/fs.js';
12
- /**
13
- * Detect if we're running in the Juuno monorepo.
14
- */
15
- export function detectMonorepo(cwd) {
16
- // Look for pnpm-workspace.yaml which indicates monorepo root.
17
- const workspaceFile = findFileUpward(cwd, 'pnpm-workspace.yaml');
18
- if (!workspaceFile) {
19
- return { isMonorepo: false, workspaceRoot: null, cliPath: null };
20
- }
21
- const workspaceRoot = resolve(workspaceFile, '..');
22
- // Check if the CLI package exists in the expected location.
23
- const cliPath = join(workspaceRoot, 'external', 'cli');
24
- if (!existsSync(join(cliPath, 'package.json'))) {
25
- return { isMonorepo: false, workspaceRoot: null, cliPath: null };
26
- }
27
- // Check for key monorepo packages to confirm it's the Juuno monorepo.
28
- const hasCore = existsSync(join(workspaceRoot, 'packages', 'core'));
29
- const hasCommon = existsSync(join(workspaceRoot, 'packages', 'common'));
30
- if (!hasCore || !hasCommon) {
31
- return { isMonorepo: false, workspaceRoot: null, cliPath: null };
32
- }
33
- return { isMonorepo: true, workspaceRoot, cliPath };
34
- }
35
- /**
36
- * Fetch the app manifest to get actual resource paths.
37
- */
38
- async function fetchManifest(appUrl) {
39
- try {
40
- const response = await fetch(`${appUrl}/manifest.json`);
41
- if (!response.ok) {
42
- return null;
43
- }
44
- return await response.json();
45
- }
46
- catch {
47
- return null;
48
- }
49
- }
50
- /**
51
- * Launch the simulator service (monorepo mode).
52
- *
53
- * This uses the internal simulator service which has full monorepo support
54
- * for @juuno/* packages, GraphQL, Sass, etc.
55
- */
56
- export async function launchMonorepoSimulator(options) {
57
- const { appUrl, port, workspaceRoot, watchDir } = options;
58
- // Fetch manifest to get actual resource paths.
59
- console.log('📦 Fetching app manifest...');
60
- const manifest = await fetchManifest(appUrl);
61
- const playerPath = manifest?.resources?.player?.[0] || '/player/index.js';
62
- const configPath = manifest?.resources?.config?.[0] || '/config/index.js';
63
- console.log(`
64
- 🚀 Juuno App Simulator (Monorepo Mode)
65
-
66
- External App: ${appUrl}
67
- Player: ${appUrl}${playerPath}
68
- Config: ${appUrl}${configPath}
69
- Simulator: http://localhost:${port}
70
- Watching: ${watchDir || 'disabled'}
71
- Mode: Internal simulator service (full @juuno/* support)
72
-
73
- Press Ctrl+C to stop
74
- `);
75
- // Set environment variables for the simulator service.
76
- const env = {
77
- ...process.env,
78
- VITE_EXTERNAL_APP_URL: appUrl,
79
- VITE_EXTERNAL_PLAYER_PATH: playerPath,
80
- VITE_EXTERNAL_CONFIG_PATH: configPath,
81
- VITE_WATCH_DIR: watchDir || '',
82
- };
83
- // Run the simulator service from the workspace root.
84
- const simulatorProcess = spawn('pnpm', ['--filter', '@juuno/simulator', 'run', 'dev', '--port', port], {
85
- cwd: workspaceRoot,
86
- stdio: 'inherit',
87
- shell: false,
88
- env,
89
- });
90
- simulatorProcess.on('error', (err) => {
91
- console.error(`[simulator] Error: ${err.message}`);
92
- });
93
- return simulatorProcess;
94
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Shows current authentication status.
3
- */
4
- export declare function whoami(): Promise<void>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/whoami/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAoB5C"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes