@restura/core 1.0.7 → 1.0.9
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 +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import winston from "winston";
|
|
|
15
15
|
import { format } from "logform";
|
|
16
16
|
|
|
17
17
|
// src/logger/loggerConfigSchema.ts
|
|
18
|
-
import { z } from "zod
|
|
18
|
+
import { z } from "zod";
|
|
19
19
|
var loggerConfigSchema = z.object({
|
|
20
20
|
level: z.enum(["info", "warn", "error", "debug", "silly"]).default("info")
|
|
21
21
|
});
|
|
@@ -1058,10 +1058,10 @@ var getMulterUpload = (directory) => {
|
|
|
1058
1058
|
};
|
|
1059
1059
|
|
|
1060
1060
|
// src/restura/schemas/resturaSchema.ts
|
|
1061
|
-
import { z as z3 } from "zod
|
|
1061
|
+
import { z as z3 } from "zod";
|
|
1062
1062
|
|
|
1063
1063
|
// src/restura/schemas/validatorDataSchema.ts
|
|
1064
|
-
import { z as z2 } from "zod
|
|
1064
|
+
import { z as z2 } from "zod";
|
|
1065
1065
|
var validatorDataSchemeValue = z2.union([z2.string(), z2.array(z2.string()), z2.number(), z2.array(z2.number())]);
|
|
1066
1066
|
var validatorDataSchema = z2.object({
|
|
1067
1067
|
type: z2.enum(["TYPE_CHECK", "MIN", "MAX", "ONE_OF"]),
|
|
@@ -1364,7 +1364,7 @@ async function isSchemaValid(schemaToCheck) {
|
|
|
1364
1364
|
// src/restura/validators/requestValidator.ts
|
|
1365
1365
|
import { ObjectUtils as ObjectUtils2 } from "@redskytech/core-utils";
|
|
1366
1366
|
import jsonschema from "jsonschema";
|
|
1367
|
-
import { z as z4 } from "zod
|
|
1367
|
+
import { z as z4 } from "zod";
|
|
1368
1368
|
|
|
1369
1369
|
// src/restura/utils/utils.ts
|
|
1370
1370
|
function addQuotesToStrings(variable) {
|
|
@@ -1591,7 +1591,7 @@ async function schemaValidation(req, res, next) {
|
|
|
1591
1591
|
}
|
|
1592
1592
|
|
|
1593
1593
|
// src/restura/schemas/resturaConfigSchema.ts
|
|
1594
|
-
import { z as z5 } from "zod
|
|
1594
|
+
import { z as z5 } from "zod";
|
|
1595
1595
|
var isTsx = process.argv[1]?.endsWith(".ts");
|
|
1596
1596
|
var isTsNode = process.env.TS_NODE_DEV || process.env.TS_NODE_PROJECT;
|
|
1597
1597
|
var customApiFolderPath = isTsx || isTsNode ? "/src/api" : "/dist/api";
|
|
@@ -1618,7 +1618,7 @@ import pg from "pg";
|
|
|
1618
1618
|
import crypto from "crypto";
|
|
1619
1619
|
import format3 from "pg-format";
|
|
1620
1620
|
import { format as sqlFormat } from "sql-formatter";
|
|
1621
|
-
import { z as z6 } from "zod
|
|
1621
|
+
import { z as z6 } from "zod";
|
|
1622
1622
|
|
|
1623
1623
|
// src/restura/sql/PsqlUtils.ts
|
|
1624
1624
|
import format2 from "pg-format";
|
|
@@ -2587,7 +2587,9 @@ DELETE FROM "${routeData.table}" ${joinStatement} ${whereClause}`;
|
|
|
2587
2587
|
where.forEach((item, index) => {
|
|
2588
2588
|
if (index === 0) whereClause = "WHERE ";
|
|
2589
2589
|
if (item.custom) {
|
|
2590
|
-
|
|
2590
|
+
const customReplaced = this.replaceParamKeywords(item.custom, routeData, req, sqlParams);
|
|
2591
|
+
whereClause += ` ${item.conjunction || ""} ${customReplaced}
|
|
2592
|
+
`;
|
|
2591
2593
|
return;
|
|
2592
2594
|
}
|
|
2593
2595
|
if (item.operator === void 0 || item.value === void 0 || item.columnName === void 0 || item.tableName === void 0)
|