create-mastra 0.10.2 → 0.10.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +31 -8
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -432,8 +432,8 @@ function requireQuote () {
|
|
|
432
432
|
if (s && typeof s === 'object') {
|
|
433
433
|
return s.op.replace(/(.)/g, '\\$1');
|
|
434
434
|
}
|
|
435
|
-
if ((/["\s]/).test(s) && !(/'/).test(s)) {
|
|
436
|
-
return "'" + s.replace(/(['
|
|
435
|
+
if ((/["\s\\]/).test(s) && !(/'/).test(s)) {
|
|
436
|
+
return "'" + s.replace(/(['])/g, '\\$1') + "'";
|
|
437
437
|
}
|
|
438
438
|
if ((/["'\s]/).test(s)) {
|
|
439
439
|
return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"';
|
|
@@ -1079,17 +1079,40 @@ var MastraLogger = class {
|
|
|
1079
1079
|
getTransports() {
|
|
1080
1080
|
return this.transports;
|
|
1081
1081
|
}
|
|
1082
|
-
|
|
1082
|
+
trackException(_error) {
|
|
1083
|
+
}
|
|
1084
|
+
async getLogs(transportId, params) {
|
|
1083
1085
|
if (!transportId || !this.transports.has(transportId)) {
|
|
1084
|
-
return [];
|
|
1086
|
+
return { logs: [], total: 0, page: params?.page ?? 1, perPage: params?.perPage ?? 100, hasMore: false };
|
|
1085
1087
|
}
|
|
1086
|
-
return this.transports.get(transportId).getLogs() ??
|
|
1088
|
+
return this.transports.get(transportId).getLogs(params) ?? {
|
|
1089
|
+
logs: [],
|
|
1090
|
+
total: 0,
|
|
1091
|
+
page: params?.page ?? 1,
|
|
1092
|
+
perPage: params?.perPage ?? 100,
|
|
1093
|
+
hasMore: false
|
|
1094
|
+
};
|
|
1087
1095
|
}
|
|
1088
|
-
async getLogsByRunId({
|
|
1096
|
+
async getLogsByRunId({
|
|
1097
|
+
transportId,
|
|
1098
|
+
runId,
|
|
1099
|
+
fromDate,
|
|
1100
|
+
toDate,
|
|
1101
|
+
logLevel,
|
|
1102
|
+
filters,
|
|
1103
|
+
page,
|
|
1104
|
+
perPage
|
|
1105
|
+
}) {
|
|
1089
1106
|
if (!transportId || !this.transports.has(transportId) || !runId) {
|
|
1090
|
-
return [];
|
|
1107
|
+
return { logs: [], total: 0, page: page ?? 1, perPage: perPage ?? 100, hasMore: false };
|
|
1091
1108
|
}
|
|
1092
|
-
return this.transports.get(transportId).getLogsByRunId({ runId }) ??
|
|
1109
|
+
return this.transports.get(transportId).getLogsByRunId({ runId, fromDate, toDate, logLevel, filters, page, perPage }) ?? {
|
|
1110
|
+
logs: [],
|
|
1111
|
+
total: 0,
|
|
1112
|
+
page: page ?? 1,
|
|
1113
|
+
perPage: perPage ?? 100,
|
|
1114
|
+
hasMore: false
|
|
1115
|
+
};
|
|
1093
1116
|
}
|
|
1094
1117
|
};
|
|
1095
1118
|
|