deployai 0.1.0-beta.10 → 0.1.0-beta.12

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 (2) hide show
  1. package/dist/index.js +119 -20
  2. package/package.json +3 -22
package/dist/index.js CHANGED
@@ -205,6 +205,14 @@ var ISSUES = [
205
205
  fixForAgent: "A custom server that listens on a port cannot run here. Move the routes to Hono (very similar to Express and runs on Cloudflare Workers) or to Astro API routes, and remove app.listen."
206
206
  },
207
207
  // Warnings
208
+ {
209
+ code: "email_smtp",
210
+ severity: "warning",
211
+ titleEn: "Sends email through SMTP, which does not run here",
212
+ titleHe: "\u05E9\u05D5\u05DC\u05D7 \u05DE\u05D9\u05D9\u05DC \u05D3\u05E8\u05DA SMTP, \u05E9\u05DC\u05D0 \u05E2\u05D5\u05D1\u05D3 \u05D0\u05E6\u05DC\u05E0\u05D5",
213
+ agentLine: "The site sends email with{detail}, which needs SMTP. SMTP does not run on DeployAI, so the email part will fail.",
214
+ fixForAgent: "For email to the site owner (a form answer, a new order), use the built-in email: POST JSON { subject, text, replyTo } to `${DEPLOYAI_API}/api/site/notify` with Authorization: Bearer DEPLOYAI_KEY, with no keys to ask for. For email to customers, use an HTTP email API (Resend, Postmark) with its key set by npx deployai@latest env set. Remove the SMTP library."
215
+ },
208
216
  {
209
217
  code: "no_build_script",
210
218
  severity: "warning",
@@ -925,6 +933,19 @@ var ISSUE_HELP = {
925
933
  fix: ["Move the routes to Hono, which is very similar to Express and works on DeployAI.", "Or to Astro API routes.", "Delete the line that starts the server (app.listen)."]
926
934
  }
927
935
  },
