deployai 0.1.0-beta.46 → 0.1.0-beta.48
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 +180 -125
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var __export = (target, all) => {
|
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
9
9
|
import { existsSync as existsSync22 } from "fs";
|
|
10
|
-
import { join as join25, resolve as
|
|
10
|
+
import { join as join25, resolve as resolve10 } from "path";
|
|
11
11
|
import { Command, CommanderError } from "commander";
|
|
12
12
|
|
|
13
13
|
// ../shared/src/plans.ts
|
|
@@ -6516,7 +6516,7 @@ var recursive = /* @__PURE__ */ new WeakMap();
|
|
|
6516
6516
|
var NONE = 0;
|
|
6517
6517
|
var ASSUMED = 1;
|
|
6518
6518
|
var PROVEN = 2;
|
|
6519
|
-
function isRecursive(inst, stack,
|
|
6519
|
+
function isRecursive(inst, stack, resolve11) {
|
|
6520
6520
|
const cached2 = recursive.get(inst);
|
|
6521
6521
|
if (cached2 !== void 0)
|
|
6522
6522
|
return cached2 ? PROVEN : NONE;
|
|
@@ -6526,7 +6526,7 @@ function isRecursive(inst, stack, resolve10) {
|
|
|
6526
6526
|
let result = NONE;
|
|
6527
6527
|
const check2 = (child) => {
|
|
6528
6528
|
if (result !== PROVEN && child?._zod) {
|
|
6529
|
-
const answer = isRecursive(child, stack,
|
|
6529
|
+
const answer = isRecursive(child, stack, resolve11);
|
|
6530
6530
|
if (answer > result)
|
|
6531
6531
|
result = answer;
|
|
6532
6532
|
}
|
|
@@ -6537,7 +6537,7 @@ function isRecursive(inst, stack, resolve10) {
|
|
|
6537
6537
|
const desc = Object.getOwnPropertyDescriptor(sh, key2);
|
|
6538
6538
|
if (spread && !desc.enumerable)
|
|
6539
6539
|
continue;
|
|
6540
|
-
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack,
|
|
6540
|
+
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve11) : NONE;
|
|
6541
6541
|
if (child > answer)
|
|
6542
6542
|
answer = child;
|
|
6543
6543
|
}
|
|
@@ -6601,7 +6601,7 @@ function isRecursive(inst, stack, resolve10) {
|
|
|
6601
6601
|
break;
|
|
6602
6602
|
// `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly
|
|
6603
6603
|
case "lazy": {
|
|
6604
|
-
const inner = def._cachedInner ?? (
|
|
6604
|
+
const inner = def._cachedInner ?? (resolve11 ? inst._zod.innerType : void 0);
|
|
6605
6605
|
merge2(inner ? isRecursive(inner, stack, false) : ASSUMED);
|
|
6606
6606
|
break;
|
|
6607
6607
|
}
|
|
@@ -21199,12 +21199,12 @@ function findSecretLine(text2, re) {
|
|
|
21199
21199
|
return null;
|
|
21200
21200
|
}
|
|
21201
21201
|
var PRIVATE_DIRS = /* @__PURE__ */ new Set([".deployai", ".claude", ".cursor", ".vscode", ".idea", ".git", ".github", ".husky"]);
|
|
21202
|
-
var PRIVATE_FILES = /* @__PURE__ */ new Set(["
|
|
21202
|
+
var PRIVATE_FILES = /* @__PURE__ */ new Set(["deployai.md", "claude.md", "agents.md", ".cursorrules", ".windsurfrules"]);
|
|
21203
21203
|
var SERVED_DOT_DIR = ".well-known";
|
|
21204
21204
|
var BUILD_DOTFILES = /* @__PURE__ */ new Set([".babelrc", ".babelrc.json", ".browserslistrc", ".postcssrc", ".postcssrc.json", ".postcssrc.js", ".postcssrc.cjs", ".postcssrc.mjs", ".swcrc", ".nvmrc", ".node-version", ".assetsignore"]);
|
|
21205
21205
|
var segments = (path) => path.replace(/^\/+/, "").split("/").filter(Boolean);
|
|
21206
21206
|
function privateProjectFile(path) {
|
|
21207
|
-
const parts2 = segments(path);
|
|
21207
|
+
const parts2 = segments(path).map((p) => p.toLowerCase());
|
|
21208
21208
|
const base = parts2[parts2.length - 1] ?? "";
|
|
21209
21209
|
return PRIVATE_FILES.has(base) || parts2.slice(0, -1).some((p) => PRIVATE_DIRS.has(p)) || PRIVATE_DIRS.has(base);
|
|
21210
21210
|
}
|
|
@@ -21324,6 +21324,10 @@ var AgentFeedback = external_exports.object({
|
|
|
21324
21324
|
tried: external_exports.string().trim().max(FEEDBACK_TEXT_MAX).nullable(),
|
|
21325
21325
|
suggest: external_exports.string().trim().max(FEEDBACK_TEXT_MAX).nullable()
|
|
21326
21326
|
});
|
|
21327
|
+
var UPLOAD_PART_BYTES = 4 * 1024 * 1024;
|
|
21328
|
+
var MAX_DEPLOY_BYTES = 50 * 1024 * 1024;
|
|
21329
|
+
var MAX_UPLOAD_PARTS = Math.ceil(MAX_DEPLOY_BYTES / UPLOAD_PART_BYTES);
|
|
21330
|
+
var UploadPartResponse = external_exports.object({ ok: external_exports.literal(true) });
|
|
21327
21331
|
var DeployResponse = external_exports.object({
|
|
21328
21332
|
versionId: external_exports.string(),
|
|
21329
21333
|
number: external_exports.number(),
|
|
@@ -21619,7 +21623,7 @@ var ARCH_NODES = [
|
|
|
21619
21623
|
{ 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"] },
|
|
21620
21624
|
{ 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." },
|
|
21621
21625
|
// Platform
|
|
21622
|
-
{ 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"] },
|
|
21626
|
+
{ 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", "POSTHOG_PROJECT_KEY"], 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"] },
|
|
21623
21627
|
{ id: "queue", kind: "db", zone: "platform", label: "pg-boss queue", summary: "\u05DB\u05DC \u05DE\u05D4 \u05E9\u05D0\u05D9\u05D8\u05D9 \u05D0\u05D5 \u05E0\u05D5\u05D2\u05E2 \u05D1\u05BECloudflare \u05E8\u05E5 \u05DB\u05E2\u05D1\u05D5\u05D3\u05D4 \u05D1\u05EA\u05D5\u05E8.", summaryEn: "Everything slow or that touches Cloudflare runs as a job in the queue.", code: ["apps/web/src/server/queue.ts"], portability: "Job queue", decisions: ["D-058"] },
|
|
21624
21628
|
{ id: "worker", kind: "app", zone: "platform", label: "Job worker", summary: "\u05EA\u05D4\u05DC\u05D9\u05DA \u05E0\u05E4\u05E8\u05D3 \u05E9\u05DE\u05E8\u05D9\u05E5 \u05D0\u05EA \u05D4\u05E2\u05D1\u05D5\u05D3\u05D5\u05EA \u05DE\u05D4\u05EA\u05D5\u05E8: \u05D1\u05E0\u05D9\u05D9\u05D4, \u05D4\u05E2\u05DC\u05D0\u05D4, \u05E0\u05D9\u05EA\u05D5\u05D1, \u05D1\u05D9\u05E7\u05D5\u05E8\u05D9\u05DD, \u05E2\u05DC\u05D5\u05D9\u05D5\u05EA \u05D5\u05DE\u05D9\u05D9\u05DC\u05D9\u05DD \u05DC\u05DE\u05E9\u05E4\u05DA (pnpm worker, \u05D0\u05D5 pnpm worker:public \u05DE\u05D0\u05D7\u05D5\u05E8\u05D9 \u05D4\u05BEtunnel).", summaryEn: "A separate process that runs the queued jobs: build, upload, routing, visits, costs and lifecycle emails (pnpm worker, or pnpm worker:public behind the tunnel).", code: ["apps/web/src/server/worker.ts", "apps/web/src/server/jobs.ts", "apps/web/src/server/site-data.ts", "apps/web/src/server/lifecycle", "apps/web/src/server/host-report.ts"], env: ["BUILD_SLOTS", "LIFECYCLE_NOW", "A11Y_RENDER", "DOCKER_HOST", "HOST_REPORT_PATH", "APP_SHOTS_SITES"], decisions: ["D-058", "D-148", "D-180", "D-340"] },
|
|
21625
21629
|
{ id: "build", kind: "app", zone: "platform", label: "Build service (Docker)", summary: "\u05E7\u05D5\u05E0\u05D8\u05D9\u05D9\u05E0\u05E8 \u05D7\u05D3\u05E9 \u05DC\u05DB\u05DC \u05E9\u05DC\u05D1, \u05D1\u05DC\u05D9 \u05E1\u05D5\u05D3\u05D5\u05EA. \u05D1\u05D5\u05E0\u05D4 \u05D0\u05EA \u05D4\u05E7\u05D5\u05D3 \u05E9\u05DC \u05D4\u05DC\u05E7\u05D5\u05D7 \u05DC\u05E7\u05D5\u05D1\u05E5 Worker.", summaryEn: "A fresh container for every step, with no secrets. Builds the customer's code into a Worker file.", code: ["apps/web/src/server/build.ts"], env: ["BUILD_MODE"] },
|
|
@@ -23670,7 +23674,7 @@ var ENV_KEYS = {
|
|
|
23670
23674
|
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)." },
|
|
23671
23675
|
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." },
|
|
23672
23676
|
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." },
|
|
23673
|
-
BUILD_MODE: { scope: "own", section: "builds", sample: { server: "docker" }, about: "docker = a fresh container per build.
|
|
23677
|
+
BUILD_MODE: { scope: "own", section: "builds", sample: { server: "docker" }, about: "docker = a fresh container per build. Production only: empty on this computer, so only static sites build and Docker Desktop can stay closed. Set docker here only to test builds or run cli:e2e (D-1009)." },
|
|
23674
23678
|
BUILD_SLOTS: { scope: "own", section: "builds", about: "Builds running at the same time in the queue worker. Default 2." },
|
|
23675
23679
|
DOCKER_HOST: { scope: "server", section: "builds", sample: { server: "unix:///run/user/<uid of deploy>/docker.sock" }, about: "Rootless Docker of the deploy user (D-340). Read by docker itself." },
|
|
23676
23680
|
STORAGE_DIR: { scope: "local", section: "builds", about: "Folder for files when a space stores them on disk (tests). Default apps/web/.deployai-uploads." },
|
|
@@ -23877,6 +23881,93 @@ function blockedLine(codes) {
|
|
|
23877
23881
|
return BLOCKED_REASONS.filter((c) => set2.has(c)).join(" ");
|
|
23878
23882
|
}
|
|
23879
23883
|
|
|
23884
|
+
// ../shared/src/ui-sources.ts
|
|
23885
|
+
var UI_SOURCES = [
|
|
23886
|
+
{ key: "shadcn", name: "shadcn/ui", url: "https://ui.shadcn.com", install: "npx shadcn@latest add <component>", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Forms, dialogs, menus, tabs, tables: the plain building blocks.", frameworks: "React (Astro with the React integration)", react: true, fits: ["business", "shop", "blog", "portfolio", "restaurant", "clinic"], licenseUrl: "https://github.com/shadcn-ui/ui/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
|
|
23887
|
+
{ key: "magicui", name: "Magic UI", url: "https://magicui.design", install: 'npx shadcn@latest add "https://magicui.design/r/<component>.json"', license: "MIT", terms: "Free components only (not Magic UI Pro); keep the license notice.", use: "Marketing sections: animated backgrounds, marquees, number tickers, bento grids.", frameworks: "React", react: true, fits: ["business", "portfolio", "restaurant"], licenseUrl: "https://github.com/magicuidesign/magicui/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
|
|
23888
|
+
{ key: "aceternity", name: "Aceternity UI", url: "https://ui.aceternity.com", install: 'npx shadcn@latest add "https://ui.aceternity.com/registry/<component>.json"', license: "Aceternity licence", terms: "Free components only (not Pro or templates). Allowed in the owner's own site; never publish the component source on its own or sell it as a template.", use: "Hero effects: spotlight, background beams, cards with motion, scroll effects.", frameworks: "React", react: true, fits: ["business", "portfolio"], licenseUrl: "https://ui.aceternity.com/licence", checkedOn: "2026-10-30" },
|
|
23889
|
+
{ key: "reactbits", name: "React Bits", url: "https://reactbits.dev", install: "Copy the component from its page (or its shadcn registry line on that page)", license: "MIT + Commons Clause", terms: "Allowed as part of a website; never sell the components themselves.", use: "Text animations, backgrounds, small interactive effects.", frameworks: "React", react: true, fits: ["portfolio", "business"], licenseUrl: "https://github.com/DavidHDev/react-bits/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
|
|
23890
|
+
{ key: "embla", name: "Embla Carousel", url: "https://www.embla-carousel.com", install: "npm install embla-carousel", license: "MIT", terms: "Free for any use.", use: "Sliders and carousels, with plain JavaScript in any framework.", frameworks: "Any (plain JS, React, Vue, Svelte)", react: false, fits: ["shop", "restaurant", "portfolio", "business"], licenseUrl: "https://github.com/davidjerleke/embla-carousel/blob/master/LICENSE", checkedOn: "2026-10-30" },
|
|
23891
|
+
{ key: "swiper", name: "Swiper", url: "https://swiperjs.com", install: "npm install swiper", license: "MIT", terms: "Free for any use.", use: "Galleries and touch sliders, like many WordPress themes use.", frameworks: "Any (plain JS, React, Vue)", react: false, fits: ["restaurant", "portfolio", "shop"], licenseUrl: "https://github.com/nolimits4web/swiper/blob/master/LICENSE", checkedOn: "2026-10-30" },
|
|
23892
|
+
{ key: "motion", name: "Motion", url: "https://motion.dev", install: "npm install motion", license: "MIT", terms: "The free library only (not Motion+).", use: "Animations on scroll and on enter, in plain JS or React.", frameworks: "Any (plain JS, React, Vue)", react: false, fits: ["business", "shop", "blog", "portfolio", "restaurant", "clinic"], licenseUrl: "https://github.com/motiondivision/motion/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
|
|
23893
|
+
// Plain HTML and Tailwind kits (D-562): no React, so they fit the Astro samples as they are. Licenses read 2026-11-01.
|
|
23894
|
+
{ key: "daisyui", name: "DaisyUI", url: "https://daisyui.com", install: 'npm i -D daisyui, then add @plugin "daisyui"; to the main CSS file (Tailwind 4)', license: "MIT", terms: "Free for any use; keep the license notice. Never the paid themes, templates or blocks from its store.", use: "Whole-site parts with themes: buttons, cards, navbars, forms, modals.", frameworks: "Any with Tailwind (plain HTML, Astro, React)", react: false, fits: ["business", "shop", "blog", "portfolio", "restaurant", "clinic"], licenseUrl: "https://github.com/saadeghi/daisyui/blob/master/LICENSE", checkedOn: "2026-11-01" },
|
|
23895
|
+
{ key: "hyperui", name: "HyperUI", url: "https://hyperui.dev", install: "Copy the HTML from the component page", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Marketing sections (hero, call to action, pricing, FAQ, footer) and shop blocks.", frameworks: "Any with Tailwind (plain HTML, Astro, React)", react: false, fits: ["business", "shop", "clinic", "restaurant"], licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", checkedOn: "2026-11-01" },
|
|
23896
|
+
{ key: "flowbite", name: "Flowbite", url: "https://flowbite.com", install: "npm install flowbite, add its theme and plugin lines to the main CSS file as its Tailwind 4 guide says, then copy the component HTML", license: "MIT", terms: "The open-source library only; keep the license notice. Never Flowbite Pro blocks, the Figma kit or paid templates (they are not MIT).", use: "Interactive parts: dropdowns, modals, tabs, carousels, forms, tables.", frameworks: "Any (plain HTML, Astro, React, Vue, Svelte)", react: false, fits: ["business", "shop", "clinic"], licenseUrl: "https://github.com/themesberg/flowbite/blob/main/LICENSE.md", checkedOn: "2026-11-01" },
|
|
23897
|
+
{ key: "preline", name: "Preline UI", url: "https://preline.co", install: "npm i preline, add its CSS and script lines as its install guide says, then copy the component HTML", license: "MIT + Preline Fair Use", terms: "Free in the owner's own site, commercial too. Never build a competing UI kit or builder from it; never anything marked Pro.", use: "Full sections with small scripts: hero, navbars, pricing, account pages.", frameworks: "Any (plain HTML, Astro, React, Vue)", react: false, fits: ["business", "clinic", "restaurant", "shop"], licenseUrl: "https://github.com/htmlstreamofficial/preline/blob/main/LICENSE", checkedOn: "2026-11-01" },
|
|
23898
|
+
{ key: "uiverse", name: "Uiverse", url: "https://uiverse.io", install: "Copy the HTML and CSS (or Tailwind) from the element page", license: "MIT", terms: "Free for any use; keep the license notice. Made by many people, so check each one on a phone and with the keyboard.", use: "Small eye-catching pieces: buttons, loaders, toggles, cards.", frameworks: "Any (plain HTML and CSS)", react: false, fits: ["portfolio", "business", "restaurant"], licenseUrl: "https://github.com/uiverse-io/galaxy/blob/main/LICENSE", checkedOn: "2026-11-01" },
|
|
23899
|
+
// React, for forms and app parts on a site that already uses React islands.
|
|
23900
|
+
{ key: "originui", name: "Origin UI (coss ui)", url: "https://coss.com/ui", install: "npx shadcn@latest add <the registry address on the component page>", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Form and app parts: inputs, selects, buttons, tables, dialogs.", frameworks: "React (Astro with the React integration)", react: true, fits: ["clinic", "shop", "business"], licenseUrl: "https://github.com/origin-space/originui/blob/main/LICENSE", checkedOn: "2026-11-01" }
|
|
23901
|
+
];
|
|
23902
|
+
function uiSourcesText() {
|
|
23903
|
+
return [
|
|
23904
|
+
"UI sources you may use for visual sections (install each from its own place, never copy from elsewhere; free tiers only; add a line per component to .deployai/migration/credits.md with its source, URL and license):",
|
|
23905
|
+
"Pick by the kind of site you read from the scan (Fits), and prefer the kits with no React: they load faster.",
|
|
23906
|
+
...UI_SOURCES.map((s) => `- ${s.name} (${s.url}, ${s.license}; ${s.frameworks}${s.react ? "" : ", no React"}): ${s.use} Fits: ${s.fits.join(", ")}. Install: ${s.install}. ${s.terms}`),
|
|
23907
|
+
"React components need React in the site: in an Astro site, add it with npx astro add react and use them as islands only where they move or react; keep the rest plain Astro.",
|
|
23908
|
+
"",
|
|
23909
|
+
uiPartsText()
|
|
23910
|
+
].join("\n");
|
|
23911
|
+
}
|
|
23912
|
+
var UI_PART_KEYS = ["product-card", "product-grid", "product-page", "cart", "checkout-summary", "category-filter", "shop-banner", "post-card", "post-list", "article-layout", "author-box", "related-posts", "newsletter", "tags-list", "toc"];
|
|
23913
|
+
var UI_PARTS = [
|
|
23914
|
+
{ part: "product-card", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/product-cards", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Eight cards; two have Add to cart." },
|
|
23915
|
+
{ part: "product-card", kind: "shop", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/application-ui/cards", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Product cards with price and Add to cart; RTL versions for Hebrew." },
|
|
23916
|
+
{ part: "product-card", kind: "shop", source: "flowbite", sourceName: "Flowbite", url: "https://flowbite.com/docs/components/card/", license: "MIT", licenseUrl: "https://github.com/themesberg/flowbite/blob/main/LICENSE.md", react: false, how: "Copy the HTML from the E-commerce card section", note: "Image, rating, price, Add to cart." },
|
|
23917
|
+
{ part: "product-card", kind: "shop", source: "daisyui", sourceName: "DaisyUI", url: "https://daisyui.com/components/card/", license: "MIT", licenseUrl: "https://github.com/saadeghi/daisyui/blob/master/LICENSE", react: false, how: "With DaisyUI installed, copy the card HTML", note: "A plain card; add the price." },
|
|
23918
|
+
{ part: "product-grid", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/product-collections", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Grids, with dropdown or side filters." },
|
|
23919
|
+
{ part: "product-grid", kind: "shop", source: "tailblocks", sourceName: "Tailblocks", url: "https://github.com/mertJF/tailblocks/blob/master/src/blocks/ecommerce/light/a.js", license: "MIT", licenseUrl: "https://github.com/mertJF/tailblocks/blob/master/LICENSE", react: true, how: "Copy the markup from the file and turn it into Astro", note: "An eight item grid; older Tailwind classes." },
|
|
23920
|
+
{ part: "product-page", kind: "shop", source: "tailblocks", sourceName: "Tailblocks", url: "https://github.com/mertJF/tailblocks/blob/master/src/blocks/ecommerce/light/c.js", license: "MIT", licenseUrl: "https://github.com/mertJF/tailblocks/blob/master/LICENSE", react: true, how: "Copy the markup from the file and turn it into Astro", note: "One image, color, size, quantity and price; no gallery (see the prompt)." },
|
|
23921
|
+
{ part: "cart", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/carts", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "A mini cart, one with quantity and remove, and a cart page." },
|
|
23922
|
+
{ part: "cart", kind: "shop", source: "daisyui", sourceName: "DaisyUI", url: "https://daisyui.com/components/drawer/", license: "MIT", licenseUrl: "https://github.com/saadeghi/daisyui/blob/master/LICENSE", react: false, how: "With DaisyUI installed, copy the drawer-end example and put the cart inside", note: "The side drawer only; pair it with the HyperUI cart." },
|
|
23923
|
+
{ part: "checkout-summary", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/carts", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the Page cart and keep its summary block", note: "Subtotal, VAT, discount and total. No payment: the owner chooses that." },
|
|
23924
|
+
{ part: "category-filter", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/application/filters", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page (needs @tailwindcss/forms)", note: "Dropdown and accordion filters." },
|
|
23925
|
+
{ part: "category-filter", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/product-collections", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the Filtering (Side) HTML", note: "A sidebar with sort, availability, price and colors." },
|
|
23926
|
+
{ part: "shop-banner", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/banners", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "A hero banner; put a real product photo in." },
|
|
23927
|
+
{ part: "shop-banner", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/announcements", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "A thin top bar for a real sale or free shipping." },
|
|
23928
|
+
{ part: "post-card", kind: "blog", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/blog-cards", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Seven cards with image, date, excerpt and tags." },
|
|
23929
|
+
{ part: "post-card", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the Cards section", note: "RTL versions for Hebrew." },
|
|
23930
|
+
{ part: "post-list", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/tree/main/src/components/blog", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy Grid.astro and GridItem.astro (or List.astro and ListItem.astro) and Pagination.astro, then fix their imports", note: "Astro files; the repository moved to arthelokyo." },
|
|
23931
|
+
{ part: "post-list", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the Grid or Recent Posts section", note: "RTL versions for Hebrew." },
|
|
23932
|
+
{ part: "post-list", kind: "blog", source: "astro-blog", sourceName: "Astro blog starter", url: "https://github.com/withastro/astro/blob/main/examples/blog/src/pages/blog/index.astro", license: "MIT", licenseUrl: "https://github.com/withastro/astro/blob/main/LICENSE", react: false, how: "Copy the file", note: "A content collection grid; plain CSS, not Tailwind." },
|
|
23933
|
+
{ part: "article-layout", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/blog/SinglePost.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file and its imports (PostTags, share)", note: "Date, author, category, reading time, image, tags, share." },
|
|
23934
|
+
{ part: "article-layout", kind: "blog", source: "astro-blog", sourceName: "Astro blog starter", url: "https://github.com/withastro/astro/blob/main/examples/blog/src/layouts/BlogPost.astro", license: "MIT", licenseUrl: "https://github.com/withastro/astro/blob/main/LICENSE", react: false, how: "Copy the file", note: "Hero image, title, dates and the text; plain CSS." },
|
|
23935
|
+
{ part: "article-layout", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the Single Post section", note: "RTL versions for Hebrew." },
|
|
23936
|
+
{ part: "author-box", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the author line (photo, name, role) from the blog components", note: "A byline, not a full box (see the prompt)." },
|
|
23937
|
+
{ part: "related-posts", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/blog/RelatedPosts.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file, widgets/BlogHighlightedPosts.astro and their utils", note: "Up to four posts by shared tags." },
|
|
23938
|
+
{ part: "newsletter", kind: "blog", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/newsletter-signup", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page (needs @tailwindcss/forms)", note: "Wire it to the inbox block or the owner's list." },
|
|
23939
|
+
{ part: "newsletter", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/widgets/Newsletter.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file and its WidgetWrapper and Headline imports", note: "Email and Subscribe; no backend." },
|
|
23940
|
+
{ part: "tags-list", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/blog/Tags.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file and fix its imports", note: "Tag or category links." },
|
|
23941
|
+
{ part: "toc", kind: "blog", source: "astro-cactus", sourceName: "Astro Theme Cactus", url: "https://github.com/chrismwilliams/astro-theme-cactus/blob/main/src/components/blog/TOC.astro", license: "MIT", licenseUrl: "https://github.com/chrismwilliams/astro-theme-cactus/blob/main/LICENSE", react: false, how: "Copy TOC.astro, TOCHeading.astro and src/utils/generateToc, pass the headings from render()", note: "Folds, and stays in view on wide screens." }
|
|
23942
|
+
];
|
|
23943
|
+
var UI_PART_PROMPTS = {
|
|
23944
|
+
"product-page": "Build the product page as one Astro component: a gallery of the product's real photos (large image, thumbnails under it that swap it, swipe on a phone, arrows with labels for the keyboard), then name, price with VAT, the options the product really has, quantity and Add to cart, then the description and the shipping and returns lines the owner gave. Mobile first, right to left in Hebrew, no React unless the site already has it, images with width, height and alt.",
|
|
23945
|
+
"author-box": "Build an author box as one Astro component for the end of a post: the author's photo, name, one line about them and links they gave (site, social), from the author data the posts already have. Never invent a bio: leave out what the owner did not give. Right to left in Hebrew, no React."
|
|
23946
|
+
};
|
|
23947
|
+
function uiPartsText() {
|
|
23948
|
+
const by = /* @__PURE__ */ new Map();
|
|
23949
|
+
for (const p of UI_PARTS) by.set(p.part, [...by.get(p.part) ?? [], p]);
|
|
23950
|
+
return [
|
|
23951
|
+
"Ready parts for a shop or a blog (free, MIT): copy a part from its page into the site, keep its license notice, and add it to .deployai/migration/credits.md. Prefer the ones with no React. Use only the parts the site needs.",
|
|
23952
|
+
...UI_PART_KEYS.map((k) => {
|
|
23953
|
+
const list = (by.get(k) ?? []).map((p) => `${p.sourceName} ${p.url} (${p.how}${p.react ? "; React markup, turn it into Astro" : ""})`).join("; ");
|
|
23954
|
+
const prompt = UI_PART_PROMPTS[k];
|
|
23955
|
+
return `- ${k}: ${list}${prompt ? `. Build it yourself instead when it falls short: ${prompt}` : ""}`;
|
|
23956
|
+
})
|
|
23957
|
+
].join("\n");
|
|
23958
|
+
}
|
|
23959
|
+
var SKILLS = "npx skills@1.9.0 add";
|
|
23960
|
+
var KEEP = "Free for any use; keep the license notice. Never copy its files into the site.";
|
|
23961
|
+
var LAYOUT_KITS = [
|
|
23962
|
+
{ key: "hallmark", name: "Hallmark", url: "https://github.com/nutlope/hallmark", install: `${SKILLS} nutlope/hallmark`, license: "MIT", role: "look", fits: ["business", "shop", "restaurant", "clinic"], use: "Builds each page around what the visitor came to do (book, buy, call) in one of fifty themes, then checks it in a browser at eight widths. Redesign keeps the content and wiring. It runs its own scripts.", terms: `${KEEP} No tags upstream, so it installs from main. Never its image generation (a paid key); fonts and photos are saved into the site, each photo with its credit; no Tailwind from a CDN.`, licenseUrl: "https://github.com/nutlope/hallmark/blob/main/LICENSE", checkedOn: "2026-11-17" },
|
|
23963
|
+
{ key: "taste", name: "Taste Skill", url: "https://github.com/Leonxlnx/taste-skill", install: `${SKILLS} https://github.com/Leonxlnx/taste-skill/tree/v2.5.1`, license: "MIT", role: "look", fits: ["portfolio", "blog"], use: "Picks one art direction for the whole site from curated references, then checks it in the browser. It runs its own scripts.", terms: KEEP, licenseUrl: "https://github.com/Leonxlnx/taste-skill/blob/main/LICENSE", checkedOn: "2026-11-17" },
|
|
23964
|
+
{ key: "interfaces", name: "Interfaces (Jakub Krehel)", url: "https://github.com/jakubkrehel/skills", install: `${SKILLS} jakubkrehel/skills --skill better-interface better-layout better-typography`, license: "MIT", role: "review", use: "Reviews and polishes what was built: better-interface, better-layout, better-typography. Text only, no scripts.", terms: `${KEEP} No tags upstream, so it installs from main.`, licenseUrl: "https://github.com/jakubkrehel/skills/blob/main/LICENSE", checkedOn: "2026-11-17" },
|
|
23965
|
+
{ key: "humanizer", name: "Humanizer", url: "https://github.com/blader/humanizer", install: `${SKILLS} https://github.com/blader/humanizer/tree/v4.0.0`, license: "MIT", role: "copy", use: "Takes the signs of AI writing out of English text on the site. Text only.", terms: KEEP, licenseUrl: "https://github.com/blader/humanizer/blob/main/LICENSE", checkedOn: "2026-11-17" },
|
|
23966
|
+
{ key: "marketingskills", name: "Marketing Skills", url: "https://github.com/coreyhaines31/marketingskills", install: `${SKILLS} https://github.com/coreyhaines31/marketingskills/tree/v2.14.12 --skill copywriting cro seo-audit schema`, license: "MIT", role: "copy", use: "Four skills only: copywriting and cro for words that sell, seo-audit and schema for search. Text only.", terms: `${KEEP} Only these four skills; never its tools/ command lines.`, licenseUrl: "https://github.com/coreyhaines31/marketingskills/blob/main/LICENSE", checkedOn: "2026-11-17" },
|
|
23967
|
+
{ key: "aislop", name: "aislop", url: "https://github.com/scanaislop/aislop", install: "npx aislop@0.22.1 scan", license: "MIT", role: "code", use: "Scans the code for what agents leave behind (dead code, swallowed errors, unsafe casts, copies) and scores it 0 to 100. No AI, nothing installed.", terms: "Free for any use. Scan only: never its hook, its global install or its tools download.", licenseUrl: "https://github.com/scanaislop/aislop/blob/main/LICENSE", checkedOn: "2026-11-17" }
|
|
23968
|
+
];
|
|
23969
|
+
var QUALITY_KITS_LINE = "Read https://deployai.co.il/kits.md before you build or redesign a site.";
|
|
23970
|
+
|
|
23880
23971
|
// ../shared/src/deployai-md.ts
|
|
23881
23972
|
var DEPLOYAI_MD = `# DeployAI rules
|
|
23882
23973
|
|
|
@@ -23934,7 +24025,7 @@ ${SITE_COPY_RULE}
|
|
|
23934
24025
|
|
|
23935
24026
|
## A site's first version
|
|
23936
24027
|
|
|
23937
|
-
${FIRST_SITE_RULE}
|
|
24028
|
+
${FIRST_SITE_RULE} ${QUALITY_KITS_LINE}
|
|
23938
24029
|
|
|
23939
24030
|
## While you build
|
|
23940
24031
|
|
|
@@ -23969,7 +24060,8 @@ var DEPLOYAI_LATER_RULES = [
|
|
|
23969
24060
|
{ has: "never been live", text: FIRST_SITE_RULE },
|
|
23970
24061
|
{ has: "local preview", text: LOCAL_PREVIEW_RULE },
|
|
23971
24062
|
{ has: "git history", text: GIT_HISTORY_RULE },
|
|
23972
|
-
{ has: "never word for word", text: SITE_COPY_RULE }
|
|
24063
|
+
{ has: "never word for word", text: SITE_COPY_RULE },
|
|
24064
|
+
{ has: "kits.md", text: QUALITY_KITS_LINE }
|
|
23973
24065
|
];
|
|
23974
24066
|
function parseLaterRules(json2) {
|
|
23975
24067
|
try {
|
|
@@ -24017,82 +24109,6 @@ function stackSummary(s) {
|
|
|
24017
24109
|
return [frameworkName(s.framework), ...s.bindings.map((b) => b.toUpperCase()), s.css === "tailwind" ? "Tailwind" : null, s.fonts.join(", "), s.dir.toUpperCase()].filter(Boolean).join(" \xB7 ");
|
|
24018
24110
|
}
|
|
24019
24111
|
|
|
24020
|
-
// ../shared/src/ui-sources.ts
|
|
24021
|
-
var UI_SOURCES = [
|
|
24022
|
-
{ key: "shadcn", name: "shadcn/ui", url: "https://ui.shadcn.com", install: "npx shadcn@latest add <component>", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Forms, dialogs, menus, tabs, tables: the plain building blocks.", frameworks: "React (Astro with the React integration)", react: true, fits: ["business", "shop", "blog", "portfolio", "restaurant", "clinic"], licenseUrl: "https://github.com/shadcn-ui/ui/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
|
|
24023
|
-
{ key: "magicui", name: "Magic UI", url: "https://magicui.design", install: 'npx shadcn@latest add "https://magicui.design/r/<component>.json"', license: "MIT", terms: "Free components only (not Magic UI Pro); keep the license notice.", use: "Marketing sections: animated backgrounds, marquees, number tickers, bento grids.", frameworks: "React", react: true, fits: ["business", "portfolio", "restaurant"], licenseUrl: "https://github.com/magicuidesign/magicui/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
|
|
24024
|
-
{ key: "aceternity", name: "Aceternity UI", url: "https://ui.aceternity.com", install: 'npx shadcn@latest add "https://ui.aceternity.com/registry/<component>.json"', license: "Aceternity licence", terms: "Free components only (not Pro or templates). Allowed in the owner's own site; never publish the component source on its own or sell it as a template.", use: "Hero effects: spotlight, background beams, cards with motion, scroll effects.", frameworks: "React", react: true, fits: ["business", "portfolio"], licenseUrl: "https://ui.aceternity.com/licence", checkedOn: "2026-10-30" },
|
|
24025
|
-
{ key: "reactbits", name: "React Bits", url: "https://reactbits.dev", install: "Copy the component from its page (or its shadcn registry line on that page)", license: "MIT + Commons Clause", terms: "Allowed as part of a website; never sell the components themselves.", use: "Text animations, backgrounds, small interactive effects.", frameworks: "React", react: true, fits: ["portfolio", "business"], licenseUrl: "https://github.com/DavidHDev/react-bits/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
|
|
24026
|
-
{ key: "embla", name: "Embla Carousel", url: "https://www.embla-carousel.com", install: "npm install embla-carousel", license: "MIT", terms: "Free for any use.", use: "Sliders and carousels, with plain JavaScript in any framework.", frameworks: "Any (plain JS, React, Vue, Svelte)", react: false, fits: ["shop", "restaurant", "portfolio", "business"], licenseUrl: "https://github.com/davidjerleke/embla-carousel/blob/master/LICENSE", checkedOn: "2026-10-30" },
|
|
24027
|
-
{ key: "swiper", name: "Swiper", url: "https://swiperjs.com", install: "npm install swiper", license: "MIT", terms: "Free for any use.", use: "Galleries and touch sliders, like many WordPress themes use.", frameworks: "Any (plain JS, React, Vue)", react: false, fits: ["restaurant", "portfolio", "shop"], licenseUrl: "https://github.com/nolimits4web/swiper/blob/master/LICENSE", checkedOn: "2026-10-30" },
|
|
24028
|
-
{ key: "motion", name: "Motion", url: "https://motion.dev", install: "npm install motion", license: "MIT", terms: "The free library only (not Motion+).", use: "Animations on scroll and on enter, in plain JS or React.", frameworks: "Any (plain JS, React, Vue)", react: false, fits: ["business", "shop", "blog", "portfolio", "restaurant", "clinic"], licenseUrl: "https://github.com/motiondivision/motion/blob/main/LICENSE.md", checkedOn: "2026-10-30" },
|
|
24029
|
-
// Plain HTML and Tailwind kits (D-562): no React, so they fit the Astro samples as they are. Licenses read 2026-11-01.
|
|
24030
|
-
{ key: "daisyui", name: "DaisyUI", url: "https://daisyui.com", install: 'npm i -D daisyui, then add @plugin "daisyui"; to the main CSS file (Tailwind 4)', license: "MIT", terms: "Free for any use; keep the license notice. Never the paid themes, templates or blocks from its store.", use: "Whole-site parts with themes: buttons, cards, navbars, forms, modals.", frameworks: "Any with Tailwind (plain HTML, Astro, React)", react: false, fits: ["business", "shop", "blog", "portfolio", "restaurant", "clinic"], licenseUrl: "https://github.com/saadeghi/daisyui/blob/master/LICENSE", checkedOn: "2026-11-01" },
|
|
24031
|
-
{ key: "hyperui", name: "HyperUI", url: "https://hyperui.dev", install: "Copy the HTML from the component page", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Marketing sections (hero, call to action, pricing, FAQ, footer) and shop blocks.", frameworks: "Any with Tailwind (plain HTML, Astro, React)", react: false, fits: ["business", "shop", "clinic", "restaurant"], licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", checkedOn: "2026-11-01" },
|
|
24032
|
-
{ key: "flowbite", name: "Flowbite", url: "https://flowbite.com", install: "npm install flowbite, add its theme and plugin lines to the main CSS file as its Tailwind 4 guide says, then copy the component HTML", license: "MIT", terms: "The open-source library only; keep the license notice. Never Flowbite Pro blocks, the Figma kit or paid templates (they are not MIT).", use: "Interactive parts: dropdowns, modals, tabs, carousels, forms, tables.", frameworks: "Any (plain HTML, Astro, React, Vue, Svelte)", react: false, fits: ["business", "shop", "clinic"], licenseUrl: "https://github.com/themesberg/flowbite/blob/main/LICENSE.md", checkedOn: "2026-11-01" },
|
|
24033
|
-
{ key: "preline", name: "Preline UI", url: "https://preline.co", install: "npm i preline, add its CSS and script lines as its install guide says, then copy the component HTML", license: "MIT + Preline Fair Use", terms: "Free in the owner's own site, commercial too. Never build a competing UI kit or builder from it; never anything marked Pro.", use: "Full sections with small scripts: hero, navbars, pricing, account pages.", frameworks: "Any (plain HTML, Astro, React, Vue)", react: false, fits: ["business", "clinic", "restaurant", "shop"], licenseUrl: "https://github.com/htmlstreamofficial/preline/blob/main/LICENSE", checkedOn: "2026-11-01" },
|
|
24034
|
-
{ key: "uiverse", name: "Uiverse", url: "https://uiverse.io", install: "Copy the HTML and CSS (or Tailwind) from the element page", license: "MIT", terms: "Free for any use; keep the license notice. Made by many people, so check each one on a phone and with the keyboard.", use: "Small eye-catching pieces: buttons, loaders, toggles, cards.", frameworks: "Any (plain HTML and CSS)", react: false, fits: ["portfolio", "business", "restaurant"], licenseUrl: "https://github.com/uiverse-io/galaxy/blob/main/LICENSE", checkedOn: "2026-11-01" },
|
|
24035
|
-
// React, for forms and app parts on a site that already uses React islands.
|
|
24036
|
-
{ key: "originui", name: "Origin UI (coss ui)", url: "https://coss.com/ui", install: "npx shadcn@latest add <the registry address on the component page>", license: "MIT", terms: "Free for any use; keep the license notice.", use: "Form and app parts: inputs, selects, buttons, tables, dialogs.", frameworks: "React (Astro with the React integration)", react: true, fits: ["clinic", "shop", "business"], licenseUrl: "https://github.com/origin-space/originui/blob/main/LICENSE", checkedOn: "2026-11-01" }
|
|
24037
|
-
];
|
|
24038
|
-
function uiSourcesText() {
|
|
24039
|
-
return [
|
|
24040
|
-
"UI sources you may use for visual sections (install each from its own place, never copy from elsewhere; free tiers only; add a line per component to .deployai/migration/credits.md with its source, URL and license):",
|
|
24041
|
-
"Pick by the kind of site you read from the scan (Fits), and prefer the kits with no React: they load faster.",
|
|
24042
|
-
...UI_SOURCES.map((s) => `- ${s.name} (${s.url}, ${s.license}; ${s.frameworks}${s.react ? "" : ", no React"}): ${s.use} Fits: ${s.fits.join(", ")}. Install: ${s.install}. ${s.terms}`),
|
|
24043
|
-
"React components need React in the site: in an Astro site, add it with npx astro add react and use them as islands only where they move or react; keep the rest plain Astro.",
|
|
24044
|
-
"",
|
|
24045
|
-
uiPartsText()
|
|
24046
|
-
].join("\n");
|
|
24047
|
-
}
|
|
24048
|
-
var UI_PART_KEYS = ["product-card", "product-grid", "product-page", "cart", "checkout-summary", "category-filter", "shop-banner", "post-card", "post-list", "article-layout", "author-box", "related-posts", "newsletter", "tags-list", "toc"];
|
|
24049
|
-
var UI_PARTS = [
|
|
24050
|
-
{ part: "product-card", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/product-cards", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Eight cards; two have Add to cart." },
|
|
24051
|
-
{ part: "product-card", kind: "shop", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/application-ui/cards", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Product cards with price and Add to cart; RTL versions for Hebrew." },
|
|
24052
|
-
{ part: "product-card", kind: "shop", source: "flowbite", sourceName: "Flowbite", url: "https://flowbite.com/docs/components/card/", license: "MIT", licenseUrl: "https://github.com/themesberg/flowbite/blob/main/LICENSE.md", react: false, how: "Copy the HTML from the E-commerce card section", note: "Image, rating, price, Add to cart." },
|
|
24053
|
-
{ part: "product-card", kind: "shop", source: "daisyui", sourceName: "DaisyUI", url: "https://daisyui.com/components/card/", license: "MIT", licenseUrl: "https://github.com/saadeghi/daisyui/blob/master/LICENSE", react: false, how: "With DaisyUI installed, copy the card HTML", note: "A plain card; add the price." },
|
|
24054
|
-
{ part: "product-grid", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/product-collections", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Grids, with dropdown or side filters." },
|
|
24055
|
-
{ part: "product-grid", kind: "shop", source: "tailblocks", sourceName: "Tailblocks", url: "https://github.com/mertJF/tailblocks/blob/master/src/blocks/ecommerce/light/a.js", license: "MIT", licenseUrl: "https://github.com/mertJF/tailblocks/blob/master/LICENSE", react: true, how: "Copy the markup from the file and turn it into Astro", note: "An eight item grid; older Tailwind classes." },
|
|
24056
|
-
{ part: "product-page", kind: "shop", source: "tailblocks", sourceName: "Tailblocks", url: "https://github.com/mertJF/tailblocks/blob/master/src/blocks/ecommerce/light/c.js", license: "MIT", licenseUrl: "https://github.com/mertJF/tailblocks/blob/master/LICENSE", react: true, how: "Copy the markup from the file and turn it into Astro", note: "One image, color, size, quantity and price; no gallery (see the prompt)." },
|
|
24057
|
-
{ part: "cart", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/carts", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "A mini cart, one with quantity and remove, and a cart page." },
|
|
24058
|
-
{ part: "cart", kind: "shop", source: "daisyui", sourceName: "DaisyUI", url: "https://daisyui.com/components/drawer/", license: "MIT", licenseUrl: "https://github.com/saadeghi/daisyui/blob/master/LICENSE", react: false, how: "With DaisyUI installed, copy the drawer-end example and put the cart inside", note: "The side drawer only; pair it with the HyperUI cart." },
|
|
24059
|
-
{ part: "checkout-summary", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/carts", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the Page cart and keep its summary block", note: "Subtotal, VAT, discount and total. No payment: the owner chooses that." },
|
|
24060
|
-
{ part: "category-filter", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/application/filters", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page (needs @tailwindcss/forms)", note: "Dropdown and accordion filters." },
|
|
24061
|
-
{ part: "category-filter", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/product-collections", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the Filtering (Side) HTML", note: "A sidebar with sort, availability, price and colors." },
|
|
24062
|
-
{ part: "shop-banner", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/banners", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "A hero banner; put a real product photo in." },
|
|
24063
|
-
{ part: "shop-banner", kind: "shop", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/announcements", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "A thin top bar for a real sale or free shipping." },
|
|
24064
|
-
{ part: "post-card", kind: "blog", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/blog-cards", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page", note: "Seven cards with image, date, excerpt and tags." },
|
|
24065
|
-
{ part: "post-card", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the Cards section", note: "RTL versions for Hebrew." },
|
|
24066
|
-
{ part: "post-list", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/tree/main/src/components/blog", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy Grid.astro and GridItem.astro (or List.astro and ListItem.astro) and Pagination.astro, then fix their imports", note: "Astro files; the repository moved to arthelokyo." },
|
|
24067
|
-
{ part: "post-list", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the Grid or Recent Posts section", note: "RTL versions for Hebrew." },
|
|
24068
|
-
{ part: "post-list", kind: "blog", source: "astro-blog", sourceName: "Astro blog starter", url: "https://github.com/withastro/astro/blob/main/examples/blog/src/pages/blog/index.astro", license: "MIT", licenseUrl: "https://github.com/withastro/astro/blob/main/LICENSE", react: false, how: "Copy the file", note: "A content collection grid; plain CSS, not Tailwind." },
|
|
24069
|
-
{ part: "article-layout", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/blog/SinglePost.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file and its imports (PostTags, share)", note: "Date, author, category, reading time, image, tags, share." },
|
|
24070
|
-
{ part: "article-layout", kind: "blog", source: "astro-blog", sourceName: "Astro blog starter", url: "https://github.com/withastro/astro/blob/main/examples/blog/src/layouts/BlogPost.astro", license: "MIT", licenseUrl: "https://github.com/withastro/astro/blob/main/LICENSE", react: false, how: "Copy the file", note: "Hero image, title, dates and the text; plain CSS." },
|
|
24071
|
-
{ part: "article-layout", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the HTML from the Single Post section", note: "RTL versions for Hebrew." },
|
|
24072
|
-
{ part: "author-box", kind: "blog", source: "merakiui", sourceName: "Meraki UI", url: "https://merakiui.com/components/marketing/blog", license: "MIT", licenseUrl: "https://github.com/merakiui/merakiui/blob/main/LICENSE", react: false, how: "Copy the author line (photo, name, role) from the blog components", note: "A byline, not a full box (see the prompt)." },
|
|
24073
|
-
{ part: "related-posts", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/blog/RelatedPosts.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file, widgets/BlogHighlightedPosts.astro and their utils", note: "Up to four posts by shared tags." },
|
|
24074
|
-
{ part: "newsletter", kind: "blog", source: "hyperui", sourceName: "HyperUI", url: "https://www.hyperui.dev/components/marketing/newsletter-signup", license: "MIT", licenseUrl: "https://github.com/markmead/hyperui/blob/main/LICENSE", react: false, how: "Copy the HTML from the page (needs @tailwindcss/forms)", note: "Wire it to the inbox block or the owner's list." },
|
|
24075
|
-
{ part: "newsletter", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/widgets/Newsletter.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file and its WidgetWrapper and Headline imports", note: "Email and Subscribe; no backend." },
|
|
24076
|
-
{ part: "tags-list", kind: "blog", source: "astrowind", sourceName: "AstroWind", url: "https://github.com/arthelokyo/astrowind/blob/main/src/components/blog/Tags.astro", license: "MIT", licenseUrl: "https://github.com/onwidget/astrowind/blob/main/LICENSE.md", react: false, how: "Copy the file and fix its imports", note: "Tag or category links." },
|
|
24077
|
-
{ part: "toc", kind: "blog", source: "astro-cactus", sourceName: "Astro Theme Cactus", url: "https://github.com/chrismwilliams/astro-theme-cactus/blob/main/src/components/blog/TOC.astro", license: "MIT", licenseUrl: "https://github.com/chrismwilliams/astro-theme-cactus/blob/main/LICENSE", react: false, how: "Copy TOC.astro, TOCHeading.astro and src/utils/generateToc, pass the headings from render()", note: "Folds, and stays in view on wide screens." }
|
|
24078
|
-
];
|
|
24079
|
-
var UI_PART_PROMPTS = {
|
|
24080
|
-
"product-page": "Build the product page as one Astro component: a gallery of the product's real photos (large image, thumbnails under it that swap it, swipe on a phone, arrows with labels for the keyboard), then name, price with VAT, the options the product really has, quantity and Add to cart, then the description and the shipping and returns lines the owner gave. Mobile first, right to left in Hebrew, no React unless the site already has it, images with width, height and alt.",
|
|
24081
|
-
"author-box": "Build an author box as one Astro component for the end of a post: the author's photo, name, one line about them and links they gave (site, social), from the author data the posts already have. Never invent a bio: leave out what the owner did not give. Right to left in Hebrew, no React."
|
|
24082
|
-
};
|
|
24083
|
-
function uiPartsText() {
|
|
24084
|
-
const by = /* @__PURE__ */ new Map();
|
|
24085
|
-
for (const p of UI_PARTS) by.set(p.part, [...by.get(p.part) ?? [], p]);
|
|
24086
|
-
return [
|
|
24087
|
-
"Ready parts for a shop or a blog (free, MIT): copy a part from its page into the site, keep its license notice, and add it to .deployai/migration/credits.md. Prefer the ones with no React. Use only the parts the site needs.",
|
|
24088
|
-
...UI_PART_KEYS.map((k) => {
|
|
24089
|
-
const list = (by.get(k) ?? []).map((p) => `${p.sourceName} ${p.url} (${p.how}${p.react ? "; React markup, turn it into Astro" : ""})`).join("; ");
|
|
24090
|
-
const prompt = UI_PART_PROMPTS[k];
|
|
24091
|
-
return `- ${k}: ${list}${prompt ? `. Build it yourself instead when it falls short: ${prompt}` : ""}`;
|
|
24092
|
-
})
|
|
24093
|
-
].join("\n");
|
|
24094
|
-
}
|
|
24095
|
-
|
|
24096
24112
|
// ../shared/src/migration.ts
|
|
24097
24113
|
var BLOCKED_MOVE_ENDINGS = ["gov", "gov.il", "mil", "mil.il", "idf.il", "muni.il", "bank", "insurance"];
|
|
24098
24114
|
var BLOCKED_MOVE_HOSTS = [
|
|
@@ -24905,6 +24921,7 @@ var M = {
|
|
|
24905
24921
|
deployTitle: "DeployAI deploy",
|
|
24906
24922
|
guestTitle: "DeployAI deploy (no account)",
|
|
24907
24923
|
uploading: "Uploading...",
|
|
24924
|
+
uploadingPart: "Uploading part {n} of {total}...",
|
|
24908
24925
|
project: "Project",
|
|
24909
24926
|
message: "Message",
|
|
24910
24927
|
version: "Version",
|
|
@@ -25206,6 +25223,7 @@ var M = {
|
|
|
25206
25223
|
deployTitle: "DeployAI deploy",
|
|
25207
25224
|
guestTitle: "DeployAI deploy (\u05D1\u05DC\u05D9 \u05D7\u05E9\u05D1\u05D5\u05DF)",
|
|
25208
25225
|
uploading: "\u05DE\u05E2\u05DC\u05D9\u05DD...",
|
|
25226
|
+
uploadingPart: "\u05DE\u05E2\u05DC\u05D9\u05DD \u05D7\u05DC\u05E7 {n} \u05DE\u05EA\u05D5\u05DA {total}...",
|
|
25209
25227
|
project: "\u05D0\u05EA\u05E8",
|
|
25210
25228
|
message: "\u05D4\u05D5\u05D3\u05E2\u05D4",
|
|
25211
25229
|
version: "\u05D2\u05E8\u05E1\u05D4",
|
|
@@ -25501,7 +25519,7 @@ function formatBytes(n2) {
|
|
|
25501
25519
|
}
|
|
25502
25520
|
|
|
25503
25521
|
// src/version.ts
|
|
25504
|
-
var CLI_VERSION = "0.1.0-beta.
|
|
25522
|
+
var CLI_VERSION = "0.1.0-beta.48";
|
|
25505
25523
|
|
|
25506
25524
|
// src/api.ts
|
|
25507
25525
|
function apiContext(apiFlag, root) {
|
|
@@ -25534,9 +25552,10 @@ function errorCode(e3) {
|
|
|
25534
25552
|
const cause = e3?.cause;
|
|
25535
25553
|
return cause?.code ?? e3?.code;
|
|
25536
25554
|
}
|
|
25537
|
-
|
|
25538
|
-
|
|
25539
|
-
|
|
25555
|
+
var EDGE_TIMEOUT = /* @__PURE__ */ new Set([520, 521, 522, 523, 524]);
|
|
25556
|
+
function shouldRetry(method, failure2, idempotent = false) {
|
|
25557
|
+
const get2 = method === "GET" || idempotent;
|
|
25558
|
+
if (typeof failure2 === "number") return get2 && (failure2 === 502 || failure2 === 503 || failure2 === 504 || EDGE_TIMEOUT.has(failure2));
|
|
25540
25559
|
const code = errorCode(failure2);
|
|
25541
25560
|
if (code && NEVER_SENT.has(code)) return true;
|
|
25542
25561
|
if (!get2) return false;
|
|
@@ -25574,7 +25593,7 @@ async function apiRequest(ctx, path, schema, opts = {}) {
|
|
|
25574
25593
|
} catch (e3) {
|
|
25575
25594
|
failure2 = e3;
|
|
25576
25595
|
}
|
|
25577
|
-
const again = attempt < waits.length && shouldRetry(method, res ? res.status : failure2);
|
|
25596
|
+
const again = attempt < waits.length && shouldRetry(method, res ? res.status : failure2, opts.idempotent);
|
|
25578
25597
|
if (!again) {
|
|
25579
25598
|
if (!res) throw await networkError(failure2, ctx.apiUrl);
|
|
25580
25599
|
break;
|
|
@@ -25591,6 +25610,7 @@ async function apiRequest(ctx, path, schema, opts = {}) {
|
|
|
25591
25610
|
}
|
|
25592
25611
|
const t = messages(process.cwd());
|
|
25593
25612
|
if (res.status === 401) throw new CliError(t("sessionExpired"), 1, "auth");
|
|
25613
|
+
if (EDGE_TIMEOUT.has(res.status)) throw new CliError(t("timeout", { url: ctx.apiUrl }), 1, "network");
|
|
25594
25614
|
if (!res.ok) {
|
|
25595
25615
|
const parsed2 = ApiError.safeParse(data);
|
|
25596
25616
|
if (parsed2.success && parsed2.data.error === "site_deleted") {
|
|
@@ -25755,6 +25775,8 @@ function buildTelemetryEvent(installId, command, result, errorCategory, extra =
|
|
|
25755
25775
|
if ((result === "error" || result === "blocked") && extra.errorLine) ev.errorLine = scrubText(extra.errorLine, ERROR_LINE_MAX);
|
|
25756
25776
|
return ev;
|
|
25757
25777
|
}
|
|
25778
|
+
var TELEMETRY_WAIT_MS = 2e3;
|
|
25779
|
+
var TELEMETRY_ERROR_WAIT_MS = 8e3;
|
|
25758
25780
|
async function sendTelemetryEvent(ctx, event) {
|
|
25759
25781
|
if (!telemetryEnabled(ctx.config)) return;
|
|
25760
25782
|
try {
|
|
@@ -25765,7 +25787,7 @@ async function sendTelemetryEvent(ctx, event) {
|
|
|
25765
25787
|
method: "POST",
|
|
25766
25788
|
headers,
|
|
25767
25789
|
body: JSON.stringify(event),
|
|
25768
|
-
signal: AbortSignal.timeout(
|
|
25790
|
+
signal: AbortSignal.timeout(event.result === "error" ? TELEMETRY_ERROR_WAIT_MS : TELEMETRY_WAIT_MS)
|
|
25769
25791
|
});
|
|
25770
25792
|
await res.body?.cancel().catch(() => {
|
|
25771
25793
|
});
|
|
@@ -26566,7 +26588,7 @@ function cleanRules(v) {
|
|
|
26566
26588
|
const o = v && typeof v === "object" ? v : {};
|
|
26567
26589
|
const rules = {};
|
|
26568
26590
|
if (o.rules && typeof o.rules === "object") {
|
|
26569
|
-
for (const [k, t] of Object.entries(o.rules)) if (typeof t === "string" && t.trim() && t.length <
|
|
26591
|
+
for (const [k, t] of Object.entries(o.rules)) if (typeof t === "string" && t.trim() && t.length < 4e4) rules[k] = t;
|
|
26570
26592
|
}
|
|
26571
26593
|
const extra = Array.isArray(o.extra) ? o.extra.filter((t) => typeof t === "string" && t.trim().length > 0 && t.length < 4e3).slice(0, 20) : [];
|
|
26572
26594
|
return { rules, extra };
|
|
@@ -28472,6 +28494,9 @@ async function linkCommand(root, ctx, target, opts) {
|
|
|
28472
28494
|
out(t("runLinkPick"));
|
|
28473
28495
|
}
|
|
28474
28496
|
|
|
28497
|
+
// src/commands/deploy.ts
|
|
28498
|
+
import { randomUUID as randomUUID2 } from "crypto";
|
|
28499
|
+
|
|
28475
28500
|
// src/ask.ts
|
|
28476
28501
|
import { createInterface as createInterface2 } from "readline/promises";
|
|
28477
28502
|
var isInteractive = () => Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
@@ -28517,7 +28542,7 @@ function changedUnderSameName(root, files) {
|
|
|
28517
28542
|
import { spawnSync as spawnSync3 } from "child_process";
|
|
28518
28543
|
import { existsSync as existsSync15, mkdirSync as mkdirSync9, mkdtempSync, readFileSync as readFileSync13, rmSync as rmSync3, unlinkSync, writeFileSync as writeFileSync13 } from "fs";
|
|
28519
28544
|
import { tmpdir } from "os";
|
|
28520
|
-
import { dirname as dirname5, join as join17 } from "path";
|
|
28545
|
+
import { dirname as dirname5, join as join17, resolve as resolve4, sep as sep3 } from "path";
|
|
28521
28546
|
import { gunzipSync as gunzipSync2 } from "zlib";
|
|
28522
28547
|
|
|
28523
28548
|
// src/tar.ts
|
|
@@ -28630,7 +28655,7 @@ function readTar(tar) {
|
|
|
28630
28655
|
const data = tar.subarray(offset + BLOCK, offset + BLOCK + size);
|
|
28631
28656
|
offset += BLOCK + Math.ceil(size / BLOCK) * BLOCK;
|
|
28632
28657
|
if (type === "x") {
|
|
28633
|
-
const m =
|
|
28658
|
+
const m = /(?:^|\n)\d+ path=([^\n]*)\n/.exec(data.toString("utf8"));
|
|
28634
28659
|
paxPath = m ? m[1] : null;
|
|
28635
28660
|
continue;
|
|
28636
28661
|
}
|
|
@@ -28887,11 +28912,19 @@ var git2 = (cwd, args) => spawnSync3("git", args, { cwd, encoding: "utf8" });
|
|
|
28887
28912
|
function filesOf(gz) {
|
|
28888
28913
|
const map2 = /* @__PURE__ */ new Map();
|
|
28889
28914
|
for (const e3 of readTar(gunzipSync2(gz, { maxOutputLength: 200 * 1024 * 1024 }))) {
|
|
28890
|
-
|
|
28891
|
-
|
|
28915
|
+
if (e3.type !== "0" && e3.type !== "" && e3.type !== "\0") continue;
|
|
28916
|
+
const name = safeSourceName(e3.name);
|
|
28917
|
+
if (name) map2.set(name, e3.data);
|
|
28892
28918
|
}
|
|
28893
28919
|
return map2;
|
|
28894
28920
|
}
|
|
28921
|
+
function safeSourceName(raw) {
|
|
28922
|
+
const name = raw.replace(/\\/g, "/").replace(/^(\.\/)+/, "");
|
|
28923
|
+
if (!name || name.startsWith("/") || /^[a-zA-Z]:/.test(name) || name.includes("\0")) return null;
|
|
28924
|
+
if (name.split("/").some((p) => p === ".." || p === ".")) return null;
|
|
28925
|
+
if (privateProjectFile(name)) return null;
|
|
28926
|
+
return name;
|
|
28927
|
+
}
|
|
28895
28928
|
var same2 = (a, b) => a === void 0 && b === void 0 || a !== void 0 && b !== void 0 && a.equals(b);
|
|
28896
28929
|
var isBinary = (b) => !!b && b.subarray(0, 8e3).includes(0);
|
|
28897
28930
|
function migrationNumber(path) {
|
|
@@ -28937,8 +28970,10 @@ async function bringIn(root, ctx, projectId, behind) {
|
|
|
28937
28970
|
const state = { live, base: behind.base, conflicts: [], clashes: migrationClashes(baseFiles, liveFiles, ourFiles) };
|
|
28938
28971
|
let taken = 0;
|
|
28939
28972
|
let merged = 0;
|
|
28973
|
+
const folder = resolve4(root);
|
|
28940
28974
|
const write = (path, data) => {
|
|
28941
|
-
const abs =
|
|
28975
|
+
const abs = resolve4(folder, path);
|
|
28976
|
+
if (!abs.startsWith(folder + sep3)) return;
|
|
28942
28977
|
if (data === void 0) {
|
|
28943
28978
|
if (existsSync15(abs)) unlinkSync(abs);
|
|
28944
28979
|
return;
|
|
@@ -29433,6 +29468,27 @@ function addTool(form, ctx, model) {
|
|
|
29433
29468
|
const m = toDeployModel(model) ?? deployModelFromEnv(process.env);
|
|
29434
29469
|
if (m) form.append("model", m);
|
|
29435
29470
|
}
|
|
29471
|
+
async function attachArchive(ctx, form, projectId, archive, root) {
|
|
29472
|
+
if (archive.length <= UPLOAD_PART_BYTES) {
|
|
29473
|
+
form.append("archive", new Blob([new Uint8Array(archive)], { type: "application/gzip" }), "source.tar.gz");
|
|
29474
|
+
return;
|
|
29475
|
+
}
|
|
29476
|
+
const t = messages(root);
|
|
29477
|
+
const uploadId = randomUUID2();
|
|
29478
|
+
const parts2 = Math.ceil(archive.length / UPLOAD_PART_BYTES);
|
|
29479
|
+
for (let n2 = 0; n2 < parts2; n2++) {
|
|
29480
|
+
out(t("uploadingPart", { n: n2 + 1, total: parts2 }));
|
|
29481
|
+
const part = new FormData();
|
|
29482
|
+
part.append("projectId", projectId);
|
|
29483
|
+
part.append("uploadId", uploadId);
|
|
29484
|
+
part.append("part", String(n2));
|
|
29485
|
+
part.append("parts", String(parts2));
|
|
29486
|
+
part.append("data", new Blob([new Uint8Array(archive.subarray(n2 * UPLOAD_PART_BYTES, (n2 + 1) * UPLOAD_PART_BYTES))], { type: "application/octet-stream" }), `part-${n2}`);
|
|
29487
|
+
await apiRequest(ctx, "/api/cli/deploy/parts", UploadPartResponse, { method: "POST", form: part, idempotent: true, timeoutMs: 2 * 6e4 });
|
|
29488
|
+
}
|
|
29489
|
+
form.append("uploadId", uploadId);
|
|
29490
|
+
form.append("parts", String(parts2));
|
|
29491
|
+
}
|
|
29436
29492
|
async function catchUp(root, ctx, projectId, builtOn) {
|
|
29437
29493
|
const t = messages(root);
|
|
29438
29494
|
const work = await checkWork(ctx, root, projectId, builtOn);
|
|
@@ -29480,7 +29536,7 @@ async function deployVersion(root, ctx, opts, guest) {
|
|
|
29480
29536
|
addTool(form, ctx, opts.model);
|
|
29481
29537
|
if (wait && soundWanted(ctx.config)) form.append("soundHere", live ? "live" : "preview");
|
|
29482
29538
|
if (hold) form.append("hold", "1");
|
|
29483
|
-
|
|
29539
|
+
await attachArchive(ctx, form, project.projectId, archive, root);
|
|
29484
29540
|
const res = await apiRequest(ctx, "/api/cli/deploy", DeployResponse, { method: "POST", form, timeoutMs: 5 * 6e4 });
|
|
29485
29541
|
if (!guest) {
|
|
29486
29542
|
updateProject(root, { builtOn: res.number });
|
|
@@ -29863,7 +29919,7 @@ async function requestsOpenCommand(root, ctx, path, open2) {
|
|
|
29863
29919
|
// src/commands/start.ts
|
|
29864
29920
|
import { spawnSync as spawnSync4 } from "child_process";
|
|
29865
29921
|
import { existsSync as existsSync16, writeFileSync as writeFileSync15 } from "fs";
|
|
29866
|
-
import { join as join19, relative as relative3, resolve as
|
|
29922
|
+
import { join as join19, relative as relative3, resolve as resolve5 } from "path";
|
|
29867
29923
|
|
|
29868
29924
|
// src/commands/starter.ts
|
|
29869
29925
|
import { writeFileSync as writeFileSync14 } from "fs";
|
|
@@ -29987,7 +30043,7 @@ async function startCommand(cwd, ctx, id, opts = {}) {
|
|
|
29987
30043
|
out(START_WAIT_LINE);
|
|
29988
30044
|
out();
|
|
29989
30045
|
const fresh = kind === "new" || kind === "migrate" || kind === "guest" && sample;
|
|
29990
|
-
const here =
|
|
30046
|
+
const here = resolve5(cwd);
|
|
29991
30047
|
const sameSite = Boolean(choices.projectId && readProject(here)?.projectId === choices.projectId);
|
|
29992
30048
|
const update = kind === "update" && Boolean(choices.projectId);
|
|
29993
30049
|
const root = (fresh || update) && filesIn(here).length && !opts.here && !sameSite ? freeFolder(here, choices.slug ?? sample?.key ?? "site") : here;
|
|
@@ -30113,9 +30169,8 @@ ${choices.brief}
|
|
|
30113
30169
|
}
|
|
30114
30170
|
|
|
30115
30171
|
// src/commands/addon.ts
|
|
30116
|
-
import { dirname as dirname6, join as join20, resolve as
|
|
30117
|
-
import { mkdirSync as mkdirSync10 } from "fs";
|
|
30118
|
-
import { existsSync as existsSync17, writeFileSync as writeFileSync16 } from "fs";
|
|
30172
|
+
import { dirname as dirname6, join as join20, resolve as resolve6 } from "path";
|
|
30173
|
+
import { mkdirSync as mkdirSync10, existsSync as existsSync17, writeFileSync as writeFileSync16 } from "fs";
|
|
30119
30174
|
function linkedProjectId2(root) {
|
|
30120
30175
|
const id = readProject(root)?.projectId;
|
|
30121
30176
|
if (!id) throw new CliError("This folder is not linked to a DeployAI site. Run: npx deployai@latest login, then npx deployai@latest link", 1, "not_linked");
|
|
@@ -30271,7 +30326,7 @@ async function addonDoneCommand(root, ctx, runId, opts) {
|
|
|
30271
30326
|
let report2;
|
|
30272
30327
|
if (opts.report) {
|
|
30273
30328
|
try {
|
|
30274
|
-
report2 = readJson(
|
|
30329
|
+
report2 = readJson(resolve6(root, opts.report));
|
|
30275
30330
|
} catch {
|
|
30276
30331
|
throw new CliError(`Cannot read the report file ${opts.report} as JSON.`, 1, "usage");
|
|
30277
30332
|
}
|
|
@@ -30443,7 +30498,7 @@ async function local(page3, strategy, deps, dir, now) {
|
|
|
30443
30498
|
import { spawn as spawn4 } from "child_process";
|
|
30444
30499
|
import { existsSync as existsSync18, mkdirSync as mkdirSync12, readFileSync as readFileSync15, rmSync as rmSync5, writeFileSync as writeFileSync18 } from "fs";
|
|
30445
30500
|
import { tmpdir as tmpdir3 } from "os";
|
|
30446
|
-
import { join as join22, resolve as
|
|
30501
|
+
import { join as join22, resolve as resolve7 } from "path";
|
|
30447
30502
|
var SHOT_SIZES = [{ name: "phone", size: "390,844" }, { name: "desktop", size: "1440,900" }];
|
|
30448
30503
|
var PLAYWRIGHT = "playwright@1.56";
|
|
30449
30504
|
var WAIT_MS3 = 18e4;
|
|
@@ -30507,7 +30562,7 @@ async function shotCommand(root, address, opts = {}, run = runNpx) {
|
|
|
30507
30562
|
const browser = opts.webkit ? null : findBrowser();
|
|
30508
30563
|
if (!opts.webkit && !browser) throw new CliError("No Chrome or Edge was found on this computer. Install Chrome, set CHROME_PATH to its path, or run shot again with --webkit (it downloads Safari's engine first).", 1, "no_browser");
|
|
30509
30564
|
if (opts.webkit && await run(["--yes", PLAYWRIGHT, "install", "webkit"]) !== 0) throw new CliError("Safari's engine could not be installed. Run shot without --webkit to use Chrome or Edge.", 1, "shot_failed");
|
|
30510
|
-
const dir =
|
|
30565
|
+
const dir = resolve7(root, opts.out ?? join22(".deployai", "shots"));
|
|
30511
30566
|
mkdirSync12(dir, { recursive: true });
|
|
30512
30567
|
const taker = join22(tmpdir3(), "deployai-shot.cjs");
|
|
30513
30568
|
writeFileSync18(taker, TAKER);
|
|
@@ -30534,7 +30589,7 @@ import { spawnSync as spawnSync5 } from "child_process";
|
|
|
30534
30589
|
import { existsSync as existsSync19, mkdirSync as mkdirSync13, readdirSync as readdirSync6, statSync as statSync3, writeFileSync as writeFileSync19 } from "fs";
|
|
30535
30590
|
import { createRequire } from "module";
|
|
30536
30591
|
import { homedir as homedir3 } from "os";
|
|
30537
|
-
import { extname, join as join23, relative as relative4, resolve as
|
|
30592
|
+
import { extname, join as join23, relative as relative4, resolve as resolve8 } from "path";
|
|
30538
30593
|
var PHONE_WIDTH = 640;
|
|
30539
30594
|
var SHARP = "sharp@0.34";
|
|
30540
30595
|
var SKIP_DIRS2 = /* @__PURE__ */ new Set(["node_modules", ".git", ".deployai", "dist", ".astro", ".next"]);
|
|
@@ -30570,7 +30625,7 @@ function loadSharp() {
|
|
|
30570
30625
|
return createRequire(join23(dir, "package.json"))("sharp");
|
|
30571
30626
|
}
|
|
30572
30627
|
async function imagesCommand(root, folder, sharp = loadSharp) {
|
|
30573
|
-
const dir =
|
|
30628
|
+
const dir = resolve8(root, folder ?? "public");
|
|
30574
30629
|
const files = imagesIn(dir);
|
|
30575
30630
|
if (!files.length) {
|
|
30576
30631
|
out(`No JPG or PNG images under ${relative4(root, dir) || "."}.`);
|
|
@@ -30605,7 +30660,7 @@ async function imagesCommand(root, folder, sharp = loadSharp) {
|
|
|
30605
30660
|
// src/commands/blocks.ts
|
|
30606
30661
|
import { createHash as createHash5 } from "crypto";
|
|
30607
30662
|
import { existsSync as existsSync20, mkdirSync as mkdirSync14, readFileSync as readFileSync16, writeFileSync as writeFileSync20 } from "fs";
|
|
30608
|
-
import { dirname as dirname7, resolve as
|
|
30663
|
+
import { dirname as dirname7, resolve as resolve9, sep as sep4 } from "path";
|
|
30609
30664
|
import { gunzipSync as gunzipSync3 } from "zlib";
|
|
30610
30665
|
var BLOCKS = [
|
|
30611
30666
|
{ key: "dashboard", title: "The site's own dashboard: messages, pages, blog, shop, images, accessibility, documents. Add --update to get a newer version" },
|
|
@@ -30615,7 +30670,7 @@ var BLOCKS = [
|
|
|
30615
30670
|
];
|
|
30616
30671
|
var MAX_BYTES3 = 5 * 1024 * 1024;
|
|
30617
30672
|
var sha = (data) => createHash5("sha256").update(data).digest("hex");
|
|
30618
|
-
var lockPath = (base, key2) =>
|
|
30673
|
+
var lockPath = (base, key2) => resolve9(base, ".deployai", "blocks", `${key2}.lock.json`);
|
|
30619
30674
|
function readLock(base, key2) {
|
|
30620
30675
|
try {
|
|
30621
30676
|
return readJson(lockPath(base, key2));
|
|
@@ -30649,15 +30704,15 @@ async function blocksCommand(root, ctx, name, opts = {}) {
|
|
|
30649
30704
|
} catch {
|
|
30650
30705
|
throw new CliError("The block download is damaged. Try again.", 1, "api");
|
|
30651
30706
|
}
|
|
30652
|
-
const base =
|
|
30707
|
+
const base = resolve9(root);
|
|
30653
30708
|
const written = [];
|
|
30654
30709
|
const kept = [];
|
|
30655
30710
|
const updated = [];
|
|
30656
30711
|
const lock = readLock(base, block.key);
|
|
30657
30712
|
for (const e3 of entries) {
|
|
30658
30713
|
if (e3.type !== "0" && e3.type !== "\0") continue;
|
|
30659
|
-
const target =
|
|
30660
|
-
if (target === base || !target.startsWith(base +
|
|
30714
|
+
const target = resolve9(base, e3.name);
|
|
30715
|
+
if (target === base || !target.startsWith(base + sep4)) continue;
|
|
30661
30716
|
if (existsSync20(target)) {
|
|
30662
30717
|
const now = sha(readFileSync16(target));
|
|
30663
30718
|
if (now === sha(e3.data)) {
|
|
@@ -30667,8 +30722,8 @@ async function blocksCommand(root, ctx, name, opts = {}) {
|
|
|
30667
30722
|
lock[e3.name] = sha(e3.data);
|
|
30668
30723
|
updated.push(e3.name);
|
|
30669
30724
|
} else {
|
|
30670
|
-
const upstream =
|
|
30671
|
-
if (upstream.startsWith(base +
|
|
30725
|
+
const upstream = resolve9(base, ".deployai", "blocks", `${block.key}-upstream`, e3.name);
|
|
30726
|
+
if (upstream.startsWith(base + sep4)) {
|
|
30672
30727
|
mkdirSync14(dirname7(upstream), { recursive: true });
|
|
30673
30728
|
writeFileSync20(upstream, e3.data);
|
|
30674
30729
|
}
|
|
@@ -30747,7 +30802,7 @@ import { spawn as spawn5 } from "child_process";
|
|
|
30747
30802
|
import { copyFileSync, existsSync as existsSync21, mkdirSync as mkdirSync15, mkdtempSync as mkdtempSync3, readdirSync as readdirSync7, readFileSync as readFileSync17, rmSync as rmSync6, statSync as statSync4, writeFileSync as writeFileSync21 } from "fs";
|
|
30748
30803
|
import { createServer } from "http";
|
|
30749
30804
|
import { tmpdir as tmpdir4 } from "os";
|
|
30750
|
-
import { basename as basename2, dirname as dirname8, extname as extname2, join as join24, relative as relative5, sep as
|
|
30805
|
+
import { basename as basename2, dirname as dirname8, extname as extname2, join as join24, relative as relative5, sep as sep5 } from "path";
|
|
30751
30806
|
import { randomBytes } from "crypto";
|
|
30752
30807
|
|
|
30753
30808
|
// src/commands/brand-page.ts
|
|
@@ -30866,14 +30921,14 @@ function walk(dir, found = []) {
|
|
|
30866
30921
|
}
|
|
30867
30922
|
function existingFavicon(root) {
|
|
30868
30923
|
const web = webRoot(root);
|
|
30869
|
-
for (const f of ["favicon.ico", "favicon.svg", "favicon.png", "icon.svg", "icon.png"]) if (existsSync21(join24(web, f))) return relative5(root, join24(web, f)).split(
|
|
30924
|
+
for (const f of ["favicon.ico", "favicon.svg", "favicon.png", "icon.svg", "icon.png"]) if (existsSync21(join24(web, f))) return relative5(root, join24(web, f)).split(sep5).join("/");
|
|
30870
30925
|
for (const d of ["app", "src/app"]) for (const f of ["favicon.ico", "icon.svg", "icon.png", "icon.tsx", "icon.jpg"]) if (existsSync21(join24(root, d, f))) return `${d}/${f}`;
|
|
30871
30926
|
for (const f of walk(root).filter((p) => /\.(html|astro|tsx|jsx|vue|svelte)$/.test(p)).slice(0, 400)) {
|
|
30872
30927
|
try {
|
|
30873
30928
|
const m = readFileSync17(f, "utf8").match(/<link\b[^>]*\brel=["'](?:shortcut )?icon["'][^>]*>/i);
|
|
30874
30929
|
if (!m) continue;
|
|
30875
30930
|
const href = m[0].match(/\shref=["']([^"']+)/i)?.[1] ?? "";
|
|
30876
|
-
if (href.startsWith("data:") || /^https?:/.test(href) || existsSync21(join24(web, href.split("?")[0]))) return relative5(root, f).split(
|
|
30931
|
+
if (href.startsWith("data:") || /^https?:/.test(href) || existsSync21(join24(web, href.split("?")[0]))) return relative5(root, f).split(sep5).join("/");
|
|
30877
30932
|
} catch {
|
|
30878
30933
|
}
|
|
30879
30934
|
}
|
|
@@ -30903,7 +30958,7 @@ function findSource(root) {
|
|
|
30903
30958
|
const sharp = icons.find((i) => i.kind === "icon" && i.big);
|
|
30904
30959
|
if (sharp) return { path: sharp.path, from: "old-icon" };
|
|
30905
30960
|
const dirs = ["public", "static", "src/assets", "assets", "images", "img"].map((d) => join24(root, d));
|
|
30906
|
-
const logos = dirs.flatMap((d) => walk(d)).filter((p) => looksLikeLogo(relative5(root, p).split(
|
|
30961
|
+
const logos = dirs.flatMap((d) => walk(d)).filter((p) => looksLikeLogo(relative5(root, p).split(sep5).join("/")));
|
|
30907
30962
|
const logo = logos.find((p) => /\.svg$/i.test(p)) ?? logos[0];
|
|
30908
30963
|
if (logo) return { path: logo, from: "logo" };
|
|
30909
30964
|
const oldLogo = icons.find((i) => i.kind === "logo");
|
|
@@ -31104,7 +31159,7 @@ function sourceBytes(path) {
|
|
|
31104
31159
|
return { bytes: readFileSync17(path), type: TYPES[extname2(path).toLowerCase()] ?? "application/octet-stream" };
|
|
31105
31160
|
}
|
|
31106
31161
|
function report(root, r) {
|
|
31107
|
-
const where = relative5(root, webRoot(root)).split(
|
|
31162
|
+
const where = relative5(root, webRoot(root)).split(sep5).join("/") || "the site root";
|
|
31108
31163
|
out(`Written in ${where}: ${r.written.join(", ")}`);
|
|
31109
31164
|
if (r.skipped.length) out(`Left out, the picture is too small to stay sharp: ${r.skipped.join(", ")}. A larger logo makes them.`);
|
|
31110
31165
|
const tags2 = brandHeadTags(r.written);
|
|
@@ -31243,7 +31298,7 @@ function imageFiles(root) {
|
|
|
31243
31298
|
const dirs = [webRoot(root) === root ? null : webRoot(root), join24(root, "src"), join24(root, MIGRATION_DIR)].filter((d) => !!d);
|
|
31244
31299
|
const files = dirs.flatMap((d) => walkAll(d));
|
|
31245
31300
|
if (webRoot(root) === root) files.push(...walk(root));
|
|
31246
|
-
return [...new Set(files)].filter((p) => IMAGE_EXT.test(p) && !p.split(
|
|
31301
|
+
return [...new Set(files)].filter((p) => IMAGE_EXT.test(p) && !p.split(sep5).includes("icons") && !BRAND_FILES.includes(basename2(p)));
|
|
31247
31302
|
}
|
|
31248
31303
|
function walkAll(dir) {
|
|
31249
31304
|
const found = [];
|
|
@@ -31283,7 +31338,7 @@ function judgeFiles(root) {
|
|
|
31283
31338
|
if (!size) continue;
|
|
31284
31339
|
total++;
|
|
31285
31340
|
const verdict = judgeImage({ width: size.width, height: size.height, bytes: bytes.length, format: size.format });
|
|
31286
|
-
if (verdict !== "ok") findings.push({ where: relative5(root, f).split(
|
|
31341
|
+
if (verdict !== "ok") findings.push({ where: relative5(root, f).split(sep5).join("/"), width: size.width, height: size.height, verdict });
|
|
31287
31342
|
}
|
|
31288
31343
|
return { findings, total };
|
|
31289
31344
|
}
|
|
@@ -31391,7 +31446,7 @@ function buildProgram() {
|
|
|
31391
31446
|
if (lang === "he" || lang === "en") process.env.DEPLOYAI_LANG = lang;
|
|
31392
31447
|
}).showHelpAfterError();
|
|
31393
31448
|
const g = (cmd) => cmd.optsWithGlobals();
|
|
31394
|
-
const root = (cmd) =>
|
|
31449
|
+
const root = (cmd) => resolve10(g(cmd).dir ?? process.cwd());
|
|
31395
31450
|
const ctx = (cmd) => apiContext(g(cmd).api, root(cmd));
|
|
31396
31451
|
program.hook("preAction", async (_p, action) => {
|
|
31397
31452
|
if (["init", "start", "rules"].includes(action.name()) || !existsSync22(join25(root(action), "DEPLOYAI.md"))) return;
|