bun-query-builder 0.2.8 → 0.2.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/bin/cli.js +6 -1
- package/dist/src/index.js +5 -0
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -28561,6 +28561,11 @@ function buildMigrationPlan2(models, options) {
|
|
|
28561
28561
|
let enumValues;
|
|
28562
28562
|
const isPk = attrName === primaryKey;
|
|
28563
28563
|
inferred = normalizeAttributeType(attr.type) ?? detectTypeFromValidationRule(attr.validation?.rule);
|
|
28564
|
+
if (inferred === "string") {
|
|
28565
|
+
const maxLength = extractMaxFromRules(attr.validation?.rule);
|
|
28566
|
+
if (maxLength && maxLength > 255)
|
|
28567
|
+
inferred = "text";
|
|
28568
|
+
}
|
|
28564
28569
|
if (!inferred || inferred === "enum") {
|
|
28565
28570
|
const enumVals = detectEnumFromValidationRule(attr.validation?.rule);
|
|
28566
28571
|
if (enumVals && enumVals.length > 0) {
|
|
@@ -31531,7 +31536,7 @@ function getPrefix() {
|
|
|
31531
31536
|
}
|
|
31532
31537
|
var prefix = getPrefix();
|
|
31533
31538
|
// package.json
|
|
31534
|
-
var version2 = "0.2.
|
|
31539
|
+
var version2 = "0.2.9";
|
|
31535
31540
|
|
|
31536
31541
|
// bin/cli.ts
|
|
31537
31542
|
init_actions();
|
package/dist/src/index.js
CHANGED
|
@@ -28560,6 +28560,11 @@ function buildMigrationPlan2(models, options) {
|
|
|
28560
28560
|
let enumValues;
|
|
28561
28561
|
const isPk = attrName === primaryKey;
|
|
28562
28562
|
inferred = normalizeAttributeType(attr.type) ?? detectTypeFromValidationRule(attr.validation?.rule);
|
|
28563
|
+
if (inferred === "string") {
|
|
28564
|
+
const maxLength = extractMaxFromRules(attr.validation?.rule);
|
|
28565
|
+
if (maxLength && maxLength > 255)
|
|
28566
|
+
inferred = "text";
|
|
28567
|
+
}
|
|
28563
28568
|
if (!inferred || inferred === "enum") {
|
|
28564
28569
|
const enumVals = detectEnumFromValidationRule(attr.validation?.rule);
|
|
28565
28570
|
if (enumVals && enumVals.length > 0) {
|
package/package.json
CHANGED