llmz 0.0.43 → 0.0.45
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/{chunk-KED57HR5.cjs → chunk-2NEOPXCS.cjs} +14 -14
- package/dist/{chunk-WHNOR4ZU.cjs → chunk-4VYDQ3VF.cjs} +7 -7
- package/dist/{chunk-KMZDFWYZ.cjs → chunk-54G63644.cjs} +3 -3
- package/dist/{chunk-7WRN4E42.js → chunk-5XC6ZMS5.js} +197 -18
- package/dist/{chunk-G3LSBWJT.js → chunk-5YXGNMER.js} +2 -2
- package/dist/{chunk-TOLKC56V.js → chunk-7HBJXJ6W.js} +6 -6
- package/dist/{chunk-VPTFUOIK.js → chunk-E5YW5YQN.js} +2 -2
- package/dist/{chunk-ZORRILUV.js → chunk-EKXZXQJB.js} +1 -1
- package/dist/{chunk-3G3BS5IA.cjs → chunk-F4OZHUMS.cjs} +9 -9
- package/dist/{chunk-GZPN7RGH.cjs → chunk-I3WYQ7CA.cjs} +2 -2
- package/dist/{chunk-4NQXHRJ2.cjs → chunk-K4IVNLQG.cjs} +28 -28
- package/dist/{chunk-6PIIXJNI.js → chunk-L2ZDZKCB.js} +3 -3
- package/dist/{chunk-UQOBUJIQ.cjs → chunk-RKKRSBX3.cjs} +197 -18
- package/dist/{chunk-5FWOHMO4.cjs → chunk-RMIS25AA.cjs} +25 -25
- package/dist/{chunk-ZEGD4BQJ.cjs → chunk-SJWWH25O.cjs} +59 -42
- package/dist/{chunk-RUOMTFUI.cjs → chunk-SZLX27VX.cjs} +18 -18
- package/dist/{chunk-QY2TRWGK.cjs → chunk-TLOQBZKW.cjs} +3 -3
- package/dist/{chunk-HA52ORZL.js → chunk-UOENUUUV.js} +1 -1
- package/dist/{chunk-ORQP26SZ.js → chunk-UOPTKXLE.js} +1 -1
- package/dist/{chunk-3JYCCI4S.js → chunk-VWQUGDHE.js} +1 -1
- package/dist/{chunk-B42FGPCX.js → chunk-YV5N57D3.js} +1 -1
- package/dist/{chunk-V6VEBUMU.js → chunk-ZSZTPETU.js} +24 -7
- package/dist/{component-EOMTLA64.js → component-GNYIA77X.js} +3 -3
- package/dist/component-J72CVOKY.cjs +18 -0
- package/dist/dual-modes-5CQEVSIG.js +12 -0
- package/dist/dual-modes-A2JSHXJU.cjs +12 -0
- package/dist/exit-56DISPLS.js +8 -0
- package/dist/exit-OOGJ3TAS.cjs +8 -0
- package/dist/index.cjs +48 -48
- package/dist/index.js +21 -21
- package/dist/jsx-ENFGHP6S.cjs +13 -0
- package/dist/{jsx-AEHVFB3L.js → jsx-PCXQVMLU.js} +2 -2
- package/dist/{llmz-O536FBHV.js → llmz-MIV5CZU5.js} +11 -11
- package/dist/{llmz-ACSZOYZP.cjs → llmz-TR7SDCOC.cjs} +29 -29
- package/dist/tool-5JXTEQNW.js +11 -0
- package/dist/tool-NAGC3ZMN.cjs +11 -0
- package/dist/truncator-KI6BAAIH.cjs +10 -0
- package/dist/{truncator-BSP6PQPC.js → truncator-WDLDMAE7.js} +3 -3
- package/dist/typings-SNGR4WYT.cjs +10 -0
- package/dist/{typings-AQGJAMVH.js → typings-ZO63Z4TF.js} +3 -3
- package/dist/utils-BZUEJT4W.cjs +39 -0
- package/dist/{utils-RQHQ2KOG.js → utils-D3J443FA.js} +2 -2
- package/dist/{vm-Y3WY2627.js → vm-5IM44JHK.js} +3 -3
- package/dist/vm-VYYSPUQ5.cjs +10 -0
- package/package.json +3 -3
- package/dist/component-AAEMNCHB.cjs +0 -18
- package/dist/dual-modes-KBMP2AAH.js +0 -12
- package/dist/dual-modes-WCJ3HAB3.cjs +0 -12
- package/dist/exit-XAYKJ6TR.cjs +0 -8
- package/dist/exit-YLO7BY7Z.js +0 -8
- package/dist/jsx-AJAXBWFE.cjs +0 -13
- package/dist/tool-M2N7SKNZ.js +0 -11
- package/dist/tool-MRVFOE5N.cjs +0 -11
- package/dist/truncator-W3NXBLYJ.cjs +0 -10
- package/dist/typings-7C2RXO75.cjs +0 -10
- package/dist/utils-L5QAQXV2.cjs +0 -39
- package/dist/vm-VFORKC54.cjs +0 -10
|
@@ -5,7 +5,7 @@ var _chunkPK72FAKDcjs = require('./chunk-PK72FAKD.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk4VYDQ3VFcjs = require('./chunk-4VYDQ3VF.cjs');
|
|
9
9
|
|
|
10
10
|
// src/typings.ts
|
|
11
11
|
var _zui = require('@bpinternal/zui');
|
|
@@ -111,7 +111,7 @@ async function sUnwrapZod(schema, options) {
|
|
|
111
111
|
parent: schema
|
|
112
112
|
};
|
|
113
113
|
if (schema instanceof Declaration) {
|
|
114
|
-
const description =
|
|
114
|
+
const description = _chunk4VYDQ3VFcjs.getMultilineComment.call(void 0, schema.schema.description);
|
|
115
115
|
const withoutDesc = schema.schema.describe("");
|
|
116
116
|
const typings = await sUnwrapZodRecursive(withoutDesc, { ...newOptions, declaration: true });
|
|
117
117
|
const isLargeDeclaration = typings.split("\n").length >= LARGE_DECLARATION_LINES;
|
|
@@ -132,7 +132,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
132
132
|
const optionalToken = schema.key.endsWith("?") ? "" : "?";
|
|
133
133
|
return sUnwrapZodRecursive(new KeyValue(schema.key + optionalToken, innerType), newOptions);
|
|
134
134
|
}
|
|
135
|
-
const description =
|
|
135
|
+
const description = _chunk4VYDQ3VFcjs.getMultilineComment.call(void 0, schema.value._def.description || schema.value.description);
|
|
136
136
|
const delimiter = (description == null ? void 0 : description.trim().length) > 0 ? "\n" : "";
|
|
137
137
|
const withoutDesc = schema.value.describe("");
|
|
138
138
|
return `${delimiter}${description}${delimiter}${schema.key}: ${await sUnwrapZodRecursive(withoutDesc, newOptions)}${delimiter}`;
|
|
@@ -143,7 +143,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
143
143
|
for (let i = 0; i < schema.schema.items.length; i++) {
|
|
144
144
|
const argName = _nullishCoalesce(((_b = (_a = schema.schema.items[i]) == null ? void 0 : _a.ui) == null ? void 0 : _b.title), () => ( `arg${i}`));
|
|
145
145
|
const item = schema.schema.items[i];
|
|
146
|
-
args += `${await sUnwrapZodRecursive(new KeyValue(
|
|
146
|
+
args += `${await sUnwrapZodRecursive(new KeyValue(_chunk4VYDQ3VFcjs.toPropertyKey.call(void 0, argName), item), newOptions)}, `;
|
|
147
147
|
}
|
|
148
148
|
return args;
|
|
149
149
|
}
|
|
@@ -178,7 +178,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
178
178
|
return `Promise<${await sUnwrapZodRecursive(schema.unwrap(), newOptions)}>`;
|
|
179
179
|
}
|
|
180
180
|
if (schema instanceof _zui.z.ZodFunction) {
|
|
181
|
-
const description =
|
|
181
|
+
const description = _chunk4VYDQ3VFcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
182
182
|
const input = await sUnwrapZodRecursive(new FnParameters(schema._def.args), newOptions);
|
|
183
183
|
const output = await sUnwrapZodRecursive(new FnReturn(schema._def.returns), newOptions);
|
|
184
184
|
if (options == null ? void 0 : options.declaration) {
|
|
@@ -196,7 +196,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
196
196
|
return `Array<${item}>`;
|
|
197
197
|
}
|
|
198
198
|
if (schema instanceof _zui.z.ZodEnum) {
|
|
199
|
-
const values = schema._def.values.map(
|
|
199
|
+
const values = schema._def.values.map(_chunk4VYDQ3VFcjs.escapeString);
|
|
200
200
|
return values.join(" | ");
|
|
201
201
|
}
|
|
202
202
|
if (schema instanceof _zui.z.ZodTuple) {
|
|
@@ -221,7 +221,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
221
221
|
const props = await Promise.all(
|
|
222
222
|
Object.entries(schema.shape).map(async ([key, value]) => {
|
|
223
223
|
if (value instanceof _zui.z.Schema) {
|
|
224
|
-
return sUnwrapZodRecursive(new KeyValue(
|
|
224
|
+
return sUnwrapZodRecursive(new KeyValue(_chunk4VYDQ3VFcjs.toPropertyKey.call(void 0, key), value), newOptions);
|
|
225
225
|
}
|
|
226
226
|
return `${key}: unknown`;
|
|
227
227
|
})
|
|
@@ -229,11 +229,11 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
229
229
|
return `{ ${props.join("; ")} }`;
|
|
230
230
|
}
|
|
231
231
|
if (schema instanceof _zui.z.ZodString) {
|
|
232
|
-
const description =
|
|
232
|
+
const description = _chunk4VYDQ3VFcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
233
233
|
return `${description} string`.trim();
|
|
234
234
|
}
|
|
235
235
|
if (schema instanceof _zui.z.ZodUnion) {
|
|
236
|
-
const description =
|
|
236
|
+
const description = _chunk4VYDQ3VFcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
237
237
|
const options2 = await Promise.all(
|
|
238
238
|
schema.options.map(async (option) => {
|
|
239
239
|
return sUnwrapZodRecursive(option, newOptions);
|
|
@@ -243,16 +243,16 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
243
243
|
${options2.join(" | ")}`;
|
|
244
244
|
}
|
|
245
245
|
if (schema instanceof _zui.z.ZodLiteral) {
|
|
246
|
-
const description =
|
|
246
|
+
const description = _chunk4VYDQ3VFcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
247
247
|
return `${description}
|
|
248
|
-
${typeof schema.value === "string" ?
|
|
248
|
+
${typeof schema.value === "string" ? _chunk4VYDQ3VFcjs.escapeString.call(void 0, schema.value) : schema.value}`.trim();
|
|
249
249
|
}
|
|
250
250
|
if (schema instanceof _zui.z.ZodNumber) {
|
|
251
|
-
const description =
|
|
251
|
+
const description = _chunk4VYDQ3VFcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
252
252
|
return `${description} number`.trim();
|
|
253
253
|
}
|
|
254
254
|
if (schema instanceof _zui.z.ZodBoolean) {
|
|
255
|
-
const description =
|
|
255
|
+
const description = _chunk4VYDQ3VFcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
256
256
|
return `${description} boolean`.trim();
|
|
257
257
|
}
|
|
258
258
|
if (schema instanceof _zui.z.ZodCatch) {
|
|
@@ -262,7 +262,7 @@ ${typeof schema.value === "string" ? _chunkWHNOR4ZUcjs.escapeString.call(void 0,
|
|
|
262
262
|
return sUnwrapZodRecursive(schema._def.getter(), newOptions);
|
|
263
263
|
}
|
|
264
264
|
if (schema instanceof _zui.z.ZodRecord) {
|
|
265
|
-
const description =
|
|
265
|
+
const description = _chunk4VYDQ3VFcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
266
266
|
const keyType = await sUnwrapZodRecursive(schema._def.keyType, newOptions);
|
|
267
267
|
const valueType = await sUnwrapZodRecursive(schema._def.valueType, newOptions);
|
|
268
268
|
return `${description} { [key: (${keyType})]: (${valueType}) }`;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkRKKRSBX3cjs = require('./chunk-RKKRSBX3.cjs');
|
|
8
8
|
|
|
9
9
|
// src/utils.ts
|
|
10
10
|
var _thicktoken = require('@bpinternal/thicktoken');
|
|
@@ -98,12 +98,12 @@ ${descLines.map(ensureLineStartsWithAsterisk).map(escapeCommentEnd).join("\n")}
|
|
|
98
98
|
*/`;
|
|
99
99
|
};
|
|
100
100
|
var toValidFunctionName = (str) => {
|
|
101
|
-
let name =
|
|
101
|
+
let name = _chunkRKKRSBX3cjs.deburr_default.call(void 0, str);
|
|
102
102
|
name = name.replace(/[^a-zA-Z0-9_$]/g, "");
|
|
103
103
|
if (!/^[a-zA-Z_$]/.test(name)) {
|
|
104
104
|
name = `_${name}`;
|
|
105
105
|
}
|
|
106
|
-
return
|
|
106
|
+
return _chunkRKKRSBX3cjs.camelCase_default.call(void 0, name);
|
|
107
107
|
};
|
|
108
108
|
var awaitObject = async (obj) => {
|
|
109
109
|
const newObj = { ...obj };
|
|
@@ -114,7 +114,7 @@ var awaitObject = async (obj) => {
|
|
|
114
114
|
for (const [key, value] of Object.entries(obj)) {
|
|
115
115
|
if (value instanceof Promise) {
|
|
116
116
|
promises.push(setProp(key, value));
|
|
117
|
-
} else if (
|
|
117
|
+
} else if (_chunkRKKRSBX3cjs.isPlainObject_default.call(void 0, value)) {
|
|
118
118
|
promises.push(setProp(key, await awaitObject(value)));
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -122,8 +122,8 @@ var awaitObject = async (obj) => {
|
|
|
122
122
|
return newObj;
|
|
123
123
|
};
|
|
124
124
|
var toValidObjectName = (str) => {
|
|
125
|
-
let name =
|
|
126
|
-
name = name.split(/[^a-zA-Z0-9_$]/g).map(
|
|
125
|
+
let name = _chunkRKKRSBX3cjs.deburr_default.call(void 0, str);
|
|
126
|
+
name = name.split(/[^a-zA-Z0-9_$]/g).map(_chunkRKKRSBX3cjs.startCase_default).join("");
|
|
127
127
|
if (!/^[a-zA-Z_$]/.test(name)) {
|
|
128
128
|
name = `_${name}`;
|
|
129
129
|
}
|
|
@@ -136,7 +136,7 @@ var stripInvalidIdentifiers = (object) => {
|
|
|
136
136
|
if (Array.isArray(object)) {
|
|
137
137
|
return object.map(stripInvalidIdentifiers);
|
|
138
138
|
}
|
|
139
|
-
return
|
|
139
|
+
return _chunkRKKRSBX3cjs.pickBy_default.call(void 0, object, (__, key) => Identifier.safeParse(key).success);
|
|
140
140
|
};
|
|
141
141
|
var convertObjectToZuiLiterals = (obj, nested = false) => {
|
|
142
142
|
if (typeof obj === "string") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkRKKRSBX3cjs = require('./chunk-RKKRSBX3.cjs');
|
|
5
5
|
|
|
6
6
|
// src/jsx.ts
|
|
7
7
|
var _zui = require('@bpinternal/zui');
|
|
@@ -13,9 +13,9 @@ function isJsxComponent(type, component) {
|
|
|
13
13
|
}
|
|
14
14
|
var createJsxComponent = (props) => ({
|
|
15
15
|
__jsx: true,
|
|
16
|
-
type:
|
|
16
|
+
type: _chunkRKKRSBX3cjs.isString_default.call(void 0, props.type) ? props.type.toUpperCase() : "__unknown__",
|
|
17
17
|
children: Array.isArray(props.children) ? props.children : props.children ? [props.children] : [],
|
|
18
|
-
props:
|
|
18
|
+
props: _chunkRKKRSBX3cjs.isPlainObject_default.call(void 0, props.props) ? props.props : {}
|
|
19
19
|
});
|
|
20
20
|
var Jsx = _zui.z.custom(
|
|
21
21
|
(value) => isAnyJsxComponent(value),
|
|
@@ -1185,8 +1185,8 @@ function isKeyable(value) {
|
|
|
1185
1185
|
var isKeyable_default = isKeyable;
|
|
1186
1186
|
|
|
1187
1187
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js
|
|
1188
|
-
function getMapData(
|
|
1189
|
-
var data =
|
|
1188
|
+
function getMapData(map2, key) {
|
|
1189
|
+
var data = map2.__data__;
|
|
1190
1190
|
return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
1191
1191
|
}
|
|
1192
1192
|
var getMapData_default = getMapData;
|
|
@@ -1364,9 +1364,9 @@ var Uint8Array2 = root_default.Uint8Array;
|
|
|
1364
1364
|
var Uint8Array_default = Uint8Array2;
|
|
1365
1365
|
|
|
1366
1366
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapToArray.js
|
|
1367
|
-
function mapToArray(
|
|
1368
|
-
var index = -1, result = Array(
|
|
1369
|
-
|
|
1367
|
+
function mapToArray(map2) {
|
|
1368
|
+
var index = -1, result = Array(map2.size);
|
|
1369
|
+
map2.forEach(function(value, key) {
|
|
1370
1370
|
result[++index] = [key, value];
|
|
1371
1371
|
});
|
|
1372
1372
|
return result;
|
|
@@ -2760,6 +2760,33 @@ function uniq(array) {
|
|
|
2760
2760
|
}
|
|
2761
2761
|
var uniq_default = uniq;
|
|
2762
2762
|
|
|
2763
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toFinite.js
|
|
2764
|
+
var INFINITY4 = 1 / 0;
|
|
2765
|
+
var MAX_INTEGER = 17976931348623157e292;
|
|
2766
|
+
function toFinite(value) {
|
|
2767
|
+
if (!value) {
|
|
2768
|
+
return value === 0 ? value : 0;
|
|
2769
|
+
}
|
|
2770
|
+
value = toNumber_default(value);
|
|
2771
|
+
if (value === INFINITY4 || value === -INFINITY4) {
|
|
2772
|
+
var sign = value < 0 ? -1 : 1;
|
|
2773
|
+
return sign * MAX_INTEGER;
|
|
2774
|
+
}
|
|
2775
|
+
return value === value ? value : 0;
|
|
2776
|
+
}
|
|
2777
|
+
var toFinite_default = toFinite;
|
|
2778
|
+
|
|
2779
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toInteger.js
|
|
2780
|
+
function toInteger(value) {
|
|
2781
|
+
var result = toFinite_default(value), remainder = result % 1;
|
|
2782
|
+
return result === result ? remainder ? result - remainder : result : 0;
|
|
2783
|
+
}
|
|
2784
|
+
var toInteger_default = toInteger;
|
|
2785
|
+
|
|
2786
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_metaMap.js
|
|
2787
|
+
var metaMap = WeakMap_default && new WeakMap_default();
|
|
2788
|
+
var metaMap_default = metaMap;
|
|
2789
|
+
|
|
2763
2790
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseLodash.js
|
|
2764
2791
|
function baseLodash() {
|
|
2765
2792
|
}
|
|
@@ -2780,6 +2807,31 @@ LazyWrapper.prototype = baseCreate_default(baseLodash_default.prototype);
|
|
|
2780
2807
|
LazyWrapper.prototype.constructor = LazyWrapper;
|
|
2781
2808
|
var LazyWrapper_default = LazyWrapper;
|
|
2782
2809
|
|
|
2810
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getData.js
|
|
2811
|
+
var getData = !metaMap_default ? noop_default : function(func) {
|
|
2812
|
+
return metaMap_default.get(func);
|
|
2813
|
+
};
|
|
2814
|
+
var getData_default = getData;
|
|
2815
|
+
|
|
2816
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_realNames.js
|
|
2817
|
+
var realNames = {};
|
|
2818
|
+
var realNames_default = realNames;
|
|
2819
|
+
|
|
2820
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getFuncName.js
|
|
2821
|
+
var objectProto18 = Object.prototype;
|
|
2822
|
+
var hasOwnProperty15 = objectProto18.hasOwnProperty;
|
|
2823
|
+
function getFuncName(func) {
|
|
2824
|
+
var result = func.name + "", array = realNames_default[result], length = hasOwnProperty15.call(realNames_default, result) ? array.length : 0;
|
|
2825
|
+
while (length--) {
|
|
2826
|
+
var data = array[length], otherFunc = data.func;
|
|
2827
|
+
if (otherFunc == null || otherFunc == func) {
|
|
2828
|
+
return data.name;
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
return result;
|
|
2832
|
+
}
|
|
2833
|
+
var getFuncName_default = getFuncName;
|
|
2834
|
+
|
|
2783
2835
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_LodashWrapper.js
|
|
2784
2836
|
function LodashWrapper(value, chainAll) {
|
|
2785
2837
|
this.__wrapped__ = value;
|
|
@@ -2806,14 +2858,14 @@ function wrapperClone(wrapper) {
|
|
|
2806
2858
|
var wrapperClone_default = wrapperClone;
|
|
2807
2859
|
|
|
2808
2860
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/wrapperLodash.js
|
|
2809
|
-
var
|
|
2810
|
-
var
|
|
2861
|
+
var objectProto19 = Object.prototype;
|
|
2862
|
+
var hasOwnProperty16 = objectProto19.hasOwnProperty;
|
|
2811
2863
|
function lodash(value) {
|
|
2812
2864
|
if (isObjectLike_default(value) && !isArray_default(value) && !(value instanceof LazyWrapper_default)) {
|
|
2813
2865
|
if (value instanceof LodashWrapper_default) {
|
|
2814
2866
|
return value;
|
|
2815
2867
|
}
|
|
2816
|
-
if (
|
|
2868
|
+
if (hasOwnProperty16.call(value, "__wrapped__")) {
|
|
2817
2869
|
return wrapperClone_default(value);
|
|
2818
2870
|
}
|
|
2819
2871
|
}
|
|
@@ -2823,13 +2875,19 @@ lodash.prototype = baseLodash_default.prototype;
|
|
|
2823
2875
|
lodash.prototype.constructor = lodash;
|
|
2824
2876
|
var wrapperLodash_default = lodash;
|
|
2825
2877
|
|
|
2826
|
-
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/
|
|
2827
|
-
function
|
|
2828
|
-
var
|
|
2829
|
-
|
|
2830
|
-
|
|
2878
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isLaziable.js
|
|
2879
|
+
function isLaziable(func) {
|
|
2880
|
+
var funcName = getFuncName_default(func), other = wrapperLodash_default[funcName];
|
|
2881
|
+
if (typeof other != "function" || !(funcName in LazyWrapper_default.prototype)) {
|
|
2882
|
+
return false;
|
|
2883
|
+
}
|
|
2884
|
+
if (func === other) {
|
|
2885
|
+
return true;
|
|
2886
|
+
}
|
|
2887
|
+
var data = getData_default(other);
|
|
2888
|
+
return !!data && func === data[0];
|
|
2831
2889
|
}
|
|
2832
|
-
var
|
|
2890
|
+
var isLaziable_default = isLaziable;
|
|
2833
2891
|
|
|
2834
2892
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeep.js
|
|
2835
2893
|
var CLONE_DEEP_FLAG3 = 1;
|
|
@@ -2893,10 +2951,10 @@ function createAggregator(setter, initializer) {
|
|
|
2893
2951
|
var createAggregator_default = createAggregator;
|
|
2894
2952
|
|
|
2895
2953
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/countBy.js
|
|
2896
|
-
var
|
|
2897
|
-
var
|
|
2954
|
+
var objectProto20 = Object.prototype;
|
|
2955
|
+
var hasOwnProperty17 = objectProto20.hasOwnProperty;
|
|
2898
2956
|
var countBy = createAggregator_default(function(result, value, key) {
|
|
2899
|
-
if (
|
|
2957
|
+
if (hasOwnProperty17.call(result, key)) {
|
|
2900
2958
|
++result[key];
|
|
2901
2959
|
} else {
|
|
2902
2960
|
baseAssignValue_default(result, key, 1);
|
|
@@ -2904,6 +2962,45 @@ var countBy = createAggregator_default(function(result, value, key) {
|
|
|
2904
2962
|
});
|
|
2905
2963
|
var countBy_default = countBy;
|
|
2906
2964
|
|
|
2965
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToPairs.js
|
|
2966
|
+
function baseToPairs(object, props) {
|
|
2967
|
+
return arrayMap_default(props, function(key) {
|
|
2968
|
+
return [key, object[key]];
|
|
2969
|
+
});
|
|
2970
|
+
}
|
|
2971
|
+
var baseToPairs_default = baseToPairs;
|
|
2972
|
+
|
|
2973
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToPairs.js
|
|
2974
|
+
function setToPairs(set) {
|
|
2975
|
+
var index = -1, result = Array(set.size);
|
|
2976
|
+
set.forEach(function(value) {
|
|
2977
|
+
result[++index] = [value, value];
|
|
2978
|
+
});
|
|
2979
|
+
return result;
|
|
2980
|
+
}
|
|
2981
|
+
var setToPairs_default = setToPairs;
|
|
2982
|
+
|
|
2983
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createToPairs.js
|
|
2984
|
+
var mapTag8 = "[object Map]";
|
|
2985
|
+
var setTag8 = "[object Set]";
|
|
2986
|
+
function createToPairs(keysFunc) {
|
|
2987
|
+
return function(object) {
|
|
2988
|
+
var tag = getTag_default(object);
|
|
2989
|
+
if (tag == mapTag8) {
|
|
2990
|
+
return mapToArray_default(object);
|
|
2991
|
+
}
|
|
2992
|
+
if (tag == setTag8) {
|
|
2993
|
+
return setToPairs_default(object);
|
|
2994
|
+
}
|
|
2995
|
+
return baseToPairs_default(object, keysFunc(object));
|
|
2996
|
+
};
|
|
2997
|
+
}
|
|
2998
|
+
var createToPairs_default = createToPairs;
|
|
2999
|
+
|
|
3000
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toPairs.js
|
|
3001
|
+
var toPairs = createToPairs_default(keys_default);
|
|
3002
|
+
var toPairs_default = toPairs;
|
|
3003
|
+
|
|
2907
3004
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFilter.js
|
|
2908
3005
|
function baseFilter(collection, predicate) {
|
|
2909
3006
|
var result = [];
|
|
@@ -2933,6 +3030,74 @@ function baseMap(collection, iteratee) {
|
|
|
2933
3030
|
}
|
|
2934
3031
|
var baseMap_default = baseMap;
|
|
2935
3032
|
|
|
3033
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/map.js
|
|
3034
|
+
function map(collection, iteratee) {
|
|
3035
|
+
var func = isArray_default(collection) ? arrayMap_default : baseMap_default;
|
|
3036
|
+
return func(collection, baseIteratee_default(iteratee, 3));
|
|
3037
|
+
}
|
|
3038
|
+
var map_default = map;
|
|
3039
|
+
|
|
3040
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createFlow.js
|
|
3041
|
+
var FUNC_ERROR_TEXT2 = "Expected a function";
|
|
3042
|
+
var WRAP_CURRY_FLAG = 8;
|
|
3043
|
+
var WRAP_PARTIAL_FLAG = 32;
|
|
3044
|
+
var WRAP_ARY_FLAG = 128;
|
|
3045
|
+
var WRAP_REARG_FLAG = 256;
|
|
3046
|
+
function createFlow(fromRight) {
|
|
3047
|
+
return flatRest_default(function(funcs) {
|
|
3048
|
+
var length = funcs.length, index = length, prereq = LodashWrapper_default.prototype.thru;
|
|
3049
|
+
if (fromRight) {
|
|
3050
|
+
funcs.reverse();
|
|
3051
|
+
}
|
|
3052
|
+
while (index--) {
|
|
3053
|
+
var func = funcs[index];
|
|
3054
|
+
if (typeof func != "function") {
|
|
3055
|
+
throw new TypeError(FUNC_ERROR_TEXT2);
|
|
3056
|
+
}
|
|
3057
|
+
if (prereq && !wrapper && getFuncName_default(func) == "wrapper") {
|
|
3058
|
+
var wrapper = new LodashWrapper_default([], true);
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3061
|
+
index = wrapper ? index : length;
|
|
3062
|
+
while (++index < length) {
|
|
3063
|
+
func = funcs[index];
|
|
3064
|
+
var funcName = getFuncName_default(func), data = funcName == "wrapper" ? getData_default(func) : void 0;
|
|
3065
|
+
if (data && isLaziable_default(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
|
|
3066
|
+
wrapper = wrapper[getFuncName_default(data[0])].apply(wrapper, data[3]);
|
|
3067
|
+
} else {
|
|
3068
|
+
wrapper = func.length == 1 && isLaziable_default(func) ? wrapper[funcName]() : wrapper.thru(func);
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
return function() {
|
|
3072
|
+
var args = arguments, value = args[0];
|
|
3073
|
+
if (wrapper && args.length == 1 && isArray_default(value)) {
|
|
3074
|
+
return wrapper.plant(value).value();
|
|
3075
|
+
}
|
|
3076
|
+
var index2 = 0, result = length ? funcs[index2].apply(this, args) : value;
|
|
3077
|
+
while (++index2 < length) {
|
|
3078
|
+
result = funcs[index2].call(this, result);
|
|
3079
|
+
}
|
|
3080
|
+
return result;
|
|
3081
|
+
};
|
|
3082
|
+
});
|
|
3083
|
+
}
|
|
3084
|
+
var createFlow_default = createFlow;
|
|
3085
|
+
|
|
3086
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/flow.js
|
|
3087
|
+
var flow = createFlow_default();
|
|
3088
|
+
var flow_default = flow;
|
|
3089
|
+
|
|
3090
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/fromPairs.js
|
|
3091
|
+
function fromPairs(pairs) {
|
|
3092
|
+
var index = -1, length = pairs == null ? 0 : pairs.length, result = {};
|
|
3093
|
+
while (++index < length) {
|
|
3094
|
+
var pair = pairs[index];
|
|
3095
|
+
result[pair[0]] = pair[1];
|
|
3096
|
+
}
|
|
3097
|
+
return result;
|
|
3098
|
+
}
|
|
3099
|
+
var fromPairs_default = fromPairs;
|
|
3100
|
+
|
|
2936
3101
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isNil.js
|
|
2937
3102
|
function isNil(value) {
|
|
2938
3103
|
return value == null;
|
|
@@ -3038,6 +3203,16 @@ function orderBy(collection, iteratees, orders, guard) {
|
|
|
3038
3203
|
}
|
|
3039
3204
|
var orderBy_default = orderBy;
|
|
3040
3205
|
|
|
3206
|
+
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/take.js
|
|
3207
|
+
function take(array, n, guard) {
|
|
3208
|
+
if (!(array && array.length)) {
|
|
3209
|
+
return [];
|
|
3210
|
+
}
|
|
3211
|
+
n = guard || n === void 0 ? 1 : toInteger_default(n);
|
|
3212
|
+
return baseSlice_default(array, 0, n < 0 ? 0 : n);
|
|
3213
|
+
}
|
|
3214
|
+
var take_default = take;
|
|
3215
|
+
|
|
3041
3216
|
// ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/uniqWith.js
|
|
3042
3217
|
function uniqWith(array, comparator) {
|
|
3043
3218
|
comparator = typeof comparator == "function" ? comparator : void 0;
|
|
@@ -3053,11 +3228,14 @@ export {
|
|
|
3053
3228
|
upperFirst_default,
|
|
3054
3229
|
deburr_default,
|
|
3055
3230
|
camelCase_default,
|
|
3056
|
-
chain_default,
|
|
3057
3231
|
clamp_default,
|
|
3058
3232
|
cloneDeep_default,
|
|
3059
3233
|
countBy_default,
|
|
3234
|
+
toPairs_default,
|
|
3060
3235
|
filter_default,
|
|
3236
|
+
map_default,
|
|
3237
|
+
flow_default,
|
|
3238
|
+
fromPairs_default,
|
|
3061
3239
|
isString_default,
|
|
3062
3240
|
isEmpty_default,
|
|
3063
3241
|
isEqual_default,
|
|
@@ -3069,6 +3247,7 @@ export {
|
|
|
3069
3247
|
pickBy_default,
|
|
3070
3248
|
orderBy_default,
|
|
3071
3249
|
startCase_default,
|
|
3250
|
+
take_default,
|
|
3072
3251
|
uniq_default,
|
|
3073
3252
|
uniqWith_default
|
|
3074
3253
|
};
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
} from "./chunk-YEAWWJSJ.js";
|
|
11
11
|
import {
|
|
12
12
|
createJsxComponent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UOPTKXLE.js";
|
|
14
14
|
import {
|
|
15
15
|
__commonJS,
|
|
16
16
|
__toESM,
|
|
17
17
|
isFunction_default,
|
|
18
18
|
mapValues_default,
|
|
19
19
|
maxBy_default
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5XC6ZMS5.js";
|
|
21
21
|
|
|
22
22
|
// ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/base64.js
|
|
23
23
|
var require_base64 = __commonJS({
|
|
@@ -2,27 +2,27 @@ import {
|
|
|
2
2
|
DualModePrompt,
|
|
3
3
|
extractType,
|
|
4
4
|
inspect
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZSZTPETU.js";
|
|
6
6
|
import {
|
|
7
7
|
Tool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-L2ZDZKCB.js";
|
|
9
9
|
import {
|
|
10
10
|
LoopExceededError
|
|
11
11
|
} from "./chunk-WSVDMGMR.js";
|
|
12
12
|
import {
|
|
13
13
|
Exit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-E5YW5YQN.js";
|
|
15
15
|
import {
|
|
16
16
|
assertValidComponent
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UOENUUUV.js";
|
|
18
18
|
import {
|
|
19
19
|
wrapContent
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VWQUGDHE.js";
|
|
21
21
|
import {
|
|
22
22
|
cloneDeep_default,
|
|
23
23
|
isPlainObject_default,
|
|
24
24
|
omit_default
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5XC6ZMS5.js";
|
|
26
26
|
|
|
27
27
|
// src/exit-parser.ts
|
|
28
28
|
function isValuePrimitive(value) {
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
isJsonSchema,
|
|
3
3
|
isValidIdentifier,
|
|
4
4
|
isZuiSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EKXZXQJB.js";
|
|
6
6
|
import {
|
|
7
7
|
uniq_default
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5XC6ZMS5.js";
|
|
9
9
|
|
|
10
10
|
// src/exit.ts
|
|
11
11
|
import { transforms } from "@bpinternal/zui";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk4VYDQ3VFcjs = require('./chunk-4VYDQ3VF.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRKKRSBX3cjs = require('./chunk-RKKRSBX3.cjs');
|
|
9
9
|
|
|
10
10
|
// src/exit.ts
|
|
11
11
|
var _zui = require('@bpinternal/zui');
|
|
@@ -42,13 +42,13 @@ var Exit = (_class = class _Exit {
|
|
|
42
42
|
*/
|
|
43
43
|
rename(name) {
|
|
44
44
|
const before = this.name;
|
|
45
|
-
if (!
|
|
45
|
+
if (!_chunk4VYDQ3VFcjs.isValidIdentifier.call(void 0, name)) {
|
|
46
46
|
throw new Error(
|
|
47
47
|
`Invalid name for exit ${name}. An exit name must start with a letter and contain only letters, numbers, and underscores. It must be 1-50 characters long.`
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
this.name = name;
|
|
51
|
-
this.aliases =
|
|
51
|
+
this.aliases = _chunkRKKRSBX3cjs.uniq_default.call(void 0, [name, ...this.aliases.map((alias) => alias === before ? name : alias)]);
|
|
52
52
|
return this;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
@@ -177,7 +177,7 @@ var Exit = (_class = class _Exit {
|
|
|
177
177
|
* ```
|
|
178
178
|
*/
|
|
179
179
|
constructor(props) {;_class.prototype.__init.call(this);
|
|
180
|
-
if (!
|
|
180
|
+
if (!_chunk4VYDQ3VFcjs.isValidIdentifier.call(void 0, props.name)) {
|
|
181
181
|
throw new Error(
|
|
182
182
|
`Invalid name for exit ${props.name}. A exit name must start with a letter and contain only letters, numbers, and underscores. It must be 1-50 characters long.`
|
|
183
183
|
);
|
|
@@ -197,13 +197,13 @@ var Exit = (_class = class _Exit {
|
|
|
197
197
|
`Invalid aliases for exit ${props.name}. Expected an array, but got type "${typeof props.aliases}"`
|
|
198
198
|
);
|
|
199
199
|
}
|
|
200
|
-
if (props.aliases && props.aliases.some((alias) => !
|
|
200
|
+
if (props.aliases && props.aliases.some((alias) => !_chunk4VYDQ3VFcjs.isValidIdentifier.call(void 0, alias))) {
|
|
201
201
|
throw new Error(`Invalid aliases for exit ${props.name}. Expected an array of valid identifiers.`);
|
|
202
202
|
}
|
|
203
203
|
if (typeof props.schema !== "undefined") {
|
|
204
|
-
if (
|
|
204
|
+
if (_chunk4VYDQ3VFcjs.isZuiSchema.call(void 0, props.schema)) {
|
|
205
205
|
this.schema = _zui.transforms.toJSONSchemaLegacy(props.schema);
|
|
206
|
-
} else if (
|
|
206
|
+
} else if (_chunk4VYDQ3VFcjs.isJsonSchema.call(void 0, props.schema)) {
|
|
207
207
|
this.schema = props.schema;
|
|
208
208
|
} else {
|
|
209
209
|
throw new Error(
|
|
@@ -212,7 +212,7 @@ var Exit = (_class = class _Exit {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
this.name = props.name;
|
|
215
|
-
this.aliases =
|
|
215
|
+
this.aliases = _chunkRKKRSBX3cjs.uniq_default.call(void 0, [props.name, ..._nullishCoalesce(props.aliases, () => ( []))]);
|
|
216
216
|
this.description = props.description;
|
|
217
217
|
this.metadata = _nullishCoalesce(props.metadata, () => ( {}));
|
|
218
218
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk4VYDQ3VFcjs = require('./chunk-4VYDQ3VF.cjs');
|
|
4
4
|
|
|
5
5
|
// src/truncator.ts
|
|
6
6
|
var DEFAULT_REMOVE_CHUNK = 250;
|
|
@@ -25,7 +25,7 @@ function truncateWrappedContent({
|
|
|
25
25
|
throwOnFailure = true
|
|
26
26
|
}) {
|
|
27
27
|
var _a, _b, _c;
|
|
28
|
-
const tokenizer =
|
|
28
|
+
const tokenizer = _chunk4VYDQ3VFcjs.getTokenizer.call(void 0, );
|
|
29
29
|
const parts = [];
|
|
30
30
|
for (const msg of messages) {
|
|
31
31
|
const current = [];
|