@upstart.gg/sdk 0.0.91 → 0.0.92

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.
@@ -1,4 +1,4 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{createLogger as T}from"vite";var g="0.0.91";import i from"chalk";function h(e,t,o=!1){let s=T(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return o&&s.info(i.hex("#7270c6").bold(`\u{1F680} Upstart v${g}
3
+ import{createLogger as T}from"vite";var g="0.0.92";import i from"chalk";function h(e,t,o=!1){let s=T(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return o&&s.info(i.hex("#7270c6").bold(`\u{1F680} Upstart v${g}
4
4
  `)),{...s,success:(r,n)=>s.info(i.green(r),n),error:(r,n)=>s.error(i.red(r),n),warn:(r,n)=>s.warn(i.yellow(r),n),warnOnce:(r,n)=>s.warnOnce(i.yellow(r),n),debug:(r,n)=>{e==="debug"&&s.info(i.gray(r),n)}}}var p=h();var m="upstart-cli";var w=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",d=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",A=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg";import E from"conf";import c from"node:path";import _ from"node:crypto";import a from"node:fs";import{fileURLToPath as L}from"node:url";import z from"chalk";var R=L(new URL(".",import.meta.url)),x=S(),u=new E({projectName:m,encryptionKey:x,clearInvalidConfig:!0});function O(){let e=R;for(;e!==c.parse(e).root;){let t=c.join(e,"node_modules");if(a.existsSync(t))return t;e=c.dirname(e)}return null}function S(){let e=O();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=c.join(e,".enpage-tmp");a.existsSync(t)||a.mkdirSync(t,{recursive:!0,mode:448});let o=c.join(t,".enpage-key");if(!a.existsSync(o)){let r=_.randomBytes(32).toString("hex");return a.writeFileSync(o,r,{mode:384}),r}return a.readFileSync(o,"utf8")}async function J(e,t,o={}){u.get("access_token")&&(o.Authorization=`Bearer ${u.get("access_token")}`);let s=await fetch(l(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...o},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{p.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),p.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return y(s)}async function K(e,t={}){u.get("access_token")&&(t.Authorization=`Bearer ${u.get("access_token")}`);let o=await fetch(l(e),{headers:t,method:"GET"}).catch(s=>{p.error(`Fatal Error requesting API: ${s.message} (${s.cause.code})`),p.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return y(o)}function l(e){let t=new URL(d.endsWith("/")?d:`${d}/`);return new URL(e,t)}async function y(e){let t=e.headers.get("content-type")?.startsWith("application/json")?await e.json():await e.text();return e.ok?{isSuccess:!0,isError:!1,status:e.status,statusText:e.statusText,data:t}:{isSuccess:!1,isError:!0,status:e.status,statusText:e.statusText,data:t}}export{K as get,J as post};
@@ -1,6 +1,6 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import U from"chalk";import{confirm as N}from"@inquirer/prompts";import b from"open";var y="upstart-cli";var g=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",u=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",j=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg";var _="oauth/devicecode",T="oauth/token";import{createLogger as L}from"vite";var h="0.0.91";import i from"chalk";function x(t,e,n=!1){let s=L(t==="debug"?"info":t,{prefix:"[upstart]",allowClearScreen:e});return n&&s.info(i.hex("#7270c6").bold(`\u{1F680} Upstart v${h}
3
+ import U from"chalk";import{confirm as N}from"@inquirer/prompts";import b from"open";var y="upstart-cli";var g=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",u=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",j=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg";var _="oauth/devicecode",T="oauth/token";import{createLogger as L}from"vite";var h="0.0.92";import i from"chalk";function x(t,e,n=!1){let s=L(t==="debug"?"info":t,{prefix:"[upstart]",allowClearScreen:e});return n&&s.info(i.hex("#7270c6").bold(`\u{1F680} Upstart v${h}
4
4
  `)),{...s,success:(r,o)=>s.info(i.green(r),o),error:(r,o)=>s.error(i.red(r),o),warn:(r,o)=>s.warn(i.yellow(r),o),warnOnce:(r,o)=>s.warnOnce(i.yellow(r),o),debug:(r,o)=>{t==="debug"&&s.info(i.gray(r),o)}}}var m=x();import R from"conf";import c from"node:path";import O from"node:crypto";import a from"node:fs";import{fileURLToPath as v}from"node:url";import Q from"chalk";var k=v(new URL(".",import.meta.url)),w=P(),p=new R({projectName:y,encryptionKey:w,clearInvalidConfig:!0});function S(){let t=k;for(;t!==c.parse(t).root;){let e=c.join(t,"node_modules");if(a.existsSync(e))return e;t=c.dirname(t)}return null}function P(){let t=S();if(!t)throw new Error("Could not find nearest node_modules directory.");let e=c.join(t,".enpage-tmp");a.existsSync(e)||a.mkdirSync(e,{recursive:!0,mode:448});let n=c.join(e,".enpage-key");if(!a.existsSync(n)){let r=O.randomBytes(32).toString("hex");return a.writeFileSync(n,r,{mode:384}),r}return a.readFileSync(n,"utf8")}async function l(t,e,n={}){p.get("access_token")&&(n.Authorization=`Bearer ${p.get("access_token")}`);let s=await fetch(C(t),{method:"POST",headers:{"Content-Type":e instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...n},body:e instanceof URLSearchParams?e:JSON.stringify(e)}).catch(r=>{m.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),m.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return I(s)}function C(t){let e=new URL(u.endsWith("/")?u:`${u}/`);return new URL(t,e)}async function I(t){let e=t.headers.get("content-type")?.startsWith("application/json")?await t.json():await t.text();return t.ok?{isSuccess:!0,isError:!1,status:t.status,statusText:t.statusText,data:e}:{isSuccess:!1,isError:!0,status:t.status,statusText:t.statusText,data:e}}async function A(t,e){for(;;){let n=new URLSearchParams({grant_type:"device_code",device_code:t,client_id:g}),s=await l(T,n),{data:r,isSuccess:o}=s;if(o)return r;if(r.error==="authorization_pending")await new Promise(f=>setTimeout(f,5e3));else return e.error(`Error while polling for login: ${r.error_description??r.error}`),!1}}async function de({options:t,logger:e}){e.info(`Logging in to Enpage...
5
5
  `);let{isError:n,data:s}=await l(_,{client_id:g,scope:"profile,templates:publish"});n&&(e.error("Failed to get device code. Please try again."),e.error(`Error: ${s.error_description??s.error}`),process.exit(1));let{verification_uri:r,device_code:o}=s;await N({message:"Would you like to open the login page in your browser?",default:!0}).catch(D=>{process.exit(0)})?b(r):e.info(`
6
6
  Please visit the following URL to login:
@@ -1,6 +1,6 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- var me=Object.defineProperty;var x=(e,t)=>()=>(e&&(t=e(e=0)),t);var fe=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})};function D(){let e;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];e=t.slice(0,t.lastIndexOf("/"))}return e||(console.log("Warning: could not detect package manager"),e="npm"),e}function q(e){return`[${e.error}]${e.error_description?`: ${e.error_description}`:""}`}var W=x(()=>{"use strict"});var J,dt,P,gt,X,Y,K,b=x(()=>{"use strict";J="upstart-cli",dt=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",P=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",gt=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",X=10,Y="oauth/userinfo",K="v1/templates"});import ye from"conf";import C from"node:path";import he from"node:crypto";import R from"node:fs";import{fileURLToPath as Se}from"node:url";import Ee from"chalk";function V(){let e=f.get("access_token");if(!e){let t=D();throw new Error(`Access token not found. Please run ${Ee.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function we(){let e=Te;for(;e!==C.parse(e).root;){let t=C.join(e,"node_modules");if(R.existsSync(t))return t;e=C.dirname(e)}return null}function _e(){let e=we();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=C.join(e,".enpage-tmp");R.existsSync(t)||R.mkdirSync(t,{recursive:!0,mode:448});let r=C.join(t,".enpage-key");if(!R.existsSync(r)){let o=he.randomBytes(32).toString("hex");return R.writeFileSync(r,o,{mode:384}),o}return R.readFileSync(r,"utf8")}var Te,Pe,f,F=x(()=>{"use strict";b();W();Te=Se(new URL(".",import.meta.url)),Pe=_e(),f=new ye({projectName:J,encryptionKey:Pe,clearInvalidConfig:!0})});var Z,Q=x(()=>{Z="0.0.91"});import{createLogger as be}from"vite";import k from"chalk";function Re(e,t,r=!1){let s=be(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return r&&s.info(k.hex("#7270c6").bold(`\u{1F680} Upstart v${Z}
3
+ var me=Object.defineProperty;var x=(e,t)=>()=>(e&&(t=e(e=0)),t);var fe=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})};function D(){let e;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];e=t.slice(0,t.lastIndexOf("/"))}return e||(console.log("Warning: could not detect package manager"),e="npm"),e}function q(e){return`[${e.error}]${e.error_description?`: ${e.error_description}`:""}`}var W=x(()=>{"use strict"});var J,dt,P,gt,X,Y,K,b=x(()=>{"use strict";J="upstart-cli",dt=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",P=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",gt=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",X=10,Y="oauth/userinfo",K="v1/templates"});import ye from"conf";import C from"node:path";import he from"node:crypto";import R from"node:fs";import{fileURLToPath as Se}from"node:url";import Ee from"chalk";function V(){let e=f.get("access_token");if(!e){let t=D();throw new Error(`Access token not found. Please run ${Ee.cyan(`${t} run enpage:login`)} to authenticate.`)}return e}function we(){let e=Te;for(;e!==C.parse(e).root;){let t=C.join(e,"node_modules");if(R.existsSync(t))return t;e=C.dirname(e)}return null}function _e(){let e=we();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=C.join(e,".enpage-tmp");R.existsSync(t)||R.mkdirSync(t,{recursive:!0,mode:448});let r=C.join(t,".enpage-key");if(!R.existsSync(r)){let o=he.randomBytes(32).toString("hex");return R.writeFileSync(r,o,{mode:384}),o}return R.readFileSync(r,"utf8")}var Te,Pe,f,F=x(()=>{"use strict";b();W();Te=Se(new URL(".",import.meta.url)),Pe=_e(),f=new ye({projectName:J,encryptionKey:Pe,clearInvalidConfig:!0})});var Z,Q=x(()=>{Z="0.0.92"});import{createLogger as be}from"vite";import k from"chalk";function Re(e,t,r=!1){let s=be(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return r&&s.info(k.hex("#7270c6").bold(`\u{1F680} Upstart v${Z}
4
4
  `)),{...s,success:(o,n)=>s.info(k.green(o),n),error:(o,n)=>s.error(k.red(o),n),warn:(o,n)=>s.warn(k.yellow(o),n),warnOnce:(o,n)=>s.warnOnce(k.yellow(o),n),debug:(o,n)=>{e==="debug"&&s.info(k.gray(o),n)}}}var g,G=x(()=>{"use strict";Q();g=Re()});var oe={};fe(oe,{get:()=>De,post:()=>v});async function v(e,t,r={}){f.get("access_token")&&(r.Authorization=`Bearer ${f.get("access_token")}`);let s=await fetch(re(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...r},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(o=>{g.error(`Fatal Error requesting API: ${o.message} (${o.cause.code})`),g.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return se(s)}async function De(e,t={}){f.get("access_token")&&(t.Authorization=`Bearer ${f.get("access_token")}`);let r=await fetch(re(e),{headers:t,method:"GET"}).catch(s=>{g.error(`Fatal Error requesting API: ${s.message} (${s.cause.code})`),g.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return se(r)}function re(e){let t=new URL(P.endsWith("/")?P:`${P}/`);return new URL(e,t)}async function se(e){let t=e.headers.get("content-type")?.startsWith("application/json")?await e.json():await e.text();return e.ok?{isSuccess:!0,isError:!1,status:e.status,statusText:e.statusText,data:t}:{isSuccess:!1,isError:!0,status:e.status,statusText:e.statusText,data:t}}var z=x(()=>{"use strict";G();b();F()});W();F();import{resolve as y}from"node:path";import{existsSync as j,readFileSync as it,writeFileSync as at}from"node:fs";import E from"chalk";b();G();import I from"node:path";import N from"node:fs";import Fe from"node:crypto";import Ge from"fast-glob";import ie from"node:http";import Be from"node:https";import{pipeline as Me}from"node:stream";import ne from"chalk";import ze from"form-data";import*as B from"node:fs";var ke=/[<>"|?*\n\r\t\f\x00-\x1F]/,Ae=/(?:^|\/)[*]{2}($|\/)/,$e=248,Le=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Oe=e=>typeof e=="string"&&e.length<=$e&&!ke.test(e),Ue=e=>e.split(/\r\n?|\n/);var Ce=e=>Le(e)&&Array.isArray(e.patterns)&&Array.isArray(e.sections);var M=(e,t={})=>{let r=t.path;if(Ce(e))return e;Oe(e)&&B.existsSync(e)&&(r=e,e=B.readFileSync(e,"utf8"));let s=Ue(e),o=new Map,n={sections:[],patterns:[]},c={name:"default",patterns:[]},i=null;for(let a of s){let p=a.trim();if(p.startsWith("#")){let[,u]=/^#+\s*(.*)\s*$/.exec(p)||[];if(i){o.delete(i.name),i.comment=i.comment?`${i.comment}
5
5
  ${p}`:p,i.name=u?`${i.name.trim()}
6
6
  ${u.trim()}`:i.name.trim(),o.set(i.name.toLowerCase().trim(),i);continue}c={name:u?.trim()||"",comment:p,patterns:[]},o.set(c.name.toLowerCase(),c),n.sections.push(c),i=c;continue}p!==""&&(c.patterns.push(p),n.patterns.push(p)),i=null}return(t.dedupe===!0||t.unique===!0)&&(n=ee(n,{...t,format:!1})),n.path=r,n.input=Buffer.from(e),n.format=a=>je(n,{...t,...a}),n.dedupe=a=>ee(n,{...t,...a}),n.globs=a=>Ie(n,{path:r,...t,...a}),n};var ee=(e,t)=>{let r=M(e,{...t,dedupe:!1}),s=new Map,o={sections:[],patterns:[]},n;for(let c of r.sections){let{name:i="",comment:a,patterns:p}=c,u=i.trim().toLowerCase();for(let m of p)o.patterns.includes(m)||o.patterns.push(m);i&&s.has(u)?(n=s.get(u),n.patterns=[...n.patterns,...p]):(n={name:i,comment:a,patterns:p},o.sections.push(n),s.set(u,n))}for(let c of o.sections)c.patterns=[...new Set(c.patterns)];return o},ve=e=>{if(Ae.test(e))return e;let t=!1;return e.startsWith("/")?(e=e.slice(1),t=!0):e.slice(1,e.length-1).includes("/")&&(t=!0),e+=e.endsWith("/")?"**/":"/**",t?e:`**/${e}`},Ie=(e,t={})=>{let r=M(e,t),s=[],o=0,n=r.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(i=>i.startsWith("!")?i:`!${i}`)),c=(i,a)=>{let p=s[s.length-1],u=i?"unignore":"ignore";p&&p.type===u?p.patterns.includes(a)||p.patterns.push(a):(s.push({type:u,path:t.path||null,patterns:[a],index:o}),o++)};for(let i of n){let a="";i.startsWith("!")&&(i=i.slice(1),a="!"),c(a,i.startsWith("/")?i.slice(1):i),c(a,ve(i))}return s},Ne=(e={name:"",patterns:[]})=>{let t=[e.comment||""];return e.patterns?.length&&(t.push(e.patterns.join(`
@@ -1,6 +1,6 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import L from"node:path";import b from"node:fs";import ge from"node:crypto";import me from"fast-glob";var I="upstart-cli";var Oe=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",y=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",Ae=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",N=10;import B from"node:http";import fe from"node:https";import{pipeline as ye}from"node:stream";import{createLogger as q}from"vite";var D="0.0.91";import _ from"chalk";function H(e,t,n=!1){let i=q(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return n&&i.info(_.hex("#7270c6").bold(`\u{1F680} Upstart v${D}
3
+ import L from"node:path";import b from"node:fs";import ge from"node:crypto";import me from"fast-glob";var I="upstart-cli";var Oe=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",y=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",Ae=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",N=10;import B from"node:http";import fe from"node:https";import{pipeline as ye}from"node:stream";import{createLogger as q}from"vite";var D="0.0.92";import _ from"chalk";function H(e,t,n=!1){let i=q(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return n&&i.info(_.hex("#7270c6").bold(`\u{1F680} Upstart v${D}
4
4
  `)),{...i,success:(r,s)=>i.info(_.green(r),s),error:(r,s)=>i.error(_.red(r),s),warn:(r,s)=>i.warn(_.yellow(r),s),warnOnce:(r,s)=>i.warnOnce(_.yellow(r),s),debug:(r,s)=>{e==="debug"&&i.info(_.gray(r),s)}}}var g=H();import z from"chalk";import he from"form-data";import*as C from"node:fs";var X=/[<>"|?*\n\r\t\f\x00-\x1F]/,J=/(?:^|\/)[*]{2}($|\/)/,V=248,K=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Y=e=>typeof e=="string"&&e.length<=V&&!X.test(e),Q=e=>e.split(/\r\n?|\n/);var Z=e=>K(e)&&Array.isArray(e.patterns)&&Array.isArray(e.sections);var k=(e,t={})=>{let n=t.path;if(Z(e))return e;Y(e)&&C.existsSync(e)&&(n=e,e=C.readFileSync(e,"utf8"));let i=Q(e),r=new Map,s={sections:[],patterns:[]},c={name:"default",patterns:[]},o=null;for(let a of i){let p=a.trim();if(p.startsWith("#")){let[,u]=/^#+\s*(.*)\s*$/.exec(p)||[];if(o){r.delete(o.name),o.comment=o.comment?`${o.comment}
5
5
  ${p}`:p,o.name=u?`${o.name.trim()}
6
6
  ${u.trim()}`:o.name.trim(),r.set(o.name.toLowerCase().trim(),o);continue}c={name:u?.trim()||"",comment:p,patterns:[]},r.set(c.name.toLowerCase(),c),s.sections.push(c),o=c;continue}p!==""&&(c.patterns.push(p),s.patterns.push(p)),o=null}return(t.dedupe===!0||t.unique===!0)&&(s=G(s,{...t,format:!1})),s.path=n,s.input=Buffer.from(e),s.format=a=>se(s,{...t,...a}),s.dedupe=a=>G(s,{...t,...a}),s.globs=a=>te(s,{path:n,...t,...a}),s};var G=(e,t)=>{let n=k(e,{...t,dedupe:!1}),i=new Map,r={sections:[],patterns:[]},s;for(let c of n.sections){let{name:o="",comment:a,patterns:p}=c,u=o.trim().toLowerCase();for(let h of p)r.patterns.includes(h)||r.patterns.push(h);o&&i.has(u)?(s=i.get(u),s.patterns=[...s.patterns,...p]):(s={name:o,comment:a,patterns:p},r.sections.push(s),i.set(u,s))}for(let c of r.sections)c.patterns=[...new Set(c.patterns)];return r},ee=e=>{if(J.test(e))return e;let t=!1;return e.startsWith("/")?(e=e.slice(1),t=!0):e.slice(1,e.length-1).includes("/")&&(t=!0),e+=e.endsWith("/")?"**/":"/**",t?e:`**/${e}`},te=(e,t={})=>{let n=k(e,t),i=[],r=0,s=n.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(o=>o.startsWith("!")?o:`!${o}`)),c=(o,a)=>{let p=i[i.length-1],u=o?"unignore":"ignore";p&&p.type===u?p.patterns.includes(a)||p.patterns.push(a):(i.push({type:u,path:t.path||null,patterns:[a],index:r}),r++)};for(let o of s){let a="";o.startsWith("!")&&(o=o.slice(1),a="!"),c(a,o.startsWith("/")?o.slice(1):o),c(a,ee(o))}return i},re=(e={name:"",patterns:[]})=>{let t=[e.comment||""];return e.patterns?.length&&(t.push(e.patterns.join(`
@@ -1,4 +1,4 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- var O=Object.defineProperty;var c=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>{for(var s in t)O(e,s,{get:t[s],enumerable:!0})};var y,M,g,$,f,m=c(()=>{"use strict";y="upstart-cli",M=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",g=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",$=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",f="oauth/userinfo"});import k from"conf";import u from"node:path";import P from"node:crypto";import a from"node:fs";import{fileURLToPath as I}from"node:url";import X from"chalk";function v(){let e=U;for(;e!==u.parse(e).root;){let t=u.join(e,"node_modules");if(a.existsSync(t))return t;e=u.dirname(e)}return null}function N(){let e=v();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=u.join(e,".enpage-tmp");a.existsSync(t)||a.mkdirSync(t,{recursive:!0,mode:448});let s=u.join(t,".enpage-key");if(!a.existsSync(s)){let r=P.randomBytes(32).toString("hex");return a.writeFileSync(s,r,{mode:384}),r}return a.readFileSync(s,"utf8")}var U,w,i,l=c(()=>{"use strict";m();U=I(new URL(".",import.meta.url)),w=N(),i=new k({projectName:y,encryptionKey:w,clearInvalidConfig:!0})});var _,T=c(()=>{_="0.0.91"});import{createLogger as b}from"vite";import p from"chalk";function C(e,t,s=!1){let o=b(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return s&&o.info(p.hex("#7270c6").bold(`\u{1F680} Upstart v${_}
3
+ var O=Object.defineProperty;var c=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>{for(var s in t)O(e,s,{get:t[s],enumerable:!0})};var y,M,g,$,f,m=c(()=>{"use strict";y="upstart-cli",M=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",g=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",$=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",f="oauth/userinfo"});import k from"conf";import u from"node:path";import P from"node:crypto";import a from"node:fs";import{fileURLToPath as I}from"node:url";import X from"chalk";function v(){let e=U;for(;e!==u.parse(e).root;){let t=u.join(e,"node_modules");if(a.existsSync(t))return t;e=u.dirname(e)}return null}function N(){let e=v();if(!e)throw new Error("Could not find nearest node_modules directory.");let t=u.join(e,".enpage-tmp");a.existsSync(t)||a.mkdirSync(t,{recursive:!0,mode:448});let s=u.join(t,".enpage-key");if(!a.existsSync(s)){let r=P.randomBytes(32).toString("hex");return a.writeFileSync(s,r,{mode:384}),r}return a.readFileSync(s,"utf8")}var U,w,i,l=c(()=>{"use strict";m();U=I(new URL(".",import.meta.url)),w=N(),i=new k({projectName:y,encryptionKey:w,clearInvalidConfig:!0})});var _,T=c(()=>{_="0.0.92"});import{createLogger as b}from"vite";import p from"chalk";function C(e,t,s=!1){let o=b(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:t});return s&&o.info(p.hex("#7270c6").bold(`\u{1F680} Upstart v${_}
4
4
  `)),{...o,success:(r,n)=>o.info(p.green(r),n),error:(r,n)=>o.error(p.red(r),n),warn:(r,n)=>o.warn(p.yellow(r),n),warnOnce:(r,n)=>o.warnOnce(p.yellow(r),n),debug:(r,n)=>{e==="debug"&&o.info(p.gray(r),n)}}}var d,h=c(()=>{"use strict";T();d=C()});var x={};S(x,{get:()=>j,post:()=>D});async function D(e,t,s={}){i.get("access_token")&&(s.Authorization=`Bearer ${i.get("access_token")}`);let o=await fetch(E(e),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...s},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{d.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),d.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return L(o)}async function j(e,t={}){i.get("access_token")&&(t.Authorization=`Bearer ${i.get("access_token")}`);let s=await fetch(E(e),{headers:t,method:"GET"}).catch(o=>{d.error(`Fatal Error requesting API: ${o.message} (${o.cause.code})`),d.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return L(s)}function E(e){let t=new URL(g.endsWith("/")?g:`${g}/`);return new URL(e,t)}async function L(e){let t=e.headers.get("content-type")?.startsWith("application/json")?await e.json():await e.text();return e.ok?{isSuccess:!0,isError:!1,status:e.status,statusText:e.statusText,data:t}:{isSuccess:!1,isError:!0,status:e.status,statusText:e.statusText,data:t}}var R=c(()=>{"use strict";h();m();l()});m();l();async function pe(e=!1){let t=i.get("access_token"),s=i.get("expires_at");if(!t)return!1;if(s&&s<Date.now())return console.log("Seems like your token expired..."),!1;if(!e)return!0;let{get:o}=await Promise.resolve().then(()=>(R(),x)),{isSuccess:r}=await o(f);return r}export{pe as isLoggedIn};
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
3
3
 
4
- var Ir=Object.create;var Be=Object.defineProperty;var jr=Object.getOwnPropertyDescriptor;var Ur=Object.getOwnPropertyNames;var $r=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty;var dt=(i,t)=>()=>(i&&(t=i(i=0)),t);var Cs=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Br=(i,t)=>{for(var e in t)Be(i,e,{get:t[e],enumerable:!0})},zr=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ur(t))!Wr.call(i,r)&&r!==e&&Be(i,r,{get:()=>t[r],enumerable:!(s=jr(t,r))||s.enumerable});return i};var Gr=(i,t,e)=>(e=i!=null?Ir($r(i)):{},zr(t||!i||!i.__esModule?Be(e,"default",{value:i,enumerable:!0}):e,i));function oe(){let i;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];i=t.slice(0,t.lastIndexOf("/"))}return i||(console.log("Warning: could not detect package manager"),i="npm"),i}function _s(i){return`[${i.error}]${i.error_description?`: ${i.error_description}`:""}`}var ze=dt(()=>{"use strict"});var ks,Ge,ct,yh,Ns,Ds,Ps,Ls,Fs,lt=dt(()=>{"use strict";ks="upstart-cli",Ge=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",ct=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",yh=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",Ns=10,Ds="oauth/devicecode",Ps="oauth/token",Ls="oauth/userinfo",Fs="v1/templates"});import Hr from"conf";import It from"node:path";import qr from"node:crypto";import pt from"node:fs";import{fileURLToPath as Vr}from"node:url";import Kr from"chalk";function Ms(){let i=M.get("access_token");if(!i){let t=oe();throw new Error(`Access token not found. Please run ${Kr.cyan(`${t} run enpage:login`)} to authenticate.`)}return i}function Xr(){let i=Yr;for(;i!==It.parse(i).root;){let t=It.join(i,"node_modules");if(pt.existsSync(t))return t;i=It.dirname(i)}return null}function Zr(){let i=Xr();if(!i)throw new Error("Could not find nearest node_modules directory.");let t=It.join(i,".enpage-tmp");pt.existsSync(t)||pt.mkdirSync(t,{recursive:!0,mode:448});let e=It.join(t,".enpage-key");if(!pt.existsSync(e)){let r=qr.randomBytes(32).toString("hex");return pt.writeFileSync(e,r,{mode:384}),r}return pt.readFileSync(e,"utf8")}var Yr,Jr,M,mt=dt(()=>{"use strict";lt();ze();Yr=Vr(new URL(".",import.meta.url)),Jr=Zr(),M=new Hr({projectName:ks,encryptionKey:Jr,clearInvalidConfig:!0})});var js,Is=dt(()=>{js="0.0.91"});import{createLogger as tn}from"vite";import gt from"chalk";function He(i,t,e=!1){let s=tn(i==="debug"?"info":i,{prefix:"[upstart]",allowClearScreen:t});return e&&s.info(gt.hex("#7270c6").bold(`\u{1F680} Upstart v${js}
4
+ var Ir=Object.create;var Be=Object.defineProperty;var jr=Object.getOwnPropertyDescriptor;var Ur=Object.getOwnPropertyNames;var $r=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty;var dt=(i,t)=>()=>(i&&(t=i(i=0)),t);var Cs=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Br=(i,t)=>{for(var e in t)Be(i,e,{get:t[e],enumerable:!0})},zr=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ur(t))!Wr.call(i,r)&&r!==e&&Be(i,r,{get:()=>t[r],enumerable:!(s=jr(t,r))||s.enumerable});return i};var Gr=(i,t,e)=>(e=i!=null?Ir($r(i)):{},zr(t||!i||!i.__esModule?Be(e,"default",{value:i,enumerable:!0}):e,i));function oe(){let i;if(process.env.npm_config_user_agent){let t=process.env.npm_config_user_agent.split(" ")[0];i=t.slice(0,t.lastIndexOf("/"))}return i||(console.log("Warning: could not detect package manager"),i="npm"),i}function _s(i){return`[${i.error}]${i.error_description?`: ${i.error_description}`:""}`}var ze=dt(()=>{"use strict"});var ks,Ge,ct,yh,Ns,Ds,Ps,Ls,Fs,lt=dt(()=>{"use strict";ks="upstart-cli",Ge=process.env.PUBLIC_UPSTART_OAUTH_CLIENT_ID??"50000000-0000-0000-0000-000000000001",ct=process.env.PUBLIC_UPSTART_API_BASE_URL??"https://api.upstart.gg",yh=process.env.PUBLIC_UPSTART_EDITOR_BASE_URL??"https://upstart.gg",Ns=10,Ds="oauth/devicecode",Ps="oauth/token",Ls="oauth/userinfo",Fs="v1/templates"});import Hr from"conf";import It from"node:path";import qr from"node:crypto";import pt from"node:fs";import{fileURLToPath as Vr}from"node:url";import Kr from"chalk";function Ms(){let i=M.get("access_token");if(!i){let t=oe();throw new Error(`Access token not found. Please run ${Kr.cyan(`${t} run enpage:login`)} to authenticate.`)}return i}function Xr(){let i=Yr;for(;i!==It.parse(i).root;){let t=It.join(i,"node_modules");if(pt.existsSync(t))return t;i=It.dirname(i)}return null}function Zr(){let i=Xr();if(!i)throw new Error("Could not find nearest node_modules directory.");let t=It.join(i,".enpage-tmp");pt.existsSync(t)||pt.mkdirSync(t,{recursive:!0,mode:448});let e=It.join(t,".enpage-key");if(!pt.existsSync(e)){let r=qr.randomBytes(32).toString("hex");return pt.writeFileSync(e,r,{mode:384}),r}return pt.readFileSync(e,"utf8")}var Yr,Jr,M,mt=dt(()=>{"use strict";lt();ze();Yr=Vr(new URL(".",import.meta.url)),Jr=Zr(),M=new Hr({projectName:ks,encryptionKey:Jr,clearInvalidConfig:!0})});var js,Is=dt(()=>{js="0.0.92"});import{createLogger as tn}from"vite";import gt from"chalk";function He(i,t,e=!1){let s=tn(i==="debug"?"info":i,{prefix:"[upstart]",allowClearScreen:t});return e&&s.info(gt.hex("#7270c6").bold(`\u{1F680} Upstart v${js}
5
5
  `)),{...s,success:(r,n)=>s.info(gt.green(r),n),error:(r,n)=>s.error(gt.red(r),n),warn:(r,n)=>s.warn(gt.yellow(r),n),warnOnce:(r,n)=>s.warnOnce(gt.yellow(r),n),debug:(r,n)=>{i==="debug"&&s.info(gt.gray(r),n)}}}var C,jt=dt(()=>{"use strict";Is();C=He()});var zs={};Br(zs,{get:()=>dn,post:()=>st});async function st(i,t,e={}){M.get("access_token")&&(e.Authorization=`Bearer ${M.get("access_token")}`);let s=await fetch(Ws(i),{method:"POST",headers:{"Content-Type":t instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...e},body:t instanceof URLSearchParams?t:JSON.stringify(t)}).catch(r=>{C.error(`Fatal Error requesting API: ${r.message} (${r.cause.code})`),C.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return Bs(s)}async function dn(i,t={}){M.get("access_token")&&(t.Authorization=`Bearer ${M.get("access_token")}`);let e=await fetch(Ws(i),{headers:t,method:"GET"}).catch(s=>{C.error(`Fatal Error requesting API: ${s.message} (${s.cause.code})`),C.error("Please check your internet connection and try again, or retry later."),process.exit(1)});return Bs(e)}function Ws(i){let t=new URL(ct.endsWith("/")?ct:`${ct}/`);return new URL(i,t)}async function Bs(i){let t=i.headers.get("content-type")?.startsWith("application/json")?await i.json():await i.text();return i.ok?{isSuccess:!0,isError:!1,status:i.status,statusText:i.statusText,data:t}:{isSuccess:!1,isError:!0,status:i.status,statusText:i.statusText,data:t}}var Ut=dt(()=>{"use strict";jt();lt();mt()});var ri=Cs((kc,ii)=>{"use strict";ii.exports=ei;function ei(i,t,e){i instanceof RegExp&&(i=ti(i,e)),t instanceof RegExp&&(t=ti(t,e));var s=si(i,t,e);return s&&{start:s[0],end:s[1],pre:e.slice(0,s[0]),body:e.slice(s[0]+i.length,s[1]),post:e.slice(s[1]+t.length)}}function ti(i,t){var e=t.match(i);return e?e[0]:null}ei.range=si;function si(i,t,e){var s,r,n,o,a,h=e.indexOf(i),c=e.indexOf(t,h+1),l=h;if(h>=0&&c>0){if(i===t)return[h,c];for(s=[],n=e.length;l>=0&&!a;)l==h?(s.push(l),h=e.indexOf(i,l+1)):s.length==1?a=[s.pop(),c]:(r=s.pop(),r<n&&(n=r,o=c),c=e.indexOf(t,l+1)),l=h<c&&h>=0?h:c;s.length&&(a=[n,o])}return a}});var ui=Cs((Nc,fi)=>{"use strict";var ni=ri();fi.exports=Hn;var oi="\0SLASH"+Math.random()+"\0",ai="\0OPEN"+Math.random()+"\0",Ve="\0CLOSE"+Math.random()+"\0",hi="\0COMMA"+Math.random()+"\0",ci="\0PERIOD"+Math.random()+"\0";function qe(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function zn(i){return i.split("\\\\").join(oi).split("\\{").join(ai).split("\\}").join(Ve).split("\\,").join(hi).split("\\.").join(ci)}function Gn(i){return i.split(oi).join("\\").split(ai).join("{").split(Ve).join("}").split(hi).join(",").split(ci).join(".")}function li(i){if(!i)return[""];var t=[],e=ni("{","}",i);if(!e)return i.split(",");var s=e.pre,r=e.body,n=e.post,o=s.split(",");o[o.length-1]+="{"+r+"}";var a=li(n);return n.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),t.push.apply(t,o),t}function Hn(i){return i?(i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),zt(zn(i),!0).map(Gn)):[]}function qn(i){return"{"+i+"}"}function Vn(i){return/^-?0\d/.test(i)}function Kn(i,t){return i<=t}function Yn(i,t){return i>=t}function zt(i,t){var e=[],s=ni("{","}",i);if(!s)return[i];var r=s.pre,n=s.post.length?zt(s.post,!1):[""];if(/\$$/.test(s.pre))for(var o=0;o<n.length;o++){var a=r+"{"+s.body+"}"+n[o];e.push(a)}else{var h=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),l=h||c,f=s.body.indexOf(",")>=0;if(!l&&!f)return s.post.match(/,.*\}/)?(i=s.pre+"{"+s.body+Ve+s.post,zt(i)):[i];var u;if(l)u=s.body.split(/\.\./);else if(u=li(s.body),u.length===1&&(u=zt(u[0],!1).map(qn),u.length===1))return n.map(function(Mt){return s.pre+u[0]+Mt});var d;if(l){var g=qe(u[0]),p=qe(u[1]),y=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(qe(u[2])):1,b=Kn,w=p<g;w&&(m*=-1,b=Yn);var S=u.some(Vn);d=[];for(var E=g;b(E,p);E+=m){var v;if(c)v=String.fromCharCode(E),v==="\\"&&(v="");else if(v=String(E),S){var N=y-v.length;if(N>0){var V=new Array(N+1).join("0");E<0?v="-"+V+v.slice(1):v=V+v}}d.push(v)}}else{d=[];for(var L=0;L<u.length;L++)d.push.apply(d,zt(u[L],!1))}for(var L=0;L<d.length;L++)for(var o=0;o<n.length;o++){var a=r+d[L]+n[o];(!t||l||a)&&e.push(a)}}return e}});import{program as Ft}from"commander";ze();mt();import{resolve as J}from"node:path";import{existsSync as Bt,readFileSync as Fn,writeFileSync as Mn}from"node:fs";import it from"chalk";lt();jt();import $t from"node:path";import Wt from"node:fs";import pn from"node:crypto";import mn from"fast-glob";import Hs from"node:http";import gn from"node:https";import{pipeline as wn}from"node:stream";import Gs from"chalk";import yn from"form-data";import*as ae from"node:fs";var en=/[<>"|?*\n\r\t\f\x00-\x1F]/,sn=/(?:^|\/)[*]{2}($|\/)/,rn=248,nn=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),on=i=>typeof i=="string"&&i.length<=rn&&!en.test(i),an=i=>i.split(/\r\n?|\n/);var hn=i=>nn(i)&&Array.isArray(i.patterns)&&Array.isArray(i.sections);var he=(i,t={})=>{let e=t.path;if(hn(i))return i;on(i)&&ae.existsSync(i)&&(e=i,i=ae.readFileSync(i,"utf8"));let s=an(i),r=new Map,n={sections:[],patterns:[]},o={name:"default",patterns:[]},a=null;for(let h of s){let c=h.trim();if(c.startsWith("#")){let[,l]=/^#+\s*(.*)\s*$/.exec(c)||[];if(a){r.delete(a.name),a.comment=a.comment?`${a.comment}
6
6
  ${c}`:c,a.name=l?`${a.name.trim()}
7
7
  ${l.trim()}`:a.name.trim(),r.set(a.name.toLowerCase().trim(),a);continue}o={name:l?.trim()||"",comment:c,patterns:[]},r.set(o.name.toLowerCase(),o),n.sections.push(o),a=o;continue}c!==""&&(o.patterns.push(c),n.patterns.push(c)),a=null}return(t.dedupe===!0||t.unique===!0)&&(n=Us(n,{...t,format:!1})),n.path=e,n.input=Buffer.from(i),n.format=h=>un(n,{...t,...h}),n.dedupe=h=>Us(n,{...t,...h}),n.globs=h=>ln(n,{path:e,...t,...h}),n};var Us=(i,t)=>{let e=he(i,{...t,dedupe:!1}),s=new Map,r={sections:[],patterns:[]},n;for(let o of e.sections){let{name:a="",comment:h,patterns:c}=o,l=a.trim().toLowerCase();for(let f of c)r.patterns.includes(f)||r.patterns.push(f);a&&s.has(l)?(n=s.get(l),n.patterns=[...n.patterns,...c]):(n={name:a,comment:h,patterns:c},r.sections.push(n),s.set(l,n))}for(let o of r.sections)o.patterns=[...new Set(o.patterns)];return r},cn=i=>{if(sn.test(i))return i;let t=!1;return i.startsWith("/")?(i=i.slice(1),t=!0):i.slice(1,i.length-1).includes("/")&&(t=!0),i+=i.endsWith("/")?"**/":"/**",t?i:`**/${i}`},ln=(i,t={})=>{let e=he(i,t),s=[],r=0,n=e.patterns.concat(t.ignore||[]).concat((t.unignore||[]).map(a=>a.startsWith("!")?a:`!${a}`)),o=(a,h)=>{let c=s[s.length-1],l=a?"unignore":"ignore";c&&c.type===l?c.patterns.includes(h)||c.patterns.push(h):(s.push({type:l,path:t.path||null,patterns:[h],index:r}),r++)};for(let a of n){let h="";a.startsWith("!")&&(a=a.slice(1),h="!"),o(h,a.startsWith("/")?a.slice(1):a),o(h,cn(a))}return s},fn=(i={name:"",patterns:[]})=>{let t=[i.comment||""];return i.patterns?.length&&(t.push(i.patterns.join(`
@@ -1,6 +1,6 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import p from"node:fs";import{readFile as b}from"node:fs/promises";import v from"fast-glob";import{createLogger as y}from"vite";var c="0.0.91";import a from"chalk";function h(e,i,s=!1){let o=y(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:i});return s&&o.info(a.hex("#7270c6").bold(`\u{1F680} Upstart v${c}
3
+ import p from"node:fs";import{readFile as b}from"node:fs/promises";import v from"fast-glob";import{createLogger as y}from"vite";var c="0.0.92";import a from"chalk";function h(e,i,s=!1){let o=y(e==="debug"?"info":e,{prefix:"[upstart]",allowClearScreen:i});return s&&o.info(a.hex("#7270c6").bold(`\u{1F680} Upstart v${c}
4
4
  `)),{...o,success:(t,r)=>o.info(a.green(t),r),error:(t,r)=>o.error(a.red(t),r),warn:(t,r)=>o.warn(a.yellow(t),r),warnOnce:(t,r)=>o.warnOnce(a.yellow(t),r),debug:(t,r)=>{e==="debug"&&o.info(a.gray(t),r)}}}var m=h();import{basename as l,dirname as L,extname as x}from"node:path";async function T(e,i=m){p.existsSync(e)||(i.error(`\u{1F534} No enpage.config.js found!
5
5
  Your project must have an enpage.config.js file in the root directory.
6
6
 
@@ -1,4 +1,4 @@
1
1
  /*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
2
2
 
3
- import{createLogger as d}from"vite";var o="0.0.91";import r from"chalk";function g(i,a,n=!1){let s=d(i==="debug"?"info":i,{prefix:"[upstart]",allowClearScreen:a});return n&&s.info(r.hex("#7270c6").bold(`\u{1F680} Upstart v${o}
3
+ import{createLogger as d}from"vite";var o="0.0.92";import r from"chalk";function g(i,a,n=!1){let s=d(i==="debug"?"info":i,{prefix:"[upstart]",allowClearScreen:a});return n&&s.info(r.hex("#7270c6").bold(`\u{1F680} Upstart v${o}
4
4
  `)),{...s,success:(e,t)=>s.info(r.green(e),t),error:(e,t)=>s.error(r.red(e),t),warn:(e,t)=>s.warn(r.yellow(e),t),warnOnce:(e,t)=>s.warnOnce(r.yellow(e),t),debug:(e,t)=>{i==="debug"&&s.info(r.gray(e),t)}}}var y=g();export{g as createLogger,y as logger};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upstart.gg/sdk",
3
- "version": "0.0.91",
3
+ "version": "0.0.92",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -70,12 +70,12 @@
70
70
  "usehooks-ts": "3.1.0",
71
71
  "zundo": "2.3.0",
72
72
  "zustand": "4.5.5",
73
- "@upstart.gg/style-system": "0.0.91"
73
+ "@upstart.gg/style-system": "0.0.92"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "react": "18.3.0-canary-3d9b20132-20240124",
77
77
  "react-dom": "18.3.0-canary-3d9b20132-20240124",
78
- "@upstart.gg/style-system": "0.0.91"
78
+ "@upstart.gg/style-system": "0.0.92"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@cloudflare/workers-types": "4.20240806.0",