everyapp 0.2.2 → 0.3.0-rc.2

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.
Files changed (128) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -77
  3. package/bin/everyapp.js +235 -0
  4. package/dist/access-LGEN3ABJ.js +1 -0
  5. package/dist/activity-RSD4D66F.js +12 -0
  6. package/dist/apps-4RCFXT74.js +13 -0
  7. package/dist/chunk-23HJ5I2A.js +2 -0
  8. package/dist/chunk-2Y5Q6A5K.js +6 -0
  9. package/dist/chunk-4JRIS6S6.js +1 -0
  10. package/dist/chunk-5PTNYZK6.js +4 -0
  11. package/dist/chunk-6OGVO7QK.js +6 -0
  12. package/dist/chunk-6PGUCTJ6.js +11 -0
  13. package/dist/chunk-AGTCKFRB.js +22 -0
  14. package/dist/chunk-BHMRY53V.js +2 -0
  15. package/dist/chunk-CB4U7H2G.js +4 -0
  16. package/dist/chunk-CCWBPAKH.js +4 -0
  17. package/dist/chunk-CZTEDWZ2.js +22 -0
  18. package/dist/chunk-CZXHKPRZ.js +2 -0
  19. package/dist/chunk-E3EPK27P.js +10 -0
  20. package/dist/chunk-EGEWRFVY.js +1 -0
  21. package/dist/chunk-ELK7QZ2M.js +1 -0
  22. package/dist/chunk-FJJSSVET.js +33 -0
  23. package/dist/chunk-GKBPYVP3.js +25 -0
  24. package/dist/chunk-H6QQMY7B.js +18 -0
  25. package/dist/chunk-H7PDL3X5.js +1 -0
  26. package/dist/chunk-HOUHG236.js +20 -0
  27. package/dist/chunk-IFCPALVC.js +46 -0
  28. package/dist/chunk-IUOBIB5M.js +30 -0
  29. package/dist/chunk-J35DDCNU.js +1 -0
  30. package/dist/chunk-J455FAEN.js +7 -0
  31. package/dist/chunk-JYKRUS5C.js +1 -0
  32. package/dist/chunk-LXYMDZER.js +1 -0
  33. package/dist/chunk-LYNBZ7RV.js +57 -0
  34. package/dist/chunk-M2QQ2UD7.js +132 -0
  35. package/dist/chunk-N4E5YE4X.js +5 -0
  36. package/dist/chunk-N5GQLGEC.js +2 -0
  37. package/dist/chunk-NFU4YFXB.js +1 -0
  38. package/dist/chunk-OM2HDWVP.js +1 -0
  39. package/dist/chunk-ONLNJXVQ.js +32 -0
  40. package/dist/chunk-OP4DYXYI.js +2 -0
  41. package/dist/chunk-PNLU5U3P.js +1 -0
  42. package/dist/chunk-PS7S74DG.js +6 -0
  43. package/dist/chunk-RMF4YGD6.js +98 -0
  44. package/dist/chunk-T2GD7RHS.js +10 -0
  45. package/dist/chunk-TLRM3P7V.js +15 -0
  46. package/dist/chunk-W3JCQHHU.js +1 -0
  47. package/dist/chunk-WOVS3GV5.js +10 -0
  48. package/dist/chunk-YHJZMJYZ.js +1 -0
  49. package/dist/chunk-ZECBN24L.js +15 -0
  50. package/dist/chunk-ZEXVHB22.js +2 -0
  51. package/dist/chunk-ZFCUH5PK.js +7 -0
  52. package/dist/configure-F7UZCJUG.js +8 -0
  53. package/dist/create-2E5HVWYK.js +22 -0
  54. package/dist/db-HEQVTDTM.js +9 -0
  55. package/dist/delete-XCSIQIRS.js +3 -0
  56. package/dist/deploy-3QOZEZHC.js +1 -0
  57. package/dist/dev-JL3ZP5BT.js +86 -0
  58. package/dist/email-RLZFUFUN.js +10 -0
  59. package/dist/events-2V5VRBWP.js +15 -0
  60. package/dist/groups-HDG5DVFY.js +8 -0
  61. package/dist/index.js +97 -1
  62. package/dist/install-Z5FYXUYM.js +1 -0
  63. package/dist/login-KHJBC64Z.js +1 -0
  64. package/dist/mcp-EFDUKJ5V.js +1 -0
  65. package/dist/provider-EOI5PTFH.js +13 -0
  66. package/dist/release-74J5ZIL3.js +1 -0
  67. package/dist/restore-FFGYV7NO.js +3 -0
  68. package/dist/secret-7FKKTLHB.js +1 -0
  69. package/dist/setup-PAKRCAFO.js +1 -0
  70. package/dist/signin-AP3D4XM4.js +12 -0
  71. package/dist/status-RMWNHOEK.js +4 -0
  72. package/dist/teardown-E4JNKAZJ.js +22 -0
  73. package/dist/update-DWVZFNPS.js +1 -0
  74. package/dist/workspace-CJC5I66L.js +21 -0
  75. package/package.json +19 -16
  76. package/skills/build-every-app/SKILL.md +199 -0
  77. package/skills/build-every-app/patterns.md +140 -0
  78. package/skills/everyapp/SKILL.md +292 -0
  79. package/skills/everyapp/mcp.md +350 -0
  80. package/skills/everyapp/security-review.md +61 -0
  81. package/skills/everyapp/setup/README.md +274 -0
  82. package/skills/everyapp/setup/access.md +178 -0
  83. package/skills/everyapp/setup/context.md +117 -0
  84. package/skills/everyapp/setup/dataforseo.md +287 -0
  85. package/skills/everyapp/setup/email.md +366 -0
  86. package/skills/everyapp/setup/gateway.md +243 -0
  87. package/skills/everyapp/setup/google.md +360 -0
  88. package/skills/everyapp/setup/microsoft-365.md +281 -0
  89. package/skills/everyapp/setup/openai.md +318 -0
  90. package/skills/everyapp/setup/openrouter.md +309 -0
  91. package/skills/everyapp/setup/providers.md +1253 -0
  92. package/skills/everyapp/setup/remote-mcp.md +199 -0
  93. package/skills/everyapp/setup/signin-apple.md +178 -0
  94. package/skills/everyapp/setup/signin-cloudflare.md +148 -0
  95. package/skills/everyapp/setup/signin-github.md +139 -0
  96. package/skills/everyapp/setup/signin-google.md +178 -0
  97. package/skills/everyapp/setup/signin-microsoft.md +183 -0
  98. package/skills/everyapp/setup/signin-oidc.md +163 -0
  99. package/skills/everyapp/setup/slack.md +344 -0
  100. package/skills/everyapp/setup/workers-ai.md +138 -0
  101. package/bin/__everyapp_bash_complete.js +0 -12
  102. package/dist/bash-complete.js +0 -3
  103. package/dist/chunk-7BOQJFI5.js +0 -8
  104. package/dist/chunk-7YVJFS4A.js +0 -1
  105. package/dist/chunk-BIXKPCDH.js +0 -2
  106. package/dist/chunk-DLGPLHBH.js +0 -47
  107. package/dist/chunk-FD6K2YA7.js +0 -9
  108. package/dist/chunk-GAJEQYJH.js +0 -39
  109. package/dist/chunk-O2KDOP5R.js +0 -13
  110. package/dist/chunk-OI2MBGBG.js +0 -4
  111. package/dist/chunk-POSDLD3G.js +0 -8
  112. package/dist/chunk-RB5D2R45.js +0 -1
  113. package/dist/chunk-U4LIQ5VR.js +0 -1
  114. package/dist/chunk-VEYSNPDH.js +0 -3
  115. package/dist/chunk-VP6SKW44.js +0 -7
  116. package/dist/chunk-WO3NE7ZU.js +0 -7
  117. package/dist/chunk-XTO2VTPY.js +0 -6
  118. package/dist/chunk-YJ2DKIZS.js +0 -1
  119. package/dist/create-DYQ3NBWJ.js +0 -22
  120. package/dist/deploy-PYTCMDGV.js +0 -7
  121. package/dist/deploy-RMAHOA4Z.js +0 -55
  122. package/dist/dev-SAE237FS.js +0 -0
  123. package/dist/generateConfig-46Z3ERF3.js +0 -1
  124. package/dist/login-B6EF3SMX.js +0 -1
  125. package/dist/logout-XMKZBLNV.js +0 -1
  126. package/dist/remoteD1Shell-A67JMO3H.js +0 -6
  127. package/dist/setupLocal-TZJUW5ES.js +0 -6
  128. package/gateway/every-app-gateway-build.tar.gz +0 -0
