mrvn-cli 0.2.8 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -1
- package/dist/index.js +256 -212
- package/dist/index.js.map +1 -1
- package/dist/marvin-serve.js +57 -30
- package/dist/marvin-serve.js.map +1 -1
- package/dist/marvin.js +256 -212
- package/dist/marvin.js.map +1 -1
- package/package.json +1 -1
package/dist/marvin.js
CHANGED
|
@@ -852,8 +852,8 @@ function cached(getter) {
|
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
854
|
}
|
|
855
|
-
function nullish(
|
|
856
|
-
return
|
|
855
|
+
function nullish(input4) {
|
|
856
|
+
return input4 === null || input4 === void 0;
|
|
857
857
|
}
|
|
858
858
|
function cleanRegex(source) {
|
|
859
859
|
const start = source.startsWith("^") ? 1 : 0;
|
|
@@ -947,8 +947,8 @@ function randomString(length = 10) {
|
|
|
947
947
|
function esc(str) {
|
|
948
948
|
return JSON.stringify(str);
|
|
949
949
|
}
|
|
950
|
-
function slugify(
|
|
951
|
-
return
|
|
950
|
+
function slugify(input4) {
|
|
951
|
+
return input4.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
952
952
|
}
|
|
953
953
|
var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
|
|
954
954
|
};
|
|
@@ -1330,19 +1330,19 @@ function finalizeIssue(iss, ctx, config2) {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
return full;
|
|
1332
1332
|
}
|
|
1333
|
-
function getSizableOrigin(
|
|
1334
|
-
if (
|
|
1333
|
+
function getSizableOrigin(input4) {
|
|
1334
|
+
if (input4 instanceof Set)
|
|
1335
1335
|
return "set";
|
|
1336
|
-
if (
|
|
1336
|
+
if (input4 instanceof Map)
|
|
1337
1337
|
return "map";
|
|
1338
|
-
if (
|
|
1338
|
+
if (input4 instanceof File)
|
|
1339
1339
|
return "file";
|
|
1340
1340
|
return "unknown";
|
|
1341
1341
|
}
|
|
1342
|
-
function getLengthableOrigin(
|
|
1343
|
-
if (Array.isArray(
|
|
1342
|
+
function getLengthableOrigin(input4) {
|
|
1343
|
+
if (Array.isArray(input4))
|
|
1344
1344
|
return "array";
|
|
1345
|
-
if (typeof
|
|
1345
|
+
if (typeof input4 === "string")
|
|
1346
1346
|
return "string";
|
|
1347
1347
|
return "unknown";
|
|
1348
1348
|
}
|
|
@@ -1368,12 +1368,12 @@ function parsedType(data) {
|
|
|
1368
1368
|
return t;
|
|
1369
1369
|
}
|
|
1370
1370
|
function issue(...args) {
|
|
1371
|
-
const [iss,
|
|
1371
|
+
const [iss, input4, inst] = args;
|
|
1372
1372
|
if (typeof iss === "string") {
|
|
1373
1373
|
return {
|
|
1374
1374
|
message: iss,
|
|
1375
1375
|
code: "custom",
|
|
1376
|
-
input:
|
|
1376
|
+
input: input4,
|
|
1377
1377
|
inst
|
|
1378
1378
|
};
|
|
1379
1379
|
}
|
|
@@ -1912,23 +1912,23 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
1912
1912
|
bag.pattern = integer;
|
|
1913
1913
|
});
|
|
1914
1914
|
inst._zod.check = (payload) => {
|
|
1915
|
-
const
|
|
1915
|
+
const input4 = payload.value;
|
|
1916
1916
|
if (isInt) {
|
|
1917
|
-
if (!Number.isInteger(
|
|
1917
|
+
if (!Number.isInteger(input4)) {
|
|
1918
1918
|
payload.issues.push({
|
|
1919
1919
|
expected: origin,
|
|
1920
1920
|
format: def.format,
|
|
1921
1921
|
code: "invalid_type",
|
|
1922
1922
|
continue: false,
|
|
1923
|
-
input:
|
|
1923
|
+
input: input4,
|
|
1924
1924
|
inst
|
|
1925
1925
|
});
|
|
1926
1926
|
return;
|
|
1927
1927
|
}
|
|
1928
|
-
if (!Number.isSafeInteger(
|
|
1929
|
-
if (
|
|
1928
|
+
if (!Number.isSafeInteger(input4)) {
|
|
1929
|
+
if (input4 > 0) {
|
|
1930
1930
|
payload.issues.push({
|
|
1931
|
-
input:
|
|
1931
|
+
input: input4,
|
|
1932
1932
|
code: "too_big",
|
|
1933
1933
|
maximum: Number.MAX_SAFE_INTEGER,
|
|
1934
1934
|
note: "Integers must be within the safe integer range.",
|
|
@@ -1939,7 +1939,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
1939
1939
|
});
|
|
1940
1940
|
} else {
|
|
1941
1941
|
payload.issues.push({
|
|
1942
|
-
input:
|
|
1942
|
+
input: input4,
|
|
1943
1943
|
code: "too_small",
|
|
1944
1944
|
minimum: Number.MIN_SAFE_INTEGER,
|
|
1945
1945
|
note: "Integers must be within the safe integer range.",
|
|
@@ -1952,10 +1952,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
1952
1952
|
return;
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
|
-
if (
|
|
1955
|
+
if (input4 < minimum) {
|
|
1956
1956
|
payload.issues.push({
|
|
1957
1957
|
origin: "number",
|
|
1958
|
-
input:
|
|
1958
|
+
input: input4,
|
|
1959
1959
|
code: "too_small",
|
|
1960
1960
|
minimum,
|
|
1961
1961
|
inclusive: true,
|
|
@@ -1963,10 +1963,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
1963
1963
|
continue: !def.abort
|
|
1964
1964
|
});
|
|
1965
1965
|
}
|
|
1966
|
-
if (
|
|
1966
|
+
if (input4 > maximum) {
|
|
1967
1967
|
payload.issues.push({
|
|
1968
1968
|
origin: "number",
|
|
1969
|
-
input:
|
|
1969
|
+
input: input4,
|
|
1970
1970
|
code: "too_big",
|
|
1971
1971
|
maximum,
|
|
1972
1972
|
inclusive: true,
|
|
@@ -1986,11 +1986,11 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1986
1986
|
bag.maximum = maximum;
|
|
1987
1987
|
});
|
|
1988
1988
|
inst._zod.check = (payload) => {
|
|
1989
|
-
const
|
|
1990
|
-
if (
|
|
1989
|
+
const input4 = payload.value;
|
|
1990
|
+
if (input4 < minimum) {
|
|
1991
1991
|
payload.issues.push({
|
|
1992
1992
|
origin: "bigint",
|
|
1993
|
-
input:
|
|
1993
|
+
input: input4,
|
|
1994
1994
|
code: "too_small",
|
|
1995
1995
|
minimum,
|
|
1996
1996
|
inclusive: true,
|
|
@@ -1998,10 +1998,10 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1998
1998
|
continue: !def.abort
|
|
1999
1999
|
});
|
|
2000
2000
|
}
|
|
2001
|
-
if (
|
|
2001
|
+
if (input4 > maximum) {
|
|
2002
2002
|
payload.issues.push({
|
|
2003
2003
|
origin: "bigint",
|
|
2004
|
-
input:
|
|
2004
|
+
input: input4,
|
|
2005
2005
|
code: "too_big",
|
|
2006
2006
|
maximum,
|
|
2007
2007
|
inclusive: true,
|
|
@@ -2024,16 +2024,16 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
2024
2024
|
inst2._zod.bag.maximum = def.maximum;
|
|
2025
2025
|
});
|
|
2026
2026
|
inst._zod.check = (payload) => {
|
|
2027
|
-
const
|
|
2028
|
-
const size =
|
|
2027
|
+
const input4 = payload.value;
|
|
2028
|
+
const size = input4.size;
|
|
2029
2029
|
if (size <= def.maximum)
|
|
2030
2030
|
return;
|
|
2031
2031
|
payload.issues.push({
|
|
2032
|
-
origin: getSizableOrigin(
|
|
2032
|
+
origin: getSizableOrigin(input4),
|
|
2033
2033
|
code: "too_big",
|
|
2034
2034
|
maximum: def.maximum,
|
|
2035
2035
|
inclusive: true,
|
|
2036
|
-
input:
|
|
2036
|
+
input: input4,
|
|
2037
2037
|
inst,
|
|
2038
2038
|
continue: !def.abort
|
|
2039
2039
|
});
|
|
@@ -2052,16 +2052,16 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
2052
2052
|
inst2._zod.bag.minimum = def.minimum;
|
|
2053
2053
|
});
|
|
2054
2054
|
inst._zod.check = (payload) => {
|
|
2055
|
-
const
|
|
2056
|
-
const size =
|
|
2055
|
+
const input4 = payload.value;
|
|
2056
|
+
const size = input4.size;
|
|
2057
2057
|
if (size >= def.minimum)
|
|
2058
2058
|
return;
|
|
2059
2059
|
payload.issues.push({
|
|
2060
|
-
origin: getSizableOrigin(
|
|
2060
|
+
origin: getSizableOrigin(input4),
|
|
2061
2061
|
code: "too_small",
|
|
2062
2062
|
minimum: def.minimum,
|
|
2063
2063
|
inclusive: true,
|
|
2064
|
-
input:
|
|
2064
|
+
input: input4,
|
|
2065
2065
|
inst,
|
|
2066
2066
|
continue: !def.abort
|
|
2067
2067
|
});
|
|
@@ -2081,13 +2081,13 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
2081
2081
|
bag.size = def.size;
|
|
2082
2082
|
});
|
|
2083
2083
|
inst._zod.check = (payload) => {
|
|
2084
|
-
const
|
|
2085
|
-
const size =
|
|
2084
|
+
const input4 = payload.value;
|
|
2085
|
+
const size = input4.size;
|
|
2086
2086
|
if (size === def.size)
|
|
2087
2087
|
return;
|
|
2088
2088
|
const tooBig = size > def.size;
|
|
2089
2089
|
payload.issues.push({
|
|
2090
|
-
origin: getSizableOrigin(
|
|
2090
|
+
origin: getSizableOrigin(input4),
|
|
2091
2091
|
...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
|
|
2092
2092
|
inclusive: true,
|
|
2093
2093
|
exact: true,
|
|
@@ -2110,17 +2110,17 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2110
2110
|
inst2._zod.bag.maximum = def.maximum;
|
|
2111
2111
|
});
|
|
2112
2112
|
inst._zod.check = (payload) => {
|
|
2113
|
-
const
|
|
2114
|
-
const length =
|
|
2113
|
+
const input4 = payload.value;
|
|
2114
|
+
const length = input4.length;
|
|
2115
2115
|
if (length <= def.maximum)
|
|
2116
2116
|
return;
|
|
2117
|
-
const origin = getLengthableOrigin(
|
|
2117
|
+
const origin = getLengthableOrigin(input4);
|
|
2118
2118
|
payload.issues.push({
|
|
2119
2119
|
origin,
|
|
2120
2120
|
code: "too_big",
|
|
2121
2121
|
maximum: def.maximum,
|
|
2122
2122
|
inclusive: true,
|
|
2123
|
-
input:
|
|
2123
|
+
input: input4,
|
|
2124
2124
|
inst,
|
|
2125
2125
|
continue: !def.abort
|
|
2126
2126
|
});
|
|
@@ -2139,17 +2139,17 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2139
2139
|
inst2._zod.bag.minimum = def.minimum;
|
|
2140
2140
|
});
|
|
2141
2141
|
inst._zod.check = (payload) => {
|
|
2142
|
-
const
|
|
2143
|
-
const length =
|
|
2142
|
+
const input4 = payload.value;
|
|
2143
|
+
const length = input4.length;
|
|
2144
2144
|
if (length >= def.minimum)
|
|
2145
2145
|
return;
|
|
2146
|
-
const origin = getLengthableOrigin(
|
|
2146
|
+
const origin = getLengthableOrigin(input4);
|
|
2147
2147
|
payload.issues.push({
|
|
2148
2148
|
origin,
|
|
2149
2149
|
code: "too_small",
|
|
2150
2150
|
minimum: def.minimum,
|
|
2151
2151
|
inclusive: true,
|
|
2152
|
-
input:
|
|
2152
|
+
input: input4,
|
|
2153
2153
|
inst,
|
|
2154
2154
|
continue: !def.abort
|
|
2155
2155
|
});
|
|
@@ -2169,11 +2169,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2169
2169
|
bag.length = def.length;
|
|
2170
2170
|
});
|
|
2171
2171
|
inst._zod.check = (payload) => {
|
|
2172
|
-
const
|
|
2173
|
-
const length =
|
|
2172
|
+
const input4 = payload.value;
|
|
2173
|
+
const length = input4.length;
|
|
2174
2174
|
if (length === def.length)
|
|
2175
2175
|
return;
|
|
2176
|
-
const origin = getLengthableOrigin(
|
|
2176
|
+
const origin = getLengthableOrigin(input4);
|
|
2177
2177
|
const tooBig = length > def.length;
|
|
2178
2178
|
payload.issues.push({
|
|
2179
2179
|
origin,
|
|
@@ -2827,15 +2827,15 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
2827
2827
|
payload.value = Number(payload.value);
|
|
2828
2828
|
} catch (_) {
|
|
2829
2829
|
}
|
|
2830
|
-
const
|
|
2831
|
-
if (typeof
|
|
2830
|
+
const input4 = payload.value;
|
|
2831
|
+
if (typeof input4 === "number" && !Number.isNaN(input4) && Number.isFinite(input4)) {
|
|
2832
2832
|
return payload;
|
|
2833
2833
|
}
|
|
2834
|
-
const received = typeof
|
|
2834
|
+
const received = typeof input4 === "number" ? Number.isNaN(input4) ? "NaN" : !Number.isFinite(input4) ? "Infinity" : void 0 : void 0;
|
|
2835
2835
|
payload.issues.push({
|
|
2836
2836
|
expected: "number",
|
|
2837
2837
|
code: "invalid_type",
|
|
2838
|
-
input:
|
|
2838
|
+
input: input4,
|
|
2839
2839
|
inst,
|
|
2840
2840
|
...received ? { received } : {}
|
|
2841
2841
|
});
|
|
@@ -2855,13 +2855,13 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
|
2855
2855
|
payload.value = Boolean(payload.value);
|
|
2856
2856
|
} catch (_) {
|
|
2857
2857
|
}
|
|
2858
|
-
const
|
|
2859
|
-
if (typeof
|
|
2858
|
+
const input4 = payload.value;
|
|
2859
|
+
if (typeof input4 === "boolean")
|
|
2860
2860
|
return payload;
|
|
2861
2861
|
payload.issues.push({
|
|
2862
2862
|
expected: "boolean",
|
|
2863
2863
|
code: "invalid_type",
|
|
2864
|
-
input:
|
|
2864
|
+
input: input4,
|
|
2865
2865
|
inst
|
|
2866
2866
|
});
|
|
2867
2867
|
return payload;
|
|
@@ -2894,13 +2894,13 @@ var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, d
|
|
|
2894
2894
|
var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
|
|
2895
2895
|
$ZodType.init(inst, def);
|
|
2896
2896
|
inst._zod.parse = (payload, _ctx) => {
|
|
2897
|
-
const
|
|
2898
|
-
if (typeof
|
|
2897
|
+
const input4 = payload.value;
|
|
2898
|
+
if (typeof input4 === "symbol")
|
|
2899
2899
|
return payload;
|
|
2900
2900
|
payload.issues.push({
|
|
2901
2901
|
expected: "symbol",
|
|
2902
2902
|
code: "invalid_type",
|
|
2903
|
-
input:
|
|
2903
|
+
input: input4,
|
|
2904
2904
|
inst
|
|
2905
2905
|
});
|
|
2906
2906
|
return payload;
|
|
@@ -2913,13 +2913,13 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
2913
2913
|
inst._zod.optin = "optional";
|
|
2914
2914
|
inst._zod.optout = "optional";
|
|
2915
2915
|
inst._zod.parse = (payload, _ctx) => {
|
|
2916
|
-
const
|
|
2917
|
-
if (typeof
|
|
2916
|
+
const input4 = payload.value;
|
|
2917
|
+
if (typeof input4 === "undefined")
|
|
2918
2918
|
return payload;
|
|
2919
2919
|
payload.issues.push({
|
|
2920
2920
|
expected: "undefined",
|
|
2921
2921
|
code: "invalid_type",
|
|
2922
|
-
input:
|
|
2922
|
+
input: input4,
|
|
2923
2923
|
inst
|
|
2924
2924
|
});
|
|
2925
2925
|
return payload;
|
|
@@ -2930,13 +2930,13 @@ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
|
|
|
2930
2930
|
inst._zod.pattern = _null;
|
|
2931
2931
|
inst._zod.values = /* @__PURE__ */ new Set([null]);
|
|
2932
2932
|
inst._zod.parse = (payload, _ctx) => {
|
|
2933
|
-
const
|
|
2934
|
-
if (
|
|
2933
|
+
const input4 = payload.value;
|
|
2934
|
+
if (input4 === null)
|
|
2935
2935
|
return payload;
|
|
2936
2936
|
payload.issues.push({
|
|
2937
2937
|
expected: "null",
|
|
2938
2938
|
code: "invalid_type",
|
|
2939
|
-
input:
|
|
2939
|
+
input: input4,
|
|
2940
2940
|
inst
|
|
2941
2941
|
});
|
|
2942
2942
|
return payload;
|
|
@@ -2965,13 +2965,13 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
|
2965
2965
|
var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
|
|
2966
2966
|
$ZodType.init(inst, def);
|
|
2967
2967
|
inst._zod.parse = (payload, _ctx) => {
|
|
2968
|
-
const
|
|
2969
|
-
if (typeof
|
|
2968
|
+
const input4 = payload.value;
|
|
2969
|
+
if (typeof input4 === "undefined")
|
|
2970
2970
|
return payload;
|
|
2971
2971
|
payload.issues.push({
|
|
2972
2972
|
expected: "void",
|
|
2973
2973
|
code: "invalid_type",
|
|
2974
|
-
input:
|
|
2974
|
+
input: input4,
|
|
2975
2975
|
inst
|
|
2976
2976
|
});
|
|
2977
2977
|
return payload;
|
|
@@ -2986,15 +2986,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
2986
2986
|
} catch (_err) {
|
|
2987
2987
|
}
|
|
2988
2988
|
}
|
|
2989
|
-
const
|
|
2990
|
-
const isDate =
|
|
2991
|
-
const isValidDate = isDate && !Number.isNaN(
|
|
2989
|
+
const input4 = payload.value;
|
|
2990
|
+
const isDate = input4 instanceof Date;
|
|
2991
|
+
const isValidDate = isDate && !Number.isNaN(input4.getTime());
|
|
2992
2992
|
if (isValidDate)
|
|
2993
2993
|
return payload;
|
|
2994
2994
|
payload.issues.push({
|
|
2995
2995
|
expected: "date",
|
|
2996
2996
|
code: "invalid_type",
|
|
2997
|
-
input:
|
|
2997
|
+
input: input4,
|
|
2998
2998
|
...isDate ? { received: "Invalid Date" } : {},
|
|
2999
2999
|
inst
|
|
3000
3000
|
});
|
|
@@ -3010,20 +3010,20 @@ function handleArrayResult(result, final, index) {
|
|
|
3010
3010
|
var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
3011
3011
|
$ZodType.init(inst, def);
|
|
3012
3012
|
inst._zod.parse = (payload, ctx) => {
|
|
3013
|
-
const
|
|
3014
|
-
if (!Array.isArray(
|
|
3013
|
+
const input4 = payload.value;
|
|
3014
|
+
if (!Array.isArray(input4)) {
|
|
3015
3015
|
payload.issues.push({
|
|
3016
3016
|
expected: "array",
|
|
3017
3017
|
code: "invalid_type",
|
|
3018
|
-
input:
|
|
3018
|
+
input: input4,
|
|
3019
3019
|
inst
|
|
3020
3020
|
});
|
|
3021
3021
|
return payload;
|
|
3022
3022
|
}
|
|
3023
|
-
payload.value = Array(
|
|
3023
|
+
payload.value = Array(input4.length);
|
|
3024
3024
|
const proms = [];
|
|
3025
|
-
for (let i = 0; i <
|
|
3026
|
-
const item =
|
|
3025
|
+
for (let i = 0; i < input4.length; i++) {
|
|
3026
|
+
const item = input4[i];
|
|
3027
3027
|
const result = def.element._zod.run({
|
|
3028
3028
|
value: item,
|
|
3029
3029
|
issues: []
|
|
@@ -3040,15 +3040,15 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
3040
3040
|
return payload;
|
|
3041
3041
|
};
|
|
3042
3042
|
});
|
|
3043
|
-
function handlePropertyResult(result, final, key,
|
|
3043
|
+
function handlePropertyResult(result, final, key, input4, isOptionalOut) {
|
|
3044
3044
|
if (result.issues.length) {
|
|
3045
|
-
if (isOptionalOut && !(key in
|
|
3045
|
+
if (isOptionalOut && !(key in input4)) {
|
|
3046
3046
|
return;
|
|
3047
3047
|
}
|
|
3048
3048
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
3049
3049
|
}
|
|
3050
3050
|
if (result.value === void 0) {
|
|
3051
|
-
if (key in
|
|
3051
|
+
if (key in input4) {
|
|
3052
3052
|
final.value[key] = void 0;
|
|
3053
3053
|
}
|
|
3054
3054
|
} else {
|
|
@@ -3071,31 +3071,31 @@ function normalizeDef(def) {
|
|
|
3071
3071
|
optionalKeys: new Set(okeys)
|
|
3072
3072
|
};
|
|
3073
3073
|
}
|
|
3074
|
-
function handleCatchall(proms,
|
|
3074
|
+
function handleCatchall(proms, input4, payload, ctx, def, inst) {
|
|
3075
3075
|
const unrecognized = [];
|
|
3076
3076
|
const keySet = def.keySet;
|
|
3077
3077
|
const _catchall = def.catchall._zod;
|
|
3078
3078
|
const t = _catchall.def.type;
|
|
3079
3079
|
const isOptionalOut = _catchall.optout === "optional";
|
|
3080
|
-
for (const key in
|
|
3080
|
+
for (const key in input4) {
|
|
3081
3081
|
if (keySet.has(key))
|
|
3082
3082
|
continue;
|
|
3083
3083
|
if (t === "never") {
|
|
3084
3084
|
unrecognized.push(key);
|
|
3085
3085
|
continue;
|
|
3086
3086
|
}
|
|
3087
|
-
const r = _catchall.run({ value:
|
|
3087
|
+
const r = _catchall.run({ value: input4[key], issues: [] }, ctx);
|
|
3088
3088
|
if (r instanceof Promise) {
|
|
3089
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key,
|
|
3089
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input4, isOptionalOut)));
|
|
3090
3090
|
} else {
|
|
3091
|
-
handlePropertyResult(r, payload, key,
|
|
3091
|
+
handlePropertyResult(r, payload, key, input4, isOptionalOut);
|
|
3092
3092
|
}
|
|
3093
3093
|
}
|
|
3094
3094
|
if (unrecognized.length) {
|
|
3095
3095
|
payload.issues.push({
|
|
3096
3096
|
code: "unrecognized_keys",
|
|
3097
3097
|
keys: unrecognized,
|
|
3098
|
-
input:
|
|
3098
|
+
input: input4,
|
|
3099
3099
|
inst
|
|
3100
3100
|
});
|
|
3101
3101
|
}
|
|
@@ -3139,12 +3139,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3139
3139
|
let value;
|
|
3140
3140
|
inst._zod.parse = (payload, ctx) => {
|
|
3141
3141
|
value ?? (value = _normalized.value);
|
|
3142
|
-
const
|
|
3143
|
-
if (!isObject2(
|
|
3142
|
+
const input4 = payload.value;
|
|
3143
|
+
if (!isObject2(input4)) {
|
|
3144
3144
|
payload.issues.push({
|
|
3145
3145
|
expected: "object",
|
|
3146
3146
|
code: "invalid_type",
|
|
3147
|
-
input:
|
|
3147
|
+
input: input4,
|
|
3148
3148
|
inst
|
|
3149
3149
|
});
|
|
3150
3150
|
return payload;
|
|
@@ -3155,17 +3155,17 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3155
3155
|
for (const key of value.keys) {
|
|
3156
3156
|
const el = shape[key];
|
|
3157
3157
|
const isOptionalOut = el._zod.optout === "optional";
|
|
3158
|
-
const r = el._zod.run({ value:
|
|
3158
|
+
const r = el._zod.run({ value: input4[key], issues: [] }, ctx);
|
|
3159
3159
|
if (r instanceof Promise) {
|
|
3160
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key,
|
|
3160
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input4, isOptionalOut)));
|
|
3161
3161
|
} else {
|
|
3162
|
-
handlePropertyResult(r, payload, key,
|
|
3162
|
+
handlePropertyResult(r, payload, key, input4, isOptionalOut);
|
|
3163
3163
|
}
|
|
3164
3164
|
}
|
|
3165
3165
|
if (!catchall) {
|
|
3166
3166
|
return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
3167
3167
|
}
|
|
3168
|
-
return handleCatchall(proms,
|
|
3168
|
+
return handleCatchall(proms, input4, payload, ctx, _normalized.value, inst);
|
|
3169
3169
|
};
|
|
3170
3170
|
});
|
|
3171
3171
|
var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
@@ -3246,12 +3246,12 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3246
3246
|
let value;
|
|
3247
3247
|
inst._zod.parse = (payload, ctx) => {
|
|
3248
3248
|
value ?? (value = _normalized.value);
|
|
3249
|
-
const
|
|
3250
|
-
if (!isObject2(
|
|
3249
|
+
const input4 = payload.value;
|
|
3250
|
+
if (!isObject2(input4)) {
|
|
3251
3251
|
payload.issues.push({
|
|
3252
3252
|
expected: "object",
|
|
3253
3253
|
code: "invalid_type",
|
|
3254
|
-
input:
|
|
3254
|
+
input: input4,
|
|
3255
3255
|
inst
|
|
3256
3256
|
});
|
|
3257
3257
|
return payload;
|
|
@@ -3262,7 +3262,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3262
3262
|
payload = fastpass(payload, ctx);
|
|
3263
3263
|
if (!catchall)
|
|
3264
3264
|
return payload;
|
|
3265
|
-
return handleCatchall([],
|
|
3265
|
+
return handleCatchall([], input4, payload, ctx, value, inst);
|
|
3266
3266
|
}
|
|
3267
3267
|
return superParse(payload, ctx);
|
|
3268
3268
|
};
|
|
@@ -3424,17 +3424,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3424
3424
|
return map2;
|
|
3425
3425
|
});
|
|
3426
3426
|
inst._zod.parse = (payload, ctx) => {
|
|
3427
|
-
const
|
|
3428
|
-
if (!isObject(
|
|
3427
|
+
const input4 = payload.value;
|
|
3428
|
+
if (!isObject(input4)) {
|
|
3429
3429
|
payload.issues.push({
|
|
3430
3430
|
code: "invalid_type",
|
|
3431
3431
|
expected: "object",
|
|
3432
|
-
input:
|
|
3432
|
+
input: input4,
|
|
3433
3433
|
inst
|
|
3434
3434
|
});
|
|
3435
3435
|
return payload;
|
|
3436
3436
|
}
|
|
3437
|
-
const opt = disc.value.get(
|
|
3437
|
+
const opt = disc.value.get(input4?.[def.discriminator]);
|
|
3438
3438
|
if (opt) {
|
|
3439
3439
|
return opt._zod.run(payload, ctx);
|
|
3440
3440
|
}
|
|
@@ -3446,7 +3446,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3446
3446
|
errors: [],
|
|
3447
3447
|
note: "No matching discriminator",
|
|
3448
3448
|
discriminator: def.discriminator,
|
|
3449
|
-
input:
|
|
3449
|
+
input: input4,
|
|
3450
3450
|
path: [def.discriminator],
|
|
3451
3451
|
inst
|
|
3452
3452
|
});
|
|
@@ -3456,9 +3456,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3456
3456
|
var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
|
|
3457
3457
|
$ZodType.init(inst, def);
|
|
3458
3458
|
inst._zod.parse = (payload, ctx) => {
|
|
3459
|
-
const
|
|
3460
|
-
const left = def.left._zod.run({ value:
|
|
3461
|
-
const right = def.right._zod.run({ value:
|
|
3459
|
+
const input4 = payload.value;
|
|
3460
|
+
const left = def.left._zod.run({ value: input4, issues: [] }, ctx);
|
|
3461
|
+
const right = def.right._zod.run({ value: input4, issues: [] }, ctx);
|
|
3462
3462
|
const async = left instanceof Promise || right instanceof Promise;
|
|
3463
3463
|
if (async) {
|
|
3464
3464
|
return Promise.all([left, right]).then(([left2, right2]) => {
|
|
@@ -3555,10 +3555,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3555
3555
|
$ZodType.init(inst, def);
|
|
3556
3556
|
const items = def.items;
|
|
3557
3557
|
inst._zod.parse = (payload, ctx) => {
|
|
3558
|
-
const
|
|
3559
|
-
if (!Array.isArray(
|
|
3558
|
+
const input4 = payload.value;
|
|
3559
|
+
if (!Array.isArray(input4)) {
|
|
3560
3560
|
payload.issues.push({
|
|
3561
|
-
input:
|
|
3561
|
+
input: input4,
|
|
3562
3562
|
inst,
|
|
3563
3563
|
expected: "tuple",
|
|
3564
3564
|
code: "invalid_type"
|
|
@@ -3570,12 +3570,12 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3570
3570
|
const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
|
|
3571
3571
|
const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
|
|
3572
3572
|
if (!def.rest) {
|
|
3573
|
-
const tooBig =
|
|
3574
|
-
const tooSmall =
|
|
3573
|
+
const tooBig = input4.length > items.length;
|
|
3574
|
+
const tooSmall = input4.length < optStart - 1;
|
|
3575
3575
|
if (tooBig || tooSmall) {
|
|
3576
3576
|
payload.issues.push({
|
|
3577
3577
|
...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
|
|
3578
|
-
input:
|
|
3578
|
+
input: input4,
|
|
3579
3579
|
inst,
|
|
3580
3580
|
origin: "array"
|
|
3581
3581
|
});
|
|
@@ -3585,12 +3585,12 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3585
3585
|
let i = -1;
|
|
3586
3586
|
for (const item of items) {
|
|
3587
3587
|
i++;
|
|
3588
|
-
if (i >=
|
|
3588
|
+
if (i >= input4.length) {
|
|
3589
3589
|
if (i >= optStart)
|
|
3590
3590
|
continue;
|
|
3591
3591
|
}
|
|
3592
3592
|
const result = item._zod.run({
|
|
3593
|
-
value:
|
|
3593
|
+
value: input4[i],
|
|
3594
3594
|
issues: []
|
|
3595
3595
|
}, ctx);
|
|
3596
3596
|
if (result instanceof Promise) {
|
|
@@ -3600,7 +3600,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3600
3600
|
}
|
|
3601
3601
|
}
|
|
3602
3602
|
if (def.rest) {
|
|
3603
|
-
const rest =
|
|
3603
|
+
const rest = input4.slice(items.length);
|
|
3604
3604
|
for (const el of rest) {
|
|
3605
3605
|
i++;
|
|
3606
3606
|
const result = def.rest._zod.run({
|
|
@@ -3628,12 +3628,12 @@ function handleTupleResult(result, final, index) {
|
|
|
3628
3628
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
3629
3629
|
$ZodType.init(inst, def);
|
|
3630
3630
|
inst._zod.parse = (payload, ctx) => {
|
|
3631
|
-
const
|
|
3632
|
-
if (!isPlainObject(
|
|
3631
|
+
const input4 = payload.value;
|
|
3632
|
+
if (!isPlainObject(input4)) {
|
|
3633
3633
|
payload.issues.push({
|
|
3634
3634
|
expected: "record",
|
|
3635
3635
|
code: "invalid_type",
|
|
3636
|
-
input:
|
|
3636
|
+
input: input4,
|
|
3637
3637
|
inst
|
|
3638
3638
|
});
|
|
3639
3639
|
return payload;
|
|
@@ -3646,7 +3646,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3646
3646
|
for (const key of values) {
|
|
3647
3647
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
3648
3648
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
3649
|
-
const result = def.valueType._zod.run({ value:
|
|
3649
|
+
const result = def.valueType._zod.run({ value: input4[key], issues: [] }, ctx);
|
|
3650
3650
|
if (result instanceof Promise) {
|
|
3651
3651
|
proms.push(result.then((result2) => {
|
|
3652
3652
|
if (result2.issues.length) {
|
|
@@ -3663,7 +3663,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3663
3663
|
}
|
|
3664
3664
|
}
|
|
3665
3665
|
let unrecognized;
|
|
3666
|
-
for (const key in
|
|
3666
|
+
for (const key in input4) {
|
|
3667
3667
|
if (!recordKeys.has(key)) {
|
|
3668
3668
|
unrecognized = unrecognized ?? [];
|
|
3669
3669
|
unrecognized.push(key);
|
|
@@ -3672,14 +3672,14 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3672
3672
|
if (unrecognized && unrecognized.length > 0) {
|
|
3673
3673
|
payload.issues.push({
|
|
3674
3674
|
code: "unrecognized_keys",
|
|
3675
|
-
input:
|
|
3675
|
+
input: input4,
|
|
3676
3676
|
inst,
|
|
3677
3677
|
keys: unrecognized
|
|
3678
3678
|
});
|
|
3679
3679
|
}
|
|
3680
3680
|
} else {
|
|
3681
3681
|
payload.value = {};
|
|
3682
|
-
for (const key of Reflect.ownKeys(
|
|
3682
|
+
for (const key of Reflect.ownKeys(input4)) {
|
|
3683
3683
|
if (key === "__proto__")
|
|
3684
3684
|
continue;
|
|
3685
3685
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
@@ -3698,7 +3698,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3698
3698
|
}
|
|
3699
3699
|
if (keyResult.issues.length) {
|
|
3700
3700
|
if (def.mode === "loose") {
|
|
3701
|
-
payload.value[key] =
|
|
3701
|
+
payload.value[key] = input4[key];
|
|
3702
3702
|
} else {
|
|
3703
3703
|
payload.issues.push({
|
|
3704
3704
|
code: "invalid_key",
|
|
@@ -3711,7 +3711,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3711
3711
|
}
|
|
3712
3712
|
continue;
|
|
3713
3713
|
}
|
|
3714
|
-
const result = def.valueType._zod.run({ value:
|
|
3714
|
+
const result = def.valueType._zod.run({ value: input4[key], issues: [] }, ctx);
|
|
3715
3715
|
if (result instanceof Promise) {
|
|
3716
3716
|
proms.push(result.then((result2) => {
|
|
3717
3717
|
if (result2.issues.length) {
|
|
@@ -3736,27 +3736,27 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3736
3736
|
var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
3737
3737
|
$ZodType.init(inst, def);
|
|
3738
3738
|
inst._zod.parse = (payload, ctx) => {
|
|
3739
|
-
const
|
|
3740
|
-
if (!(
|
|
3739
|
+
const input4 = payload.value;
|
|
3740
|
+
if (!(input4 instanceof Map)) {
|
|
3741
3741
|
payload.issues.push({
|
|
3742
3742
|
expected: "map",
|
|
3743
3743
|
code: "invalid_type",
|
|
3744
|
-
input:
|
|
3744
|
+
input: input4,
|
|
3745
3745
|
inst
|
|
3746
3746
|
});
|
|
3747
3747
|
return payload;
|
|
3748
3748
|
}
|
|
3749
3749
|
const proms = [];
|
|
3750
3750
|
payload.value = /* @__PURE__ */ new Map();
|
|
3751
|
-
for (const [key, value] of
|
|
3751
|
+
for (const [key, value] of input4) {
|
|
3752
3752
|
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3753
3753
|
const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
|
|
3754
3754
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
|
3755
3755
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
|
|
3756
|
-
handleMapResult(keyResult2, valueResult2, payload, key,
|
|
3756
|
+
handleMapResult(keyResult2, valueResult2, payload, key, input4, inst, ctx);
|
|
3757
3757
|
}));
|
|
3758
3758
|
} else {
|
|
3759
|
-
handleMapResult(keyResult, valueResult, payload, key,
|
|
3759
|
+
handleMapResult(keyResult, valueResult, payload, key, input4, inst, ctx);
|
|
3760
3760
|
}
|
|
3761
3761
|
}
|
|
3762
3762
|
if (proms.length)
|
|
@@ -3764,7 +3764,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
3764
3764
|
return payload;
|
|
3765
3765
|
};
|
|
3766
3766
|
});
|
|
3767
|
-
function handleMapResult(keyResult, valueResult, final, key,
|
|
3767
|
+
function handleMapResult(keyResult, valueResult, final, key, input4, inst, ctx) {
|
|
3768
3768
|
if (keyResult.issues.length) {
|
|
3769
3769
|
if (propertyKeyTypes.has(typeof key)) {
|
|
3770
3770
|
final.issues.push(...prefixIssues(key, keyResult.issues));
|
|
@@ -3772,7 +3772,7 @@ function handleMapResult(keyResult, valueResult, final, key, input3, inst, ctx)
|
|
|
3772
3772
|
final.issues.push({
|
|
3773
3773
|
code: "invalid_key",
|
|
3774
3774
|
origin: "map",
|
|
3775
|
-
input:
|
|
3775
|
+
input: input4,
|
|
3776
3776
|
inst,
|
|
3777
3777
|
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
|
|
3778
3778
|
});
|
|
@@ -3785,7 +3785,7 @@ function handleMapResult(keyResult, valueResult, final, key, input3, inst, ctx)
|
|
|
3785
3785
|
final.issues.push({
|
|
3786
3786
|
origin: "map",
|
|
3787
3787
|
code: "invalid_element",
|
|
3788
|
-
input:
|
|
3788
|
+
input: input4,
|
|
3789
3789
|
inst,
|
|
3790
3790
|
key,
|
|
3791
3791
|
issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
|
|
@@ -3797,10 +3797,10 @@ function handleMapResult(keyResult, valueResult, final, key, input3, inst, ctx)
|
|
|
3797
3797
|
var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
3798
3798
|
$ZodType.init(inst, def);
|
|
3799
3799
|
inst._zod.parse = (payload, ctx) => {
|
|
3800
|
-
const
|
|
3801
|
-
if (!(
|
|
3800
|
+
const input4 = payload.value;
|
|
3801
|
+
if (!(input4 instanceof Set)) {
|
|
3802
3802
|
payload.issues.push({
|
|
3803
|
-
input:
|
|
3803
|
+
input: input4,
|
|
3804
3804
|
inst,
|
|
3805
3805
|
expected: "set",
|
|
3806
3806
|
code: "invalid_type"
|
|
@@ -3809,7 +3809,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
|
3809
3809
|
}
|
|
3810
3810
|
const proms = [];
|
|
3811
3811
|
payload.value = /* @__PURE__ */ new Set();
|
|
3812
|
-
for (const item of
|
|
3812
|
+
for (const item of input4) {
|
|
3813
3813
|
const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
|
|
3814
3814
|
if (result instanceof Promise) {
|
|
3815
3815
|
proms.push(result.then((result2) => handleSetResult(result2, payload)));
|
|
@@ -3834,14 +3834,14 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
3834
3834
|
inst._zod.values = valuesSet;
|
|
3835
3835
|
inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
|
|
3836
3836
|
inst._zod.parse = (payload, _ctx) => {
|
|
3837
|
-
const
|
|
3838
|
-
if (valuesSet.has(
|
|
3837
|
+
const input4 = payload.value;
|
|
3838
|
+
if (valuesSet.has(input4)) {
|
|
3839
3839
|
return payload;
|
|
3840
3840
|
}
|
|
3841
3841
|
payload.issues.push({
|
|
3842
3842
|
code: "invalid_value",
|
|
3843
3843
|
values,
|
|
3844
|
-
input:
|
|
3844
|
+
input: input4,
|
|
3845
3845
|
inst
|
|
3846
3846
|
});
|
|
3847
3847
|
return payload;
|
|
@@ -3856,14 +3856,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
3856
3856
|
inst._zod.values = values;
|
|
3857
3857
|
inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
|
|
3858
3858
|
inst._zod.parse = (payload, _ctx) => {
|
|
3859
|
-
const
|
|
3860
|
-
if (values.has(
|
|
3859
|
+
const input4 = payload.value;
|
|
3860
|
+
if (values.has(input4)) {
|
|
3861
3861
|
return payload;
|
|
3862
3862
|
}
|
|
3863
3863
|
payload.issues.push({
|
|
3864
3864
|
code: "invalid_value",
|
|
3865
3865
|
values: def.values,
|
|
3866
|
-
input:
|
|
3866
|
+
input: input4,
|
|
3867
3867
|
inst
|
|
3868
3868
|
});
|
|
3869
3869
|
return payload;
|
|
@@ -3872,13 +3872,13 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
3872
3872
|
var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
3873
3873
|
$ZodType.init(inst, def);
|
|
3874
3874
|
inst._zod.parse = (payload, _ctx) => {
|
|
3875
|
-
const
|
|
3876
|
-
if (
|
|
3875
|
+
const input4 = payload.value;
|
|
3876
|
+
if (input4 instanceof File)
|
|
3877
3877
|
return payload;
|
|
3878
3878
|
payload.issues.push({
|
|
3879
3879
|
expected: "file",
|
|
3880
3880
|
code: "invalid_type",
|
|
3881
|
-
input:
|
|
3881
|
+
input: input4,
|
|
3882
3882
|
inst
|
|
3883
3883
|
});
|
|
3884
3884
|
return payload;
|
|
@@ -3905,8 +3905,8 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
3905
3905
|
return payload;
|
|
3906
3906
|
};
|
|
3907
3907
|
});
|
|
3908
|
-
function handleOptionalResult(result,
|
|
3909
|
-
if (result.issues.length &&
|
|
3908
|
+
function handleOptionalResult(result, input4) {
|
|
3909
|
+
if (result.issues.length && input4 === void 0) {
|
|
3910
3910
|
return { issues: [], value: void 0 };
|
|
3911
3911
|
}
|
|
3912
3912
|
return result;
|
|
@@ -4342,20 +4342,20 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
|
4342
4342
|
return payload;
|
|
4343
4343
|
};
|
|
4344
4344
|
inst._zod.check = (payload) => {
|
|
4345
|
-
const
|
|
4346
|
-
const r = def.fn(
|
|
4345
|
+
const input4 = payload.value;
|
|
4346
|
+
const r = def.fn(input4);
|
|
4347
4347
|
if (r instanceof Promise) {
|
|
4348
|
-
return r.then((r2) => handleRefineResult(r2, payload,
|
|
4348
|
+
return r.then((r2) => handleRefineResult(r2, payload, input4, inst));
|
|
4349
4349
|
}
|
|
4350
|
-
handleRefineResult(r, payload,
|
|
4350
|
+
handleRefineResult(r, payload, input4, inst);
|
|
4351
4351
|
return;
|
|
4352
4352
|
};
|
|
4353
4353
|
});
|
|
4354
|
-
function handleRefineResult(result, payload,
|
|
4354
|
+
function handleRefineResult(result, payload, input4, inst) {
|
|
4355
4355
|
if (!result) {
|
|
4356
4356
|
const _iss = {
|
|
4357
4357
|
code: "custom",
|
|
4358
|
-
input:
|
|
4358
|
+
input: input4,
|
|
4359
4359
|
inst,
|
|
4360
4360
|
// incorporates params.error into issue reporting
|
|
4361
4361
|
path: [...inst._zod.def.path ?? []],
|
|
@@ -10665,23 +10665,23 @@ function _overwrite(tx) {
|
|
|
10665
10665
|
}
|
|
10666
10666
|
// @__NO_SIDE_EFFECTS__
|
|
10667
10667
|
function _normalize(form) {
|
|
10668
|
-
return /* @__PURE__ */ _overwrite((
|
|
10668
|
+
return /* @__PURE__ */ _overwrite((input4) => input4.normalize(form));
|
|
10669
10669
|
}
|
|
10670
10670
|
// @__NO_SIDE_EFFECTS__
|
|
10671
10671
|
function _trim() {
|
|
10672
|
-
return /* @__PURE__ */ _overwrite((
|
|
10672
|
+
return /* @__PURE__ */ _overwrite((input4) => input4.trim());
|
|
10673
10673
|
}
|
|
10674
10674
|
// @__NO_SIDE_EFFECTS__
|
|
10675
10675
|
function _toLowerCase() {
|
|
10676
|
-
return /* @__PURE__ */ _overwrite((
|
|
10676
|
+
return /* @__PURE__ */ _overwrite((input4) => input4.toLowerCase());
|
|
10677
10677
|
}
|
|
10678
10678
|
// @__NO_SIDE_EFFECTS__
|
|
10679
10679
|
function _toUpperCase() {
|
|
10680
|
-
return /* @__PURE__ */ _overwrite((
|
|
10680
|
+
return /* @__PURE__ */ _overwrite((input4) => input4.toUpperCase());
|
|
10681
10681
|
}
|
|
10682
10682
|
// @__NO_SIDE_EFFECTS__
|
|
10683
10683
|
function _slugify() {
|
|
10684
|
-
return /* @__PURE__ */ _overwrite((
|
|
10684
|
+
return /* @__PURE__ */ _overwrite((input4) => slugify(input4));
|
|
10685
10685
|
}
|
|
10686
10686
|
// @__NO_SIDE_EFFECTS__
|
|
10687
10687
|
function _array(Class2, element, params) {
|
|
@@ -10986,8 +10986,8 @@ function _stringbool(Classes, _params) {
|
|
|
10986
10986
|
type: "pipe",
|
|
10987
10987
|
in: stringSchema,
|
|
10988
10988
|
out: booleanSchema,
|
|
10989
|
-
transform: ((
|
|
10990
|
-
let data =
|
|
10989
|
+
transform: ((input4, payload) => {
|
|
10990
|
+
let data = input4;
|
|
10991
10991
|
if (params.case !== "sensitive")
|
|
10992
10992
|
data = data.toLowerCase();
|
|
10993
10993
|
if (truthySet.has(data)) {
|
|
@@ -11006,8 +11006,8 @@ function _stringbool(Classes, _params) {
|
|
|
11006
11006
|
return {};
|
|
11007
11007
|
}
|
|
11008
11008
|
}),
|
|
11009
|
-
reverseTransform: ((
|
|
11010
|
-
if (
|
|
11009
|
+
reverseTransform: ((input4, _payload) => {
|
|
11010
|
+
if (input4 === true) {
|
|
11011
11011
|
return truthyArray[0] || "true";
|
|
11012
11012
|
} else {
|
|
11013
11013
|
return falsyArray[0] || "false";
|
|
@@ -11903,9 +11903,9 @@ var allProcessors = {
|
|
|
11903
11903
|
optional: optionalProcessor,
|
|
11904
11904
|
lazy: lazyProcessor
|
|
11905
11905
|
};
|
|
11906
|
-
function toJSONSchema(
|
|
11907
|
-
if ("_idmap" in
|
|
11908
|
-
const registry2 =
|
|
11906
|
+
function toJSONSchema(input4, params) {
|
|
11907
|
+
if ("_idmap" in input4) {
|
|
11908
|
+
const registry2 = input4;
|
|
11909
11909
|
const ctx2 = initializeContext({ ...params, processors: allProcessors });
|
|
11910
11910
|
const defs = {};
|
|
11911
11911
|
for (const entry of registry2._idmap.entries()) {
|
|
@@ -11933,9 +11933,9 @@ function toJSONSchema(input3, params) {
|
|
|
11933
11933
|
return { schemas };
|
|
11934
11934
|
}
|
|
11935
11935
|
const ctx = initializeContext({ ...params, processors: allProcessors });
|
|
11936
|
-
process2(
|
|
11937
|
-
extractDefs(ctx,
|
|
11938
|
-
return finalize(ctx,
|
|
11936
|
+
process2(input4, ctx);
|
|
11937
|
+
extractDefs(ctx, input4);
|
|
11938
|
+
return finalize(ctx, input4);
|
|
11939
11939
|
}
|
|
11940
11940
|
|
|
11941
11941
|
// node_modules/zod/v4/core/json-schema-generator.js
|
|
@@ -16595,14 +16595,14 @@ function getPersona(idOrShortName) {
|
|
|
16595
16595
|
function listPersonas() {
|
|
16596
16596
|
return [...BUILTIN_PERSONAS];
|
|
16597
16597
|
}
|
|
16598
|
-
function resolvePersonaId(
|
|
16599
|
-
const persona = getPersona(
|
|
16598
|
+
function resolvePersonaId(input4) {
|
|
16599
|
+
const persona = getPersona(input4);
|
|
16600
16600
|
if (!persona) {
|
|
16601
16601
|
const available = BUILTIN_PERSONAS.map(
|
|
16602
16602
|
(p) => `${p.shortName} (${p.name})`
|
|
16603
16603
|
).join(", ");
|
|
16604
16604
|
throw new Error(
|
|
16605
|
-
`Unknown persona "${
|
|
16605
|
+
`Unknown persona "${input4}". Available: ${available}`
|
|
16606
16606
|
);
|
|
16607
16607
|
}
|
|
16608
16608
|
return persona.id;
|
|
@@ -16730,6 +16730,11 @@ var DocumentStore = class {
|
|
|
16730
16730
|
const raw = fs5.readFileSync(filePath, "utf-8");
|
|
16731
16731
|
const doc = parseDocument(raw, filePath);
|
|
16732
16732
|
if (doc.frontmatter.id) {
|
|
16733
|
+
if (this.index.has(doc.frontmatter.id)) {
|
|
16734
|
+
console.warn(
|
|
16735
|
+
`[marvin] Duplicate ID "${doc.frontmatter.id}" in ${file2} \u2014 conflicts with existing entry. Run ID repair to fix.`
|
|
16736
|
+
);
|
|
16737
|
+
}
|
|
16733
16738
|
this.index.set(doc.frontmatter.id, doc.frontmatter);
|
|
16734
16739
|
}
|
|
16735
16740
|
}
|
|
@@ -16853,14 +16858,19 @@ var DocumentStore = class {
|
|
|
16853
16858
|
const dirName = this.typeDirs[type];
|
|
16854
16859
|
const dir = path5.join(this.docsDir, dirName);
|
|
16855
16860
|
if (!fs5.existsSync(dir)) return `${prefix}-001`;
|
|
16861
|
+
const idPattern = new RegExp(`^${prefix}-(\\d+)$`);
|
|
16856
16862
|
const files = fs5.readdirSync(dir).filter((f) => f.endsWith(".md"));
|
|
16857
16863
|
let maxNum = 0;
|
|
16858
16864
|
for (const file2 of files) {
|
|
16859
|
-
const
|
|
16865
|
+
const filePath = path5.join(dir, file2);
|
|
16866
|
+
const raw = fs5.readFileSync(filePath, "utf-8");
|
|
16867
|
+
const doc = parseDocument(raw, filePath);
|
|
16868
|
+
const match = doc.frontmatter.id?.match(idPattern);
|
|
16860
16869
|
if (match) {
|
|
16861
16870
|
maxNum = Math.max(maxNum, parseInt(match[1], 10));
|
|
16862
16871
|
}
|
|
16863
16872
|
}
|
|
16873
|
+
maxNum = Math.max(maxNum, files.length);
|
|
16864
16874
|
return `${prefix}-${String(maxNum + 1).padStart(3, "0")}`;
|
|
16865
16875
|
}
|
|
16866
16876
|
counts() {
|
|
@@ -17766,12 +17776,12 @@ var JiraClient = class {
|
|
|
17766
17776
|
);
|
|
17767
17777
|
}
|
|
17768
17778
|
};
|
|
17769
|
-
function createJiraClient() {
|
|
17770
|
-
const host = process.env.JIRA_HOST;
|
|
17771
|
-
const email3 = process.env.JIRA_EMAIL;
|
|
17772
|
-
const apiToken = process.env.JIRA_API_TOKEN;
|
|
17779
|
+
function createJiraClient(jiraUserConfig) {
|
|
17780
|
+
const host = jiraUserConfig?.host ?? process.env.JIRA_HOST;
|
|
17781
|
+
const email3 = jiraUserConfig?.email ?? process.env.JIRA_EMAIL;
|
|
17782
|
+
const apiToken = jiraUserConfig?.apiToken ?? process.env.JIRA_API_TOKEN;
|
|
17773
17783
|
if (!host || !email3 || !apiToken) return null;
|
|
17774
|
-
return new JiraClient({ host, email: email3, apiToken });
|
|
17784
|
+
return { client: new JiraClient({ host, email: email3, apiToken }), host };
|
|
17775
17785
|
}
|
|
17776
17786
|
|
|
17777
17787
|
// src/skills/builtin/jira/tools.ts
|
|
@@ -17781,7 +17791,7 @@ function jiraNotConfiguredError() {
|
|
|
17781
17791
|
content: [
|
|
17782
17792
|
{
|
|
17783
17793
|
type: "text",
|
|
17784
|
-
text:
|
|
17794
|
+
text: 'Jira is not configured. Run "marvin config jira" or set JIRA_HOST, JIRA_EMAIL, and JIRA_API_TOKEN environment variables.'
|
|
17785
17795
|
}
|
|
17786
17796
|
],
|
|
17787
17797
|
isError: true
|
|
@@ -17813,6 +17823,7 @@ function findByJiraKey(store, jiraKey) {
|
|
|
17813
17823
|
return docs.find((d) => d.frontmatter.jiraKey === jiraKey);
|
|
17814
17824
|
}
|
|
17815
17825
|
function createJiraTools(store) {
|
|
17826
|
+
const jiraUserConfig = loadUserConfig().jira;
|
|
17816
17827
|
return [
|
|
17817
17828
|
// --- Local read tools ---
|
|
17818
17829
|
tool19(
|
|
@@ -17883,15 +17894,14 @@ function createJiraTools(store) {
|
|
|
17883
17894
|
key: external_exports.string().describe("Jira issue key (e.g. 'PROJ-123')")
|
|
17884
17895
|
},
|
|
17885
17896
|
async (args) => {
|
|
17886
|
-
const
|
|
17887
|
-
if (!
|
|
17888
|
-
const issue2 = await client.getIssue(args.key);
|
|
17889
|
-
const host = process.env.JIRA_HOST;
|
|
17897
|
+
const jira = createJiraClient(jiraUserConfig);
|
|
17898
|
+
if (!jira) return jiraNotConfiguredError();
|
|
17899
|
+
const issue2 = await jira.client.getIssue(args.key);
|
|
17890
17900
|
const existing = findByJiraKey(store, args.key);
|
|
17891
17901
|
if (existing) {
|
|
17892
17902
|
const fm2 = jiraIssueToFrontmatter(
|
|
17893
17903
|
issue2,
|
|
17894
|
-
host,
|
|
17904
|
+
jira.host,
|
|
17895
17905
|
existing.frontmatter.linkedArtifacts
|
|
17896
17906
|
);
|
|
17897
17907
|
const doc2 = store.update(
|
|
@@ -17908,7 +17918,7 @@ function createJiraTools(store) {
|
|
|
17908
17918
|
]
|
|
17909
17919
|
};
|
|
17910
17920
|
}
|
|
17911
|
-
const fm = jiraIssueToFrontmatter(issue2, host);
|
|
17921
|
+
const fm = jiraIssueToFrontmatter(issue2, jira.host);
|
|
17912
17922
|
const doc = store.create(
|
|
17913
17923
|
JIRA_TYPE,
|
|
17914
17924
|
fm,
|
|
@@ -17932,10 +17942,9 @@ function createJiraTools(store) {
|
|
|
17932
17942
|
maxResults: external_exports.number().optional().describe("Max issues to fetch (default 50)")
|
|
17933
17943
|
},
|
|
17934
17944
|
async (args) => {
|
|
17935
|
-
const
|
|
17936
|
-
if (!
|
|
17937
|
-
const result = await client.searchIssues(args.jql, args.maxResults);
|
|
17938
|
-
const host = process.env.JIRA_HOST;
|
|
17945
|
+
const jira = createJiraClient(jiraUserConfig);
|
|
17946
|
+
if (!jira) return jiraNotConfiguredError();
|
|
17947
|
+
const result = await jira.client.searchIssues(args.jql, args.maxResults);
|
|
17939
17948
|
const created = [];
|
|
17940
17949
|
const updated = [];
|
|
17941
17950
|
for (const issue2 of result.issues) {
|
|
@@ -17943,7 +17952,7 @@ function createJiraTools(store) {
|
|
|
17943
17952
|
if (existing) {
|
|
17944
17953
|
const fm = jiraIssueToFrontmatter(
|
|
17945
17954
|
issue2,
|
|
17946
|
-
host,
|
|
17955
|
+
jira.host,
|
|
17947
17956
|
existing.frontmatter.linkedArtifacts
|
|
17948
17957
|
);
|
|
17949
17958
|
store.update(
|
|
@@ -17953,7 +17962,7 @@ function createJiraTools(store) {
|
|
|
17953
17962
|
);
|
|
17954
17963
|
updated.push(`${existing.frontmatter.id} (${issue2.key})`);
|
|
17955
17964
|
} else {
|
|
17956
|
-
const fm = jiraIssueToFrontmatter(issue2, host);
|
|
17965
|
+
const fm = jiraIssueToFrontmatter(issue2, jira.host);
|
|
17957
17966
|
const doc = store.create(
|
|
17958
17967
|
JIRA_TYPE,
|
|
17959
17968
|
fm,
|
|
@@ -17982,8 +17991,8 @@ function createJiraTools(store) {
|
|
|
17982
17991
|
issueType: external_exports.enum(["Story", "Task", "Bug", "Epic"]).optional().describe("Jira issue type (default: 'Task')")
|
|
17983
17992
|
},
|
|
17984
17993
|
async (args) => {
|
|
17985
|
-
const
|
|
17986
|
-
if (!
|
|
17994
|
+
const jira = createJiraClient(jiraUserConfig);
|
|
17995
|
+
if (!jira) return jiraNotConfiguredError();
|
|
17987
17996
|
const artifact = store.get(args.artifactId);
|
|
17988
17997
|
if (!artifact) {
|
|
17989
17998
|
return {
|
|
@@ -18000,20 +18009,19 @@ function createJiraTools(store) {
|
|
|
18000
18009
|
`Marvin artifact: ${artifact.frontmatter.id} (${artifact.frontmatter.type})`,
|
|
18001
18010
|
`Status: ${artifact.frontmatter.status}`
|
|
18002
18011
|
].join("\n");
|
|
18003
|
-
const jiraResult = await client.createIssue({
|
|
18012
|
+
const jiraResult = await jira.client.createIssue({
|
|
18004
18013
|
project: { key: args.projectKey },
|
|
18005
18014
|
summary: artifact.frontmatter.title,
|
|
18006
18015
|
description,
|
|
18007
18016
|
issuetype: { name: args.issueType ?? "Task" }
|
|
18008
18017
|
});
|
|
18009
|
-
const host = process.env.JIRA_HOST;
|
|
18010
18018
|
const jiDoc = store.create(
|
|
18011
18019
|
JIRA_TYPE,
|
|
18012
18020
|
{
|
|
18013
18021
|
title: artifact.frontmatter.title,
|
|
18014
18022
|
status: "open",
|
|
18015
18023
|
jiraKey: jiraResult.key,
|
|
18016
|
-
jiraUrl: `https://${host}/browse/${jiraResult.key}`,
|
|
18024
|
+
jiraUrl: `https://${jira.host}/browse/${jiraResult.key}`,
|
|
18017
18025
|
issueType: args.issueType ?? "Task",
|
|
18018
18026
|
priority: "Medium",
|
|
18019
18027
|
assignee: "",
|
|
@@ -18042,8 +18050,8 @@ function createJiraTools(store) {
|
|
|
18042
18050
|
id: external_exports.string().describe("Local JI-xxx ID")
|
|
18043
18051
|
},
|
|
18044
18052
|
async (args) => {
|
|
18045
|
-
const
|
|
18046
|
-
if (!
|
|
18053
|
+
const jira = createJiraClient(jiraUserConfig);
|
|
18054
|
+
if (!jira) return jiraNotConfiguredError();
|
|
18047
18055
|
const doc = store.get(args.id);
|
|
18048
18056
|
if (!doc || doc.frontmatter.type !== JIRA_TYPE) {
|
|
18049
18057
|
return {
|
|
@@ -18054,15 +18062,14 @@ function createJiraTools(store) {
|
|
|
18054
18062
|
};
|
|
18055
18063
|
}
|
|
18056
18064
|
const jiraKey = doc.frontmatter.jiraKey;
|
|
18057
|
-
await client.updateIssue(jiraKey, {
|
|
18065
|
+
await jira.client.updateIssue(jiraKey, {
|
|
18058
18066
|
summary: doc.frontmatter.title,
|
|
18059
18067
|
description: doc.content || void 0
|
|
18060
18068
|
});
|
|
18061
|
-
const issue2 = await client.getIssue(jiraKey);
|
|
18062
|
-
const host = process.env.JIRA_HOST;
|
|
18069
|
+
const issue2 = await jira.client.getIssue(jiraKey);
|
|
18063
18070
|
const fm = jiraIssueToFrontmatter(
|
|
18064
18071
|
issue2,
|
|
18065
|
-
host,
|
|
18072
|
+
jira.host,
|
|
18066
18073
|
doc.frontmatter.linkedArtifacts
|
|
18067
18074
|
);
|
|
18068
18075
|
store.update(args.id, fm, issue2.fields.description ?? "");
|
|
@@ -18521,10 +18528,10 @@ Marvin \u2014 ${persona.name}
|
|
|
18521
18528
|
});
|
|
18522
18529
|
try {
|
|
18523
18530
|
while (true) {
|
|
18524
|
-
const
|
|
18531
|
+
const input4 = await new Promise((resolve5) => {
|
|
18525
18532
|
rl.question(chalk2.green("\nYou: "), resolve5);
|
|
18526
18533
|
});
|
|
18527
|
-
const trimmed =
|
|
18534
|
+
const trimmed = input4.trim();
|
|
18528
18535
|
if (trimmed === "exit" || trimmed === "quit") {
|
|
18529
18536
|
break;
|
|
18530
18537
|
}
|
|
@@ -18831,23 +18838,29 @@ Project: ${project.config.name}
|
|
|
18831
18838
|
|
|
18832
18839
|
// src/cli/commands/config.ts
|
|
18833
18840
|
import chalk6 from "chalk";
|
|
18834
|
-
import { password } from "@inquirer/prompts";
|
|
18841
|
+
import { input as input2, password } from "@inquirer/prompts";
|
|
18835
18842
|
async function configCommand(key, value) {
|
|
18836
18843
|
if (key === "api-key") {
|
|
18837
18844
|
return setApiKey();
|
|
18838
18845
|
}
|
|
18846
|
+
if (key === "jira") {
|
|
18847
|
+
return setJira();
|
|
18848
|
+
}
|
|
18839
18849
|
if (!key) {
|
|
18840
18850
|
const config2 = loadUserConfig();
|
|
18841
18851
|
console.log(chalk6.bold("\nUser Configuration:\n"));
|
|
18842
18852
|
console.log(
|
|
18843
|
-
` API Key:
|
|
18853
|
+
` API Key: ${config2.apiKey ? chalk6.green("configured") : chalk6.red("not set")}`
|
|
18844
18854
|
);
|
|
18845
18855
|
console.log(
|
|
18846
|
-
` Default Model:
|
|
18856
|
+
` Default Model: ${config2.defaultModel ?? chalk6.dim("(default: claude-sonnet-4-5-20250929)")}`
|
|
18847
18857
|
);
|
|
18848
18858
|
console.log(
|
|
18849
18859
|
` Default Persona: ${config2.defaultPersona ?? chalk6.dim("(default: product-owner)")}`
|
|
18850
18860
|
);
|
|
18861
|
+
console.log(
|
|
18862
|
+
` Jira: ${config2.jira?.host ? chalk6.green(`configured (${config2.jira.host})`) : chalk6.red("not set")}`
|
|
18863
|
+
);
|
|
18851
18864
|
console.log();
|
|
18852
18865
|
return;
|
|
18853
18866
|
}
|
|
@@ -18880,6 +18893,37 @@ async function configCommand(key, value) {
|
|
|
18880
18893
|
}
|
|
18881
18894
|
}
|
|
18882
18895
|
}
|
|
18896
|
+
async function setJira() {
|
|
18897
|
+
const host = await input2({
|
|
18898
|
+
message: "Jira host (e.g. mycompany.atlassian.net):"
|
|
18899
|
+
});
|
|
18900
|
+
if (!host.trim()) {
|
|
18901
|
+
console.log(chalk6.red("No host provided."));
|
|
18902
|
+
return;
|
|
18903
|
+
}
|
|
18904
|
+
const email3 = await input2({
|
|
18905
|
+
message: "Jira email:"
|
|
18906
|
+
});
|
|
18907
|
+
if (!email3.trim()) {
|
|
18908
|
+
console.log(chalk6.red("No email provided."));
|
|
18909
|
+
return;
|
|
18910
|
+
}
|
|
18911
|
+
const apiToken = await password({
|
|
18912
|
+
message: "Jira API token:"
|
|
18913
|
+
});
|
|
18914
|
+
if (!apiToken.trim()) {
|
|
18915
|
+
console.log(chalk6.red("No API token provided."));
|
|
18916
|
+
return;
|
|
18917
|
+
}
|
|
18918
|
+
const config2 = loadUserConfig();
|
|
18919
|
+
config2.jira = {
|
|
18920
|
+
host: host.trim(),
|
|
18921
|
+
email: email3.trim(),
|
|
18922
|
+
apiToken: apiToken.trim()
|
|
18923
|
+
};
|
|
18924
|
+
saveUserConfig(config2);
|
|
18925
|
+
console.log(chalk6.green("Jira credentials saved."));
|
|
18926
|
+
}
|
|
18883
18927
|
async function setApiKey() {
|
|
18884
18928
|
const apiKey = await password({
|
|
18885
18929
|
message: "Enter your Anthropic API key:"
|
|
@@ -19193,7 +19237,7 @@ ${pending} file${pending === 1 ? "" : "s"} ready to process. Run "marvin ingest
|
|
|
19193
19237
|
// src/cli/commands/sync.ts
|
|
19194
19238
|
import chalk9 from "chalk";
|
|
19195
19239
|
import ora3 from "ora";
|
|
19196
|
-
import { input as
|
|
19240
|
+
import { input as input3 } from "@inquirer/prompts";
|
|
19197
19241
|
|
|
19198
19242
|
// src/git/repository.ts
|
|
19199
19243
|
import * as path12 from "path";
|
|
@@ -19400,7 +19444,7 @@ async function syncInitCommand(opts) {
|
|
|
19400
19444
|
const git = new MarvinGit(project.marvinDir);
|
|
19401
19445
|
let remote = opts.remote;
|
|
19402
19446
|
if (!remote) {
|
|
19403
|
-
remote = await
|
|
19447
|
+
remote = await input3({
|
|
19404
19448
|
message: "Remote repository URL (leave blank to skip):"
|
|
19405
19449
|
}) || void 0;
|
|
19406
19450
|
}
|
|
@@ -21366,7 +21410,7 @@ function createProgram() {
|
|
|
21366
21410
|
const program2 = new Command();
|
|
21367
21411
|
program2.name("marvin").description(
|
|
21368
21412
|
"AI-powered product development assistant with Product Owner, Delivery Manager, and Technical Lead personas"
|
|
21369
|
-
).version("0.2.
|
|
21413
|
+
).version("0.2.10");
|
|
21370
21414
|
program2.command("init").description("Initialize a new Marvin project in the current directory").action(async () => {
|
|
21371
21415
|
await initCommand();
|
|
21372
21416
|
});
|