@ghentcdh/crouton-api 0.0.1-alpha.80 → 0.0.1-alpha.82
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.cjs +16 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7237,7 +7237,7 @@ var ZodValidationPipe = class {
|
|
|
7237
7237
|
decimalKeys;
|
|
7238
7238
|
/** Prisma Decimal constructor resolved once per pipe instance; null if unavailable. */
|
|
7239
7239
|
decimalCtor;
|
|
7240
|
-
/** Whether to coerce `undefined` → `null` on nullable fields (create
|
|
7240
|
+
/** Whether to coerce `undefined` → `null` on nullable fields (create only). */
|
|
7241
7241
|
coerceUndefinedToNull;
|
|
7242
7242
|
constructor(schema, options = {}) {
|
|
7243
7243
|
this.schema = schema;
|
|
@@ -7282,7 +7282,7 @@ var ZodValidationPipe = class {
|
|
|
7282
7282
|
}
|
|
7283
7283
|
return out;
|
|
7284
7284
|
}
|
|
7285
|
-
/** Replace `undefined` with `null` on nullable fields (create
|
|
7285
|
+
/** Replace `undefined` with `null` on nullable fields (create only). */
|
|
7286
7286
|
coerceNullable(value) {
|
|
7287
7287
|
if (!this.coerceUndefinedToNull || value == null || typeof value !== "object" || Array.isArray(value)) {
|
|
7288
7288
|
return value;
|
|
@@ -9025,22 +9025,19 @@ var import_promises7 = require("fs/promises");
|
|
|
9025
9025
|
var import_node_module2 = require("module");
|
|
9026
9026
|
var import_node_path15 = require("path");
|
|
9027
9027
|
var loadDotenv = /* @__PURE__ */ __name((dir) => {
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
const
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
dotenv.config({
|
|
9035
|
-
path: (0, import_node_path15.join)(d, ".env")
|
|
9036
|
-
});
|
|
9037
|
-
return;
|
|
9038
|
-
}
|
|
9039
|
-
const parent = (0, import_node_path15.dirname)(d);
|
|
9040
|
-
if (parent === d) break;
|
|
9041
|
-
d = parent;
|
|
9028
|
+
let d = dir;
|
|
9029
|
+
for (let i = 0; i < 6; i++) {
|
|
9030
|
+
const file = (0, import_node_path15.join)(d, ".env");
|
|
9031
|
+
if ((0, import_node_fs7.existsSync)(file)) {
|
|
9032
|
+
process.loadEnvFile(file);
|
|
9033
|
+
return;
|
|
9042
9034
|
}
|
|
9043
|
-
|
|
9035
|
+
const parent = (0, import_node_path15.dirname)(d);
|
|
9036
|
+
if (parent === d) break;
|
|
9037
|
+
d = parent;
|
|
9038
|
+
}
|
|
9039
|
+
if (!process.env["DATABASE_URL"]) {
|
|
9040
|
+
console.warn("[crouton] No .env found and DATABASE_URL is not set \u2014 prisma commands may fail");
|
|
9044
9041
|
}
|
|
9045
9042
|
}, "loadDotenv");
|
|
9046
9043
|
var resolveBin = /* @__PURE__ */ __name((name, cwd) => {
|
|
@@ -9065,7 +9062,8 @@ var resolveBin = /* @__PURE__ */ __name((name, cwd) => {
|
|
|
9065
9062
|
var run = /* @__PURE__ */ __name((cmd, args, cwd) => new Promise((resolve7) => {
|
|
9066
9063
|
const child = (0, import_node_child_process.spawn)(cmd, args, {
|
|
9067
9064
|
cwd,
|
|
9068
|
-
shell: process.platform === "win32"
|
|
9065
|
+
shell: process.platform === "win32",
|
|
9066
|
+
env: process.env
|
|
9069
9067
|
});
|
|
9070
9068
|
let stdout = "";
|
|
9071
9069
|
let stderr = "";
|