deployai 0.1.0-beta.36 → 0.1.0-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +18 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21272,7 +21272,9 @@ var DeployResponse = external_exports.object({
|
|
|
21272
21272
|
queuePosition: external_exports.number(),
|
|
21273
21273
|
previewUrl: external_exports.string(),
|
|
21274
21274
|
/** Only for a heavy home page (D-420): the files it loads from the site and whether it prefetches links. */
|
|
21275
|
-
page: external_exports.object({ files: external_exports.number(), prefetches: external_exports.boolean() }).optional()
|
|
21275
|
+
page: external_exports.object({ files: external_exports.number(), prefetches: external_exports.boolean() }).optional(),
|
|
21276
|
+
/** The site goes live by itself once built (D-916), the owner's setting. Missing on older servers. */
|
|
21277
|
+
autoLive: external_exports.boolean().optional()
|
|
21276
21278
|
});
|
|
21277
21279
|
var VersionStatus = external_exports.enum(["queued", "building", "ready", "failed", "replaced"]);
|
|
21278
21280
|
var MigrationStatus = external_exports.enum(["waiting", "queued", "running", "done", "failed"]);
|
|
@@ -22651,8 +22653,8 @@ var ASK_SOUND_STEP = { say: 'With your first question to the owner, and only onc
|
|
|
22651
22653
|
var CHECK = { cmd: "npx deployai@latest check", say: "Fix every blocker it lists, then run it again until it shows none." };
|
|
22652
22654
|
var FIRST_LOOK_MESSAGE = "first look";
|
|
22653
22655
|
var FIRST_SITE_RULE = 'A site that has never been live (this folder is not linked yet, or npx deployai@latest status shows no live version) follows this, and not the rule for later changes. Right at the start, before you build, ask once, naming the site and its address when you know it: "When your site is ready, should I put it live for you? Anyone will be able to see it." The answers: Yes, put it live (recommended), or Show me first. Then go on working, and do not ask it again for this first version. Deploy twice. First, the first look: when a first version works, deploy without --live and send the owner the preview address. Make every change they ask for in the folder, without deploying. Second, when everything they asked for is done: on Yes, deploy with --live and give them the live address, with no more questions. On Show me first, deploy without it, send the preview address and ask: "Put it live, or change something first?" If nothing changed since the first look, there is nothing to build: run promote on that version instead of a second deploy. Deploy again only when a deploy failed, or the owner asks for more after the last one, and then put all of it in one deploy. Database changes still get their own yes.';
|
|
22654
|
-
var DEPLOY_ASK_RULE = 'Once a site has been live, 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.';
|
|
22655
|
-
var LOCAL_PREVIEW_RULE = "While you build, show the site on this computer, never a deploy after each change. Start the site's own dev command (the dev script in package.json, for example npm run dev) yourself, in the background, so it keeps running while you work: in Claude Code as a background command, in another tool with its own way to run a command in the background or in a terminal of its own. Never ask the owner to open a terminal or type a command. If a local preview of this folder is already running, use it instead of starting a second one. Send the owner the local address it prints once, as a link, and say in one line that it updates by itself while you work and opens only on this computer. Check every change there yourself. The local preview is not the hosting: it has a local test database that starts empty, and the built-in email to the owner, visitor countries, 301 redirects and the DeployAI badge work only on a deployed preview, so test those there, and the owner checks a phone there. When to deploy does not change. When the work is done, stop the local preview you started.";
|
|
22656
|
+
var DEPLOY_ASK_RULE = 'Once a site has been live, 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. When deploy says the site goes live by itself, that is a setting the owner chose: do not ask about going live or a preview, deploy once the request is done, and tell the owner it is live and that Settings on the site page can make versions wait. Database changes still get their own yes.';
|
|
22657
|
+
var LOCAL_PREVIEW_RULE = "While you build, show the site on this computer, never a deploy after each change. Start the site's own dev command (the dev script in package.json, for example npm run dev) yourself, in the background, so it keeps running while you work: in Claude Code as a background command, in another tool with its own way to run a command in the background or in a terminal of its own. Never ask the owner to open a terminal or type a command. If a local preview of this folder is already running, use it instead of starting a second one. Send the owner the local address it prints once, as a link, and say in one line that it updates by itself while you work and opens only on this computer. Check every change there yourself. To see a page at phone width, run npx deployai@latest shot <address> and look at the phone picture it saves: resizing a browser window often keeps the page at desktop width, so never judge the phone layout from the code alone (D-916). The local preview is not the hosting: it has a local test database that starts empty, and the built-in email to the owner, visitor countries, 301 redirects and the DeployAI badge work only on a deployed preview, so test those there, and the owner checks a phone there. When to deploy does not change. When the work is done, stop the local preview you started.";
|
|
22656
22658
|
var GIT_HISTORY_RULE = "Keep the site's history with git in this folder: run git init if there is none, commit before you start and after each part that works, with a short message in the owner's language about what they see changed. Never commit .env files or secrets. When the owner asks to undo a change, or to bring back or remove a feature, do it from the git history yourself and tell them in one line what changed; never ask them to run git. Git brings back code, not data: rows, files and tables that were deleted stay deleted, so ask the owner before a change that removes data.";
|
|
22657
22659
|
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, request_user_input in Codex, or ask_user_question in Grok Build. 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. This holds for every question, also one you think of yourself in the middle of the work: say what you have to say, then ask through the feature, never as the last line of your message. 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. How the owner wants you to work is saved in .deployai/owner-mode (D-865): on-my-own or check-with-me. If the file is missing, ask once, "How should I work?", with "On my own (recommended)": I build and choose the recommended option at every step, I stop only for money, deleting your content or your real domain, and I leave you a short list at the end; and "Check with me". Save the answer there, and change it when the owner says so. On my own: take the recommended option without asking, install the tools you need, and stop only for money, deleting the owner's content, a real domain going live or a fact you would have to invent, which you leave out and list. Every question opens with a short tag naming who asks, like "Search add-on \xB7 1 of 2" or "Move \xB7 forms", and a question with several items offers "Approve all (recommended)" first. Never ask the owner about a package, library, framework, tool, file path or size: ask about the outcome in plain words.`;
|
|
22658
22660
|
var QUESTION_FEATURE = { claudeCode: "AskUserQuestion", cursor: "AskQuestion", copilot: "askQuestions", codex: "request_user_input", grok: "ask_user_question" };
|
|
@@ -22670,7 +22672,7 @@ var DEPLOY_SAY = "Add --live only if the owner chose to put it live right away.
|
|
|
22670
22672
|
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. Besides the question about going live, 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. The steps below show it to the owner as the first look: offer to add those details then. Run check only after you built it." };
|
|
22671
22673
|
var OFFER_DASHBOARD = { cmd: "npx deployai@latest addon run dashboard", say: "Only after the site is live, and only if the owner says yes: in one sentence, offer the site's own free dashboard, to read form messages, hide and edit pages and manage a blog or a shop without an agent." };
|
|
22672
22674
|
var ADDONS_RUN = { cmd: "npx deployai@latest addons run", say: "With more than one add-on picked, it prints what you know about each and asks you to suggest the order for this site. Tell the owner your order and why, ask how to run them, run the command for their answer, work through each step it prints, and report each add-on as it says." };
|
|
22673
|
-
var TAGS_SEEN = { cmd: "npx deployai@latest migrate tags --requests <file>", say: "While you look at the old site, save the outside addresses your browser asks for to a file, one a line, and run this: Tag Manager loads tags that are not in the page. Never send a form on the old site." };
|
|
22675
|
+
var TAGS_SEEN = { cmd: "npx deployai@latest migrate tags --requests <file>", say: "While you look at the old site, save the outside addresses your browser asks for to a file, one a line, and run this: Tag Manager loads tags that are not in the page. Never send a form on the old site. If the old site shows a security check (Cloudflare, a captcha) or blocks a command but opens in a browser (D-916): open it in your browser tool, tell the owner in one line that a check may show in that window and to pass it there, wait up to three minutes, and read the pages in that browser. Offer this first, as the recommended answer, when you ask the owner; turning the check off for the move or sending an export are the other answers." };
|
|
22674
22676
|
var PLAN_SHOW = "Then show the owner the plan as one chat message, never as the file, a table or one long paragraph, since a long table breaks in a terminal: Moves as it is, with a count and at most three names. Changes, one short line for each Replaced with row. Needs you, one short line for each Needs me or Not possible row. End with the link it printed, for the full list. Do not use a plan mode: it changes the owner's setting.";
|
|
22675
22677
|
var REPORT_SAY = "Once .deployai/migration/plan.md is written, with its features as one table (| Feature | Status | Note |) and a row for each tag and connection in tags.json: this adds it to the owner's move report and prints the link.";
|
|
22676
22678
|
var MOVE_REPORT = { cmd: "npx deployai@latest migrate report", say: `${REPORT_SAY} ${PLAN_SHOW} Then ask: "Go ahead with this plan?" The answers: Go ahead and put it live when it is ready (recommended), Go ahead and show me first, or Change something. Say that the old site and its domain do not change either way.` };
|
|
@@ -24511,6 +24513,8 @@ var M = {
|
|
|
24511
24513
|
pasteFix: " Paste the prompt below into your AI editor, then run: npx deployai@latest check",
|
|
24512
24514
|
copied: " (copied to clipboard)",
|
|
24513
24515
|
runDeploy: ' Run: npx deployai@latest deploy -m "<message>"',
|
|
24516
|
+
movedSlug: "The address of the site follows the old domain: {url}",
|
|
24517
|
+
autoLiveOn: "This site goes live by itself once built, as the owner set in Settings on the site page. Waiting for it to be live.",
|
|
24514
24518
|
moveOfferGranted: "Moved from /move: the site got {n} add-ons free. They wait until the move is done, and the last step offers them.",
|
|
24515
24519
|
moveOfferCap: "The free add-ons for moved sites were already used on 3 sites of this account.",
|
|
24516
24520
|
moveOfferOver: "The free add-ons offer for moved sites is over.",
|
|
@@ -24784,6 +24788,8 @@ var M = {
|
|
|
24784
24788
|
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",
|
|
24785
24789
|
copied: " (\u05D4\u05D5\u05E2\u05EA\u05E7)",
|
|
24786
24790
|
runDeploy: ' \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest deploy -m "<message>"',
|
|
24791
|
+
movedSlug: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D4\u05D0\u05EA\u05E8 \u05DC\u05E4\u05D9 \u05D4\u05D3\u05D5\u05DE\u05D9\u05D9\u05DF \u05D4\u05D9\u05E9\u05DF: {url}",
|
|
24792
|
+
autoLiveOn: "\u05D4\u05D0\u05EA\u05E8 \u05D4\u05D6\u05D4 \u05E2\u05D5\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05DC\u05D1\u05D3 \u05DB\u05E9\u05D4\u05D2\u05E8\u05E1\u05D4 \u05E0\u05D1\u05E0\u05D9\u05EA (\u05D4\u05D2\u05D3\u05E8\u05D4 \u05E9\u05DC \u05D4\u05D1\u05E2\u05DC\u05D9\u05DD, \u05D1\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05D4\u05D0\u05EA\u05E8). \u05DE\u05D7\u05DB\u05D9\u05DD \u05E9\u05D9\u05E2\u05DC\u05D4.",
|
|
24787
24793
|
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.",
|
|
24788
24794
|
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.",
|
|
24789
24795
|
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.",
|
|
@@ -25041,7 +25047,7 @@ function messages(root) {
|
|
|
25041
25047
|
}
|
|
25042
25048
|
|
|
25043
25049
|
// src/version.ts
|
|
25044
|
-
var CLI_VERSION = "0.1.0-beta.
|
|
25050
|
+
var CLI_VERSION = "0.1.0-beta.37";
|
|
25045
25051
|
|
|
25046
25052
|
// src/api.ts
|
|
25047
25053
|
function apiContext(apiFlag, root) {
|
|
@@ -27312,7 +27318,7 @@ async function migrateScanCommand(root, raw, opts = {}) {
|
|
|
27312
27318
|
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");
|
|
27313
27319
|
const home = await get(source);
|
|
27314
27320
|
if (!home) throw new CliError(`Could not reach ${source}. Check the address, or that the site is up.`, 1, "network");
|
|
27315
|
-
if (home.status === 401 || home.status === 403) throw new CliError(`${source} answers ${home.status}: it is behind a login or
|
|
27321
|
+
if (home.status === 401 || home.status === 403) throw new CliError(`${source} answers ${home.status}: it is behind a login or a security check. If it opens in a browser, open it in your browser tool, ask the owner to pass any check in that window, and read the pages there (recommended). Else ask the owner to pause the check while it moves, or work from their export.`, 1, "blocked");
|
|
27316
27322
|
const origin = new URL(home.url).origin;
|
|
27317
27323
|
const base = (origin + new URL(home.url).pathname).replace(/\/+$/, "");
|
|
27318
27324
|
const html = await home.text();
|
|
@@ -27788,6 +27794,10 @@ async function moveOffer(root, p, ctx) {
|
|
|
27788
27794
|
const t = messages(root);
|
|
27789
27795
|
try {
|
|
27790
27796
|
const r = await apiRequest(ctx, "/api/cli/migrations/grant", null, { method: "POST", body: { projectId: p.id, startId } });
|
|
27797
|
+
if (typeof r.slug === "string" && /^[a-z0-9-]{2,40}$/.test(r.slug)) {
|
|
27798
|
+
updateProject(root, { slug: r.slug });
|
|
27799
|
+
out(t("movedSlug", { url: r.url ?? r.slug }));
|
|
27800
|
+
}
|
|
27791
27801
|
if (r.granted?.length) out(t("moveOfferGranted", { n: r.granted.length }));
|
|
27792
27802
|
else if (r.reason && r.reason !== "start_used") out(t(r.reason === "cap" ? "moveOfferCap" : "moveOfferOver"));
|
|
27793
27803
|
} catch {
|
|
@@ -28793,7 +28803,8 @@ async function deployVersion(root, ctx, opts, guest) {
|
|
|
28793
28803
|
out(t("thenPromote", { n: res.number }));
|
|
28794
28804
|
return;
|
|
28795
28805
|
}
|
|
28796
|
-
|
|
28806
|
+
if (res.autoLive && !live) out(t("autoLiveOn"));
|
|
28807
|
+
await afterBuild(root, ctx, project.projectId, res.number, { live: live || Boolean(res.autoLive), pollMs: opts.pollMs ?? 3e3, homeRetryMs: opts.pollMs });
|
|
28797
28808
|
}
|
|
28798
28809
|
var CREDIT_WAIT_MS = 1e4;
|
|
28799
28810
|
var sleep3 = (ms2) => new Promise((r) => setTimeout(r, ms2));
|