deployai 0.1.0-beta.12 → 0.1.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -3
- package/dist/index.js +1440 -308
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// src/cli.ts
|
|
9
|
-
import { resolve as
|
|
9
|
+
import { resolve as resolve6 } from "path";
|
|
10
10
|
import { Command } from "commander";
|
|
11
11
|
|
|
12
12
|
// src/api.ts
|
|
@@ -1215,7 +1215,7 @@ function issueHelpPath(code, locale = "he") {
|
|
|
1215
1215
|
return locale === "he" ? path : `/${locale}${path}`;
|
|
1216
1216
|
}
|
|
1217
1217
|
|
|
1218
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
1218
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/external.js
|
|
1219
1219
|
var external_exports = {};
|
|
1220
1220
|
__export(external_exports, {
|
|
1221
1221
|
$brand: () => $brand,
|
|
@@ -1478,7 +1478,7 @@ __export(external_exports, {
|
|
|
1478
1478
|
xor: () => xor
|
|
1479
1479
|
});
|
|
1480
1480
|
|
|
1481
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
1481
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/index.js
|
|
1482
1482
|
var core_exports2 = {};
|
|
1483
1483
|
__export(core_exports2, {
|
|
1484
1484
|
$ZodAny: () => $ZodAny,
|
|
@@ -1795,7 +1795,7 @@ __export(core_exports2, {
|
|
|
1795
1795
|
withParser: () => withParser
|
|
1796
1796
|
});
|
|
1797
1797
|
|
|
1798
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
1798
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/util.js
|
|
1799
1799
|
var util_exports = {};
|
|
1800
1800
|
__export(util_exports, {
|
|
1801
1801
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -1866,6 +1866,7 @@ __export(util_exports, {
|
|
|
1866
1866
|
required: () => required,
|
|
1867
1867
|
safeExtend: () => safeExtend,
|
|
1868
1868
|
shallowClone: () => shallowClone,
|
|
1869
|
+
sizeCaps: () => sizeCaps,
|
|
1869
1870
|
slugify: () => slugify,
|
|
1870
1871
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
1871
1872
|
toZod: () => toZod,
|
|
@@ -2385,6 +2386,18 @@ function prefixIssues(path, issues) {
|
|
|
2385
2386
|
function unwrapMessage(message) {
|
|
2386
2387
|
return typeof message === "string" ? message : message?.message;
|
|
2387
2388
|
}
|
|
2389
|
+
function sizeCaps(defChecks) {
|
|
2390
|
+
const caps = [];
|
|
2391
|
+
for (const ch of defChecks ?? []) {
|
|
2392
|
+
const d = ch._zod.def;
|
|
2393
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
2394
|
+
break;
|
|
2395
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
2396
|
+
if (max >= 0)
|
|
2397
|
+
caps.push([max, ch]);
|
|
2398
|
+
}
|
|
2399
|
+
return caps;
|
|
2400
|
+
}
|
|
2388
2401
|
function attachSchema(issues, start, inst) {
|
|
2389
2402
|
var _a3;
|
|
2390
2403
|
for (let i = start; i < issues.length; i++) {
|
|
@@ -2638,7 +2651,7 @@ function constantCatch(value) {
|
|
|
2638
2651
|
return fn;
|
|
2639
2652
|
}
|
|
2640
2653
|
|
|
2641
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
2654
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/core.js
|
|
2642
2655
|
var _a;
|
|
2643
2656
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
2644
2657
|
status: "aborted"
|
|
@@ -2760,7 +2773,7 @@ function config(newConfig) {
|
|
|
2760
2773
|
return globalConfig;
|
|
2761
2774
|
}
|
|
2762
2775
|
|
|
2763
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
2776
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/errors.js
|
|
2764
2777
|
function _getMessage() {
|
|
2765
2778
|
const internals = this._zod;
|
|
2766
2779
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -2952,7 +2965,7 @@ function prettifyError(error62) {
|
|
|
2952
2965
|
return lines.join("\n");
|
|
2953
2966
|
}
|
|
2954
2967
|
|
|
2955
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
2968
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/parse.js
|
|
2956
2969
|
function finalizeParams(callee, params) {
|
|
2957
2970
|
return { callee: params?.callee ?? callee, Err: params?.Err };
|
|
2958
2971
|
}
|
|
@@ -3112,7 +3125,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
3112
3125
|
};
|
|
3113
3126
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
3114
3127
|
|
|
3115
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
3128
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/regexes.js
|
|
3116
3129
|
var regexes_exports = {};
|
|
3117
3130
|
__export(regexes_exports, {
|
|
3118
3131
|
anyString: () => anyString,
|
|
@@ -3284,7 +3297,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
3284
3297
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
3285
3298
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
3286
3299
|
|
|
3287
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
3300
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/checks.js
|
|
3288
3301
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
3289
3302
|
var _a3;
|
|
3290
3303
|
inst._zod ?? (inst._zod = {});
|
|
@@ -3760,7 +3773,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
3760
3773
|
};
|
|
3761
3774
|
});
|
|
3762
3775
|
|
|
3763
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
3776
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/doc.js
|
|
3764
3777
|
var Doc = class {
|
|
3765
3778
|
constructor(args = [], closed = {}) {
|
|
3766
3779
|
this.content = [];
|
|
@@ -3801,14 +3814,14 @@ ${content.join("\n")}
|
|
|
3801
3814
|
}
|
|
3802
3815
|
};
|
|
3803
3816
|
|
|
3804
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
3817
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/versions.js
|
|
3805
3818
|
var version = {
|
|
3806
3819
|
major: 4,
|
|
3807
3820
|
minor: 6,
|
|
3808
|
-
patch:
|
|
3821
|
+
patch: 6
|
|
3809
3822
|
};
|
|
3810
3823
|
|
|
3811
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
3824
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/schemas.js
|
|
3812
3825
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
3813
3826
|
var _a3;
|
|
3814
3827
|
inst ?? (inst = {});
|
|
@@ -4561,6 +4574,31 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
4561
4574
|
return payload;
|
|
4562
4575
|
};
|
|
4563
4576
|
});
|
|
4577
|
+
function capSize(inst, size) {
|
|
4578
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
4579
|
+
if (!caps.length)
|
|
4580
|
+
return;
|
|
4581
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
4582
|
+
const parse3 = inst._zod.parse;
|
|
4583
|
+
inst._zod.parse = (payload, ctx) => {
|
|
4584
|
+
const n2 = size(payload.value);
|
|
4585
|
+
if (n2 > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
4586
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
4587
|
+
if (n2 > max && ch._zod.def.when(payload)) {
|
|
4588
|
+
const start = payload.issues.length;
|
|
4589
|
+
ch._zod.check(payload);
|
|
4590
|
+
payload.issues[start].continue = false;
|
|
4591
|
+
attachSchema(payload.issues, start, inst);
|
|
4592
|
+
return payload;
|
|
4593
|
+
}
|
|
4594
|
+
}
|
|
4595
|
+
}
|
|
4596
|
+
return parse3(payload, ctx);
|
|
4597
|
+
};
|
|
4598
|
+
}
|
|
4599
|
+
var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
|
|
4600
|
+
var mapSize = (input2) => input2 instanceof Map ? input2.size : -1;
|
|
4601
|
+
var setSize = (input2) => input2 instanceof Set ? input2.size : -1;
|
|
4564
4602
|
function handleArrayResult(result, final, index) {
|
|
4565
4603
|
if (result.issues.length) {
|
|
4566
4604
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -4604,6 +4642,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
4604
4642
|
}
|
|
4605
4643
|
return payload;
|
|
4606
4644
|
};
|
|
4645
|
+
capSize(inst, arraySize);
|
|
4607
4646
|
});
|
|
4608
4647
|
function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
4609
4648
|
const isPresent = key in input2;
|
|
@@ -4711,14 +4750,14 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
4711
4750
|
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
4712
4751
|
const sh = desc?.get ? desc.get.raw : def.shape ?? {};
|
|
4713
4752
|
if (sh) {
|
|
4714
|
-
const
|
|
4753
|
+
const get2 = () => {
|
|
4715
4754
|
const newSh = { ...sh };
|
|
4716
4755
|
Object.defineProperty(def, "shape", { value: newSh });
|
|
4717
|
-
|
|
4756
|
+
get2.raw = newSh;
|
|
4718
4757
|
return newSh;
|
|
4719
4758
|
};
|
|
4720
|
-
|
|
4721
|
-
Object.defineProperty(def, "shape", { get });
|
|
4759
|
+
get2.raw = sh;
|
|
4760
|
+
Object.defineProperty(def, "shape", { get: get2 });
|
|
4722
4761
|
}
|
|
4723
4762
|
const _normalized = cached(() => normalizeDef(def));
|
|
4724
4763
|
defineLazyInternal(inst, "propValues", (zod) => {
|
|
@@ -5560,6 +5599,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
5560
5599
|
return Promise.all(proms).then(() => payload);
|
|
5561
5600
|
return payload;
|
|
5562
5601
|
};
|
|
5602
|
+
capSize(inst, mapSize);
|
|
5563
5603
|
});
|
|
5564
5604
|
function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
|
|
5565
5605
|
if (keyResult.issues.length) {
|
|
@@ -5626,6 +5666,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
|
5626
5666
|
return Promise.all(proms).then(() => payload);
|
|
5627
5667
|
return payload;
|
|
5628
5668
|
};
|
|
5669
|
+
capSize(inst, setSize);
|
|
5629
5670
|
});
|
|
5630
5671
|
function handleSetResult(result, final) {
|
|
5631
5672
|
if (result.issues.length) {
|
|
@@ -6222,7 +6263,7 @@ function handleRefineResult(result, payload, input2, inst) {
|
|
|
6222
6263
|
}
|
|
6223
6264
|
}
|
|
6224
6265
|
|
|
6225
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6266
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/memoizer.js
|
|
6226
6267
|
var $ZodCyclicError = class extends Error {
|
|
6227
6268
|
constructor() {
|
|
6228
6269
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -6241,7 +6282,7 @@ var recursive = /* @__PURE__ */ new WeakMap();
|
|
|
6241
6282
|
var NONE = 0;
|
|
6242
6283
|
var ASSUMED = 1;
|
|
6243
6284
|
var PROVEN = 2;
|
|
6244
|
-
function isRecursive(inst, stack,
|
|
6285
|
+
function isRecursive(inst, stack, resolve7) {
|
|
6245
6286
|
const cached2 = recursive.get(inst);
|
|
6246
6287
|
if (cached2 !== void 0)
|
|
6247
6288
|
return cached2 ? PROVEN : NONE;
|
|
@@ -6251,7 +6292,7 @@ function isRecursive(inst, stack, resolve5) {
|
|
|
6251
6292
|
let result = NONE;
|
|
6252
6293
|
const check2 = (child) => {
|
|
6253
6294
|
if (result !== PROVEN && child?._zod) {
|
|
6254
|
-
const answer = isRecursive(child, stack,
|
|
6295
|
+
const answer = isRecursive(child, stack, resolve7);
|
|
6255
6296
|
if (answer > result)
|
|
6256
6297
|
result = answer;
|
|
6257
6298
|
}
|
|
@@ -6262,7 +6303,7 @@ function isRecursive(inst, stack, resolve5) {
|
|
|
6262
6303
|
const desc = Object.getOwnPropertyDescriptor(sh, key);
|
|
6263
6304
|
if (spread && !desc.enumerable)
|
|
6264
6305
|
continue;
|
|
6265
|
-
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack,
|
|
6306
|
+
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve7) : NONE;
|
|
6266
6307
|
if (child > answer)
|
|
6267
6308
|
answer = child;
|
|
6268
6309
|
}
|
|
@@ -6326,7 +6367,7 @@ function isRecursive(inst, stack, resolve5) {
|
|
|
6326
6367
|
break;
|
|
6327
6368
|
// `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly
|
|
6328
6369
|
case "lazy": {
|
|
6329
|
-
const inner = def._cachedInner ?? (
|
|
6370
|
+
const inner = def._cachedInner ?? (resolve7 ? inst._zod.innerType : void 0);
|
|
6330
6371
|
merge2(inner ? isRecursive(inner, stack, false) : ASSUMED);
|
|
6331
6372
|
break;
|
|
6332
6373
|
}
|
|
@@ -6499,7 +6540,7 @@ function isBackEdge(ctx, value) {
|
|
|
6499
6540
|
return backEdges !== void 0 && isRef(value) && backEdges.has(value);
|
|
6500
6541
|
}
|
|
6501
6542
|
|
|
6502
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6543
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/index.js
|
|
6503
6544
|
var locales_exports = {};
|
|
6504
6545
|
__export(locales_exports, {
|
|
6505
6546
|
ar: () => ar_default,
|
|
@@ -6567,7 +6608,7 @@ __export(locales_exports, {
|
|
|
6567
6608
|
zhTW: () => zh_TW_default
|
|
6568
6609
|
});
|
|
6569
6610
|
|
|
6570
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6611
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ar.js
|
|
6571
6612
|
var error = () => {
|
|
6572
6613
|
const Sizable = {
|
|
6573
6614
|
string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
@@ -6679,7 +6720,7 @@ function ar_default() {
|
|
|
6679
6720
|
};
|
|
6680
6721
|
}
|
|
6681
6722
|
|
|
6682
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6723
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/az.js
|
|
6683
6724
|
var error2 = () => {
|
|
6684
6725
|
const Sizable = {
|
|
6685
6726
|
string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
|
|
@@ -6790,7 +6831,7 @@ function az_default() {
|
|
|
6790
6831
|
};
|
|
6791
6832
|
}
|
|
6792
6833
|
|
|
6793
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
6834
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/be.js
|
|
6794
6835
|
function getBelarusianPlural(count, one, few, many) {
|
|
6795
6836
|
const absCount = Math.abs(count);
|
|
6796
6837
|
const lastDigit = absCount % 10;
|
|
@@ -6959,7 +7000,7 @@ function be_default() {
|
|
|
6959
7000
|
};
|
|
6960
7001
|
}
|
|
6961
7002
|
|
|
6962
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7003
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/bg.js
|
|
6963
7004
|
var error4 = () => {
|
|
6964
7005
|
const Sizable = {
|
|
6965
7006
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
@@ -7085,7 +7126,7 @@ function bg_default() {
|
|
|
7085
7126
|
};
|
|
7086
7127
|
}
|
|
7087
7128
|
|
|
7088
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7129
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/bn.js
|
|
7089
7130
|
var error5 = () => {
|
|
7090
7131
|
const Sizable = {
|
|
7091
7132
|
string: { unit: "\u0985\u0995\u09CD\u09B7\u09B0", verb: "\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7" },
|
|
@@ -7199,7 +7240,7 @@ function bn_default() {
|
|
|
7199
7240
|
};
|
|
7200
7241
|
}
|
|
7201
7242
|
|
|
7202
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7243
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ca.js
|
|
7203
7244
|
var error6 = () => {
|
|
7204
7245
|
const Sizable = {
|
|
7205
7246
|
string: { unit: "car\xE0cters", verb: "contenir" },
|
|
@@ -7313,7 +7354,7 @@ function ca_default() {
|
|
|
7313
7354
|
};
|
|
7314
7355
|
}
|
|
7315
7356
|
|
|
7316
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7357
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ckb.js
|
|
7317
7358
|
var error7 = () => {
|
|
7318
7359
|
const Sizable = {
|
|
7319
7360
|
string: { unit: "\u067E\u06CC\u062A", verb: "\u0628\u06CE\u062A" },
|
|
@@ -7446,7 +7487,7 @@ function ckb_default() {
|
|
|
7446
7487
|
};
|
|
7447
7488
|
}
|
|
7448
7489
|
|
|
7449
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7490
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/cs.js
|
|
7450
7491
|
var error8 = () => {
|
|
7451
7492
|
const Sizable = {
|
|
7452
7493
|
string: { unit: "znak\u016F", verb: "m\xEDt" },
|
|
@@ -7563,7 +7604,7 @@ function cs_default() {
|
|
|
7563
7604
|
};
|
|
7564
7605
|
}
|
|
7565
7606
|
|
|
7566
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7607
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/da.js
|
|
7567
7608
|
var error9 = () => {
|
|
7568
7609
|
const Sizable = {
|
|
7569
7610
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -7684,7 +7725,7 @@ function da_default() {
|
|
|
7684
7725
|
};
|
|
7685
7726
|
}
|
|
7686
7727
|
|
|
7687
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7728
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/de.js
|
|
7688
7729
|
var error10 = () => {
|
|
7689
7730
|
const Sizable = {
|
|
7690
7731
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -7798,7 +7839,7 @@ function de_default() {
|
|
|
7798
7839
|
};
|
|
7799
7840
|
}
|
|
7800
7841
|
|
|
7801
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7842
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/el.js
|
|
7802
7843
|
var error11 = () => {
|
|
7803
7844
|
const Sizable = {
|
|
7804
7845
|
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
@@ -7911,7 +7952,7 @@ function el_default() {
|
|
|
7911
7952
|
};
|
|
7912
7953
|
}
|
|
7913
7954
|
|
|
7914
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
7955
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/en.js
|
|
7915
7956
|
var error12 = () => {
|
|
7916
7957
|
const Sizable = {
|
|
7917
7958
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -8036,7 +8077,7 @@ function en_default() {
|
|
|
8036
8077
|
};
|
|
8037
8078
|
}
|
|
8038
8079
|
|
|
8039
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8080
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/eo.js
|
|
8040
8081
|
var error13 = () => {
|
|
8041
8082
|
const Sizable = {
|
|
8042
8083
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -8151,7 +8192,7 @@ function eo_default() {
|
|
|
8151
8192
|
};
|
|
8152
8193
|
}
|
|
8153
8194
|
|
|
8154
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8195
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/es.js
|
|
8155
8196
|
var error14 = () => {
|
|
8156
8197
|
const Sizable = {
|
|
8157
8198
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -8288,7 +8329,7 @@ function es_default() {
|
|
|
8288
8329
|
};
|
|
8289
8330
|
}
|
|
8290
8331
|
|
|
8291
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8332
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/fa.js
|
|
8292
8333
|
var error15 = () => {
|
|
8293
8334
|
const Sizable = {
|
|
8294
8335
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -8408,7 +8449,7 @@ function fa_default() {
|
|
|
8408
8449
|
};
|
|
8409
8450
|
}
|
|
8410
8451
|
|
|
8411
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8452
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/fi.js
|
|
8412
8453
|
var error16 = () => {
|
|
8413
8454
|
const Sizable = {
|
|
8414
8455
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
@@ -8526,7 +8567,7 @@ function fi_default() {
|
|
|
8526
8567
|
};
|
|
8527
8568
|
}
|
|
8528
8569
|
|
|
8529
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8570
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/fr.js
|
|
8530
8571
|
var error17 = () => {
|
|
8531
8572
|
const Sizable = {
|
|
8532
8573
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -8656,7 +8697,7 @@ function fr_default() {
|
|
|
8656
8697
|
};
|
|
8657
8698
|
}
|
|
8658
8699
|
|
|
8659
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8700
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/fr-CA.js
|
|
8660
8701
|
var error18 = () => {
|
|
8661
8702
|
const Sizable = {
|
|
8662
8703
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -8769,7 +8810,7 @@ function fr_CA_default() {
|
|
|
8769
8810
|
};
|
|
8770
8811
|
}
|
|
8771
8812
|
|
|
8772
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8813
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/gu.js
|
|
8773
8814
|
var error19 = () => {
|
|
8774
8815
|
const Sizable = {
|
|
8775
8816
|
string: { unit: "\u0A85\u0A95\u0ACD\u0AB7\u0AB0", verb: "\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F" },
|
|
@@ -8883,7 +8924,7 @@ function gu_default() {
|
|
|
8883
8924
|
};
|
|
8884
8925
|
}
|
|
8885
8926
|
|
|
8886
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
8927
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/he.js
|
|
8887
8928
|
var error20 = () => {
|
|
8888
8929
|
const TypeNames = {
|
|
8889
8930
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
@@ -9085,7 +9126,7 @@ function he_default() {
|
|
|
9085
9126
|
};
|
|
9086
9127
|
}
|
|
9087
9128
|
|
|
9088
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9129
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/hi.js
|
|
9089
9130
|
var error21 = () => {
|
|
9090
9131
|
const Sizable = {
|
|
9091
9132
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F" },
|
|
@@ -9197,7 +9238,7 @@ function hi_default() {
|
|
|
9197
9238
|
};
|
|
9198
9239
|
}
|
|
9199
9240
|
|
|
9200
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9241
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/hr.js
|
|
9201
9242
|
var error22 = () => {
|
|
9202
9243
|
const Sizable = {
|
|
9203
9244
|
string: { unit: "znakova", verb: "imati" },
|
|
@@ -9324,7 +9365,7 @@ function hr_default() {
|
|
|
9324
9365
|
};
|
|
9325
9366
|
}
|
|
9326
9367
|
|
|
9327
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9368
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/hu.js
|
|
9328
9369
|
var error23 = () => {
|
|
9329
9370
|
const Sizable = {
|
|
9330
9371
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -9438,7 +9479,7 @@ function hu_default() {
|
|
|
9438
9479
|
};
|
|
9439
9480
|
}
|
|
9440
9481
|
|
|
9441
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9482
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/hy.js
|
|
9442
9483
|
function getArmenianPlural(count, one, many) {
|
|
9443
9484
|
return Math.abs(count) === 1 ? one : many;
|
|
9444
9485
|
}
|
|
@@ -9597,7 +9638,7 @@ function hy_default() {
|
|
|
9597
9638
|
};
|
|
9598
9639
|
}
|
|
9599
9640
|
|
|
9600
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9641
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/id.js
|
|
9601
9642
|
var error25 = () => {
|
|
9602
9643
|
const Sizable = {
|
|
9603
9644
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -9709,7 +9750,7 @@ function id_default() {
|
|
|
9709
9750
|
};
|
|
9710
9751
|
}
|
|
9711
9752
|
|
|
9712
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9753
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/is.js
|
|
9713
9754
|
var error26 = () => {
|
|
9714
9755
|
const Sizable = {
|
|
9715
9756
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
@@ -9824,7 +9865,7 @@ function is_default() {
|
|
|
9824
9865
|
};
|
|
9825
9866
|
}
|
|
9826
9867
|
|
|
9827
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9868
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/it.js
|
|
9828
9869
|
var error27 = () => {
|
|
9829
9870
|
const Sizable = {
|
|
9830
9871
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -9938,7 +9979,7 @@ function it_default() {
|
|
|
9938
9979
|
};
|
|
9939
9980
|
}
|
|
9940
9981
|
|
|
9941
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
9982
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ja.js
|
|
9942
9983
|
var error28 = () => {
|
|
9943
9984
|
const Sizable = {
|
|
9944
9985
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
@@ -10051,7 +10092,7 @@ function ja_default() {
|
|
|
10051
10092
|
};
|
|
10052
10093
|
}
|
|
10053
10094
|
|
|
10054
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10095
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ka.js
|
|
10055
10096
|
var error29 = () => {
|
|
10056
10097
|
const Sizable = {
|
|
10057
10098
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -10169,7 +10210,7 @@ function ka_default() {
|
|
|
10169
10210
|
};
|
|
10170
10211
|
}
|
|
10171
10212
|
|
|
10172
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10213
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/km.js
|
|
10173
10214
|
var error30 = () => {
|
|
10174
10215
|
const Sizable = {
|
|
10175
10216
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -10285,12 +10326,12 @@ function km_default() {
|
|
|
10285
10326
|
};
|
|
10286
10327
|
}
|
|
10287
10328
|
|
|
10288
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10329
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/kh.js
|
|
10289
10330
|
function kh_default() {
|
|
10290
10331
|
return km_default();
|
|
10291
10332
|
}
|
|
10292
10333
|
|
|
10293
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10334
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/kn.js
|
|
10294
10335
|
var error31 = () => {
|
|
10295
10336
|
const Sizable = {
|
|
10296
10337
|
string: { unit: "\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1", verb: "\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1" },
|
|
@@ -10406,7 +10447,7 @@ function kn_default() {
|
|
|
10406
10447
|
};
|
|
10407
10448
|
}
|
|
10408
10449
|
|
|
10409
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10450
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ko.js
|
|
10410
10451
|
var error32 = () => {
|
|
10411
10452
|
const Sizable = {
|
|
10412
10453
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
@@ -10523,7 +10564,7 @@ function ko_default() {
|
|
|
10523
10564
|
};
|
|
10524
10565
|
}
|
|
10525
10566
|
|
|
10526
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10567
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/lt.js
|
|
10527
10568
|
var capitalizeFirstCharacter = (text) => {
|
|
10528
10569
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
10529
10570
|
};
|
|
@@ -10731,7 +10772,7 @@ function lt_default() {
|
|
|
10731
10772
|
};
|
|
10732
10773
|
}
|
|
10733
10774
|
|
|
10734
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10775
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/mk.js
|
|
10735
10776
|
var error34 = () => {
|
|
10736
10777
|
const Sizable = {
|
|
10737
10778
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -10846,7 +10887,7 @@ function mk_default() {
|
|
|
10846
10887
|
};
|
|
10847
10888
|
}
|
|
10848
10889
|
|
|
10849
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
10890
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ms.js
|
|
10850
10891
|
var error35 = () => {
|
|
10851
10892
|
const Sizable = {
|
|
10852
10893
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -10959,7 +11000,7 @@ function ms_default() {
|
|
|
10959
11000
|
};
|
|
10960
11001
|
}
|
|
10961
11002
|
|
|
10962
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11003
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ne.js
|
|
10963
11004
|
var error36 = () => {
|
|
10964
11005
|
const Sizable = {
|
|
10965
11006
|
string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B" },
|
|
@@ -11071,7 +11112,7 @@ function ne_default() {
|
|
|
11071
11112
|
};
|
|
11072
11113
|
}
|
|
11073
11114
|
|
|
11074
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11115
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/nl.js
|
|
11075
11116
|
var error37 = () => {
|
|
11076
11117
|
const Sizable = {
|
|
11077
11118
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -11187,7 +11228,7 @@ function nl_default() {
|
|
|
11187
11228
|
};
|
|
11188
11229
|
}
|
|
11189
11230
|
|
|
11190
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11231
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/nn.js
|
|
11191
11232
|
var error38 = () => {
|
|
11192
11233
|
const Sizable = {
|
|
11193
11234
|
string: { unit: "teikn", verb: "\xE5 ha" },
|
|
@@ -11301,7 +11342,7 @@ function nn_default() {
|
|
|
11301
11342
|
};
|
|
11302
11343
|
}
|
|
11303
11344
|
|
|
11304
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11345
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/no.js
|
|
11305
11346
|
var error39 = () => {
|
|
11306
11347
|
const Sizable = {
|
|
11307
11348
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
@@ -11415,7 +11456,7 @@ function no_default() {
|
|
|
11415
11456
|
};
|
|
11416
11457
|
}
|
|
11417
11458
|
|
|
11418
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11459
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ota.js
|
|
11419
11460
|
var error40 = () => {
|
|
11420
11461
|
const Sizable = {
|
|
11421
11462
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
@@ -11530,7 +11571,7 @@ function ota_default() {
|
|
|
11530
11571
|
};
|
|
11531
11572
|
}
|
|
11532
11573
|
|
|
11533
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11574
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ps.js
|
|
11534
11575
|
var error41 = () => {
|
|
11535
11576
|
const Sizable = {
|
|
11536
11577
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -11650,7 +11691,7 @@ function ps_default() {
|
|
|
11650
11691
|
};
|
|
11651
11692
|
}
|
|
11652
11693
|
|
|
11653
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11694
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/pl.js
|
|
11654
11695
|
var error42 = () => {
|
|
11655
11696
|
const Sizable = {
|
|
11656
11697
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
@@ -11765,7 +11806,7 @@ function pl_default() {
|
|
|
11765
11806
|
};
|
|
11766
11807
|
}
|
|
11767
11808
|
|
|
11768
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11809
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/pt.js
|
|
11769
11810
|
var error43 = () => {
|
|
11770
11811
|
const Sizable = {
|
|
11771
11812
|
string: { unit: "caracteres" },
|
|
@@ -11909,7 +11950,7 @@ function pt_default() {
|
|
|
11909
11950
|
};
|
|
11910
11951
|
}
|
|
11911
11952
|
|
|
11912
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
11953
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/pt-BR.js
|
|
11913
11954
|
var error44 = () => {
|
|
11914
11955
|
const Sizable = {
|
|
11915
11956
|
string: { unit: "caracteres" },
|
|
@@ -12054,7 +12095,7 @@ function pt_BR_default() {
|
|
|
12054
12095
|
};
|
|
12055
12096
|
}
|
|
12056
12097
|
|
|
12057
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12098
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ro.js
|
|
12058
12099
|
var error45 = () => {
|
|
12059
12100
|
const Sizable = {
|
|
12060
12101
|
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
@@ -12177,7 +12218,7 @@ function ro_default() {
|
|
|
12177
12218
|
};
|
|
12178
12219
|
}
|
|
12179
12220
|
|
|
12180
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12221
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ru.js
|
|
12181
12222
|
function getRussianPlural(count, one, few, many) {
|
|
12182
12223
|
const absCount = Math.abs(count);
|
|
12183
12224
|
const lastDigit = absCount % 10;
|
|
@@ -12346,7 +12387,7 @@ function ru_default() {
|
|
|
12346
12387
|
};
|
|
12347
12388
|
}
|
|
12348
12389
|
|
|
12349
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12390
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/sk.js
|
|
12350
12391
|
var error47 = () => {
|
|
12351
12392
|
const Sizable = {
|
|
12352
12393
|
string: { unit: "znakov", verb: "ma\u0165" },
|
|
@@ -12463,7 +12504,7 @@ function sk_default() {
|
|
|
12463
12504
|
};
|
|
12464
12505
|
}
|
|
12465
12506
|
|
|
12466
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12507
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/sl.js
|
|
12467
12508
|
var error48 = () => {
|
|
12468
12509
|
const Sizable = {
|
|
12469
12510
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -12578,7 +12619,7 @@ function sl_default() {
|
|
|
12578
12619
|
};
|
|
12579
12620
|
}
|
|
12580
12621
|
|
|
12581
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12622
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/sv.js
|
|
12582
12623
|
var error49 = () => {
|
|
12583
12624
|
const Sizable = {
|
|
12584
12625
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -12694,7 +12735,7 @@ function sv_default() {
|
|
|
12694
12735
|
};
|
|
12695
12736
|
}
|
|
12696
12737
|
|
|
12697
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12738
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ta.js
|
|
12698
12739
|
var error50 = () => {
|
|
12699
12740
|
const Sizable = {
|
|
12700
12741
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -12810,7 +12851,7 @@ function ta_default() {
|
|
|
12810
12851
|
};
|
|
12811
12852
|
}
|
|
12812
12853
|
|
|
12813
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12854
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/tg.js
|
|
12814
12855
|
var error51 = () => {
|
|
12815
12856
|
const Sizable = {
|
|
12816
12857
|
string: { unit: "\u0430\u043B\u043E\u043C\u0430\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
|
|
@@ -12927,7 +12968,7 @@ function tg_default() {
|
|
|
12927
12968
|
};
|
|
12928
12969
|
}
|
|
12929
12970
|
|
|
12930
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
12971
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/th.js
|
|
12931
12972
|
var error52 = () => {
|
|
12932
12973
|
const Sizable = {
|
|
12933
12974
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -13043,7 +13084,7 @@ function th_default() {
|
|
|
13043
13084
|
};
|
|
13044
13085
|
}
|
|
13045
13086
|
|
|
13046
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13087
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/tk.js
|
|
13047
13088
|
var error53 = () => {
|
|
13048
13089
|
const Sizable = {
|
|
13049
13090
|
string: { unit: "simwol", verb: "bolmaly" },
|
|
@@ -13151,7 +13192,7 @@ function tk_default() {
|
|
|
13151
13192
|
};
|
|
13152
13193
|
}
|
|
13153
13194
|
|
|
13154
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13195
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/tr.js
|
|
13155
13196
|
var error54 = () => {
|
|
13156
13197
|
const Sizable = {
|
|
13157
13198
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
@@ -13262,7 +13303,7 @@ function tr_default() {
|
|
|
13262
13303
|
};
|
|
13263
13304
|
}
|
|
13264
13305
|
|
|
13265
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13306
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/uk.js
|
|
13266
13307
|
var error55 = () => {
|
|
13267
13308
|
const Sizable = {
|
|
13268
13309
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -13376,12 +13417,12 @@ function uk_default() {
|
|
|
13376
13417
|
};
|
|
13377
13418
|
}
|
|
13378
13419
|
|
|
13379
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13420
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ua.js
|
|
13380
13421
|
function ua_default() {
|
|
13381
13422
|
return uk_default();
|
|
13382
13423
|
}
|
|
13383
13424
|
|
|
13384
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13425
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/ur.js
|
|
13385
13426
|
var error56 = () => {
|
|
13386
13427
|
const Sizable = {
|
|
13387
13428
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -13497,7 +13538,7 @@ function ur_default() {
|
|
|
13497
13538
|
};
|
|
13498
13539
|
}
|
|
13499
13540
|
|
|
13500
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13541
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/uz.js
|
|
13501
13542
|
var error57 = () => {
|
|
13502
13543
|
const Sizable = {
|
|
13503
13544
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
@@ -13611,7 +13652,7 @@ function uz_default() {
|
|
|
13611
13652
|
};
|
|
13612
13653
|
}
|
|
13613
13654
|
|
|
13614
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13655
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/vi.js
|
|
13615
13656
|
var error58 = () => {
|
|
13616
13657
|
const Sizable = {
|
|
13617
13658
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
@@ -13725,7 +13766,7 @@ function vi_default() {
|
|
|
13725
13766
|
};
|
|
13726
13767
|
}
|
|
13727
13768
|
|
|
13728
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13769
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/zh-CN.js
|
|
13729
13770
|
var error59 = () => {
|
|
13730
13771
|
const Sizable = {
|
|
13731
13772
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
@@ -13840,7 +13881,7 @@ function zh_CN_default() {
|
|
|
13840
13881
|
};
|
|
13841
13882
|
}
|
|
13842
13883
|
|
|
13843
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13884
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/zh-TW.js
|
|
13844
13885
|
var error60 = () => {
|
|
13845
13886
|
const Sizable = {
|
|
13846
13887
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
@@ -13953,7 +13994,7 @@ function zh_TW_default() {
|
|
|
13953
13994
|
};
|
|
13954
13995
|
}
|
|
13955
13996
|
|
|
13956
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
13997
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/locales/yo.js
|
|
13957
13998
|
var error61 = () => {
|
|
13958
13999
|
const Sizable = {
|
|
13959
14000
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
@@ -14066,7 +14107,7 @@ function yo_default() {
|
|
|
14066
14107
|
};
|
|
14067
14108
|
}
|
|
14068
14109
|
|
|
14069
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
14110
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/registries.js
|
|
14070
14111
|
var _a2;
|
|
14071
14112
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
14072
14113
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
@@ -14116,7 +14157,7 @@ function registry() {
|
|
|
14116
14157
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
14117
14158
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
14118
14159
|
|
|
14119
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
14160
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/compile.js
|
|
14120
14161
|
var INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
|
|
14121
14162
|
var FALLBACK_FLAG = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
|
|
14122
14163
|
var ZodCompileAsyncError = class extends Error {
|
|
@@ -15156,9 +15197,15 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
15156
15197
|
doc.write(`}`);
|
|
15157
15198
|
return outputVar;
|
|
15158
15199
|
}
|
|
15200
|
+
function generateSizeGate(doc, schema, size) {
|
|
15201
|
+
for (const [max, check2] of sizeCaps(schema._zod.def.checks)) {
|
|
15202
|
+
doc.write(`if (${size} > ${numericOperand(max, check2._zod.def.check)}) return INVALID;`);
|
|
15203
|
+
}
|
|
15204
|
+
}
|
|
15159
15205
|
function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
15160
15206
|
const def = schema._zod.def;
|
|
15161
15207
|
doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
|
|
15208
|
+
generateSizeGate(doc, schema, `${accessor}.length`);
|
|
15162
15209
|
const outputVar = buildsValue ? newVar(ctx) : null;
|
|
15163
15210
|
const iVar = newVar(ctx);
|
|
15164
15211
|
const elemVar = newVar(ctx);
|
|
@@ -15558,6 +15605,7 @@ function literalPropertyKey(ctx, key) {
|
|
|
15558
15605
|
function generateMapCheck(doc, ctx, schema, accessor) {
|
|
15559
15606
|
const def = schema._zod.def;
|
|
15560
15607
|
doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
|
|
15608
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
15561
15609
|
const outputVar = newVar(ctx);
|
|
15562
15610
|
const kVar = newVar(ctx);
|
|
15563
15611
|
const valVar = newVar(ctx);
|
|
@@ -15574,6 +15622,7 @@ function generateMapCheck(doc, ctx, schema, accessor) {
|
|
|
15574
15622
|
function generateSetCheck(doc, ctx, schema, accessor) {
|
|
15575
15623
|
const def = schema._zod.def;
|
|
15576
15624
|
doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
|
|
15625
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
15577
15626
|
const outputVar = newVar(ctx);
|
|
15578
15627
|
const valVar = newVar(ctx);
|
|
15579
15628
|
doc.write(`const ${outputVar} = new Set();`);
|
|
@@ -15718,7 +15767,7 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
|
|
|
15718
15767
|
return accessor;
|
|
15719
15768
|
}
|
|
15720
15769
|
|
|
15721
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
15770
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/api.js
|
|
15722
15771
|
function snapshotChecks(def) {
|
|
15723
15772
|
if (def.checks)
|
|
15724
15773
|
def.checks = [...def.checks];
|
|
@@ -16777,7 +16826,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
16777
16826
|
return inst;
|
|
16778
16827
|
}
|
|
16779
16828
|
|
|
16780
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
16829
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/to-json-schema.js
|
|
16781
16830
|
function assignProps(target, ...sources) {
|
|
16782
16831
|
for (const source of sources) {
|
|
16783
16832
|
for (const key of Reflect.ownKeys(source)) {
|
|
@@ -17307,7 +17356,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
17307
17356
|
return finalize(ctx, schema);
|
|
17308
17357
|
};
|
|
17309
17358
|
|
|
17310
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
17359
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/json-schema-processors.js
|
|
17311
17360
|
var narrowMin = (agg, key, value) => {
|
|
17312
17361
|
if (agg[key] === void 0 || value > agg[key])
|
|
17313
17362
|
agg[key] = value;
|
|
@@ -18055,7 +18104,7 @@ function toJSONSchema(input2, params) {
|
|
|
18055
18104
|
return finalize(ctx, input2);
|
|
18056
18105
|
}
|
|
18057
18106
|
|
|
18058
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18107
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/json-schema-generator.js
|
|
18059
18108
|
var JSONSchemaGenerator = class {
|
|
18060
18109
|
/** @deprecated Access via ctx instead */
|
|
18061
18110
|
get metadataRegistry() {
|
|
@@ -18133,10 +18182,10 @@ var JSONSchemaGenerator = class {
|
|
|
18133
18182
|
}
|
|
18134
18183
|
};
|
|
18135
18184
|
|
|
18136
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18185
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/json-schema.js
|
|
18137
18186
|
var json_schema_exports = {};
|
|
18138
18187
|
|
|
18139
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18188
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/schemas.js
|
|
18140
18189
|
var schemas_exports2 = {};
|
|
18141
18190
|
__export(schemas_exports2, {
|
|
18142
18191
|
ZodAny: () => ZodAny,
|
|
@@ -18317,7 +18366,7 @@ __export(schemas_exports2, {
|
|
|
18317
18366
|
xor: () => xor
|
|
18318
18367
|
});
|
|
18319
18368
|
|
|
18320
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18369
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/checks.js
|
|
18321
18370
|
var checks_exports2 = {};
|
|
18322
18371
|
__export(checks_exports2, {
|
|
18323
18372
|
endsWith: () => _endsWith,
|
|
@@ -18352,7 +18401,7 @@ __export(checks_exports2, {
|
|
|
18352
18401
|
uppercase: () => _uppercase
|
|
18353
18402
|
});
|
|
18354
18403
|
|
|
18355
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18404
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/errors.js
|
|
18356
18405
|
var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
18357
18406
|
function _lazyMethod(proto, key, make) {
|
|
18358
18407
|
Object.defineProperty(proto, key, {
|
|
@@ -18398,7 +18447,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, void 0
|
|
|
18398
18447
|
Parent: Error
|
|
18399
18448
|
});
|
|
18400
18449
|
|
|
18401
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18450
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/parse.js
|
|
18402
18451
|
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
|
|
18403
18452
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
18404
18453
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -18412,7 +18461,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
18412
18461
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
18413
18462
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
18414
18463
|
|
|
18415
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
18464
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/schemas.js
|
|
18416
18465
|
function _ensureDefaultLocale() {
|
|
18417
18466
|
if (!globalConfig.localeError)
|
|
18418
18467
|
config(en_default());
|
|
@@ -19877,7 +19926,7 @@ function preprocess(fn, schema) {
|
|
|
19877
19926
|
});
|
|
19878
19927
|
}
|
|
19879
19928
|
|
|
19880
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
19929
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/compat.js
|
|
19881
19930
|
var ZodIssueCode = {
|
|
19882
19931
|
invalid_type: "invalid_type",
|
|
19883
19932
|
too_big: "too_big",
|
|
@@ -19903,7 +19952,7 @@ var ZodFirstPartyTypeKind;
|
|
|
19903
19952
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
19904
19953
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
19905
19954
|
|
|
19906
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
19955
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/iso.js
|
|
19907
19956
|
var iso_exports = {};
|
|
19908
19957
|
__export(iso_exports, {
|
|
19909
19958
|
ZodISODate: () => ZodISODate,
|
|
@@ -19928,7 +19977,7 @@ function duration2(params) {
|
|
|
19928
19977
|
return _isoDuration(ZodISODuration, params);
|
|
19929
19978
|
}
|
|
19930
19979
|
|
|
19931
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
19980
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/from-json-schema.js
|
|
19932
19981
|
var z = {
|
|
19933
19982
|
...schemas_exports2,
|
|
19934
19983
|
...checks_exports2,
|
|
@@ -20661,7 +20710,7 @@ function fromJSONSchema(schema, params) {
|
|
|
20661
20710
|
return convertSchema(normalized, ctx);
|
|
20662
20711
|
}
|
|
20663
20712
|
|
|
20664
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
20713
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/core/visit.js
|
|
20665
20714
|
var RESOLVING = /* @__PURE__ */ Symbol("z.visit/resolving");
|
|
20666
20715
|
function visit(schema, fnOrHandlers) {
|
|
20667
20716
|
const fn = typeof fnOrHandlers === "function" ? fnOrHandlers : (node2, rewritten) => {
|
|
@@ -20816,7 +20865,7 @@ function visit(schema, fnOrHandlers) {
|
|
|
20816
20865
|
return run(schema);
|
|
20817
20866
|
}
|
|
20818
20867
|
|
|
20819
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
20868
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/deep-partial.js
|
|
20820
20869
|
function deepPartial(schema) {
|
|
20821
20870
|
return visit(schema, {
|
|
20822
20871
|
object: (s) => s.partial(),
|
|
@@ -20828,7 +20877,7 @@ function deepPartial(schema) {
|
|
|
20828
20877
|
});
|
|
20829
20878
|
}
|
|
20830
20879
|
|
|
20831
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
20880
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/in-out.js
|
|
20832
20881
|
function withChecks(side, checks) {
|
|
20833
20882
|
if (!checks?.length)
|
|
20834
20883
|
return side;
|
|
@@ -20858,7 +20907,7 @@ function output(schema) {
|
|
|
20858
20907
|
});
|
|
20859
20908
|
}
|
|
20860
20909
|
|
|
20861
|
-
// ../../node_modules/.pnpm/zod@4.6.
|
|
20910
|
+
// ../../node_modules/.pnpm/zod@4.6.6/node_modules/zod/v4/classic/coerce.js
|
|
20862
20911
|
var coerce_exports = {};
|
|
20863
20912
|
__export(coerce_exports, {
|
|
20864
20913
|
bigint: () => bigint3,
|
|
@@ -20958,7 +21007,31 @@ var EnvSetResponse = external_exports.object({ ok: external_exports.literal(true
|
|
|
20958
21007
|
var EnvRemoveRequest = external_exports.object({ projectId: external_exports.string(), key: external_exports.string() });
|
|
20959
21008
|
var EnvListResponse = external_exports.object({ vars: external_exports.array(external_exports.object({ key: external_exports.string(), isSecret: external_exports.boolean(), hint: external_exports.string() })) });
|
|
20960
21009
|
var RollbackRequest = external_exports.object({ projectId: external_exports.string(), number: external_exports.number().int().positive() });
|
|
20961
|
-
var PromoteRequest = external_exports.object({
|
|
21010
|
+
var PromoteRequest = external_exports.object({
|
|
21011
|
+
projectId: external_exports.string(),
|
|
21012
|
+
number: external_exports.number().int().positive(),
|
|
21013
|
+
/** The owner's yes to the version's SQL (D-541): the `hash` of the plan they were shown, so newer SQL is never run on it. */
|
|
21014
|
+
approveSql: external_exports.string().optional(),
|
|
21015
|
+
/** Destructive SQL (D-541): the database name the person typed at the terminal. */
|
|
21016
|
+
confirmDatabase: external_exports.string().optional()
|
|
21017
|
+
});
|
|
21018
|
+
var SqlPlanResponse = external_exports.object({
|
|
21019
|
+
number: external_exports.number(),
|
|
21020
|
+
migrationStatus: MigrationStatus.nullable(),
|
|
21021
|
+
/** The database binding the SQL runs on, null when the version declares none. */
|
|
21022
|
+
database: external_exports.string().nullable(),
|
|
21023
|
+
/** A database that does not exist yet: the seed runs too. */
|
|
21024
|
+
isNew: external_exports.boolean(),
|
|
21025
|
+
files: external_exports.array(external_exports.object({ file: external_exports.string(), kind: external_exports.string(), statements: external_exports.number(), skip: external_exports.boolean() })),
|
|
21026
|
+
/** Statements that delete or overwrite data: an agent may not approve them, a person types the database name. */
|
|
21027
|
+
destructive: external_exports.array(external_exports.object({ file: external_exports.string(), statement: external_exports.string() })),
|
|
21028
|
+
/** Files that stopped part way and changed since: only the dashboard sorts these out. */
|
|
21029
|
+
stuck: external_exports.array(external_exports.string()),
|
|
21030
|
+
hash: external_exports.string(),
|
|
21031
|
+
/** Only the owner approves SQL; a teammate gets the dashboard page to send them. */
|
|
21032
|
+
canApprove: external_exports.boolean(),
|
|
21033
|
+
url: external_exports.string()
|
|
21034
|
+
});
|
|
20962
21035
|
var StatusResponse = external_exports.object({
|
|
20963
21036
|
project: Project,
|
|
20964
21037
|
queue: external_exports.object({ position: external_exports.number(), running: external_exports.boolean() }),
|
|
@@ -20969,6 +21042,8 @@ var StatusResponse = external_exports.object({
|
|
|
20969
21042
|
error: external_exports.string().nullable(),
|
|
20970
21043
|
logTail: external_exports.string().nullable(),
|
|
20971
21044
|
migrationStatus: MigrationStatus.nullable().optional(),
|
|
21045
|
+
/** Why the SQL failed, when it did (D-541). */
|
|
21046
|
+
migrationError: external_exports.string().nullable().optional(),
|
|
20972
21047
|
/** A ready version that is not live: its preview, for the owner to look at before promote (D-505). */
|
|
20973
21048
|
preview: external_exports.string().nullable().optional(),
|
|
20974
21049
|
/** Going live right now (D-528). */
|
|
@@ -21174,6 +21249,7 @@ var ARCH_NODES = [
|
|
|
21174
21249
|
{ id: "oauth", kind: "external", zone: "services", label: "Google / GitHub OAuth", summary: "\u05D4\u05EA\u05D7\u05D1\u05E8\u05D5\u05EA \u05E2\u05DD Google \u05D0\u05D5 GitHub \u05D3\u05E8\u05DA Better Auth.", summaryEn: "Log in with Google or GitHub through Better Auth.", code: ["apps/web/src/server/auth.ts"], env: ["GOOGLE_CLIENT_ID", "GOOGLE_CLIENT_SECRET", "GITHUB_CLIENT_ID", "GITHUB_CLIENT_SECRET"], decisions: ["D-020"] },
|
|
21175
21250
|
{ id: "payments", kind: "external", zone: "services", label: "Payment provider (Cardcom)", summary: "\u05E7\u05D0\u05E8\u05D3\u05E7\u05D5\u05DD \u05DB\u05D1\u05E8\u05D9\u05E8\u05EA \u05DE\u05D7\u05D3\u05DC, \u05D5\u05E0\u05D1\u05D7\u05E8 \u05D1\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05D4\u05D0\u05D3\u05DE\u05D9\u05DF (\u05D0\u05D5 \u05DE\u05D3\u05D5\u05DE\u05D4 \u05DC\u05D1\u05D3\u05D9\u05E7\u05D5\u05EA). \u05D4\u05DB\u05E8\u05D8\u05D9\u05E1 \u05DE\u05D5\u05E7\u05DC\u05D3 \u05D1\u05D3\u05E3 \u05D4\u05DE\u05D0\u05D5\u05D1\u05D8\u05D7 \u05E9\u05DC \u05E7\u05D0\u05E8\u05D3\u05E7\u05D5\u05DD \u05D5\u05E0\u05E9\u05DE\u05E8 \u05DB\u05D8\u05D5\u05E7\u05DF \u05DE\u05D5\u05E6\u05E4\u05DF, \u05DB\u05DC \u05D7\u05D9\u05D5\u05D1 \u05E2\u05DD \u05DE\u05E4\u05EA\u05D7 \u05D0\u05D9\u05D3\u05DE\u05E4\u05D5\u05D8\u05E0\u05D8\u05D9\u05D5\u05EA, \u05D5\u05E7\u05D0\u05E8\u05D3\u05E7\u05D5\u05DD \u05DE\u05E4\u05D9\u05E7\u05D4 \u05D7\u05E9\u05D1\u05D5\u05E0\u05D9\u05EA \u05DE\u05E1 \u05DC\u05DB\u05DC \u05D7\u05D9\u05D5\u05D1 \u05D5\u05D7\u05E9\u05D1\u05D5\u05E0\u05D9\u05EA \u05D6\u05D9\u05DB\u05D5\u05D9 \u05DC\u05DB\u05DC \u05D4\u05D7\u05D6\u05E8.", summaryEn: "Cardcom by default, chosen in admin settings (or simulated for tests). The card is typed on the secure Cardcom page and saved as a sealed token, every charge carries an idempotency key, and Cardcom issues a tax invoice per charge and a credit invoice per refund.", code: ["apps/web/src/server/billing/provider.ts", "apps/web/src/server/billing/cardcom.ts", "apps/web/src/server/billing/card-pages.ts", "apps/web/src/app/api/billing/card"], env: ["BILLING_PROVIDER", "BILLING_MOCK_FAIL", "CARDCOM_TERMINAL", "CARDCOM_API_NAME", "CARDCOM_API_PASSWORD", "CARDCOM_INVOICES", "CARDCOM_CSS_URL", "CARDCOM_TOKEN_KEY", "CARDCOM_DEPARTMENT_ID"], portability: "Payments", decisions: ["D-175", "D-292"] },
|
|
21176
21251
|
{ id: "registrar", kind: "external", zone: "services", label: "Domain registrars (Cloudflare, LiveDNS)", summary: "\u05E7\u05E0\u05D9\u05D9\u05EA \u05D3\u05D5\u05DE\u05D9\u05D9\u05E0\u05D9\u05DD \u05DC\u05D0\u05EA\u05E8: \u05DB\u05DC \u05E9\u05DD \u05D4\u05D5\u05DC\u05DA \u05DC\u05E8\u05E9\u05DD \u05D4\u05D6\u05D5\u05DC \u05D1\u05D9\u05D5\u05EA\u05E8 \u05E9\u05E4\u05D5\u05E2\u05DC, \u05DB\u05DC \u05E8\u05E9\u05DD \u05D1\u05E2\u05DC\u05D5\u05EA \u05D5\u05D1\u05E2\u05DE\u05DC\u05D4 \u05DE\u05E9\u05DC\u05D5 (Cloudflare \u05D1\u05D3\u05D5\u05DC\u05E8\u05D9\u05DD \u05DC\u05DB\u05DC \u05E9\u05DD, LiveDNS \u05DE\u05E0\u05E7\u05D5\u05D3\u05D5\u05EA \u05E7\u05E8\u05D3\u05D9\u05D8 \u05DC\u05E4\u05D9 \u05D4\u05DE\u05D7\u05D9\u05E8\u05D5\u05DF \u05E9\u05E0\u05E7\u05E8\u05D0 \u05DB\u05DC \u05D9\u05D5\u05DD, \u05D0\u05D5 \u05D9\u05D3\u05E0\u05D9 \u05DE\u05EA\u05D5\u05E8 \u05D4\u05E6\u05D5\u05D5\u05EA), \u05DE\u05D7\u05D9\u05E8 \u05DB\u05DC \u05E1\u05D9\u05D5\u05DE\u05EA \u05E0\u05D1\u05D3\u05E7 \u05DB\u05DC \u05D9\u05D5\u05DD (\u05D5\u05D0\u05E4\u05E9\u05E8 \u05DC\u05DB\u05D1\u05D5\u05EA \u05E1\u05D9\u05D5\u05DE\u05D5\u05EA), \u05E8\u05D9\u05E9\u05D5\u05DD \u05D0\u05D7\u05D3 \u05DC\u05DB\u05DC \u05D4\u05D6\u05DE\u05E0\u05D4, \u05D9\u05D5\u05DE\u05DF \u05E7\u05E8\u05D9\u05D0\u05D5\u05EA \u05DC\u05DB\u05DC \u05D4\u05D6\u05DE\u05E0\u05D4, \u05D5\u05D7\u05D9\u05D3\u05D5\u05E9 \u05E9\u05E0\u05EA\u05D9 \u05D0\u05E6\u05DC \u05D0\u05D5\u05EA\u05D5 \u05E8\u05E9\u05DD. \u05DC\u05D3\u05D5\u05DE\u05D9\u05D9\u05DF \u05E9\u05E0\u05E7\u05E0\u05D4: \u05D3\u05D5\u05D0\u05E8 \u05D3\u05E8\u05DA Cloudflare Email Routing.", summaryEn: "Buying domains for a site: each name goes to the cheapest registrar that is on, each with its own cost and fee (Cloudflare in dollars per name, LiveDNS from credit points priced by its list, read daily, or by hand from the team queue), the price of every extension checked daily (some can be turned off), one registration per order, a call log per order, yearly renewal at the same registrar. For a bought domain: email through Cloudflare Email Routing.", code: ["apps/web/src/server/registrar.ts", "apps/web/src/server/registrar-livedns.ts", "apps/web/src/server/registrar-log.ts", "apps/web/src/server/domain-sales.ts", "apps/web/src/server/domain-extensions.ts", "apps/web/src/server/domain-email.ts", "apps/web/src/server/billing/services.ts"], env: ["CF_REGISTRAR_TOKEN", "LIVEDNS_USER", "LIVEDNS_PASSWORD"], decisions: ["D-299", "D-300", "D-301", "D-458", "D-486", "D-489", "D-491"] },
|
|
21252
|
+
{ id: "mailbox-providers", kind: "external", zone: "services", label: "Mailbox providers (Google Workspace, Zoho Mail)", summary: "\u05EA\u05D9\u05D1\u05D5\u05EA \u05D3\u05D5\u05D0\u05E8 \u05E9\u05E0\u05DE\u05DB\u05D5\u05E8 \u05E2\u05DC \u05D3\u05D5\u05DE\u05D9\u05D9\u05DF \u05E9\u05DC \u05D4\u05DC\u05E7\u05D5\u05D7: Google Workspace \u05D3\u05E8\u05DA \u05EA\u05D5\u05DB\u05E0\u05D9\u05EA \u05D4\u05DE\u05E9\u05D5\u05D5\u05E7\u05D9\u05DD \u05D5\u05BEZoho Mail \u05D3\u05E8\u05DA \u05EA\u05D5\u05DB\u05E0\u05D9\u05EA \u05D4\u05E9\u05D5\u05EA\u05E4\u05D9\u05DD, \u05D1\u05D7\u05D9\u05D5\u05D1 \u05D7\u05D5\u05D3\u05E9\u05D9 \u05DC\u05DB\u05DC \u05EA\u05D9\u05D1\u05D4. \u05D4\u05DE\u05E4\u05EA\u05D7\u05D5\u05EA \u05DE\u05D5\u05DB\u05E0\u05D9\u05DD, \u05D4\u05DE\u05D7\u05D1\u05E8 \u05D9\u05D9\u05D1\u05E0\u05D4 \u05DB\u05E9\u05D9\u05D4\u05D9\u05D5 \u05D7\u05D5\u05D6\u05D4 \u05D5\u05DE\u05E4\u05EA\u05D7\u05D5\u05EA \u05D1\u05D3\u05D9\u05E7\u05D4.", summaryEn: "Mailboxes we sell on the customer domain: Google Workspace through the reseller program and Zoho Mail through the partner program, billed per mailbox per month. The keys are ready; the connector is built once a contract and sandbox keys exist.", code: ["apps/web/src/server/mailbox.ts"], env: ["GOOGLE_RESELLER_KEY", "GOOGLE_RESELLER_ADMIN", "ZOHO_PARTNER_CLIENT_ID", "ZOHO_PARTNER_CLIENT_SECRET", "ZOHO_PARTNER_REFRESH_TOKEN"], decisions: ["D-547"] },
|
|
21177
21253
|
{ id: "mcp", kind: "external", zone: "services", label: "MCP for AI tools (/api/mcp)", summary: "ChatGPT \u05D5\u05BEClaude \u05DE\u05EA\u05D7\u05D1\u05E8\u05D9\u05DD \u05D1\u05DC\u05D9 \u05D8\u05E8\u05DE\u05D9\u05E0\u05DC: OAuth \u05E2\u05DD \u05D0\u05D9\u05E9\u05D5\u05E8 \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF, \u05D5\u05D0\u05D6 \u05DB\u05DC\u05D9\u05DD \u05DC\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05D0\u05EA\u05E8\u05D9\u05DD, \u05D1\u05D3\u05D9\u05E7\u05D4, \u05D4\u05E2\u05DC\u05D0\u05EA \u05D2\u05E8\u05E1\u05D4 \u05DC\u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4, \u05D4\u05E8\u05E6\u05EA \u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05E9\u05D4\u05D0\u05EA\u05E8 \u05E7\u05E0\u05D4 (\u05D4\u05E7\u05E0\u05D9\u05D9\u05D4 \u05E8\u05E7 \u05D1\u05D0\u05EA\u05E8), \u05D5\u05D4\u05E2\u05DC\u05D0\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E8\u05E7 \u05E2\u05DD \u05D4\u05E8\u05E9\u05D0\u05D4 \u05D5\u05D0\u05D9\u05E9\u05D5\u05E8.", summaryEn: "ChatGPT and Claude connect without a terminal: OAuth with a browser consent, then tools to list sites, check, upload a version to a preview, run add-ons the site owns (buying stays on the site), and go live only with the permission and a yes.", code: ["apps/web/src/app/api/mcp/route.ts", "apps/web/src/server/mcp-tools.ts", "apps/web/src/server/auth.ts"], decisions: ["D-302"] },
|
|
21178
21254
|
{ id: "npm", kind: "external", zone: "services", label: "npm registry", summary: "\u05DE\u05E4\u05D9\u05E5 \u05D0\u05EA \u05D4\u05BECLI, \u05D5\u05DE\u05DE\u05E0\u05D5 \u05D4\u05D1\u05E0\u05D9\u05D9\u05D4 \u05DE\u05EA\u05E7\u05D9\u05E0\u05D4 \u05EA\u05DC\u05D5\u05D9\u05D5\u05EA.", summaryEn: "Distributes the CLI, and the build installs dependencies from it." },
|
|
21179
21255
|
{ id: "pagespeed", kind: "external", zone: "services", label: "Google PageSpeed Insights", summary: "\u05D1\u05D3\u05D9\u05E7\u05D5\u05EA \u05D4\u05DE\u05D4\u05D9\u05E8\u05D5\u05EA, \u05D4\u05E0\u05D2\u05D9\u05E9\u05D5\u05EA \u05D5\u05D4\u05BESEO \u05D4\u05D7\u05D9\u05E0\u05DE\u05D9\u05D5\u05EA: Lighthouse \u05D1\u05DE\u05E2\u05D1\u05D3\u05D4 \u05E9\u05DC \u05D2\u05D5\u05D2\u05DC (\u05DB\u05D5\u05DC\u05DC \u05E1\u05D5\u05DB\u05E0\u05D9 AI) \u05D5\u05E0\u05EA\u05D5\u05E0\u05D9 \u05DE\u05D1\u05E7\u05E8\u05D9\u05DD \u05D0\u05DE\u05D9\u05EA\u05D9\u05D9\u05DD.", summaryEn: "The free speed, accessibility and SEO tests: Lighthouse run at Google (AI agents included) plus real visitor data.", env: ["PAGESPEED_API_KEY"], decisions: ["D-199", "D-222"] },
|
|
@@ -21315,9 +21391,109 @@ var DEFAULT_FLEET = {
|
|
|
21315
21391
|
};
|
|
21316
21392
|
var DEFAULT_PROFIT = { paying: 1e4, priceAgorot: 4e3, freeAccounts: 0, sitesPerPaying: 1, profile: "typical", ownDomainShare: DEFAULT_FLEET.ownDomainShare, zoneOwned: true, demoHostnames: DEFAULT_FLEET.demoHostnames, ownEmailsPerAccount: DEFAULT_FLEET.ownEmailsPerAccount, otherFixedUsd: DEFAULT_FLEET.otherFixedUsd, teamIls: 0, incomeTax: 0.23 };
|
|
21317
21393
|
|
|
21394
|
+
// ../shared/src/html.ts
|
|
21395
|
+
function stripHtmlComments(html) {
|
|
21396
|
+
return html.replace(/<!--[\s\S]*?-->/g, (m) => m.replace(/[^\n]/g, " "));
|
|
21397
|
+
}
|
|
21398
|
+
function stripScripts(html) {
|
|
21399
|
+
return html.replace(/(<(script|style|template|noscript)\b[^>]*>)([\s\S]*?)(<\/\2\s*>)/gi, (_m, open2, _t, body, close) => open2 + body.replace(/[^\n]/g, " ") + close);
|
|
21400
|
+
}
|
|
21401
|
+
function parseAttrs(tag) {
|
|
21402
|
+
const attrs = {};
|
|
21403
|
+
const inner = tag.replace(/^<\s*[\w:-]+/, "").replace(/\/?>$/, "");
|
|
21404
|
+
const re = /([^\s=/>"']+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g;
|
|
21405
|
+
let m;
|
|
21406
|
+
while (m = re.exec(inner)) attrs[m[1].toLowerCase()] = m[2] ?? m[3] ?? m[4] ?? "";
|
|
21407
|
+
return attrs;
|
|
21408
|
+
}
|
|
21409
|
+
function tags(html, name) {
|
|
21410
|
+
const re = new RegExp(`<${name}\\b[^>]*>`, "gi");
|
|
21411
|
+
const out2 = [];
|
|
21412
|
+
let m;
|
|
21413
|
+
while (m = re.exec(html)) out2.push({ attrs: parseAttrs(m[0]), index: m.index });
|
|
21414
|
+
return out2;
|
|
21415
|
+
}
|
|
21416
|
+
function decode3(text) {
|
|
21417
|
+
return text.replace(/&#(\d{1,7});/g, (m, n2) => Number(n2) > 0 && Number(n2) <= 1114111 ? String.fromCodePoint(Number(n2)) : m).replace(/&#x([0-9a-f]{1,6});/gi, (m, h) => parseInt(h, 16) > 0 && parseInt(h, 16) <= 1114111 ? String.fromCodePoint(parseInt(h, 16)) : m).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'|'/g, "'").replace(/ /g, " ").replace(/\s+/g, " ").trim();
|
|
21418
|
+
}
|
|
21419
|
+
function titleOfPage(html) {
|
|
21420
|
+
const m = /<title\b[^>]*>([\s\S]*?)<\/title>/i.exec(html);
|
|
21421
|
+
const t = m ? decode3(m[1].replace(/<[^>]*>/g, "")) : "";
|
|
21422
|
+
return t || null;
|
|
21423
|
+
}
|
|
21424
|
+
function metaContent(html, key) {
|
|
21425
|
+
for (const t of tags(html, "meta")) {
|
|
21426
|
+
const k = (t.attrs.name ?? t.attrs.property ?? "").toLowerCase();
|
|
21427
|
+
if (k === key && t.attrs.content?.trim()) return decode3(t.attrs.content);
|
|
21428
|
+
}
|
|
21429
|
+
return null;
|
|
21430
|
+
}
|
|
21431
|
+
function htmlTag(html) {
|
|
21432
|
+
return tags(html, "html")[0] ?? null;
|
|
21433
|
+
}
|
|
21434
|
+
function isSpaShell(html) {
|
|
21435
|
+
return /<div\b[^>]*\bid\s*=\s*["'](?:root|app|__nuxt|svelte)["'][^>]*>\s*<\/div>/i.test(html) && !/<h1\b/i.test(html);
|
|
21436
|
+
}
|
|
21437
|
+
|
|
21318
21438
|
// ../shared/src/tool-fetch.ts
|
|
21319
21439
|
var FILE_BYTES = 512 * 1024;
|
|
21320
21440
|
|
|
21441
|
+
// ../shared/src/seo-audit.ts
|
|
21442
|
+
var textOf = (html) => decode3(html.replace(/<[^>]*>/g, " "));
|
|
21443
|
+
function readPageSeo(html, headers = {}) {
|
|
21444
|
+
const clean = stripScripts(stripHtmlComments(html));
|
|
21445
|
+
const headings = [];
|
|
21446
|
+
const re = /<h([1-6])\b[^>]*>([\s\S]*?)<\/h\1\s*>/gi;
|
|
21447
|
+
let m;
|
|
21448
|
+
while (m = re.exec(clean)) headings.push({ level: Number(m[1]), text: textOf(m[2]).slice(0, 160) });
|
|
21449
|
+
const links = tags(clean, "link");
|
|
21450
|
+
const rel = (t) => (t.attrs.rel ?? "").toLowerCase().split(/\s+/);
|
|
21451
|
+
const imgs = tags(clean, "img");
|
|
21452
|
+
const root = htmlTag(clean);
|
|
21453
|
+
return {
|
|
21454
|
+
title: titleOfPage(clean),
|
|
21455
|
+
description: metaContent(clean, "description"),
|
|
21456
|
+
h1: headings.filter((h) => h.level === 1).map((h) => h.text),
|
|
21457
|
+
headings,
|
|
21458
|
+
lang: root?.attrs.lang?.trim() || null,
|
|
21459
|
+
dir: root?.attrs.dir?.trim() || null,
|
|
21460
|
+
canonical: links.find((t) => rel(t).includes("canonical"))?.attrs.href?.trim() || null,
|
|
21461
|
+
robots: metaContent(clean, "robots"),
|
|
21462
|
+
xRobots: headers["x-robots-tag"] ?? null,
|
|
21463
|
+
hreflang: links.filter((t) => rel(t).includes("alternate") && t.attrs.hreflang && t.attrs.href).map((t) => ({ lang: t.attrs.hreflang.trim(), href: t.attrs.href.trim() })),
|
|
21464
|
+
viewport: !!metaContent(clean, "viewport"),
|
|
21465
|
+
images: imgs.length,
|
|
21466
|
+
imagesWithoutAlt: imgs.filter((t) => !("alt" in t.attrs)).length,
|
|
21467
|
+
spaShell: isSpaShell(html)
|
|
21468
|
+
};
|
|
21469
|
+
}
|
|
21470
|
+
function parseRobots(text) {
|
|
21471
|
+
const groups = [];
|
|
21472
|
+
const sitemaps = [];
|
|
21473
|
+
let current = null;
|
|
21474
|
+
let lastWasAgent = false;
|
|
21475
|
+
for (const raw of text.split(/\r?\n/)) {
|
|
21476
|
+
const line = raw.replace(/#.*$/, "").trim();
|
|
21477
|
+
const m = /^([A-Za-z-]+)\s*:\s*(.*)$/.exec(line);
|
|
21478
|
+
if (!m) continue;
|
|
21479
|
+
const key = m[1].toLowerCase();
|
|
21480
|
+
const value = m[2].trim();
|
|
21481
|
+
if (key === "user-agent") {
|
|
21482
|
+
if (!current || !lastWasAgent) {
|
|
21483
|
+
current = { agents: [], rules: [] };
|
|
21484
|
+
groups.push(current);
|
|
21485
|
+
}
|
|
21486
|
+
current.agents.push(value.toLowerCase());
|
|
21487
|
+
lastWasAgent = true;
|
|
21488
|
+
continue;
|
|
21489
|
+
}
|
|
21490
|
+
lastWasAgent = false;
|
|
21491
|
+
if (key === "sitemap") sitemaps.push(value);
|
|
21492
|
+
else if ((key === "allow" || key === "disallow") && current) current.rules.push({ allow: key === "allow", path: value });
|
|
21493
|
+
}
|
|
21494
|
+
return { groups, sitemaps };
|
|
21495
|
+
}
|
|
21496
|
+
|
|
21321
21497
|
// ../shared/src/plan-copy.ts
|
|
21322
21498
|
var PLAN_FEATURES = [
|
|
21323
21499
|
{ key: "sites", limit: "maxSites" },
|
|
@@ -21338,22 +21514,47 @@ var KEYS = new Set(PLAN_FEATURES.map((f) => f.key));
|
|
|
21338
21514
|
|
|
21339
21515
|
// ../shared/src/start-flow.ts
|
|
21340
21516
|
var START_ID_RE = /^[a-hjkmnp-z2-9]{10}$/;
|
|
21517
|
+
var MIGRATION_DIR = ".deployai/migration";
|
|
21341
21518
|
var BRIEF_FILE = ".deployai/brief.md";
|
|
21342
21519
|
var CHECK = { cmd: "npx deployai@latest check", say: "Fix every blocker it lists, then run it again until it shows none." };
|
|
21343
|
-
var
|
|
21520
|
+
var DEPLOY_ASK_RULE = 'Never deploy on your own, and never after each small edit: every deploy is a full build. Deploy only when what the owner asked for is done. Then say in short what changed and ask: "Put it live, see a preview first, or not yet?" Put it live: deploy with --live. Preview first: deploy without it and send the owner the preview address. Not yet: keep working, and the next change goes up in the same deploy. If the owner said to always put changes live, deploy with --live without asking. Database changes still get their own yes.';
|
|
21521
|
+
var ASK = { say: DEPLOY_ASK_RULE };
|
|
21522
|
+
var GUEST_ASK = { say: 'Deploy only when what the owner asked for is done. Say in short what you made and ask: "Put it up now, or not yet?" On Not yet, keep working and ask again when the next request is done.' };
|
|
21344
21523
|
var LOGIN = { cmd: "npx deployai@latest login", say: "The owner approves it in the browser window it opens." };
|
|
21345
|
-
var
|
|
21346
|
-
var
|
|
21347
|
-
var DEPLOY_SAY = "It builds a preview first. Write the -m message in a few words in the language of the owner, about what they see changed.";
|
|
21524
|
+
var PROMOTE = { cmd: "npx deployai@latest promote v<N>", say: "Only when deploy ran without --live, and only after the owner approves the preview. N is the version number deploy printed. Then give the owner the live address." };
|
|
21525
|
+
var DEPLOY_SAY = "Add --live only if the owner chose to put it live right away. It waits for the build: with --live it ends with the live address, else with the preview address to send the owner. When it prints database changes, a yes to going live does not cover them (D-541): show the owner the changes and ask the question it prints, and only after a yes run the promote --approve-sql command it printed; changes it says remove data only the owner approves, never you. Write the -m message in a few words in the language of the owner, about what they see changed.";
|
|
21348
21526
|
var BUILD = { say: "This folder had no site, so start wrote a starter page. Do not ask where the site comes from or which way to start: build a first version of the owner's site in its place now. Use what you know (the instructions above, .deployai/brief.md if it exists, the folder name) and choose the layout, colors and wording yourself. Ask at most one short question, and only if you cannot tell what the site is for. Leave out what you do not know (phone, prices, hours) instead of asking for it. Then show it to the owner and offer to add those details. Run check only after that." };
|
|
21527
|
+
var MIGRATE_STEPS = [
|
|
21528
|
+
{ cmd: "npx deployai@latest blocks inbox", say: "Only if the old site has a contact or quote form: the form with its own messages page for the owner." },
|
|
21529
|
+
{ cmd: "npx deployai@latest blocks blog", say: "Only if the old site has posts, news or articles: the blog, with the posts as Markdown files." },
|
|
21530
|
+
{ cmd: "npx deployai@latest migrate media", say: "Downloads the old site's images and files into .deployai/migration/media; run it again if it stops, it goes on where it stopped. Move the files the new pages use into the site." },
|
|
21531
|
+
{ ...CHECK },
|
|
21532
|
+
LOGIN,
|
|
21533
|
+
{ cmd: 'npx deployai@latest link --create "<the site name>"', say: "Makes the site in the owner's account and links this folder. The add-ons come with it for free while the offer lasts." },
|
|
21534
|
+
{ cmd: 'npx deployai@latest deploy -m "moved from the old site"', say: "Without --live: the first version of a moved site is always a preview. It waits for the build and prints the preview address." },
|
|
21535
|
+
{ cmd: "npx deployai@latest migrate verify <preview address>", say: "Compares every old address with the preview: a page that moved, lost its title or description, or does not open. Fix each one, deploy again and run it again until it lists none." },
|
|
21536
|
+
{ cmd: "npx deployai@latest addons run", say: "Runs every add-on of the site in one go. Work through each step it prints, run check between add-ons, and report each one as it says." },
|
|
21537
|
+
{ say: 'Send the owner the preview address and the table from .deployai/migration/plan.md. Ask: "Put it live now, or change something first?" Deploy again for each change.' },
|
|
21538
|
+
PROMOTE,
|
|
21539
|
+
{ say: "Only after it is live: tell the owner how to connect their domain in the dashboard (Domains), to keep their email records (MX) as they are, and to keep the old hosting for a few weeks before they cancel it." }
|
|
21540
|
+
];
|
|
21541
|
+
var managedStatus = (stage, note, say) => ({ cmd: `npx deployai@latest migrate status ${stage} "${note}"`, say });
|
|
21542
|
+
var MANAGED_STEPS = [
|
|
21543
|
+
managedStatus("building", "<what is done>", "First, once the plan in .deployai/migration/plan.md is agreed: the request shows the build started."),
|
|
21544
|
+
...MIGRATE_STEPS.slice(0, 9),
|
|
21545
|
+
managedStatus("preview_ready", "<preview address>", "The owner gets an email with the preview address."),
|
|
21546
|
+
...MIGRATE_STEPS.slice(9, 11),
|
|
21547
|
+
managedStatus("live", "<live address>", "Only after it is live. Then the team transfers the site to the owner."),
|
|
21548
|
+
...MIGRATE_STEPS.slice(11)
|
|
21549
|
+
];
|
|
21349
21550
|
var PULL = { cmd: "npx deployai@latest pull", say: "This folder was empty, so it downloads the code of the live site first. Work on that code." };
|
|
21350
21551
|
function startSteps(kind, opts = {}) {
|
|
21351
21552
|
switch (kind) {
|
|
21352
21553
|
case "new":
|
|
21353
|
-
return [...opts.starter ? [BUILD] : [], CHECK, ASK, LOGIN, { cmd: 'npx deployai@latest deploy -m "first version"', say: DEPLOY_SAY },
|
|
21554
|
+
return [...opts.starter ? [BUILD] : [], CHECK, ASK, LOGIN, { cmd: 'npx deployai@latest deploy -m "first version"', say: DEPLOY_SAY }, PROMOTE];
|
|
21354
21555
|
case "update": {
|
|
21355
21556
|
const deploy = { cmd: 'npx deployai@latest deploy -m "<what changed, in a few words>"', say: DEPLOY_SAY };
|
|
21356
|
-
return opts.emptyFolder ? [LOGIN, PULL, CHECK, ASK, deploy,
|
|
21557
|
+
return opts.emptyFolder ? [LOGIN, PULL, CHECK, ASK, deploy, PROMOTE] : [CHECK, ASK, LOGIN, deploy, PROMOTE];
|
|
21357
21558
|
}
|
|
21358
21559
|
case "move":
|
|
21359
21560
|
return [
|
|
@@ -21362,14 +21563,15 @@ function startSteps(kind, opts = {}) {
|
|
|
21362
21563
|
LOGIN,
|
|
21363
21564
|
{ cmd: "npx deployai@latest link", say: `If it lists the owner's sites, ask which one is this folder and run npx deployai@latest link <slug>. If there is none, ask for a name and run npx deployai@latest link --create "<name>".` },
|
|
21364
21565
|
{ cmd: 'npx deployai@latest deploy -m "first version"', say: DEPLOY_SAY },
|
|
21365
|
-
STATUS,
|
|
21366
21566
|
PROMOTE
|
|
21367
21567
|
];
|
|
21568
|
+
case "migrate":
|
|
21569
|
+
return (opts.managed ? MANAGED_STEPS : MIGRATE_STEPS).map((step) => ({ ...step }));
|
|
21368
21570
|
case "guest":
|
|
21369
21571
|
return [
|
|
21370
21572
|
...opts.starter ? [BUILD] : [],
|
|
21371
21573
|
{ ...CHECK, say: "Fix every blocker it lists, then run it again until it shows none. If the site needs environment variables, secrets, file storage or sending email, never stop building for it: tell the owner once, in one plain line, that putting those parts live needs a free account (one link, about a minute), keep building what they asked, and ask about the account only at the deploy step." },
|
|
21372
|
-
|
|
21574
|
+
GUEST_ASK,
|
|
21373
21575
|
{ cmd: "npx deployai@latest deploy --guest", say: "It prints the address, the claim link and any owner keys." },
|
|
21374
21576
|
{ say: "The site goes live about a minute later: wait, then open the address to see it is live before you tell the owner." },
|
|
21375
21577
|
{ say: "Give the owner the address, the claim link and any owner keys it printed. Tell them the site is temporary until the date it printed, that the claim link is the only way to keep it in a free account, and that owner keys show only once, so they should save both now." },
|
|
@@ -21389,9 +21591,12 @@ var CLI_MAP_NODES = [
|
|
|
21389
21591
|
n("page-samples", "site", "/samples", "\u05DE\u05EA\u05D7\u05D9\u05DC\u05D9\u05DD \u05DE\u05D3\u05D5\u05D2\u05DE\u05D4: \u05E9\u05D5\u05DC\u05D7 \u05DC /go-live \u05E2\u05DD \u05D4\u05D3\u05D5\u05D2\u05DE\u05D4, \u05D5\u05D4 id \u05E0\u05D5\u05E9\u05D0 \u05D0\u05D5\u05EA\u05D4.", "Start from a sample: sends to /go-live with the sample, and the id carries it."),
|
|
21390
21592
|
n("page-new", "site", "/dashboard/new", "\u05D0\u05EA\u05E8 \u05D7\u05D3\u05E9: \u05D4\u05D3\u05D5\u05D2\u05DE\u05D4, \u05D4\u05E9\u05DD \u05D5\u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05E0\u05E9\u05DE\u05E8\u05D9\u05DD \u05D1\u05D0\u05EA\u05E8, \u05D5\u05D4 id \u05E0\u05D5\u05E9\u05D0 \u05D0\u05EA \u05DB\u05D5\u05DC\u05DD.", "New site: the sample, name and details are saved on the site, and the id carries them all."),
|
|
21391
21593
|
n("page-site", "site", "/project/<id>", "\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D0\u05EA\u05E8: \u05E9\u05D5\u05E8\u05EA \u05D4\u05EA\u05D7\u05DC\u05D4 \u05E2\u05D3 \u05D4\u05D2\u05E8\u05E1\u05D4 \u05D4\u05E8\u05D0\u05E9\u05D5\u05E0\u05D4, \u05D5\u05D0\u05D7\u05E8\u05D9\u05D4 \u05E9\u05D5\u05E8\u05EA \u05E2\u05D3\u05DB\u05D5\u05DF.", "The site page: a new site line until the first version, then an update line."),
|
|
21594
|
+
n("page-move-url", "site", "/move", "\u05D4\u05E2\u05D1\u05D9\u05E8\u05D5 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05D9: \u05DB\u05EA\u05D5\u05D1\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF, \u05D4\u05E4\u05DC\u05D8\u05E4\u05D5\u05E8\u05DE\u05D4, \u05E1\u05D5\u05D2 \u05D4\u05D0\u05EA\u05E8 \u05D5\u05D4\u05E2\u05D9\u05E6\u05D5\u05D1. \u05D4 id \u05E0\u05D5\u05E9\u05D0 \u05D0\u05EA \u05DB\u05D5\u05DC\u05DD.", "Move my site: the old site address, the platform, the kind of site and the design. The id carries them all."),
|
|
21392
21595
|
n("page-move", "site", "/dashboard", "\u05D9\u05E9 \u05DC\u05D9 \u05DB\u05D1\u05E8 \u05D0\u05EA\u05E8: \u05E9\u05D5\u05E8\u05D4 \u05DC\u05D4\u05E2\u05D1\u05E8\u05EA \u05D4\u05D0\u05EA\u05E8 \u05E9\u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4.", "I already have a site: a line to move the site in the folder."),
|
|
21393
21596
|
// The CLI: every command (packages/cli/src/cli.ts).
|
|
21394
21597
|
n("cmd-start", "cli", "start <id>", "\u05DE\u05DB\u05D9\u05DF \u05D0\u05EA \u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05DC\u05E4\u05D9 \u05DB\u05DC \u05D4\u05D1\u05D7\u05D9\u05E8\u05D5\u05EA: \u05EA\u05D9\u05E7\u05D9\u05D9\u05D4, \u05D3\u05D5\u05D2\u05DE\u05D4 \u05D5\u05D4\u05EA\u05E7\u05E0\u05D4, \u05E7\u05D5\u05D1\u05E5 \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05D5\u05D7\u05D9\u05D1\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8. \u05DE\u05D3\u05E4\u05D9\u05E1 \u05DC\u05E1\u05D5\u05DB\u05DF \u05D0\u05EA \u05D4\u05D8\u05E7\u05E1\u05D8 \u05D5\u05D0\u05EA \u05D4\u05E4\u05E7\u05D5\u05D3\u05D5\u05EA.", "Prepares the folder with every choice: folder, sample and install, the details file and the site link. Prints the text and the commands for the agent."),
|
|
21598
|
+
n("cmd-migrate", "cli", "migrate scan / media / redirects / verify / status", "\u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF: \u05E1\u05E8\u05D9\u05E7\u05EA \u05D4\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05D5\u05D4\u05EA\u05D5\u05DB\u05DF, \u05D4\u05D5\u05E8\u05D3\u05EA \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD, \u05D4\u05E4\u05E0\u05D9\u05D5\u05EA 301 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E9\u05DC\u05D0 \u05E0\u05E9\u05D0\u05E8\u05D5, \u05D5\u05D1\u05D3\u05D9\u05E7\u05D4 \u05E9\u05DB\u05DC \u05DB\u05EA\u05D5\u05D1\u05EA \u05D9\u05E9\u05E0\u05D4 \u05E0\u05E4\u05EA\u05D7\u05EA \u05D1\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4.", "The old site: scan its addresses and content, download its files, 301s for addresses that could not stay, and a check that every old address opens on the preview."),
|
|
21599
|
+
n("cmd-blocks", "cli", "blocks [name]", "\u05D0\u05D1\u05E0\u05D9 \u05D1\u05E0\u05D9\u05D9\u05DF \u05E9\u05DC\u05E0\u05D5 \u05DC\u05D0\u05EA\u05E8 \u05E7\u05D9\u05D9\u05DD: inbox (\u05D8\u05D5\u05E4\u05E1 \u05D5\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05DC\u05D1\u05E2\u05DC\u05D9\u05DD), blog. \u05DC\u05D0 \u05D3\u05D5\u05E8\u05E1 \u05E7\u05D1\u05E6\u05D9\u05DD.", "Our building blocks for an existing site: inbox (form and owner messages page), blog. Never writes over files."),
|
|
21395
21600
|
n("cmd-samples", "cli", "samples [key]", "\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05D3\u05D5\u05D2\u05DE\u05D0\u05D5\u05EA, \u05D0\u05D5 \u05D4\u05D5\u05E8\u05D3\u05D4 \u05E9\u05DC \u05D0\u05D7\u05EA.", "Lists the samples, or downloads one."),
|
|
21396
21601
|
n("cmd-check", "cli", "check", "\u05D4\u05D0\u05DD \u05D4\u05E4\u05E8\u05D5\u05D9\u05E7\u05D8 \u05D9\u05DB\u05D5\u05DC \u05DC\u05E8\u05D5\u05E5 \u05D0\u05E6\u05DC\u05E0\u05D5: \u05D7\u05D5\u05E1\u05DE\u05D9\u05DD \u05D5\u05D0\u05D6\u05D4\u05E8\u05D5\u05EA, \u05E2\u05DD \u05E4\u05E8\u05D5\u05DE\u05E4\u05D8 \u05EA\u05D9\u05E7\u05D5\u05DF.", "Can the project run on our hosting: blockers and warnings, with a fix prompt."),
|
|
21397
21602
|
n("cmd-init", "cli", "init", "\u05D9\u05D5\u05E6\u05E8 DEPLOYAI.md \u05E2\u05DD \u05D4\u05DB\u05DC\u05DC\u05D9\u05DD \u05DC\u05E1\u05D5\u05DB\u05DF, \u05E9\u05D5\u05E8\u05D4 \u05D0\u05DC\u05D9\u05D5 \u05D1 AGENTS.md \u05D5 CLAUDE.md, \u05D5 .deployai/project.json. \u05E8\u05D0\u05E9\u05D5\u05DF \u05D1\u05E4\u05E8\u05D5\u05D9\u05E7\u05D8 \u05D7\u05D3\u05E9.", "Creates DEPLOYAI.md with the agent rules, a line to it in AGENTS.md and CLAUDE.md, and .deployai/project.json. First in a new project."),
|
|
@@ -21400,12 +21605,14 @@ var CLI_MAP_NODES = [
|
|
|
21400
21605
|
n("cmd-logout", "cli", "logout", "\u05DE\u05D1\u05D8\u05DC \u05D0\u05EA \u05D4\u05D8\u05D5\u05E7\u05DF \u05D5\u05D9\u05D5\u05E6\u05D0 \u05DE\u05D4\u05D7\u05E9\u05D1\u05D5\u05DF \u05D1\u05DE\u05D7\u05E9\u05D1 \u05D4\u05D6\u05D4.", "Cancels the token and logs out on this computer."),
|
|
21401
21606
|
n("cmd-whoami", "cli", "whoami", "\u05E2\u05DD \u05D0\u05D9\u05D6\u05D4 \u05D7\u05E9\u05D1\u05D5\u05DF \u05DE\u05D7\u05D5\u05D1\u05E8\u05D9\u05DD.", "Which account is logged in."),
|
|
21402
21607
|
n("cmd-link", "cli", "link [site]", "\u05DE\u05D7\u05D1\u05E8 \u05D0\u05EA \u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05DC\u05D0\u05EA\u05E8, \u05D0\u05D5 \u05D9\u05D5\u05E6\u05E8 \u05D0\u05EA\u05E8 \u05E2\u05DD --create.", "Links the folder to a site, or makes one with --create."),
|
|
21403
|
-
n("cmd-deploy", "cli", "deploy -m", "\u05D1\u05D5\u05D3\u05E7, \u05D0\u05D5\u05E8\u05D6 \u05D5\u05DE\u05E2\u05DC\u05D4 \u05D2\u05E8\u05E1\u05D4 \u05DC\u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4.", "Checks, packs and uploads a version
|
|
21608
|
+
n("cmd-deploy", "cli", "deploy -m", "\u05D1\u05D5\u05D3\u05E7, \u05D0\u05D5\u05E8\u05D6 \u05D5\u05DE\u05E2\u05DC\u05D4 \u05D2\u05E8\u05E1\u05D4, \u05DE\u05D7\u05DB\u05D4 \u05DC\u05D1\u05E0\u05D9\u05D9\u05D4 \u05D5\u05DE\u05E2\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E2\u05DD --live \u05D0\u05D5 \u05E0\u05D5\u05EA\u05DF \u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4.", "Checks, packs and uploads a version, waits for the build, then puts it live with --live or gives the preview."),
|
|
21404
21609
|
n("cmd-guest", "cli", "deploy --guest", "\u05D0\u05EA\u05E8 \u05D6\u05DE\u05E0\u05D9 \u05D1\u05DC\u05D9 \u05D7\u05E9\u05D1\u05D5\u05DF, \u05E2\u05DD \u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05E9\u05DE\u05D9\u05E8\u05D4.", "A temporary site with no account, with a claim link."),
|
|
21405
21610
|
n("cmd-pull", "cli", "pull", "\u05DE\u05D5\u05E8\u05D9\u05D3 \u05D0\u05EA \u05D4\u05E7\u05D5\u05D3 \u05E9\u05DC \u05D4\u05D2\u05E8\u05E1\u05D4 \u05E9\u05D1\u05D0\u05D5\u05D5\u05D9\u05E8 \u05DC\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05E8\u05D9\u05E7\u05D4.", "Downloads the code of the live version into an empty folder."),
|
|
21406
21611
|
n("cmd-claim", "cli", "claim --email", "\u05E7\u05D9\u05E9\u05D5\u05E8 \u05D4\u05E9\u05DE\u05D9\u05E8\u05D4 \u05E9\u05D5\u05D1, \u05D0\u05D5 \u05D1\u05DE\u05D9\u05D9\u05DC \u05E2\u05DD \u05EA\u05D6\u05DB\u05D5\u05E8\u05EA \u05DC\u05E4\u05E0\u05D9 \u05D4\u05DE\u05D7\u05D9\u05E7\u05D4.", "The claim link again, or by email with a reminder before the delete."),
|
|
21407
21612
|
n("cmd-status", "cli", "status", "\u05DE\u05E6\u05D1 \u05D4\u05D2\u05E8\u05E1\u05D4 \u05D4\u05D0\u05D7\u05E8\u05D5\u05E0\u05D4 \u05D5\u05DB\u05EA\u05D5\u05D1\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4.", "The latest version's state and preview address."),
|
|
21408
|
-
n("cmd-promote", "cli", "promote v<N>", "\u05DE\u05E2\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05D2\u05E8\u05E1\u05D4 \u05E9\u05D0\u05D5\u05E9\u05E8\u05D4.", "Puts an approved version live."),
|
|
21613
|
+
n("cmd-promote", "cli", "promote v<N>", "\u05DE\u05E2\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05D2\u05E8\u05E1\u05D4 \u05E9\u05D0\u05D5\u05E9\u05E8\u05D4, \u05D5\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D7\u05D3\u05E9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E8\u05E6\u05D9\u05DD \u05E7\u05D5\u05D3\u05DD \u05D0\u05D7\u05E8\u05D9 \u05D0\u05D9\u05E9\u05D5\u05E8.", "Puts an approved version live; new database changes run first, after a yes."),
|
|
21614
|
+
n("cmd-sql", "cli", "sql v<N>", "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E9\u05D2\u05E8\u05E1\u05D4 \u05DE\u05E8\u05D9\u05E6\u05D4 \u05DC\u05E4\u05E0\u05D9 \u05E9\u05D4\u05D9\u05D0 \u05E2\u05D5\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8.", "The database changes a version runs before it goes live."),
|
|
21615
|
+
n("api-sql", "server", "/api/cli/sql", "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05E9\u05DE\u05D7\u05DB\u05D9\u05DD \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8, \u05D5\u05E7\u05D5\u05D3 \u05E9\u05DE\u05D7\u05D1\u05E8 \u05D0\u05EA \u05D4\u05D0\u05D9\u05E9\u05D5\u05E8 \u05D0\u05DC\u05D9\u05D4\u05DD.", "The changes that wait for a yes, and a code that ties the yes to them."),
|
|
21409
21616
|
n("cmd-versions", "cli", "versions", "\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05D2\u05E8\u05E1\u05D0\u05D5\u05EA \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8.", "The site's versions."),
|
|
21410
21617
|
n("cmd-rollback", "cli", "rollback v<N>", "\u05D7\u05D5\u05D6\u05E8 \u05DC\u05D2\u05E8\u05E1\u05D4 \u05E7\u05D5\u05D3\u05DE\u05EA.", "Goes back to an earlier version."),
|
|
21411
21618
|
n("cmd-addons", "cli", "addons / addon next / addon buy", "\u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8, \u05D4\u05E9\u05DC\u05D1 \u05D4\u05D1\u05D0 \u05E9\u05DC \u05EA\u05D5\u05E1\u05E3 \u05E9\u05E0\u05E7\u05E0\u05D4, \u05D5\u05E7\u05D9\u05E9\u05D5\u05E8 \u05E7\u05E0\u05D9\u05D9\u05D4 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8.", "The site's add-ons, the next step of one it bought, and a buy link for the owner."),
|
|
@@ -21415,6 +21622,9 @@ var CLI_MAP_NODES = [
|
|
|
21415
21622
|
n("cmd-telemetry", "cli", "telemetry", "\u05D4\u05E4\u05E2\u05DC\u05D4 \u05D0\u05D5 \u05DB\u05D9\u05D1\u05D5\u05D9 \u05E9\u05DC \u05E0\u05EA\u05D5\u05E0\u05D9 \u05E9\u05D9\u05DE\u05D5\u05E9 \u05D0\u05E0\u05D5\u05E0\u05D9\u05DE\u05D9\u05D9\u05DD.", "Turns anonymous usage data on or off."),
|
|
21416
21623
|
// The server routes the CLI calls.
|
|
21417
21624
|
n("api-starts", "server", "GET /api/starts/:id", "\u05D4\u05D1\u05D7\u05D9\u05E8\u05D5\u05EA \u05D5\u05D4\u05D8\u05E7\u05E1\u05D8 \u05DC\u05E1\u05D5\u05DB\u05DF. 7 \u05D9\u05DE\u05D9\u05DD, 5 \u05E9\u05DC\u05D9\u05E4\u05D5\u05EA \u05DC\u05D0\u05EA\u05E8.", "The choices and the agent text. 7 days, 5 fetches for a site."),
|
|
21625
|
+
n("api-blocks", "server", "GET /blocks-src/<key>", "\u05E7\u05D5\u05D3 \u05D4\u05DE\u05E7\u05D5\u05E8 \u05E9\u05DC \u05D0\u05D1\u05DF \u05D1\u05E0\u05D9\u05D9\u05DF, \u05E6\u05D9\u05D1\u05D5\u05E8\u05D9.", "A block's source, public."),
|
|
21626
|
+
n("api-migrate-grant", "server", "POST /api/cli/migrations/grant", "\u05D0\u05D7\u05E8\u05D9 link \u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05DE /move: \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D1\u05D7\u05D9\u05E0\u05DD \u05DC\u05D0\u05EA\u05E8 \u05E9\u05E2\u05D1\u05E8, \u05E4\u05E2\u05DD \u05D0\u05D7\u05EA \u05DC\u05DB\u05DC start \u05D5\u05E2\u05D3 3 \u05D0\u05EA\u05E8\u05D9\u05DD \u05DC\u05D7\u05E9\u05D1\u05D5\u05DF.", "After link in a folder from /move: the add-ons free for the moved site, once per start and up to 3 sites an account."),
|
|
21627
|
+
n("api-migrate-progress", "server", "POST /api/migrations/progress", "\u05DE\u05E2\u05D1\u05E8 \u05DE\u05E0\u05D5\u05D4\u05DC: \u05D4\u05E9\u05DC\u05D1 \u05D5\u05D4\u05E2\u05E8\u05D4 \u05E9\u05DC \u05E9\u05D5\u05E8\u05D4 \u05D0\u05D7\u05EA \u05DE migrate status, \u05DC\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E9\u05D5\u05EA \u05D5\u05DC\u05E2\u05DE\u05D5\u05D3 \u05D4\u05E1\u05D8\u05D8\u05D5\u05E1 \u05E9\u05DC \u05D4\u05D1\u05E2\u05DC\u05D9\u05DD.", "Managed move: the stage and a one line note from migrate status, to the requests board and the owner's status page."),
|
|
21418
21628
|
n("api-samples", "server", "GET /samples-src/<key>", "\u05E7\u05D5\u05D3 \u05D4\u05DE\u05E7\u05D5\u05E8 \u05E9\u05DC \u05D3\u05D5\u05D2\u05DE\u05D4, \u05E6\u05D9\u05D1\u05D5\u05E8\u05D9.", "A sample's source, public."),
|
|
21419
21629
|
n("api-device", "server", "/api/cli/device/*", "\u05DB\u05E0\u05D9\u05E1\u05D4 \u05D1\u05DE\u05DB\u05E9\u05D9\u05E8: \u05E7\u05D5\u05D3, \u05D0\u05D9\u05E9\u05D5\u05E8 \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF, \u05D8\u05D5\u05E7\u05DF.", "Device login: a code, approval in the browser, a token."),
|
|
21420
21630
|
n("api-projects", "server", "/api/cli/projects", "\u05D4\u05D0\u05EA\u05E8\u05D9\u05DD \u05E9\u05DC \u05D4\u05D7\u05E9\u05D1\u05D5\u05DF, \u05D5\u05D9\u05E6\u05D9\u05E8\u05EA \u05D0\u05EA\u05E8.", "The account's sites, and making one."),
|
|
@@ -21433,6 +21643,7 @@ var CLI_MAP_NODES = [
|
|
|
21433
21643
|
n("text-start-blank", "agent", "site.start-blank", "\u05D1\u05D5\u05E0\u05D9\u05DD \u05D0\u05EA\u05E8 \u05D1\u05DC\u05D9 \u05D3\u05D5\u05D2\u05DE\u05D4.", "Build a site with no sample."),
|
|
21434
21644
|
n("text-details", "agent", "site.details / site.ask-details", "\u05E7\u05D5\u05E8\u05D0\u05D9\u05DD \u05D0\u05EA \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05DE .deployai/brief.md, \u05D0\u05D5 \u05E9\u05D5\u05D0\u05DC\u05D9\u05DD \u05D0\u05EA \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8.", "Read the details from .deployai/brief.md, or ask the owner."),
|
|
21435
21645
|
n("text-update", "agent", "site.update", "\u05E2\u05D5\u05E9\u05D9\u05DD \u05D0\u05EA \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9 \u05E9\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D1\u05D9\u05E7\u05E9.", "Make the change the owner asked for."),
|
|
21646
|
+
n("text-migrate", "agent", "site.migrate", "\u05D1\u05D5\u05E0\u05D9\u05DD \u05DE\u05D7\u05D3\u05E9 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF \u05E2\u05DC \u05D4\u05D3\u05D5\u05D2\u05DE\u05D4, \u05E9\u05D5\u05DE\u05E8\u05D9\u05DD \u05DB\u05DC \u05DB\u05EA\u05D5\u05D1\u05EA \u05D5\u05DB\u05D5\u05EA\u05E8\u05EA, \u05EA\u05D5\u05DB\u05E0\u05D9\u05EA \u05E2\u05DD \u05E1\u05D8\u05D8\u05D5\u05E1 \u05DC\u05DB\u05DC \u05D9\u05DB\u05D5\u05DC\u05EA.", "Rebuild the old site on the sample, keep every address and title, a plan with a status for each feature."),
|
|
21436
21647
|
n("text-move", "agent", "site.move", "\u05DE\u05E2\u05D1\u05D9\u05E8\u05D9\u05DD \u05D0\u05EA\u05E8 \u05E7\u05D9\u05D9\u05DD \u05D1\u05DC\u05D9 \u05DC\u05E9\u05E0\u05D5\u05EA \u05D0\u05EA \u05D4\u05E2\u05D9\u05E6\u05D5\u05D1 \u05D0\u05D5 \u05D4\u05DE\u05E1\u05D2\u05E8\u05EA.", "Move an existing site without changing its design or framework."),
|
|
21437
21648
|
n("text-guest", "agent", "site.guest / site.guest-sample", "\u05D0\u05EA\u05E8 \u05D6\u05DE\u05E0\u05D9: \u05D4\u05DE\u05D2\u05D1\u05DC\u05D5\u05EA, \u05D5\u05DE\u05D4 \u05DC\u05E9\u05D0\u05D5\u05DC \u05D0\u05EA \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8.", "A temporary site: the limits, and what to ask the owner."),
|
|
21438
21649
|
n("text-addons", "agent", "core.workflow-frame", "\u05D4\u05DE\u05E1\u05D2\u05E8\u05EA \u05E9\u05DC \u05DB\u05DC \u05EA\u05D5\u05E1\u05E3. \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05E2\u05E6\u05DE\u05DD \u05D1\u05E2\u05DE\u05D5\u05D3 \u05D4\u05EA\u05D5\u05E1\u05E4\u05D9\u05DD.", "The frame of every add-on. The add-ons themselves are on the marketplace page.")
|
|
@@ -21457,6 +21668,8 @@ var CLI_MAP_EDGES = [
|
|
|
21457
21668
|
e("cmd-whoami", "api-device"),
|
|
21458
21669
|
e("cmd-link", "api-projects"),
|
|
21459
21670
|
e("cmd-deploy", "api-deploy"),
|
|
21671
|
+
e("cmd-deploy", "api-status"),
|
|
21672
|
+
e("cmd-deploy", "api-promote"),
|
|
21460
21673
|
e("cmd-guest", "api-guest"),
|
|
21461
21674
|
e("cmd-claim", "api-guest-email"),
|
|
21462
21675
|
e("cmd-pull", "api-source"),
|
|
@@ -21465,7 +21678,16 @@ var CLI_MAP_EDGES = [
|
|
|
21465
21678
|
e("cmd-status", "api-status"),
|
|
21466
21679
|
e("cmd-versions", "api-status"),
|
|
21467
21680
|
e("cmd-promote", "api-promote"),
|
|
21681
|
+
e("cmd-promote", "api-sql"),
|
|
21682
|
+
e("cmd-sql", "api-sql"),
|
|
21683
|
+
e("cmd-deploy", "api-sql"),
|
|
21468
21684
|
e("cmd-rollback", "api-promote"),
|
|
21685
|
+
e("page-move-url", "cmd-start"),
|
|
21686
|
+
e("cmd-start", "text-migrate"),
|
|
21687
|
+
e("cmd-start", "cmd-migrate"),
|
|
21688
|
+
e("cmd-blocks", "api-blocks"),
|
|
21689
|
+
e("cmd-link", "api-migrate-grant"),
|
|
21690
|
+
e("cmd-migrate", "api-migrate-progress"),
|
|
21469
21691
|
e("cmd-addons", "api-addons"),
|
|
21470
21692
|
e("cmd-addon-run", "api-addons"),
|
|
21471
21693
|
e("cmd-addons", "text-addons"),
|
|
@@ -21552,6 +21774,11 @@ var ENV_KEYS = {
|
|
|
21552
21774
|
CF_REGISTRAR_TOKEN: { scope: "server", section: "cloudflare", about: "Buys real domains (D-300): a Cloudflare token with Registrar edit only. Server only." },
|
|
21553
21775
|
LIVEDNS_USER: { scope: "server", section: "cloudflare", about: "Buys real Israeli domains at LiveDNS (D-458): the API user of our LiveDNS partner account. Server only: LiveDNS refuses some networks, and it spends prepaid credit." },
|
|
21554
21776
|
LIVEDNS_PASSWORD: { scope: "server", section: "cloudflare", about: "Its password, sent in every LiveDNS call; never logged. Server only." },
|
|
21777
|
+
GOOGLE_RESELLER_KEY: { scope: "own", section: "email", about: "Sells Google Workspace mailboxes (D-547; not connected until the reseller contract is signed): the service account JSON of our reseller project, delegated to GOOGLE_RESELLER_ADMIN. The laptop uses the reseller sandbox, the server the real account." },
|
|
21778
|
+
GOOGLE_RESELLER_ADMIN: { scope: "own", section: "email", about: "The reseller admin user the service account acts as (D-547)." },
|
|
21779
|
+
ZOHO_PARTNER_CLIENT_ID: { scope: "own", section: "email", about: "Sells Zoho Mail mailboxes (D-547; not connected until the partner account exists): the API client of our Zoho partner account." },
|
|
21780
|
+
ZOHO_PARTNER_CLIENT_SECRET: { scope: "own", section: "email", about: "Its secret (D-547)." },
|
|
21781
|
+
ZOHO_PARTNER_REFRESH_TOKEN: { scope: "own", section: "email", about: "The long lived token the partner API calls are signed with (D-547)." },
|
|
21555
21782
|
ADMIN_GEO_MANAGE: { scope: "server", section: "cloudflare", about: "1 lets the superadmin change the admin-geo rule on Admin, Server, Security (temporary, D-455); CF_API_TOKEN needs Zone WAF Edit. Off or unset: the card only shows it. The rule stays in Cloudflare either way." },
|
|
21556
21783
|
DISPATCH_RATE_LIMIT_GUEST: { scope: "same", section: "cloudflare", about: "pnpm dispatch:deploy: requests per IP per period on a temporary site (D-087, D-238)." },
|
|
21557
21784
|
DISPATCH_RATE_LIMIT_FREE: { scope: "same", section: "cloudflare", about: "The same on a site on a free plan." },
|
|
@@ -21731,6 +21958,126 @@ function stackSummary(s) {
|
|
|
21731
21958
|
return [frameworkName(s.framework), ...s.bindings.map((b) => b.toUpperCase()), s.css === "tailwind" ? "Tailwind" : null, s.fonts.join(", "), s.dir.toUpperCase()].filter(Boolean).join(" \xB7 ");
|
|
21732
21959
|
}
|
|
21733
21960
|
|
|
21961
|
+
// ../shared/src/ui-sources.ts
|
|
21962
|
+
var UI_SOURCES = [
|
|
21963
|
+
{ 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)", checkedOn: "2026-10-30" },
|
|
21964
|
+
{ 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", checkedOn: "2026-10-30" },
|
|
21965
|
+
{ 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", checkedOn: "2026-10-30" },
|
|
21966
|
+
{ 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", checkedOn: "2026-10-30" },
|
|
21967
|
+
{ 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)", checkedOn: "2026-10-30" },
|
|
21968
|
+
{ 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)", checkedOn: "2026-10-30" },
|
|
21969
|
+
{ 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)", checkedOn: "2026-10-30" }
|
|
21970
|
+
];
|
|
21971
|
+
function uiSourcesText() {
|
|
21972
|
+
return [
|
|
21973
|
+
"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):",
|
|
21974
|
+
...UI_SOURCES.map((s) => `- ${s.name} (${s.url}, ${s.license}; ${s.frameworks}): ${s.use} Install: ${s.install}. ${s.terms}`),
|
|
21975
|
+
"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."
|
|
21976
|
+
].join("\n");
|
|
21977
|
+
}
|
|
21978
|
+
|
|
21979
|
+
// ../shared/src/migration.ts
|
|
21980
|
+
function normalizeSourceUrl(raw) {
|
|
21981
|
+
const text = raw.trim();
|
|
21982
|
+
if (!text || text.length > 300) return null;
|
|
21983
|
+
let u;
|
|
21984
|
+
try {
|
|
21985
|
+
u = new URL(/^https?:\/\//i.test(text) ? text : `https://${text}`);
|
|
21986
|
+
} catch {
|
|
21987
|
+
return null;
|
|
21988
|
+
}
|
|
21989
|
+
if (u.protocol !== "https:" && u.protocol !== "http:") return null;
|
|
21990
|
+
if (u.username || u.password || !u.hostname.includes(".")) return null;
|
|
21991
|
+
u.hash = "";
|
|
21992
|
+
return u.pathname === "/" && !u.search ? u.origin : u.toString();
|
|
21993
|
+
}
|
|
21994
|
+
function parseSitemapXml(xml) {
|
|
21995
|
+
const locs = (block) => [...block.matchAll(/<loc>\s*([\s\S]*?)\s*<\/loc>/gi)].map((m) => decode3(m[1].replace(/^<!\[CDATA\[|\]\]>$/g, "")).trim()).filter(Boolean);
|
|
21996
|
+
const sitemaps = [...xml.matchAll(/<sitemap\b[^>]*>([\s\S]*?)<\/sitemap>/gi)].flatMap((m) => locs(m[1]));
|
|
21997
|
+
const urls = [...xml.matchAll(/<url\b[^>]*>([\s\S]*?)<\/url>/gi)].flatMap((m) => locs(m[1]));
|
|
21998
|
+
return { urls, sitemaps };
|
|
21999
|
+
}
|
|
22000
|
+
function detectPlatform(html, headers = {}) {
|
|
22001
|
+
const h = Object.fromEntries(Object.entries(headers).map(([k, v]) => [k.toLowerCase(), v.toLowerCase()]));
|
|
22002
|
+
const gen = (html.match(/<meta[^>]+name=["']generator["'][^>]*content=["']([^"']+)/i)?.[1] ?? "").toLowerCase();
|
|
22003
|
+
if (gen.includes("wordpress") || /\/wp-(content|includes)\//i.test(html) || (h.link ?? "").includes("wp-json")) return "wordpress";
|
|
22004
|
+
if (gen.includes("wix") || h["x-wix-request-id"] || /static\.wixstatic\.com/i.test(html)) return "wix";
|
|
22005
|
+
if (gen.includes("squarespace") || /static1\.squarespace\.com/i.test(html)) return "squarespace";
|
|
22006
|
+
if (gen.includes("webflow") || /data-wf-(page|site)=/i.test(html)) return "webflow";
|
|
22007
|
+
if (/<script[^>]+src=["'][^"']*\/(_next|assets|_astro|_nuxt)\//i.test(html)) return "code";
|
|
22008
|
+
return "other";
|
|
22009
|
+
}
|
|
22010
|
+
function pathOf(url2) {
|
|
22011
|
+
const u = new URL(url2);
|
|
22012
|
+
return u.pathname + u.search;
|
|
22013
|
+
}
|
|
22014
|
+
function comparePage(old, next, allowedRedirect) {
|
|
22015
|
+
if (!next || next.status === 404 || next.status === 410) return { path: old.path, problem: "missing" };
|
|
22016
|
+
if (next.status >= 400) return { path: old.path, problem: "error", detail: String(next.status) };
|
|
22017
|
+
if (next.finalPath !== old.path) {
|
|
22018
|
+
if (allowedRedirect && allowedRedirect === next.finalPath) return null;
|
|
22019
|
+
return { path: old.path, problem: "moved", detail: next.finalPath };
|
|
22020
|
+
}
|
|
22021
|
+
if (old.title && !next.title) return { path: old.path, problem: "title_lost" };
|
|
22022
|
+
if (old.description && !next.description) return { path: old.path, problem: "description_lost" };
|
|
22023
|
+
return null;
|
|
22024
|
+
}
|
|
22025
|
+
var plain = (html) => decode3((html ?? "").replace(/<[^>]*>/g, " ")).replace(/\s+/g, " ").trim();
|
|
22026
|
+
var yamlStr = (s) => JSON.stringify(s);
|
|
22027
|
+
var safeSlug = (s) => {
|
|
22028
|
+
try {
|
|
22029
|
+
return decodeURIComponent(s ?? "");
|
|
22030
|
+
} catch {
|
|
22031
|
+
return s ?? "";
|
|
22032
|
+
}
|
|
22033
|
+
};
|
|
22034
|
+
function wpPostsToMarkdown(input2) {
|
|
22035
|
+
const host = new URL(input2.origin).hostname.replace(/^www\./, "");
|
|
22036
|
+
const byId = (list = []) => new Map(list.map((x) => [x.id, x]));
|
|
22037
|
+
const cats = byId(input2.categories);
|
|
22038
|
+
const tags2 = byId(input2.tags);
|
|
22039
|
+
const users = byId(input2.users);
|
|
22040
|
+
const media = byId(input2.media);
|
|
22041
|
+
const sameHost = new RegExp(`https?://(?:www\\.)?${host.replace(/\./g, "\\.")}(?=/)`, "gi");
|
|
22042
|
+
const termList = (ids, map2) => (ids ?? []).map((id) => map2.get(id)).filter((t) => Boolean(t?.slug)).map((t) => ` - { slug: ${yamlStr(safeSlug(t.slug))}, name: ${yamlStr(decode3(t.name ?? t.slug ?? ""))} }`);
|
|
22043
|
+
const used = /* @__PURE__ */ new Set();
|
|
22044
|
+
return input2.posts.filter((p) => !p.status || p.status === "publish").map((p) => {
|
|
22045
|
+
let path = "/";
|
|
22046
|
+
try {
|
|
22047
|
+
path = safeSlug(new URL(p.link ?? "").pathname);
|
|
22048
|
+
} catch {
|
|
22049
|
+
path = `/blog/${safeSlug(p.slug)}/`;
|
|
22050
|
+
}
|
|
22051
|
+
const image = p.featured_media ? media.get(p.featured_media) : void 0;
|
|
22052
|
+
const c = termList(p.categories, cats);
|
|
22053
|
+
const t = termList(p.tags, tags2);
|
|
22054
|
+
const front = [
|
|
22055
|
+
"---",
|
|
22056
|
+
`title: ${yamlStr(plain(p.title?.rendered))}`,
|
|
22057
|
+
`description: ${yamlStr(plain(p.excerpt?.rendered).replace(/\s*(\[…\]|\[…\]|…)$/, "").slice(0, 300))}`,
|
|
22058
|
+
`date: ${yamlStr(p.date ?? "")}`,
|
|
22059
|
+
...p.modified && p.modified !== p.date ? [`updated: ${yamlStr(p.modified)}`] : [],
|
|
22060
|
+
...p.author && users.get(p.author)?.name ? [`author: ${yamlStr(users.get(p.author).name)}`] : [],
|
|
22061
|
+
c.length ? `categories:
|
|
22062
|
+
${c.join("\n")}` : "categories: []",
|
|
22063
|
+
t.length ? `tags:
|
|
22064
|
+
${t.join("\n")}` : "tags: []",
|
|
22065
|
+
...image?.source_url ? [`image: ${yamlStr(image.source_url.replace(sameHost, ""))}`, ...image.alt_text ? [`imageAlt: ${yamlStr(image.alt_text)}`] : []] : [],
|
|
22066
|
+
`path: ${yamlStr(path)}`,
|
|
22067
|
+
"---",
|
|
22068
|
+
""
|
|
22069
|
+
].join("\n");
|
|
22070
|
+
const base = (safeSlug(p.slug) || `post-${p.id}`).replace(/[^\p{L}\p{N}-]+/gu, "-").slice(0, 80) || `post-${p.id}`;
|
|
22071
|
+
const file2 = used.has(base) ? `${base}-${p.id}.md` : `${base}.md`;
|
|
22072
|
+
used.add(base);
|
|
22073
|
+
return { file: file2, text: front + (p.content?.rendered ?? "").replace(sameHost, "").trim() + "\n" };
|
|
22074
|
+
});
|
|
22075
|
+
}
|
|
22076
|
+
var AGENT_STAGES = ["scanning", "building", "preview_ready", "customer_review", "live", "blocked"];
|
|
22077
|
+
var STAGE_NOTE_MAX = 300;
|
|
22078
|
+
var isAgentStage = (s) => AGENT_STAGES.includes(s);
|
|
22079
|
+
var stageNote = (s) => (s ?? "").replace(/[\u0000-\u001f\u007f]+/g, " ").replace(/\s+/g, " ").trim().slice(0, STAGE_NOTE_MAX);
|
|
22080
|
+
|
|
21734
22081
|
// src/config.ts
|
|
21735
22082
|
import { randomUUID } from "crypto";
|
|
21736
22083
|
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -21881,6 +22228,7 @@ var M = {
|
|
|
21881
22228
|
startRules: "Wrote the rules for your agent to DEPLOYAI.md (never uploaded).",
|
|
21882
22229
|
startStarter: "Wrote a starter page (index.html) to build the site on.",
|
|
21883
22230
|
startStack: "Saved the stack chosen on the site: {stack}.",
|
|
22231
|
+
startScanned: "Scanned the old site {url}: its pages, images and content are in {dir}.",
|
|
21884
22232
|
stackDiffers: "Note: the stack chosen on the site is {chosen}, but this folder is {found}. Keep to the chosen stack, or tell the owner why it changed.",
|
|
21885
22233
|
startRelinked: 'Linked this folder to the site "{name}" instead of the site it was linked to.',
|
|
21886
22234
|
statusLine: "Status: {s}",
|
|
@@ -21895,6 +22243,9 @@ var M = {
|
|
|
21895
22243
|
pasteFix: " Paste the prompt below into your AI editor, then run: npx deployai@latest check",
|
|
21896
22244
|
copied: " (copied to clipboard)",
|
|
21897
22245
|
runDeploy: ' Run: npx deployai@latest deploy -m "<message>"',
|
|
22246
|
+
moveOfferGranted: "Moved from /move: the site got {n} add-ons free. Run them all with: npx deployai@latest addons run",
|
|
22247
|
+
moveOfferCap: "The free add-ons for moved sites were already used on 3 sites of this account.",
|
|
22248
|
+
moveOfferOver: "The free add-ons offer for moved sites is over.",
|
|
21898
22249
|
initHint: " So your agent follows the DeployAI rules, run: npx deployai@latest init",
|
|
21899
22250
|
emptyFolder: "Nothing to check yet: this folder has no site. Build the site here, then run: npx deployai@latest check",
|
|
21900
22251
|
deployTitle: "DeployAI deploy",
|
|
@@ -21923,6 +22274,8 @@ var M = {
|
|
|
21923
22274
|
guestClaim: "Open the claim link to keep the site (sign up or log in).",
|
|
21924
22275
|
claimLink: "Keep link of this temporary site: {url}",
|
|
21925
22276
|
pulled: "Downloaded the code of version v{v}: {n} files.",
|
|
22277
|
+
pulledHistory: "Downloaded the history: {n} versions as git commits, up to the live version v{v}.",
|
|
22278
|
+
pullNoGit: "The history needs git on this computer. Install it from https://git-scm.com, or run pull without --history.",
|
|
21926
22279
|
pullNotLinked: "This folder is not linked to a site. Copy the line again from the site page on DeployAI.",
|
|
21927
22280
|
pullNotEmpty: "This folder already has files, so nothing was downloaded. Use an empty folder.",
|
|
21928
22281
|
pullNoSource: "This site has no version to download yet.",
|
|
@@ -21941,6 +22294,13 @@ var M = {
|
|
|
21941
22294
|
promoteReady: " After the owner approves the preview: npx deployai@latest promote v{n} (to put it live)",
|
|
21942
22295
|
askOwner: ' Version {n} is ready and not live. Ask the owner: "Version {n} is ready. Do you want to put it live?"',
|
|
21943
22296
|
showPreview: " Send them the preview first: {url}",
|
|
22297
|
+
askLiveFirst: "Put it live as soon as the build is done? No shows you the preview first. (y/N) ",
|
|
22298
|
+
askLiveNow: "Put v{n} live now? (y/N) ",
|
|
22299
|
+
waitBuild: "Waiting for the build of v{n}. Ctrl+C stops the waiting, not the build.",
|
|
22300
|
+
waitState: " v{n}: {s}",
|
|
22301
|
+
buildSlow: "The build of v{n} is taking longer than usual.",
|
|
22302
|
+
liveNow: "v{n} is live: {url}",
|
|
22303
|
+
promoteLater: " To put it live later: npx deployai@latest promote v{n}",
|
|
21944
22304
|
notPublished: "not published yet",
|
|
21945
22305
|
none: "none",
|
|
21946
22306
|
buildingNow: "building now",
|
|
@@ -22030,7 +22390,31 @@ var M = {
|
|
|
22030
22390
|
guestClaimFirst: "This folder holds a temporary site, and you are logged in. Claim the site to your account first: {url}",
|
|
22031
22391
|
guestClaimFirstNoLink: "This folder holds a temporary site, and you are logged in. Claim it to your account first with the claim link deploy --guest printed.",
|
|
22032
22392
|
guestAccountSite: "This folder belongs to a site in an account, so it cannot go up as a temporary site. Run: npx deployai@latest login, then: npx deployai@latest deploy",
|
|
22033
|
-
sqlWaitingLine: "Database changes (SQL) wait for
|
|
22393
|
+
sqlWaitingLine: "Database changes (SQL) wait for the owner's yes before v{n} goes live. See them: npx deployai@latest sql v{n}",
|
|
22394
|
+
sqlTitle: "v{n} changes the database {db}:",
|
|
22395
|
+
sqlNewDatabase: " A new database: it is created, and seed.sql runs too.",
|
|
22396
|
+
sqlStatements: "{n} statements",
|
|
22397
|
+
sqlSkipped: "skipped (seed on a database that has data)",
|
|
22398
|
+
sqlDestructive: "These remove or overwrite data, and a rollback does not bring it back:",
|
|
22399
|
+
sqlRunningNow: "The database changes of v{n} are already running. It goes live when they finish.",
|
|
22400
|
+
sqlRunningNowShort: "The database changes are already running. The version goes live when they finish: {url}",
|
|
22401
|
+
sqlOwnerOnly: "Only the site owner approves database changes. Send them this page: {url}",
|
|
22402
|
+
sqlDashboard: "These database changes are sorted out in the dashboard: {url}",
|
|
22403
|
+
sqlTypeDatabase: "To run them and put v{n} live, type the database name ({db}): ",
|
|
22404
|
+
sqlAskRun: "Run them on {db} and put v{n} live? (y/N) ",
|
|
22405
|
+
sqlNotRun: "Not run. Nothing changed.",
|
|
22406
|
+
sqlAgentDestructive: " These changes remove or overwrite data, so only the owner approves them: at their own terminal (npx deployai@latest promote v{n}) or here: {url}",
|
|
22407
|
+
sqlChanged: "The database changes of v{n} changed since they were shown. Run npx deployai@latest sql v{n}, show the owner again, and ask again.",
|
|
22408
|
+
sqlChangedServer: "The database changes changed since they were shown. Show them again and ask again: {url}",
|
|
22409
|
+
sqlConfirmServer: "These changes remove or overwrite data, so they are approved only at the owner's terminal or in the dashboard: {url}",
|
|
22410
|
+
sqlAgentAsk: ' Show the owner the changes above and ask: "Version {n} changes the database {db}. Run the changes and put it live?"',
|
|
22411
|
+
sqlAgentThen: " After a yes: npx deployai@latest promote v{n} --approve-sql {hash}",
|
|
22412
|
+
sqlNone: "v{n} has no new database changes.",
|
|
22413
|
+
sqlFirst: "The database changes run first. If they fail, the live version stays.",
|
|
22414
|
+
sqlFailed: "The database changes of v{n} failed. The live version stayed.",
|
|
22415
|
+
sqlRetry: " After a fix, deploy again, or try again: npx deployai@latest promote v{n}",
|
|
22416
|
+
sqlRunningState: "running the database changes",
|
|
22417
|
+
sqlBeforeUpload: "This upload has SQL files. New database changes run only after a yes, once the build is done.",
|
|
22034
22418
|
sqlWaiting: "This version has database changes (SQL) that have not run yet. Approve them in the dashboard first, then promote again: {url}",
|
|
22035
22419
|
tokenOtherApi: "The login on this computer is for {saved}, not {url}. Run: npx deployai@latest login --api {url}, or drop --api and DEPLOYAI_API_URL.",
|
|
22036
22420
|
linkConfirm: "Link this folder to {name} ({address})? (y/N) ",
|
|
@@ -22059,6 +22443,7 @@ var M = {
|
|
|
22059
22443
|
startRules: "\u05D4\u05DB\u05DC\u05DC\u05D9\u05DD \u05DC\u05E1\u05D5\u05DB\u05DF \u05E0\u05DB\u05EA\u05D1\u05D5 \u05DC DEPLOYAI.md (\u05DC\u05D0 \u05E2\u05D5\u05DC\u05D9\u05DD \u05DC\u05D0\u05EA\u05E8).",
|
|
22060
22444
|
startStarter: "\u05E0\u05DB\u05EA\u05D1 \u05D3\u05E3 \u05E4\u05EA\u05D9\u05D7\u05D4 (index.html) \u05DC\u05D1\u05E0\u05D5\u05EA \u05E2\u05DC\u05D9\u05D5 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8.",
|
|
22061
22445
|
startStack: "\u05E0\u05E9\u05DE\u05E8 \u05D4\u05E1\u05D8\u05D0\u05E7 \u05E9\u05E0\u05D1\u05D7\u05E8 \u05D1\u05D0\u05EA\u05E8: {stack}.",
|
|
22446
|
+
startScanned: "\u05E0\u05E1\u05E8\u05E7 \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D9\u05E9\u05DF {url}: \u05D4\u05D3\u05E4\u05D9\u05DD, \u05D4\u05EA\u05DE\u05D5\u05E0\u05D5\u05EA \u05D5\u05D4\u05EA\u05D5\u05DB\u05DF \u05E9\u05DC\u05D5 \u05D1 {dir}.",
|
|
22062
22447
|
stackDiffers: "\u05E9\u05D9\u05DE\u05D5 \u05DC\u05D1: \u05D4\u05E1\u05D8\u05D0\u05E7 \u05E9\u05E0\u05D1\u05D7\u05E8 \u05D1\u05D0\u05EA\u05E8 \u05D4\u05D5\u05D0 {chosen}, \u05D0\u05D1\u05DC \u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05D4\u05D9\u05D0 {found}. \u05D4\u05DE\u05E9\u05D9\u05DB\u05D5 \u05D1\u05E1\u05D8\u05D0\u05E7 \u05E9\u05E0\u05D1\u05D7\u05E8, \u05D0\u05D5 \u05D4\u05E1\u05D1\u05D9\u05E8\u05D5 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DC\u05DE\u05D4 \u05D4\u05D5\u05D0 \u05D4\u05E9\u05EA\u05E0\u05D4.",
|
|
22063
22448
|
startRelinked: '\u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D7\u05D5\u05D1\u05E8\u05D4 \u05DC\u05D0\u05EA\u05E8 "{name}" \u05D1\u05DE\u05E7\u05D5\u05DD \u05D4\u05D0\u05EA\u05E8 \u05E9\u05D4\u05D9\u05D9\u05EA\u05D4 \u05DE\u05D7\u05D5\u05D1\u05E8\u05EA \u05D0\u05DC\u05D9\u05D5.',
|
|
22064
22449
|
statusLine: "\u05DE\u05E6\u05D1: {s}",
|
|
@@ -22073,6 +22458,9 @@ var M = {
|
|
|
22073
22458
|
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",
|
|
22074
22459
|
copied: " (\u05D4\u05D5\u05E2\u05EA\u05E7)",
|
|
22075
22460
|
runDeploy: ' \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest deploy -m "<message>"',
|
|
22461
|
+
moveOfferGranted: "\u05D4\u05D0\u05EA\u05E8 \u05E2\u05D1\u05E8 \u05DE /move \u05D5\u05E7\u05D9\u05D1\u05DC {n} \u05EA\u05D5\u05E1\u05E4\u05D9\u05DD \u05D1\u05D7\u05D9\u05E0\u05DD. \u05DE\u05E8\u05D9\u05E6\u05D9\u05DD \u05D0\u05EA \u05DB\u05D5\u05DC\u05DD \u05E2\u05DD: npx deployai@latest addons run",
|
|
22462
|
+
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.",
|
|
22463
|
+
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.",
|
|
22076
22464
|
initHint: " \u05DB\u05D3\u05D9 \u05E9\u05D4\u05E1\u05D5\u05DB\u05DF \u05D9\u05E2\u05D1\u05D5\u05D3 \u05DC\u05E4\u05D9 \u05D4\u05DB\u05DC\u05DC\u05D9\u05DD \u05E9\u05DC DeployAI, \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest init",
|
|
22077
22465
|
emptyFolder: "\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DE\u05D4 \u05DC\u05D1\u05D3\u05D5\u05E7: \u05D0\u05D9\u05DF \u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05D0\u05EA\u05E8. \u05D1\u05E0\u05D5 \u05DB\u05D0\u05DF \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8, \u05D5\u05D0\u05D6 \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest check",
|
|
22078
22466
|
deployTitle: "DeployAI deploy",
|
|
@@ -22101,6 +22489,8 @@ var M = {
|
|
|
22101
22489
|
guestClaim: "\u05E4\u05EA\u05D7\u05D5 \u05D0\u05EA \u05E7\u05D9\u05E9\u05D5\u05E8 \u05D4\u05E9\u05DE\u05D9\u05E8\u05D4 \u05DB\u05D3\u05D9 \u05DC\u05E9\u05DE\u05D5\u05E8 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 (\u05D4\u05E8\u05E9\u05DE\u05D4 \u05D0\u05D5 \u05DB\u05E0\u05D9\u05E1\u05D4).",
|
|
22102
22490
|
claimLink: "\u05E7\u05D9\u05E9\u05D5\u05E8 \u05D4\u05E9\u05DE\u05D9\u05E8\u05D4 \u05E9\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D4\u05D6\u05DE\u05E0\u05D9: {url}",
|
|
22103
22491
|
pulled: "\u05D4\u05D5\u05E8\u05D3\u05E0\u05D5 \u05D0\u05EA \u05D4\u05E7\u05D5\u05D3 \u05E9\u05DC \u05D2\u05E8\u05E1\u05D4 v{v}: {n} \u05E7\u05D1\u05E6\u05D9\u05DD.",
|
|
22492
|
+
pulledHistory: "\u05D4\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4 \u05D9\u05E8\u05D3\u05D4: {n} \u05D2\u05E8\u05E1\u05D0\u05D5\u05EA \u05DB commits \u05D1 git, \u05E2\u05D3 \u05D4\u05D2\u05E8\u05E1\u05D4 \u05D4\u05D7\u05D9\u05D4 v{v}.",
|
|
22493
|
+
pullNoGit: "\u05DB\u05D3\u05D9 \u05DC\u05D4\u05D5\u05E8\u05D9\u05D3 \u05D0\u05EA \u05D4\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4 \u05E6\u05E8\u05D9\u05DA git \u05D1\u05DE\u05D7\u05E9\u05D1. \u05D4\u05EA\u05E7\u05D9\u05E0\u05D5 \u05D0\u05D5\u05EA\u05D5 \u05DE https://git-scm.com, \u05D0\u05D5 \u05D4\u05E8\u05D9\u05E6\u05D5 pull \u05D1\u05DC\u05D9 --history.",
|
|
22104
22494
|
pullNotLinked: "\u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05DC\u05D0 \u05DE\u05D7\u05D5\u05D1\u05E8\u05EA \u05DC\u05D0\u05EA\u05E8. \u05D4\u05E2\u05EA\u05D9\u05E7\u05D5 \u05E9\u05D5\u05D1 \u05D0\u05EA \u05D4\u05E9\u05D5\u05E8\u05D4 \u05DE\u05D3\u05E3 \u05D4\u05D0\u05EA\u05E8 \u05D1\u05BEDeployAI.",
|
|
22105
22495
|
pullNotEmpty: "\u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05DB\u05D1\u05E8 \u05D9\u05E9 \u05E7\u05D1\u05E6\u05D9\u05DD, \u05D0\u05D6 \u05DC\u05D0 \u05D4\u05D5\u05E8\u05D3\u05E0\u05D5 \u05DB\u05DC\u05D5\u05DD. \u05D4\u05E9\u05EA\u05DE\u05E9\u05D5 \u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05E8\u05D9\u05E7\u05D4.",
|
|
22106
22496
|
pullNoSource: "\u05DC\u05D0\u05EA\u05E8 \u05D4\u05D6\u05D4 \u05E2\u05D5\u05D3 \u05D0\u05D9\u05DF \u05D2\u05E8\u05E1\u05D4 \u05DC\u05D4\u05D5\u05E8\u05D9\u05D3.",
|
|
@@ -22119,6 +22509,13 @@ var M = {
|
|
|
22119
22509
|
promoteReady: " \u05D0\u05D7\u05E8\u05D9 \u05E9\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D0\u05D9\u05E9\u05E8 \u05D0\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4: npx deployai@latest promote v{n} (\u05DB\u05D3\u05D9 \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05D5\u05EA\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8)",
|
|
22120
22510
|
askOwner: ' \u05D2\u05E8\u05E1\u05D4 {n} \u05DE\u05D5\u05DB\u05E0\u05D4 \u05D5\u05E2\u05D5\u05D3 \u05DC\u05D0 \u05D1\u05D0\u05D5\u05D5\u05D9\u05E8. \u05E9\u05D0\u05DC\u05D5 \u05D0\u05EA \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8: "\u05D2\u05E8\u05E1\u05D4 {n} \u05DE\u05D5\u05DB\u05E0\u05D4. \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05D5\u05EA\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8?"',
|
|
22121
22511
|
showPreview: " \u05E9\u05DC\u05D7\u05D5 \u05E7\u05D5\u05D3\u05DD \u05D0\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4: {url}",
|
|
22512
|
+
askLiveFirst: "\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05DE\u05D9\u05D3 \u05DB\u05E9\u05D4\u05D1\u05E0\u05D9\u05D9\u05D4 \u05DE\u05E1\u05EA\u05D9\u05D9\u05DE\u05EA? \u05DC\u05D0 \u05DE\u05E6\u05D9\u05D2 \u05E7\u05D5\u05D3\u05DD \u05D0\u05EA \u05D4\u05EA\u05E6\u05D5\u05D2\u05D4 \u05D4\u05DE\u05E7\u05D3\u05D9\u05DE\u05D4. (y/N) ",
|
|
22513
|
+
askLiveNow: "\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05EA v{n} \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E2\u05DB\u05E9\u05D9\u05D5? (y/N) ",
|
|
22514
|
+
waitBuild: "\u05DE\u05D7\u05DB\u05D9\u05DD \u05DC\u05D1\u05E0\u05D9\u05D9\u05D4 \u05E9\u05DC v{n}. Ctrl+C \u05DE\u05E4\u05E1\u05D9\u05E7 \u05D0\u05EA \u05D4\u05D4\u05DE\u05EA\u05E0\u05D4, \u05DC\u05D0 \u05D0\u05EA \u05D4\u05D1\u05E0\u05D9\u05D9\u05D4.",
|
|
22515
|
+
waitState: " v{n}: {s}",
|
|
22516
|
+
buildSlow: "\u05D4\u05D1\u05E0\u05D9\u05D9\u05D4 \u05E9\u05DC v{n} \u05DC\u05D5\u05E7\u05D7\u05EA \u05D9\u05D5\u05EA\u05E8 \u05D6\u05DE\u05DF \u05DE\u05D4\u05E8\u05D2\u05D9\u05DC.",
|
|
22517
|
+
liveNow: "v{n} \u05D1\u05D0\u05D5\u05D5\u05D9\u05E8: {url}",
|
|
22518
|
+
promoteLater: " \u05DB\u05D3\u05D9 \u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05D0\u05D7\u05E8 \u05DB\u05DA: npx deployai@latest promote v{n}",
|
|
22122
22519
|
notPublished: "\u05E2\u05D3\u05D9\u05D9\u05DF \u05DC\u05D0 \u05D1\u05D0\u05D5\u05D5\u05D9\u05E8",
|
|
22123
22520
|
none: "\u05D0\u05D9\u05DF",
|
|
22124
22521
|
buildingNow: "\u05D1\u05D5\u05E0\u05D9\u05DD \u05E2\u05DB\u05E9\u05D9\u05D5",
|
|
@@ -22208,7 +22605,31 @@ var M = {
|
|
|
22208
22605
|
guestClaimFirst: "\u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05D9\u05E9 \u05D0\u05EA\u05E8 \u05D6\u05DE\u05E0\u05D9, \u05D5\u05D0\u05EA\u05DD \u05DE\u05D7\u05D5\u05D1\u05E8\u05D9\u05DD \u05DC\u05D7\u05E9\u05D1\u05D5\u05DF. \u05E7\u05D5\u05D3\u05DD \u05E9\u05DE\u05E8\u05D5 \u05D0\u05EA \u05D4\u05D0\u05EA\u05E8 \u05D1\u05D7\u05E9\u05D1\u05D5\u05DF: {url}",
|
|
22209
22606
|
guestClaimFirstNoLink: "\u05D1\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05D9\u05E9 \u05D0\u05EA\u05E8 \u05D6\u05DE\u05E0\u05D9, \u05D5\u05D0\u05EA\u05DD \u05DE\u05D7\u05D5\u05D1\u05E8\u05D9\u05DD \u05DC\u05D7\u05E9\u05D1\u05D5\u05DF. \u05E7\u05D5\u05D3\u05DD \u05E9\u05DE\u05E8\u05D5 \u05D0\u05D5\u05EA\u05D5 \u05D1\u05D7\u05E9\u05D1\u05D5\u05DF \u05E2\u05DD \u05E7\u05D9\u05E9\u05D5\u05E8 \u05D4\u05E9\u05DE\u05D9\u05E8\u05D4 \u05E9\u05BEdeploy --guest \u05D4\u05D3\u05E4\u05D9\u05E1.",
|
|
22210
22607
|
guestAccountSite: "\u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05E9\u05D9\u05D9\u05DB\u05EA \u05DC\u05D0\u05EA\u05E8 \u05D1\u05D7\u05E9\u05D1\u05D5\u05DF, \u05D5\u05DC\u05DB\u05DF \u05D4\u05D9\u05D0 \u05DC\u05D0 \u05D9\u05DB\u05D5\u05DC\u05D4 \u05DC\u05E2\u05DC\u05D5\u05EA \u05DB\u05D0\u05EA\u05E8 \u05D6\u05DE\u05E0\u05D9. \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest login, \u05D5\u05D0\u05D6: npx deployai@latest deploy",
|
|
22211
|
-
sqlWaitingLine: "\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD (SQL) \u05DE\u05D7\u05DB\u05D9\u05DD \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 \u05E9\u05DC\
|
|
22608
|
+
sqlWaitingLine: "\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD (SQL) \u05DE\u05D7\u05DB\u05D9\u05DD \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 \u05E9\u05DC \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DC\u05E4\u05E0\u05D9 \u05E9\u05BEv{n} \u05E2\u05D5\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8. \u05DC\u05E8\u05D0\u05D5\u05EA \u05D0\u05D5\u05EA\u05DD: npx deployai@latest sql v{n}",
|
|
22609
|
+
sqlTitle: "v{n} \u05DE\u05E9\u05E0\u05D4 \u05D0\u05EA \u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD {db}:",
|
|
22610
|
+
sqlNewDatabase: " \u05DE\u05E1\u05D3 \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05D7\u05D3\u05E9: \u05D4\u05D5\u05D0 \u05E0\u05D5\u05E6\u05E8, \u05D5\u05BEseed.sql \u05E8\u05E5 \u05D2\u05DD \u05D4\u05D5\u05D0.",
|
|
22611
|
+
sqlStatements: "{n} \u05E4\u05E7\u05D5\u05D3\u05D5\u05EA",
|
|
22612
|
+
sqlSkipped: "\u05DC\u05D0 \u05D9\u05E8\u05D5\u05E5 (seed \u05E2\u05DC \u05DE\u05E1\u05D3 \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E9\u05DB\u05D1\u05E8 \u05D9\u05E9 \u05D1\u05D5 \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD)",
|
|
22613
|
+
sqlDestructive: "\u05D0\u05DC\u05D4 \u05DE\u05D5\u05D7\u05E7\u05D9\u05DD \u05D0\u05D5 \u05D3\u05D5\u05E8\u05E1\u05D9\u05DD \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD, \u05D5\u05D7\u05D6\u05E8\u05D4 \u05DC\u05D2\u05E8\u05E1\u05D4 \u05E7\u05D5\u05D3\u05DE\u05EA \u05DC\u05D0 \u05DE\u05D7\u05D6\u05D9\u05E8\u05D4 \u05D0\u05D5\u05EA\u05DD:",
|
|
22614
|
+
sqlRunningNow: "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E9\u05DC v{n} \u05DB\u05D1\u05E8 \u05E8\u05E6\u05D9\u05DD. \u05D4\u05D9\u05D0 \u05E2\u05D5\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05DB\u05E9\u05D4\u05DD \u05DE\u05E1\u05EA\u05D9\u05D9\u05DE\u05D9\u05DD.",
|
|
22615
|
+
sqlRunningNowShort: "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DB\u05D1\u05E8 \u05E8\u05E6\u05D9\u05DD. \u05D4\u05D2\u05E8\u05E1\u05D4 \u05E2\u05D5\u05DC\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05DB\u05E9\u05D4\u05DD \u05DE\u05E1\u05EA\u05D9\u05D9\u05DE\u05D9\u05DD: {url}",
|
|
22616
|
+
sqlOwnerOnly: "\u05E8\u05E7 \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DE\u05D0\u05E9\u05E8 \u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD. \u05E9\u05DC\u05D7\u05D5 \u05D0\u05EA \u05D4\u05D3\u05E3 \u05D4\u05D6\u05D4 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8: {url}",
|
|
22617
|
+
sqlDashboard: "\u05D0\u05EA \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D4\u05D0\u05DC\u05D4 \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DE\u05E1\u05D3\u05E8\u05D9\u05DD \u05D1\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4: {url}",
|
|
22618
|
+
sqlTypeDatabase: "\u05DB\u05D3\u05D9 \u05DC\u05D4\u05E8\u05D9\u05E5 \u05D0\u05D5\u05EA\u05DD \u05D5\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05EA v{n} \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8, \u05D4\u05E7\u05DC\u05D9\u05D3\u05D5 \u05D0\u05EA \u05E9\u05DD \u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD ({db}): ",
|
|
22619
|
+
sqlAskRun: "\u05DC\u05D4\u05E8\u05D9\u05E5 \u05D0\u05D5\u05EA\u05DD \u05E2\u05DC {db} \u05D5\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05EA v{n} \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8? (y/N) ",
|
|
22620
|
+
sqlNotRun: "\u05DC\u05D0 \u05E8\u05E5. \u05E9\u05D5\u05DD \u05D3\u05D1\u05E8 \u05DC\u05D0 \u05D4\u05E9\u05EA\u05E0\u05D4.",
|
|
22621
|
+
sqlAgentDestructive: " \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D4\u05D0\u05DC\u05D4 \u05DE\u05D5\u05D7\u05E7\u05D9\u05DD \u05D0\u05D5 \u05D3\u05D5\u05E8\u05E1\u05D9\u05DD \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD, \u05D5\u05DC\u05DB\u05DF \u05E8\u05E7 \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05DE\u05D0\u05E9\u05E8 \u05D0\u05D5\u05EA\u05DD: \u05D1\u05DE\u05E1\u05D5\u05E3 \u05E9\u05DC \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 (npx deployai@latest promote v{n}) \u05D0\u05D5 \u05DB\u05D0\u05DF: {url}",
|
|
22622
|
+
sqlChanged: "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E9\u05DC v{n} \u05D4\u05E9\u05EA\u05E0\u05D5 \u05DE\u05D0\u05D6 \u05E9\u05D4\u05D5\u05E6\u05D2\u05D5. \u05D4\u05E8\u05D9\u05E6\u05D5 npx deployai@latest sql v{n}, \u05D4\u05E8\u05D0\u05D5 \u05E9\u05D5\u05D1 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D5\u05E9\u05D0\u05DC\u05D5 \u05E9\u05D5\u05D1.",
|
|
22623
|
+
sqlChangedServer: "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05D4\u05E9\u05EA\u05E0\u05D5 \u05DE\u05D0\u05D6 \u05E9\u05D4\u05D5\u05E6\u05D2\u05D5. \u05D4\u05E6\u05D9\u05D2\u05D5 \u05D0\u05D5\u05EA\u05DD \u05E9\u05D5\u05D1 \u05D5\u05E9\u05D0\u05DC\u05D5 \u05E9\u05D5\u05D1: {url}",
|
|
22624
|
+
sqlConfirmServer: "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D4\u05D0\u05DC\u05D4 \u05DE\u05D5\u05D7\u05E7\u05D9\u05DD \u05D0\u05D5 \u05D3\u05D5\u05E8\u05E1\u05D9\u05DD \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD, \u05D5\u05DC\u05DB\u05DF \u05DE\u05D0\u05E9\u05E8\u05D9\u05DD \u05D0\u05D5\u05EA\u05DD \u05E8\u05E7 \u05D1\u05DE\u05E1\u05D5\u05E3 \u05E9\u05DC \u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D0\u05D5 \u05D1\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4: {url}",
|
|
22625
|
+
sqlAgentAsk: ' \u05D4\u05E8\u05D0\u05D5 \u05DC\u05D1\u05E2\u05DC \u05D4\u05D0\u05EA\u05E8 \u05D0\u05EA \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05DC\u05DE\u05E2\u05DC\u05D4 \u05D5\u05E9\u05D0\u05DC\u05D5: "\u05D2\u05E8\u05E1\u05D4 {n} \u05DE\u05E9\u05E0\u05D4 \u05D0\u05EA \u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD {db}. \u05DC\u05D4\u05E8\u05D9\u05E5 \u05D0\u05EA \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D5\u05DC\u05D4\u05E2\u05DC\u05D5\u05EA \u05D0\u05D5\u05EA\u05D4 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8?"',
|
|
22626
|
+
sqlAgentThen: " \u05D0\u05D7\u05E8\u05D9 \u05EA\u05E9\u05D5\u05D1\u05D4 \u05D7\u05D9\u05D5\u05D1\u05D9\u05EA: npx deployai@latest promote v{n} --approve-sql {hash}",
|
|
22627
|
+
sqlNone: "\u05D1\u05BEv{n} \u05D0\u05D9\u05DF \u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D7\u05D3\u05E9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD.",
|
|
22628
|
+
sqlFirst: "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E8\u05E6\u05D9\u05DD \u05E7\u05D5\u05D3\u05DD. \u05D0\u05DD \u05D4\u05DD \u05E0\u05DB\u05E9\u05DC\u05D9\u05DD, \u05D4\u05D2\u05E8\u05E1\u05D4 \u05E9\u05D1\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E0\u05E9\u05D0\u05E8\u05EA.",
|
|
22629
|
+
sqlFailed: "\u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E9\u05DC v{n} \u05E0\u05DB\u05E9\u05DC\u05D5. \u05D4\u05D2\u05E8\u05E1\u05D4 \u05E9\u05D1\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E0\u05E9\u05D0\u05E8\u05D4.",
|
|
22630
|
+
sqlRetry: " \u05D0\u05D7\u05E8\u05D9 \u05EA\u05D9\u05E7\u05D5\u05DF, \u05D4\u05E2\u05DC\u05D5 \u05E9\u05D5\u05D1, \u05D0\u05D5 \u05E0\u05E1\u05D5 \u05E9\u05D5\u05D1: npx deployai@latest promote v{n}",
|
|
22631
|
+
sqlRunningState: "\u05DE\u05E8\u05D9\u05E5 \u05D0\u05EA \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD",
|
|
22632
|
+
sqlBeforeUpload: "\u05D1\u05D4\u05E2\u05DC\u05D0\u05D4 \u05D4\u05D6\u05D5 \u05D9\u05E9 \u05E7\u05D5\u05D1\u05E6\u05D9 SQL. \u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D7\u05D3\u05E9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05E8\u05E6\u05D9\u05DD \u05E8\u05E7 \u05D0\u05D7\u05E8\u05D9 \u05D0\u05D9\u05E9\u05D5\u05E8, \u05DB\u05E9\u05D4\u05D1\u05E0\u05D9\u05D9\u05D4 \u05DE\u05E1\u05EA\u05D9\u05D9\u05DE\u05EA.",
|
|
22212
22633
|
sqlWaiting: "\u05D1\u05D2\u05E8\u05E1\u05D4 \u05D4\u05D6\u05D5 \u05D9\u05E9 \u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05D1\u05DE\u05E1\u05D3 \u05D4\u05E0\u05EA\u05D5\u05E0\u05D9\u05DD (SQL) \u05E9\u05E2\u05D5\u05D3 \u05DC\u05D0 \u05E8\u05E6\u05D5. \u05D0\u05E9\u05E8\u05D5 \u05D0\u05D5\u05EA\u05DD \u05E7\u05D5\u05D3\u05DD \u05D1\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4, \u05D5\u05D0\u05D6 \u05D4\u05E2\u05DC\u05D5 \u05DC\u05D0\u05D5\u05D5\u05D9\u05E8 \u05E9\u05D5\u05D1: {url}",
|
|
22213
22634
|
tokenOtherApi: "\u05D4\u05DB\u05E0\u05D9\u05E1\u05D4 \u05D1\u05DE\u05D7\u05E9\u05D1 \u05D4\u05D6\u05D4 \u05D4\u05D9\u05D0 \u05DC {saved}, \u05DC\u05D0 \u05DC {url}. \u05D4\u05E8\u05D9\u05E6\u05D5: npx deployai@latest login --api {url}, \u05D0\u05D5 \u05D4\u05D5\u05E8\u05D9\u05D3\u05D5 \u05D0\u05EA --api \u05D5\u05D0\u05EA DEPLOYAI_API_URL.",
|
|
22214
22635
|
linkConfirm: "\u05DC\u05D7\u05D1\u05E8 \u05D0\u05EA \u05D4\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D4\u05D6\u05D5 \u05DC {name} ({address})? (y/N) ",
|
|
@@ -22238,7 +22659,7 @@ function messages(root) {
|
|
|
22238
22659
|
}
|
|
22239
22660
|
|
|
22240
22661
|
// src/version.ts
|
|
22241
|
-
var CLI_VERSION = "0.1.0-beta.
|
|
22662
|
+
var CLI_VERSION = "0.1.0-beta.14";
|
|
22242
22663
|
|
|
22243
22664
|
// src/api.ts
|
|
22244
22665
|
function apiContext(apiFlag) {
|
|
@@ -22299,6 +22720,10 @@ async function apiRequest(ctx, path, schema, opts = {}) {
|
|
|
22299
22720
|
if (parsed2.success && parsed2.data.error === "sql_waiting") {
|
|
22300
22721
|
throw new CliError(t("sqlWaiting", { url: parsed2.data.url ?? `${ctx.apiUrl}/dashboard` }), 1, "sql_waiting");
|
|
22301
22722
|
}
|
|
22723
|
+
const sqlRefusals = { sql_running: "sqlRunningNowShort", sql_owner_only: "sqlOwnerOnly", sql_changed: "sqlChangedServer", sql_confirm: "sqlConfirmServer", sql_dashboard: "sqlDashboard" };
|
|
22724
|
+
if (parsed2.success && sqlRefusals[parsed2.data.error]) {
|
|
22725
|
+
throw new CliError(t(sqlRefusals[parsed2.data.error], { url: parsed2.data.url ?? `${ctx.apiUrl}/dashboard` }), 1, parsed2.data.error);
|
|
22726
|
+
}
|
|
22302
22727
|
const known = parsed2.success ? knownError(parsed2.data.error, data?.max, t, { ...data, billingUrl: `${ctx.apiUrl}/billing` }) : null;
|
|
22303
22728
|
if (known) throw new CliError(known, 1, parsed2.success ? parsed2.data.error : "api");
|
|
22304
22729
|
const msg = parsed2.success ? parsed2.data.error : `HTTP ${res.status}`;
|
|
@@ -22573,12 +22998,12 @@ function loadIgnore(root) {
|
|
|
22573
22998
|
}
|
|
22574
22999
|
}
|
|
22575
23000
|
function loadUploadIgnore(root) {
|
|
22576
|
-
let
|
|
23001
|
+
let git2 = [];
|
|
22577
23002
|
try {
|
|
22578
|
-
|
|
23003
|
+
git2 = parseIgnore(readFileSync3(join3(root, ".gitignore"), "utf8"));
|
|
22579
23004
|
} catch {
|
|
22580
23005
|
}
|
|
22581
|
-
return [...
|
|
23006
|
+
return [...git2, ...loadIgnore(root)];
|
|
22582
23007
|
}
|
|
22583
23008
|
function walkFiles(root, opts = {}) {
|
|
22584
23009
|
const result = [];
|
|
@@ -23126,6 +23551,10 @@ ${runCommandsRule()}
|
|
|
23126
23551
|
|
|
23127
23552
|
Never stop building for an account, a plan or a limit. Build what the owner asks; say once, in one plain line, what going live will need, and ask about it only at the deploy step.
|
|
23128
23553
|
|
|
23554
|
+
## When to deploy
|
|
23555
|
+
|
|
23556
|
+
${DEPLOY_ASK_RULE}
|
|
23557
|
+
|
|
23129
23558
|
## Check
|
|
23130
23559
|
|
|
23131
23560
|
Before adding a dependency or a new server feature, run: npx deployai@latest check
|
|
@@ -23478,21 +23907,21 @@ async function loginCommand(ctx, opts = {}) {
|
|
|
23478
23907
|
const deadline = Date.now() + start.expiresInSeconds * 1e3;
|
|
23479
23908
|
while (Date.now() < deadline) {
|
|
23480
23909
|
await sleep(intervalMs);
|
|
23481
|
-
const
|
|
23910
|
+
const poll2 = await apiRequest(ctx, "/api/cli/device/poll", DevicePollResponse, {
|
|
23482
23911
|
method: "POST",
|
|
23483
23912
|
body: { deviceCode: start.deviceCode },
|
|
23484
23913
|
auth: false
|
|
23485
23914
|
});
|
|
23486
|
-
if (
|
|
23487
|
-
if (!
|
|
23488
|
-
updateConfig({ token:
|
|
23915
|
+
if (poll2.status === "approved") {
|
|
23916
|
+
if (!poll2.token) throw new CliError(messages()("loginNoToken"), 1, "protocol");
|
|
23917
|
+
updateConfig({ token: poll2.token, email: poll2.email, apiUrl: ctx.apiUrl, tokenApiUrl: ctx.apiUrl });
|
|
23489
23918
|
out();
|
|
23490
|
-
out(
|
|
23919
|
+
out(poll2.email ? t("loggedInAs", { email: poll2.email }) : t("loggedIn"));
|
|
23491
23920
|
out(t("nextStep"));
|
|
23492
23921
|
out(opts.root && readProject(opts.root)?.projectId ? t("runDeploy") : t("runLink"));
|
|
23493
23922
|
return;
|
|
23494
23923
|
}
|
|
23495
|
-
if (
|
|
23924
|
+
if (poll2.status === "expired") break;
|
|
23496
23925
|
}
|
|
23497
23926
|
throw new CliError(t("loginExpired"), 1, "auth_expired");
|
|
23498
23927
|
}
|
|
@@ -23548,14 +23977,384 @@ function telemetryCommand(action) {
|
|
|
23548
23977
|
|
|
23549
23978
|
// src/commands/link.ts
|
|
23550
23979
|
import { createInterface } from "readline/promises";
|
|
23551
|
-
|
|
23980
|
+
|
|
23981
|
+
// src/commands/migrate.ts
|
|
23982
|
+
import { createWriteStream, existsSync as existsSync7, mkdirSync as mkdirSync3, readdirSync as readdirSync3, readFileSync as readFileSync6, statSync, writeFileSync as writeFileSync5 } from "fs";
|
|
23983
|
+
import { dirname, join as join7, posix, relative, resolve, sep } from "path";
|
|
23984
|
+
import { Readable } from "stream";
|
|
23985
|
+
import { pipeline } from "stream/promises";
|
|
23986
|
+
var UA = `deployai-migrate/${CLI_VERSION} (+https://deployai.co.il/move)`;
|
|
23987
|
+
var PAGE_CAP = 1e3;
|
|
23988
|
+
var WP_PAGE_CAP = 50;
|
|
23989
|
+
var MEDIA_FILE_CAP = 25 * 1024 * 1024;
|
|
23990
|
+
var MEDIA_TOTAL_CAP = 1024 * 1024 * 1024;
|
|
23991
|
+
var PAUSE_MS = 150;
|
|
23992
|
+
var SCAN_WORKERS = 4;
|
|
23993
|
+
var START_SCAN_PAGES = 300;
|
|
23994
|
+
var sleep2 = (ms2) => new Promise((r) => setTimeout(r, ms2));
|
|
23995
|
+
var hostDir = (root, host) => join7(root, MIGRATION_DIR, host.replace(/^www\./, ""));
|
|
23996
|
+
var readJson2 = (file2) => {
|
|
23997
|
+
try {
|
|
23998
|
+
return JSON.parse(readFileSync6(file2, "utf8"));
|
|
23999
|
+
} catch {
|
|
24000
|
+
return null;
|
|
24001
|
+
}
|
|
24002
|
+
};
|
|
24003
|
+
var writeJson = (file2, data) => {
|
|
24004
|
+
mkdirSync3(dirname(file2), { recursive: true });
|
|
24005
|
+
writeFileSync5(file2, JSON.stringify(data, null, 2) + "\n");
|
|
24006
|
+
};
|
|
24007
|
+
async function get(url2, accept = "text/html,application/xhtml+xml,*/*;q=0.8", redirect = "follow") {
|
|
24008
|
+
try {
|
|
24009
|
+
return await fetch(url2, { headers: { "User-Agent": UA, Accept: accept }, redirect, signal: AbortSignal.timeout(3e4) });
|
|
24010
|
+
} catch {
|
|
24011
|
+
return null;
|
|
24012
|
+
}
|
|
24013
|
+
}
|
|
24014
|
+
function scannedHosts(root) {
|
|
24015
|
+
const dir = join7(root, MIGRATION_DIR);
|
|
24016
|
+
if (!existsSync7(dir)) return [];
|
|
24017
|
+
return readdirSync3(dir).filter((h) => existsSync7(join7(dir, h, "inventory.json")));
|
|
24018
|
+
}
|
|
24019
|
+
async function migrateStatusCommand(root, ctx, stage, note) {
|
|
24020
|
+
if (!isAgentStage(stage)) throw new CliError(`Unknown stage: ${stage}. One of: ${AGENT_STAGES.join(", ")}.`, 1, "usage");
|
|
24021
|
+
const choices = readChoices(root);
|
|
24022
|
+
if (!choices?.startId || !choices.requestId) {
|
|
24023
|
+
out("This folder is not a managed move, so there is no request to update. Nothing was sent.");
|
|
24024
|
+
return;
|
|
24025
|
+
}
|
|
24026
|
+
await apiRequest(ctx, "/api/migrations/progress", null, { method: "POST", auth: false, body: { startId: choices.startId, stage, note: stageNote(note) } });
|
|
24027
|
+
out(`Reported: ${stage}${note ? ` (${stageNote(note)})` : ""}.`);
|
|
24028
|
+
}
|
|
24029
|
+
function readChoices(root) {
|
|
24030
|
+
return readJson2(join7(root, MIGRATION_DIR, "choices.json"));
|
|
24031
|
+
}
|
|
24032
|
+
function writeChoices(root, choices) {
|
|
24033
|
+
ensureMigrationDir(root);
|
|
24034
|
+
writeJson(join7(root, MIGRATION_DIR, "choices.json"), choices);
|
|
24035
|
+
}
|
|
24036
|
+
function ensureMigrationDir(root) {
|
|
24037
|
+
ensureDeployaiDir(root);
|
|
24038
|
+
const dir = join7(root, MIGRATION_DIR);
|
|
24039
|
+
mkdirSync3(dir, { recursive: true });
|
|
24040
|
+
const ignore = join7(dir, ".gitignore");
|
|
24041
|
+
if (!existsSync7(ignore)) writeFileSync5(ignore, "*/media/\n*/media-state.json\n");
|
|
24042
|
+
}
|
|
24043
|
+
async function sitemapUrls(base, robotsSitemaps, enough) {
|
|
24044
|
+
const own2 = [`${base}/wp-sitemap.xml`, `${base}/sitemap_index.xml`, `${base}/sitemap.xml`];
|
|
24045
|
+
const prefix = new URL(base).pathname.replace(/\/$/, "");
|
|
24046
|
+
const queue = prefix ? [...own2, ...robotsSitemaps] : robotsSitemaps.length ? [...robotsSitemaps] : own2;
|
|
24047
|
+
const host = new URL(base).hostname.replace(/^www\./, "");
|
|
24048
|
+
const inSite = (u) => u.hostname.replace(/^www\./, "") === host && (!prefix || u.pathname === prefix || u.pathname.startsWith(`${prefix}/`));
|
|
24049
|
+
const seen = /* @__PURE__ */ new Set();
|
|
24050
|
+
const found = [];
|
|
24051
|
+
const urls = /* @__PURE__ */ new Set();
|
|
24052
|
+
while (queue.length && seen.size < 200 && urls.size < enough) {
|
|
24053
|
+
const next = queue.shift();
|
|
24054
|
+
if (seen.has(next)) continue;
|
|
24055
|
+
seen.add(next);
|
|
24056
|
+
const res = await get(next, "application/xml,text/xml,*/*;q=0.5");
|
|
24057
|
+
if (!res?.ok) continue;
|
|
24058
|
+
const xml = await res.text();
|
|
24059
|
+
if (!/<(urlset|sitemapindex)\b/i.test(xml)) continue;
|
|
24060
|
+
found.push(next);
|
|
24061
|
+
const parsed = parseSitemapXml(xml);
|
|
24062
|
+
queue.push(...parsed.sitemaps);
|
|
24063
|
+
for (const u of parsed.urls) {
|
|
24064
|
+
try {
|
|
24065
|
+
if (inSite(new URL(u))) urls.add(u);
|
|
24066
|
+
} catch {
|
|
24067
|
+
}
|
|
24068
|
+
}
|
|
24069
|
+
await sleep2(PAUSE_MS);
|
|
24070
|
+
}
|
|
24071
|
+
return { urls: [...urls], sitemaps: found };
|
|
24072
|
+
}
|
|
24073
|
+
function homeLinks(html, origin) {
|
|
24074
|
+
const host = new URL(origin).hostname;
|
|
24075
|
+
const out2 = /* @__PURE__ */ new Set();
|
|
24076
|
+
for (const m of html.matchAll(/<a\b[^>]*href=["']([^"'#]+)/gi)) {
|
|
24077
|
+
try {
|
|
24078
|
+
const u = new URL(m[1], origin);
|
|
24079
|
+
if (u.hostname === host && !/\.(jpe?g|png|gif|webp|svg|pdf|zip|mp4|mp3)$/i.test(u.pathname)) out2.add(u.origin + u.pathname + u.search);
|
|
24080
|
+
} catch {
|
|
24081
|
+
}
|
|
24082
|
+
}
|
|
24083
|
+
return [...out2];
|
|
24084
|
+
}
|
|
24085
|
+
async function wordpressContent(base, dir) {
|
|
24086
|
+
const probe = await get(`${base}/wp-json/wp/v2/types`, "application/json");
|
|
24087
|
+
if (!probe?.ok || !(probe.headers.get("content-type") ?? "").includes("json")) return false;
|
|
24088
|
+
const types = ["pages", "posts", "categories", "tags", "media", "users", "product"];
|
|
24089
|
+
for (const type of types) {
|
|
24090
|
+
const items = [];
|
|
24091
|
+
for (let page2 = 1; page2 <= WP_PAGE_CAP; page2++) {
|
|
24092
|
+
const res = await get(`${base}/wp-json/wp/v2/${type}?per_page=100&page=${page2}`, "application/json");
|
|
24093
|
+
if (!res?.ok) break;
|
|
24094
|
+
const batch = await res.json().catch(() => null);
|
|
24095
|
+
if (!Array.isArray(batch) || !batch.length) break;
|
|
24096
|
+
items.push(...batch);
|
|
24097
|
+
if (batch.length < 100) break;
|
|
24098
|
+
await sleep2(PAUSE_MS);
|
|
24099
|
+
}
|
|
24100
|
+
if (items.length) {
|
|
24101
|
+
writeJson(join7(dir, "content", `${type}.json`), items);
|
|
24102
|
+
out(` ${type}: ${items.length}`);
|
|
24103
|
+
}
|
|
24104
|
+
}
|
|
24105
|
+
const posts = readJson2(join7(dir, "content", "posts.json"));
|
|
24106
|
+
if (posts?.length) {
|
|
24107
|
+
const files = wpPostsToMarkdown({ origin: new URL(base).origin, posts, categories: readJson2(join7(dir, "content", "categories.json")) ?? [], tags: readJson2(join7(dir, "content", "tags.json")) ?? [], users: readJson2(join7(dir, "content", "users.json")) ?? [], media: readJson2(join7(dir, "content", "media.json")) ?? [] });
|
|
24108
|
+
mkdirSync3(join7(dir, "posts"), { recursive: true });
|
|
24109
|
+
for (const f of files) writeFileSync5(join7(dir, "posts", f.file), f.text);
|
|
24110
|
+
out(` posts as Markdown: ${files.length}`);
|
|
24111
|
+
}
|
|
24112
|
+
return true;
|
|
24113
|
+
}
|
|
24114
|
+
function pageAssets(html, base) {
|
|
24115
|
+
const found = /* @__PURE__ */ new Set();
|
|
24116
|
+
const add = (u) => {
|
|
24117
|
+
if (!u || u.startsWith("data:")) return;
|
|
24118
|
+
try {
|
|
24119
|
+
found.add(new URL(u.trim(), base).toString());
|
|
24120
|
+
} catch {
|
|
24121
|
+
}
|
|
24122
|
+
};
|
|
24123
|
+
for (const m of html.matchAll(/<img\b[^>]*>/gi)) {
|
|
24124
|
+
add(m[0].match(/\ssrc=["']([^"']+)/i)?.[1]);
|
|
24125
|
+
const set2 = m[0].match(/\ssrcset=["']([^"']+)/i)?.[1];
|
|
24126
|
+
if (set2) add(set2.split(",").map((s) => s.trim().split(/\s+/)[0]).pop());
|
|
24127
|
+
}
|
|
24128
|
+
add(html.match(/<meta[^>]+property=["']og:image["'][^>]*content=["']([^"']+)/i)?.[1]);
|
|
24129
|
+
for (const m of html.matchAll(/url\(["']?([^"')]+\.(?:jpe?g|png|gif|webp|svg|avif))/gi)) add(m[1]);
|
|
24130
|
+
return [...found];
|
|
24131
|
+
}
|
|
24132
|
+
async function migrateScanCommand(root, raw, opts = {}) {
|
|
24133
|
+
const source = normalizeSourceUrl(raw);
|
|
24134
|
+
if (!source) throw new CliError(`Not a site address: ${raw}. Use the full address, for example https://example.co.il`, 1, "usage");
|
|
24135
|
+
const home = await get(source);
|
|
24136
|
+
if (!home) throw new CliError(`Could not reach ${source}. Check the address, or that the site is up.`, 1, "network");
|
|
24137
|
+
if (home.status === 401 || home.status === 403) throw new CliError(`${source} answers ${home.status}: it is behind a login or blocks visitors. Ask the owner to open it to the public while it moves, or work from their export.`, 1, "blocked");
|
|
24138
|
+
const origin = new URL(home.url).origin;
|
|
24139
|
+
const base = (origin + new URL(home.url).pathname).replace(/\/+$/, "");
|
|
24140
|
+
const html = await home.text();
|
|
24141
|
+
const headers = Object.fromEntries(home.headers.entries());
|
|
24142
|
+
const platform3 = detectPlatform(html, headers);
|
|
24143
|
+
const host = new URL(origin).hostname;
|
|
24144
|
+
ensureMigrationDir(root);
|
|
24145
|
+
const dir = hostDir(root, host);
|
|
24146
|
+
mkdirSync3(dir, { recursive: true });
|
|
24147
|
+
out(`Scanning ${base} (${platform3})`);
|
|
24148
|
+
const robotsRes = await get(`${origin}/robots.txt`, "text/plain");
|
|
24149
|
+
const robots = robotsRes?.ok ? await robotsRes.text() : "";
|
|
24150
|
+
if (robots) writeFileSync5(join7(dir, "robots.txt"), robots);
|
|
24151
|
+
const cap = Math.min(opts.max ?? PAGE_CAP, PAGE_CAP);
|
|
24152
|
+
const fromSitemaps = await sitemapUrls(base, robots ? parseRobots(robots).sitemaps : [], cap * 5);
|
|
24153
|
+
const all = [.../* @__PURE__ */ new Set([`${base}/`, ...fromSitemaps.urls, ...fromSitemaps.urls.length ? [] : homeLinks(html, base)])];
|
|
24154
|
+
const list = all.slice(0, cap);
|
|
24155
|
+
out(` sitemaps: ${fromSitemaps.sitemaps.length}, addresses: ${all.length}${all.length > cap ? ` (the first ${cap} are read)` : ""}`);
|
|
24156
|
+
const pages = new Array(list.length);
|
|
24157
|
+
const assets = /* @__PURE__ */ new Set();
|
|
24158
|
+
let next = 0;
|
|
24159
|
+
let read = 0;
|
|
24160
|
+
const worker = async () => {
|
|
24161
|
+
while (next < list.length) {
|
|
24162
|
+
const i = next++;
|
|
24163
|
+
const url2 = list[i];
|
|
24164
|
+
const res = i === 0 ? null : await get(url2, void 0, "manual");
|
|
24165
|
+
const status = i === 0 ? home.status : res?.status ?? 0;
|
|
24166
|
+
const body = i === 0 ? html : res && res.ok ? await res.text() : "";
|
|
24167
|
+
const seo = body ? readPageSeo(body) : null;
|
|
24168
|
+
pages[i] = { path: pathOf(url2), status, title: seo?.title ?? null, description: seo?.description ?? null, canonical: seo?.canonical ?? null, h1: seo?.h1[0] ?? null, lang: seo?.lang ?? null };
|
|
24169
|
+
if (body) pageAssets(body, url2).forEach((a) => assets.add(a));
|
|
24170
|
+
if (++read % 50 === 0) out(` pages read: ${read} of ${list.length}`);
|
|
24171
|
+
if (i) await sleep2(PAUSE_MS);
|
|
24172
|
+
}
|
|
24173
|
+
};
|
|
24174
|
+
await Promise.all(Array.from({ length: SCAN_WORKERS }, worker));
|
|
24175
|
+
const wordpressApi = platform3 === "wordpress" ? await wordpressContent(base, dir) : false;
|
|
24176
|
+
if (wordpressApi) {
|
|
24177
|
+
const media = readJson2(join7(dir, "content", "media.json")) ?? [];
|
|
24178
|
+
media.forEach((m) => m.source_url && assets.add(m.source_url));
|
|
24179
|
+
}
|
|
24180
|
+
const inventory = { source: base, platform: platform3, scannedAt: (/* @__PURE__ */ new Date()).toISOString(), sitemaps: fromSitemaps.sitemaps, pages, wordpressApi, skipped: Math.max(0, all.length - list.length) };
|
|
24181
|
+
writeJson(join7(dir, "inventory.json"), inventory);
|
|
24182
|
+
writeJson(join7(dir, "assets.json"), [...assets].sort());
|
|
24183
|
+
writeFileSync5(join7(dir, "home.html"), html);
|
|
24184
|
+
const rel = relative(root, dir).split(sep).join("/");
|
|
24185
|
+
const broken = pages.filter((p) => p.status >= 400).length;
|
|
24186
|
+
out();
|
|
24187
|
+
out(`Saved in ${rel}:`);
|
|
24188
|
+
out(` inventory.json ${pages.length} pages with their address, title, description and headings${broken ? ` (${broken} already broken on the old site)` : ""}`);
|
|
24189
|
+
out(` assets.json ${assets.size} images and files`);
|
|
24190
|
+
if (wordpressApi) {
|
|
24191
|
+
out(" content/ the WordPress pages, posts, categories, tags, media and authors as JSON");
|
|
24192
|
+
if (existsSync7(join7(dir, "posts"))) out(" posts/ the posts as Markdown for the blog block, each with its old address");
|
|
24193
|
+
} else if (platform3 === "wordpress") out(" The WordPress API is closed on this site: work from the pages, or ask the owner for an export (Tools > Export).");
|
|
24194
|
+
out();
|
|
24195
|
+
out("Keep every path in inventory.json exactly as it is: same address, same title and description.");
|
|
24196
|
+
return inventory.skipped;
|
|
24197
|
+
}
|
|
24198
|
+
function mediaTarget(dir, url2) {
|
|
24199
|
+
const u = new URL(url2);
|
|
24200
|
+
const clean = posix.normalize(decodeURIComponent(u.pathname)).replace(/^\/+/, "");
|
|
24201
|
+
if (!clean || clean.endsWith("/") || clean.includes("..")) return null;
|
|
24202
|
+
const base = resolve(dir, "media", u.hostname.replace(/^www\./, ""));
|
|
24203
|
+
const target = resolve(base, clean);
|
|
24204
|
+
return target.startsWith(base + sep) ? target : null;
|
|
24205
|
+
}
|
|
24206
|
+
async function migrateMediaCommand(root) {
|
|
24207
|
+
const hosts = scannedHosts(root);
|
|
24208
|
+
if (!hosts.length) throw new CliError("Nothing scanned yet. Run: npx deployai@latest migrate scan <the old site address>", 1, "usage");
|
|
24209
|
+
for (const host of hosts) {
|
|
24210
|
+
const dir = hostDir(root, host);
|
|
24211
|
+
const assets = readJson2(join7(dir, "assets.json")) ?? [];
|
|
24212
|
+
const stateFile = join7(dir, "media-state.json");
|
|
24213
|
+
const state = readJson2(stateFile) ?? { done: [], failed: [], bytes: 0 };
|
|
24214
|
+
const done = new Set(state.done);
|
|
24215
|
+
const todo = assets.filter((a) => !done.has(a));
|
|
24216
|
+
out(`${host}: ${assets.length} files, ${todo.length} left`);
|
|
24217
|
+
for (const [i, url2] of todo.entries()) {
|
|
24218
|
+
if (state.bytes >= MEDIA_TOTAL_CAP) {
|
|
24219
|
+
out(` Stopped at ${formatBytes(state.bytes)}: the cap for one move. Use only the files the new pages need.`);
|
|
24220
|
+
break;
|
|
24221
|
+
}
|
|
24222
|
+
const target = mediaTarget(dir, url2);
|
|
24223
|
+
const res = target ? await get(url2, "*/*") : null;
|
|
24224
|
+
const size = Number(res?.headers.get("content-length") ?? 0);
|
|
24225
|
+
if (!target || !res?.ok || !res.body || size > MEDIA_FILE_CAP) {
|
|
24226
|
+
if (!state.failed.includes(url2)) state.failed.push(url2);
|
|
24227
|
+
done.add(url2);
|
|
24228
|
+
continue;
|
|
24229
|
+
}
|
|
24230
|
+
mkdirSync3(dirname(target), { recursive: true });
|
|
24231
|
+
await pipeline(Readable.fromWeb(res.body), createWriteStream(target));
|
|
24232
|
+
const bytes = statSync(target).size;
|
|
24233
|
+
state.bytes += bytes;
|
|
24234
|
+
done.add(url2);
|
|
24235
|
+
state.done = [...done];
|
|
24236
|
+
if (i % 25 === 0) writeJson(stateFile, state);
|
|
24237
|
+
await sleep2(PAUSE_MS / 3);
|
|
24238
|
+
}
|
|
24239
|
+
state.done = [...done];
|
|
24240
|
+
writeJson(stateFile, state);
|
|
24241
|
+
out(` ${formatBytes(state.bytes)} in ${relative(root, join7(dir, "media")).split(sep).join("/")}${state.failed.length ? `, ${state.failed.length} could not be downloaded (listed in media-state.json)` : ""}`);
|
|
24242
|
+
}
|
|
24243
|
+
out("Copy the files the new pages use into the site's public folder at the same path (for example public/wp-content/uploads/...), so old image addresses keep working.");
|
|
24244
|
+
}
|
|
24245
|
+
function redirectLines(inv, rss = "/rss.xml") {
|
|
24246
|
+
const lines = /* @__PURE__ */ new Set();
|
|
24247
|
+
for (const p of inv.pages) {
|
|
24248
|
+
const path = p.path.split("?")[0];
|
|
24249
|
+
if (/\/feed\/?$/.test(path)) lines.add(`${path} ${rss} 301`);
|
|
24250
|
+
if (/\/attachment\/[^/]+\/?$/.test(path)) lines.add(`${path} ${path.replace(/\/attachment\/[^/]+\/?$/, "/")} 301`);
|
|
24251
|
+
}
|
|
24252
|
+
if (inv.platform === "wordpress") {
|
|
24253
|
+
const folder = new URL(inv.source).pathname.replace(/\/+$/, "");
|
|
24254
|
+
lines.add(`${folder}/feed/ ${rss} 301`);
|
|
24255
|
+
lines.add(`${folder}/comments/feed/ ${rss} 301`);
|
|
24256
|
+
}
|
|
24257
|
+
return [...lines];
|
|
24258
|
+
}
|
|
24259
|
+
function migrateRedirectsCommand(root) {
|
|
24260
|
+
const hosts = scannedHosts(root);
|
|
24261
|
+
if (!hosts.length) throw new CliError("Nothing scanned yet. Run: npx deployai@latest migrate scan <the old site address>", 1, "usage");
|
|
24262
|
+
const lines = /* @__PURE__ */ new Set();
|
|
24263
|
+
for (const host of hosts) {
|
|
24264
|
+
const inv = readJson2(join7(hostDir(root, host), "inventory.json"));
|
|
24265
|
+
if (inv) redirectLines(inv).forEach((l) => lines.add(l));
|
|
24266
|
+
}
|
|
24267
|
+
const publicDir = join7(root, "public");
|
|
24268
|
+
const file2 = join7(existsSync7(publicDir) ? publicDir : root, "_redirects");
|
|
24269
|
+
const before = existsSync7(file2) ? readFileSync6(file2, "utf8").split(/\r?\n/).filter(Boolean) : [];
|
|
24270
|
+
const added = [...lines].filter((l) => !before.some((b) => b.split(/\s+/)[0] === l.split(/\s+/)[0]));
|
|
24271
|
+
writeFileSync5(file2, [...before, ...added].join("\n") + "\n");
|
|
24272
|
+
out(`${relative(root, file2).split(sep).join("/")}: ${added.length} added, ${before.length + added.length} in all (at most 2,000; no query strings).`);
|
|
24273
|
+
out('Add a line "<old path> <new path> 301" only for a page that truly could not keep its address.');
|
|
24274
|
+
}
|
|
24275
|
+
function allowedRedirects(root) {
|
|
24276
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
24277
|
+
for (const file2 of [join7(root, "public", "_redirects"), join7(root, "_redirects")]) {
|
|
24278
|
+
if (!existsSync7(file2)) continue;
|
|
24279
|
+
for (const line of readFileSync6(file2, "utf8").split(/\r?\n/)) {
|
|
24280
|
+
const [from, to] = line.trim().split(/\s+/);
|
|
24281
|
+
if (from && to && !from.startsWith("#")) map2.set(from, to);
|
|
24282
|
+
}
|
|
24283
|
+
}
|
|
24284
|
+
return map2;
|
|
24285
|
+
}
|
|
24286
|
+
function previewUrl(preview, path) {
|
|
24287
|
+
const u = new URL(path, preview.origin);
|
|
24288
|
+
const token = preview.searchParams.get("deployai_preview");
|
|
24289
|
+
if (token) u.searchParams.set("deployai_preview", token);
|
|
24290
|
+
return u.toString();
|
|
24291
|
+
}
|
|
24292
|
+
async function migrateVerifyCommand(root, previewRaw) {
|
|
24293
|
+
let preview;
|
|
24294
|
+
try {
|
|
24295
|
+
preview = new URL(/^https?:\/\//.test(previewRaw) ? previewRaw : `https://${previewRaw}`);
|
|
24296
|
+
} catch {
|
|
24297
|
+
throw new CliError(`Not an address: ${previewRaw}. Use the preview address deploy printed.`, 1, "usage");
|
|
24298
|
+
}
|
|
24299
|
+
const hosts = scannedHosts(root);
|
|
24300
|
+
if (!hosts.length) throw new CliError("Nothing scanned yet. Run: npx deployai@latest migrate scan <the old site address>", 1, "usage");
|
|
24301
|
+
const redirects = allowedRedirects(root);
|
|
24302
|
+
const findings = [];
|
|
24303
|
+
let checked = 0;
|
|
24304
|
+
for (const host of hosts) {
|
|
24305
|
+
const inv = readJson2(join7(hostDir(root, host), "inventory.json"));
|
|
24306
|
+
for (const old of inv?.pages ?? []) {
|
|
24307
|
+
if (old.status >= 300) continue;
|
|
24308
|
+
const res = await get(previewUrl(preview, old.path));
|
|
24309
|
+
checked++;
|
|
24310
|
+
let next = null;
|
|
24311
|
+
if (res) {
|
|
24312
|
+
const u = new URL(res.url);
|
|
24313
|
+
u.searchParams.delete("deployai_preview");
|
|
24314
|
+
const body = res.ok ? await res.text() : "";
|
|
24315
|
+
const seo = body ? readPageSeo(body) : null;
|
|
24316
|
+
next = { status: res.status, finalPath: u.pathname + u.search, title: seo?.title ?? null, description: seo?.description ?? null };
|
|
24317
|
+
}
|
|
24318
|
+
const f = comparePage(old, next, redirects.get(old.path.split("?")[0]));
|
|
24319
|
+
if (f) findings.push(f);
|
|
24320
|
+
await sleep2(PAUSE_MS / 3);
|
|
24321
|
+
}
|
|
24322
|
+
}
|
|
24323
|
+
const words = { missing: "not found on the preview", moved: "moved to", error: "answers", title_lost: "lost its title", description_lost: "lost its description" };
|
|
24324
|
+
const report = join7(root, MIGRATION_DIR, "verify.json");
|
|
24325
|
+
writeJson(report, { checkedAt: (/* @__PURE__ */ new Date()).toISOString(), preview: preview.origin, checked, findings });
|
|
24326
|
+
if (!findings.length) {
|
|
24327
|
+
out(`All ${checked} old addresses open on the preview with their title and description.`);
|
|
24328
|
+
return;
|
|
24329
|
+
}
|
|
24330
|
+
out(`${findings.length} of ${checked} old addresses need a fix (also in ${relative(root, report).split(sep).join("/")}):`);
|
|
24331
|
+
for (const f of findings.slice(0, 60)) out(` ${f.path} ${words[f.problem]}${f.detail ? ` ${f.detail}` : ""}`);
|
|
24332
|
+
if (findings.length > 60) out(` and ${findings.length - 60} more in verify.json`);
|
|
24333
|
+
out("Give each page its old address back (or, only if it truly cannot stay, a line in public/_redirects), deploy again, and run verify again.");
|
|
24334
|
+
process.exitCode = 1;
|
|
24335
|
+
}
|
|
24336
|
+
|
|
24337
|
+
// src/commands/link.ts
|
|
24338
|
+
async function save(root, p, ctx) {
|
|
23552
24339
|
updateProject(root, { projectId: p.id, name: p.name, slug: p.slug });
|
|
23553
24340
|
const t = messages(root);
|
|
23554
24341
|
out(t("linkedTo", { name: p.name, slug: p.slug }));
|
|
23555
24342
|
out(t("savedIn"));
|
|
24343
|
+
await moveOffer(root, p, ctx);
|
|
23556
24344
|
out(t("nextStep"));
|
|
23557
24345
|
out(t("runDeploy"));
|
|
23558
24346
|
}
|
|
24347
|
+
async function moveOffer(root, p, ctx) {
|
|
24348
|
+
const startId = readChoices(root)?.startId;
|
|
24349
|
+
if (!startId) return;
|
|
24350
|
+
const t = messages(root);
|
|
24351
|
+
try {
|
|
24352
|
+
const r = await apiRequest(ctx, "/api/cli/migrations/grant", null, { method: "POST", body: { projectId: p.id, startId } });
|
|
24353
|
+
if (r.granted?.length) out(t("moveOfferGranted", { n: r.granted.length }));
|
|
24354
|
+
else if (r.reason && r.reason !== "start_used") out(t(r.reason === "cap" ? "moveOfferCap" : "moveOfferOver"));
|
|
24355
|
+
} catch {
|
|
24356
|
+
}
|
|
24357
|
+
}
|
|
23559
24358
|
function projectLine(p, i) {
|
|
23560
24359
|
const live = p.liveVersion ? `v${p.liveVersion}` : "-";
|
|
23561
24360
|
return ` ${String(i + 1).padStart(2)}. ${p.slug.padEnd(24)} ${p.status.padEnd(7)} ${live.padEnd(5)} ${p.url ?? ""}`.trimEnd();
|
|
@@ -23568,14 +24367,14 @@ async function linkCommand(root, ctx, target, opts) {
|
|
|
23568
24367
|
const p = await apiRequest(ctx, "/api/cli/projects", Project, { method: "POST", body: { name: opts.create, framework } });
|
|
23569
24368
|
out(t("createdProject", { name: p.name }));
|
|
23570
24369
|
if (p.notice) out(p.notice);
|
|
23571
|
-
save(root, p);
|
|
24370
|
+
await save(root, p, ctx);
|
|
23572
24371
|
return;
|
|
23573
24372
|
}
|
|
23574
24373
|
const { projects } = await apiRequest(ctx, "/api/cli/projects", ProjectsResponse);
|
|
23575
24374
|
if (target) {
|
|
23576
24375
|
const p = projects.find((x) => x.id === target || x.slug === target || x.name === target);
|
|
23577
24376
|
if (!p) throw new CliError(messages(root)("noProjectNamed", { name: target }), 1, "not_found");
|
|
23578
|
-
save(root, p);
|
|
24377
|
+
await save(root, p, ctx);
|
|
23579
24378
|
return;
|
|
23580
24379
|
}
|
|
23581
24380
|
if (!projects.length) {
|
|
@@ -23606,7 +24405,7 @@ async function linkCommand(root, ctx, target, opts) {
|
|
|
23606
24405
|
} finally {
|
|
23607
24406
|
rl.close();
|
|
23608
24407
|
}
|
|
23609
|
-
if (answer === "y" || answer === "yes") return save(root, p);
|
|
24408
|
+
if (answer === "y" || answer === "yes") return save(root, p, ctx);
|
|
23610
24409
|
out(t("linkCancelled"));
|
|
23611
24410
|
return;
|
|
23612
24411
|
}
|
|
@@ -23622,7 +24421,7 @@ async function linkCommand(root, ctx, target, opts) {
|
|
|
23622
24421
|
const answer = (await rl.question("Number to link: ")).trim();
|
|
23623
24422
|
const p = projects[Number(answer) - 1];
|
|
23624
24423
|
if (!p) throw new CliError(messages(root)("noProjectPicked"), 1, "usage");
|
|
23625
|
-
save(root, p);
|
|
24424
|
+
await save(root, p, ctx);
|
|
23626
24425
|
} finally {
|
|
23627
24426
|
rl.close();
|
|
23628
24427
|
}
|
|
@@ -23632,11 +24431,24 @@ async function linkCommand(root, ctx, target, opts) {
|
|
|
23632
24431
|
out(t("runLinkPick"));
|
|
23633
24432
|
}
|
|
23634
24433
|
|
|
23635
|
-
// src/
|
|
24434
|
+
// src/ask.ts
|
|
23636
24435
|
import { createInterface as createInterface2 } from "readline/promises";
|
|
24436
|
+
var isInteractive = () => Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
24437
|
+
async function askLine(question) {
|
|
24438
|
+
const rl = createInterface2({ input: process.stdin, output: process.stdout });
|
|
24439
|
+
try {
|
|
24440
|
+
return (await rl.question(question)).trim();
|
|
24441
|
+
} finally {
|
|
24442
|
+
rl.close();
|
|
24443
|
+
}
|
|
24444
|
+
}
|
|
24445
|
+
async function askYes(question) {
|
|
24446
|
+
const answer = (await askLine(question)).toLowerCase();
|
|
24447
|
+
return answer === "y" || answer === "yes";
|
|
24448
|
+
}
|
|
23637
24449
|
|
|
23638
24450
|
// src/tar.ts
|
|
23639
|
-
import { readFileSync as
|
|
24451
|
+
import { readFileSync as readFileSync7 } from "fs";
|
|
23640
24452
|
import { gzipSync } from "zlib";
|
|
23641
24453
|
var BLOCK = 512;
|
|
23642
24454
|
function writeString(buf, offset, length, value) {
|
|
@@ -23720,7 +24532,7 @@ function packFiles(files) {
|
|
|
23720
24532
|
return createTarGz(
|
|
23721
24533
|
files.map((f) => ({
|
|
23722
24534
|
name: f.rel,
|
|
23723
|
-
data:
|
|
24535
|
+
data: readFileSync7(f.abs),
|
|
23724
24536
|
mtimeMs: f.mtimeMs,
|
|
23725
24537
|
mode: f.mode & 64 ? 493 : 420
|
|
23726
24538
|
}))
|
|
@@ -23756,6 +24568,212 @@ function readTar(tar) {
|
|
|
23756
24568
|
return entries;
|
|
23757
24569
|
}
|
|
23758
24570
|
|
|
24571
|
+
// src/commands/versions.ts
|
|
24572
|
+
function linkedProjectId(root) {
|
|
24573
|
+
const id = readProject(root)?.projectId;
|
|
24574
|
+
if (!id) throw new CliError(messages(root)("notLinked"), 1, "not_linked");
|
|
24575
|
+
return id;
|
|
24576
|
+
}
|
|
24577
|
+
function parseVersion(input2) {
|
|
24578
|
+
const m = /^v?(\d+)$/i.exec(input2.trim());
|
|
24579
|
+
const n2 = m ? Number(m[1]) : NaN;
|
|
24580
|
+
if (!Number.isInteger(n2) || n2 <= 0) throw new CliError(messages()("notVersion", { input: input2 }), 1, "usage");
|
|
24581
|
+
return n2;
|
|
24582
|
+
}
|
|
24583
|
+
function shortDate(iso) {
|
|
24584
|
+
const d = new Date(iso);
|
|
24585
|
+
if (Number.isNaN(d.getTime())) return iso;
|
|
24586
|
+
const p = (x) => String(x).padStart(2, "0");
|
|
24587
|
+
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`;
|
|
24588
|
+
}
|
|
24589
|
+
async function versionsCommand(root, ctx) {
|
|
24590
|
+
requireToken(ctx);
|
|
24591
|
+
const projectId = linkedProjectId(root);
|
|
24592
|
+
const { versions } = await apiRequest(ctx, `/api/cli/versions?projectId=${encodeURIComponent(projectId)}`, VersionsResponse);
|
|
24593
|
+
if (!versions.length) {
|
|
24594
|
+
out('No versions yet. Run: npx deployai@latest deploy -m "<message>"');
|
|
24595
|
+
return;
|
|
24596
|
+
}
|
|
24597
|
+
const sorted = [...versions].sort((a, b) => b.number - a.number);
|
|
24598
|
+
out("Versions");
|
|
24599
|
+
for (const v of sorted) {
|
|
24600
|
+
const status = v.status === "replaced" ? stateName("replaced", root) : v.status;
|
|
24601
|
+
const cols = [
|
|
24602
|
+
`v${v.number}`.padEnd(6),
|
|
24603
|
+
(v.isLive ? "live" : "").padEnd(6),
|
|
24604
|
+
status.padEnd(10),
|
|
24605
|
+
shortDate(v.createdAt).padEnd(18),
|
|
24606
|
+
formatBytes(v.sizeBytes).padEnd(10),
|
|
24607
|
+
v.message
|
|
24608
|
+
];
|
|
24609
|
+
out(` ${cols.join("")}`);
|
|
24610
|
+
if (v.error) out(` ${v.error}`);
|
|
24611
|
+
if (v.migrationStatus === "waiting") out(` ${messages(root)("sqlWaitingLine", { n: v.number })}`);
|
|
24612
|
+
}
|
|
24613
|
+
}
|
|
24614
|
+
async function changeLiveCommand(root, ctx, version2, kind, opts = {}) {
|
|
24615
|
+
requireToken(ctx);
|
|
24616
|
+
const projectId = linkedProjectId(root);
|
|
24617
|
+
const number4 = parseVersion(version2);
|
|
24618
|
+
const t = messages(root);
|
|
24619
|
+
const approval = await promoteWithSql(root, ctx, projectId, number4, kind, opts.approveSql);
|
|
24620
|
+
if (approval === null) return;
|
|
24621
|
+
out(t(kind === "rollback" ? "rollbackQueued" : "promoteQueued", { n: number4 }));
|
|
24622
|
+
if (approval) out(t("sqlFirst", { n: number4 }));
|
|
24623
|
+
out(t("nextStep"));
|
|
24624
|
+
out(t("runStatus"));
|
|
24625
|
+
}
|
|
24626
|
+
async function promoteWithSql(root, ctx, projectId, number4, kind, approve) {
|
|
24627
|
+
try {
|
|
24628
|
+
await apiRequest(ctx, `/api/cli/${kind}`, null, { method: "POST", body: { projectId, number: number4 } });
|
|
24629
|
+
return false;
|
|
24630
|
+
} catch (e2) {
|
|
24631
|
+
if (kind !== "promote" || !(e2 instanceof CliError) || e2.category !== "sql_waiting") throw e2;
|
|
24632
|
+
}
|
|
24633
|
+
const approval = await approveSqlStep(root, ctx, projectId, number4, approve);
|
|
24634
|
+
if (!approval) return null;
|
|
24635
|
+
await apiRequest(ctx, "/api/cli/promote", null, { method: "POST", body: { projectId, number: number4, ...approval } });
|
|
24636
|
+
return approval;
|
|
24637
|
+
}
|
|
24638
|
+
function fetchStatus(ctx, projectId) {
|
|
24639
|
+
return apiRequest(ctx, `/api/cli/status?projectId=${encodeURIComponent(projectId)}`, StatusResponse);
|
|
24640
|
+
}
|
|
24641
|
+
async function statusCommand(root, ctx) {
|
|
24642
|
+
requireToken(ctx);
|
|
24643
|
+
const projectId = linkedProjectId(root);
|
|
24644
|
+
printStatus(root, ctx, projectId, await fetchStatus(ctx, projectId));
|
|
24645
|
+
}
|
|
24646
|
+
function printStatus(root, ctx, projectId, s) {
|
|
24647
|
+
const p = s.project;
|
|
24648
|
+
const t = messages(root);
|
|
24649
|
+
const newer = s.latest && s.latest.number !== p.liveVersion ? s.latest : null;
|
|
24650
|
+
out(t("statusTitle"));
|
|
24651
|
+
out();
|
|
24652
|
+
out(
|
|
24653
|
+
rows([
|
|
24654
|
+
[t("project"), `${p.name} (${p.slug})`],
|
|
24655
|
+
[t("state"), stateName(p.status, root)],
|
|
24656
|
+
[t("address"), p.url ?? t("notPublished")],
|
|
24657
|
+
[t("liveVersion"), p.liveVersion ? `v${p.liveVersion}` : t("none")],
|
|
24658
|
+
// A newer upload than the live one: its state, so "follow the build" after deploy has something to follow.
|
|
24659
|
+
...newer ? [[t("newestVersion"), `v${newer.number} ${stateName(newer.status, root)}`]] : [],
|
|
24660
|
+
[t("queue"), s.queue.running ? t("buildingNow") : s.queue.position > 0 ? queueText(s.queue.position, root) : t("idle")]
|
|
24661
|
+
])
|
|
24662
|
+
);
|
|
24663
|
+
if (s.latest?.goingLive) {
|
|
24664
|
+
out();
|
|
24665
|
+
out(t("goingLive", { n: s.latest.number }));
|
|
24666
|
+
return;
|
|
24667
|
+
}
|
|
24668
|
+
if (s.latest?.wentBack) {
|
|
24669
|
+
out();
|
|
24670
|
+
out(t("wentBack", { n: s.latest.number, prev: s.latest.wentBack.previous, reason: s.latest.wentBack.reason }));
|
|
24671
|
+
return;
|
|
24672
|
+
}
|
|
24673
|
+
if (newer?.status === "ready" && s.latest?.migrationStatus !== "failed") {
|
|
24674
|
+
out();
|
|
24675
|
+
out(t("nextStep"));
|
|
24676
|
+
out(t("askOwner", { n: newer.number }));
|
|
24677
|
+
if (s.latest?.preview) out(t("showPreview", { url: s.latest.preview }));
|
|
24678
|
+
out(t("promoteReady", { n: newer.number }));
|
|
24679
|
+
}
|
|
24680
|
+
if (s.latest?.migrationStatus === "waiting") {
|
|
24681
|
+
out();
|
|
24682
|
+
out(t("sqlWaitingLine", { n: s.latest.number }));
|
|
24683
|
+
}
|
|
24684
|
+
if (s.latest?.migrationStatus === "failed") {
|
|
24685
|
+
out();
|
|
24686
|
+
out(t("sqlFailed", { n: s.latest.number }));
|
|
24687
|
+
if (s.latest.migrationError) out(` ${s.latest.migrationError}`);
|
|
24688
|
+
out(t("sqlRetry", { n: s.latest.number }));
|
|
24689
|
+
}
|
|
24690
|
+
if (s.latest?.status !== "failed") return;
|
|
24691
|
+
out();
|
|
24692
|
+
out(t("buildFailed", { n: s.latest.number }));
|
|
24693
|
+
if (s.latest.error) out(` ${s.latest.error}`);
|
|
24694
|
+
if (s.latest.logTail) {
|
|
24695
|
+
out();
|
|
24696
|
+
out(t("buildLogTail"));
|
|
24697
|
+
for (const line of s.latest.logTail.split("\n")) out(` ${line}`);
|
|
24698
|
+
}
|
|
24699
|
+
out();
|
|
24700
|
+
out(t(telemetryEnabled(ctx.config) ? "buildFixHint" : "buildFixHintNoNote"));
|
|
24701
|
+
}
|
|
24702
|
+
|
|
24703
|
+
// src/commands/sql.ts
|
|
24704
|
+
function fetchSqlPlan(ctx, projectId, n2) {
|
|
24705
|
+
return apiRequest(ctx, `/api/cli/sql?projectId=${encodeURIComponent(projectId)}&number=${n2}`, SqlPlanResponse);
|
|
24706
|
+
}
|
|
24707
|
+
var SQL_FILE = /(^|\/)(migrations\/[^/]+|schema|seed)\.sql$/;
|
|
24708
|
+
function printSqlPlan(root, plan) {
|
|
24709
|
+
const t = messages(root);
|
|
24710
|
+
out(t("sqlTitle", { n: plan.number, db: plan.database ?? "-" }));
|
|
24711
|
+
if (plan.isNew) out(t("sqlNewDatabase"));
|
|
24712
|
+
for (const f of plan.files) out(` ${f.file} ${f.skip ? t("sqlSkipped") : t("sqlStatements", { n: f.statements })}`);
|
|
24713
|
+
if (plan.destructive.length) {
|
|
24714
|
+
out();
|
|
24715
|
+
out(t("sqlDestructive"));
|
|
24716
|
+
for (const d of plan.destructive) out(` ${d.file}: ${d.statement}`);
|
|
24717
|
+
}
|
|
24718
|
+
}
|
|
24719
|
+
async function approveSqlStep(root, ctx, projectId, n2, approve) {
|
|
24720
|
+
const t = messages(root);
|
|
24721
|
+
const plan = await fetchSqlPlan(ctx, projectId, n2);
|
|
24722
|
+
if (plan.migrationStatus === "queued" || plan.migrationStatus === "running") {
|
|
24723
|
+
out(t("sqlRunningNow", { n: n2 }));
|
|
24724
|
+
return null;
|
|
24725
|
+
}
|
|
24726
|
+
printSqlPlan(root, plan);
|
|
24727
|
+
out();
|
|
24728
|
+
if (!plan.canApprove) throw new CliError(t("sqlOwnerOnly", { url: plan.url }), 1, "sql_owner_only");
|
|
24729
|
+
if (!plan.database || plan.stuck.length) throw new CliError(t("sqlDashboard", { url: plan.url }), 1, "sql_dashboard");
|
|
24730
|
+
if (isInteractive()) {
|
|
24731
|
+
if (plan.destructive.length) {
|
|
24732
|
+
const typed = await askLine(t("sqlTypeDatabase", { db: plan.database, n: n2 }));
|
|
24733
|
+
if (typed !== plan.database) {
|
|
24734
|
+
out(t("sqlNotRun"));
|
|
24735
|
+
return null;
|
|
24736
|
+
}
|
|
24737
|
+
return { approveSql: plan.hash, confirmDatabase: plan.database };
|
|
24738
|
+
}
|
|
24739
|
+
if (!await askYes(t("sqlAskRun", { db: plan.database, n: n2 }))) {
|
|
24740
|
+
out(t("sqlNotRun"));
|
|
24741
|
+
return null;
|
|
24742
|
+
}
|
|
24743
|
+
return { approveSql: plan.hash };
|
|
24744
|
+
}
|
|
24745
|
+
if (plan.destructive.length) {
|
|
24746
|
+
out(t("sqlAgentDestructive", { n: n2, url: plan.url }));
|
|
24747
|
+
return null;
|
|
24748
|
+
}
|
|
24749
|
+
if (approve) {
|
|
24750
|
+
if (approve !== plan.hash) throw new CliError(t("sqlChanged", { n: n2 }), 1, "sql_changed");
|
|
24751
|
+
return { approveSql: plan.hash };
|
|
24752
|
+
}
|
|
24753
|
+
out(t("nextStep"));
|
|
24754
|
+
out(t("sqlAgentAsk", { n: n2, db: plan.database }));
|
|
24755
|
+
out(t("sqlAgentThen", { n: n2, hash: plan.hash }));
|
|
24756
|
+
return null;
|
|
24757
|
+
}
|
|
24758
|
+
async function sqlCommand(root, ctx, version2) {
|
|
24759
|
+
requireToken(ctx);
|
|
24760
|
+
const projectId = linkedProjectId(root);
|
|
24761
|
+
const n2 = parseVersion(version2);
|
|
24762
|
+
const plan = await fetchSqlPlan(ctx, projectId, n2);
|
|
24763
|
+
if (!plan.files.length) {
|
|
24764
|
+
out(messages(root)("sqlNone", { n: n2 }));
|
|
24765
|
+
return;
|
|
24766
|
+
}
|
|
24767
|
+
printSqlPlan(root, plan);
|
|
24768
|
+
const t = messages(root);
|
|
24769
|
+
if (plan.migrationStatus !== "waiting" && plan.migrationStatus !== "failed") return;
|
|
24770
|
+
out();
|
|
24771
|
+
out(t("nextStep"));
|
|
24772
|
+
if (!plan.canApprove) out(t("sqlOwnerOnly", { url: plan.url }));
|
|
24773
|
+
else if (plan.destructive.length) out(t("sqlAgentDestructive", { n: n2, url: plan.url }));
|
|
24774
|
+
else out(t("sqlAgentThen", { n: n2, hash: plan.hash }));
|
|
24775
|
+
}
|
|
24776
|
+
|
|
23759
24777
|
// src/commands/deploy.ts
|
|
23760
24778
|
function queueText(position, root) {
|
|
23761
24779
|
const t = messages(root);
|
|
@@ -23776,23 +24794,15 @@ function expiryDate(iso) {
|
|
|
23776
24794
|
const d = new Date(iso);
|
|
23777
24795
|
return Number.isNaN(d.getTime()) ? iso : d.toISOString().slice(0, 10);
|
|
23778
24796
|
}
|
|
23779
|
-
|
|
23780
|
-
|
|
23781
|
-
try {
|
|
23782
|
-
const answer = (await rl.question(messages(root)("askGuest"))).trim().toLowerCase();
|
|
23783
|
-
return answer === "y" || answer === "yes";
|
|
23784
|
-
} finally {
|
|
23785
|
-
rl.close();
|
|
23786
|
-
}
|
|
23787
|
-
}
|
|
24797
|
+
var BUILD_WAIT_MS = 15 * 6e4;
|
|
24798
|
+
var LIVE_WAIT_MS = 3 * 6e4;
|
|
23788
24799
|
async function deployCommand(root, ctx, opts) {
|
|
23789
24800
|
const project = readProject(root);
|
|
23790
24801
|
if (!ctx.config.token) {
|
|
23791
24802
|
const guestToken = project?.projectId ? ctx.config.guestTokens?.[project.projectId] : void 0;
|
|
23792
24803
|
if (guestToken) return deployVersion(root, { ...ctx, config: { ...ctx.config, token: guestToken } }, opts, true);
|
|
23793
24804
|
if (project?.projectId) throw new CliError(messages(root)("guestAccountSite"), 1, "auth");
|
|
23794
|
-
|
|
23795
|
-
if (!opts.guest && !(interactive && await askGuest(root))) {
|
|
24805
|
+
if (!opts.guest && !(isInteractive() && await askYes(messages(root)("askGuest")))) {
|
|
23796
24806
|
throw new CliError(messages(root)("deployNotLoggedIn"), 1, "auth");
|
|
23797
24807
|
}
|
|
23798
24808
|
return deployGuest(root, ctx, opts);
|
|
@@ -23826,15 +24836,19 @@ async function prepare(root, ctx, maxBytes) {
|
|
|
23826
24836
|
const names = plan.skippedLarge.slice(0, 3).map((f) => f.rel).join(", ");
|
|
23827
24837
|
info.push([t("skipped"), t("skippedLarge", { n: plan.skippedLarge.length, max: formatBytes(MAX_FILE_BYTES), names })]);
|
|
23828
24838
|
}
|
|
23829
|
-
return { archive, info };
|
|
24839
|
+
return { archive, info, hasSql: plan.files.some((f) => SQL_FILE.test(f.rel) && !f.rel.includes("node_modules/")) };
|
|
23830
24840
|
}
|
|
23831
24841
|
async function deployVersion(root, ctx, opts, guest) {
|
|
23832
24842
|
requireToken(ctx);
|
|
23833
24843
|
const project = readProject(root);
|
|
23834
24844
|
if (!project?.projectId) throw new CliError(messages(root)("notLinked"), 1, "not_linked");
|
|
23835
24845
|
const message = (opts.message ?? "").trim() || "update";
|
|
23836
|
-
const { archive, info } = await prepare(root, ctx, guest ? GUEST_MAX_BYTES : Number.POSITIVE_INFINITY);
|
|
24846
|
+
const { archive, info, hasSql } = await prepare(root, ctx, guest ? GUEST_MAX_BYTES : Number.POSITIVE_INFINITY);
|
|
23837
24847
|
const t = messages(root);
|
|
24848
|
+
const wait = opts.live || opts.wait !== false;
|
|
24849
|
+
let live = Boolean(opts.live);
|
|
24850
|
+
if (!guest && hasSql) out(t("sqlBeforeUpload"));
|
|
24851
|
+
if (!guest && wait && !live && isInteractive()) live = await askYes(t("askLiveFirst"));
|
|
23838
24852
|
out(t("deployTitle"));
|
|
23839
24853
|
out();
|
|
23840
24854
|
out(rows([[t("project"), project.name ?? project.projectId], [t("message"), message], ...info]));
|
|
@@ -23861,11 +24875,83 @@ async function deployVersion(root, ctx, opts, guest) {
|
|
|
23861
24875
|
[t("preview"), res.previewUrl]
|
|
23862
24876
|
])
|
|
23863
24877
|
);
|
|
23864
|
-
out();
|
|
23865
|
-
out(t("nextStep"));
|
|
23866
|
-
out(t("followBuild"));
|
|
23867
|
-
out(t("thenPromote", { n: res.number }));
|
|
23868
24878
|
pageHint(res, root);
|
|
24879
|
+
out();
|
|
24880
|
+
if (!wait) {
|
|
24881
|
+
out(t("nextStep"));
|
|
24882
|
+
out(t("followBuild"));
|
|
24883
|
+
out(t("thenPromote", { n: res.number }));
|
|
24884
|
+
return;
|
|
24885
|
+
}
|
|
24886
|
+
await afterBuild(root, ctx, project.projectId, res.number, { live, pollMs: opts.pollMs ?? 3e3 });
|
|
24887
|
+
}
|
|
24888
|
+
var sleep3 = (ms2) => new Promise((r) => setTimeout(r, ms2));
|
|
24889
|
+
async function poll(root, ctx, projectId, n2, pollMs, maxMs, done) {
|
|
24890
|
+
const end = Date.now() + maxMs;
|
|
24891
|
+
let last = "";
|
|
24892
|
+
for (; ; ) {
|
|
24893
|
+
const s = await fetchStatus(ctx, projectId);
|
|
24894
|
+
if (done(s)) return s;
|
|
24895
|
+
const sqlRuns = s.latest?.migrationStatus === "queued" || s.latest?.migrationStatus === "running";
|
|
24896
|
+
const state = sqlRuns ? messages(root)("sqlRunningState") : s.latest?.status === "queued" && s.queue.position > 0 ? queueText(s.queue.position, root) : stateName(s.latest?.status ?? "queued", root);
|
|
24897
|
+
if (state !== last) out(messages(root)("waitState", { n: n2, s: state }));
|
|
24898
|
+
last = state;
|
|
24899
|
+
if (Date.now() >= end) return null;
|
|
24900
|
+
await sleep3(pollMs);
|
|
24901
|
+
}
|
|
24902
|
+
}
|
|
24903
|
+
async function afterBuild(root, ctx, projectId, n2, o) {
|
|
24904
|
+
const t = messages(root);
|
|
24905
|
+
out(t("waitBuild", { n: n2 }));
|
|
24906
|
+
const built = await poll(root, ctx, projectId, n2, o.pollMs, BUILD_WAIT_MS, (s) => !s.latest || s.latest.number !== n2 || !["queued", "building"].includes(s.latest.status));
|
|
24907
|
+
out();
|
|
24908
|
+
if (!built) {
|
|
24909
|
+
out(t("buildSlow", { n: n2 }));
|
|
24910
|
+
out(t("followBuild"));
|
|
24911
|
+
out(t("thenPromote", { n: n2 }));
|
|
24912
|
+
return;
|
|
24913
|
+
}
|
|
24914
|
+
const ready = built.latest?.number === n2 && built.latest.status === "ready" && built.project.liveVersion !== n2;
|
|
24915
|
+
const sqlWaits = ready && built.latest?.migrationStatus === "waiting";
|
|
24916
|
+
let approval = null;
|
|
24917
|
+
let live = o.live;
|
|
24918
|
+
if (sqlWaits) {
|
|
24919
|
+
if (built.latest?.preview) out(t("showPreview", { url: built.latest.preview }));
|
|
24920
|
+
approval = await approveSqlStep(root, ctx, projectId, n2);
|
|
24921
|
+
if (!approval) {
|
|
24922
|
+
if (isInteractive()) out(t("promoteLater", { n: n2 }));
|
|
24923
|
+
return;
|
|
24924
|
+
}
|
|
24925
|
+
live = true;
|
|
24926
|
+
}
|
|
24927
|
+
if (ready && !live && isInteractive()) {
|
|
24928
|
+
if (built.latest?.preview) out(t("showPreview", { url: built.latest.preview }));
|
|
24929
|
+
live = await askYes(t("askLiveNow", { n: n2 }));
|
|
24930
|
+
}
|
|
24931
|
+
if (!ready || !live) {
|
|
24932
|
+
if (ready && !live && isInteractive()) {
|
|
24933
|
+
out(t("promoteLater", { n: n2 }));
|
|
24934
|
+
return;
|
|
24935
|
+
}
|
|
24936
|
+
printStatus(root, ctx, projectId, built);
|
|
24937
|
+
if (built.latest?.number === n2 && built.latest.status === "failed") process.exitCode = 1;
|
|
24938
|
+
return;
|
|
24939
|
+
}
|
|
24940
|
+
await apiRequest(ctx, "/api/cli/promote", null, { method: "POST", body: { projectId, number: n2, ...approval } });
|
|
24941
|
+
out(t("promoteQueued", { n: n2 }));
|
|
24942
|
+
if (approval) out(t("sqlFirst", { n: n2 }));
|
|
24943
|
+
const after = await poll(root, ctx, projectId, n2, o.pollMs, LIVE_WAIT_MS, (s) => s.latest?.migrationStatus === "failed" || !s.latest?.goingLive && (s.project.liveVersion === n2 || Boolean(s.latest?.wentBack)));
|
|
24944
|
+
out();
|
|
24945
|
+
if (after?.project.liveVersion === n2 && !after.latest?.wentBack) {
|
|
24946
|
+
out(t("liveNow", { n: n2, url: after.project.url ?? "" }));
|
|
24947
|
+
return;
|
|
24948
|
+
}
|
|
24949
|
+
if (!after) {
|
|
24950
|
+
out(t("goingLive", { n: n2 }));
|
|
24951
|
+
return;
|
|
24952
|
+
}
|
|
24953
|
+
printStatus(root, ctx, projectId, after);
|
|
24954
|
+
process.exitCode = 1;
|
|
23869
24955
|
}
|
|
23870
24956
|
function pageHint(res, root) {
|
|
23871
24957
|
if (!res.page) return;
|
|
@@ -23923,10 +25009,15 @@ async function claimCommand(root, ctx, opts) {
|
|
|
23923
25009
|
out(t("claimLink", { url: url2 }));
|
|
23924
25010
|
}
|
|
23925
25011
|
|
|
25012
|
+
// src/commands/pull.ts
|
|
25013
|
+
import { spawnSync as spawnSync2 } from "child_process";
|
|
25014
|
+
import { existsSync as existsSync9, readdirSync as readdirSync5, rmSync } from "fs";
|
|
25015
|
+
import { join as join9 } from "path";
|
|
25016
|
+
|
|
23926
25017
|
// src/commands/samples.ts
|
|
23927
25018
|
import { createInterface as createInterface3 } from "readline/promises";
|
|
23928
|
-
import { existsSync as
|
|
23929
|
-
import { dirname, join as
|
|
25019
|
+
import { existsSync as existsSync8, mkdirSync as mkdirSync4, readdirSync as readdirSync4, writeFileSync as writeFileSync6 } from "fs";
|
|
25020
|
+
import { dirname as dirname2, join as join8, relative as relative2, resolve as resolve2, sep as sep2 } from "path";
|
|
23930
25021
|
import { gunzipSync } from "zlib";
|
|
23931
25022
|
var SAMPLES = [
|
|
23932
25023
|
{ key: "landing", title: "Landing page: a full one-page site with WhatsApp sign-up", stack: "static HTML and CSS" },
|
|
@@ -23947,11 +25038,11 @@ function listSamples(apiUrl) {
|
|
|
23947
25038
|
out(`See them live: ${apiUrl}/samples`);
|
|
23948
25039
|
}
|
|
23949
25040
|
function filesIn(dir) {
|
|
23950
|
-
return
|
|
25041
|
+
return existsSync8(dir) ? readdirSync4(dir).filter((f) => !IGNORED.has(f)) : [];
|
|
23951
25042
|
}
|
|
23952
25043
|
function freeFolder(cwd, key) {
|
|
23953
25044
|
for (let n2 = 1; ; n2++) {
|
|
23954
|
-
const dir =
|
|
25045
|
+
const dir = resolve2(cwd, n2 === 1 ? key : `${key}-${n2}`);
|
|
23955
25046
|
if (!filesIn(dir).length) return dir;
|
|
23956
25047
|
}
|
|
23957
25048
|
}
|
|
@@ -23960,15 +25051,15 @@ async function askWhere(cwd, key, count) {
|
|
|
23960
25051
|
const rl = createInterface3({ input: process.stdin, output: process.stdout });
|
|
23961
25052
|
try {
|
|
23962
25053
|
out(`This folder already has ${count} ${count === 1 ? "file" : "files"}. Where should the ${key} sample go?`);
|
|
23963
|
-
out(` 1) A new folder: ${
|
|
25054
|
+
out(` 1) A new folder: ${relative2(cwd, fresh)}`);
|
|
23964
25055
|
out(" 2) This folder (files with the same name are replaced)");
|
|
23965
25056
|
out(" 3) Cancel");
|
|
23966
25057
|
const choice = (await rl.question("Choose 1, 2 or 3 [1]: ")).trim() || "1";
|
|
23967
25058
|
if (choice === "2") return cwd;
|
|
23968
25059
|
if (choice !== "1") return null;
|
|
23969
|
-
const name = (await rl.question(`Folder name [${
|
|
25060
|
+
const name = (await rl.question(`Folder name [${relative2(cwd, fresh)}]: `)).trim();
|
|
23970
25061
|
if (!name) return fresh;
|
|
23971
|
-
const dir =
|
|
25062
|
+
const dir = resolve2(cwd, name);
|
|
23972
25063
|
if (filesIn(dir).length) throw new CliError(`The folder ${name} is not empty. Run it again and pick another name.`, 1, "not_empty");
|
|
23973
25064
|
return dir;
|
|
23974
25065
|
} finally {
|
|
@@ -23976,7 +25067,7 @@ async function askWhere(cwd, key, count) {
|
|
|
23976
25067
|
}
|
|
23977
25068
|
}
|
|
23978
25069
|
async function downloadSample(ctx, key, root) {
|
|
23979
|
-
|
|
25070
|
+
mkdirSync4(root, { recursive: true });
|
|
23980
25071
|
let res;
|
|
23981
25072
|
try {
|
|
23982
25073
|
res = await fetch(`${ctx.apiUrl}/samples-src/${key}.tar.gz`, {
|
|
@@ -23998,15 +25089,16 @@ function extractInto(gz, root, damaged) {
|
|
|
23998
25089
|
} catch {
|
|
23999
25090
|
throw new CliError(damaged, 1, "api");
|
|
24000
25091
|
}
|
|
24001
|
-
|
|
24002
|
-
const base =
|
|
25092
|
+
mkdirSync4(root, { recursive: true });
|
|
25093
|
+
const base = resolve2(root);
|
|
24003
25094
|
let written = 0;
|
|
24004
25095
|
for (const e2 of entries) {
|
|
24005
25096
|
if (e2.type !== "0" && e2.type !== "\0") continue;
|
|
24006
|
-
|
|
24007
|
-
|
|
24008
|
-
|
|
24009
|
-
|
|
25097
|
+
if (privateProjectFile(e2.name.replace(/\\/g, "/"))) continue;
|
|
25098
|
+
const target = resolve2(base, e2.name);
|
|
25099
|
+
if (target !== base && !target.startsWith(base + sep2)) continue;
|
|
25100
|
+
mkdirSync4(dirname2(target), { recursive: true });
|
|
25101
|
+
writeFileSync6(target, e2.data);
|
|
24010
25102
|
written++;
|
|
24011
25103
|
}
|
|
24012
25104
|
return written;
|
|
@@ -24017,7 +25109,7 @@ async function samplesCommand(cwd, ctx, key, opts = {}) {
|
|
|
24017
25109
|
if (!sample) throw new CliError(messages()("noSampleNamed", { key }), 1, "not_found");
|
|
24018
25110
|
let root;
|
|
24019
25111
|
if (opts.folder) {
|
|
24020
|
-
root =
|
|
25112
|
+
root = resolve2(cwd, opts.folder);
|
|
24021
25113
|
if (filesIn(root).length && !opts.force) throw new CliError(`The folder ${opts.folder} is not empty. Run: npx deployai@latest samples ${sample.key}, and it picks a free folder`, 1, "not_empty");
|
|
24022
25114
|
} else {
|
|
24023
25115
|
const here = filesIn(cwd);
|
|
@@ -24029,13 +25121,13 @@ async function samplesCommand(cwd, ctx, key, opts = {}) {
|
|
|
24029
25121
|
} else root = freeFolder(cwd, sample.key);
|
|
24030
25122
|
}
|
|
24031
25123
|
const written = await downloadSample(ctx, sample.key, root);
|
|
24032
|
-
const base =
|
|
24033
|
-
const hasPackage =
|
|
24034
|
-
out(base ===
|
|
25124
|
+
const base = resolve2(root);
|
|
25125
|
+
const hasPackage = existsSync8(join8(base, "package.json"));
|
|
25126
|
+
out(base === resolve2(cwd) ? `Downloaded the ${sample.key} sample: ${written} files.` : `Downloaded the ${sample.key} sample into the new folder ${relative2(cwd, base)}: ${written} files. Work in that folder from now on.`);
|
|
24035
25127
|
out("");
|
|
24036
25128
|
const t = messages(base);
|
|
24037
25129
|
out(t("nextSteps"));
|
|
24038
|
-
if (base !==
|
|
25130
|
+
if (base !== resolve2(cwd)) out(` cd ${JSON.stringify(relative2(cwd, base))}`);
|
|
24039
25131
|
if (hasPackage) out(" npm install");
|
|
24040
25132
|
out(" npx deployai@latest check");
|
|
24041
25133
|
if (ctx.config.token) {
|
|
@@ -24048,15 +25140,23 @@ async function samplesCommand(cwd, ctx, key, opts = {}) {
|
|
|
24048
25140
|
|
|
24049
25141
|
// src/commands/pull.ts
|
|
24050
25142
|
var MAX_BYTES2 = 50 * 1024 * 1024;
|
|
24051
|
-
async function pullCommand(root, ctx) {
|
|
25143
|
+
async function pullCommand(root, ctx, opts = {}) {
|
|
24052
25144
|
const t = messages(root);
|
|
24053
25145
|
const projectId = readProject(root)?.projectId;
|
|
24054
25146
|
if (!projectId) throw new CliError(t("pullNotLinked"), 1, "not_linked");
|
|
24055
25147
|
if (filesIn(root).length) throw new CliError(t("pullNotEmpty"), 1, "not_empty");
|
|
25148
|
+
requireToken(ctx);
|
|
25149
|
+
if (opts.history) return pullHistory(root, ctx, projectId);
|
|
25150
|
+
const n2 = extractInto(await fetchSource(root, ctx, projectId), root, t("pullDamaged"));
|
|
25151
|
+
out(t("pulled", { n: n2, v: lastVersion ?? "?" }));
|
|
25152
|
+
}
|
|
25153
|
+
var lastVersion = null;
|
|
25154
|
+
async function fetchSource(root, ctx, projectId, version2) {
|
|
25155
|
+
const t = messages(root);
|
|
24056
25156
|
const token = requireToken(ctx);
|
|
24057
25157
|
let res;
|
|
24058
25158
|
try {
|
|
24059
|
-
res = await fetch(`${ctx.apiUrl}/api/cli/source?projectId=${encodeURIComponent(projectId)}`, { headers: { "User-Agent": userAgent(ctx.config), Authorization: `Bearer ${token}` }, signal: AbortSignal.timeout(12e4) });
|
|
25159
|
+
res = await fetch(`${ctx.apiUrl}/api/cli/source?projectId=${encodeURIComponent(projectId)}${version2 ? `&version=${version2}` : ""}`, { headers: { "User-Agent": userAgent(ctx.config), Authorization: `Bearer ${token}` }, signal: AbortSignal.timeout(12e4) });
|
|
24060
25160
|
} catch {
|
|
24061
25161
|
throw new CliError(messages()("unreachable", { url: ctx.apiUrl }), 1, "network");
|
|
24062
25162
|
}
|
|
@@ -24069,128 +25169,46 @@ async function pullCommand(root, ctx) {
|
|
|
24069
25169
|
if (!res.ok) throw new CliError(t("apiError", { code: `HTTP ${res.status}` }), 1, "api");
|
|
24070
25170
|
const gz = Buffer.from(await res.arrayBuffer());
|
|
24071
25171
|
if (gz.length > MAX_BYTES2) throw new CliError(t("pullTooLarge"), 1, "too_large");
|
|
24072
|
-
|
|
24073
|
-
|
|
25172
|
+
lastVersion = res.headers.get("X-DeployAI-Version");
|
|
25173
|
+
return gz;
|
|
24074
25174
|
}
|
|
24075
|
-
|
|
24076
|
-
|
|
24077
|
-
|
|
24078
|
-
|
|
24079
|
-
|
|
24080
|
-
return id;
|
|
24081
|
-
}
|
|
24082
|
-
function parseVersion(input2) {
|
|
24083
|
-
const m = /^v?(\d+)$/i.exec(input2.trim());
|
|
24084
|
-
const n2 = m ? Number(m[1]) : NaN;
|
|
24085
|
-
if (!Number.isInteger(n2) || n2 <= 0) throw new CliError(messages()("notVersion", { input: input2 }), 1, "usage");
|
|
24086
|
-
return n2;
|
|
24087
|
-
}
|
|
24088
|
-
function shortDate(iso) {
|
|
24089
|
-
const d = new Date(iso);
|
|
24090
|
-
if (Number.isNaN(d.getTime())) return iso;
|
|
24091
|
-
const p = (x) => String(x).padStart(2, "0");
|
|
24092
|
-
return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}`;
|
|
24093
|
-
}
|
|
24094
|
-
async function versionsCommand(root, ctx) {
|
|
24095
|
-
requireToken(ctx);
|
|
24096
|
-
const projectId = linkedProjectId(root);
|
|
24097
|
-
const { versions } = await apiRequest(ctx, `/api/cli/versions?projectId=${encodeURIComponent(projectId)}`, VersionsResponse);
|
|
24098
|
-
if (!versions.length) {
|
|
24099
|
-
out('No versions yet. Run: npx deployai@latest deploy -m "<message>"');
|
|
24100
|
-
return;
|
|
24101
|
-
}
|
|
24102
|
-
const sorted = [...versions].sort((a, b) => b.number - a.number);
|
|
24103
|
-
out("Versions");
|
|
24104
|
-
for (const v of sorted) {
|
|
24105
|
-
const status = v.status === "replaced" ? stateName("replaced", root) : v.status;
|
|
24106
|
-
const cols = [
|
|
24107
|
-
`v${v.number}`.padEnd(6),
|
|
24108
|
-
(v.isLive ? "live" : "").padEnd(6),
|
|
24109
|
-
status.padEnd(10),
|
|
24110
|
-
shortDate(v.createdAt).padEnd(18),
|
|
24111
|
-
formatBytes(v.sizeBytes).padEnd(10),
|
|
24112
|
-
v.message
|
|
24113
|
-
];
|
|
24114
|
-
out(` ${cols.join("")}`);
|
|
24115
|
-
if (v.error) out(` ${v.error}`);
|
|
24116
|
-
if (v.migrationStatus === "waiting") out(` ${messages(root)("sqlWaitingLine", { url: versionsPage(ctx, projectId) })}`);
|
|
25175
|
+
var git = (root, args, env = {}) => spawnSync2("git", args, { cwd: root, encoding: "utf8", env: { ...process.env, ...env } });
|
|
25176
|
+
function clearTree(root) {
|
|
25177
|
+
for (const name of readdirSync5(root)) {
|
|
25178
|
+
if (name === ".git" || name === ".deployai") continue;
|
|
25179
|
+
rmSync(join9(root, name), { recursive: true, force: true });
|
|
24117
25180
|
}
|
|
24118
25181
|
}
|
|
24119
|
-
function
|
|
24120
|
-
return `${ctx.apiUrl}/project/${encodeURIComponent(projectId)}/versions`;
|
|
24121
|
-
}
|
|
24122
|
-
async function changeLiveCommand(root, ctx, version2, kind) {
|
|
24123
|
-
requireToken(ctx);
|
|
24124
|
-
const projectId = linkedProjectId(root);
|
|
24125
|
-
const number4 = parseVersion(version2);
|
|
24126
|
-
await apiRequest(ctx, `/api/cli/${kind}`, null, { method: "POST", body: { projectId, number: number4 } });
|
|
24127
|
-
const t = messages(root);
|
|
24128
|
-
out(t(kind === "rollback" ? "rollbackQueued" : "promoteQueued", { n: number4 }));
|
|
24129
|
-
out(t("nextStep"));
|
|
24130
|
-
out(t("runStatus"));
|
|
24131
|
-
}
|
|
24132
|
-
async function statusCommand(root, ctx) {
|
|
24133
|
-
requireToken(ctx);
|
|
24134
|
-
const projectId = linkedProjectId(root);
|
|
24135
|
-
const s = await apiRequest(ctx, `/api/cli/status?projectId=${encodeURIComponent(projectId)}`, StatusResponse);
|
|
24136
|
-
const p = s.project;
|
|
25182
|
+
async function pullHistory(root, ctx, projectId) {
|
|
24137
25183
|
const t = messages(root);
|
|
24138
|
-
|
|
24139
|
-
|
|
24140
|
-
|
|
24141
|
-
|
|
24142
|
-
|
|
24143
|
-
|
|
24144
|
-
|
|
24145
|
-
|
|
24146
|
-
|
|
24147
|
-
|
|
24148
|
-
|
|
24149
|
-
|
|
24150
|
-
|
|
24151
|
-
|
|
24152
|
-
|
|
24153
|
-
out();
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
}
|
|
24157
|
-
if (s.latest?.wentBack) {
|
|
24158
|
-
out();
|
|
24159
|
-
out(t("wentBack", { n: s.latest.number, prev: s.latest.wentBack.previous, reason: s.latest.wentBack.reason }));
|
|
24160
|
-
return;
|
|
24161
|
-
}
|
|
24162
|
-
if (newer?.status === "ready") {
|
|
24163
|
-
out();
|
|
24164
|
-
out(t("nextStep"));
|
|
24165
|
-
out(t("askOwner", { n: newer.number }));
|
|
24166
|
-
if (s.latest?.preview) out(t("showPreview", { url: s.latest.preview }));
|
|
24167
|
-
out(t("promoteReady", { n: newer.number }));
|
|
24168
|
-
}
|
|
24169
|
-
if (s.latest?.migrationStatus === "waiting") {
|
|
24170
|
-
out();
|
|
24171
|
-
out(t("sqlWaitingLine", { url: versionsPage(ctx, projectId) }));
|
|
24172
|
-
}
|
|
24173
|
-
if (s.latest?.status !== "failed") return;
|
|
24174
|
-
out();
|
|
24175
|
-
out(t("buildFailed", { n: s.latest.number }));
|
|
24176
|
-
if (s.latest.error) out(` ${s.latest.error}`);
|
|
24177
|
-
if (s.latest.logTail) {
|
|
24178
|
-
out();
|
|
24179
|
-
out(t("buildLogTail"));
|
|
24180
|
-
for (const line of s.latest.logTail.split("\n")) out(` ${line}`);
|
|
24181
|
-
}
|
|
24182
|
-
out();
|
|
24183
|
-
out(t(telemetryEnabled(ctx.config) ? "buildFixHint" : "buildFixHintNoNote"));
|
|
25184
|
+
if (git(root, ["--version"]).status !== 0) throw new CliError(t("pullNoGit"), 1, "usage");
|
|
25185
|
+
const { versions } = await apiRequest(ctx, `/api/cli/versions?projectId=${encodeURIComponent(projectId)}`, VersionsResponse);
|
|
25186
|
+
const live = versions.find((v) => v.isLive)?.number ?? Math.max(0, ...versions.filter((v) => v.status === "ready").map((v) => v.number));
|
|
25187
|
+
const chosen = versions.filter((v) => v.number <= live && v.status !== "failed" && v.status !== "queued").sort((a, b) => a.number - b.number);
|
|
25188
|
+
if (!chosen.length) throw new CliError(t("pullNoSource"), 1, "not_found");
|
|
25189
|
+
if (!existsSync9(join9(root, ".git")) && git(root, ["init", "-q"]).status !== 0) throw new CliError(t("pullNoGit"), 1, "usage");
|
|
25190
|
+
for (const v of chosen) {
|
|
25191
|
+
const gz = await fetchSource(root, ctx, projectId, v.number).catch(() => null);
|
|
25192
|
+
if (!gz) continue;
|
|
25193
|
+
clearTree(root);
|
|
25194
|
+
extractInto(gz, root, t("pullDamaged"));
|
|
25195
|
+
git(root, ["add", "-A"]);
|
|
25196
|
+
const when = { GIT_AUTHOR_DATE: v.createdAt, GIT_COMMITTER_DATE: v.createdAt };
|
|
25197
|
+
const r = git(root, ["-c", "user.name=DeployAI", "-c", "user.email=versions@deployai.co.il", "commit", "-q", "--allow-empty", "-m", `v${v.number}: ${v.message}`], when);
|
|
25198
|
+
if (r.status !== 0) throw new CliError(`git commit failed for v${v.number}: ${r.stderr.trim()}`, 1, "git");
|
|
25199
|
+
out(` v${v.number} ${v.message}`);
|
|
25200
|
+
}
|
|
25201
|
+
out(t("pulledHistory", { n: chosen.length, v: live }));
|
|
24184
25202
|
}
|
|
24185
25203
|
|
|
24186
25204
|
// src/commands/start.ts
|
|
24187
|
-
import { spawnSync as
|
|
24188
|
-
import { existsSync as
|
|
24189
|
-
import { join as
|
|
25205
|
+
import { spawnSync as spawnSync3 } from "child_process";
|
|
25206
|
+
import { existsSync as existsSync10, writeFileSync as writeFileSync8 } from "fs";
|
|
25207
|
+
import { join as join11, relative as relative3, resolve as resolve3 } from "path";
|
|
24190
25208
|
|
|
24191
25209
|
// src/commands/starter.ts
|
|
24192
|
-
import { writeFileSync as
|
|
24193
|
-
import { join as
|
|
25210
|
+
import { writeFileSync as writeFileSync7 } from "fs";
|
|
25211
|
+
import { join as join10 } from "path";
|
|
24194
25212
|
var esc2 = (s) => s.replace(/[&<>"]/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """ })[c]);
|
|
24195
25213
|
var TEXT = {
|
|
24196
25214
|
he: { title: "\u05D4\u05D0\u05EA\u05E8 \u05E9\u05DC\u05D9", soon: "\u05D4\u05D0\u05EA\u05E8 \u05D1\u05D1\u05E0\u05D9\u05D9\u05D4, \u05D1\u05E7\u05E8\u05D5\u05D1 \u05DB\u05D0\u05DF." },
|
|
@@ -24238,8 +25256,8 @@ DeployAI wrote this page so the folder starts as a working site. Build the owner
|
|
|
24238
25256
|
- Delete this README or replace it with notes about the site.
|
|
24239
25257
|
`;
|
|
24240
25258
|
function writeStarter(root, name, lang, stack) {
|
|
24241
|
-
|
|
24242
|
-
|
|
25259
|
+
writeFileSync7(join10(root, "index.html"), page(name ?? "", lang, stack));
|
|
25260
|
+
writeFileSync7(join10(root, "README.md"), README);
|
|
24243
25261
|
}
|
|
24244
25262
|
|
|
24245
25263
|
// src/commands/start.ts
|
|
@@ -24260,7 +25278,7 @@ async function fetchStart(ctx, id) {
|
|
|
24260
25278
|
return data;
|
|
24261
25279
|
}
|
|
24262
25280
|
function install(root) {
|
|
24263
|
-
const r =
|
|
25281
|
+
const r = spawnSync3("npm", ["install"], { cwd: root, stdio: "inherit", shell: process.platform === "win32" });
|
|
24264
25282
|
return r.status === 0;
|
|
24265
25283
|
}
|
|
24266
25284
|
async function startCommand(cwd, ctx, id, opts = {}) {
|
|
@@ -24269,24 +25287,36 @@ async function startCommand(cwd, ctx, id, opts = {}) {
|
|
|
24269
25287
|
const { kind, choices, agent } = await fetchStart(ctx, key);
|
|
24270
25288
|
const sample = choices.sampleKey ? SAMPLES.find((s) => s.key === choices.sampleKey) : void 0;
|
|
24271
25289
|
if (choices.sampleKey && !sample) throw new CliError(messages()("unknownSample", { key: choices.sampleKey }), 1, "not_found");
|
|
24272
|
-
const fresh = kind === "new" || kind === "guest" && sample;
|
|
24273
|
-
const here =
|
|
25290
|
+
const fresh = kind === "new" || kind === "migrate" || kind === "guest" && sample;
|
|
25291
|
+
const here = resolve3(cwd);
|
|
24274
25292
|
const sameSite = Boolean(choices.projectId && readProject(here)?.projectId === choices.projectId);
|
|
24275
25293
|
const root = fresh && filesIn(here).length && !opts.here && !sameSite ? freeFolder(here, choices.slug ?? sample?.key ?? "site") : here;
|
|
24276
25294
|
const done = [];
|
|
24277
25295
|
const empty = !filesIn(root).length;
|
|
24278
25296
|
const starter = (kind === "new" || kind === "guest") && !sample && empty;
|
|
24279
|
-
const steps = startSteps(kind, { emptyFolder: kind === "update" && empty, starter });
|
|
25297
|
+
const steps = startSteps(kind, { emptyFolder: kind === "update" && empty, starter, managed: Boolean(choices.migration?.requestId) });
|
|
24280
25298
|
updateProject(root, { lang: langOf(choices.ownerLanguage) });
|
|
24281
25299
|
const t = messages(root);
|
|
24282
25300
|
if (sample && !sameSite) {
|
|
24283
25301
|
const written = await downloadSample(ctx, sample.key, root);
|
|
24284
25302
|
done.push(t("startDownloaded", { key: sample.key, n: written }));
|
|
24285
|
-
if (
|
|
25303
|
+
if (existsSync10(join11(root, "package.json"))) {
|
|
24286
25304
|
if (opts.install !== false && install(root)) done.push(t("startInstalled"));
|
|
24287
25305
|
else steps.unshift({ cmd: "npm install", say: "Installs the sample's packages." });
|
|
24288
25306
|
}
|
|
24289
25307
|
}
|
|
25308
|
+
if (kind === "migrate" && choices.migration) {
|
|
25309
|
+
writeChoices(root, { ...choices.migration, startId: key });
|
|
25310
|
+
for (const url2 of choices.migration.sourceUrls) {
|
|
25311
|
+
try {
|
|
25312
|
+
const skipped = await migrateScanCommand(root, url2, { max: START_SCAN_PAGES });
|
|
25313
|
+
done.push(t("startScanned", { url: url2, dir: MIGRATION_DIR }));
|
|
25314
|
+
if (skipped) steps.unshift({ cmd: `npx deployai@latest migrate scan ${url2}`, say: `The first scan read ${START_SCAN_PAGES} pages and the site has ${skipped} more: run it now to read up to 1,000, before you plan.` });
|
|
25315
|
+
} catch (e2) {
|
|
25316
|
+
steps.unshift({ cmd: `npx deployai@latest migrate scan ${url2}`, say: `The scan stopped: ${e2.message} Run it again; if it fails again, tell the owner what it said.` });
|
|
25317
|
+
}
|
|
25318
|
+
}
|
|
25319
|
+
}
|
|
24290
25320
|
if (starter) {
|
|
24291
25321
|
writeStarter(root, choices.name, langOf(choices.ownerLanguage), choices.stack);
|
|
24292
25322
|
done.push(t("startStarter"));
|
|
@@ -24294,7 +25324,7 @@ async function startCommand(cwd, ctx, id, opts = {}) {
|
|
|
24294
25324
|
const stackText = choices.stack ? stackBlock(choices.stack) : "";
|
|
24295
25325
|
if (choices.brief || stackText) {
|
|
24296
25326
|
ensureDeployaiDir(root);
|
|
24297
|
-
|
|
25327
|
+
writeFileSync8(join11(root, BRIEF_FILE), [choices.brief ? `# The owner's details
|
|
24298
25328
|
|
|
24299
25329
|
${choices.brief}
|
|
24300
25330
|
` : "", stackText].filter(Boolean).join("\n"));
|
|
@@ -24312,13 +25342,13 @@ ${choices.brief}
|
|
|
24312
25342
|
}
|
|
24313
25343
|
out(t("startTitle"));
|
|
24314
25344
|
out();
|
|
24315
|
-
if (root !== here) out(t("startNewFolder", { dir:
|
|
25345
|
+
if (root !== here) out(t("startNewFolder", { dir: relative3(here, root) }));
|
|
24316
25346
|
for (const line of done) out(`- ${line}`);
|
|
24317
25347
|
out();
|
|
24318
25348
|
out("----- Instructions for the agent -----");
|
|
24319
25349
|
out();
|
|
24320
25350
|
if (root !== here) {
|
|
24321
|
-
out(`Work only inside the folder ${
|
|
25351
|
+
out(`Work only inside the folder ${relative3(here, root)} from now on (cd ${JSON.stringify(relative3(here, root))}).`);
|
|
24322
25352
|
out();
|
|
24323
25353
|
}
|
|
24324
25354
|
out(agent.trim());
|
|
@@ -24326,6 +25356,10 @@ ${choices.brief}
|
|
|
24326
25356
|
out();
|
|
24327
25357
|
out(stackText.trim());
|
|
24328
25358
|
}
|
|
25359
|
+
if (kind === "migrate") {
|
|
25360
|
+
out();
|
|
25361
|
+
out(uiSourcesText());
|
|
25362
|
+
}
|
|
24329
25363
|
out();
|
|
24330
25364
|
out("Then, in this order:");
|
|
24331
25365
|
steps.forEach((s, i) => out(`${i + 1}. ${s.cmd ? `Run ${s.cmd}. ` : ""}${s.say}`));
|
|
@@ -24335,8 +25369,8 @@ ${choices.brief}
|
|
|
24335
25369
|
}
|
|
24336
25370
|
|
|
24337
25371
|
// src/commands/addon.ts
|
|
24338
|
-
import { readFileSync as
|
|
24339
|
-
import { resolve as
|
|
25372
|
+
import { readFileSync as readFileSync8 } from "fs";
|
|
25373
|
+
import { resolve as resolve4 } from "path";
|
|
24340
25374
|
function linkedProjectId2(root) {
|
|
24341
25375
|
const id = readProject(root)?.projectId;
|
|
24342
25376
|
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");
|
|
@@ -24366,7 +25400,27 @@ async function addonsCommand(root, ctx) {
|
|
|
24366
25400
|
out("Every add-on of this site is done or skipped. To run one again: npx deployai@latest addon run <name>");
|
|
24367
25401
|
return;
|
|
24368
25402
|
}
|
|
24369
|
-
out(`Next: ${r.next}.
|
|
25403
|
+
out(`Next: ${r.next}. Run them all in one go: npx deployai@latest addons run (or one: npx deployai@latest addon run <name>)`);
|
|
25404
|
+
}
|
|
25405
|
+
async function addonsRunCommand(root, ctx) {
|
|
25406
|
+
requireToken(ctx);
|
|
25407
|
+
const projectId = linkedProjectId2(root);
|
|
25408
|
+
const r = await apiRequest(ctx, `/api/cli/addons?projectId=${encodeURIComponent(projectId)}`, AddonsResponse);
|
|
25409
|
+
if (!r.open) {
|
|
25410
|
+
out("The DeployAI marketplace is not open yet, so this site has no add-ons to run.");
|
|
25411
|
+
return;
|
|
25412
|
+
}
|
|
25413
|
+
const todo = r.addons.filter((a) => a.owned && a.status !== "done" && a.status !== "skipped");
|
|
25414
|
+
if (!todo.length) {
|
|
25415
|
+
updateProject(root, { addonsAll: false });
|
|
25416
|
+
out(r.addons.some((a) => a.owned) ? "Every add-on of this site is done or skipped. To run one again: npx deployai@latest addon run <name>" : "This site has no add-ons yet. See them: npx deployai@latest addons");
|
|
25417
|
+
return;
|
|
25418
|
+
}
|
|
25419
|
+
updateProject(root, { addonsAll: true });
|
|
25420
|
+
out(`Running every add-on of this site in one go: ${todo.map((a) => a.key).join(", ")}.`);
|
|
25421
|
+
out("Do each one fully, run npx deployai@latest check after it, and report it with addon done as it says; the next one starts right after. Tell the owner in one line which add-on you are on.");
|
|
25422
|
+
out();
|
|
25423
|
+
await addonNextCommand(root, ctx);
|
|
24370
25424
|
}
|
|
24371
25425
|
async function addonBuyCommand(root, ctx, key) {
|
|
24372
25426
|
requireToken(ctx);
|
|
@@ -24416,7 +25470,7 @@ async function addonDoneCommand(root, ctx, runId, opts) {
|
|
|
24416
25470
|
let report;
|
|
24417
25471
|
if (opts.report) {
|
|
24418
25472
|
try {
|
|
24419
|
-
report = JSON.parse(
|
|
25473
|
+
report = JSON.parse(readFileSync8(resolve4(root, opts.report), "utf8"));
|
|
24420
25474
|
} catch {
|
|
24421
25475
|
throw new CliError(`Cannot read the report file ${opts.report} as JSON.`, 1, "usage");
|
|
24422
25476
|
}
|
|
@@ -24426,8 +25480,13 @@ async function addonDoneCommand(root, ctx, runId, opts) {
|
|
|
24426
25480
|
if (!body.success) throw new CliError("Status must be done, failed or skipped.", 1, "usage");
|
|
24427
25481
|
const r = await apiRequest(ctx, `/api/cli/addons/runs/${encodeURIComponent(runId.trim())}`, AddonDoneResponse, { method: "POST", body: body.data });
|
|
24428
25482
|
out(`Saved: add-on ${body.data.status}.`);
|
|
24429
|
-
|
|
24430
|
-
|
|
25483
|
+
const all = readProject(root)?.addonsAll === true;
|
|
25484
|
+
if (r.next && all) out(`Next: ${r.next}. Run npx deployai@latest check, then at once: npx deployai@latest addon next`);
|
|
25485
|
+
else if (r.next) out(`Next: ${r.next}. Tell the site owner what is next, and only with their OK run: npx deployai@latest addon next`);
|
|
25486
|
+
else {
|
|
25487
|
+
if (all) updateProject(root, { addonsAll: false });
|
|
25488
|
+
out("Every add-on of this site is done or skipped.");
|
|
25489
|
+
}
|
|
24431
25490
|
}
|
|
24432
25491
|
|
|
24433
25492
|
// src/commands/speed.ts
|
|
@@ -24467,6 +25526,65 @@ async function speedCommand(ctx, url2, opts) {
|
|
|
24467
25526
|
out(`Full report: ${ctx.apiUrl}/tools/r/${id}`);
|
|
24468
25527
|
}
|
|
24469
25528
|
|
|
25529
|
+
// src/commands/blocks.ts
|
|
25530
|
+
import { existsSync as existsSync11, mkdirSync as mkdirSync5, writeFileSync as writeFileSync9 } from "fs";
|
|
25531
|
+
import { dirname as dirname3, resolve as resolve5, sep as sep3 } from "path";
|
|
25532
|
+
import { gunzipSync as gunzipSync2 } from "zlib";
|
|
25533
|
+
var BLOCKS = [
|
|
25534
|
+
{ key: "inbox", title: "Contact form with the site's own messages page for the owner, and an email on each message (D1)" },
|
|
25535
|
+
{ key: "blog", title: "Blog: posts as Markdown files, categories, tags, authors, pages, RSS and article data for search" }
|
|
25536
|
+
];
|
|
25537
|
+
var MAX_BYTES3 = 5 * 1024 * 1024;
|
|
25538
|
+
async function blocksCommand(root, ctx, name) {
|
|
25539
|
+
if (!name) {
|
|
25540
|
+
out("DeployAI blocks");
|
|
25541
|
+
out("");
|
|
25542
|
+
out(rows(BLOCKS.map((b) => [b.key, b.title])));
|
|
25543
|
+
out("");
|
|
25544
|
+
out("Add one: npx deployai@latest blocks <name>");
|
|
25545
|
+
return;
|
|
25546
|
+
}
|
|
25547
|
+
const block = BLOCKS.find((b) => b.key === name.trim().toLowerCase());
|
|
25548
|
+
if (!block) throw new CliError(`No block named ${name}. See the list: npx deployai@latest blocks`, 1, "not_found");
|
|
25549
|
+
let res;
|
|
25550
|
+
try {
|
|
25551
|
+
res = await fetch(`${ctx.apiUrl}/blocks-src/${block.key}.tar.gz`, { headers: { "User-Agent": userAgent(ctx.config) }, signal: AbortSignal.timeout(6e4) });
|
|
25552
|
+
} catch {
|
|
25553
|
+
throw new CliError(messages()("unreachable", { url: ctx.apiUrl }), 1, "network");
|
|
25554
|
+
}
|
|
25555
|
+
if (!res.ok) throw new CliError(`Could not download the ${block.key} block (HTTP ${res.status}). Try again.`, 1, "api");
|
|
25556
|
+
const gz = Buffer.from(await res.arrayBuffer());
|
|
25557
|
+
if (gz.length > MAX_BYTES3) throw new CliError("The block download is too large.", 1, "api");
|
|
25558
|
+
let entries;
|
|
25559
|
+
try {
|
|
25560
|
+
entries = readTar(gunzipSync2(gz, { maxOutputLength: MAX_BYTES3 * 4 }));
|
|
25561
|
+
} catch {
|
|
25562
|
+
throw new CliError("The block download is damaged. Try again.", 1, "api");
|
|
25563
|
+
}
|
|
25564
|
+
const base = resolve5(root);
|
|
25565
|
+
const written = [];
|
|
25566
|
+
const kept = [];
|
|
25567
|
+
for (const e2 of entries) {
|
|
25568
|
+
if (e2.type !== "0" && e2.type !== "\0") continue;
|
|
25569
|
+
const target = resolve5(base, e2.name);
|
|
25570
|
+
if (target === base || !target.startsWith(base + sep3)) continue;
|
|
25571
|
+
if (existsSync11(target)) {
|
|
25572
|
+
kept.push(e2.name);
|
|
25573
|
+
continue;
|
|
25574
|
+
}
|
|
25575
|
+
mkdirSync5(dirname3(target), { recursive: true });
|
|
25576
|
+
writeFileSync9(target, e2.data);
|
|
25577
|
+
written.push(e2.name);
|
|
25578
|
+
}
|
|
25579
|
+
out(`Added the ${block.key} block: ${written.length} files.`);
|
|
25580
|
+
written.forEach((f) => out(` + ${f}`));
|
|
25581
|
+
if (kept.length) {
|
|
25582
|
+
out(`These ${kept.length} files already exist and were left as they are; merge what the block needs into them:`);
|
|
25583
|
+
kept.forEach((f) => out(` = ${f}`));
|
|
25584
|
+
}
|
|
25585
|
+
out(`Read .deployai/blocks/${block.key}.md and follow it: it says what to wire and what to set.`);
|
|
25586
|
+
}
|
|
25587
|
+
|
|
24470
25588
|
// src/commands/env.ts
|
|
24471
25589
|
async function readStdin() {
|
|
24472
25590
|
const chunks = [];
|
|
@@ -24510,7 +25628,7 @@ function buildProgram() {
|
|
|
24510
25628
|
if (lang === "he" || lang === "en") process.env.DEPLOYAI_LANG = lang;
|
|
24511
25629
|
}).showHelpAfterError();
|
|
24512
25630
|
const g = (cmd) => cmd.optsWithGlobals();
|
|
24513
|
-
const root = (cmd) =>
|
|
25631
|
+
const root = (cmd) => resolve6(g(cmd).dir ?? process.cwd());
|
|
24514
25632
|
const ctx = (cmd) => apiContext(g(cmd).api);
|
|
24515
25633
|
program.command("init").description("create DEPLOYAI.md and .deployai/ guard files").option("--force", "overwrite DEPLOYAI.md").option("--no-agent-files", "do not add the DEPLOYAI.md line to AGENTS.md and CLAUDE.md").action((opts, cmd) => initCommand(root(cmd), opts));
|
|
24516
25634
|
program.command("inspect").description("show framework, package manager, language, database, storage").option("--json", "machine readable output").action((opts, cmd) => inspectCommand(root(cmd), opts));
|
|
@@ -24527,14 +25645,28 @@ function buildProgram() {
|
|
|
24527
25645
|
program.command("link").description("link this folder to a DeployAI project").argument("[project]", "project slug or id").option("--create <name>", "create a new project and link it").action(
|
|
24528
25646
|
(project, opts, cmd) => linkCommand(root(cmd), ctx(cmd), project, opts)
|
|
24529
25647
|
);
|
|
24530
|
-
program.command("deploy").description("check, pack and upload the source, then print the preview address").option("-m, --message <message>", "version message", "update").option("--fixed <what>", "after a failed version: one sentence on what you changed to fix it, no code (helps us catch it for others)").option("--guest", "without login: deploy as a temporary site, deleted after the days we set unless claimed").action((opts, cmd) => deployCommand(root(cmd), ctx(cmd), opts));
|
|
24531
|
-
program.command("pull").description("download the code of the linked site's live version into this empty folder (needs login)").action((
|
|
25648
|
+
program.command("deploy").description("check, pack and upload the source, wait for the build, then put it live or print the preview address").option("-m, --message <message>", "version message", "update").option("--fixed <what>", "after a failed version: one sentence on what you changed to fix it, no code (helps us catch it for others)").option("--guest", "without login: deploy as a temporary site, deleted after the days we set unless claimed").option("--live", "put it live when the build is done; only after the owner said yes").option("--no-wait", "upload and return, without waiting for the build").action((opts, cmd) => deployCommand(root(cmd), ctx(cmd), opts));
|
|
25649
|
+
program.command("pull").description("download the code of the linked site's live version into this empty folder (needs login)").option("--history", "every version up to the live one as git commits, oldest first").action((opts, cmd) => pullCommand(root(cmd), ctx(cmd), opts));
|
|
24532
25650
|
program.command("claim").description("print this folder's temporary site keep link again; --email mails it, with a reminder before the delete").option("--email <address>", "the owner's email for the link and the reminder").action((opts, cmd) => claimCommand(root(cmd), ctx(cmd), opts));
|
|
24533
25651
|
program.command("versions").description("list versions").action((_opts, cmd) => versionsCommand(root(cmd), ctx(cmd)));
|
|
24534
25652
|
program.command("rollback").description("put an earlier version back live, with no rebuild").argument("<version>", "for example v5").action((version2, _opts, cmd) => changeLiveCommand(root(cmd), ctx(cmd), version2, "rollback"));
|
|
24535
|
-
program.command("promote").description("put a version live").argument("<version>", "for example v5").action((version2,
|
|
25653
|
+
program.command("promote").description("put a version live; new database changes (SQL) are shown and run first, after a yes").argument("<version>", "for example v5").option("--approve-sql <code>", "for an agent, after the owner said yes to the SQL that sql printed: the code it printed; never for SQL that removes data").action((version2, opts, cmd) => changeLiveCommand(root(cmd), ctx(cmd), version2, "promote", opts));
|
|
25654
|
+
program.command("sql").description("the database changes (SQL) a version runs before it goes live").argument("<version>", "for example v5").action((version2, _opts, cmd) => sqlCommand(root(cmd), ctx(cmd), version2));
|
|
24536
25655
|
program.command("status").description("site state, live version and queue").action((_opts, cmd) => statusCommand(root(cmd), ctx(cmd)));
|
|
24537
|
-
program.command("
|
|
25656
|
+
const migrate = program.command("migrate").description("move an existing site: scan it, download its files, check the new one keeps its addresses");
|
|
25657
|
+
migrate.command("scan").description("read the old site: every address with its title and description, the platform, and WordPress content").argument("<url>", "the old site address").option("--max <n>", "the most pages to read (up to 1000)", (v) => Number(v)).action(async (url2, opts, cmd) => {
|
|
25658
|
+
await migrateScanCommand(root(cmd), url2, opts);
|
|
25659
|
+
});
|
|
25660
|
+
migrate.command("media").description("download the images and files the old site uses, at their old paths; run again to go on").action((_opts, cmd) => migrateMediaCommand(root(cmd)));
|
|
25661
|
+
migrate.command("redirects").description("write public/_redirects for the old addresses that cannot stay (feeds, attachment pages)").action((_opts, cmd) => migrateRedirectsCommand(root(cmd)));
|
|
25662
|
+
migrate.command("verify").description("open every old address on the preview: lists pages that moved, are missing or lost their title or description").argument("<preview>", "the preview address deploy printed").action(async (preview, _opts, cmd) => migrateVerifyCommand(root(cmd), preview));
|
|
25663
|
+
migrate.command("status").description("a managed move: report a stage to the request (scanning, building, preview_ready, customer_review, live, blocked)").argument("<stage>", "the stage").argument("[note]", "one line: the preview address, what is done, or why it is blocked").action((stage, note, _opts, cmd) => migrateStatusCommand(root(cmd), ctx(cmd), stage, note));
|
|
25664
|
+
program.command("blocks").description("list our building blocks, or add one to this site (inbox, blog); never writes over a file").argument("[name]", "inbox or blog").action((name, _opts, cmd) => blocksCommand(root(cmd), ctx(cmd), name));
|
|
25665
|
+
program.command("addons").description("the add-ons of this site: which it has, which are done and which is next; addons run runs them all in one go").argument("[action]", "run: every add-on that is not done, one after the other").action((action, _opts, cmd) => {
|
|
25666
|
+
if (!action) return addonsCommand(root(cmd), ctx(cmd));
|
|
25667
|
+
if (action === "run") return addonsRunCommand(root(cmd), ctx(cmd));
|
|
25668
|
+
throw new CliError(`Unknown: addons ${action}. Use npx deployai@latest addons, or npx deployai@latest addons run`, 1, "usage");
|
|
25669
|
+
});
|
|
24538
25670
|
const addon = program.command("addon").description("run the add-ons of this site, one at a time");
|
|
24539
25671
|
addon.command("next").description("print the next add-on for your agent").action((_opts, cmd) => addonNextCommand(root(cmd), ctx(cmd)));
|
|
24540
25672
|
addon.command("run").description("print one add-on by name").argument("<name>", "the add-on name, as npx deployai@latest addons lists it").action((name, _opts, cmd) => addonRunCommand(root(cmd), ctx(cmd), name));
|