@every-app/cli 0.0.3 → 0.0.4

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,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{a as o,b as s}from"./chunk-KHVRTG63.js";import{proposeCompletions as r}from"@stricli/core";var t=process.argv.slice(3);process.env.COMP_LINE?.endsWith(" ")&&t.push("");await r(s,t,o(process));try{for(let{completion:p}of await r(s,t,o(process)))process.stdout.write(`${p}
2
+ import{a as o,b as s}from"./chunk-YIIUEQUN.js";import{proposeCompletions as r}from"@stricli/core";var t=process.argv.slice(3);process.env.COMP_LINE?.endsWith(" ")&&t.push("");await r(s,t,o(process));try{for(let{completion:p}of await r(s,t,o(process)))process.stdout.write(`${p}
3
3
  `)}catch{}
@@ -1,4 +1,4 @@
1
- import p from"node:fs";import l from"node:os";import d from"node:path";function R(e){return{process:e,os:l,fs:p,path:d}}import{buildApplication as g,buildRouteMap as C}from"@stricli/core";import{buildInstallCommand as h,buildUninstallCommand as v}from"@stricli/auto-complete";var o="@every-app/cli";var r="Every CLI - Command line tool for deploying and managing Every applications";var n="0.0.3";import{buildCommand as a,buildRouteMap as m}from"@stricli/core";var c=a({loader:async()=>import("./create-A6ESZFI6.js"),parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Create a new app from the starter template",fullDescription:["Copies the simple-todo starter template and configures your local development environment.","","The command will:"," 1. Prompt for app ID (kebab-case) and package manager"," 2. Copy the template to a new directory"," 3. Create Cloudflare D1 database and KV namespace"," 4. Configure wrangler.jsonc, package.json, and .env files"," 5. Install dependencies and run local migrations","","After creation, run 'npm run dev' to start developing."].join(`
1
+ import p from"node:fs";import l from"node:os";import d from"node:path";function R(e){return{process:e,os:l,fs:p,path:d}}import{buildApplication as g,buildRouteMap as C}from"@stricli/core";import{buildInstallCommand as h,buildUninstallCommand as v}from"@stricli/auto-complete";var o="@every-app/cli";var r="Every CLI - Command line tool for deploying and managing Every applications";var n="0.0.4";import{buildCommand as a,buildRouteMap as m}from"@stricli/core";var c=a({loader:async()=>import("./create-6CJ2EY4F.js"),parameters:{positional:{kind:"tuple",parameters:[]}},docs:{brief:"Create a new app from the starter template",fullDescription:["Copies the simple-todo starter template and configures your local development environment.","","The command will:"," 1. Prompt for app ID (kebab-case) and package manager"," 2. Copy the template to a new directory"," 3. Create Cloudflare D1 database and KV namespace"," 4. Configure wrangler.jsonc, package.json, and .env files"," 5. Install dependencies and run local migrations","","After creation, run 'npm run dev' to start developing."].join(`
2
2
  `)}}),u=a({loader:async()=>{let{deploy:e}=await import("./deploy-7BBFD45Y.js");return e},parameters:{positional:{kind:"tuple",parameters:[]},flags:{verbose:{kind:"boolean",brief:"Show detailed output during deployment",optional:!0}}},docs:{brief:"Deploy an app to Cloudflare",fullDescription:["Deploys the current app to Cloudflare Workers from the current directory.","The deployment process:"," 1. Reads wrangler.jsonc to determine required resources"," 2. Creates or links D1 databases and KV namespaces"," 3. Updates wrangler.jsonc with resource IDs"," 4. Installs dependencies if needed"," 5. Runs database migrations against production D1"," 6. Builds and deploys using wrangler deploy"].join(`
3
- `)}}),s=m({routes:{create:c,deploy:u},docs:{brief:"App management commands"}});import{buildCommand as y,buildRouteMap as f}from"@stricli/core";var b=y({loader:async()=>{let{deploy:e}=await import("./deploy-VWOTU23U.js");return e},parameters:{positional:{kind:"tuple",parameters:[]},flags:{repo:{kind:"parsed",parse:String,brief:"Git repository URL to deploy",optional:!0},verbose:{kind:"boolean",brief:"Show detailed output during deployment",optional:!0}}},docs:{brief:"Deploy the gateway application to Cloudflare",fullDescription:["Clones the gateway repository, installs dependencies, runs migrations, and deploys to Cloudflare Workers.","The deployment process:"," 1. Clones the repository to a temporary directory"," 2. Installs npm dependencies"," 3. Runs database migrations against production D1"," 4. Runs wrangler deploy"," 5. Cleans up temporary files"].join(`
3
+ `)}}),s=m({routes:{create:c,deploy:u},docs:{brief:"App management commands"}});import{buildCommand as y,buildRouteMap as f}from"@stricli/core";var b=y({loader:async()=>{let{deploy:e}=await import("./deploy-VZ3X6ZUS.js");return e},parameters:{positional:{kind:"tuple",parameters:[]},flags:{repo:{kind:"parsed",parse:String,brief:"Git repository URL to deploy",optional:!0},verbose:{kind:"boolean",brief:"Show detailed output during deployment",optional:!0}}},docs:{brief:"Deploy the gateway application to Cloudflare",fullDescription:["Clones the gateway repository, installs dependencies, runs migrations, and deploys to Cloudflare Workers.","The deployment process:"," 1. Clones the repository to a temporary directory"," 2. Installs npm dependencies"," 3. Runs database migrations against production D1"," 4. Runs wrangler deploy"," 5. Cleans up temporary files"].join(`
4
4
  `)}}),i=f({routes:{deploy:b},docs:{brief:"Gateway management commands"}});var x=C({routes:{app:s,gateway:i,install:h("every",{bash:"__every_bash_complete"}),uninstall:v("every",{bash:!0})},docs:{brief:r,hideRoute:{install:!0,uninstall:!0}}}),V=g(x,{name:o,versionInfo:{currentVersion:n}});export{R as a,V as b};
@@ -1,13 +1,13 @@
1
- import{a as c,b as g,c as m,d,e as u,f as y}from"./chunk-R3ED3ZGI.js";import{b as p,g as f,k as w,l as b}from"./chunk-XWM5KXMK.js";import h from"node:fs/promises";import i from"node:path";import k from"enquirer";import{execa as D}from"execa";import e from"chalk";var v="git@github.com:coolapps-xyz/openeverything-packages.git",$="templates/simple-todo";function x(n){return!n||n.trim().length===0?"App ID cannot be empty":n.length>64?"App ID must be 64 characters or less":/^[a-z][a-z0-9-]*$/.test(n)?!0:"App ID must be in kebab-case format (lowercase letters, numbers, and hyphens only, starting with a letter)"}async function E(){return(await k.prompt({type:"input",name:"appId",message:"Enter your app ID (kebab-case format)",initial:"my-cool-app",validate:x})).appId}async function j(){return(await k.prompt({type:"select",name:"packageManager",message:"Select your package manager",choices:[{name:"pnpm",message:"pnpm (recommended)"},{name:"npm",message:"npm"}],initial:0})).packageManager}async function I(n,a){let o=i.join(n,"package.json"),t=JSON.parse(await h.readFile(o,"utf-8"));t.name=a,t.scripts["db:migrate:dev"]=`wrangler d1 migrations apply ${a} --local`,t.scripts["db:migrate:prod"]=`wrangler d1 migrations apply ${a} --remote`,await h.writeFile(o,JSON.stringify(t,null,2)+`
1
+ import{a as c,b as g,c as m,d,e as u,f as y}from"./chunk-R3ED3ZGI.js";import{b as p,g as f,k as w,l as b}from"./chunk-XWM5KXMK.js";import h from"node:fs/promises";import i from"node:path";import k from"enquirer";import{execa as D}from"execa";import e from"chalk";var v="git@github.com:every-app/every-app-monorepo.git",$="templates/simple-todo";function E(n){return!n||n.trim().length===0?"App ID cannot be empty":n.length>64?"App ID must be 64 characters or less":/^[a-z][a-z0-9-]*$/.test(n)?!0:"App ID must be in kebab-case format (lowercase letters, numbers, and hyphens only, starting with a letter)"}async function x(){return(await k.prompt({type:"input",name:"appId",message:"Enter your app ID (kebab-case format)",initial:"my-cool-app",validate:E})).appId}async function j(){return(await k.prompt({type:"select",name:"packageManager",message:"Select your package manager",choices:[{name:"pnpm",message:"pnpm (recommended)"},{name:"npm",message:"npm"}],initial:0})).packageManager}async function I(n,a){let o=i.join(n,"package.json"),t=JSON.parse(await h.readFile(o,"utf-8"));t.name=a,t.scripts["db:migrate:dev"]=`wrangler d1 migrations apply ${a} --local`,t.scripts["db:migrate:prod"]=`wrangler d1 migrations apply ${a} --remote`,await h.writeFile(o,JSON.stringify(t,null,2)+`
2
2
  `,"utf-8")}async function A(n,a){try{await D("npx",["wrangler","d1","migrations","apply",a,"--local"],{cwd:n,input:`y
3
3
  `,stdio:["pipe","inherit","inherit"]}),console.log(e.green(`
4
4
  Local database migrations completed successfully
5
5
  `))}catch{console.warn(e.yellow(`
6
6
  Failed to run local migrations. You can run them manually with:`)),console.warn(e.dim(` npm run db:migrate:dev
7
- `))}}async function S(n){console.log(e.bold(`
7
+ `))}}async function z(n){console.log(e.bold(`
8
8
  Create a new Every App project
9
9
  `));let a=null;try{console.log(e.bold(`Project Configuration
10
- `));let o=await E(),t=await j();console.log(e.dim(`
10
+ `));let o=await x(),t=await j();console.log(e.dim(`
11
11
  Creating project: ${o}`)),console.log(e.dim(`Package manager: ${t}
12
12
  `)),console.log(e.bold(`Cloning template repository...
13
13
  `)),a=await u("every-app-create-"),await c(v,a),console.log(e.bold(`
@@ -30,4 +30,4 @@ Project created successfully!
30
30
  `)),console.log(e.bold(`Deploy to production:
31
31
  `)),console.log(e.dim(` ${t} run db:migrate:prod # Run remote migrations`)),console.log(e.dim(` npm run deploy # Deploy to Cloudflare
32
32
  `))}catch(o){throw console.error(e.red(`
33
- Failed to create project:`),o instanceof Error?o.message:"Unknown error"),o}finally{a&&await y(a)}}export{S as default};
33
+ Failed to create project:`),o instanceof Error?o.message:"Unknown error"),o}finally{a&&await y(a)}}export{z as default};
@@ -19,7 +19,7 @@ Setting up secrets...
19
19
  `))}else throw new Error("JWT key pair is incomplete. Both JWT_PRIVATE_KEY and JWT_PUBLIC_KEY must exist together. Please delete the existing key and redeploy.");console.log(t.green(`Secret setup complete!
