ravenflow 0.3.0 → 0.3.1
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 +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1943,10 +1943,10 @@ var JobFailuresRepo = class extends Repository {
|
|
|
1943
1943
|
return doc;
|
|
1944
1944
|
}
|
|
1945
1945
|
validateFailureInput(input) {
|
|
1946
|
-
if (typeof input.jobId !== "string" || input.jobId.length === 0) {
|
|
1946
|
+
if (typeof input.jobId !== "string" || input.jobId.trim().length === 0) {
|
|
1947
1947
|
throw new Error("JobFailuresRepo.recordFailure: jobId must be a non-empty string");
|
|
1948
1948
|
}
|
|
1949
|
-
if (typeof input.jobType !== "string" || input.jobType.length === 0) {
|
|
1949
|
+
if (typeof input.jobType !== "string" || input.jobType.trim().length === 0) {
|
|
1950
1950
|
throw new Error("JobFailuresRepo.recordFailure: jobType must be a non-empty string");
|
|
1951
1951
|
}
|
|
1952
1952
|
if (!(input.failedAt instanceof Date) || Number.isNaN(input.failedAt.getTime())) {
|
|
@@ -1998,7 +1998,7 @@ var JobFailuresRepo = class extends Repository {
|
|
|
1998
1998
|
return { items, total };
|
|
1999
1999
|
}
|
|
2000
2000
|
async getFailure(jobId) {
|
|
2001
|
-
if (typeof jobId !== "string" || jobId.length === 0) {
|
|
2001
|
+
if (typeof jobId !== "string" || jobId.trim().length === 0) {
|
|
2002
2002
|
throw new Error("JobFailuresRepo.getFailure: jobId must be a non-empty string");
|
|
2003
2003
|
}
|
|
2004
2004
|
const filter = { jobId };
|
|
@@ -2166,7 +2166,7 @@ var JobConfigsRepo = class extends Repository {
|
|
|
2166
2166
|
await this.collection.bulkWrite(ops, { ordered: false });
|
|
2167
2167
|
}
|
|
2168
2168
|
validateJobType(jobType, ctx) {
|
|
2169
|
-
if (typeof jobType !== "string" || jobType.length === 0) {
|
|
2169
|
+
if (typeof jobType !== "string" || jobType.trim().length === 0) {
|
|
2170
2170
|
throw new Error(`${ctx}: jobType must be a non-empty string`);
|
|
2171
2171
|
}
|
|
2172
2172
|
if (jobType.includes(".") || jobType.includes("$")) {
|