everyapp 0.0.34 → 0.0.35
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/README.md +68 -0
- package/dist/bash-complete.js +1 -1
- package/dist/{chunk-WPKMCCG4.js → chunk-LBIRZMS3.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# everyapp
|
|
2
|
+
|
|
3
|
+
CLI for [Every App](https://everyapp.dev) - deploy and manage self-hosted apps on Cloudflare.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Run directly with npx (recommended)
|
|
9
|
+
npx everyapp <command>
|
|
10
|
+
|
|
11
|
+
# Or install globally
|
|
12
|
+
npm install -g everyapp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
### Deploy the Gateway
|
|
18
|
+
|
|
19
|
+
Deploy the Every App Gateway to your Cloudflare account:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx everyapp gateway deploy
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Create a new app
|
|
26
|
+
|
|
27
|
+
Create a new app from the starter template:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx everyapp app create [name]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This will:
|
|
34
|
+
1. Prompt for an app ID (or use the provided name)
|
|
35
|
+
2. Deploy to Cloudflare (D1 database, KV namespace, Worker)
|
|
36
|
+
3. Configure wrangler.jsonc, package.json, and .env files
|
|
37
|
+
4. Install dependencies and run local migrations
|
|
38
|
+
|
|
39
|
+
### Deploy an app
|
|
40
|
+
|
|
41
|
+
Deploy your app to Cloudflare:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx everyapp app deploy
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Run this from your app directory to build and deploy updates.
|
|
48
|
+
|
|
49
|
+
### Remote D1 shell
|
|
50
|
+
|
|
51
|
+
Run commands with access to your production D1 database:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx everyapp app remote-d1-shell -- <command>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Examples:
|
|
58
|
+
```bash
|
|
59
|
+
# Run migrations
|
|
60
|
+
npx everyapp app remote-d1-shell -- npx drizzle-kit migrate
|
|
61
|
+
|
|
62
|
+
# Open Drizzle Studio
|
|
63
|
+
npx everyapp app remote-d1-shell -- npx drizzle-kit studio
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Documentation
|
|
67
|
+
|
|
68
|
+
For full documentation, visit [everyapp.dev/docs](https://everyapp.dev/docs).
|
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-LBIRZMS3.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 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="everyapp";var a="Every App CLI - Deploy and manage apps.";var n="0.0.
|
|
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="everyapp";var a="Every App CLI - Deploy and manage apps.";var n="0.0.35";import{buildCommand as o,buildRouteMap as m}from"@stricli/core";var c=o({loader:async()=>import("./create-LX7N2LYZ.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
2
|
`)}}),u=o({loader:async()=>{let{deploy:e}=await import("./deploy-2GZIV4E7.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
|
`)}}),f=o({loader:async()=>{let{remoteD1Shell:e}=await import("./remoteD1Shell-FVGXLMHR.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 everyapp app remote-d1-shell -- npx drizzle-kit migrate"," - Opening Drizzle Studio: npx everyapp app remote-d1-shell -- npx drizzle-kit studio"," - Pushing schema changes: npx everyapp 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
|
`)}}),s=m({routes:{create:c,deploy:u,"remote-d1-shell":f},docs:{brief:"App management commands"}});import{buildCommand as y,buildRouteMap as b}from"@stricli/core";var h=y({loader:async()=>{let{deploy:e}=await import("./deploy-NRAZNA7V.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(`
|
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-LBIRZMS3.js";import{run as b}from"@stricli/core";import n from"chalk";var f="https://registry.npmjs.org/everyapp?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 everyapp@latest")}`)),console.log(n.dim(` global: ${n.cyan("npm update -g everyapp")}`)))}var v=u();await b(p,process.argv.slice(2),c(process));var C=await v;m(C);
|