@frontstackdev/cli 0.0.0-canary-20240910140242 → 0.0.0-canary-20240911085534

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.
@@ -34,6 +34,6 @@ If you make changes to your schema, run ${m.hex("#7c3bed")("frontstack generate"
34
34
  `),console.log("Run "+m.hex("#7c3bed")("frontstack login")+" to login.");return}try{const e=await on(),t=await an();if(t===void 0||"error"in t){console.log(`Status: No project selected.
35
35
  `),console.log("Run "+m.hex("#7c3bed")("frontstack project")+" to select a Frontstack project");return}if(e===1){console.log(`Not logged in.
36
36
  `),console.log("Run "+m.hex("#7c3bed")("frontstack login")+" to login.");return}console.log("Logged in as "+m.hex("#7c3bed")(e.email)+`
37
- `),console.log(`Organization: ${e.organization.name}`),console.log(`Current Project: ${t.name??"[No active project selected]"}`)}catch(e){console.log(e)}},"info"),{getProjects:ln,writeProject:be}=N(),un=l(async s=>{let e=s.project??void 0,t=[];try{t=await ln()}catch{console.log(`You are not logged in. Please run ${m.hex("#7c3bed")("frontstack login")} to login`);return}if(t.length<1){console.log("No projects found. Please create a new project in your Admin dashboard");return}if(e!==void 0){const r=t.find(i=>i.id===e);if(r){console.log(`Project ${m.hex("#7c3bed")(r.name)} selected`),be(r.id);return}else{console.log(`Project with ID "${e}" not found. Please select a valid project ID`);return}}const n={type:"select",name:"projectId",message:"Pick a project (Use arrow keys and Enter)",choices:t.map(r=>({title:`${r.name} (${r.id})`,value:r.id}))};(async()=>{const r=await xe(n),i=t.find(a=>a.id===r.projectId);if(i===void 0){console.log(`Project with ID "${r.projectId}" not found. Please select a valid project ID`);return}console.log(`Project ${m.hex("#7c3bed")(i.name)} selected`),be(r.projectId)})()},"project"),hn=g.dirname(new URL(import.meta.url).pathname),Ce=$e(g.join(hn,"version"),"utf8");let Z="0.0.1-dev";Ce&&(Z=Ce.trim());const $=new Xe;$.name("frontstack").description(`${m.bgHex("#7c3bed").bold("Frontstack CLI")}
37
+ `),console.log(`Organization: ${e.organization.name}`),console.log(`Current Project: ${t.name??"[No active project selected]"}`)}catch(e){console.log(e)}},"info"),{getProjects:ln,writeProject:be}=N(),un=l(async s=>{let e=s.project??void 0,t=[];try{t=await ln()}catch{console.log(`You are not logged in. Please run ${m.hex("#7c3bed")("frontstack login")} to login`);return}if(t.length<1){console.log("No projects found. Please create a new project in your Admin dashboard");return}if(e!==void 0){const r=t.find(i=>i.id===e);if(r){console.log(`Project ${m.hex("#7c3bed")(r.name)} selected`),be(r.id);return}else{console.log(`Project with ID "${e}" not found. Please select a valid project ID`);return}}const n={type:"select",name:"projectId",message:"Pick a project (Use arrow keys and Enter)",choices:t.map(r=>({title:`${r.name} (${r.id})`,value:r.id}))};(async()=>{const r=await xe(n),i=t.find(a=>a.id===r.projectId);if(i===void 0){console.log(`Project with ID "${r.projectId}" not found. Please select a valid project ID`);return}console.log(`Project ${m.hex("#7c3bed")(i.name)} selected`),be(r.projectId)})()},"project"),hn=g.dirname(new URL(import.meta.url).pathname),Ce=$e(g.join(hn,"version"),"utf8");let Z="0.0.1-dev";Ce&&(Z=Ce.trim());const $=new Xe;$.name("frontstack").alias("fst").description(`${m.bgHex("#7c3bed").bold("Frontstack CLI")}
38
38
  Manage Frontstack projects from the command line.
39
- ${m.dim(`Version: ${Z}`)}`).version(Z),$.command("login").description("Login to Frontstack account").action(s=>{Zt()}),$.command("logout").description("Logout from Frontstack account").action(async s=>{await en()}),$.command("generate").description("Generate a JavaScript client for the current project").option("-o, --output <path>","Output path",".frontstack").option("-v, --verbose","Verbose output").action(async s=>{await rn(s)}),$.command("info").description("Display information about the current organization, project, and user").action(async()=>{await cn()}),$.command("project").description("Select current working project which will be used for schema and client updates").option("-p --project <project-id>","Set current project ID").action(async s=>{await un(s)});const pn=l(()=>{try{$.parse(process.argv)}catch(s){console.log(s)}},"run");var dn=pn();export{dn as default};
39
+ ${m.dim(`Version: ${Z}`)}`).version(Z),$.command("login").description("Login to Frontstack account").action(()=>{Zt()}),$.command("logout").description("Logout from Frontstack account").action(async s=>{await en()}),$.command("generate").description("Generate a JavaScript client for the current project").option("-o, --output <path>","Output path",".frontstack").option("-v, --verbose","Verbose output").action(async s=>{await rn(s)}),$.command("info").description("Display information about the current organization, project, and user").action(async()=>{await cn()}),$.command("project").description("Select current working project which will be used for schema and client updates").option("-p --project <project-id>","Set current project ID").action(async s=>{await un(s)});const pn=l(()=>{try{$.parse(process.argv)}catch(s){console.log(s)}},"run");var dn=pn();export{dn as default};
package/dist/version CHANGED
@@ -1 +1 @@
1
- 0.0.0-canary-20240910140242
1
+ 0.0.0-canary-20240911085534
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontstackdev/cli",
3
- "version": "0.0.0-canary-20240910140242",
3
+ "version": "0.0.0-canary-20240911085534",
4
4
  "description": "Frontstack CLI for managing projects",
5
5
  "type": "module",
6
6
  "module": "dist/frontstack.mjs",
@@ -14,7 +14,8 @@
14
14
  },
15
15
  "keywords": [],
16
16
  "bin": {
17
- "frontstack": "dist/frontstack.mjs"
17
+ "frontstack": "dist/frontstack.mjs",
18
+ "fst": "dist/frontstack.mjs"
18
19
  },
19
20
  "files": [
20
21
  "dist"