@every-app/cli 0.0.32 → 0.0.33
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/dist/bash-complete.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as o,c as s}from"./chunk-
|
|
2
|
+
import{a as o,c as s}from"./chunk-RF2FV7G5.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,5 +1,5 @@
|
|
|
1
|
-
import p from"node:fs";import l from"node:os";import d from"node:path";function A(e){return{process:e,os:l,fs:p,path:d}}import{buildApplication as g,buildRouteMap as C}from"@stricli/core";import{buildInstallCommand as D,buildUninstallCommand as v}from"@stricli/auto-complete";var r="@every-app/cli";var n="Every App CLI - Deploy and manage apps.";var a="0.0.
|
|
2
|
-
`)}}),u=o({loader:async()=>{let{deploy:e}=await import("./deploy-
|
|
1
|
+
import p from"node:fs";import l from"node:os";import d from"node:path";function A(e){return{process:e,os:l,fs:p,path:d}}import{buildApplication as g,buildRouteMap as C}from"@stricli/core";import{buildInstallCommand as D,buildUninstallCommand as v}from"@stricli/auto-complete";var r="@every-app/cli";var n="Every App CLI - Deploy and manage apps.";var a="0.0.33";import{buildCommand as o,buildRouteMap as m}from"@stricli/core";var c=o({loader:async()=>import("./create-O3KRSXQT.js"),parameters:{positional:{kind:"tuple",parameters:[{brief:"App ID (kebab-case format)",parse:String,optional:!0}]},flags:{verbose:{kind:"boolean",brief:"Show detailed output during creation",optional:!0}}},docs:{brief:"Create a new app from the starter template",fullDescription:["Copies the simple-todo starter template, deploys to Cloudflare, and configures local development.","","Usage: every app create [name]","","The command will:"," 1. Prompt for app ID (or use provided name)"," 2. Deploy to Cloudflare (D1 database, KV namespace, Worker)"," 3. Configure wrangler.jsonc, package.json, and .env files"," 4. Install dependencies and run local migrations","","After creation, run 'pnpm run dev' to start developing."].join(`
|
|
2
|
+
`)}}),u=o({loader:async()=>{let{deploy:e}=await import("./deploy-FBTVE4WY.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
3
|
`)}}),y=o({loader:async()=>{let{remoteD1Shell:e}=await import("./remoteD1Shell-L74YWFTK.js");return e},parameters:{flags:{},positional:{kind:"array",parameter:{brief:"Command and arguments to run with environment variables",parse:String}}},docs:{brief:"Run a command with Cloudflare D1 connection environment variables",fullDescription:["Sets environment variables needed to connect to remote Cloudflare D1 and runs any command that requires D1 access.","","The command will:"," 1. Get the Cloudflare account ID"," 2. Look up the database ID from the database name in wrangler.jsonc"," 3. Get a valid OAuth token"," 4. Run the provided command with CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_DATABASE_ID, CLOUDFLARE_API_TOKEN, and MIGRATE_REMOTE set","","Common use cases:"," - Running Drizzle migrations: npx @every-app/cli app remote-d1-shell -- npx drizzle-kit migrate"," - Opening Drizzle Studio: npx @every-app/cli app remote-d1-shell -- npx drizzle-kit studio"," - Pushing schema changes: npx @every-app/cli app remote-d1-shell -- npx drizzle-kit push","","This command is useful for any operation that needs direct access to your production D1 database."].join(`
|
|
4
4
|
`)}}),i=m({routes:{create:c,deploy:u,"remote-d1-shell":y},docs:{brief:"App management commands"}});import{buildCommand as f,buildRouteMap as b}from"@stricli/core";var h=f({loader:async()=>{let{deploy:e}=await import("./deploy-ETXZH2KV.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},localGateway:{kind:"parsed",parse:String,brief:"Path to local gateway tarball (for testing)",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(`
|
|
5
5
|
`)}}),s=b({routes:{deploy:h},docs:{brief:"Gateway management commands"}});var w=C({routes:{app:i,gateway:s,install:D("every",{bash:"__every_bash_complete"}),uninstall:v("every",{bash:!0})},docs:{brief:n,hideRoute:{install:!0,uninstall:!0}}}),M=g(w,{name:r,versionInfo:{currentVersion:a},scanner:{allowArgumentEscapeSequence:!0}});export{A as a,a as b,M as c};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{b as s,c as i}from"./chunk-XEU3RC3D.js";import{a,d as l}from"./chunk-UMTKYAFW.js";import{b as p}from"./chunk-CKXY3PLB.js";import o from"chalk";import d from"node:fs/promises";import w from"node:path";import c from"chalk";var g=["every-app.jsonc","every-app.json"];async function m(){let r=process.cwd();for(let e of g){let t=w.join(r,e);try{await d.access(t);return}catch{}}console.log(c.yellow(`
|
|
2
|
+
Not inside an Every App project`)),console.log(c.dim(` No every-app.jsonc found
|
|
3
|
+
`)),console.log("To create a new app, run the below command from the directory where you store your projects:"),console.log(c.dim(` npx @every-app/cli app create
|
|
4
|
+
`)),process.exit(1)}async function F(r){await p(),await l();let e=process.cwd(),t=r.verbose||!1;await m();let n=await s(e);if(console.log(o.bold(`
|
|
5
|
+
Project: ${n}
|
|
6
|
+
`)),!await a("this app")){console.log(o.red(`
|
|
7
|
+
Deployment cancelled by user
|
|
8
|
+
`));return}let{workerUrl:f,gatewayUrl:y}=await i({cwd:e,appId:n,verbose:t});console.log(o.green(`
|
|
9
|
+
Deployment successful!`)),console.log(o.dim(` App URL: ${o.cyan(f)}`)),console.log(` Gateway: ${o.cyan(y)}
|
|
10
|
+
`)}export{F as deploy};
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as c,b as r,c as p}from"./chunk-
|
|
2
|
+
import{a as c,b as r,c as p}from"./chunk-RF2FV7G5.js";import{run as b}from"@stricli/core";import n from"chalk";var f="https://registry.npmjs.org/@every-app/cli?fields=dist-tags",g=2e3;async function d(){try{let t=new AbortController,s=setTimeout(()=>t.abort(),g),e=await fetch(f,{signal:t.signal});return clearTimeout(s),e.ok?(await e.json())["dist-tags"].latest:null}catch{return null}}function h(t,s){let e=t.split(".").map(Number),i=s.split(".").map(Number);for(let o=0;o<Math.max(e.length,i.length);o++){let a=e[o]??0,l=i[o]??0;if(a<l)return!0;if(a>l)return!1}return!1}function u(){return d().then(t=>t&&t!==r&&h(r,t)?{updateAvailable:!0,latestVersion:t,currentVersion:r}:{updateAvailable:!1,currentVersion:r})}function m(t){t.updateAvailable&&t.latestVersion&&(console.log(),console.log(n.yellow(` Update available: ${t.currentVersion} \u2192 ${t.latestVersion}`)),console.log(n.dim(` npx: ${n.cyan("npx @every-app/cli@latest")}`)),console.log(n.dim(` global: ${n.cyan("npm update -g @every-app/cli")}`)))}var v=u();await b(p,process.argv.slice(2),c(process));var C=await v;m(C);
|
package/package.json
CHANGED
package/dist/deploy-24IDURFP.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{b as a,c}from"./chunk-XEU3RC3D.js";import{a as n,d as l}from"./chunk-UMTKYAFW.js";import{b as r}from"./chunk-CKXY3PLB.js";import o from"chalk";async function C(p){await r(),await l();let e=process.cwd(),m=p.verbose||!1,t=await a(e);if(console.log(o.bold(`
|
|
2
|
-
Project: ${t}
|
|
3
|
-
`)),!await n("this app")){console.log(o.red(`
|
|
4
|
-
Deployment cancelled by user
|
|
5
|
-
`));return}let{workerUrl:s,gatewayUrl:i}=await c({cwd:e,appId:t,verbose:m});console.log(o.green(`
|
|
6
|
-
Deployment successful!`)),console.log(o.dim(` App URL: ${o.cyan(s)}`)),console.log(` Gateway: ${o.cyan(i)}
|
|
7
|
-
`)}export{C as deploy};
|