deployai 0.1.0-beta.24 → 0.1.0-beta.26
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 +4 -4
- package/dist/index.js +341 -61
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ Node 20 or newer. No other setup: the CLI talks to https://deployai.co.il.
|
|
|
50
50
|
| `deployai rollback v5` | Puts version 5 back live, with no rebuild. |
|
|
51
51
|
| `deployai promote v5` | Puts version 5 live. New database changes (SQL) are shown and run first, after a yes; SQL that removes data needs the database name typed. An agent passes `--approve-sql <code>` only after the owner said yes, and never for SQL that removes data. |
|
|
52
52
|
| `deployai sql v5` | The database changes version 5 runs before it goes live. |
|
|
53
|
-
| `deployai status` | Site state, address, live version, the newest version when it is not live yet (with the promote command once it is ready), and queue. |
|
|
53
|
+
| `deployai status` | Site state, address, live version, the newest version when it is not live yet (with the promote command once it is ready), and queue. When the live site is closed to the country you run this from, it says so and how to open it, or to use a VPN. |
|
|
54
54
|
| `deployai deploy --guest` | No login needed: puts the site live as a temporary site with a claim link. More below. |
|
|
55
55
|
| `deployai pull` | Downloads the code of the linked site's live version into this empty folder. Needs login. |
|
|
56
56
|
| `deployai pull --history` | The same, with the site's history as git commits, one per version up to the live one, oldest first. |
|
|
@@ -65,9 +65,9 @@ Node 20 or newer. No other setup: the CLI talks to https://deployai.co.il.
|
|
|
65
65
|
| `deployai samples [name] [folder]` | Lists the six sample sites, or downloads one. More below. |
|
|
66
66
|
| `deployai start <id>` | The one line copied on the DeployAI site. Prepares this folder, then prints the steps for your agent. A site's line logs in first; a temporary site needs no login. More below. |
|
|
67
67
|
| `deployai speed <url>` | Google PageSpeed test of a page: lab results, real visitor data when Google has it and the biggest opportunities. `--desktop` tests a desktop load. |
|
|
68
|
-
| `deployai addons` | The marketplace add-ons of the linked site: which it has, which are done and which is next.
|
|
68
|
+
| `deployai addons` | The marketplace add-ons of the linked site: which it has, which are done and which is next. The server checks that the site has each add-on. It runs what the site has even before the marketplace opens. |
|
|
69
69
|
| `deployai addon next` | Prints the next add-on of the site for your agent. `deployai addon run <name>` prints one by name. |
|
|
70
|
-
| `deployai addons run` |
|
|
70
|
+
| `deployai addons run` | With more than one add-on waiting, prints a question for the owner. `--one-by-one` (recommended): after each add-on, the owner chooses whether to publish. `--all`: they all finish first, then one publish at the end. The owner still approves each plan. |
|
|
71
71
|
| `deployai addon done <runId>` | Saves the report of a finished add-on (`--status done\|failed\|skipped`, `--report .deployai/addon-report.json`) and prints the next one. |
|
|
72
72
|
| `deployai telemetry status\|on\|off` | Shows exactly what is sent, or turns it on or off. |
|
|
73
73
|
|
|
@@ -134,7 +134,7 @@ Never uploaded:
|
|
|
134
134
|
Sent when on:
|
|
135
135
|
|
|
136
136
|
- Install id (random, made on this computer) and CLI version
|
|
137
|
-
- After each command: command name and result (success, blocked, error category)
|
|
137
|
+
- After each command: command name and result (success, blocked, error category). A start that has to wait for a login sends one more, before it waits
|
|
138
138
|
- Linked project id, detected framework and version
|
|
139
139
|
- After each check: compatible or not, blocker and warning codes (for example `fs_write`)
|
|
140
140
|
- OS, architecture and Node version (in the request header)
|
package/dist/index.js
CHANGED
|
@@ -21315,7 +21315,9 @@ var StatusResponse = external_exports.object({
|
|
|
21315
21315
|
goingLive: external_exports.boolean().optional(),
|
|
21316
21316
|
/** The go live check found it broken and the previous version came back (D-297, D-528). */
|
|
21317
21317
|
wentBack: external_exports.object({ previous: external_exports.number(), reason: external_exports.string() }).nullable().optional()
|
|
21318
|
-
}).nullable().optional()
|
|
21318
|
+
}).nullable().optional(),
|
|
21319
|
+
/** The live site's country rule shuts out the country this call came from (D-682). `settingsUrl` is null when only the owner can change it. */
|
|
21320
|
+
closedHere: external_exports.object({ country: external_exports.string(), countries: external_exports.array(external_exports.string()), settingsUrl: external_exports.string().nullable() }).nullable().optional()
|
|
21319
21321
|
});
|
|
21320
21322
|
var ApiError = external_exports.object({
|
|
21321
21323
|
error: external_exports.string(),
|
|
@@ -21331,6 +21333,8 @@ var AddonItem = external_exports.object({
|
|
|
21331
21333
|
name: external_exports.string(),
|
|
21332
21334
|
owned: external_exports.boolean(),
|
|
21333
21335
|
status: AddonRunStatus,
|
|
21336
|
+
/** Its work no longer matches the live site (D-683); status is then todo. */
|
|
21337
|
+
outdated: external_exports.boolean().optional(),
|
|
21334
21338
|
lastRunAt: external_exports.string().nullable(),
|
|
21335
21339
|
/** Null when owned. */
|
|
21336
21340
|
buyUrl: external_exports.string().nullable()
|
|
@@ -21500,7 +21504,8 @@ var ARCH_NODES = [
|
|
|
21500
21504
|
// Outside
|
|
21501
21505
|
{ id: "browser", kind: "actor", zone: "outside", label: "\u05D3\u05E4\u05D3\u05E4\u05DF", labelEn: "Browser", summary: "\u05DC\u05E7\u05D5\u05D7\u05D5\u05EA \u05D5\u05D0\u05D3\u05DE\u05D9\u05E0\u05D9\u05DD \u05E4\u05D5\u05EA\u05D7\u05D9\u05DD \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8, \u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4 \u05D5\u05D4\u05D0\u05D3\u05DE\u05D9\u05DF.", summaryEn: "Customers and admins open the site, the dashboard and the admin." },
|
|
21502
21506
|
{ id: "cli", kind: "actor", zone: "outside", label: "deployai CLI", summary: "\u05D4\u05E1\u05D5\u05DB\u05DF \u05D0\u05D5 \u05D4\u05DC\u05E7\u05D5\u05D7 \u05DE\u05E8\u05D9\u05E6\u05D9\u05DD check \u05D5\u05BEdeploy, \u05D5\u05D4\u05EA\u05D7\u05D1\u05E8\u05D5\u05EA \u05D1\u05E7\u05D5\u05D3 \u05DE\u05DB\u05E9\u05D9\u05E8.", summaryEn: "The agent or the customer runs check and deploy, and logs in with a device code.", code: ["packages/cli"], docs: ["docs/07-cli.md"] },
|
|
21503
|
-
{ id: "board-watcher", kind: "actor", zone: "outside", label: "Board watcher", summary: "\u05E8\u05E5 \u05D0\u05E6\u05DC \u05D4\u05D1\u05E2\u05DC\u05D9\u05DD (pnpm board:watch): \u05DC\u05D5\u05E7\u05D7 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05DE\u05DC\u05D5\u05D7 \u05D4\u05E2\u05D1\u05D5\u05D3\u05D4 (\u05E8\u05E7 \u05DB\u05E9\u05D4\u05DE\u05EA\u05D2 \u05E9\u05DC\u05D5 \u05D1\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05E4\u05D5\u05E2\u05DC, \u05D5\u05E8\u05E7 \u05D0\u05D7\u05E8\u05D9 \u05E9\u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05D5\u05E9\u05E8 \u05D5\u05E0\u05E9\u05DC\u05D7 \u05D0\u05DC\u05D9\u05D5), \u05DE\u05E8\u05D9\u05E5 Claude Code \u05DC\u05E7\u05E8\u05D9\u05D0\u05D4 \u05D1\u05DC\u05D1\u05D3 \u05D5\u05DE\u05D7\u05D6\u05D9\u05E8 \u05EA\u05D5\u05DB\u05E0\u05D9\u05EA. \u05DB\u05E8\u05D8\u05D9\u05E1 \u05E2\u05DD \u05D1\u05E0\u05D9\u05D9\u05D4 \u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9\u05EA \u05E9\u05D0\u05D5\u05E9\u05E8 \u05E0\u05D1\u05E0\u05D4 \u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05EA \u05D4\u05E4\u05E8\u05D5\u05D9\u05E7\u05D8, \u05D0\u05D7\u05D3 \u05D1\u05DB\u05DC \u05E4\u05E2\u05DD. \u05D4\u05D5\u05D0 \u05D2\u05DD \u05DB\u05D5\u05EA\u05D1 \
|
|
21507
|
+
{ id: "board-watcher", kind: "actor", zone: "outside", label: "Board watcher", summary: "\u05E8\u05E5 \u05D0\u05E6\u05DC \u05D4\u05D1\u05E2\u05DC\u05D9\u05DD (pnpm board:watch): \u05DC\u05D5\u05E7\u05D7 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05DE\u05DC\u05D5\u05D7 \u05D4\u05E2\u05D1\u05D5\u05D3\u05D4 (\u05E8\u05E7 \u05DB\u05E9\u05D4\u05DE\u05EA\u05D2 \u05E9\u05DC\u05D5 \u05D1\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05E4\u05D5\u05E2\u05DC, \u05D5\u05E8\u05E7 \u05D0\u05D7\u05E8\u05D9 \u05E9\u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05D5\u05E9\u05E8 \u05D5\u05E0\u05E9\u05DC\u05D7 \u05D0\u05DC\u05D9\u05D5), \u05DE\u05E8\u05D9\u05E5 Claude Code \u05DC\u05E7\u05E8\u05D9\u05D0\u05D4 \u05D1\u05DC\u05D1\u05D3 \u05D5\u05DE\u05D7\u05D6\u05D9\u05E8 \u05EA\u05D5\u05DB\u05E0\u05D9\u05EA. \u05DB\u05E8\u05D8\u05D9\u05E1 \u05E2\u05DD \u05D1\u05E0\u05D9\u05D9\u05D4 \u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9\u05EA \u05E9\u05D0\u05D5\u05E9\u05E8 \u05E0\u05D1\u05E0\u05D4 \u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05EA \u05D4\u05E4\u05E8\u05D5\u05D9\u05E7\u05D8, \u05D0\u05D7\u05D3 \u05D1\u05DB\u05DC \u05E4\u05E2\u05DD. \u05D4\u05D5\u05D0 \u05D2\u05DD \u05DB\u05D5\u05EA\u05D1 \u05D4\u05E6\u05E2\u05EA \u05E0\u05D9\u05E1\u05D5\u05D7 \u05DC\u05E4\u05E8\u05D5\u05DE\u05E4\u05D8 \u05DC\u05E4\u05D9 \u05D4\u05E2\u05E8\u05D5\u05EA \u05D4\u05D1\u05E2\u05DC\u05D9\u05DD, \u05D5\u05D4\u05D4\u05E6\u05E2\u05D4 \u05DE\u05DE\u05EA\u05D9\u05E0\u05D4 \u05E2\u05D3 \u05E9\u05DE\u05E7\u05D1\u05DC\u05D9\u05DD \u05D0\u05D5 \u05D3\u05D5\u05D7\u05D9\u05DD \u05D0\u05D5\u05EA\u05D4.", summaryEn: "Runs on the owner computer (pnpm board:watch): claims a work board ticket (only while its settings switch is on), runs Claude Code read only and posts a plan back. An approved auto build ticket is built in the project folder, one at a time. It also writes a suggested rewrite of a prompt from the owner notes, which waits until it is accepted or rejected.", code: ["scripts/board-watch.ts"], decisions: ["D-110", "D-127", "D-182", "D-189", "D-250", "D-696"] },
|
|
21508
|
+
{ id: "local-scripts", kind: "actor", zone: "outside", label: "Local scripts", summary: "\u05E4\u05E7\u05D5\u05D3\u05D5\u05EA \u05E9\u05D4\u05E6\u05D5\u05D5\u05EA \u05DE\u05E8\u05D9\u05E5 \u05DE\u05D4\u05DE\u05D7\u05E9\u05D1: prompts:pull \u05D5\u05BEprompts:push (\u05E7\u05D5\u05D1\u05E5 \u05E4\u05E8\u05D5\u05DE\u05E4\u05D8 \u05DE\u05D5\u05DC \u05D4\u05D8\u05E7\u05E1\u05D8 \u05D4\u05D7\u05D9), costs:push (\u05DE\u05D7\u05D9\u05E8\u05D9 Cloudflare), content:push \u05D5\u05BEcontent:pull (\u05D4\u05EA\u05D5\u05DB\u05DF \u05D1\u05D9\u05DF \u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E9\u05DC \u05D4\u05DE\u05D7\u05E9\u05D1 \u05DC\u05D6\u05D4 \u05E9\u05DC \u05D4\u05E9\u05E8\u05EA, \u05D3\u05E8\u05DA SSH). LOCAL_SCRIPTS_TOKEN \u05E4\u05D5\u05EA\u05D7 \u05D0\u05EA \u05D4\u05BEAPI \u05E9\u05DC \u05D4\u05E4\u05E7\u05D5\u05D3\u05D5\u05EA \u05D4\u05D0\u05DC\u05D4 \u05D5\u05E9\u05DC \u05D4\u05BEBoard watcher, \u05D5\u05D9\u05DB\u05D5\u05DC \u05DC\u05E9\u05E0\u05D5\u05EA \u05E4\u05E8\u05D5\u05DE\u05E4\u05D8\u05D9\u05DD \u05D5\u05DE\u05D7\u05D9\u05E8\u05D9\u05DD \u05D7\u05D9\u05D9\u05DD.", summaryEn: "Commands the team runs from the computer: prompts:pull and prompts:push (a prompt file against the live text), costs:push (Cloudflare prices), content:push and content:pull (content between the computer's database and the server's, over SSH). LOCAL_SCRIPTS_TOKEN opens the API of these commands and of the Board watcher, and can change live prompts and prices.", code: ["scripts/prompts-sync.ts", "scripts/costs-push.ts", "scripts/content-sync.ts"], env: ["LOCAL_SCRIPTS_TOKEN", "BOARD_URL"], docs: ["docs/13-run-locally.md"], decisions: ["D-204", "D-471", "D-677", "D-696"] },
|
|
21504
21509
|
{ id: "visitor", kind: "actor", zone: "outside", label: "\u05DE\u05D1\u05E7\u05E8 \u05D1\u05D0\u05EA\u05E8", labelEn: "Site visitor", summary: "\u05DE\u05D1\u05E7\u05E8 \u05D1\u05D0\u05EA\u05E8 \u05E9\u05DC \u05DC\u05E7\u05D5\u05D7 \u05D1\u05DB\u05EA\u05D5\u05D1\u05EA <slug>.<\u05D3\u05D5\u05DE\u05D9\u05D9\u05DF \u05D0\u05EA\u05E8\u05D9\u05DD> (\u05DB\u05DE\u05D5 deploy-net.com \u05D0\u05D5 freesite.click) \u05D0\u05D5 \u05D1\u05D3\u05D5\u05DE\u05D9\u05D9\u05DF \u05DE\u05E9\u05DC\u05D5.", summaryEn: "A visitor on a customer site at <slug>.<a sites domain> (like deploy-net.com or freesite.click) or on their own domain." },
|
|
21505
21510
|
// Platform
|
|
21506
21511
|
{ id: "web", kind: "app", zone: "platform", label: "Web app (Next.js)", summary: "\u05D0\u05EA\u05E8 \u05D4\u05E9\u05D9\u05D5\u05D5\u05E7, \u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4, \u05D4\u05D0\u05D3\u05DE\u05D9\u05DF \u05D5\u05D4\u05BEAPI \u05E9\u05DC \u05D4\u05BECLI. \u05DE\u05DB\u05E0\u05D9\u05E1 \u05E2\u05D1\u05D5\u05D3\u05D5\u05EA \u05DC\u05EA\u05D5\u05E8.", summaryEn: "The marketing site, the dashboard, the admin and the CLI API. Puts jobs in the queue.", code: ["apps/web/src/app", "apps/web/src/server"], env: ["DEPLOYAI_SPACE", "BETTER_AUTH_SECRET", "NEXT_PUBLIC_SUPPORT_WHATSAPP", "DEV_SUPERADMIN_PASSWORD", "OPENAI_APPS_CHALLENGE"], portability: "Our app (site, dashboard, API, builds)", docs: ["docs/04-architecture.md"], decisions: ["D-020", "D-057", "D-104", "D-149", "D-238", "D-293"] },
|
|
@@ -21540,6 +21545,8 @@ var ARCH_EDGES = [
|
|
|
21540
21545
|
{ id: "npm-cli", from: "npm", to: "cli", kind: "deploy", label: "npx deployai" },
|
|
21541
21546
|
{ id: "cli-web", from: "cli", to: "web", kind: "api", label: "/api/cli/*" },
|
|
21542
21547
|
{ id: "board-watcher-web", from: "board-watcher", to: "web", kind: "api", label: "/api/board/*, /api/library-prompts/*" },
|
|
21548
|
+
{ id: "local-scripts-web", from: "local-scripts", to: "web", kind: "api", label: "/api/library-prompts/*, /api/costs/push" },
|
|
21549
|
+
{ id: "local-scripts-postgres", from: "local-scripts", to: "postgres", kind: "deploy", label: "content:push over SSH" },
|
|
21543
21550
|
{ id: "web-postgres", from: "web", to: "postgres", kind: "sql", label: "Drizzle" },
|
|
21544
21551
|
{ id: "web-queue", from: "web", to: "queue", kind: "queue", label: "enqueue" },
|
|
21545
21552
|
{ id: "web-files", from: "web", to: "files", kind: "api", label: "upload source" },
|
|
@@ -21650,9 +21657,33 @@ var ARCH_FLOWS = [
|
|
|
21650
21657
|
{ edge: "worker-cfapi", text: "\u05E2\u05D1\u05D5\u05D3\u05EA cf-caps \u05E1\u05D5\u05E4\u05E8\u05EA \u05D0\u05EA \u05D4\u05D7\u05E9\u05D1\u05D5\u05DF \u05DE\u05D5\u05DC \u05D4\u05DE\u05D2\u05D1\u05DC\u05D5\u05EA \u05E9\u05DC Cloudflare (\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05DE\u05D5\u05EA\u05D0\u05DE\u05D5\u05EA, D1, R2, \u05E1\u05E7\u05E8\u05D9\u05E4\u05D8\u05D9\u05DD) \u05D5\u05DE\u05D5\u05E6\u05D0\u05EA \u05E9\u05D0\u05E8\u05D9\u05D5\u05EA, \u05D1\u05DB\u05DE\u05D4 \u05E7\u05E8\u05D9\u05D0\u05D5\u05EA \u05E7\u05E8\u05D9\u05D0\u05D4 \u05D1\u05DC\u05D1\u05D3 (D-283).", textEn: "The cf-caps job counts the account against Cloudflare's limits (custom hostnames, D1, R2, scripts) and finds leftovers, in a few read only calls (D-283)." },
|
|
21651
21658
|
{ edge: "worker-postgres", text: "\u05DB\u05DC \u05E7\u05E8\u05D9\u05D0\u05D4 \u05DC\u05BECloudflare \u05E0\u05E1\u05E4\u05E8\u05EA \u05DC\u05E4\u05D9 \u05D3\u05E7\u05D4 \u05D1\u05BEcf_api_minutes, \u05DE\u05D5\u05DC 1,200 \u05E7\u05E8\u05D9\u05D0\u05D5\u05EA \u05D5\u05BE320 \u05E9\u05D0\u05D9\u05DC\u05EA\u05D5\u05EA GraphQL \u05D1\u05BE5 \u05D3\u05E7\u05D5\u05EA (D-283).", textEn: "Every Cloudflare call is counted per minute in cf_api_minutes, against 1,200 calls and 320 GraphQL queries per 5 minutes (D-283)." }
|
|
21652
21659
|
]
|
|
21660
|
+
},
|
|
21661
|
+
{
|
|
21662
|
+
id: "content-sync",
|
|
21663
|
+
label: "\u05E2\u05D3\u05DB\u05D5\u05DF \u05EA\u05D5\u05DB\u05DF: \u05E4\u05E8\u05D5\u05DE\u05E4\u05D8\u05D9\u05DD, \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC\u05D9\u05DD, \u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D5\u05DE\u05E1\u05DC\u05D5\u05DC\u05D9\u05DD",
|
|
21664
|
+
labelEn: "Content sync: prompts, emails, add-ons and plans",
|
|
21665
|
+
steps: [
|
|
21666
|
+
{ edge: "web-postgres", text: "\u05D3\u05E8\u05DA \u05D4\u05E7\u05D5\u05D3: \u05E4\u05E8\u05D9\u05E1\u05D4 \u05D5\u05D4\u05E4\u05E2\u05DC\u05EA \u05D4\u05D0\u05E4\u05DC\u05D9\u05E7\u05E6\u05D9\u05D4 \u05DE\u05D1\u05D9\u05D0\u05D5\u05EA \u05D8\u05E7\u05E1\u05D8\u05D9\u05DD \u05D7\u05D3\u05E9\u05D9\u05DD \u05DC\u05DE\u05E1\u05D3, \u05E9\u05D3\u05D4 \u05D0\u05D7\u05E8 \u05E9\u05D3\u05D4. \u05E9\u05D3\u05D4 \u05E9\u05E0\u05E2\u05E8\u05DA \u05D1\u05D0\u05D3\u05DE\u05D9\u05DF \u05E0\u05E9\u05D0\u05E8.", textEn: "From the code: a deploy and the app start bring new texts into the database, field by field. A field edited in admin stays." },
|
|
21667
|
+
{ edge: "local-scripts-postgres", text: "\u05E2\u05E8\u05D9\u05DB\u05D5\u05EA \u05DE\u05D4\u05D0\u05D3\u05DE\u05D9\u05DF \u05D1\u05DE\u05D7\u05E9\u05D1: content:push \u05DE\u05D9\u05D9\u05E6\u05D0 \u05E7\u05D5\u05D1\u05E5, \u05DE\u05E2\u05EA\u05D9\u05E7 \u05D0\u05D5\u05EA\u05D5 \u05DC\u05E9\u05E8\u05EA \u05D1\u05BESSH \u05D5\u05DE\u05E8\u05D0\u05D4 \u05DE\u05D4 \u05D9\u05E9\u05EA\u05E0\u05D4. \u05E8\u05E7 --apply \u05DB\u05D5\u05EA\u05D1.", textEn: "Edits from the admin on the computer: content:push exports a file, copies it to the server over SSH and lists what would change. Only --apply writes." },
|
|
21668
|
+
{ edge: "browser-tunnel", text: "\u05D1\u05D0\u05D5\u05EA\u05D4 \u05D3\u05E8\u05DA \u05D1\u05D9\u05D3: Export \u05D5\u05BEImport \u05D1\u05E2\u05DE\u05D5\u05D3 /admin/server/content.", textEn: "The same by hand: Export and Import on /admin/server/content." },
|
|
21669
|
+
{ edge: "tunnel-web", text: "Import \u05DE\u05E6\u05D9\u05D2 \u05E7\u05D5\u05D3\u05DD \u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4 \u05E9\u05DC \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD, \u05D5\u05D0\u05D6 \u05DE\u05D1\u05E7\u05E9 \u05D0\u05D9\u05E9\u05D5\u05E8.", textEn: "Import first shows a preview of the changes, then asks to confirm." },
|
|
21670
|
+
{ edge: "web-postgres", text: "\u05D4\u05DB\u05EA\u05D9\u05D1\u05D4 \u05E7\u05D5\u05E8\u05D9\u05EA \u05D1\u05D1\u05EA \u05D0\u05D7\u05EA. \u05D4\u05E9\u05D5\u05E8\u05D5\u05EA \u05D4\u05E7\u05D5\u05D3\u05DE\u05D5\u05EA \u05E0\u05E9\u05DE\u05E8\u05D5\u05EA \u05DC\u05BEUndo, \u05D5\u05E1\u05D5\u05D3\u05D5\u05EA, \u05E0\u05EA\u05D5\u05E0\u05D9 \u05DC\u05E7\u05D5\u05D7\u05D5\u05EA \u05D5\u05DE\u05EA\u05D2 \u05D4\u05D4\u05E4\u05E2\u05DC\u05D4 \u05E9\u05DC \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC \u05DC\u05D0 \u05E2\u05D5\u05D1\u05E8\u05D9\u05DD.", textEn: "The write happens at once. The rows before are kept for Undo, and secrets, customer data and an email's on switch never travel." },
|
|
21671
|
+
{ edge: "local-scripts-web", text: "\u05E4\u05E8\u05D5\u05DE\u05E4\u05D8 \u05D3\u05D7\u05D5\u05E3 \u05D1\u05D9\u05DF \u05E4\u05E8\u05D9\u05E1\u05D5\u05EA: prompts:push \u05E9\u05D5\u05DC\u05D7 \u05E7\u05D5\u05D1\u05E5 \u05D0\u05D7\u05D3 \u05DB\u05D8\u05E7\u05E1\u05D8 \u05D4\u05D7\u05D9 \u05E2\u05DD LOCAL_SCRIPTS_TOKEN, \u05D5\u05E0\u05D3\u05D7\u05D4 \u05D0\u05DD \u05D4\u05D8\u05E7\u05E1\u05D8 \u05D4\u05D7\u05D9 \u05D4\u05E9\u05EA\u05E0\u05D4 \u05DE\u05D0\u05D6 \u05D4\u05BEpull.", textEn: "An urgent prompt between deploys: prompts:push sends one file as the live text with LOCAL_SCRIPTS_TOKEN, and is refused if the live text changed since the pull." }
|
|
21672
|
+
]
|
|
21653
21673
|
}
|
|
21654
21674
|
];
|
|
21655
21675
|
|
|
21676
|
+
// ../shared/src/domain-sales.ts
|
|
21677
|
+
var IL_TLDS = ["co.il", "org.il", "net.il"];
|
|
21678
|
+
var DEFAULT_LIVEDNS_POINTS = { 5: 9100, 10: 8900, 20: 8700, 50: 8500, 100: 8200 };
|
|
21679
|
+
var pointCost = (points, pack) => Math.round(points[pack] / (1 + VAT_RATE));
|
|
21680
|
+
var DEFAULT_DOMAIN_REGISTRARS = {
|
|
21681
|
+
cloudflare: { enabled: true, feeRate: 0.03, maxUsdCentsPerDay: 1e4 },
|
|
21682
|
+
livedns: { enabled: true, feeRate: 0.01, pack: 5, costAgorot: pointCost(DEFAULT_LIVEDNS_POINTS, 5) },
|
|
21683
|
+
manual: { enabled: true, feeRate: 0.01, costAgorot: 7500 }
|
|
21684
|
+
};
|
|
21685
|
+
var LIVEDNS_TLDS = [...IL_TLDS, "com", "net", "org"];
|
|
21686
|
+
|
|
21656
21687
|
// ../shared/src/cost-model.ts
|
|
21657
21688
|
var DEFAULT_FLEET = {
|
|
21658
21689
|
mix: { basic: 0.65, business: 0.3, agency: 0.05 },
|
|
@@ -21809,6 +21840,7 @@ var PLAN_FEATURES = [
|
|
|
21809
21840
|
{ key: "pageViews", limit: "maxPageViewsMonth" },
|
|
21810
21841
|
{ key: "deploys", limit: "maxDeploysDay" },
|
|
21811
21842
|
{ key: "emails", limit: "maxEmailsMonth" },
|
|
21843
|
+
{ key: "domainEmail", limit: "includedEmailDomains" },
|
|
21812
21844
|
{ key: "versions", limit: "maxVersionsMb" },
|
|
21813
21845
|
{ key: "helpDeploys" },
|
|
21814
21846
|
{ key: "helpEmail" },
|
|
@@ -21826,6 +21858,7 @@ var MIGRATION_DIR = ".deployai/migration";
|
|
|
21826
21858
|
var BRIEF_FILE = ".deployai/brief.md";
|
|
21827
21859
|
var CHECK = { cmd: "npx deployai@latest check", say: "Fix every blocker it lists, then run it again until it shows none." };
|
|
21828
21860
|
var DEPLOY_ASK_RULE = 'Never deploy on your own, and never after each small edit: every deploy is a full build. Deploy only when what the owner asked for is done. Then say in short what changed and ask: "Put it live, see a preview first, or not yet?" Put it live: deploy with --live. Preview first: deploy without it and send the owner the preview address. Not yet: keep working, and the next change goes up in the same deploy. If the owner said to always put changes live, deploy with --live without asking. Database changes still get their own yes.';
|
|
21861
|
+
var ASK_OWNER_RULE = "When a question to the owner has set answers, use your tool's own question feature with clickable choices if it has one, for example AskUserQuestion in Claude Code, AskQuestion in Cursor, askQuestions in Copilot in VS Code, or request_user_input in Codex. Use the owner's language, with each answer as its own choice. If your tool has no such feature, or it is refused or fails, ask the same question once in plain text and go on. Never change a mode or a setting to get it. A yes or no question has set answers too. A question about going live names the site and its address when you know it, and says anyone will be able to see it, so the owner's answer is about this exact site (D-691). Open details, like a phone number or hours, stay in plain text, in one short list.";
|
|
21829
21862
|
var ASK = { say: DEPLOY_ASK_RULE };
|
|
21830
21863
|
var GUEST_ASK = { say: 'Deploy only when what the owner asked for is done. Say in short what you made and ask: "Put it up now, or not yet?" On Not yet, keep working and ask again when the next request is done.' };
|
|
21831
21864
|
var FAVICON = { cmd: "npx deployai@latest brand favicon", say: "Gives the site an icon if it has none, made from the site itself: the old site's icon, else its logo, else the first letter of its name in its own color. Add the head lines it prints to every page. It changes nothing when the site has an icon." };
|
|
@@ -21833,7 +21866,7 @@ var LOGIN = { cmd: "npx deployai@latest login", say: "The owner approves it in t
|
|
|
21833
21866
|
var PROMOTE = { cmd: "npx deployai@latest promote v<N>", say: "Only when deploy ran without --live, and only after the owner approves the preview. N is the version number deploy printed. Then give the owner the live address." };
|
|
21834
21867
|
var DEPLOY_SAY = "Add --live only if the owner chose to put it live right away. It waits for the build: with --live it ends with the live address, else with the preview address to send the owner. When it prints database changes, a yes to going live does not cover them (D-541): show the owner the changes and ask the question it prints, and only after a yes run the promote --approve-sql command it printed; changes it says remove data only the owner approves, never you. Write the -m message in a few words in the language of the owner, about what they see changed.";
|
|
21835
21868
|
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." };
|
|
21836
|
-
var ADDONS_RUN = { cmd: "npx deployai@latest addons run", say: "
|
|
21869
|
+
var ADDONS_RUN = { cmd: "npx deployai@latest addons run", say: "With more than one add-on waiting, it prints a question: one by one (recommended) or all at once. Ask the owner, run the command for their answer, work through each step it prints, and report each add-on as it says." };
|
|
21837
21870
|
var MIGRATE_STEPS = [
|
|
21838
21871
|
{ cmd: "npx deployai@latest blocks inbox", say: "Only if the old site has a contact or quote form: the form with its own messages page for the owner." },
|
|
21839
21872
|
{ cmd: "npx deployai@latest blocks blog", say: "Only if the old site has posts, news or articles: the blog, with the posts as Markdown files." },
|
|
@@ -21842,22 +21875,37 @@ var MIGRATE_STEPS = [
|
|
|
21842
21875
|
{ cmd: "npx deployai@latest brand images <the old site address> <one address of each kind of page>", say: "Measures every image against where it shows and changes nothing. Add each weak one to .deployai/migration/plan.md as Needs me, with what it shows. A move keeps the images as they are: only the owner chooses to replace one, and a photo of a real person, product or place is never replaced with a made up one." },
|
|
21843
21876
|
{ ...CHECK },
|
|
21844
21877
|
LOGIN,
|
|
21845
|
-
{ cmd: 'npx deployai@latest link --create "<the site name>"', say: "Makes the site in the owner's account and links this folder. The add-ons come with it for free while the offer lasts." },
|
|
21878
|
+
{ cmd: 'npx deployai@latest link --create "<the site name>"', say: "Makes the site in the owner's account and links this folder. The add-ons come with it for free while the offer lasts. Do not run them now: the last step offers them, once the move is done." },
|
|
21846
21879
|
{ cmd: 'npx deployai@latest deploy -m "moved from the old site"', say: "Without --live: the first version of a moved site is always a preview. It waits for the build and prints the preview address." },
|
|
21847
|
-
{ cmd: "npx deployai@latest migrate verify <preview address>", say: "Compares every old address with the preview: a page that moved, lost its title or description, or does not open. Fix each one, deploy again and run it again until it lists none." },
|
|
21848
|
-
ADDONS_RUN,
|
|
21880
|
+
{ cmd: "npx deployai@latest migrate verify <preview address>", say: "Compares every old address with the preview: a page that moved, lost its title or description, or does not open, and any credit to a site builder still on it. Fix each one, deploy again and run it again until it lists none. A credit the owner asked to keep is the only one that may stay: say so in .deployai/migration/plan.md." },
|
|
21849
21881
|
{ say: 'Send the owner the preview address and the table from .deployai/migration/plan.md. Ask: "Put it live now, or change something first?" Deploy again for each change.' },
|
|
21850
21882
|
PROMOTE,
|
|
21851
21883
|
{ say: "Only after it is live: tell the owner how to connect their domain in the dashboard (Domains), to keep their email records (MX) as they are, and to keep the old hosting for a few weeks before they cancel it." }
|
|
21852
21884
|
];
|
|
21885
|
+
var MOVE_ADDONS = { cmd: "npx deployai@latest addons", say: 'The move is done, so offer the second part: the free add-ons. This lists the ones this site has; never offer the ones to buy here. If none is waiting, finish. Else tell the owner in one short line what the waiting ones add, in plain words, and ask once: "Your site moved. Go on to the free add-ons?" with three answers. One by one (recommended): run npx deployai@latest addons run --one-by-one, and after each add-on the owner chooses whether to publish. All at once: run npx deployai@latest addons run --all, with one publish at the end. Not now: finish here, and tell them the add-ons stay with this site, on its page in the dashboard, with no time limit. Never start an add-on without their answer.' };
|
|
21853
21886
|
var managedStatus = (stage, note, say) => ({ cmd: `npx deployai@latest migrate status ${stage} "${note}"`, say });
|
|
21887
|
+
var stepWith = (part) => MIGRATE_STEPS.find((step) => step.cmd?.includes(part));
|
|
21854
21888
|
var MANAGED_STEPS = [
|
|
21855
21889
|
managedStatus("building", "<what is done>", "First, once the plan in .deployai/migration/plan.md is agreed: the request shows the build started."),
|
|
21856
|
-
|
|
21890
|
+
stepWith("migrate media"),
|
|
21891
|
+
{ say: "A first look, before the rest of the site: build the real home page now, as step 3 says, with the owner's logo, colors, photos and words from the scan, and only the contact details found there. Its menu and buttons lead only to what already works on this one page; leave the rest out for now. Never write coming soon or under construction." },
|
|
21892
|
+
FAVICON,
|
|
21893
|
+
CHECK,
|
|
21894
|
+
LOGIN,
|
|
21895
|
+
stepWith("link --create"),
|
|
21896
|
+
{ cmd: 'npx deployai@latest deploy -m "first look"', say: "Never with --live, and do not ask first: this one deploy is a private preview that visitors and Google do not see, and the old site and its domain stay as they are. It waits for the build and prints the preview address. Deploy it once, not for each small fix. If it fails and you cannot fix it soon, skip the next step and go on: the full preview is what the owner approves." },
|
|
21897
|
+
managedStatus("first_look", "<preview address>", "The owner gets one email that leads to this private link. Then build the rest of the site with the steps below."),
|
|
21898
|
+
stepWith("blocks inbox"),
|
|
21899
|
+
stepWith("blocks blog"),
|
|
21900
|
+
stepWith("brand images"),
|
|
21901
|
+
CHECK,
|
|
21902
|
+
stepWith("moved from the old site"),
|
|
21903
|
+
managedStatus("first_look", "<the new preview address>", "A site keeps one preview, so this deploy ended the old link. Report the new one, and again after any deploy below, until preview_ready. It sends no second email."),
|
|
21904
|
+
stepWith("migrate verify"),
|
|
21857
21905
|
managedStatus("preview_ready", "<preview address>", "The owner gets an email with the preview address."),
|
|
21858
|
-
...MIGRATE_STEPS.slice(
|
|
21906
|
+
...MIGRATE_STEPS.slice(10, 12),
|
|
21859
21907
|
managedStatus("live", "<live address>", "Only after it is live. Then the team transfers the site to the owner."),
|
|
21860
|
-
...MIGRATE_STEPS.slice(
|
|
21908
|
+
...MIGRATE_STEPS.slice(12)
|
|
21861
21909
|
];
|
|
21862
21910
|
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." };
|
|
21863
21911
|
function startSteps(kind, opts = {}) {
|
|
@@ -21883,7 +21931,7 @@ function stepsOf(kind, opts) {
|
|
|
21883
21931
|
PROMOTE
|
|
21884
21932
|
];
|
|
21885
21933
|
case "migrate":
|
|
21886
|
-
return (opts.managed ? MANAGED_STEPS : MIGRATE_STEPS).map((step) => ({ ...step }));
|
|
21934
|
+
return (opts.managed ? MANAGED_STEPS : [...MIGRATE_STEPS, MOVE_ADDONS]).map((step) => ({ ...step }));
|
|
21887
21935
|
case "guest":
|
|
21888
21936
|
return [
|
|
21889
21937
|
...opts.starter ? [BUILD] : [],
|
|
@@ -21898,8 +21946,10 @@ function stepsOf(kind, opts) {
|
|
|
21898
21946
|
}
|
|
21899
21947
|
}
|
|
21900
21948
|
var allowCommandsUrl = (lang = "he") => `${HELP_ORIGIN}${lang === "he" ? "" : "/en"}/go-live#allow`;
|
|
21901
|
-
var runCommandsRule = (lang = "he") => `Run every npx deployai@latest command yourself. If your tool
|
|
21902
|
-
var
|
|
21949
|
+
var runCommandsRule = (lang = "he") => `Run every npx deployai@latest command yourself. The package is DeployAI's own CLI: its code is public at github.com/yobotn/deployai-cli and npm shows where each version was built. If your tool shows the owner its own approval for a command, that approval is the question, so do not ask again. If it needs approval and shows the owner nothing, ask the owner one short yes or no question that names the command, for example "Run npx deployai@latest check?", and run it when they say yes. Never ask the owner to copy, paste or type a command. Right after the first command runs, before any other work, ask the owner once, unless your tool already allows our commands here: "Let your coding tool run DeployAI commands in this folder without asking each time? New versions of DeployAI will run too. Going live still waits for your answer." Only on yes run npx deployai@latest allow (add your tool's name if it asks: claude-code, cursor, copilot, codex or antigravity). Either way go on without stopping, and do not ask again. Never change your tool's settings any other way. If a command is still blocked after their yes, also by a safety check of your tool, never retry it, change it or run it another way. Say in one short sentence what was stopped, send them ${allowCommandsUrl(lang)}, which shows how to approve it in their tool, without copying its steps, and ask: "Your coding tool stopped this step. I approved it, or not yet?" If the stopped command was a deploy with --live, also offer a preview first. On I approved it, try once more.`;
|
|
21950
|
+
var OWNER_TEXT_RULE = "Write to the owner in short plain text, with no file paths or setting names, and no escape codes or invisible direction marks such as \\u200E.";
|
|
21951
|
+
var START_LOGIN_WAIT_LINE = "For the agent: this command prints your instructions after the owner approves the login in the browser. Ask the owner to approve it now. If your tool stops this command, run the same command again. Do not build, scan or download anything before your instructions print.";
|
|
21952
|
+
var START_FAIL_LINE = "If anything fails, tell the owner in one or two short sentences what happened and what happens now, with no technical words. Give the cause only when it helps them, in simple words. Do not suggest another coding tool.";
|
|
21903
21953
|
|
|
21904
21954
|
// ../shared/src/cli-map.ts
|
|
21905
21955
|
var n = (id, lane, label, summaryHe, summaryEn) => ({ id, lane, label, summaryHe, summaryEn });
|
|
@@ -21911,7 +21961,7 @@ var CLI_MAP_NODES = [
|
|
|
21911
21961
|
n("page-site", "site", "/project/<id>", "\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D0\u05EA\u05E8: \u05E9\u05D5\u05E8\u05EA \u05D4\u05EA\u05D7\u05DC\u05D4 \u05E2\u05D3 \u05D4\u05D2\u05E8\u05E1\u05D4 \u05D4\u05E8\u05D0\u05E9\u05D5\u05E0\u05D4, \u05D5\u05D0\u05D7\u05E8\u05D9\u05D4 \u05E9\u05D5\u05E8\u05EA \u05E2\u05D3\u05DB\u05D5\u05DF.", "The site page: a new site line until the first version, then an update line."),
|
|
21912
21962
|
n("page-move-url", "site", "/move", "\u05D4\u05E2\u05D1\u05D9\u05E8\u05D5 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05D9: \u05DB\u05EA\u05D5\u05D1\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF, \u05D4\u05E4\u05DC\u05D8\u05E4\u05D5\u05E8\u05DE\u05D4, \u05E1\u05D5\u05D2 \u05D4\u05D0\u05EA\u05E8 \u05D5\u05D4\u05E2\u05D9\u05E6\u05D5\u05D1. \u05D4 id \u05E0\u05D5\u05E9\u05D0 \u05D0\u05EA \u05DB\u05D5\u05DC\u05DD.", "Move my site: the old site address, the platform, the kind of site and the design. The id carries them all."),
|
|
21913
21963
|
n("page-addons", "site", "/project/<id>/addons", "\u05D4\u05E8\u05E6\u05EA \u05EA\u05D5\u05E1\u05E4\u05D9\u05DD: \u05E9\u05D5\u05E8\u05D4 \u05E9\u05DE\u05E8\u05D9\u05E6\u05D4 \u05D0\u05EA \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8, \u05D2\u05DD \u05DE\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05E8\u05D9\u05E7\u05D4.", "Run add-ons: a line that runs the site's add-ons, from an empty folder too."),
|
|
21914
|
-
n("page-refresh", "site", "/project/<id>/refresh", "\u05E8\u05E2\u05E0\u05D5\u05DF \u05D4\u05E2\u05D9\u05E6\u05D5\u05D1: \u05E9\u05D5\u05E8\u05D4 \u05DC\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D7\u05D3\u05E9 \u05DC\u05D0\u05EA\u05E8 \u05D7\u05D9, \u05DE\u05EA\u05D5\u05DA \u05D4\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05DC\u05D9.", "Freshen it up: a line for a new look on a live site
|
|
21964
|
+
n("page-refresh", "site", "/project/<id>/refresh", "\u05E8\u05E2\u05E0\u05D5\u05DF \u05D4\u05E2\u05D9\u05E6\u05D5\u05D1: \u05E9\u05D5\u05E8\u05D4 \u05DC\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D7\u05D3\u05E9 \u05DC\u05D0\u05EA\u05E8 \u05D7\u05D9, \u05DE\u05EA\u05D5\u05DA \u05D4\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05DC\u05D9.", "Freshen it up, hidden for now (D-663): a line for a new look on a live site."),
|
|
21915
21965
|
n("page-move", "site", "/dashboard", "\u05D9\u05E9 \u05DC\u05D9 \u05DB\u05D1\u05E8 \u05D0\u05EA\u05E8: \u05E9\u05D5\u05E8\u05D4 \u05DC\u05D4\u05E2\u05D1\u05E8\u05EA \u05D4\u05D0\u05EA\u05E8 \u05E9\u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4.", "I already have a site: a line to move the site in the folder."),
|
|
21916
21966
|
// The CLI: every command (packages/cli/src/cli.ts).
|
|
21917
21967
|
n("cmd-start", "cli", "start <id>", "\u05DE\u05DB\u05D9\u05DF \u05D0\u05EA \u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05DC\u05E4\u05D9 \u05DB\u05DC \u05D4\u05D1\u05D7\u05D9\u05E8\u05D5\u05EA: \u05EA\u05D9\u05E7\u05D9\u05D9\u05D4, \u05D3\u05D5\u05D2\u05DE\u05D4 \u05D5\u05D4\u05EA\u05E7\u05E0\u05D4, \u05E7\u05D5\u05D1\u05E5 \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05D5\u05D7\u05D9\u05D1\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8. \u05DE\u05D3\u05E4\u05D9\u05E1 \u05DC\u05E1\u05D5\u05DB\u05DF \u05D0\u05EA \u05D4\u05D8\u05E7\u05E1\u05D8 \u05D5\u05D0\u05EA \u05D4\u05E4\u05E7\u05D5\u05D3\u05D5\u05EA.", "Prepares the folder with every choice: folder, sample and install, the details file and the site link. Prints the text and the commands for the agent."),
|
|
@@ -21968,7 +22018,8 @@ var CLI_MAP_NODES = [
|
|
|
21968
22018
|
n("text-update", "agent", "site.update", "\u05E2\u05D5\u05E9\u05D9\u05DD \u05D0\u05EA \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9 \u05E9\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D1\u05D9\u05E7\u05E9.", "Make the change the owner asked for."),
|
|
21969
22019
|
n("text-refresh", "agent", "site.refresh", "\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D7\u05D3\u05E9 \u05DC\u05D0\u05EA\u05E8 \u05D7\u05D9: \u05DB\u05DC \u05E2\u05DE\u05D5\u05D3, \u05DB\u05EA\u05D5\u05D1\u05EA, \u05DE\u05D9\u05DC\u05D4 \u05D5\u05DE\u05D5\u05EA\u05D2 \u05E0\u05E9\u05D0\u05E8\u05D9\u05DD, \u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4 \u05DC\u05E4\u05E0\u05D9 \u05E9\u05E2\u05D5\u05DC\u05D4.", "A new look for a live site: every page, address, word and the brand stay, a preview before it goes live."),
|
|
21970
22020
|
n("text-run-addons", "agent", "site.addons", "\u05DE\u05E8\u05D9\u05E6\u05D9\u05DD \u05D0\u05EA \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05E9\u05DC \u05D0\u05EA\u05E8 \u05D7\u05D9, \u05D0\u05D7\u05D3 \u05D0\u05D7\u05E8\u05D9 \u05D4\u05E9\u05E0\u05D9: \u05D4\u05D0\u05EA\u05E8 \u05E0\u05E9\u05D0\u05E8 \u05DB\u05DE\u05D5 \u05E9\u05D4\u05D5\u05D0 \u05E2\u05D3 \u05E9\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DE\u05D0\u05E9\u05E8.", "Run a live site's add-ons one by one: the site stays as it is until the owner approves."),
|
|
21971
|
-
n("text-migrate", "agent", "site.migrate", "\u05D1\
|
|
22021
|
+
n("text-migrate-keep", "agent", "site.migrate-keep", "\u05D1\u05E8\u05D9\u05E8\u05EA \u05D4\u05DE\u05D7\u05D3\u05DC: \u05DE\u05E2\u05D1\u05D9\u05E8\u05D9\u05DD \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF \u05DB\u05DE\u05D5 \u05E9\u05D4\u05D5\u05D0, \u05E2\u05DD \u05D4\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D5\u05D4\u05E1\u05E7\u05E8\u05D9\u05E4\u05D8\u05D9\u05DD \u05E9\u05DC\u05D5, \u05D5\u05DE\u05E9\u05D5\u05D5\u05D9\u05DD \u05E6\u05D9\u05DC\u05D5\u05DE\u05D9 \u05DE\u05E1\u05DA. \u05DE\u05E0\u05E7\u05D9\u05DD \u05E8\u05E7 \u05DE\u05D4 \u05E9\u05DE\u05D1\u05E7\u05E8 \u05DC\u05D0 \u05E8\u05D5\u05D0\u05D4.", "The default: move the old site exactly as it is, with its own front end, and compare screenshots. Clean up only what a visitor cannot see."),
|
|
22022
|
+
n("text-migrate", "agent", "site.migrate", "\u05D1\u05E0\u05D9\u05D9\u05D4 \u05DE\u05D7\u05D3\u05E9, \u05E8\u05E7 \u05DB\u05E9\u05D4\u05E6\u05D5\u05D5\u05EA \u05D1\u05D7\u05E8 \u05D1\u05D6\u05D4 \u05D1\u05D1\u05E7\u05E9\u05EA \u05D4\u05E2\u05D1\u05E8\u05D4: \u05D1\u05D5\u05E0\u05D9\u05DD \u05DE\u05D7\u05D3\u05E9 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF \u05E2\u05DC \u05D4\u05D3\u05D5\u05D2\u05DE\u05D4, \u05E9\u05D5\u05DE\u05E8\u05D9\u05DD \u05DB\u05DC \u05DB\u05EA\u05D5\u05D1\u05EA \u05D5\u05DB\u05D5\u05EA\u05E8\u05EA, \u05EA\u05D5\u05DB\u05E0\u05D9\u05EA \u05E2\u05DD \u05E1\u05D8\u05D8\u05D5\u05E1 \u05DC\u05DB\u05DC \u05D9\u05DB\u05D5\u05DC\u05EA.", "Rebuild the old site on the sample, keep every address and title, a plan with a status for each feature."),
|
|
21972
22023
|
n("text-move", "agent", "site.move", "\u05DE\u05E2\u05D1\u05D9\u05E8\u05D9\u05DD \u05D0\u05EA\u05E8 \u05E7\u05D9\u05D9\u05DD \u05D1\u05DC\u05D9 \u05DC\u05E9\u05E0\u05D5\u05EA \u05D0\u05EA \u05D4\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D0\u05D5 \u05D4\u05DE\u05E1\u05D2\u05E8\u05EA.", "Move an existing site without changing its design or framework."),
|
|
21973
22024
|
n("text-guest", "agent", "site.guest / site.guest-sample", "\u05D0\u05EA\u05E8 \u05D6\u05DE\u05E0\u05D9: \u05D4\u05DE\u05D2\u05D1\u05DC\u05D5\u05EA, \u05D5\u05DE\u05D4 \u05DC\u05E9\u05D0\u05D5\u05DC \u05D0\u05EA \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8.", "A temporary site: the limits, and what to ask the owner."),
|
|
21974
22025
|
n("text-addons", "agent", "core.workflow-frame", "\u05D4\u05DE\u05E1\u05D2\u05E8\u05EA \u05E9\u05DC \u05DB\u05DC \u05EA\u05D5\u05E1\u05E3. \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05E2\u05E6\u05DE\u05DD \u05D1\u05E2\u05DE\u05D5\u05D3 \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD.", "The frame of every add-on. The add-ons themselves are on the marketplace page.")
|
|
@@ -22015,6 +22066,7 @@ var CLI_MAP_EDGES = [
|
|
|
22015
22066
|
e("cmd-rollback", "api-promote"),
|
|
22016
22067
|
e("cmd-start", "cmd-brand"),
|
|
22017
22068
|
e("page-move-url", "cmd-start"),
|
|
22069
|
+
e("cmd-start", "text-migrate-keep"),
|
|
22018
22070
|
e("cmd-start", "text-migrate"),
|
|
22019
22071
|
e("cmd-start", "cmd-migrate"),
|
|
22020
22072
|
e("cmd-blocks", "api-blocks"),
|
|
@@ -22027,17 +22079,6 @@ var CLI_MAP_EDGES = [
|
|
|
22027
22079
|
e("cmd-env", "api-env")
|
|
22028
22080
|
];
|
|
22029
22081
|
|
|
22030
|
-
// ../shared/src/domain-sales.ts
|
|
22031
|
-
var IL_TLDS = ["co.il", "org.il", "net.il"];
|
|
22032
|
-
var DEFAULT_LIVEDNS_POINTS = { 5: 9100, 10: 8900, 20: 8700, 50: 8500, 100: 8200 };
|
|
22033
|
-
var pointCost = (points, pack) => Math.round(points[pack] / (1 + VAT_RATE));
|
|
22034
|
-
var DEFAULT_DOMAIN_REGISTRARS = {
|
|
22035
|
-
cloudflare: { enabled: true, feeRate: 0.03, maxUsdCentsPerDay: 1e4 },
|
|
22036
|
-
livedns: { enabled: true, feeRate: 0.01, pack: 5, costAgorot: pointCost(DEFAULT_LIVEDNS_POINTS, 5) },
|
|
22037
|
-
manual: { enabled: true, feeRate: 0.01, costAgorot: 7500 }
|
|
22038
|
-
};
|
|
22039
|
-
var LIVEDNS_TLDS = [...IL_TLDS, "com", "net", "org"];
|
|
22040
|
-
|
|
22041
22082
|
// ../shared/src/env-scopes.ts
|
|
22042
22083
|
var ENV_KEYS = {
|
|
22043
22084
|
DEPLOYAI_SPACE: { scope: "own", section: "app", required: ["local", "server"], sample: { local: "dev", server: "prod" }, about: "Which entry of packages/shared/src/spaces.ts this machine runs: dev on your computer, prod on the server. Every Cloudflare name, bucket and address comes from there." },
|
|
@@ -22074,7 +22115,7 @@ var ENV_KEYS = {
|
|
|
22074
22115
|
CARDCOM_API_PASSWORD: { scope: "same", section: "payments", about: "The API password of that terminal." },
|
|
22075
22116
|
CARDCOM_INVOICES: { scope: "same", section: "payments", about: "0 stops Cardcom from issuing a tax invoice per charge (on by default)." },
|
|
22076
22117
|
CARDCOM_DEPARTMENT_ID: { scope: "same", section: "payments", about: "Optional. The Cardcom department number put on every invoice and credit invoice, for reports on a shared terminal (D-371)." },
|
|
22077
|
-
CARDCOM_CSS_URL: { scope: "own", section: "payments", about: "Our stylesheet for Cardcom's card page, https only. Leave unset: the app address is used, the tunnel in dev." },
|
|
22118
|
+
CARDCOM_CSS_URL: { scope: "own", section: "payments", about: "Our stylesheet for Cardcom's card page, https only, test terminals only (D-699). Leave unset: the app address is used, the tunnel in dev." },
|
|
22078
22119
|
CARDCOM_TOKEN_KEY: { scope: "server", section: "payments", required: ["server"], about: "32 bytes in base64 that seal saved card tokens (openssl rand -base64 32). Back it up offline; without it no saved card works." },
|
|
22079
22120
|
BUILD_MODE: { scope: "own", section: "builds", sample: { server: "docker" }, about: "docker = a fresh container per build. Default local." },
|
|
22080
22121
|
BUILD_SLOTS: { scope: "own", section: "builds", about: "Builds running at the same time in the queue worker. Default 2." },
|
|
@@ -22096,7 +22137,7 @@ var ENV_KEYS = {
|
|
|
22096
22137
|
UPTIME_ALERT_TO: { scope: "own", section: "tools", about: "Who gets the down and back up emails of the uptime Worker, comma separated. Without it no email is sent." },
|
|
22097
22138
|
UPTIME_ALERT_TOKEN: { scope: "own", section: "tools", about: "A Cloudflare token with Email Sending edit only, stored as the uptime Worker's secret. Default CF_API_TOKEN." },
|
|
22098
22139
|
A11Y_RENDER: { scope: "same", section: "tools", about: "0 turns off Cloudflare Browser Rendering for the online accessibility check (D-191)." },
|
|
22099
|
-
|
|
22140
|
+
LOCAL_SCRIPTS_TOKEN: { scope: "own", section: "board", about: "Token our local scripts send to the app: board:watch, prompts:pull, prompts:push and costs:push. It can change live prompts and prices. 24 characters or more. Each machine its own." },
|
|
22100
22141
|
BOARD_URL: { scope: "own", section: "board", about: "The app pnpm board:watch, prompts:push and costs:push talk to. Default http://localhost:3000; the live address to push there." },
|
|
22101
22142
|
LIFECYCLE_NOW: { scope: "local", section: "testing", about: "An ISO date the lifecycle job uses as today, to trigger each email (D-180). Ignored in production." },
|
|
22102
22143
|
CHROME_PATH: { scope: "local", section: "testing", about: "The browser pnpm samples:shots uses. Default Chrome or Edge in their usual places." },
|
|
@@ -22183,6 +22224,7 @@ var SPACES = {
|
|
|
22183
22224
|
};
|
|
22184
22225
|
|
|
22185
22226
|
// ../shared/src/agent-rules.ts
|
|
22227
|
+
var IPHONE_RULE = "iPhone: Safari is its own browser engine, so working in Chrome or on Android proves nothing. Full height sections use svh or dvh, never 100vh. Typing fields are at least 16px, or the page zooms. A video that plays by itself has muted and playsinline. Bars fixed to the bottom pad with env(safe-area-inset-bottom). Nothing needs a hover. Newer CSS and browser features need a working fallback.";
|
|
22186
22228
|
var BUILD_WITH = [
|
|
22187
22229
|
`Frameworks: ${SUPPORTED_FRAMEWORKS.map((f) => f.name).join(", ")}. In beta: ${BETA_FRAMEWORKS.map((f) => f.name).join(", ")} (Next.js through the OpenNext Cloudflare adapter).`,
|
|
22188
22230
|
"Database: Cloudflare D1 (SQLite), through Drizzle with drizzle-orm/d1 or Prisma with the D1 adapter.",
|
|
@@ -22192,10 +22234,9 @@ var BUILD_WITH = [
|
|
|
22192
22234
|
// D-616: an icon is part of a finished site, and the command keeps one the site has.
|
|
22193
22235
|
"Icon: every site has one. npx deployai@latest brand favicon keeps the one it has, or makes one from the site itself: its logo, or the first letter of its name in its own color.",
|
|
22194
22236
|
// D-661: the site carries its owner's name. Our badge comes with the Free plan, so nothing here may hide it (D-179).
|
|
22195
|
-
`Footer: the site carries its own name, not its builder's. No "Built with" or "Powered by" credit for a platform or tool. Use \xA9 <year> <name>, with a year that follows the date. Keep a credit a template's license requires. Never remove or hide the DeployAI badge: the hosting adds it on the Free plan, and a paid plan removes it.`,
|
|
22237
|
+
`Footer: the site carries its own name, not its builder's. No "Built with" or "Powered by" credit for a platform or tool. Use \xA9 <year> <name>, with a year that follows the date. Ask the owner, Remove or Keep, about a credit to a real designer or agency. Keep a credit a template's license requires. Never remove or hide the DeployAI badge: the hosting adds it on the Free plan, and a paid plan removes it.`,
|
|
22196
22238
|
"Passwords: bcryptjs or Web Crypto, never native bcrypt.",
|
|
22197
|
-
|
|
22198
|
-
"iPhone: Safari is its own browser engine, so working in Chrome or on Android proves nothing. Full height sections use svh or dvh, never 100vh. Typing fields are at least 16px, or the page zooms. A video that plays by itself has muted and playsinline. Bars fixed to the bottom pad with env(safe-area-inset-bottom). Nothing needs a hover. Newer CSS and browser features need a working fallback.",
|
|
22239
|
+
IPHONE_RULE,
|
|
22199
22240
|
"Server code runs per request: no long-running processes, background servers or child processes.",
|
|
22200
22241
|
// D-611: Durable Objects run when the site's own code exports them; D1 stays the default, they cost more for plain data.
|
|
22201
22242
|
"Data goes in D1 by default. Use a Durable Object only for live state that needs one place to coordinate (a chat room, a live counter, booking slots that must not double-book, presence): export the class from this site's Worker and bind it with a name and class_name in the wrangler config, never script_name. Never remove or rename a class once it is live: that would delete its data, so the upload is refused. A preview starts with empty objects.",
|
|
@@ -22210,7 +22251,8 @@ var KEEP_DATA_RULES = [
|
|
|
22210
22251
|
"- Sessions and cache (Redis, memory): these can be lost, and users may have to log in again. Say so.",
|
|
22211
22252
|
"Never delete the old database, files or storage service."
|
|
22212
22253
|
];
|
|
22213
|
-
var AGENT_POINTER = "Read DEPLOYAI.md before you write code, change the plan or add a dependency: this project is published with DeployAI.";
|
|
22254
|
+
var AGENT_POINTER = "Read DEPLOYAI.md before your first answer and before you write code, change the plan or add a dependency: this project is published with DeployAI.";
|
|
22255
|
+
var FOLDER_READY_RULE = `This folder is already set up. When the owner has not asked for anything yet, say only, in their language: "The folder is set up and ready. What do you want to change?" Add the site's name when .deployai/project.json has it. If the folder has no site files yet, ask instead: "The folder is set up and ready. What do you want to build?" Never ask them for a start line, a command or an id. While the folder holds a site, never offer a sample or a new start: go on with that site.`;
|
|
22214
22256
|
|
|
22215
22257
|
// ../shared/src/stack.ts
|
|
22216
22258
|
var SITE_LANG_INFO = {
|
|
@@ -22325,6 +22367,55 @@ function uiPartsText() {
|
|
|
22325
22367
|
}
|
|
22326
22368
|
|
|
22327
22369
|
// ../shared/src/migration.ts
|
|
22370
|
+
var BLOCKED_MOVE_ENDINGS = ["gov", "gov.il", "mil", "mil.il", "idf.il", "muni.il", "bank", "insurance"];
|
|
22371
|
+
var BLOCKED_MOVE_HOSTS = [
|
|
22372
|
+
// Banks and payment cards in Israel, and the central bank.
|
|
22373
|
+
"leumi.co.il",
|
|
22374
|
+
"bankhapoalim.co.il",
|
|
22375
|
+
"discountbank.co.il",
|
|
22376
|
+
"mizrahi-tefahot.co.il",
|
|
22377
|
+
"fibi.co.il",
|
|
22378
|
+
"mercantile.co.il",
|
|
22379
|
+
"bankjerusalem.co.il",
|
|
22380
|
+
"boi.org.il",
|
|
22381
|
+
"isracard.co.il",
|
|
22382
|
+
"cal-online.co.il",
|
|
22383
|
+
"max.co.il",
|
|
22384
|
+
// Health funds and hospitals in Israel.
|
|
22385
|
+
"clalit.co.il",
|
|
22386
|
+
"maccabi4u.co.il",
|
|
22387
|
+
"meuhedet.co.il",
|
|
22388
|
+
"leumit.co.il",
|
|
22389
|
+
"sheba.co.il",
|
|
22390
|
+
"hadassah.org.il",
|
|
22391
|
+
"tasmc.org.il",
|
|
22392
|
+
"rambam.org.il",
|
|
22393
|
+
"szmc.org.il",
|
|
22394
|
+
"assuta.co.il",
|
|
22395
|
+
// Insurers in Israel.
|
|
22396
|
+
"harel-group.co.il",
|
|
22397
|
+
"migdal.co.il",
|
|
22398
|
+
"fnx.co.il",
|
|
22399
|
+
"menoramivt.co.il",
|
|
22400
|
+
"clalbit.co.il",
|
|
22401
|
+
// Payment services and large banks abroad.
|
|
22402
|
+
"paypal.com",
|
|
22403
|
+
"stripe.com",
|
|
22404
|
+
"chase.com",
|
|
22405
|
+
"bankofamerica.com",
|
|
22406
|
+
"wellsfargo.com",
|
|
22407
|
+
"hsbc.com",
|
|
22408
|
+
"barclays.co.uk"
|
|
22409
|
+
];
|
|
22410
|
+
function isBlockedMoveSite(url2) {
|
|
22411
|
+
let host;
|
|
22412
|
+
try {
|
|
22413
|
+
host = new URL(url2).hostname.toLowerCase().replace(/\.$/, "");
|
|
22414
|
+
} catch {
|
|
22415
|
+
return false;
|
|
22416
|
+
}
|
|
22417
|
+
return [...BLOCKED_MOVE_ENDINGS, ...BLOCKED_MOVE_HOSTS].some((name) => host === name || host.endsWith(`.${name}`));
|
|
22418
|
+
}
|
|
22328
22419
|
function normalizeSourceUrl(raw) {
|
|
22329
22420
|
const text = raw.trim();
|
|
22330
22421
|
if (!text || text.length > 300) return null;
|
|
@@ -22421,7 +22512,7 @@ ${t.join("\n")}` : "tags: []",
|
|
|
22421
22512
|
return { file: file2, text: front + (p.content?.rendered ?? "").replace(sameHost, "").trim() + "\n" };
|
|
22422
22513
|
});
|
|
22423
22514
|
}
|
|
22424
|
-
var AGENT_STAGES = ["scanning", "building", "preview_ready", "customer_review", "live", "blocked"];
|
|
22515
|
+
var AGENT_STAGES = ["scanning", "building", "first_look", "preview_ready", "customer_review", "live", "blocked"];
|
|
22425
22516
|
var STAGE_NOTE_MAX = 300;
|
|
22426
22517
|
var isAgentStage = (s) => AGENT_STAGES.includes(s);
|
|
22427
22518
|
var stageNote = (s) => (s ?? "").replace(/[\u0000-\u001f\u007f]+/g, " ").replace(/\s+/g, " ").trim().slice(0, STAGE_NOTE_MAX);
|
|
@@ -22681,6 +22772,33 @@ function logoInPage(html) {
|
|
|
22681
22772
|
}
|
|
22682
22773
|
return null;
|
|
22683
22774
|
}
|
|
22775
|
+
var NOT_WORD_BEFORE = "(?<![\\p{L}\\p{N}])";
|
|
22776
|
+
var NOT_WORD_AFTER = "(?![\\p{L}\\p{N}])";
|
|
22777
|
+
var BUILDER_NAMES = "wix(?:\\.com)?|squarespace|wordpress(?:\\.(?:com|org))?|webflow|shopify|woocommerce|weebly|godaddy|jimdo|elementor|wpbakery|divi|lovable|bolt(?:\\.new)?|v0|replit|base44|manus|framer|astro|next\\.?js|nuxt|gatsby|hostinger|vercel|netlify|cloudflare|github\\s+pages|durable|site123|mobirise|duda|webnode|ucraft|tilda|carrd|bluehost|hostgator|cursor|claude|chatgpt|gemini|\u05D5\u05D5\u05D9\u05E7\u05E1|\u05D5\u05D9\u05E7\u05E1|\u05D5\u05D5\u05E8\u05D3\u05E4\u05E8\u05E1|\u05D5\u05E8\u05D3\u05E4\u05E8\u05E1|\u05E9\u05D5\u05E4\u05D9\u05E4\u05D9\u05D9";
|
|
22778
|
+
var BUILDER_CREDITS = [
|
|
22779
|
+
new RegExp(`${NOT_WORD_BEFORE}(?:proudly\\s+)?(?:built|made|created|designed|developed|powered|hosted|published|generated|running|runs|edit|site|website)(?:\\s+\\p{L}+)?\\s+(?:with|by|on|using|in|at)\\s+(?:the\\s+)?(?:${BUILDER_NAMES})${NOT_WORD_AFTER}`, "giu"),
|
|
22780
|
+
new RegExp(`${NOT_WORD_BEFORE}just\\s+another\\s+wordpress\\s+site${NOT_WORD_AFTER}`, "giu"),
|
|
22781
|
+
new RegExp(`${NOT_WORD_BEFORE}(?:\u05E0\u05D1\u05E0\u05D4|\u05E0\u05D1\u05E0\u05EA\u05D4|\u05E0\u05D5\u05E6\u05E8|\u05E0\u05D5\u05E6\u05E8\u05D4|\u05D1\u05E0\u05D5\u05D9|\u05D1\u05E0\u05D5\u05D9\u05D4|\u05DE\u05D5\u05E4\u05E2\u05DC|\u05DE\u05D5\u05E4\u05E2\u05DC\u05EA|\u05DE\u05D1\u05D5\u05E1\u05E1|\u05DE\u05D1\u05D5\u05E1\u05E1\u05EA|\u05DE\u05D0\u05D5\u05D7\u05E1\u05DF|\u05DE\u05D0\u05D5\u05D7\u05E1\u05E0\u05EA|\u05DE\u05EA\u05D0\u05E8\u05D7|\u05DE\u05EA\u05D0\u05E8\u05D7\u05EA)\\s+(?:\u05D1-?|\u05E2\u05DC\\s+\u05D9\u05D3\u05D9\\s+|\u05D1\u05D0\u05DE\u05E6\u05E2\u05D5\u05EA\\s+|\u05E2\u05DD\\s+|\u05E2\u05DC\\s+)\\s*(?:${BUILDER_NAMES})${NOT_WORD_AFTER}`, "giu")
|
|
22782
|
+
];
|
|
22783
|
+
var BUILDER_TRACES = [
|
|
22784
|
+
/<meta\b[^>]*\bname=["']?generator\b[^>]*>/gi,
|
|
22785
|
+
/lovable-badge|edit-with-lovable|cdn\.gpteng\.co|wix-?ads|webflow-badge|framer-badge|bolt-badge|replit-badge/gi,
|
|
22786
|
+
new RegExp(`<title\\b[^>]*>[^<]*[|\\-\u2013\u2014:\xB7]\\s*(?:${BUILDER_NAMES})\\s*</title>`, "giu")
|
|
22787
|
+
];
|
|
22788
|
+
var FOOTER_TAIL = 1500;
|
|
22789
|
+
var pageText = (html) => html.replace(/<!--[\s\S]*?-->/g, " ").replace(/<(script|style)\b[\s\S]*?<\/\1\s*>/gi, " ").replace(/<[^>]*>/g, " ").replace(/ | /gi, " ").replace(/\s+/g, " ");
|
|
22790
|
+
function builderCredits(html) {
|
|
22791
|
+
const found = /* @__PURE__ */ new Set();
|
|
22792
|
+
const say = (text) => {
|
|
22793
|
+
const t = text.replace(/\s+/g, " ").trim();
|
|
22794
|
+
found.add(t.length > 80 ? `${t.slice(0, 77)}...` : t);
|
|
22795
|
+
};
|
|
22796
|
+
const footers = [...html.matchAll(/<footer\b[\s\S]*?<\/footer\s*>/gi)].map((m) => pageText(m[0])).join(" ");
|
|
22797
|
+
const end = footers || pageText(html).slice(-FOOTER_TAIL);
|
|
22798
|
+
for (const re of BUILDER_CREDITS) for (const m of end.matchAll(re)) say(m[0]);
|
|
22799
|
+
for (const re of BUILDER_TRACES) for (const m of html.matchAll(re)) say(m[0]);
|
|
22800
|
+
return [...found];
|
|
22801
|
+
}
|
|
22684
22802
|
|
|
22685
22803
|
// ../shared/src/deploy-tools.ts
|
|
22686
22804
|
var AI_AGENT_NAMES = [
|
|
@@ -22855,6 +22973,7 @@ var M = {
|
|
|
22855
22973
|
en: {
|
|
22856
22974
|
startTitle: "DeployAI start",
|
|
22857
22975
|
startNewFolder: "This folder already has files, so the new site is in a new folder: {dir}",
|
|
22976
|
+
startUpdateFolder: "This folder holds other files, so the site's live code is in a new folder: {dir}. Nothing here changed.",
|
|
22858
22977
|
startDownloaded: "Downloaded the {key} sample: {n} files.",
|
|
22859
22978
|
startInstalled: "Installed its packages (npm install).",
|
|
22860
22979
|
startBrief: "Wrote the owner's details to {file} (kept out of git and never uploaded).",
|
|
@@ -22878,7 +22997,7 @@ var M = {
|
|
|
22878
22997
|
pasteFix: " Paste the prompt below into your AI editor, then run: npx deployai@latest check",
|
|
22879
22998
|
copied: " (copied to clipboard)",
|
|
22880
22999
|
runDeploy: ' Run: npx deployai@latest deploy -m "<message>"',
|
|
22881
|
-
moveOfferGranted: "Moved from /move: the site got {n} add-ons free.
|
|
23000
|
+
moveOfferGranted: "Moved from /move: the site got {n} add-ons free. They wait until the move is done, and the last step offers them.",
|
|
22882
23001
|
moveOfferCap: "The free add-ons for moved sites were already used on 3 sites of this account.",
|
|
22883
23002
|
moveOfferOver: "The free add-ons offer for moved sites is over.",
|
|
22884
23003
|
initHint: " So your agent follows the DeployAI rules, run: npx deployai@latest init",
|
|
@@ -22929,12 +23048,18 @@ var M = {
|
|
|
22929
23048
|
promoteReady: " After the owner approves the preview: npx deployai@latest promote v{n} (to put it live)",
|
|
22930
23049
|
askOwner: ' Version {n} is ready and not live. Ask the owner: "Version {n} is ready. Do you want to put it live?"',
|
|
22931
23050
|
showPreview: " Send them the preview first: {url}",
|
|
23051
|
+
creditLeft: " The site still shows a builder's credit: {text}",
|
|
23052
|
+
creditFix: " Remove it and put the site's own name and the year in its place, unless the owner asked to keep it.",
|
|
22932
23053
|
askLiveFirst: "Put it live as soon as the build is done? No shows you the preview first. (y/N) ",
|
|
22933
23054
|
askLiveNow: "Put v{n} live now? (y/N) ",
|
|
22934
23055
|
waitBuild: "Waiting for the build of v{n}. Ctrl+C stops the waiting, not the build.",
|
|
22935
23056
|
waitState: " v{n}: {s}",
|
|
22936
23057
|
buildSlow: "The build of v{n} is taking longer than usual.",
|
|
22937
23058
|
liveNow: "v{n} is live: {url}",
|
|
23059
|
+
closedHere: "This site opens only to visitors from {countries}. From here ({country}) it shows a blocked page.",
|
|
23060
|
+
closedHereOpen: " Open it to {country}: {url}",
|
|
23061
|
+
closedHereAsk: " Ask the site owner to open it to {country}.",
|
|
23062
|
+
closedHereVpn: " Or use a VPN through a country it is open to.",
|
|
22938
23063
|
promoteLater: " To put it live later: npx deployai@latest promote v{n}",
|
|
22939
23064
|
notPublished: "not published yet",
|
|
22940
23065
|
none: "none",
|
|
@@ -22975,6 +23100,7 @@ var M = {
|
|
|
22975
23100
|
notOnSite: "This site belongs to another account. Ask its owner to add you as an editor. If it is your site, log in with the account that owns it: npx deployai@latest logout, then npx deployai@latest login",
|
|
22976
23101
|
viewOnly: "This account can only view this site. Ask its owner to make you an editor.",
|
|
22977
23102
|
startLoginFirst: "This line opens only for the site's owner or an editor, so first log in.",
|
|
23103
|
+
startLoginExpired: "The login code expired. Run the same line again: npx deployai@latest start {id}",
|
|
22978
23104
|
notFound: "DeployAI did not find it, or this account cannot see it. Check the name or the link, and that you logged in with the account that made the site: npx deployai@latest whoami",
|
|
22979
23105
|
badArchive: "The upload arrived broken or empty. Run the same command again. If it happens again, update the CLI: npx deployai@latest",
|
|
22980
23106
|
invalidRequest: "DeployAI did not accept this request. Run it again with the newest CLI: npx deployai@latest",
|
|
@@ -23075,6 +23201,7 @@ var M = {
|
|
|
23075
23201
|
he: {
|
|
23076
23202
|
startTitle: "DeployAI start",
|
|
23077
23203
|
startNewFolder: "\u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05DB\u05D1\u05E8 \u05D9\u05E9 \u05E7\u05D1\u05E6\u05D9\u05DD, \u05D0\u05D6 \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D7\u05D3\u05E9 \u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D7\u05D3\u05E9\u05D4: {dir}",
|
|
23204
|
+
startUpdateFolder: "\u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05D9\u05E9 \u05E7\u05D1\u05E6\u05D9\u05DD \u05D0\u05D7\u05E8\u05D9\u05DD, \u05D0\u05D6 \u05D4\u05E7\u05D5\u05D3 \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8 \u05E0\u05DE\u05E6\u05D0 \u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D7\u05D3\u05E9\u05D4: {dir}. \u05DC\u05D0 \u05E9\u05D9\u05E0\u05D9\u05E0\u05D5 \u05DB\u05D0\u05DF \u05DB\u05DC\u05D5\u05DD.",
|
|
23078
23205
|
startDownloaded: "\u05D4\u05D3\u05D5\u05D2\u05DE\u05D4 {key} \u05D4\u05D5\u05E8\u05D3\u05D4: {n} \u05E7\u05D1\u05E6\u05D9\u05DD.",
|
|
23079
23206
|
startInstalled: "\u05D4\u05D7\u05D1\u05D9\u05DC\u05D5\u05EA \u05E9\u05DC\u05D4 \u05D4\u05D5\u05EA\u05E7\u05E0\u05D5 (npm install).",
|
|
23080
23207
|
startBrief: "\u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05E9\u05DC \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05E0\u05DB\u05EA\u05D1\u05D5 \u05DC {file} (\u05DC\u05D0 \u05E0\u05DB\u05E0\u05E1\u05D9\u05DD \u05DC\u05BEgit \u05D5\u05DC\u05D0 \u05E2\u05D5\u05DC\u05D9\u05DD \u05DC\u05D0\u05EA\u05E8).",
|
|
@@ -23098,7 +23225,7 @@ var M = {
|
|
|
23098
23225
|
pasteFix: " \u05D4\u05D3\u05D1\u05D9\u05E7\u05D5 \u05D0\u05EA \u05D4\u05E4\u05E8\u05D5\u05DE\u05E4\u05D8 \u05E9\u05DC\u05DE\u05D8\u05D4 \u05DC\u05E1\u05D5\u05DB\u05DF, \u05D5\u05D0\u05D6 \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest check",
|
|
23099
23226
|
copied: " (\u05D4\u05D5\u05E2\u05EA\u05E7)",
|
|
23100
23227
|
runDeploy: ' \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest deploy -m "<message>"',
|
|
23101
|
-
moveOfferGranted: "\u05D4\u05D0\u05EA\u05E8 \u05E2\u05D1\u05E8 \u05DE /move \u05D5\u05E7\u05D9\u05D1\u05DC {n} \u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D1\u05D7\u05D9\u05E0\u05DD. \u05DE\
|
|
23228
|
+
moveOfferGranted: "\u05D4\u05D0\u05EA\u05E8 \u05E2\u05D1\u05E8 \u05DE /move \u05D5\u05E7\u05D9\u05D1\u05DC {n} \u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D1\u05D7\u05D9\u05E0\u05DD. \u05D4\u05DD \u05DE\u05D7\u05DB\u05D9\u05DD \u05DC\u05E1\u05D5\u05E3 \u05D4\u05DE\u05E2\u05D1\u05E8, \u05D5\u05D4\u05E9\u05DC\u05D1 \u05D4\u05D0\u05D7\u05E8\u05D5\u05DF \u05DE\u05E6\u05D9\u05E2 \u05D0\u05D5\u05EA\u05DD.",
|
|
23102
23229
|
moveOfferCap: "\u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D4\u05D7\u05D9\u05E0\u05DE\u05D9\u05D9\u05DD \u05DC\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05E2\u05D1\u05E8\u05D5 \u05DB\u05D1\u05E8 \u05E0\u05D5\u05E6\u05DC\u05D5 \u05D1 3 \u05D0\u05EA\u05E8\u05D9\u05DD \u05D1\u05D7\u05E9\u05D1\u05D5\u05DF \u05D4\u05D6\u05D4.",
|
|
23103
23230
|
moveOfferOver: "\u05DE\u05D1\u05E6\u05E2 \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D4\u05D7\u05D9\u05E0\u05DE\u05D9\u05D9\u05DD \u05DC\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05E2\u05D1\u05E8\u05D5 \u05D4\u05E1\u05EA\u05D9\u05D9\u05DD.",
|
|
23104
23231
|
initHint: " \u05DB\u05D3\u05D9 \u05E9\u05D4\u05E1\u05D5\u05DB\u05DF \u05D9\u05E2\u05D1\u05D5\u05D3 \u05DC\u05E4\u05D9 \u05D4\u05DB\u05DC\u05DC\u05D9\u05DD \u05E9\u05DC DeployAI, \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest init",
|
|
@@ -23149,12 +23276,18 @@ var M = {
|
|
|
23149
23276
|
promoteReady: " \u05D0\u05D7\u05E8\u05D9 \u05E9\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D0\u05D9\u05E9\u05E8 \u05D0\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4: npx deployai@latest promote v{n} (\u05DB\u05D3\u05D9 \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05D5\u05EA\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8)",
|
|
23150
23277
|
askOwner: ' \u05D2\u05E8\u05E1\u05D4 {n} \u05DE\u05D5\u05DB\u05E0\u05D4 \u05D5\u05E2\u05D5\u05D3 \u05DC\u05D0 \u05D1\u05D0\u05D5\u05D5\u05D9\u05E8. \u05E9\u05D0\u05DC\u05D5 \u05D0\u05EA \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8: "\u05D2\u05E8\u05E1\u05D4 {n} \u05DE\u05D5\u05DB\u05E0\u05D4. \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05D5\u05EA\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8?"',
|
|
23151
23278
|
showPreview: " \u05E9\u05DC\u05D7\u05D5 \u05E7\u05D5\u05D3\u05DD \u05D0\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4: {url}",
|
|
23279
|
+
creditLeft: " \u05D4\u05D0\u05EA\u05E8 \u05E2\u05D3\u05D9\u05D9\u05DF \u05DE\u05E6\u05D9\u05D2 \u05E7\u05E8\u05D3\u05D9\u05D8 \u05E9\u05DC \u05D1\u05D5\u05E0\u05D4 \u05D0\u05EA\u05E8\u05D9\u05DD: {text}",
|
|
23280
|
+
creditFix: " \u05D4\u05E1\u05D9\u05E8\u05D5 \u05D0\u05D5\u05EA\u05D5 \u05D5\u05E9\u05D9\u05DE\u05D5 \u05D1\u05DE\u05E7\u05D5\u05DE\u05D5 \u05D0\u05EA \u05E9\u05DD \u05D4\u05D0\u05EA\u05E8 \u05D5\u05D4\u05E9\u05E0\u05D4, \u05D0\u05DC\u05D0 \u05D0\u05DD \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D1\u05D9\u05E7\u05E9 \u05DC\u05D4\u05E9\u05D0\u05D9\u05E8 \u05D0\u05D5\u05EA\u05D5.",
|
|
23152
23281
|
askLiveFirst: "\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05DE\u05D9\u05D3 \u05DB\u05E9\u05D4\u05D1\u05E0\u05D9\u05D9\u05D4 \u05DE\u05E1\u05EA\u05D9\u05D9\u05DE\u05EA? \u05DC\u05D0 \u05DE\u05E6\u05D9\u05D2 \u05E7\u05D5\u05D3\u05DD \u05D0\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4. (y/N) ",
|
|
23153
23282
|
askLiveNow: "\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05EA v{n} \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E2\u05DB\u05E9\u05D9\u05D5? (y/N) ",
|
|
23154
23283
|
waitBuild: "\u05DE\u05D7\u05DB\u05D9\u05DD \u05DC\u05D1\u05E0\u05D9\u05D9\u05D4 \u05E9\u05DC v{n}. Ctrl+C \u05DE\u05E4\u05E1\u05D9\u05E7 \u05D0\u05EA \u05D4\u05D4\u05DE\u05EA\u05E0\u05D4, \u05DC\u05D0 \u05D0\u05EA \u05D4\u05D1\u05E0\u05D9\u05D9\u05D4.",
|
|
23155
23284
|
waitState: " v{n}: {s}",
|
|
23156
23285
|
buildSlow: "\u05D4\u05D1\u05E0\u05D9\u05D9\u05D4 \u05E9\u05DC v{n} \u05DC\u05D5\u05E7\u05D7\u05EA \u05D9\u05D5\u05EA\u05E8 \u05D6\u05DE\u05DF \u05DE\u05D4\u05E8\u05D2\u05D9\u05DC.",
|
|
23157
23286
|
liveNow: "v{n} \u05D1\u05D0\u05D5\u05D5\u05D9\u05E8: {url}",
|
|
23287
|
+
closedHere: "\u05D4\u05D0\u05EA\u05E8 \u05E4\u05EA\u05D5\u05D7 \u05E8\u05E7 \u05DC\u05DE\u05D1\u05E7\u05E8\u05D9\u05DD \u05DE: {countries}. \u05DE\u05DB\u05D0\u05DF ({country}) \u05DE\u05D5\u05E6\u05D2 \u05D3\u05E3 \u05D7\u05E1\u05D5\u05DD.",
|
|
23288
|
+
closedHereOpen: " \u05E4\u05EA\u05D7\u05D5 \u05D0\u05D5\u05EA\u05D5 \u05D2\u05DD \u05DC\u05BE{country}: {url}",
|
|
23289
|
+
closedHereAsk: " \u05D1\u05E7\u05E9\u05D5 \u05DE\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05D5\u05EA\u05D5 \u05D2\u05DD \u05DC\u05BE{country}.",
|
|
23290
|
+
closedHereVpn: " \u05D0\u05D5 \u05D4\u05E9\u05EA\u05DE\u05E9\u05D5 \u05D1\u05BEVPN \u05D3\u05E8\u05DA \u05DE\u05D3\u05D9\u05E0\u05D4 \u05E9\u05D4\u05D0\u05EA\u05E8 \u05E4\u05EA\u05D5\u05D7 \u05D1\u05D4.",
|
|
23158
23291
|
promoteLater: " \u05DB\u05D3\u05D9 \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05D0\u05D7\u05E8 \u05DB\u05DA: npx deployai@latest promote v{n}",
|
|
23159
23292
|
notPublished: "\u05E2\u05D3\u05D9\u05D9\u05DF \u05DC\u05D0 \u05D1\u05D0\u05D5\u05D5\u05D9\u05E8",
|
|
23160
23293
|
none: "\u05D0\u05D9\u05DF",
|
|
@@ -23195,6 +23328,7 @@ var M = {
|
|
|
23195
23328
|
notOnSite: "\u05D4\u05D0\u05EA\u05E8 \u05D4\u05D6\u05D4 \u05E9\u05D9\u05D9\u05DA \u05DC\u05D7\u05E9\u05D1\u05D5\u05DF \u05D0\u05D7\u05E8. \u05D1\u05E7\u05E9\u05D5 \u05DE\u05D4\u05D1\u05E2\u05DC\u05D9\u05DD \u05E9\u05DC\u05D5 \u05DC\u05D4\u05D5\u05E1\u05D9\u05E3 \u05D0\u05EA\u05DB\u05DD \u05E2\u05DD \u05D4\u05E8\u05E9\u05D0\u05EA \u05E2\u05E8\u05D9\u05DB\u05D4. \u05D0\u05DD \u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05DB\u05DD, \u05D4\u05EA\u05D7\u05D1\u05E8\u05D5 \u05E2\u05DD \u05D4\u05D7\u05E9\u05D1\u05D5\u05DF \u05E9\u05D4\u05D5\u05D0 \u05E9\u05D9\u05D9\u05DA \u05DC\u05D5: npx deployai@latest logout \u05D5\u05D0\u05D6 npx deployai@latest login",
|
|
23196
23329
|
viewOnly: "\u05DC\u05D7\u05E9\u05D1\u05D5\u05DF \u05D4\u05D6\u05D4 \u05D9\u05E9 \u05D4\u05E8\u05E9\u05D0\u05EA \u05E6\u05E4\u05D9\u05D9\u05D4 \u05D1\u05DC\u05D1\u05D3 \u05D1\u05D0\u05EA\u05E8 \u05D4\u05D6\u05D4. \u05D1\u05E7\u05E9\u05D5 \u05DE\u05D4\u05D1\u05E2\u05DC\u05D9\u05DD \u05DC\u05EA\u05EA \u05DC\u05DB\u05DD \u05D4\u05E8\u05E9\u05D0\u05EA \u05E2\u05E8\u05D9\u05DB\u05D4.",
|
|
23197
23330
|
startLoginFirst: "\u05D4\u05E9\u05D5\u05E8\u05D4 \u05D4\u05D6\u05D5 \u05E0\u05E4\u05EA\u05D7\u05EA \u05E8\u05E7 \u05DC\u05D1\u05E2\u05DC\u05D9\u05DD \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D0\u05D5 \u05DC\u05DE\u05D9 \u05E9\u05D9\u05E9 \u05DC\u05D5 \u05D4\u05E8\u05E9\u05D0\u05EA \u05E2\u05E8\u05D9\u05DB\u05D4, \u05D0\u05D6 \u05E7\u05D5\u05D3\u05DD \u05DE\u05EA\u05D7\u05D1\u05E8\u05D9\u05DD.",
|
|
23331
|
+
startLoginExpired: "\u05E7\u05D5\u05D3 \u05D4\u05DB\u05E0\u05D9\u05E1\u05D4 \u05E4\u05D2. \u05D4\u05E8\u05D9\u05E6\u05D5 \u05E9\u05D5\u05D1 \u05D0\u05EA \u05D0\u05D5\u05EA\u05D4 \u05D4\u05E9\u05D5\u05E8\u05D4: npx deployai@latest start {id}",
|
|
23198
23332
|
notFound: "DeployAI \u05DC\u05D0 \u05DE\u05E6\u05D0 \u05D0\u05EA \u05D6\u05D4, \u05D0\u05D5 \u05E9\u05D4\u05D7\u05E9\u05D1\u05D5\u05DF \u05D4\u05D6\u05D4 \u05DC\u05D0 \u05E8\u05D5\u05D0\u05D4 \u05D0\u05EA \u05D6\u05D4. \u05D1\u05D3\u05E7\u05D5 \u05D0\u05EA \u05D4\u05E9\u05DD \u05D0\u05D5 \u05D4\u05E7\u05D9\u05E9\u05D5\u05E8, \u05D5\u05E9\u05E0\u05DB\u05E0\u05E1\u05EA\u05DD \u05E2\u05DD \u05D4\u05D7\u05E9\u05D1\u05D5\u05DF \u05E9\u05D9\u05E6\u05E8 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8: npx deployai@latest whoami",
|
|
23199
23333
|
badArchive: "\u05D4\u05D4\u05E2\u05DC\u05D0\u05D4 \u05D4\u05D2\u05D9\u05E2\u05D4 \u05E4\u05D2\u05D5\u05DE\u05D4 \u05D0\u05D5 \u05E8\u05D9\u05E7\u05D4. \u05D4\u05E8\u05D9\u05E6\u05D5 \u05E9\u05D5\u05D1 \u05D0\u05EA \u05D0\u05D5\u05EA\u05D4 \u05E4\u05E7\u05D5\u05D3\u05D4. \u05D0\u05DD \u05D6\u05D4 \u05D7\u05D5\u05D6\u05E8, \u05E2\u05D3\u05DB\u05E0\u05D5 \u05D0\u05EA \u05D4\u05BECLI: npx deployai@latest",
|
|
23200
23334
|
invalidRequest: "DeployAI \u05DC\u05D0 \u05E7\u05D9\u05D1\u05DC \u05D0\u05EA \u05D4\u05D1\u05E7\u05E9\u05D4. \u05D4\u05E8\u05D9\u05E6\u05D5 \u05D0\u05D5\u05EA\u05D4 \u05E9\u05D5\u05D1 \u05E2\u05DD \u05D4\u05BECLI \u05D4\u05E2\u05D3\u05DB\u05E0\u05D9: npx deployai@latest",
|
|
@@ -23303,7 +23437,7 @@ function messages(root) {
|
|
|
23303
23437
|
}
|
|
23304
23438
|
|
|
23305
23439
|
// src/version.ts
|
|
23306
|
-
var CLI_VERSION = "0.1.0-beta.
|
|
23440
|
+
var CLI_VERSION = "0.1.0-beta.26";
|
|
23307
23441
|
|
|
23308
23442
|
// src/api.ts
|
|
23309
23443
|
function apiContext(apiFlag) {
|
|
@@ -23472,7 +23606,7 @@ function formatBytes(n2) {
|
|
|
23472
23606
|
import { arch as arch2, platform as platform2 } from "os";
|
|
23473
23607
|
var TELEMETRY_SENT = [
|
|
23474
23608
|
"Install id (random, made on this computer) and CLI version",
|
|
23475
|
-
"After each command: command name, result (success, blocked, error category), how long it took and which AI tool ran it, when the environment says so",
|
|
23609
|
+
"After each command: command name, result (success, blocked, error category), how long it took and which AI tool ran it, when the environment says so. A start that has to wait for a login sends one more, before it waits",
|
|
23476
23610
|
"After an error: the error line with addresses, paths, file names, emails and ids removed, or the wrong command or flag name",
|
|
23477
23611
|
"A note your agent sends with the feedback command: what got in its way and what would help, one sentence each, shown to you as it was sent",
|
|
23478
23612
|
"Linked project id, detected framework and version",
|
|
@@ -24240,8 +24374,14 @@ var DEPLOYAI_MD = `# DeployAI rules
|
|
|
24240
24374
|
|
|
24241
24375
|
This project is published with DeployAI.
|
|
24242
24376
|
|
|
24377
|
+
${FOLDER_READY_RULE}
|
|
24378
|
+
|
|
24243
24379
|
Always explain to the user in simple words, in the language they write to you in. The user may not read English.
|
|
24244
24380
|
|
|
24381
|
+
${START_FAIL_LINE}
|
|
24382
|
+
|
|
24383
|
+
${OWNER_TEXT_RULE}
|
|
24384
|
+
|
|
24245
24385
|
When you install or set something up, say what it does for the site, not the package name. Say "installing the site runtime" or "setting up a local test database", not "installing the Cloudflare adapter" or "installing wrangler".
|
|
24246
24386
|
|
|
24247
24387
|
Before you write code or change the plan, compare it with these rules. If something in it does not fit, say what and propose the change.
|
|
@@ -24250,7 +24390,7 @@ Before you write code or change the plan, compare it with these rules. If someth
|
|
|
24250
24390
|
|
|
24251
24391
|
${BUILD_WITH.map((l) => `- ${l}`).join("\n")}
|
|
24252
24392
|
|
|
24253
|
-
|
|
24393
|
+
Only when this folder has no site yet and the owner asks to start from working code: npx deployai@latest samples
|
|
24254
24394
|
|
|
24255
24395
|
## Do not add
|
|
24256
24396
|
|
|
@@ -24273,6 +24413,10 @@ ${KEEP_DATA_RULES.join("\n")}
|
|
|
24273
24413
|
|
|
24274
24414
|
${runCommandsRule()}
|
|
24275
24415
|
|
|
24416
|
+
## Asking the owner
|
|
24417
|
+
|
|
24418
|
+
${ASK_OWNER_RULE}
|
|
24419
|
+
|
|
24276
24420
|
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.
|
|
24277
24421
|
|
|
24278
24422
|
## When to deploy
|
|
@@ -24293,13 +24437,31 @@ Files:
|
|
|
24293
24437
|
- .deployai/last-check.json: latest check result (not committed)
|
|
24294
24438
|
`;
|
|
24295
24439
|
var AGENT_FILES = ["AGENTS.md", "CLAUDE.md"];
|
|
24440
|
+
var LATER_RULES = [
|
|
24441
|
+
{ has: "iPhone:", text: IPHONE_RULE },
|
|
24442
|
+
{ has: "set up and ready", text: FOLDER_READY_RULE },
|
|
24443
|
+
{ has: "one or two short sentences", text: START_FAIL_LINE },
|
|
24444
|
+
{ has: "direction marks", text: OWNER_TEXT_RULE },
|
|
24445
|
+
{ has: "deployai@latest feedback", text: AGENT_FEEDBACK_RULES.join(" ") }
|
|
24446
|
+
];
|
|
24447
|
+
function addMissingRules(md) {
|
|
24448
|
+
const text = readFileSync5(md, "utf8");
|
|
24449
|
+
const missing = LATER_RULES.filter((r) => !text.includes(r.has));
|
|
24450
|
+
if (!missing.length) return false;
|
|
24451
|
+
const eol = text.includes("\r\n") ? "\r\n" : "\n";
|
|
24452
|
+
const gap = text.endsWith("\n") ? eol : eol + eol;
|
|
24453
|
+
appendFileSync(md, `${gap}## Added later by DeployAI${eol}${eol}${missing.map((r) => r.text).join(eol + eol)}${eol}`);
|
|
24454
|
+
return true;
|
|
24455
|
+
}
|
|
24296
24456
|
function runInit(root, opts = {}) {
|
|
24297
24457
|
const created = [];
|
|
24298
24458
|
const kept = [];
|
|
24299
24459
|
const updated = [];
|
|
24300
24460
|
const md = join5(root, "DEPLOYAI.md");
|
|
24461
|
+
let rulesAdded = false;
|
|
24301
24462
|
if (existsSync5(md) && !opts.force) {
|
|
24302
24463
|
kept.push("DEPLOYAI.md");
|
|
24464
|
+
rulesAdded = addMissingRules(md);
|
|
24303
24465
|
} else {
|
|
24304
24466
|
writeFileSync3(md, DEPLOYAI_MD);
|
|
24305
24467
|
created.push("DEPLOYAI.md");
|
|
@@ -24332,7 +24494,7 @@ function runInit(root, opts = {}) {
|
|
|
24332
24494
|
created.push(".deployai/project.json");
|
|
24333
24495
|
}
|
|
24334
24496
|
const hasCode = existsSync5(join5(root, "package.json")) || framework !== "unknown";
|
|
24335
|
-
return { created, kept, updated, hasCode };
|
|
24497
|
+
return { rulesAdded, created, kept, updated, hasCode };
|
|
24336
24498
|
}
|
|
24337
24499
|
function initCommand(root, opts) {
|
|
24338
24500
|
const res = runInit(root, opts);
|
|
@@ -24370,10 +24532,12 @@ var PROMPT_RULES = [
|
|
|
24370
24532
|
"Do not remove features without asking.",
|
|
24371
24533
|
"Keep the project runnable outside DeployAI.",
|
|
24372
24534
|
"Never add credentials to source code.",
|
|
24373
|
-
"
|
|
24535
|
+
"Write to the user briefly, in simple words, in the language they write to you in.",
|
|
24374
24536
|
"For the database, use D1 as shown in the DeployAI CRUD sample.",
|
|
24375
24537
|
"Follow DEPLOYAI.md for every future change. If it is missing, run: npx deployai@latest init",
|
|
24376
|
-
runCommandsRule()
|
|
24538
|
+
runCommandsRule(),
|
|
24539
|
+
ASK_OWNER_RULE,
|
|
24540
|
+
OWNER_TEXT_RULE
|
|
24377
24541
|
];
|
|
24378
24542
|
var DATA_CODES = /* @__PURE__ */ new Set(["fs_write", "unsupported_db_postgres", "unsupported_db_mysql", "unsupported_db_mongodb", "unsupported_db_sqlite_file", "native_module_bcrypt"]);
|
|
24379
24543
|
var MAX_LOCATIONS = 3;
|
|
@@ -24783,7 +24947,8 @@ function allowCommand(tool) {
|
|
|
24783
24947
|
ignoreInGit(root, rel);
|
|
24784
24948
|
}
|
|
24785
24949
|
out(added ? `Done: Claude Code runs npx deployai@latest commands in this folder without asking (${rel}).` : "Already allowed in this folder.");
|
|
24786
|
-
out("Other commands still ask. The owner can take it back with /permissions.");
|
|
24950
|
+
out("Other commands still ask, and going live still waits for the owner. The owner can take it back with /permissions.");
|
|
24951
|
+
out(`If a safety check of the tool still stops a command, do not run it another way: send the owner ${allowCommandsUrl()}, the link only, not its steps (D-691).`);
|
|
24787
24952
|
return;
|
|
24788
24953
|
}
|
|
24789
24954
|
if (picked === "cursor") {
|
|
@@ -24866,6 +25031,17 @@ function ensureMigrationDir(root) {
|
|
|
24866
25031
|
const ignore = join9(dir, ".gitignore");
|
|
24867
25032
|
if (!existsSync9(ignore)) writeFileSync6(ignore, "*/media/\n*/media-state.json\n");
|
|
24868
25033
|
}
|
|
25034
|
+
function sameAddress(from, to) {
|
|
25035
|
+
try {
|
|
25036
|
+
const a = new URL(from);
|
|
25037
|
+
const b = new URL(to, from);
|
|
25038
|
+
const host = (u) => u.hostname.replace(/^www\./, "");
|
|
25039
|
+
const path = (u) => u.pathname.replace(/\/+$/, "");
|
|
25040
|
+
return host(a) === host(b) && path(a) === path(b) && a.search === b.search;
|
|
25041
|
+
} catch {
|
|
25042
|
+
return false;
|
|
25043
|
+
}
|
|
25044
|
+
}
|
|
24869
25045
|
async function sitemapUrls(base, robotsSitemaps, enough) {
|
|
24870
25046
|
const own2 = [`${base}/wp-sitemap.xml`, `${base}/sitemap_index.xml`, `${base}/sitemap.xml`];
|
|
24871
25047
|
const prefix = new URL(base).pathname.replace(/\/$/, "");
|
|
@@ -24953,8 +25129,41 @@ function pageAssets(html, base) {
|
|
|
24953
25129
|
}
|
|
24954
25130
|
add(html.match(/<meta[^>]+property=["']og:image["'][^>]*content=["']([^"']+)/i)?.[1]);
|
|
24955
25131
|
for (const m of html.matchAll(/url\(["']?([^"')]+\.(?:jpe?g|png|gif|webp|svg|avif))/gi)) add(m[1]);
|
|
25132
|
+
const own2 = (u) => {
|
|
25133
|
+
if (!u) return;
|
|
25134
|
+
try {
|
|
25135
|
+
if (new URL(u.trim(), base).hostname.replace(/^www\./, "") === new URL(base).hostname.replace(/^www\./, "")) add(u);
|
|
25136
|
+
} catch {
|
|
25137
|
+
}
|
|
25138
|
+
};
|
|
25139
|
+
for (const m of html.matchAll(/<script\b[^>]*\ssrc=["']([^"']+)/gi)) own2(m[1]);
|
|
25140
|
+
for (const u of stylesheetLinks(html, base, 50)) own2(u);
|
|
24956
25141
|
return [...found];
|
|
24957
25142
|
}
|
|
25143
|
+
function stylesheetAssets(css, cssUrl) {
|
|
25144
|
+
const host = new URL(cssUrl).hostname.replace(/^www\./, "");
|
|
25145
|
+
const found = /* @__PURE__ */ new Set();
|
|
25146
|
+
for (const m of css.matchAll(/url\(\s*["']?([^"')]+)/gi)) {
|
|
25147
|
+
const u = m[1].trim();
|
|
25148
|
+
if (u.startsWith("data:") || u.startsWith("#")) continue;
|
|
25149
|
+
try {
|
|
25150
|
+
const url2 = new URL(u, cssUrl);
|
|
25151
|
+
url2.hash = "";
|
|
25152
|
+
if (!url2.search) url2.search = "";
|
|
25153
|
+
if (/^https?:$/.test(url2.protocol) && url2.hostname.replace(/^www\./, "") === host) found.add(url2.toString());
|
|
25154
|
+
} catch {
|
|
25155
|
+
}
|
|
25156
|
+
}
|
|
25157
|
+
return [...found];
|
|
25158
|
+
}
|
|
25159
|
+
async function addStylesheetAssets(assets) {
|
|
25160
|
+
for (const url2 of [...assets].filter((a) => /\.css(\?|$)/i.test(a)).slice(0, 50)) {
|
|
25161
|
+
const res = await get(url2, "text/css,*/*;q=0.8");
|
|
25162
|
+
if (!res?.ok) continue;
|
|
25163
|
+
stylesheetAssets(await res.text(), url2).forEach((a) => assets.add(a));
|
|
25164
|
+
await sleep2(PAUSE_MS);
|
|
25165
|
+
}
|
|
25166
|
+
}
|
|
24958
25167
|
var ICON_MAX_BYTES = 2 * 1024 * 1024;
|
|
24959
25168
|
async function saveOldIcons(html, pageUrl, origin, dir) {
|
|
24960
25169
|
const wanted = [];
|
|
@@ -25002,6 +25211,7 @@ async function saveOldStyles(html, pageUrl, dir) {
|
|
|
25002
25211
|
async function migrateScanCommand(root, raw, opts = {}) {
|
|
25003
25212
|
const source = normalizeSourceUrl(raw);
|
|
25004
25213
|
if (!source) throw new CliError(`Not a site address: ${raw}. Use the full address, for example https://example.co.il`, 1, "usage");
|
|
25214
|
+
if (isBlockedMoveSite(source)) throw new CliError("We do not move sites of banks, hospitals, health funds, insurers, payment services or government bodies. Tell the owner this in one line and stop.", 1, "blocked_site");
|
|
25005
25215
|
const home = await get(source);
|
|
25006
25216
|
if (!home) throw new CliError(`Could not reach ${source}. Check the address, or that the site is up.`, 1, "network");
|
|
25007
25217
|
if (home.status === 401 || home.status === 403) throw new CliError(`${source} answers ${home.status}: it is behind a login or blocks visitors. Ask the owner to open it to the public while it moves, or work from their export.`, 1, "blocked");
|
|
@@ -25031,7 +25241,9 @@ async function migrateScanCommand(root, raw, opts = {}) {
|
|
|
25031
25241
|
while (next < list.length) {
|
|
25032
25242
|
const i = next++;
|
|
25033
25243
|
const url2 = list[i];
|
|
25034
|
-
|
|
25244
|
+
let res = i === 0 ? null : await get(url2, void 0, "manual");
|
|
25245
|
+
const moved = res && res.status >= 300 && res.status < 400 ? res.headers.get("location") : null;
|
|
25246
|
+
if (moved && sameAddress(url2, moved)) res = await get(new URL(moved, url2).href);
|
|
25035
25247
|
const status = i === 0 ? home.status : res?.status ?? 0;
|
|
25036
25248
|
const body = i === 0 ? html : res && res.ok ? await res.text() : "";
|
|
25037
25249
|
const seo = body ? readPageSeo(body) : null;
|
|
@@ -25042,6 +25254,7 @@ async function migrateScanCommand(root, raw, opts = {}) {
|
|
|
25042
25254
|
}
|
|
25043
25255
|
};
|
|
25044
25256
|
await Promise.all(Array.from({ length: SCAN_WORKERS }, worker));
|
|
25257
|
+
await addStylesheetAssets(assets);
|
|
25045
25258
|
const wordpressApi = platform3 === "wordpress" ? await wordpressContent(base, dir) : false;
|
|
25046
25259
|
if (wordpressApi) {
|
|
25047
25260
|
const media = readJson2(join9(dir, "content", "media.json")) ?? [];
|
|
@@ -25058,7 +25271,7 @@ async function migrateScanCommand(root, raw, opts = {}) {
|
|
|
25058
25271
|
out();
|
|
25059
25272
|
out(`Saved in ${rel}:`);
|
|
25060
25273
|
out(` inventory.json ${pages.length} pages with their address, title, description and headings${broken ? ` (${broken} already broken on the old site)` : ""}`);
|
|
25061
|
-
out(` assets.json ${assets.size} images and files`);
|
|
25274
|
+
out(` assets.json ${assets.size} images, stylesheets, scripts, fonts and files`);
|
|
25062
25275
|
if (icons) out(` icons/ ${icons} icons and logo of the old site, for: npx deployai@latest brand favicon`);
|
|
25063
25276
|
if (wordpressApi) {
|
|
25064
25277
|
out(" content/ the WordPress pages, posts, categories, tags, media and authors as JSON");
|
|
@@ -25095,7 +25308,8 @@ async function migrateMediaCommand(root) {
|
|
|
25095
25308
|
const target = mediaTarget(dir, url2);
|
|
25096
25309
|
const res = target ? await get(url2, "*/*") : null;
|
|
25097
25310
|
const size = Number(res?.headers.get("content-length") ?? 0);
|
|
25098
|
-
|
|
25311
|
+
const pageForFile = !/\.html?$/i.test(new URL(url2).pathname) && /text\/html/i.test(res?.headers.get("content-type") ?? "");
|
|
25312
|
+
if (!target || !res?.ok || !res.body || size > MEDIA_FILE_CAP || pageForFile) {
|
|
25099
25313
|
if (!state.failed.includes(url2)) state.failed.push(url2);
|
|
25100
25314
|
done.add(url2);
|
|
25101
25315
|
continue;
|
|
@@ -25173,6 +25387,7 @@ async function migrateVerifyCommand(root, previewRaw) {
|
|
|
25173
25387
|
if (!hosts.length) throw new CliError("Nothing scanned yet. Run: npx deployai@latest migrate scan <the old site address>", 1, "usage");
|
|
25174
25388
|
const redirects = allowedRedirects(root);
|
|
25175
25389
|
const findings = [];
|
|
25390
|
+
const credits = /* @__PURE__ */ new Map();
|
|
25176
25391
|
let checked = 0;
|
|
25177
25392
|
for (const host of hosts) {
|
|
25178
25393
|
const inv = readJson2(join9(hostDir(root, host), "inventory.json"));
|
|
@@ -25186,6 +25401,7 @@ async function migrateVerifyCommand(root, previewRaw) {
|
|
|
25186
25401
|
u.searchParams.delete("deployai_preview");
|
|
25187
25402
|
const body = res.ok ? await res.text() : "";
|
|
25188
25403
|
const seo = body ? readPageSeo(body) : null;
|
|
25404
|
+
for (const c of builderCredits(body)) if (!credits.has(c)) credits.set(c, old.path);
|
|
25189
25405
|
next = { status: res.status, finalPath: u.pathname + u.search, title: seo?.title ?? null, description: seo?.description ?? null };
|
|
25190
25406
|
}
|
|
25191
25407
|
const f = comparePage(old, next, redirects.get(old.path.split("?")[0]));
|
|
@@ -25195,7 +25411,13 @@ async function migrateVerifyCommand(root, previewRaw) {
|
|
|
25195
25411
|
}
|
|
25196
25412
|
const words = { missing: "not found on the preview", moved: "moved to", error: "answers", title_lost: "lost its title", description_lost: "lost its description" };
|
|
25197
25413
|
const report2 = join9(root, MIGRATION_DIR, "verify.json");
|
|
25198
|
-
writeJson(report2, { checkedAt: (/* @__PURE__ */ new Date()).toISOString(), preview: preview.origin, checked, findings });
|
|
25414
|
+
writeJson(report2, { checkedAt: (/* @__PURE__ */ new Date()).toISOString(), preview: preview.origin, checked, findings, credits: [...credits.keys()] });
|
|
25415
|
+
if (credits.size) {
|
|
25416
|
+
out(`A builder's credit is still on the preview:`);
|
|
25417
|
+
for (const [text, path] of credits) out(` ${path} ${text}`);
|
|
25418
|
+
out("Remove each and put the site's own name and the year in its place, unless the owner asked to keep it, then deploy again and run verify again.");
|
|
25419
|
+
process.exitCode = 1;
|
|
25420
|
+
}
|
|
25199
25421
|
if (!findings.length) {
|
|
25200
25422
|
out(`All ${checked} old addresses open on the preview with their title and description.`);
|
|
25201
25423
|
return;
|
|
@@ -25516,6 +25738,17 @@ async function statusCommand(root, ctx) {
|
|
|
25516
25738
|
const projectId = linkedProjectId(root);
|
|
25517
25739
|
printStatus(root, ctx, projectId, await fetchStatus(ctx, projectId));
|
|
25518
25740
|
}
|
|
25741
|
+
function printClosedHere(root, s) {
|
|
25742
|
+
if (!s.closedHere) return;
|
|
25743
|
+
const { country, countries, settingsUrl } = s.closedHere;
|
|
25744
|
+
const t = messages(root);
|
|
25745
|
+
const names = new Intl.DisplayNames([cliLang(root)], { type: "region" });
|
|
25746
|
+
const name = (code) => names.of(code) ?? code;
|
|
25747
|
+
out();
|
|
25748
|
+
out(t("closedHere", { countries: countries.map(name).join(", "), country: name(country) }));
|
|
25749
|
+
out(settingsUrl ? t("closedHereOpen", { country: name(country), url: settingsUrl }) : t("closedHereAsk", { country: name(country) }));
|
|
25750
|
+
out(t("closedHereVpn"));
|
|
25751
|
+
}
|
|
25519
25752
|
function printStatus(root, ctx, projectId, s) {
|
|
25520
25753
|
const p = s.project;
|
|
25521
25754
|
const t = messages(root);
|
|
@@ -25533,6 +25766,7 @@ function printStatus(root, ctx, projectId, s) {
|
|
|
25533
25766
|
[t("queue"), s.queue.running ? t("buildingNow") : s.queue.position > 0 ? queueText(s.queue.position, root) : t("idle")]
|
|
25534
25767
|
])
|
|
25535
25768
|
);
|
|
25769
|
+
printClosedHere(root, s);
|
|
25536
25770
|
if (s.latest?.goingLive) {
|
|
25537
25771
|
out();
|
|
25538
25772
|
out(t("goingLive", { n: s.latest.number }));
|
|
@@ -25766,6 +26000,7 @@ async function deployVersion(root, ctx, opts, guest) {
|
|
|
25766
26000
|
}
|
|
25767
26001
|
await afterBuild(root, ctx, project.projectId, res.number, { live, pollMs: opts.pollMs ?? 3e3 });
|
|
25768
26002
|
}
|
|
26003
|
+
var CREDIT_WAIT_MS = 1e4;
|
|
25769
26004
|
var sleep3 = (ms2) => new Promise((r) => setTimeout(r, ms2));
|
|
25770
26005
|
async function poll(root, ctx, projectId, n2, pollMs, maxMs, done) {
|
|
25771
26006
|
const end = Date.now() + maxMs;
|
|
@@ -25793,6 +26028,7 @@ async function afterBuild(root, ctx, projectId, n2, o) {
|
|
|
25793
26028
|
return;
|
|
25794
26029
|
}
|
|
25795
26030
|
const ready = built.latest?.number === n2 && built.latest.status === "ready" && built.project.liveVersion !== n2;
|
|
26031
|
+
if (ready && built.latest?.preview) await creditHint(root, built.latest.preview);
|
|
25796
26032
|
const sqlWaits = ready && built.latest?.migrationStatus === "waiting";
|
|
25797
26033
|
let approval = null;
|
|
25798
26034
|
let live = o.live;
|
|
@@ -25825,6 +26061,7 @@ async function afterBuild(root, ctx, projectId, n2, o) {
|
|
|
25825
26061
|
out();
|
|
25826
26062
|
if (after?.project.liveVersion === n2 && !after.latest?.wentBack) {
|
|
25827
26063
|
out(t("liveNow", { n: n2, url: after.project.url ?? "" }));
|
|
26064
|
+
printClosedHere(root, after);
|
|
25828
26065
|
return;
|
|
25829
26066
|
}
|
|
25830
26067
|
if (!after) {
|
|
@@ -25834,6 +26071,19 @@ async function afterBuild(root, ctx, projectId, n2, o) {
|
|
|
25834
26071
|
printStatus(root, ctx, projectId, after);
|
|
25835
26072
|
process.exitCode = 1;
|
|
25836
26073
|
}
|
|
26074
|
+
async function creditHint(root, url2) {
|
|
26075
|
+
try {
|
|
26076
|
+
const res = await fetch(url2, { headers: { accept: "text/html" }, signal: AbortSignal.timeout(CREDIT_WAIT_MS) });
|
|
26077
|
+
if (!res.ok || !/html/i.test(res.headers.get("content-type") ?? "")) return;
|
|
26078
|
+
const credits = builderCredits(await res.text());
|
|
26079
|
+
if (!credits.length) return;
|
|
26080
|
+
const t = messages(root);
|
|
26081
|
+
out(t("creditLeft", { text: credits.join(", ") }));
|
|
26082
|
+
out(t("creditFix"));
|
|
26083
|
+
out();
|
|
26084
|
+
} catch {
|
|
26085
|
+
}
|
|
26086
|
+
}
|
|
25837
26087
|
function pageHint(res, root) {
|
|
25838
26088
|
if (!res.page) return;
|
|
25839
26089
|
const t = messages(root);
|
|
@@ -26177,8 +26427,13 @@ async function startCommand(cwd, ctx, id, opts = {}) {
|
|
|
26177
26427
|
let start = await fetchStart(ctxNow, key);
|
|
26178
26428
|
if (start === "login_required") {
|
|
26179
26429
|
out(messages(process.cwd())("startLoginFirst"));
|
|
26430
|
+
out(START_LOGIN_WAIT_LINE);
|
|
26180
26431
|
out();
|
|
26181
|
-
await
|
|
26432
|
+
await sendTelemetryEvent(ctxNow, buildTelemetryEvent(ctxNow.config.installId, "start", "blocked"));
|
|
26433
|
+
await loginCommand(ctxNow, { pollMs: opts.pollMs, quiet: true }).catch((e2) => {
|
|
26434
|
+
if (e2 instanceof CliError && e2.category === "auth_expired") throw new CliError(messages(process.cwd())("startLoginExpired", { id: key }), 1, "auth_expired");
|
|
26435
|
+
throw e2;
|
|
26436
|
+
});
|
|
26182
26437
|
ctxNow = { ...ctxNow, config: loadConfig() };
|
|
26183
26438
|
start = await fetchStart(ctxNow, key);
|
|
26184
26439
|
if (start === "login_required") throw new CliError(messages(process.cwd())("sessionExpired"), 1, "auth");
|
|
@@ -26189,12 +26444,14 @@ async function startCommand(cwd, ctx, id, opts = {}) {
|
|
|
26189
26444
|
const fresh = kind === "new" || kind === "migrate" || kind === "guest" && sample;
|
|
26190
26445
|
const here = resolve3(cwd);
|
|
26191
26446
|
const sameSite = Boolean(choices.projectId && readProject(here)?.projectId === choices.projectId);
|
|
26192
|
-
const
|
|
26447
|
+
const update = kind === "update" && Boolean(choices.projectId);
|
|
26448
|
+
const root = (fresh || update) && filesIn(here).length && !opts.here && !sameSite ? freeFolder(here, choices.slug ?? sample?.key ?? "site") : here;
|
|
26193
26449
|
const done = [];
|
|
26194
26450
|
const empty = !filesIn(root).length;
|
|
26195
26451
|
const starter = (kind === "new" || kind === "guest") && !sample && empty;
|
|
26196
26452
|
const signedIn = Boolean(choices.projectId && tokenIfOwnApi(ctxNow));
|
|
26197
|
-
const
|
|
26453
|
+
const pullNow = update && empty && signedIn;
|
|
26454
|
+
const steps = startSteps(kind, { emptyFolder: kind === "update" && empty && !pullNow, starter, managed: Boolean(choices.migration?.requestId), signedIn, addons: Boolean(choices.runAddons) });
|
|
26198
26455
|
updateProject(root, { lang: langOf(choices.ownerLanguage) });
|
|
26199
26456
|
const t = messages(root);
|
|
26200
26457
|
if (sample && !sameSite) {
|
|
@@ -26235,15 +26492,17 @@ ${choices.brief}
|
|
|
26235
26492
|
updateProject(root, { stack: choices.stack });
|
|
26236
26493
|
done.push(t("startStack", { stack: stackSummary(choices.stack) }));
|
|
26237
26494
|
}
|
|
26238
|
-
|
|
26495
|
+
const init = runInit(root);
|
|
26496
|
+
if (init.created.includes("DEPLOYAI.md") || init.rulesAdded) done.push(t("startRules"));
|
|
26239
26497
|
if (choices.projectId) {
|
|
26240
26498
|
const before = readProject(root);
|
|
26241
26499
|
writeProject(root, { ...before ?? {}, projectId: choices.projectId, name: choices.name ?? void 0, slug: choices.slug ?? void 0, createdAt: before?.createdAt ?? (/* @__PURE__ */ new Date()).toISOString() });
|
|
26242
26500
|
done.push(t(before?.projectId && before.projectId !== choices.projectId ? "startRelinked" : "startLinked", { name: choices.name ?? "" }));
|
|
26243
26501
|
}
|
|
26502
|
+
if (pullNow) await pullCommand(root, ctxNow);
|
|
26244
26503
|
out(t("startTitle"));
|
|
26245
26504
|
out();
|
|
26246
|
-
if (root !== here) out(t("startNewFolder", { dir: relative3(here, root) }));
|
|
26505
|
+
if (root !== here) out(t(update ? "startUpdateFolder" : "startNewFolder", { dir: relative3(here, root) }));
|
|
26247
26506
|
for (const line of done) out(`- ${line}`);
|
|
26248
26507
|
out();
|
|
26249
26508
|
out("----- Instructions for the agent -----");
|
|
@@ -26266,6 +26525,8 @@ ${choices.brief}
|
|
|
26266
26525
|
steps.forEach((s, i) => out(`${i + 1}. ${s.cmd ? `Run ${s.cmd}. ` : ""}${s.say}`));
|
|
26267
26526
|
out();
|
|
26268
26527
|
out(runCommandsRule(langOf(choices.ownerLanguage)));
|
|
26528
|
+
out(ASK_OWNER_RULE);
|
|
26529
|
+
out(OWNER_TEXT_RULE);
|
|
26269
26530
|
out(START_FAIL_LINE);
|
|
26270
26531
|
}
|
|
26271
26532
|
|
|
@@ -26288,7 +26549,7 @@ async function addonsCommand(root, ctx) {
|
|
|
26288
26549
|
}
|
|
26289
26550
|
const owned = r.addons.filter((a) => a.owned);
|
|
26290
26551
|
out(owned.length ? "Add-ons of this site" : "This site has no add-ons yet.");
|
|
26291
|
-
owned.forEach((a, i) => out(` ${String(i + 1).padStart(2)}. ${a.key.padEnd(17)} ${STATUS_WORDS[a.status] ?? a.status}`));
|
|
26552
|
+
owned.forEach((a, i) => out(` ${String(i + 1).padStart(2)}. ${a.key.padEnd(17)} ${a.outdated ? "out of date: the site changed after it ran" : STATUS_WORDS[a.status] ?? a.status}`));
|
|
26292
26553
|
const forSale = r.addons.filter((a) => !a.owned && a.buyUrl);
|
|
26293
26554
|
if (forSale.length) {
|
|
26294
26555
|
out();
|
|
@@ -26301,10 +26562,11 @@ async function addonsCommand(root, ctx) {
|
|
|
26301
26562
|
out("Every add-on of this site is done or skipped. To run one again: npx deployai@latest addon run <name>");
|
|
26302
26563
|
return;
|
|
26303
26564
|
}
|
|
26304
|
-
out(`Next: ${r.next}.
|
|
26565
|
+
out(`Next: ${r.next}. To run what is waiting: npx deployai@latest addons run (or one: npx deployai@latest addon run <name>)`);
|
|
26305
26566
|
}
|
|
26306
|
-
async function addonsRunCommand(root, ctx) {
|
|
26567
|
+
async function addonsRunCommand(root, ctx, opts = {}) {
|
|
26307
26568
|
requireToken(ctx);
|
|
26569
|
+
if (opts.all && opts.oneByOne) throw new CliError("Choose one: --one-by-one or --all.", 1, "usage");
|
|
26308
26570
|
const projectId = linkedProjectId2(root);
|
|
26309
26571
|
const r = await apiRequest(ctx, `/api/cli/addons?projectId=${encodeURIComponent(projectId)}`, AddonsResponse);
|
|
26310
26572
|
if (!r.open) {
|
|
@@ -26317,10 +26579,27 @@ async function addonsRunCommand(root, ctx) {
|
|
|
26317
26579
|
out(r.addons.some((a) => a.owned) ? "Every add-on of this site is done or skipped. To run one again: npx deployai@latest addon run <name>" : "This site has no add-ons yet. See them: npx deployai@latest addons");
|
|
26318
26580
|
return;
|
|
26319
26581
|
}
|
|
26320
|
-
|
|
26321
|
-
|
|
26322
|
-
|
|
26323
|
-
|
|
26582
|
+
const all = opts.all === true || !opts.oneByOne && readProject(root)?.addonsAll === true;
|
|
26583
|
+
if (!all && !opts.oneByOne && todo.length > 1) {
|
|
26584
|
+
out(`This site has ${todo.length} add-ons waiting: ${todo.map((a) => a.key).join(", ")}.`);
|
|
26585
|
+
out('Ask the owner: "Run the add-ons one by one, or all at once?"');
|
|
26586
|
+
out("- One by one (recommended): after each add-on, choose whether to publish.");
|
|
26587
|
+
out(" Run: npx deployai@latest addons run --one-by-one");
|
|
26588
|
+
out("- All at once: they all finish first, then one publish at the end.");
|
|
26589
|
+
out(" Run: npx deployai@latest addons run --all");
|
|
26590
|
+
out("If the owner has no preference, use one by one.");
|
|
26591
|
+
return;
|
|
26592
|
+
}
|
|
26593
|
+
updateProject(root, { addonsAll: all });
|
|
26594
|
+
if (all) {
|
|
26595
|
+
out(`Running every add-on of this site in one go: ${todo.map((a) => a.key).join(", ")}.`);
|
|
26596
|
+
out('Do each one fully, build the site, run npx deployai@latest check after it, and report it with addon done as it says; the next one starts right after, without asking. Do not deploy between add-ons: tell the owner once, "I will publish once, after all the add-ons are done." The owner still approves each plan before you change any file. Tell the owner in one line which add-on you are on.');
|
|
26597
|
+
out();
|
|
26598
|
+
} else if (todo.length > 1) {
|
|
26599
|
+
out(`Running the add-ons of this site one by one: ${todo.map((a) => a.key).join(", ")}.`);
|
|
26600
|
+
out("The owner approves each plan before you change any file, and after each add-on chooses whether to publish and whether to go on.");
|
|
26601
|
+
out();
|
|
26602
|
+
}
|
|
26324
26603
|
await addonNextCommand(root, ctx);
|
|
26325
26604
|
}
|
|
26326
26605
|
async function addonBuyCommand(root, ctx, key) {
|
|
@@ -26382,11 +26661,12 @@ async function addonDoneCommand(root, ctx, runId, opts) {
|
|
|
26382
26661
|
const r = await apiRequest(ctx, `/api/cli/addons/runs/${encodeURIComponent(runId.trim())}`, AddonDoneResponse, { method: "POST", body: body.data });
|
|
26383
26662
|
out(`Saved: add-on ${body.data.status}.`);
|
|
26384
26663
|
const all = readProject(root)?.addonsAll === true;
|
|
26385
|
-
if (r.next && all) out(`Next: ${r.next}. Run npx deployai@latest check, then at once: npx deployai@latest addon next`);
|
|
26664
|
+
if (r.next && all) out(`Next: ${r.next}. Do not deploy yet: everything goes up in one deploy after the last add-on. Run npx deployai@latest check, then at once: npx deployai@latest addon next`);
|
|
26386
26665
|
else if (r.next) out(`Next: ${r.next}. Tell the site owner what is next, and only with their OK run: npx deployai@latest addon next`);
|
|
26387
26666
|
else {
|
|
26388
26667
|
if (all) updateProject(root, { addonsAll: false });
|
|
26389
26668
|
out("Every add-on of this site is done or skipped.");
|
|
26669
|
+
if (all) out('Now the one publish. Run npx deployai@latest check, then ask the owner once, naming the site and its address: "Put it live, see a preview first, or not yet?" If a check waits for a preview, offer only a preview or not yet. Then run once: npx deployai@latest deploy -m "<the add-ons, in a few words>", with --live only if they chose to put it live. Run the checks that waited on that preview and fix what they find; deploy again only if a fix was needed.');
|
|
26390
26670
|
}
|
|
26391
26671
|
}
|
|
26392
26672
|
|
|
@@ -27160,15 +27440,15 @@ ${AGENT_FEEDBACK_RULES.join("\n\n")}
|
|
|
27160
27440
|
migrate.command("media").description("download the images and files the old site uses, at their old paths; run again to go on").action((_opts, cmd) => migrateMediaCommand(root(cmd)));
|
|
27161
27441
|
migrate.command("redirects").description("write public/_redirects for the old addresses that cannot stay (feeds, attachment pages)").action((_opts, cmd) => migrateRedirectsCommand(root(cmd)));
|
|
27162
27442
|
migrate.command("verify").description("open every old address on the preview: lists pages that moved, are missing or lost their title or description").argument("<preview>", "the preview address deploy printed").action(async (preview, _opts, cmd) => migrateVerifyCommand(root(cmd), preview));
|
|
27163
|
-
migrate.command("status").description("a managed move: report a stage to the request (scanning, building, preview_ready, customer_review, live, blocked)").argument("<stage>", "the stage").argument("[note]", "one line: the preview address, what is done, or why it is blocked").action((stage, note, _opts, cmd) => migrateStatusCommand(root(cmd), ctx(cmd), stage, note));
|
|
27443
|
+
migrate.command("status").description("a managed move: report a stage to the request (scanning, building, first_look, preview_ready, customer_review, live, blocked)").argument("<stage>", "the stage").argument("[note]", "one line: the preview address, what is done, or why it is blocked").action((stage, note, _opts, cmd) => migrateStatusCommand(root(cmd), ctx(cmd), stage, note));
|
|
27164
27444
|
program.command("blocks").description("list our building blocks, or add one to this site (inbox, blog); never writes over a file").argument("[name]", "inbox or blog").action((name, _opts, cmd) => blocksCommand(root(cmd), ctx(cmd), name));
|
|
27165
27445
|
const brand = program.command("brand").description("the site's icons and share image, made by code from the site's own name, colors and logo");
|
|
27166
27446
|
brand.command("favicon").description("gives the site an icon if it has none: the old site's, else its logo, else a letter").option("--from <file>", "the logo or picture to use").option("--name <name>", "the site's name, for the letter").option("--color <#rrggbb>", "the background color").option("--force", "replace the icon the site has").option("--check", "only say whether the site has an icon").action((opts, cmd) => brandFaviconCommand(root(cmd), opts));
|
|
27167
27447
|
brand.command("icons").description("makes every icon size and the 1200 by 630 share image from the site itself").option("--from <file>", "use this picture instead of the logo it finds").option("--name <name>", "correct the name it reads").option("--line <text>", "correct the line it reads").option("--color <#rrggbb>", "correct the color it reads").option("--check", "only list what is missing").action((opts, cmd) => brandIconsCommand(root(cmd), opts));
|
|
27168
27448
|
brand.command("images").description("reports images too weak for where they show, by measuring them; never changes one").argument("[pages...]", "up to 10 page addresses to measure in a browser").option("--json", "print the result as JSON").action((pages, opts, cmd) => brandImagesCommand(root(cmd), pages, opts));
|
|
27169
|
-
program.command("addons").description("the add-ons of this site: which it has, which are done and which is next; addons run
|
|
27449
|
+
program.command("addons").description("the add-ons of this site: which it has, which are done and which is next; addons run asks how to run what is waiting").argument("[action]", "run: the add-ons that are not done, one by one or all at once").option("--one-by-one", "after each add-on, the owner chooses whether to publish (recommended)").option("--all", "finish every add-on first, then one publish at the end").action((action, opts, cmd) => {
|
|
27170
27450
|
if (!action) return addonsCommand(root(cmd), ctx(cmd));
|
|
27171
|
-
if (action === "run") return addonsRunCommand(root(cmd), ctx(cmd));
|
|
27451
|
+
if (action === "run") return addonsRunCommand(root(cmd), ctx(cmd), opts);
|
|
27172
27452
|
throw new CliError(`Unknown: addons ${action}. Use npx deployai@latest addons, or npx deployai@latest addons run`, 1, "usage");
|
|
27173
27453
|
});
|
|
27174
27454
|
const addon = program.command("addon").description("run the add-ons of this site, one at a time");
|