@@ -1,55 +0,0 @@
1
- import{a as J,b as Z,d as h,e as Q}from"./chunk-7BOQJFI5.js";import{a as S,b as A,c as z,e as q}from"./chunk-XTO2VTPY.js";import{a as C,b as v,c as T,d as D,f as H}from"./chunk-O2KDOP5R.js";import{d as Y,e as F,f as M}from"./chunk-FD6K2YA7.js";import"./chunk-BIXKPCDH.js";import"./chunk-VEYSNPDH.js";import"./chunk-7YVJFS4A.js";import{a as G,d as L,f as $,h as P,i as N,l as O,p as K,q as j,s as B,t as V}from"./chunk-DLGPLHBH.js";import{c as R}from"./chunk-U4LIQ5VR.js";import"./chunk-RB5D2R45.js";import"./chunk-WO3NE7ZU.js";import"./chunk-YJ2DKIZS.js";import g from"chalk";import Te from"node:path";import _ from"chalk";var de="every-app-gateway",ge={KV:"every-app-gateway",OAUTH_KV:"every-app-gateway-OAUTH_KV"};async function X({verbose:e=!1}={}){console.log(`
2
- Setting up your Cloudflare D1 Database and KV Store...
3
- `);let a=await L(),o=await fe(de,a,e),t={};for(let[n,i]of Object.entries(ge))t[n]=await me(i,a,e);return console.log(),{d1DatabaseId:o,kvNamespaceIds:t,accountId:a}}async function fe(e,a,o){o&&console.log(` Checking D1 database: ${e}`);let t=await P(e,a);return o?t.wasCreated?console.log(_.green(` Created D1 database: ${e} (${t.id})
4
- `)):console.log(_.dim(` Linking to existing D1 database: ${e} (${t.id})
5
- `)):t.wasCreated?console.log(_.green(` D1 successfully created.
6
- `)):console.log(" D1 already set up."),t.id}async function me(e,a,o){o&&console.log(` Checking KV namespace: ${e}`);let t=await N(e,a);return o?t.wasCreated?console.log(_.green(` Created KV namespace: ${e} (${t.id})
7
- `)):console.log(_.dim(` Linking to existing KV namespace: ${e} (${t.id})
8
- `)):t.wasCreated?console.log(_.green(" KV successfully created.")):console.log(" KV already set up."),t.id}import be from"node:crypto";import Ee from"node:path";import te from"node:crypto";import k from"chalk";import we from"node:path";import x from"node:fs/promises";import pe from"node:path";import*as d from"jsonc-parser";import ue from"chalk";async function ee(e){e.verbose&&console.log("Updating Wrangler config with resource IDs and configuration...");let a=e.configPath;(await x.stat(a)).isDirectory()&&(a=pe.join(a,"wrangler.jsonc"));let t=await x.readFile(a,"utf-8"),n=d.parse(t),i=[];if(n.d1_databases){if(n.d1_databases.length===0)throw new Error("No D1 databases found in Wrangler config. The gateway must have exactly one D1 database.");if(n.d1_databases.length>1)throw new Error(`Found ${n.d1_databases.length} D1 databases in Wrangler config. The gateway must have exactly one D1 database.`)}if(e.kvNamespaceIds){let l=new Map;for(let c of n.kv_namespaces??[])l.set(c.binding,(l.get(c.binding)??0)+1);for(let[c,p]of l){if(p>1)throw new Error(`Found ${p} KV namespaces bound to "${c}" in Wrangler config. Each KV binding must be declared exactly once.`);if(!Object.hasOwn(e.kvNamespaceIds,c))throw new Error(`Wrangler config declares KV binding "${c}", but the CLI did not provision it. Update gateway resource provisioning to include this binding before deploying.`)}for(let c of Object.keys(e.kvNamespaceIds))if(!l.has(c))throw new Error(`The CLI provisioned KV binding "${c}", but Wrangler config does not declare it. Update the gateway config and resource provisioning so the bindings match.`)}if(n.r2_buckets&&n.r2_buckets.length>1)throw new Error(`Found ${n.r2_buckets.length} R2 buckets in Wrangler config. The gateway must have at most one R2 bucket.`);if(e.name&&i.push(...d.modify(t,["name"],e.name,{})),e.d1DatabaseId&&i.push(...d.modify(t,["d1_databases",0,"database_id"],e.d1DatabaseId,{})),e.d1DatabaseName&&i.push(...d.modify(t,["d1_databases",0,"database_name"],e.d1DatabaseName,{})),e.kvNamespaceIds)for(let[l,c]of Object.entries(e.kvNamespaceIds)){let p=n.kv_namespaces?.findIndex(w=>w.binding===l)??-1;p>=0&&i.push(...d.modify(t,["kv_namespaces",p,"id"],c,{}))}if(e.r2BucketName&&n.r2_buckets?.length&&i.push(...d.modify(t,["r2_buckets",0,"bucket_name"],e.r2BucketName,{})),e.vars)for(let[l,c]of Object.entries(e.vars))i.push(...d.modify(t,["vars",l],c,{}));e.routes&&i.push(...d.modify(t,["routes"],e.routes,{})),typeof e.workersDev=="boolean"&&i.push(...d.modify(t,["workers_dev"],e.workersDev,{})),e.services&&i.push(...d.modify(t,["services"],e.services,{}));let r=d.applyEdits(t,i),f=r.indexOf("CLI_PATCHES_");if(f!==-1){let l=r.slice(f).match(/^CLI_PATCHES_[A-Za-z0-9_]*/)?.[0]??"CLI_PATCHES_";throw new Error(`Wrangler config still contains unresolved placeholder "${l}" after CLI patching.`)}await x.writeFile(a,r),e.verbose&&console.log(ue.dim(` Wrangler config updated successfully
9
- `))}async function W(e){let a=await x.readFile(e,"utf-8"),o=d.parse(a);if(!o.name||typeof o.name!="string")throw new Error("Worker name not found in Wrangler config");return o.name}function ye(){return te.randomBytes(32).toString("base64")}function he(){let{privateKey:e,publicKey:a}=te.generateKeyPairSync("rsa",{modulusLength:2048,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:e,publicKey:a}}async function ae({gatewayUrl:e,forceGatewayUrl:a=!1,cloudflareAccountId:o,gatewayPath:t,verbose:n=!1}){let i=await W(we.join(t,"wrangler.jsonc"));try{let r=new Set(await Z({cwd:t,workerName:i})),f=r.has("GATEWAY_URL"),l=r.has("CLOUDFLARE_ACCOUNT_ID"),c=r.has("GATEWAY_DEPLOYMENT_MODE"),p=r.has("BETTER_AUTH_SECRET"),w=r.has("JWT_PRIVATE_KEY"),s=r.has("JWT_PUBLIC_KEY"),u=!p||!w||!s;if(u&&(console.log("Configuring secrets for the authentication service (Better Auth)..."),console.log(k.dim(" BETTER_AUTH_SECRET - Session signing and encryption")),console.log(k.dim(" JWT_PRIVATE_KEY - Signs JWTs issued to your apps")),console.log(k.dim(" JWT_PUBLIC_KEY - Apps use this to verify JWTs")),console.log()),(a||!f)&&await h({secretName:"GATEWAY_URL",secretValue:e,cwd:t,workerName:i,verbose:n,description:`Setting GATEWAY_URL to: ${e}`}),l||await h({secretName:"CLOUDFLARE_ACCOUNT_ID",secretValue:o,cwd:t,workerName:i,verbose:n,description:`Setting CLOUDFLARE_ACCOUNT_ID to: ${o}`}),c||await h({secretName:"GATEWAY_DEPLOYMENT_MODE",secretValue:"self_hosted",cwd:t,workerName:i,verbose:n,description:"Setting GATEWAY_DEPLOYMENT_MODE to: self_hosted"}),!p){let E=ye();await h({secretName:"BETTER_AUTH_SECRET",secretValue:E,cwd:t,workerName:i,verbose:n,description:"Generating new Better Auth secret..."})}if(w&&s)n&&console.log(k.dim(` JWT key pair already exists
10
- `));else if(!w&&!s){n&&console.log(k.dim(` Generating new JWT key pair...
11
- `));let E=he();await h({secretName:"JWT_PRIVATE_KEY",secretValue:E.privateKey,cwd:t,workerName:i,verbose:n}),await h({secretName:"JWT_PUBLIC_KEY",secretValue:E.publicKey,cwd:t,workerName:i,verbose:n}),n&&console.log(k.green(`Created JWT key pair secrets
12
- `))}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.");u&&console.log(n?`Secret setup complete!
13
- `:` Finished.
14
- `)}catch(r){throw console.error(`
15
- Failed to setup secrets`,r instanceof Error?`
16
- ${r.message}`:""),r}}async function oe({gatewayPath:e,resources:a,workerUrl:o,domain:t,serviceBindings:n=[],verbose:i=!1}){let r=Ee.join(e,"dist","server","wrangler.json");await ee({configPath:r,d1DatabaseId:a.d1DatabaseId,kvNamespaceIds:a.kvNamespaceIds,...t?{routes:[{pattern:t,custom_domain:!0},{pattern:`*.${t}/*`,zone_name:t}],workersDev:!1}:{},services:n,verbose:i});let f=be.randomUUID(),{command:l,argsPrefix:c}=await z(e,"wrangler","wrangler");console.log(),await M(l,[...c,"deploy"],{cwd:e,description:`Deploying your Gateway to Cloudflare workers...
17
-
18
- This could take up to a minute.`,env:{...process.env,BETTER_AUTH_SECRET:f},verbose:i}),console.log(),await ae({gatewayUrl:t?`https://${t}`:o,forceGatewayUrl:!!t,cloudflareAccountId:a.accountId,gatewayPath:e,verbose:i})}import b from"node:fs";import y from"node:path";import{spawn as Ce}from"node:child_process";import{fileURLToPath as ve}from"node:url";import{execa as re}from"execa";var ne="every-app-gateway-build.tar.gz";function _e(e=import.meta.url){let a=y.dirname(ve(e));return y.resolve(a,"..","gateway",ne)}async function I(e,a){return new Promise((o,t)=>{let n=Ce("tar",["-xzf",e,"-C",a]);n.on("error",t),n.on("close",i=>{i===0?o():t(new Error(`tar extraction failed with code ${i}`))})})}function ke(e){let a=y.resolve(e);for(;;){let o=y.join(a,"apps","every-app-gateway","package.json");if(b.existsSync(o))return y.dirname(o);let t=y.dirname(a);if(t===a)return null;a=t}}async function ie(e,a,o=!1){let t=ke(a);if(!t)throw new Error("Could not find apps/every-app-gateway from the current directory. Run `everyapp gateway deploy` from inside the monorepo, or pass --localGateway <tarball> to deploy a prebuilt gateway.");let n=y.resolve(t,"..","..");console.log("Building gateway from local source...");let i=o?"inherit":"pipe";await re("pnpm",["--filter","@every-app/sdk","build"],{cwd:n,stdio:i}),await re("pnpm",["run","build:release"],{cwd:t,stdio:i});let r=y.join(t,ne);if(!b.existsSync(r))throw new Error(`Gateway build did not produce ${r}`);return b.mkdirSync(e,{recursive:!0}),A(o,`Built tarball: ${r}`,"Extracting archive..."),await I(r,e),S(o,`Extraction complete
19
- `),e}async function se(e,a=!1){let o=_e();return b.existsSync(o)?(console.log("Using bundled gateway..."),b.mkdirSync(e,{recursive:!0}),A(a,`Tarball: ${o}`,"Extracting archive..."),await I(o,e),S(a,`Extraction complete
20
- `),e):null}async function ce(e,a,o=!1){if(console.log("Using local gateway tarball..."),!b.existsSync(e))throw new Error(`Local gateway tarball not found: ${e}`);return b.mkdirSync(a,{recursive:!0}),A(o,`Tarball: ${e}`,"Extracting archive..."),await I(e,a),S(o,`Extraction complete
21
- `),a}import m from"chalk";async function le({workerUrl:e,maxWaitMs:a=12e4,pollIntervalMs:o=3e3}){let t=`${e}/sign-up`;console.log(m.green(`
22
- Gateway deployment successful!
23
- `)),console.log(`Your Gateway will be available at: ${m.cyan(t)}
24
- `),console.log(m.dim("Waiting for SSL certificate to be provisioned..."));let n=Date.now();for(;Date.now()-n<a;){await new Promise(r=>setTimeout(r,o));let i=!1;try{i=await T(e)}catch(r){if(r instanceof C){console.log(m.yellow(`
25
- Gateway unreachable
26
- `)),console.log(v(r)),console.log(m.dim(` Confirm the gateway URL is correct and reachable, then run this command again.
27
- `));return}throw r}if(i){console.log(m.green(`SSL certificate is ready!
28
- `));let r;try{r=await D(e)}catch(f){if(f instanceof C){console.log(m.yellow(`
29
- Gateway unreachable
30
- `)),console.log(v(f)),console.log(m.dim(` Confirm the gateway URL is correct and reachable, then run this command again.
31
- `));return}throw f}r?console.log(`Your Gateway is now live at: ${m.cyan(e)}
32
- `):(console.log(`Your Gateway is now live at: ${m.cyan(t)}
33
- `),console.log(m.dim(` Create an owner account to get started with your Gateway.
34
- `)));return}}console.log(m.yellow(`
35
- SSL certificate is still being provisioned. This can take a few minutes.
36
- `)),console.log(m.dim(` The URL above will be accessible once the SSL certificate is ready.
37
- `)),console.log(m.dim(` Create an owner account to get started with your Gateway.
38
- `))}async function bt(e){await G({showNewUserHelp:!0});let a=e.verbose||!1,o=e.localGateway,t=e.domain?.replace(/^https?:\/\//,"").replace(/\/$/,""),n=e.yes||!1;if(console.log(g.bold(`
39
- Every App Gateway
40
- `)),!await J("the Gateway",n)){console.log(`
41
- Deployment cancelled by user
42
- `);return}await K();let r=await X({verbose:a});if(t){console.log(g.dim(`Verifying Cloudflare zone for ${t}...`));let s=await B({accountId:r.accountId,domain:t}),u=await V({zoneId:s.id,domain:t});u==="unauthorized"?console.log(g.yellow(Q({domain:t,accountId:r.accountId,mode:"gateway-warning"}))):a&&console.log(g.dim(u==="created"?` Created proxied wildcard DNS record for *.${t}`:` Proxied wildcard DNS record already exists for *.${t}`))}else console.log(g.yellow("Warning: app subdomains require a custom domain. Redeploy the gateway with --domain <apex-domain> before deployed apps are routable."));let f=await j(r.accountId);a&&console.log(g.dim(`Reconstructed ${f.length} gateway service binding${f.length===1?"":"s"} from the registry.`));let l=await Y("gateway-deploy-");a&&console.log(g.dim(`Working directory: ${l}
43
- `));let c=null;try{let s;o?s=await ce(o,l,a):(s=await se(l,a),s??=await ie(l,process.cwd(),a)),await H({cwd:s,verbose:a,description:"Installing gateway dependencies..."});let u=Te.join(s,"wrangler.jsonc"),E=await W(u),U=t?`https://${t}`:await $(E);c=t?`https://${t}`:U,await oe({gatewayPath:s,resources:r,workerUrl:U,domain:t,serviceBindings:f,verbose:a}),await q({cwd:s,d1DatabaseId:r.d1DatabaseId,verbose:a})}catch(s){let u=await O(s);throw u&&(console.log(u.formatted),await R(1)),console.error(`
44
- Deployment failed:`,s instanceof Error?s.message:s),s}finally{await F({tmpDir:l,verbose:a})}if(!c)throw new Error("Worker URL not set properly during deployment");let p;try{p=await T(c)}catch(s){if(s instanceof C){console.log(g.yellow(`
45
- Gateway unreachable
46
- `)),console.log(v(s)),console.log(g.dim(` Confirm the gateway URL is correct and reachable, then run this command again.
47
- `));return}throw s}if(!p){await le({workerUrl:c});return}console.log(g.green(`
48
- Gateway deployment successful!
49
- `));let w;try{w=await D(c)}catch(s){if(s instanceof C){console.log(g.yellow(`
50
- Gateway unreachable
51
- `)),console.log(v(s)),console.log(g.dim(` Confirm the gateway URL is correct and reachable, then run this command again.
52
- `));return}throw s}if(w)console.log(`Your Gateway is now live at: ${g.cyan(c)}
53
- `);else{let s=`${c}/sign-up`;console.log(`Your Gateway is now live at: ${g.cyan(s)}
54
- `),console.log(g.dim(` Create an owner account to get started with your Gateway.
55
- `))}}export{bt as deploy};
Binary file
@@ -1 +0,0 @@
1
- import{f as e}from"./chunk-WO3NE7ZU.js";import"./chunk-YJ2DKIZS.js";import a from"chalk";async function f(o){let n=process.cwd(),{manifest:t,configPath:r}=await e(n);o.verbose&&console.log(a.dim(`Generated ${r} from everyapp.config.ts for ${t.id}.`))}export{f as generateConfig};
@@ -1 +0,0 @@
1
- import{d as l}from"./chunk-BIXKPCDH.js";import{a as r,d as n}from"./chunk-VEYSNPDH.js";import{k as i}from"./chunk-DLGPLHBH.js";import"./chunk-U4LIQ5VR.js";import"./chunk-RB5D2R45.js";import"./chunk-YJ2DKIZS.js";import g from"chalk";import m from"enquirer";async function c(){try{return await i()}catch{return""}}async function k(){let s=await c(),{gatewayUrl:w}=await m.prompt({type:"input",name:"gatewayUrl",message:"Gateway URL",initial:s,validate:e=>{try{return r(e.trim()),!0}catch{return"Enter a valid gateway URL"}}}),t=r(w.trim()),{token:o}=await m.prompt({type:"password",name:"token",message:"Deploy token",validate:e=>e.trim().startsWith("eak_")?!0:"Deploy tokens start with eak_"}),a=await new l({gatewayUrl:t,getAuthToken:async()=>o.trim()}).whoami();await n({gatewayUrl:t,token:o.trim(),organizationId:a.organizationId}),console.log(g.green(`Logged in to ${t} for ${a.organizationName} (${a.organizationId}).`))}export{k as login};
@@ -1 +0,0 @@
1
- import{a as e,e as r}from"./chunk-VEYSNPDH.js";import{k as a}from"./chunk-DLGPLHBH.js";import"./chunk-U4LIQ5VR.js";import"./chunk-RB5D2R45.js";import"./chunk-YJ2DKIZS.js";import o from"chalk";import m from"enquirer";async function y(){try{return await a()}catch{return""}}async function f(){let i=await y(),{gatewayUrl:n}=await m.prompt({type:"input",name:"gatewayUrl",message:"Gateway URL",initial:i,validate:c=>{try{return e(c.trim()),!0}catch{return"Enter a valid gateway URL"}}}),t=e(n.trim()),l=await r(t);console.log(l?o.green(`Logged out of ${t}.`):o.yellow(`No stored credential found for ${t}.`))}export{f as logout};
@@ -1,6 +0,0 @@
1
- import{a}from"./chunk-7YVJFS4A.js";import{a as i}from"./chunk-DLGPLHBH.js";import"./chunk-U4LIQ5VR.js";import"./chunk-RB5D2R45.js";import"./chunk-WO3NE7ZU.js";import"./chunk-YJ2DKIZS.js";import r from"chalk";import{execa as l}from"execa";async function g(m,...o){await i();let n=process.cwd();try{if(!o||o.length===0)throw new Error(`No command provided. Usage: npx everyapp app remote-d1-shell -- <command>
2
- Example: npx everyapp app remote-d1-shell -- npx drizzle-kit migrate`);let[e,...t]=o;if(!e)throw new Error("Invalid command");console.log("Retrieving shell info from Cloudflare...");let c=await a(n);console.log(r.bold(`
3
- Running: ${r.cyan([e,...t].join(" "))}
4
- `)),await l(e,t,{cwd:n,stdio:"inherit",env:{...process.env,...c}}),console.log(`
5
- Command executed!`)}catch(e){throw console.error(r.red(`
6
- Failed to execute command:`),e instanceof Error?e.message:e),e}}export{g as remoteD1Shell};
@@ -1,6 +0,0 @@
1
- import{a as l}from"./chunk-VP6SKW44.js";import{a as c}from"./chunk-OI2MBGBG.js";import{e as r}from"./chunk-O2KDOP5R.js";import"./chunk-FD6K2YA7.js";import"./chunk-BIXKPCDH.js";import"./chunk-VEYSNPDH.js";import{a as n}from"./chunk-DLGPLHBH.js";import"./chunk-U4LIQ5VR.js";import"./chunk-RB5D2R45.js";import{d as i,f as s}from"./chunk-WO3NE7ZU.js";import"./chunk-YJ2DKIZS.js";import o from"chalk";async function L(p){let e=process.cwd(),m=p.verbose||!1;await c(),await n();let u=await r(),t=await i(e),a=t.id;await s(e,{manifest:t}),console.log(o.bold(`
2
- Setting up local environment for ${a}
3
- `)),await l({targetDir:e,appId:a,gatewayUrl:u,verbose:m,installDeps:!0,migrations:t.migrations}),console.log(o.green(`Local setup complete!
4
- `)),console.log(`Run the app locally:
5
- `),console.log(o.dim(` ${o.bold("pnpm run dev")}
6
- `))}export{L as setupLocal};