20
20
  `))}catch(r){throw console.error(t.red(`
21
21
  Failed to setup secrets`),r instanceof Error?t.dim(`
22
- ${r.message}`):""),r}}var P="git@github.com:coolapps-xyz/openeverything-packages.git",J="every-app-gateway",H="every-app-gateway",N="apps/every-app-gateway";async function v(){console.log(l.bold(`
22
+ ${r.message}`):""),r}}var P="git@github.com:every-app/every-app-monorepo.git",J="every-app-gateway",H="every-app-gateway",N="apps/every-app-gateway";async function v(){console.log(l.bold(`
23
23
  Setting up Cloudflare resources...
24
24
  `));let o=await f(),e=await A(J),r=await C(H);return{d1DatabaseId:e,kvNamespaceId:r,accountId:o}}async function I(o,e=!1){console.log(l.bold("Cloning gateway repository...")),console.log(l.dim(` Repository: ${P}
25
25
  `));try{await y(P,o,e);let r=k.join(o,N);return console.log(l.bold(`Installing dependencies in apps/every-app-gateway...
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as r,b as o}from"./chunk-KHVRTG63.js";import{run as i}from"@stricli/core";await i(o,process.argv.slice(2),r(process));
2
+ import{a as r,b as o}from"./chunk-YIIUEQUN.js";import{run as i}from"@stricli/core";await i(o,process.argv.slice(2),r(process));
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Every CLI - Command line tool for deploying and managing Every applications",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
- "version": "0.0.3",
7
+ "version": "0.0.4",
8
8
  "files": [
9
9
  "dist"
10
10
  ],