936
+ email_smtp: {
937
+ he: {
938
+ what: "\u05D4\u05D0\u05EA\u05E8 \u05E9\u05D5\u05DC\u05D7 \u05DE\u05D9\u05D9\u05DC \u05D3\u05E8\u05DA SMTP (\u05DC\u05DE\u05E9\u05DC \u05E2\u05DD nodemailer).",
939
+ why: "\u05D6\u05D5 \u05D0\u05D6\u05D4\u05E8\u05D4. \u05D4\u05D0\u05EA\u05E8 \u05E2\u05D5\u05DC\u05D4, \u05D0\u05D1\u05DC SMTP \u05DC\u05D0 \u05E2\u05D5\u05D1\u05D3 \u05D0\u05E6\u05DC\u05E0\u05D5, \u05D0\u05D6 \u05D4\u05DE\u05D9\u05D9\u05DC\u05D9\u05DD \u05DC\u05D0 \u05D9\u05D9\u05E9\u05DC\u05D7\u05D5.",
940
+ fix: ["\u05DE\u05D9\u05D9\u05DC \u05D0\u05DC\u05D9\u05DB\u05DD, \u05DC\u05DE\u05E9\u05DC \u05E2\u05DC \u05D8\u05D5\u05E4\u05E1 \u05E9\u05DE\u05D5\u05DC\u05D0: \u05D4\u05DE\u05D9\u05D9\u05DC \u05D4\u05DE\u05D5\u05D1\u05E0\u05D4 \u05E9\u05DC DeployAI, \u05D1\u05DC\u05D9 \u05E1\u05E4\u05E7 \u05DE\u05D9\u05D9\u05DC \u05D5\u05D1\u05DC\u05D9 \u05DE\u05E4\u05EA\u05D7\u05D5\u05EA.", "\u05DE\u05D9\u05D9\u05DC \u05DC\u05DC\u05E7\u05D5\u05D7\u05D5\u05EA: \u05E9\u05D9\u05E8\u05D5\u05EA \u05DE\u05D9\u05D9\u05DC \u05D3\u05E8\u05DA HTTP, \u05DB\u05DE\u05D5 Resend \u05D0\u05D5 Postmark."],
941
+ prompt: "\u05D4\u05D0\u05EA\u05E8 \u05E9\u05D5\u05DC\u05D7 \u05DE\u05D9\u05D9\u05DC \u05D3\u05E8\u05DA SMTP, \u05E9\u05DC\u05D0 \u05E2\u05D5\u05D1\u05D3 \u05D1\u05BEDeployAI. \u05DC\u05DE\u05D9\u05D9\u05DC \u05D0\u05DC\u05D9\u05D9 (\u05D8\u05D5\u05E4\u05E1 \u05E9\u05DE\u05D5\u05DC\u05D0, \u05D4\u05D6\u05DE\u05E0\u05D4 \u05D7\u05D3\u05E9\u05D4) \u05D4\u05E9\u05EA\u05DE\u05E9 \u05D1\u05DE\u05D9\u05D9\u05DC \u05D4\u05DE\u05D5\u05D1\u05E0\u05D4: POST \u05E2\u05DD JSON { subject, text, replyTo } \u05D0\u05DC ${DEPLOYAI_API}/api/site/notify \u05E2\u05DD \u05D4\u05DB\u05D5\u05EA\u05E8\u05EA Authorization: Bearer DEPLOYAI_KEY. \u05DC\u05DE\u05D9\u05D9\u05DC \u05DC\u05DC\u05E7\u05D5\u05D7\u05D5\u05EA \u05D4\u05E9\u05EA\u05DE\u05E9 \u05D1\u05BEResend \u05D0\u05D5 Postmark \u05D3\u05E8\u05DA HTTP. \u05D4\u05E1\u05E8 \u05D0\u05EA \u05E1\u05E4\u05E8\u05D9\u05D9\u05EA \u05D4\u05BESMTP."
942
+ },
943
+ en: {
944
+ what: "The site sends email through SMTP (for example with nodemailer).",
945
+ why: "This is a warning. The site goes live, but SMTP does not run here, so the emails will not be sent.",
946
+ fix: ["Email to you, for example on a form answer: the DeployAI built-in email, with no email provider and no keys.", "Email to customers: an email service over HTTP, like Resend or Postmark."]
947
+ }
948
+ },
928
949
  no_build_script: {
929
950
  he: {
930
951
  what: "\u05D1\u05E7\u05D5\u05D1\u05E5 package.json \u05D0\u05D9\u05DF \u05E4\u05E7\u05D5\u05D3\u05EA build, \u05D4\u05E4\u05E7\u05D5\u05D3\u05D4 \u05E9\u05D1\u05D5\u05E0\u05D4 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8.",
@@ -21324,7 +21345,7 @@ var LOGIN = { cmd: "npx deployai@latest login", say: "The owner approves it in t
21324
21345
  var STATUS = { cmd: "npx deployai@latest status", say: "Run it until the new version is ready, then send the owner the preview address." };
21325
21346
  var PROMOTE = { cmd: "npx deployai@latest promote v<N>", say: "Only after the owner approves the preview. N is the version number deploy printed. Then give the owner the live address." };
21326
21347
  var DEPLOY_SAY = "It builds a preview first. Write the -m message in a few words in the language of the owner, about what they see changed.";
21327
- var BUILD = { say: `Build the owner's site in this folder in place of the starter page, as the instructions above say, following README.md "Before you go live". Run check only after that.` };
21348
+ var BUILD = { say: "This folder had no site, so start wrote a starter page. Do not ask where the site comes from or which way to start: build a first version of the owner's site in its place now. Use what you know (the instructions above, .deployai/brief.md if it exists, the folder name) and choose the layout, colors and wording yourself. Ask at most one short question, and only if you cannot tell what the site is for. Leave out what you do not know (phone, prices, hours) instead of asking for it. Then show it to the owner and offer to add those details. Run check only after that." };
21328
21349
  var PULL = { cmd: "npx deployai@latest pull", say: "This folder was empty, so it downloads the code of the live site first. Work on that code." };
21329
21350
  function startSteps(kind, opts = {}) {
21330
21351
  switch (kind) {
@@ -21346,7 +21367,8 @@ function startSteps(kind, opts = {}) {
21346
21367
  ];
21347
21368
  case "guest":
21348
21369
  return [
21349
- { ...CHECK, say: "Fix every blocker it lists, then run it again until it shows none. If the site needs environment variables, secrets, file storage or sending email, stop and tell the owner it needs a free account." },
21370
+ ...opts.starter ? [BUILD] : [],
21371
+ { ...CHECK, say: "Fix every blocker it lists, then run it again until it shows none. If the site needs environment variables, secrets, file storage or sending email, never stop building for it: tell the owner once, in one plain line, that putting those parts live needs a free account (one link, about a minute), keep building what they asked, and ask about the account only at the deploy step." },
21350
21372
  ASK,
21351
21373
  { cmd: "npx deployai@latest deploy --guest", say: "It prints the address, the claim link and any owner keys." },
21352
21374
  { say: "The site goes live about a minute later: wait, then open the address to see it is live before you tell the owner." },
@@ -21355,6 +21377,8 @@ function startSteps(kind, opts = {}) {
21355
21377
  ];
21356
21378
  }
21357
21379
  }
21380
+ var allowCommandsUrl = (lang = "he") => `${HELP_ORIGIN}${lang === "he" ? "" : "/en"}/connect-ai#allow`;
21381
+ var runCommandsRule = (lang = "he") => `Run every npx deployai@latest command yourself. If your tool asks before it runs one, ask the owner one short yes or no question that names the command, for example "Run npx deployai@latest check? (yes or no)", and run it when they say yes. Never ask the owner to copy, paste or type a command. Never change your tool's own settings to allow it. If it is still blocked after their yes, tell them in plain words and send them ${allowCommandsUrl(lang)}, which shows them the one setting that allows it.`;
21358
21382
  var START_FAIL_LINE = "If anything fails, tell the owner in plain words what happened and what you will do next.";
21359
21383
 
21360
21384
  // ../shared/src/cli-map.ts
@@ -21657,7 +21681,9 @@ var BUILD_WITH = [
21657
21681
  "Settings and secrets: environment variables, set with: npx deployai@latest env set <key>",
21658
21682
  "Images: resize at build time or serve them as they are; no native image modules at runtime.",
21659
21683
  "Passwords: bcryptjs or Web Crypto, never native bcrypt.",
21660
- "Server code runs per request: no long-running processes, background servers or child processes."
21684
+ "Server code runs per request: no long-running processes, background servers or child processes.",
21685
+ // D-535: the agent knows our built-in email, so it never adds an email provider or asks the owner for keys to email them.
21686
+ "Email to the site owner (a form answer, a new order): the built-in email, with no email provider or keys. POST JSON { subject, text, replyTo } to `${DEPLOYAI_API}/api/site/notify` with the header Authorization: Bearer DEPLOYAI_KEY (both are environment variables every upload gets). It reaches only the owner. On a temporary site it works once the owner has a free account: keep building, and say so only when it is time to go live. Email to customers needs an HTTP email API (Resend, Postmark), never SMTP."
21661
21687
  ];
21662
21688
  var KEEP_DATA_RULES = [
21663
21689
  "Moving to DeployAI changes where data lives. It never moves the data by itself. Before you switch any of these, save a copy inside the project and tell the user, in simple words, what was saved and where:",
@@ -21669,6 +21695,42 @@ var KEEP_DATA_RULES = [
21669
21695
  ];
21670
21696
  var AGENT_POINTER = "Read DEPLOYAI.md before you write code, change the plan or add a dependency: this project is published with DeployAI.";
21671
21697
 
21698
+ // ../shared/src/stack.ts
21699
+ var SITE_LANG_INFO = {
21700
+ he: { name: "Hebrew", dir: "rtl", font: "Heebo" },
21701
+ ar: { name: "Arabic", dir: "rtl", font: "Tajawal" },
21702
+ en: { name: "English", dir: "ltr", font: "Inter" }
21703
+ };
21704
+ var STACK_FRAMEWORKS = SUPPORTED_FRAMEWORKS.map((f) => f.id);
21705
+ var frameworkName = (id) => FRAMEWORKS.find((f) => f.id === id)?.name ?? id;
21706
+ var NEED_TEXT = {
21707
+ form: "a contact form whose messages are saved to D1, with an owner inbox behind a key from env",
21708
+ login: "an owner login (the account is created on the first visit, passwords with bcryptjs or Web Crypto)",
21709
+ data: "data the owner adds and edits, saved to D1",
21710
+ files: "photos and files the owner uploads, saved to R2"
21711
+ };
21712
+ function stackBlock(s) {
21713
+ const langs = s.langs.map((l, i) => `${SITE_LANG_INFO[l].name} (${SITE_LANG_INFO[l].dir === "rtl" ? "right to left" : "left to right"}${i === 0 ? ", the main language at the root" : `, under /${l}/`})`);
21714
+ const fonts = s.fonts.map((f) => `${f} (${s.langs.filter((l) => l === "en" && f === "Heebo" || SITE_LANG_INFO[l].font === f).map((l) => SITE_LANG_INFO[l].name).join(" and ")})`);
21715
+ const lines = [
21716
+ "# The stack",
21717
+ "",
21718
+ "The owner chose this on DeployAI. Build with exactly this stack: do not add a server, a database, a storage service, a CSS framework or a font outside it.",
21719
+ "",
21720
+ `- Framework: ${frameworkName(s.framework)}${s.framework === "static" ? " (HTML, CSS and a little JavaScript, no build step)" : ""}`,
21721
+ `- Languages: ${langs.join(", ")}.${s.langs.length > 1 ? " Every page and every string in each language, a language switch to the same page, and hreflang." : ""}`,
21722
+ `- Fonts: ${fonts.join(", ")}, from Google Fonts.`,
21723
+ `- CSS: ${s.css === "tailwind" ? "Tailwind CSS" : "plain CSS"}.`,
21724
+ `- Database: ${s.bindings.includes("d1") ? "Cloudflare D1 (SQLite) through Drizzle with drizzle-orm/d1." : "none."}`,
21725
+ `- Files: ${s.bindings.includes("r2") ? "Cloudflare R2, never the local disk." : "none."}`
21726
+ ];
21727
+ if (s.needs.length) lines.push(`- The site has: ${s.needs.map((n2) => NEED_TEXT[n2]).join("; ")}.`);
21728
+ return lines.join("\n") + "\n";
21729
+ }
21730
+ function stackSummary(s) {
21731
+ return [frameworkName(s.framework), ...s.bindings.map((b) => b.toUpperCase()), s.css === "tailwind" ? "Tailwind" : null, s.fonts.join(", "), s.dir.toUpperCase()].filter(Boolean).join(" \xB7 ");
21732
+ }
21733
+
21672
21734
  // src/config.ts
21673
21735
  import { randomUUID } from "crypto";
21674
21736
  import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -21818,6 +21880,8 @@ var M = {
21818
21880
  startLinked: 'Linked this folder to the site "{name}".',
21819
21881
  startRules: "Wrote the rules for your agent to DEPLOYAI.md (never uploaded).",
21820
21882
  startStarter: "Wrote a starter page (index.html) to build the site on.",
21883
+ startStack: "Saved the stack chosen on the site: {stack}.",
21884
+ stackDiffers: "Note: the stack chosen on the site is {chosen}, but this folder is {found}. Keep to the chosen stack, or tell the owner why it changed.",
21821
21885
  startRelinked: 'Linked this folder to the site "{name}" instead of the site it was linked to.',
21822
21886
  statusLine: "Status: {s}",
21823
21887
  ready: "ready",
@@ -21994,6 +22058,8 @@ var M = {
21994
22058
  startLinked: '\u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D7\u05D5\u05D1\u05E8\u05D4 \u05DC\u05D0\u05EA\u05E8 "{name}".',
21995
22059
  startRules: "\u05D4\u05DB\u05DC\u05DC\u05D9\u05DD \u05DC\u05E1\u05D5\u05DB\u05DF \u05E0\u05DB\u05EA\u05D1\u05D5 \u05DC DEPLOYAI.md (\u05DC\u05D0 \u05E2\u05D5\u05DC\u05D9\u05DD \u05DC\u05D0\u05EA\u05E8).",
21996
22060
  startStarter: "\u05E0\u05DB\u05EA\u05D1 \u05D3\u05E3 \u05E4\u05EA\u05D9\u05D7\u05D4 (index.html) \u05DC\u05D1\u05E0\u05D5\u05EA \u05E2\u05DC\u05D9\u05D5 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8.",
22061
+ startStack: "\u05E0\u05E9\u05DE\u05E8 \u05D4\u05E1\u05D8\u05D0\u05E7 \u05E9\u05E0\u05D1\u05D7\u05E8 \u05D1\u05D0\u05EA\u05E8: {stack}.",
22062
+ stackDiffers: "\u05E9\u05D9\u05DE\u05D5 \u05DC\u05D1: \u05D4\u05E1\u05D8\u05D0\u05E7 \u05E9\u05E0\u05D1\u05D7\u05E8 \u05D1\u05D0\u05EA\u05E8 \u05D4\u05D5\u05D0 {chosen}, \u05D0\u05D1\u05DC \u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05D4\u05D9\u05D0 {found}. \u05D4\u05DE\u05E9\u05D9\u05DB\u05D5 \u05D1\u05E1\u05D8\u05D0\u05E7 \u05E9\u05E0\u05D1\u05D7\u05E8, \u05D0\u05D5 \u05D4\u05E1\u05D1\u05D9\u05E8\u05D5 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DC\u05DE\u05D4 \u05D4\u05D5\u05D0 \u05D4\u05E9\u05EA\u05E0\u05D4.",
21997
22063
  startRelinked: '\u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D7\u05D5\u05D1\u05E8\u05D4 \u05DC\u05D0\u05EA\u05E8 "{name}" \u05D1\u05DE\u05E7\u05D5\u05DD \u05D4\u05D0\u05EA\u05E8 \u05E9\u05D4\u05D9\u05D9\u05EA\u05D4 \u05DE\u05D7\u05D5\u05D1\u05E8\u05EA \u05D0\u05DC\u05D9\u05D5.',
21998
22064
  statusLine: "\u05DE\u05E6\u05D1: {s}",
21999
22065
  ready: "\u05DE\u05D5\u05DB\u05DF \u05DC\u05E2\u05DC\u05D5\u05EA",
@@ -22172,7 +22238,7 @@ function messages(root) {
22172
22238
  }
22173
22239
 
22174
22240
  // src/version.ts
22175
- var CLI_VERSION = "0.1.0-beta.10";
22241
+ var CLI_VERSION = "0.1.0-beta.12";
22176
22242
 
22177
22243
  // src/api.ts
22178
22244
  function apiContext(apiFlag) {
@@ -22933,6 +22999,8 @@ function analyzeProject(root) {
22933
22999
  if (framework.id === "unknown" && !otherStack && !empty) {
22934
23000
  add({ code: "unknown_framework", severity: "warning", detail: framework.flavor ? ` (looks like ${framework.flavor})` : "" });
22935
23001
  }
23002
+ const smtp = ["nodemailer", "emailjs", "smtp-client"].find((d) => deps[d]);
23003
+ if (smtp) add({ code: "email_smtp", severity: "warning", file: "package.json", detail: ` ${smtp}` });
22936
23004
  const hasBuildScript = Boolean(pkg?.scripts?.build);
22937
23005
  if (pkg && !hasBuildScript && framework.id !== "static" && framework.id !== "hono") {
22938
23006
  add({ code: "no_build_script", severity: "warning", file: "package.json" });
@@ -23052,6 +23120,12 @@ To start from working code, see the samples: npx deployai@latest samples
23052
23120
 
23053
23121
  ${KEEP_DATA_RULES.join("\n")}
23054
23122
 
23123
+ ## Running DeployAI commands
23124
+
23125
+ ${runCommandsRule()}
23126
+
23127
+ Never stop building for an account, a plan or a limit. Build what the owner asks; say once, in one plain line, what going live will need, and ask about it only at the deploy step.
23128
+
23055
23129
  ## Check
23056
23130
 
23057
23131
  Before adding a dependency or a new server feature, run: npx deployai@latest check
@@ -23141,7 +23215,8 @@ var PROMPT_RULES = [
23141
23215
  "Never add credentials to source code.",
23142
23216
  "Explain every step to the user in simple words, in the language they write to you in.",
23143
23217
  "For the database, use D1 as shown in the DeployAI CRUD sample.",
23144
- "Follow DEPLOYAI.md for every future change. If it is missing, run: npx deployai@latest init"
23218
+ "Follow DEPLOYAI.md for every future change. If it is missing, run: npx deployai@latest init",
23219
+ runCommandsRule()
23145
23220
  ];
23146
23221
  var DATA_CODES = /* @__PURE__ */ new Set(["fs_write", "unsupported_db_postgres", "unsupported_db_mysql", "unsupported_db_mongodb", "unsupported_db_sqlite_file", "native_module_bcrypt"]);
23147
23222
  var MAX_LOCATIONS = 3;
@@ -23325,6 +23400,11 @@ async function runCheck(root, ctx, opts = {}) {
23325
23400
  printCheck(a);
23326
23401
  out();
23327
23402
  const t = messages(root);
23403
+ const chosen = project?.stack?.framework;
23404
+ if (chosen && a.inspect.framework.id !== chosen && a.inspect.framework.id !== "unknown") {
23405
+ out(t("stackDiffers", { chosen: frameworkName(chosen), found: a.inspect.framework.display }));
23406
+ out();
23407
+ }
23328
23408
  out(t("nextStep"));
23329
23409
  if (prompt) {
23330
23410
  const copied = opts.clipboard !== false && copyToClipboard(prompt);
@@ -24112,19 +24192,28 @@ import { join as join9, relative as relative2, resolve as resolve2 } from "path"
24112
24192
  import { writeFileSync as writeFileSync6 } from "fs";
24113
24193
  import { join as join8 } from "path";
24114
24194
  var esc2 = (s) => s.replace(/[&<>"]/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" })[c]);
24115
- function page(name, lang) {
24116
- const he = lang === "he";
24117
- const title = esc2(name || (he ? "\u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05D9" : "My site"));
24118
- const soon = he ? "\u05D4\u05D0\u05EA\u05E8 \u05D1\u05D1\u05E0\u05D9\u05D9\u05D4, \u05D1\u05E7\u05E8\u05D5\u05D1 \u05DB\u05D0\u05DF." : "This site is being built. Coming soon.";
24119
- const font = he ? '<link rel="preconnect" href="https://fonts.googleapis.com">\n <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Heebo:wght@400;700&display=swap">\n ' : "";
24195
+ var TEXT = {
24196
+ he: { title: "\u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05D9", soon: "\u05D4\u05D0\u05EA\u05E8 \u05D1\u05D1\u05E0\u05D9\u05D9\u05D4, \u05D1\u05E7\u05E8\u05D5\u05D1 \u05DB\u05D0\u05DF." },
24197
+ ar: { title: "\u0645\u0648\u0642\u0639\u064A", soon: "\u0627\u0644\u0645\u0648\u0642\u0639 \u0642\u064A\u062F \u0627\u0644\u0625\u0646\u0634\u0627\u0621\u060C \u0642\u0631\u064A\u0628\u064B\u0627 \u0647\u0646\u0627." },
24198
+ en: { title: "My site", soon: "This site is being built. Coming soon." }
24199
+ };
24200
+ function page(name, lang, stack) {
24201
+ const main2 = stack?.langs[0] ?? lang;
24202
+ const dir = stack?.dir ?? (main2 === "en" ? "ltr" : "rtl");
24203
+ const fonts = stack ? stack.fonts : main2 === "he" ? ["Heebo"] : [];
24204
+ const title = esc2(name || TEXT[main2].title);
24205
+ const soon = TEXT[main2].soon;
24206
+ const font = fonts.length ? `<link rel="preconnect" href="https://fonts.googleapis.com">
24207
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?${fonts.map((f) => `family=${f.replace(/ /g, "+")}:wght@400;700`).join("&")}&display=swap">
24208
+ ` : "";
24120
24209
  return `<!doctype html>
24121
- <html lang="${he ? "he" : "en"}" dir="${he ? "rtl" : "ltr"}">
24210
+ <html lang="${main2}" dir="${dir}">
24122
24211
  <head>
24123
24212
  <meta charset="utf-8">
24124
24213
  <meta name="viewport" content="width=device-width, initial-scale=1">
24125
24214
  <title>${title}</title>
24126
24215
  ${font}<style>
24127
- body { margin: 0; min-height: 100vh; display: grid; place-items: center; font-family: ${he ? "Heebo, " : ""}system-ui, sans-serif; background: #fafafa; color: #18181b; }
24216
+ body { margin: 0; min-height: 100vh; display: grid; place-items: center; font-family: ${fonts.map((f) => `${f}, `).join("")}system-ui, sans-serif; background: #fafafa; color: #18181b; }
24128
24217
  main { padding: 1.5rem; text-align: center; }
24129
24218
  h1 { margin: 0 0 .5rem; font-size: 2rem; }
24130
24219
  </style>
@@ -24144,12 +24233,12 @@ DeployAI wrote this page so the folder starts as a working site. Build the owner
24144
24233
 
24145
24234
  ## Before you go live
24146
24235
 
24147
- - Replace \`index.html\` with the owner's real site, in the languages they want. Keep it static HTML and CSS unless the site needs server code (forms, logins, data): then follow the stack in DEPLOYAI.md.
24236
+ - Replace \`index.html\` with a first version of the owner's site right away, from what you know: one short question at most, details you do not have left out until the owner sees it. Keep it static HTML and CSS unless the site needs server code (forms, logins, data): then follow the stack in DEPLOYAI.md.
24148
24237
  - Nothing from this starter stays: no "coming soon" text goes live.
24149
24238
  - Delete this README or replace it with notes about the site.
24150
24239
  `;
24151
- function writeStarter(root, name, lang) {
24152
- writeFileSync6(join8(root, "index.html"), page(name ?? "", lang));
24240
+ function writeStarter(root, name, lang, stack) {
24241
+ writeFileSync6(join8(root, "index.html"), page(name ?? "", lang, stack));
24153
24242
  writeFileSync6(join8(root, "README.md"), README);
24154
24243
  }
24155
24244
 
@@ -24186,7 +24275,7 @@ async function startCommand(cwd, ctx, id, opts = {}) {
24186
24275
  const root = fresh && filesIn(here).length && !opts.here && !sameSite ? freeFolder(here, choices.slug ?? sample?.key ?? "site") : here;
24187
24276
  const done = [];
24188
24277
  const empty = !filesIn(root).length;
24189
- const starter = kind === "new" && !sample && empty;
24278
+ const starter = (kind === "new" || kind === "guest") && !sample && empty;
24190
24279
  const steps = startSteps(kind, { emptyFolder: kind === "update" && empty, starter });
24191
24280
  updateProject(root, { lang: langOf(choices.ownerLanguage) });
24192
24281
  const t = messages(root);
@@ -24199,17 +24288,22 @@ async function startCommand(cwd, ctx, id, opts = {}) {
24199
24288
  }
24200
24289
  }
24201
24290
  if (starter) {
24202
- writeStarter(root, choices.name, langOf(choices.ownerLanguage));
24291
+ writeStarter(root, choices.name, langOf(choices.ownerLanguage), choices.stack);
24203
24292
  done.push(t("startStarter"));
24204
24293
  }
24205
- if (choices.brief) {
24294
+ const stackText = choices.stack ? stackBlock(choices.stack) : "";
24295
+ if (choices.brief || stackText) {
24206
24296
  ensureDeployaiDir(root);
24207
- writeFileSync7(join9(root, BRIEF_FILE), `# The owner's details
24297
+ writeFileSync7(join9(root, BRIEF_FILE), [choices.brief ? `# The owner's details
24208
24298
 
24209
24299
  ${choices.brief}
24210
- `);
24300
+ ` : "", stackText].filter(Boolean).join("\n"));
24211
24301
  done.push(t("startBrief", { file: BRIEF_FILE }));
24212
24302
  }
24303
+ if (choices.stack) {
24304
+ updateProject(root, { stack: choices.stack });
24305
+ done.push(t("startStack", { stack: stackSummary(choices.stack) }));
24306
+ }
24213
24307
  if (runInit(root).created.includes("DEPLOYAI.md")) done.push(t("startRules"));
24214
24308
  if (choices.projectId) {
24215
24309
  const before = readProject(root);
@@ -24228,10 +24322,15 @@ ${choices.brief}
24228
24322
  out();
24229
24323
  }
24230
24324
  out(agent.trim());
24325
+ if (stackText) {
24326
+ out();
24327
+ out(stackText.trim());
24328
+ }
24231
24329
  out();
24232
24330
  out("Then, in this order:");
24233
24331
  steps.forEach((s, i) => out(`${i + 1}. ${s.cmd ? `Run ${s.cmd}. ` : ""}${s.say}`));
24234
24332
  out();
24333
+ out(runCommandsRule(langOf(choices.ownerLanguage)));
24235
24334
  out(START_FAIL_LINE);
24236
24335
  }
24237
24336
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deployai",
3
- "version": "0.1.0-beta.10",
3
+ "version": "0.1.0-beta.12",
4
4
  "description": "Check a site built with an AI editor, see what has to change, and publish it to DeployAI. Hebrew first.",
5
5
  "keywords": [
6
6
  "deployai",
@@ -22,8 +22,7 @@
22
22
  "homepage": "https://deployai.co.il/developers",
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "git+https://github.com/yobotn/deployai.git",
26
- "directory": "packages/cli"
25
+ "url": "git+https://github.com/yobotn/deployai-cli.git"
27
26
  },
28
27
  "license": "MIT",
29
28
  "author": "DeployAI <info@deployai.co.il>",
@@ -39,23 +38,5 @@
39
38
  },
40
39
  "dependencies": {
41
40
  "commander": "15.0.0"
42
- },
43
- "devDependencies": {
44
- "@deployai/shared": "0.1.0",
45
- "@eslint/js": "9.39.5",
46
- "eslint": "9.39.5",
47
- "typescript-eslint": "8.71.1",
48
- "typescript": "^5",
49
- "vitest": "5.0.3",
50
- "tsx": "^4",
51
- "tsup": "^8",
52
- "@types/node": "^22"
53
- },
54
- "scripts": {
55
- "start": "tsx src/index.ts",
56
- "build": "tsup",
57
- "typecheck": "tsc --noEmit",
58
- "test": "vitest run",
59
- "lint": "eslint"
60
41
  }
61
- }
42
+ }